Lurker News
I’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 comments
pcmaffey1 reply#
Surprised it hasn't been mentioned yet... API design. (Perhaps people consider it middle-ware of sorts?) Anyways, your API is basically the interface to your back-end and goes hand-in-hand with your database as the core components of your data model, which in turn, is probably the most critical aspect of most software.
gnulinux1 reply#
My company asks API design question in interviews (in fact, I designed and ask this question). We don't expect candidate to know anything about HTTP, REST and databases (if the candidate is junior). We have a question prompt that essentially summarizes what candidates need to know to solve the problem. Then, we give them an example API and a real life problem. We expect them to design the API between app and backend using RESTful HTTP requests, and for extra points they can design database structure too (how to store data coming from APIs) (and how to make it efficient, e.g. using which indices etc) Candidate has full freedom and I try to see if they can (1) read a technical document and understand (2) design a structure and process to solve a problem (3) can they collaborate with me to improve their ideas. In practice I thought this question is pretty useful. There are some hickups though (like if candidate is clueless about what REST is you need to give them 5 mins so they can read and understand it, which causes some silence, which I don't think is ideal) but so far we thought it's a good question.
beachy1 reply#
If by REST you mean full on HATEOAS then I definitely would not use that as an interview test. Advocates tend to be religious in their intensity, yet few real world APIs are full REST in that sense. Discussions around HATEOAS could be enlightening but requiring people to buy into it not IMO.

I 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.

gnulinux#
I let candidate design an API for a problem we solved in real life (and compare their API to the API and db I designed). It really isn't about HATEOAS purism, we chose REST simply as an abstraction candidate should operate in, but they're free to break some principles if they like (for caching etc we already break it). We're mindful of these and are very lenient with candidate's answer. As long as they can show signs of being able to solve the problem in real life, they're good to go. I should note that we use this question mostly for junior candidates, and this is the very final round of interview so all candidates will be asked ~6 45min questions and this is only one of them.
ltbarcly32 replies#
Build everything to be as easy as possible to debug, because everything else you can do at work after a nice cup of coffee, debugging is the only thing you might have to do at 3AM while drunk.

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.

beachy1 reply#
Good stuff! Especially the ORM.

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.

ltbarcly3#
> log files read nice

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.

creatornator#
Yeah blindly using ORM query builders can result in a bunch of N+1 query issues, and retrieving unnecessary data, which can impact the database load. Good advice
fergie#
You seem like a novice and I think a lot of the other answers here are focussing on fairly random/advanced concepts that are probably a bit difficult to takle in a meaningful way without getting your head around the following:

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.

lastofus#
If you really want to understand the fundamentals, look into writing a toy HTTP server from scratching starting with sockets. The language you choose to do this in doesn't matter quite as much, but bonus points if you use C and the POSIX API directly.

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

Load more comments