Say No to Temporary Solutions
Good evening, guys! In the previous article we talked about litmus papers in programming, some criteria for writing code, by which we can say that something goes wrong. Today we continue the theme of good software development practices and present to your attention one more litmus paper for programming. We will also be happy to find out about your own criteria and tips for writing clean code that you would like to share with our readers.
As you could guess from the title, today's software development advice relates to the prevention of temporary solutions in the programming process. There are solutions that are preferred to more successful ones at the moment for different reasons: less time required, simpler code, simplified design and so on. Some developers tend to use such a trick just to evade a particular task complete implementation or to meet up deadlines. But the decision that is being realized here and now can exist for years without changes and intertwine with other parts of the application so closely that it will be extremely difficult to replace it. So it turns out that we postpone a task for an uncertain future and forget about it. And the number of such crutches increases with time.
Of course, sometimes it is necessary to compromise and we have to do that all the time, but don't comfort yourself with the thought that such a solution is temporary indeed and so you can slightly give up your principles here. Remember: there is no such thing as temporary code. Reviewing and adding some part of code to your application, consider that it can stay there forever. And then the number of permanent temporary hacks will suddenly decrease significantly that will make your code much clearer and more evident for other team members.
Riter development team