Tuesday, 1 April 2014

Who's to blame for programming being hard?

"The other day, I came to the conclusion that the act of writing software is actually antagonistic all on its own. Arcane languages, cryptic errors, mostly missing (or at best, scattered) documentation - it's like someone is deliberately trying to screw with you, sitting in some Truman Show-like control room pointing and laughing behind the scenes."

Wow, what an utterly brilliant quote from Chris Granger. I came to the article after reading a précis on /. and enjoying the comments there. I also came to it after recently reading Gun Machine by Warren Ellis with its talk of wizards.

What if Chris Granger's almost paranoia is miss-directed and what we have in programming isn't some all-powerful and all-aware controller putting up blocks and making sure that our code sucks? Rather that what we have is a sub-conscious and deliberate obfuscation of our "art" by ourselves? I class myself as a journeyman coder, I even coded my first nodejs application in anger recently, and I'm aware that I sometimes feel ever so protective of my code. I ask others to see if there's a chance of optimizing a particular function (thanks Lars) and try to make sure that the code looks nice and is understandable but I've had twinges of jealousy now and again when someone does soemthing to my code! Daft bugger!

Last night I helped a friend with her website and she seemed almost disappointed in how easy it was! She kept reminding my to close HTML tags and started talking about typefaces and HEX codes and I clocked that really, what we generally do isn't all that hard (admittedly she didn't clock that I'd written a framework that allowed me to add another page to her site at the drop of a hat and that all the repetitive stuff was nicely hidden within PHP includes - but that's a little like arguing over IDEs (something I'm not averse to doing TBH)). I commented on how easy it was and she noted that the person trained to do a technical task in her old job had hidden one vital piece of the process from her to ensure that she could maintain her expertise and thus job.

Might the real people to blame be programmers themselves? I've spent the best part of a year getting to grips with DataTables and have noted to colleagues that they are brilliant but that the learning curve is daunting. They (the developers of DataTables) know all the fiddly bits that people often fall over when trying to do non-trivial things and they're extremely helpful... but it does seem a wee bit like a dark art... which brings me nicely to Warren Ellis's Gun Machine and talk of wizards.

Professions are well known for developing their own language and we really have. We thoroughly relish our language and that's to be congratulated but we do sometimes hide behind it. We also use it to sometimes guard our roles and all that hand waving and those there incantations in languages that seem foreign to most folks help us to reassure ourselves. The rest of Chris Granger's quote is also correct:

"At some level, it's masochistic, but we do it because it gives us an incredible opportunity to shape our world."

Programming is fun! I do it for fun and I'm glad that someone decides to pay me! It's immensely powerful being able to shape the world, if only the world online! That'll have to be enough... for now at least... though all that talk of wizards... now where's my copy of Liber Null...?