Your Saving Grace

24 Sep 2020

Coding Standards are Useful

If you have a development environment that can automatically check them for you. If you aren’t using an IDE that checks spelling and standards (maybe you’re one of those people who likes vim), coding standards can be a real pain to check for. It’s really tempting to write poorly, and nothing stops you from doing that. This can lead to code that is difficult to read, which is at least a minor inconvenience, but could slow down a project immensely if there is a problem that has to be manually searched for and corrected. But by using a set style, you can ensure good code readability, and enable rapid bug fixing.

IntelliJ is one such IDE that provides a flexible coding standard. That is to say, you are allowed to add your own coding standard to the environment and have it check your code for correctness. Depending on the strictness of your standard, you may have a lot of editing to do. The IDE will complain if there is a violation of the standard and prompt you to fix it. It may slow you down at first, but after a bit of experience with it, you’ll be writing clean code that’s easy to read.

Keep Your Work Clean

Reading code is just as important a skill to have as writing code. In the event that you have to edit or help debug someone else’s code, you’ll want it to be well written. Code, like writing, is something that if written poorly can take you hours to read and can bore you to the ends of the earth. Finding a bug in code written poorly can be disastrously tedious, because code written poorly can fail at many different points, none of which may be obvious (the bug may not be obvious either, making an even greater challenge).

Make every effort to keep your code clean, because it may just save you time in the long run. Practice makes perfect, and perfection is a habit, so using the standards even if it is just code for yourself is worthwhile. Especially if it’s useful code. I’ve been able to take a decent bit of code I’ve written for various projects and use them elsewhere to shorten development time. Keep it neat!