loading words...

Jan 20, 2019 15:26:40

Decoding coding: Coding is unforgiving af

by @jasonleow | 481 words | 446🔥 | 485💌

Jason Leow

Current day streak: 446🔥
Total posts: 485💌
Total words: 286534 (1146 pages 📄)

Coding is unforgiving af. It's like failing a writing exam because you had ONE spelling error.


I spent a good chunk of time trying to figure out why my script didn't work. Can you see it?

And guess what? All because of ONE "e". Resizable vs resizeable. One tweeny lack of alertness, and everything breaks. The problem is code editors can't pick up spelling errors/mismatches like that. The level of accuracy needed for human beings to code - perfect and error-ZERO - is like asking human beings to be computers. 

There's something wrong with this. We've got things the wrong way round. I understand that computers need very precise instructions to be able to execute a command. But to expect that same level of perfect precision in human beings...is unrealistic. We have limited energy levels, our attention wavers, we get distracted easily, and after staring at the same words for some time, we miss the trees for the forest. And this also doesn't take into account cultural differences where we spell words differently (color vs colour, anyone? Accordian or accordion?), or people who's native language is not English and not really proficient in it, which significantly increases the error rate. This is so frustrating.

Code is computer-centric, not human-centred. The user experience of coding is broken. Our tools should defer to us, not the other way round!

There's not much one can do about it. The syntax is fixed. It probably beginning to read like a child's tantrum here. I'm just a code rookie ranting, but because I'm still new to this, I find myself questioning how things are done, and how things should be done. Maybe you're a code veteran and you'd developed a great workflow to prevent this from happening. Double-check your work. Get someone else to look at it for you. Take a break and come back to it. Etc etc. I get it. But that's still a work-around. That's still us being slave to our tools.

How many productive developer hours worldwide are wasted because of stupid mistakes like this? Every minute a developer wastes trying to solve spelling mistakes, a kitten dies.

I detest this, because this is a solvable problem (or "solveable"?😝). This is a design problem. When the syntax and the tools are designed at the onset, the authors probably didn't think that it's important to account for human failings like these. Something that works similar to a normal dictionary/spelling feature in MS Word might help somewhat with checking for inconsistencies. The ideal would be something that can check for mismatches between e.g. your style classes/ids versus what's written elsewhere in the head/body/script sections. 

Why isn't this already a thing? Is there a Brackets extension somewhere that does this? I'll be super happy to be proven wrong in this case.   


From Jason Leow's collection:

  • 1


    LoL yeah, programming can be quite unforgiving at times. I just spend 4 hours trying to figure out why am I receiving a 405 METHOD NOT ALLOWED when I was accessing an endpoint /classify

    After struggling for 4 hours, finally figured out I need a slash at the back.
    The endpoint should be /classify/ and now it returns 200 OK.

    Go figure.

    #python #flask

    Jason avatar Jason | Jan 21, 2019 08:58:40
    • 1

      @jasontxf ?sigh so frustrating to waste 4h on a slash

      Jason Leow avatar Jason Leow | Jan 21, 2019 18:15:31
  • 1

    @jasonleow I think this experience depends on the languages/frameworks and the tooling available for each. Some have great tools that will detect these problems immediately and some don't. Languages with really good IDEs like Java, Swift, C# will flag issues as you type them, and tell you how to fix it in a lot of cases.

    Javascript though is a lot messier. I'm not sure if there are any extensions to detect issues like this. There's Webstorm which has error detection and lots of great features but it's not free.

    "I find myself questioning how things are done, and how things should be done."

    Devs tend to have a preference for simpler text editors when possible. For me at least IDEs tend to be resource intensive and can slow down the dev process and not every language has a really good IDE. In some contexts like building apps, I'd always choose an IDE because the added features are worth it. For web development, I've never really given one a try. Maybe because Webstorm isn't free but VS Code is adding a lot of error detection features recently and I'm enjoying it.

    Keenen Charles avatar Keenen Charles | Jan 20, 2019 15:04:22
    • 1

      @keenencharles thanks for the tips! I'm using Brackets now which I guess is more for web dev, and just a code editor. Will check out the IDEs you mentioned - Webstorm and VS code and see if it works for me...

      Jason Leow avatar Jason Leow | Jan 21, 2019 13:40:07
contact: email - twitter / Terms / Privacy