Talk Is Cheap, Show Me the Code!

13 Feb 2020

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live” ― John Woods

While I was looking up quotes to find some inspiration for this write up, I stumbled upon two that stood out: the first one, “Talk is cheap, show me the code,” is by Linus Torvalds, but it was the second one by John Woods that really caught my eye and gave me a bit of a chuckle.

Why is it important to develop and maintain good coding standards?

Well, for one, I really think it’ll make you a better coder in the long run. And who knows, maybe the guy that ends up maintaining your code really is a psychopath! And what would upset him/her more than looking at thousands of lines of sloppy, undecipherable code to sift through? Yep, you guessed it!

I truly believe in the importance of learning proper coding standards and habits from the beginning of your career as a programmer. I appreciate that all my professors at UH so far have insisted on instilling that mentality into us in each class that I’ve taken there. It’s similar to how my parents taught me (or tried to at least) how to write clearly and neatly when I was young. Going back to when I was in elementary school, I had to do handwriting exercises daily and write reports weekly, just so I could learn to write better as I was growing up. Fast forward to now, and unfortunately my handwriting is still pretty terrible, but I understand the reasoning behind the exercises at least! I think what we’re currently doing with ESLint is similar to that in many ways - training your brain to be better at certain tasks.

It’s crucial that your code is “healthy” and free of errors, and ESLint helps to provide guidance with that. Initially when I started to use it, I was a bit frustrated with not getting the green checkmarks sorted out quickly, but the more I use IntelliJ for coding, the more I’m starting to get used to the red squiggly lines and the hints to what the errors were that I was making. Right now of course, it seems like I’m making a lot of them, but I’ve found myself slowly figuring out my mistakes before needing to hover over the squiggly lines to see what I’m doing wrong. I suppose that’s the whole point of using ESLint. Is that making me a better coder? Yes, I think so. Do I have a long way to go to be a better coder? Absolutely, but at least with ESLint installed, I’m able to see errors quicker, and learn from my mistakes quicker.

In the real world …

When you’re out in the real world, working for yourself or for a company, it’s critical to adopt better coding standards. Why? Because having this type of practice makes you a more efficient coder, thus makig you more productive. In the long run, it means you’re a better employee who can code faster and with less errors, and potentially make your company more money. Better coding standards and practices also lends itself to avoiding performance issues and possibly security issues as well. It also helps reduce the complexity of your code, which makes it easier to read, and easier to find bugs, easier to reuse and ideally easier to maintain … and if it’s easier to maintain, well, I guess you won’t need to worry about any violent psychopaths showing up at your door, right?