Why am I still coding?

“If our computers were Cylons, they would have rebelled a long time ago.”


There is so much shitty code out there that sometimes I just want to tear my eyes out, with a spoon.

Recently, I’ve been forced to deal with some crappy Polish SOAP API. My first question (or anyones first question) would be why on earth would anyone want to create an API which can speak only SOAP. I beg your pardon, is it still 2005? No, it will be 2014 soon and there are people out there who still fancy SOAP over REST and JSON? I just can’t wrap my head around it.

Do you know what S means in SOAP? It stands for Simple.That’s right, it’s supposed to be Simple. Guys who first designed SOAP didn’t clearly understand the word.

Or maybe they did? In 1998, when SOAP was created, there simply wasn’t any better notation available. JSON began it’s debut only in 2005 when Yahoo started using JSON in its web services. People were used to XML at the time. Soon after SOAP there came J2EE and Spring where everything was a bean and the very idea of defining classes in XML instead of writing Java code made developers full of beans. Pun intended.

But hey, time has passed. And history is not the topic I wanted to go into in this article. As I was saying, a crappy Polish API. When I first glanced the ten mile long documentation I thought, hey, it can’t be that bad. I could just hook up Savon to my Rails project and I’m good to go.

Right, standard stuff, gem “savon”, “~> 2.3.0" into Gemfile, bundle install, create the Savon client, specify the WSDL (Wizzdle) path, basic authentication and try it out in the rails console. Errors. Instantly. Although API endpoint was on HTTPS, the SSL connection didn’t work that well. Right, I disabled the SSL verification, ran it again aaand Savon::SOAP::Fault: (soap:Server) błąd wymiany.

After digging into that half Polish, half English ten mile long documentation, it turned out that WSDL was cluttered with Polish phrases, merged with some English and spiced with lots of namespaces and other ‘goodness’ that comes with SOAP. So in the end I had to write a custom XML query, envelopes and other weird stuff included. As it came apparent that authentication system wasn’t that basic at all, I included login parameters to my XML as well and overwrote Savon request with my custom string. It was once again, time to execute the query. Guess what, STILL no luck. At that point, I was really losing it and opened Medium to write a rant about it (you are reading it).

This WSDL / SOAP / XML, whatever, was screwed up beyond imagination. Malformed syntax, Polish attributes, fucked up authentication, supposed SSL that couldn’t verify certificate, differences with LIVE environment, ten mile long documentation and thousands of lines of XSD. It’s an abomination of mankind and no hard drive should carry this atrocity (this web service, or any of the kind). If our computers were Cylons, they would have rebelled a long time ago already if someone attempted to deploy something this miserable on them.

In others words, S shouldn’t stand for Simple but instead, Shit.

And this was only one day. Don’t get me started on other ‘great’ topics like trying to develop an installable plugin on Magento or trying to create world class UI when the browser where it has to work in, is Ekioh and markup is SVG. I could continue this list, but I think you get the idea.

And days like these seriously make me think why, Why, WHY? Why am I doing this to myself. I could quit any day and switch work. Maybe I would have made a good doctor or cook instead of going into software engineering? Speaking of which, I rarely get to really engineer something. Mostly it’s just trying to survive in other people’s inadequate code and following (sometimes inconsiderate) orders what to do next.

Anyway, I started this article with negative aspects so I could wrap up with the reason why I still code.

When programming finally pays off, it pays off generously. It’s just so satisfying to see your neatly handcrafted piece of software online and real people using it.

If the architecture is pimped to top-notch, it is simply fun to develop. Finding new and interesting strategies every day to fashion your project better and better. Living with the idea that less is more and using all the little language features to get things done with fewer lines of code.

This gives such sense of accomplishment and supplies so much energy to write code not only at work, but at home too. When I’m on a roll and code is literally flying off my fingers, it’s impossible to stop me. I can go all night (provided I have endless amounts of tea and chocolate). And in the early hours of morning, when I finally look what I’ve managed to pull off in a single night, it gives me the feeling, that this is the job I want to do the rest of my life.


P.S If any Polish person found this article inappropriate, then don’t worry. In Estonia, where I am from, things aren’t looking that magnificent either.

Email me when Martin Lensment publishes or recommends stories