I’m trying to learn programming and following the guide step-by-step, but realise is too time-consuming and overwhelming for my needs. My goal is make an application that can send data (Soap API) and receive. Is there any shortcut? Which parts of the tutorials do I need to “get it right” (and which can i skip)?
I’m already working with accounting today, so my end goal is not to be “professional” programmer, but learn to code to try to make my work-flow more automated. So I’m trying to learn how to make an application to send tax reports etc, to the government site and receive back. Any tips will be highly appreciated.
Well, it’s an in demand occupation that very quickly gets into six figure salaries. In your experience do occupations that are easy to learn and do pay so well?
Which parts of the tutorials do I need to “get it right” (and which can i skip)?
I wouldn’t expect you’d have to become an expert - making API requests is pretty basic. At the very least I would expect a solid understanding of JS. But even that depends. Is this running in a browser? Is this running locally? There may be other script languages you can use, just making CURL requests, or whatever.
Hello @adrian.le welcome to the freeCodeCamp forums!
This sounds like a potentially complex job, or it could be much simpler. Its less about what you can do, and more about what you want it to do. More features = more complex of a job = more stuff to learn.
What data are you trying to send it in, what format it is it in? Is the format complicated?
How do you want the data you receive back? Is the format complicated?
How often are you doing this? (1 time a day, or 1 time a second for example)
How much are you doing this? (1 record, for 5000 records for example)
Aren’t tax programs really complicated, and require knowledge of legally what is required for a given situation?
The easiest shortcut is to program nothing and use off the shelf tooling for what you want. However that might not be available or you will need/want to tweak it. At this point a full from the ground-up app might be a sizable job depending on how you answer the above questions. Even something trivial will require a decent knowledge of a few things, so an “easy way” isn’t actually that easy.
Yes, I know its hard to learn programming, thats why I post this. And yes, making API should be much easier than learning the “whole programming”
The reports/case are in Excel. So it shouldn’t be problems to formatting to XML. So I need an application, either webbase or locally, that are connected to the government site. I think the easiest is just feed the XML files into the application so it can pass on.
I think the most basic is just have an XML-file ready and just feed into the application. Where the application have database over different companies so when feeding to the government site it knows which reports go to which company…
I have made payroll and annually tax reports in Excel that are fully functional. Yes, I can buy payroll and tax reports program but that cost about 2000-4000+ euros annually (depends how many clients I bookkeeping for) in my country. But since I already have that covered in my Excel, I’m trying to figure out the last piece (send the reports to the government with “a click” - without need to go to the government site and fill out the forms manually…)
The format I receive back is also in XML. It uses SOAP api. The frequency is several times in a month, because I have to send report for every clients. So for now its time-consuming without the automation.
So if I act like a consultant, and was assigned to build this for you, this is more or less what I’d ask to get an idea of what would be needed to built:
Do you create/have the XML, or this app you want to build creates it from the excel?
What format is the XML in? Will it ever change or does it just represent all the data in the sheet?
Where does the database get its data from? How do you update the database? Who updates the database?
Is the app suppose to automate the “send to government” part thru their website? If there is an API to send the SOAP requests directly too, what format does the government expect/require? Is there any authentication related to this process? If so how does the application manage it?
What does the app do with the responses? Roughly many clients do you send every month? This is more just to understand the scale, as handling 100+ clients is different than doing this for say 5, as 100+ is a huge time sink, where-as a handful is more an inconvenience.
My though is I can make the Excel automatically create the strings for XML and then copy it over to notepad and make .xml-files. Or copy the XML strings into the app…
I don’t know this part (what format is the XML). Just know its a XML-file we receive from the government site. It will not change. I only need it to pass on one time and the case is “closed”.
I.e. the government need the report for payroll in january to calculate the taxes. So when january is send, then the periode is “closed”.
I need to update it myself over my clients in the database.
I.e. If I buy payroll program, they support “send to government”. I log in, either web or desktop program, fill out the payroll, and send to government through the program. So no need to go to government website.
The government provide a guidline how to set up the API. I’m not advanced enought to reply much, how it manage/require etc, but it uses SOAP api. Yes, it need authentication.
The app should be able to confirm successfull sending. Beside that I don’t think it need to receive the XML-file from the government since I have used several others that don’t support that anyway.
For now I need to send around 20 every month and 50 annually.
I wouldn’t say its exactly “simple” if your trying to learn from scratch to build this, as the current requirements you’ve given mean you actually have to build a decent amount of stuff to cover what is required.
This means you will have to be able to have and manage a database with all the clients you have. This by itself means you need another set of software (a database) and will have to manage that database over time and have your app interact with this through some UI you will also have to build.
So this is where the meat of the app is, but your explanation is rather vague. Which is fine from a user standpoint, but from someone who needs to actually build the thing its not good enough.
So if I had to build it, I’d have the app directly interact and parse the Excel file to get its information (there are libraries to help with this), build the XML in some format from scratch depending on what was in the sheet, and send that somewhere to the government. However this skips out on whatever data you need to relate in the database, so you’d have to “combine” those two sets of data within the app on the fly.
This is more or less the specification you need to follow to send the data to the government. So your job is more to “build the pipe” from what data you have, to the governments API. This technically isn’t too bad, but due to other requirements you have (such as the list of clients in a database) your really have 4 big features:
Parse data from Excel sheet
Combine/relate the data from the sheet with data from a database
Manage said database which has a list of clients
Sending data to the government with a SOAP request which combines the Excel data with the company data.
So going back to your original request about “is there a shortcut” the simple answer is no there is no shortcut as what you want to build requires knowledge of multiple things to cover the requirements you want.
You could throw out requirements and make things simpler.
Such as if you throw out the list of clients thus meaning you don’t need a database, or use Excel itself.
Or you remove all possible UI, and make this a script that you run from a command line
Or you use Excel to export to a simpler format (maybe CSV?) so its easier to parse for your app.
There are options to make things simpler, but even just the “call SOAP endpoint with data” requires a decent amount of work and skill.
Honestly, since your sending 20 or so clients every month I’d consider paying someone to build some automation for you. Assuming each of the clients takes 10 minutes (for easy math) that’s 200 minutes a month or around 3.3 hours a month, that isn’t that much time in the grand scheme of things. So you shouldn’t look to spend too much on anyone wanting to build this, however it depends on how many of the features you want. More features = pay more.
If you wanted to continue learning so you can build this yourself, then go right ahead! But the amount saved from automating this requires a large amount of time to learn what you need to do it correctly, which ultimately probably wont be worth it if your only spending 3~ hours a month on doing it manually.
However if each client takes like 1 hour, then things change and you could increase your budget for someone building it, or continue learning.
Last thing is to remember this isn’t really something you can shortcut in terms of learning. The last thing you want is to build this yourself, screw it up and start ending funk-o data to the government.
The operative words here are government, tax, and money. You have to be really careful when dealing with either of these. Quick and easy should definitely not be your main concern here.
I can’t say we have enough information to know what is actually involved in making this work but this doesn’t sound like something I would want to tackle as my first step into programming. But maybe I’m wrong and it’s super easy and foolproof.
I was hoping API is a common thing and that is easy/normal to send/receive data and much easier to learn than “hardcore coding”.
If I drop the database and just have a simple UI. And just copy and paste in the XML strings that I want to send?
But what about taking use of services like Postman or SoapUI?
I agree the time spend learning doesn’t pay off vs spending few hours a month to manually fill out the forms. But that also why I hestitate to pay 2000-4000 euros annually to save few hours a month.
Yes, my backup plan is to hire somebody on later stage (when I realise I’m not capable of this )
The worst thing that could happen is probably the numbers are wrong/missing.
I was hoping API is a common thing and that is easy/normal to send/receive data and much easier to learn than “hardcore coding”.
Yes, working with API’s is something that you have learn early on. But the more you want to automate this, the more involved the solution is going to be. And as pointing out, a mistake could be costly so I’d want to be extra careful. Would you go to a doctor who knew nothing but the bare minimum to perform your appendectomy? If I were you, I’d be worried about sleepless nights and anxiety of the wrong data getting submitted.
OK, but all of those things may become necessary depending on what you want to do and if you want to search for code examples to help you.
But I don’t know of a course entitled The Bare Minimum That Adrian Needs to Learn to Do His API Thing That He’s Imagining. Most material out there is geared towards people that are trying to learn as much as they can.
I would not advise doing something this complex and potentially dangerous if that is your only goal. People should learn coding because they think it’s interesting. If that is the case, keep learning coding and then eventually you’ll be able to either answer your own questions, or at least phrase them better.
My last work as employee I was basically in charge of over 3000 companies (and helping out other colleagues) to make sure the tax reports is corrected and make tweaks on it. So the part about tax, money, government is no problem…
I only need to know more about api and programming
Right, but that is using tools you understand. You are trying to automate the process using tools you do not (yet) understand.
Trust me, I have no problem with you wanting to save both money and time. Money comes and goes, but time is lost forever so it’s well worth spending as little of it on things you do not want to spend it on.
Well, that is exactly why I’m posting this to understand better how much time I need to invest in this. And try to find out if there is an “easier” route.
I have used, and still using programs that send the reports to the government. I’m just trying to replicate and building a simple one… As long as you have the correct numbers its basically like sending in a form with the numbers to the govnerment…
This is where the term simple differs depending on the context.
Lets take Twitter as an example. Twitter can be boiled down to a webpage that shows other peoples entries into a text box that allows you to create tweets. You could say its simple, and yet Twitter is one of the largest scaled applications on earth.
Another would be Google, Google is just a web page you type into a single entry box and show results, you could describe it as simple. Yet it can go without saying that Google is much more than that single text box.
So yes the applications your using can be “simple” from a user standpoint, but that doesn’t mean they are simple to make. Just because the end-user experience is simple, doesn’t mean you can go out learn a few things and build it with no problems. It could be such applications abstract away a lot of complexity so the end user’s experience is simple.
Where do the XML strings come from? Postman can send the data to the government for you, but what you send in Postman needs to be created from somewhere. Technically sending data like postman is a 1 or 2 liner using a library. Its the data that you want to send that is complicated.
Even if you boil this down to the simplest setup I mentioned earlier, a CLI script that takes in a CSV file (exported from excel), it needs to still create the XML the government expects from the CSV data, and send it to the SOAP api.
You don’t need a UI, you don’t need to interact with an Excel document directly, just a CSV, and you don’t need to manually copy to postman (as sending the data is the easier part)
However, you still need to know how to format the XML, how to read from a CSV file, how to send data to the SOAP endpoint. And most importantly you need to know how to test what your doing so you can actually check what your doing and understand if your doing it right or wrong.
The other option I didn’t directly mention is you pay someone one time to build this for you. It would probably be cheaper than paying annually, but obviously you only get what you pay for, so you wont get any other features the sort of “official” app would give you.
You could pay more for more features (like a UI), or pay less for less features that can be built more quickly.
In the Excel files that I have created for payroll/tax reports, I can create the XML strings. I only need to copy and paste the strings like in Word.
Yes, I’ll concider this on a later stage. Its the easy road. I also want to learn to code because of other potential automation. My plan is to try to learn coding (basic stuff) until summer so lets see then…
I strongly recommend against trying to take shortcuts. By all means, focus on what you need to learn, but take the time to learn it correctly and fully. In my experience, rushing actually ends up taking longer because you have to fix more mistakes.