Ask HN: What are must-know concepts for back end development?
491 pointsI’d like to learn more about backend development but most of what I find while searching are results like “Build a nodejs backend in 20 minutes” or “learn backend development in an hour.” I think part of the problem is I don’t know enough to ask the right questions.
Comments (130) 48 threads
Earlier commentsI would structure interview questions around APIs rather about distributed systems/transactions, circuit breakers, etc. - practical aspects of running multiple systems talking to each other through pipes.
So:
- Set up some kind of logging, by default use rsyslog and set it up so your logs are available somewhere other than the machine where something is running. You will be surprised how often something breaks and takes the server down with it so you can't log in.
- Later on, when you have to debug stuff, READ THE LOGS. I can't explain it, but after years of working on production systems I have noticed that almost nobody actually goes back and just reads the logs when things go wrong. You will find the problem spelled out in the logs 99% of the time. YOU CAN'T JUST GUESS WHAT WENT WRONG.
- Use transactions properly.
- If you use an ORM, do whatever you need to do to keep track of how many actual queries are done. You are going to find that you do some order of magnitude more queries than you thought. Learn how to give the ORM hints to avoid this.
And work on your logs. Tweak the info/error/debug levels so that the log files read nice. Too often we find that a common error/exception will spew hundreds of lines of shite into the log files over and over again, obfuscating the real information. Take pride in having meaningful, concise but informative log files.
YES! At one company I was at their web service framework would log thousands of lines of nonsense for every request, most of it errors about not being able to connect to services that no longer existed or thousands of lines of debugging that were never relevant to anything. Make sure you are only logging sensible things (usually this means when you see something being logged for no reason or which is no longer relevant, fix things), and if you want to log a ton of garbage, set things up so you can tell the difference and throw out the junk.
1) Get a grasp of what a "back end" _actually is_. When learning- be mindful of what you are going to tackle, and what you are going to leave alone so that you don't get overwhelmed. (In heavier technology environments, you don't really talk about "back end development" since the back end is subdivided into so many separate disciplines. Therefore "back end development" tends to be something that smaller web shops use to encompass everything that is going on on application servers- DONT FEEL THAT YOU HAVE TO BE AN EXPERT IN ALL OF THIS STUFF)
2) Have a reasonable grasp of all of available hosting platforms and their relative pros and cons: Windows/Linux, cloud/local, aws/axure, etc.
3) Get familiar with the lumps of code and/or services that you need to make an application server available to actually do "a thing".
4) Get familiar with standard software development workflow- version control, bug tracking, testing and deployment.
5) Develop a healthy attitude towards application security- understand that it takes a lot of knowledge and effort to make an application 99% secure. Learn how to do what you can with the resources you have at your disposal. On one end of the spectrum you need to know stuff like "never store a password in cleartext", on the other you have to be aware of essentially unsolvable problems like 0-day exploits and social engineering.
6) Get good at communication and teamwork. A backend, by its very nature, needs to talk and get along with other systems so therefore a back end developer needs to talk and get along with other humans.
Once you have accepted a connection, you then have to decide how to handle multiple concurrent connections. Do you use threads? Sub-processes? select/poll?
You can then move on to reading/writing to shared state. Do you use memory? Files on disk? A SQL DB? If using threads/processes, is concurrent access to those resources done safely?
It's a long journey to do the above well. I highly recommend anything/everything by W. Richard Stevens https://en.wikipedia.org/wiki/W._Richard_Stevens
All comments shown.
Couldn't load more comments. Check your connection and try again.