Skip to content

Confusing the meaning of things

Person standing upside-down in water

I've had the opportunity to collaborate with several developers who have different mindsets and that's a really good thing. It made me think thoroughly about topics I would've never pondered on. It has also led to disagreements and debates which, don't get me wrong, are healthy and necessary. However, often enough, I've found myself in situations where random common terms that were not fully understood were being used by someone to defend their argument.

One example is premature optimization. It means that you should not optimize your code too early on. The reason behind this is simply the lack of context and information to know where and how to optimize. This makes total sense.

There are several factors though, that affect the timing of your optimization, e.g. the time and cost if you do it later rather than now, whether you have the means to do it now, whether you already know how to. Adding multi-language support in an app during the project's setup phase is sometimes considered premature. Instead, some developers prefer to hard code text, then, when and if the time comes, they will transfer the whole app's hard coded text in JSON files and add multi-language support in the app. I've been tasked once in my career to do just that. You can probably get the idea why I'm writing this article!

The effort of transferring all that text in JSON files while making sure each translation term is meaningful, is way higher than that required in the beginning of the project's setup phase. A good reason for this is timing. When creating a translation term, you need to have the context of where that text is going to be used. You also have to think about reusability and in which JSON file you want to place that term. Even if there's no plan for adding multi-language support in the app, you can still benefit from it. Sending your client a JSON file to modify text to their liking is one.

Another example of a common term is DRY (Don't Repeat Yourself). It's a really important concept but if you focus on making everything DRY without any concern for others factor, you'll probably end up affecting your app in a negative way, e.g. performance.

To sum up, my request is that as much as industry standards and best practices are important, please do take all factors into account before making a calculated decision.