Cringeworthy Codes and Changing Standards

So I was on a bus last night and didn’t want to spend the time sleeping. I typed these on my phone.

I believe that all programmers at some point in their lives have written codes that were rather crude; an obvious understatement. No, they were awful. I could still recall my first few programming exercises where after I spent a good amount of time of our class resolving segmentation faults I was left with the burden of refactoring and optimizing my program. Actually no, the latter was a lie. I used to not care about any standard; I did not know any standard. And even though I had several attempts of optimizing my codes, I found them pretty time consuming that I settled with what worked most of the time. That was me learning programming; a term I only hear in movies when I was younger; a thing that sounded really cool but never dreamt of engaging myself into. I was even never techie. I’ve always been a pen and paper guy.

Fast forward to around seven years after my first programming lessons. I am now a software engineer working 8 hours a day maintaining an online banking system while creating back end support systems for mobile applications whenever needed. I haven’t worked on a certification yet (I’m still searching for the right platform to put my best effort into) which implies that I really haven’t achieved any verifiable expertise yet, but a lot of things have changed. I know quite better now.

But unfortunately, while some of my colleagues can wow me with their designs, there will still be cringeworthy codes to deal with once in a while. Did I mention I was maintaining a legacy system? There you have it. Funny thing is I didn’t really find them bad because I compared them to existing standards. I found them bad because I used to program things the same way before.

Now there’s a question, how did those codes get there? It’s an enterprise solution! Surely they got funds to pay top developers. Then why is it that the solution seems to be created by a bunch of programming students?

The only probable and logical answer I could offer is that standards and criteria for acceptance change over time. What was acceptable coding back then may be ridiculous nowadays. A solution that worked decades ago may no longer be applicable today. Things to which previous generations of programmers settled with may be headache to the current generation of programmers. But then again what about consideration for maintainability? It’s a practice that has been existent for a very long time! That could have produced better codes. It could be a yes and no, I think. Technology of every era has certain limitations. We cannot always have what we want right there and then. We can only give things our best shot. On the funny side, the previous years may not have given us codes to smile on, but they surely gave us work to get well paid for.

Then why bother writing codes that are beautiful in all aspects when it could be trash in the next few years or so? Why, we got discipline! Why settle for something less when you can give better by taking some time to think of a better way to do things? Something that works is one thing; something that works elegantly is another. And quite naturally, if you choose to code badly then you don’t deserve to whine incessantly. While whining can make you feel better for yourself, seriously, getting something done right would feel way better than that. -aB

One thought on “Cringeworthy Codes and Changing Standards

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s