Our team has compiled a list of best practices that they've learned over years of experience, and we're excited to share them with you. Whether you're a seasoned backend developer or just starting out, our tips and tricks are designed to help you streamline your workflow and produce high-quality results. So sit back, grab a cup of coffee, and let's dive into the world of backend development together!
Recently, we asked Milovan what tips he would give to anyone who is interested in upping their backend game, and boy did he deliver! With years of experience under his belt, he developed a keen eye for optimizing backend development processes, so he carefully curated a list of best practices and shared them with us in an easy-to-follow format.
- Try not to use comments in your code. Aspire to write “self-commenting” code. Give your functions and variables meaningful names, keep your functions short, and functions with more complex logic should read like a story, not like code.
- Remove unneeded indentations, and try to have at most 3 indentations in a given function, one of the ways to do this is to have an early exit.
- Avoid using hardcoded strings in code, make a constant and use those instead, the main reason is easy accessibility and only a single point of failure, also strings are harder to look for in a large codebase.
- Use your IDE to its full advantage, and make sure to learn key shortcuts, this can make your life a lot easier (some that can be of help in Visual Studio are ALT+ENTER, F12, SHIFT+F12, CTRL+-…).
- Don’t start working on any new functionality immediately after you get it. Take a minute to think about what you need to do, and how it interacts with your other systems. Write down the problem and the first solution, then write an alternative solution. This can provide a lot of insights into the problem you are facing, and it is always better to lose 30 minutes on planning than two weeks on bad code that was your first idea.
- Keep your technical debt to a minimum, and your codebase clean and neat, when prototyping functionalities make as big of a mess as you like, but be sure to clean and refine the code afterwards.
- When writing unit tests do not test other people’s code. This means do not test system functions and third-party code, only test your code and business logic. Unit tests are as important as your business logic code, so make sure you maintain them as well.
Milovan Novaković is our senior software engineer with more than 14 years of work experience, he is currently in the position of .Net developer, and in addition, he is also a People Manager, Tech Lead and System Architect. In his career, he worked on various projects, from desktop applications, through backend API to full-stack development. He has also worked with Oracle, SQL Databases, MS SQL Server and so on, on over 10 major FinTech projects.
You may also like
Mirror Neurons: Do They Help Us be Better Leaders?
April 3, 2023
Saveti naših koleginica – Šta biste rekle mlađoj verziji sebe?
March 8, 2023
Cracking the Backend Code: Tips and Tricks from Our Devs
February 13, 2023
Project Valhalla – “Codes like a class, works like an int.”
January 26, 2023
Mitovi o psihoterapiji
January 20, 2023
Faster Way To Create List From Stream
August 4, 2022
Badin Soft – kako je sve počelo?
March 28, 2022
Koliko ste srećni na svom poslu?
March 22, 2022
Dejan Petković: Nije bilo potrebno biti iz IT foldera da se ukapira suština
March 10, 2022
5 great years of Badin and 5 events to celebrate (4/5)
February 11, 2022