Share via:

Reasonable Efforts in Coding

About putting reasonable efforts to do things the best way.

22 views

Edited: 2019-09-30 16:30

As I continue to improve my programming and coding skills, I seem to increasingly realize how important it is to put in Reasonable Efforts towards doing things the best way from the start, without causing unreasonable expenses, either to yourself, or to the company you are working for.

This usually saves valuable time, and often avoids common errors and design flaws.

Initially, it may cost some time while the programmer thinks about how to best solve a given problem, but the problems it avoids, down the road, could turn out to be much more valuable.

Another reason why you should always put in reasonable efforts is code re-usability. The ability to re-use code in other projects is a programmers gift because it saves you time! This is also a useful argument why it is often worth it to put in the time required to solve a problem the best way possible.

To me, reasonable efforts is simply about striving to follow best-practices in coding, such as the DRY Don't Repeat Yourself principle, as well properly handling errors.

Another important principle is avoid making assumptions. The reason for this is that you can not be sure you are the only one working on a solution, and others might not know about your assumptions. Sometimes you might not even remember about your own past assumptions—both situations could easily lead to bugs!

OOP and code re-usability

OOP has a lot of benefits other than code re-usability. But, one of my main reasons for using OOP has to do with saving time.

I might not always start out OOP, but usually that is where I end up as it becomes clear that the code/functions could be useful in other projects.

Design patterns and coding standards can help you write code that is easier to maintain and reuse.

Reasonable efforts is not about blindly applying coding style, but more about choosing the right way to solve a problem under current circumstances, recognizing the limits, including the limits of your own skill. At first, this may be a very difficult thing to do, but it will get easier as you improve your skills.

Reasonable efforts is not perfection

It is also not about perfection from the start. It is more about trying hard, learning, and improving your code, as you improve your skills.

It will make it easier for yourself, as well as others who are looking at your code.

All of this is a very long process, and one that we probably never really finish, hence the "reasonable" part. The fact that you currently do not know about something, does not mean you will not know about it in the future.

If people criticize your coding skills, you can refer them to this article.

Comments