Skip to main content

Command Palette

Search for a command to run...

5 Good Habits of a Software Engineer

As a software engineer, it’s important to build good habits

Updated
4 min read
5 Good Habits of a Software Engineer
S

Sr. Software Engineer @ Spotify | Tech Blogger 💻 | Professional Nerd 🤓 | Musician 🎸

As a software engineer or developer, it’s important to build good habits. Especially if you're at the beginning of your career. Good habits speed you and your team up and help you write maintainable code.

Good Habits of a Software Engineer

Know Your Tools

At first thought, this might seem obvious. “Duh, obviously I know how to write code in my editor and use grep in my shell”. My point goes beyond this. What I mean is that you should really your tools to the point where you are utilizing features that speed you up.

Let’s look at an example!

My favorite IDEAs come from JetBrains. They create IntelliJ, PyCharm, WebStorm, and more. These IDEAs have (pretty much) the same features and key bindings. Over the years I’ve dedicated time to learning the most useful shortcuts. This makes refactoring quick and easy.

Rename a class? One shortcut. Extract code to a method? One shortcut. Run test in debug mode. One shortcut.

This is a simple example but you get my point. I often see engineers, from associate and senior levels, use their mouse to click buttons in the UI. Or copy-paste when renaming a variable. Don’t treat your IDEA as a simple text editor; use it as the powerful tool it is!

Not only will you save time but you will also feel awesome ⭐️

Don’t Strive For Perfection

At the beginning of my career, I wanted all the code in my team’s system to be perfect. I’d spend hours refactoring CSS classes, using ideal variable names, and creating nice abstractions. Then one day, the company decided a system from another team was gonna supersede our system. 😮 All my perfect code became useless.

Since then I’ve come to understand the value of shipping code that’s maintainable but not perfect. You might even ship code that’s not maintainable if it provides value to the business or customer. The code you write is simply a tool to solve real-life problems. If the problem warrants it, you should be OK with shipping non-perfect code.

Tech debt is not the end of the world. You get used to living in a broken world. And that’s fine because your work is not about producing perfect code, but providing value to the business or customer you are working for.

Understand What You Are Building

Too many times I’ve seen experienced engineers start a task with the goal of finishing it as quickly as possible. This is a bad habit. But for engineers at the beginning of their career, this might be exactly what they need! They need to write code, feel productive, and most importantly, learn.

Experienced engineers though, should always understand what the task achieves. Both the value it provides as well as how it fits in with the bigger picture. This is how you work your way to becoming a domain expert. Something that will greatly help you progress in your career.

Abstract, But Not Too Early

Abstractions are great. Everyone loves a good abstraction! But choosing a good abstraction is difficult. Far too many times I’ve seen engineers make abstractions during the initial design stage. This is generally a bad idea.

Abstractions hide complexity and we have different tools to hide them. In code, we have methods, functions, abstract classes, interfaces, and so on. Now, why should you not abstract too early?

Consider this example: you’re tasked with building a website with a menu at the top of the page. “Aha!”, you say. “Let me save time by creating a TopMenuWebsite component that I and my team can re-use for the next website”.

The next week the client tells you they want the menu on the right instead of at the top. “Oh shoot, I spent so much time building the TopMenuWebsite component but now it’s worthless”.

A good rule of thumb is: don’t abstract until you have at least three examples. This will give you a good understanding of what parts can be abstracted and which parts can not.

Don’t Over-Engineer

I’m an engineer — I’ve spent years in school learning about compilers, math, and low-level languages. That means I must create complex software, right? No!

Ever heard of the KISS principle?

The KISS principle states that most systems work best if they are kept simple rather than made complicated; therefore, simplicity should be a key goal in design, and unnecessary complexity should be avoided. https://en.wikipedia.org/wiki/KISS_principle

I've seen codebases where the engineers were solving trivial problems with great complexity. Or taking on too many problems for a single system. This is a classic trap that we all fall into sometimes.

Conclusion

These are my five favorite habits of an engineer who's in the start / mid of their career or someone who needs a reminder. Building good habits takes time and you learn by making mistakes, so if you ever did any of these don’t feel bad. I’ve done them all countless times but I always try to learn something from them.


Connect with me on Twitter, LinkedIn, or GitHub

Originally published at prplcode.dev

Comments (15)

Join the discussion
T

Thanks for these wonderful tips. I do think engineers who are just starting (like me for example), should read tips like these.

Y

Few tips are common that we often forget about them.

And that’s a reminder is really handy 👍

1
L
lizazampa4y ago

Sonic Allergen Menu – This information doesn’t identify all food ingredients. It may use generalized terms that may not sufficiently inform a person of all food items that may produce an allergic reaction in some people.

Y

lizazampa What ⁉️

O

It's a great article. I especially liked the points on only abstracting when there are at least three examples, asking questions to become a domain expert, and focusing on valuable code as opposed to perfect code

1
S

Thanks, Obinna! 🙂

W

Perfect and very well said! 🤘

1
D

Learned new ways and made sure my way is alright. Thanks.

1
S

Golden advice right here

Don’t Over-Engineer

The majority of problems already have tools to solve them 💡

1
M

That's for sharing Simon Egersand 🎈 🎉

1
E

I liked the simplicity and to-the-point tips! Thank s for writing it Simon Egersand 🎈.

1
S

I'm glad you liked it Eleftheria Batsou! 😊

P

I used to use Visual Studio / C++ almost exclusively back in the 90s and knew dozens of keystrokes. Now I have to jump between many IDEs constantly and I'm forced to use the mouse. Even with VS I apply the old VS6 keystrokes and find many of them are broken.

1
S

That sounds annoying. Have you considered learning vim or emacs bindings to use across all IDEs? I'm sure there are vim and emacs bindings for all modern IDEs.

And you could also invest time into setting them all up according to how you like it, but that of course takes time.

Why do you have to use so many IDEs?

P

Simon Egersand 🎈 I've been in the same company for 20 years and worked on so many projects for pharma automation that I'm now split 50/50 between working on new products and upgrading old projects. Languages, databases, devices.

1
V

Thanks for sharing these tips, Simon Egersand 🎈 learned quite a few things

1
S

I'm glad to hear that, Victor Eke ! 😊