Writing code can be sweet torture

I came across this Reddit post the other day:


What is coding?

And I remembered an issue I had the other day with a web front-end for an ASP.NET web site I was in charge of administering.

This particular issue was due to a site refresh. We had changed the front-end visuals, revamped the icons, etc. The problem was, many users were still seeing the old icons. A full refresh using CTRL-F5 fixed the issue, but we decided that this wasn’t really a viable solution.

I spent 3 days trying to fix this issue.

Some solutions we came up with included:

  • Restarting the IIS Site: no change
  • Adding the following tags to the _Layout template, as recommended in this Stack Overflow post: no change

  • Adding a dummy query string to the file as recommended in this Stack Overflow post  <img src="/image.png?dummy=20170701" /> No change

I was banging my head on the desk. Why could I not force the images to refresh for everyone?

And then, the next morning when I woke up… an epiphany!

Why not just rename the images?

30 seconds later, the problem was solved.

When you’re a programmer (or writing software, or developing a web site), these situations crop up all the time. You’ll strain your brain for extended periods of time, then the solution will pop into your head. In this case, it was simply a matter of looking at it from another angle. Other times, it’s just a typo. 20 years ago, I had an application that looked fine, but failed to launch. I spent hours trying to debug it, only to find that the error was in the IDE, and rebooting the machine fixed it. Aargh!

Side note: There are many comments in that thread saying something along the lines of “HTML is not coding“. Technically, that’s correct, and 20 years ago I would have agreed with you. But then along came CSS, PHP, JavaScript, etc.

These days, it’s not just a matter of throwing some tags on a page and calling it a day. To make a half-decent page these days, you’ll need at least some CSS to make it look respectable. Sure, CSS doesn’t look that difficult, but neither is the standard  Hello World application we write in [insert language here]. CSS can be incredibly advanced, and then you’ll lay that on top of JavaScript and jQuery, or PHP, or ASP.NET and it becomes much less about markup, and more about scripting. You might still say that’s not programming, but I think that these days the lines are blurring more than you might think.

Sure, writing back-end stuff is hard. You need to sanitise your inputs, verify your data, detect logic errors when the code compiles but doesn’t run. You need to take performance issues into account. But writing front-end stuff is hard, too. That page/animation/GUI doesn’t create itself. A couple of <H1>  tags aren’t going to cut it any more. Front-end developers deserve our respect because these days, they’re having to write code (even if it is “just” scripts) to make things work. You might not think of it as coding, but it’s definitely in the development spectrum.

Leave a Reply

Your email address will not be published. Required fields are marked *