3 Tips to Writing Better Code

There are people who write amazing code but considering the constraints that we all face when it comes to time and budgets, we rarely see people working on a project right from a scratch.

Thanks to the possibility of being able to copy and paste and the aforementioned constraints, it’s highly unlikely that our coding skills will improve anytime soon not unless we do some work on our own.


Keeping this in mind, and as impractical as this might sound, here are 4 tips to writing better code:


#1: Write Out Your Own Framework

Instead of opting for frameworks that are readily available such as jQuery, it’s a good idea to write your own code base instead, and right from a scratch. Of course, this might take several hours, days or even months but you will benefit greatly by improving your problem-solving skills, understanding the language’s syntax better or even get a clearer picture of its concepts.


#2: Avoid Developer Tools

Developer tools like Firebug, Web Developer extension or even Google Chrome’s Developer Tools might be options to use if you want to fix any front-end coding issue. However, these tools are fairly new. Moreover, developers in the 90s and 2000s rarely used these tools because they understood the art of coding well. If you want to develop a better understanding of CSS or JavaScript, it’s a good idea to debug a problem manually instead of using these tools. This will help you gain a better understanding of these languages.


#3: Don’t Use a Browser

As ridiculous as this sounds, don’t use a browser to check whether you have obtained the right output but instead focus on coding each line perfectly while visualizing what the outcome could be. Doing this will not only force you to understand the code you are writing but also think through what you are coding as well.