How Cooking Made Me a Better Software Engineer
Know those little kitchen tools that pop up every once in a while? Remember that onion chopper you purchased two years ago that is laying deep in your kitchen cabinet taking precious space and you never use it? That tool can only do one thing - chop onions. It does that one particular thing very well and very efficiently, but it’s only one thing.
Allow me to assume that, just like this onion chopper, you have more one-job-tools laying around in your kitchen, as I do.
Are they worth it?
I’ve noticed a problem
At the beginning, you may think: These cool tools are great at their task and are also not very pricey! But that’s a beginner’s mind-set. Every tool has a “hidden cost” that you will pay. Some costs are right away, and some will be in the future:
- Learning. How do I operate this specific tool? All tools need some level of knowledge in order to be operated. How much time will you have to invest learning this tool? Is it only once? You may need to recall how to operate it the next time you use it. What about guests? If you are having a guest in your kitchen in order to help you, your guest will require an introduction and guidance in order to be able to use these tools.
- Space. Over time, all these tools are taking up a large amount of space related to the variety of tasks they can accomplish.
- Maintenance. Some of them may have costly maintenance. They may be difficult to clean, you will have to replace parts every once in a while, etc.
How real pros work
You will never see a chef chopping onions with an onion chopper. Why is that? He masters his knife so well he just doesn’t need the onion chopper in his toolset. He knows the best way to hold the knife, he is used to its weight and speed, he knows how to maintain it properly and how to sharpen it so it will continue to be such a great tool. Why introduce another tool when he already knows how to get the job done with his existing knife? I guess it just isn’t worth the overhead.
The ability to select the right tool for the right job, while mastering your existing toolset, makes you a true professional.
Your codebase is your kitchen
Or, back to software development (because you’re not here to read about cooking…)
Over the years, I have realized that the same principles that apply for kitchen and cooking tools also apply for software development. Kitchen tools are just like coding tools! That onion chopper you consider buying is like:
- Taking a dependency on a library or a framework.
- Installing and getting used to another IDE or a tool.
- Applying bizarre configuration settings on your workstation.
You must consider carefully when introducing a new tool or libraries to your codebase of the exact same reasons. It is so important.
Select the most efficient tools for the job, know every bit of them, what features they have and what they are capable of.
Follow the tool/company blog, follow them on Twitter, get updates about new features.
Every dependency you introduce has overhead. This overhead appears in different ways:
- Introducing new developers to your code. Other developers will have to invest time getting to know this dependency so they can understand and use it.
- This dependency needs to be kept updated. New versions come up every once in a while and upgrading will require additional effort and overhead.
- Deprecation / Abandonment. If (when) this dependency will get deprecated or abandoned, you will have to replace it with something else.
- Size. This is a weaker argument, which is probably relevant for specifically client side code. Meaning when you take a dependency, it has to be downloaded/installed with the rest of your application.
Think twice before adding a dependency or getting a new tool for some task. If you need to do something new your existing tools do not support (make sure you check that option), maybe it’s time to replace one of them, instead of just adding a new one to the pile. This way, you will spare some of the weight you had before.
Invest time mastering your existing toolset. Unleash their full power.