xkcd: The workarounds that users invent.

xkcd: The workarounds that users invent.

As usual, xkcd speaks the truth, the whole truth and nothing but the truth so help me Google.

I’ve witnessed some of these epic workarounds that people invent when they don’t fully understand what’s going on. I’ve invented a couple of epic one’s myself, especially in new programming languages.

One (there are others…) specific example I remember of Epic Workaround Woo By @shawn_hamman was on a loan origination and servicing project many, many years ago in Visual Basic 6. I hadn’t been programming in it (VB6) for very long (at all, would be a more appropriate term) when I started on the project. It was during the ramp up phase and we were busy building a proof of concept to illustrate how the UI was going to function while the company hired the rest of the development team. The ‘proof of concept’ turned out to be the actual product in the end…

You may laugh at what comes next. I’m only a little embarrassed.

There was a requirement for a “combo box” that couldn’t be edited. The VB6 ”combo box”, by default, allows you to enter text or select an item from the drop down. The editable text, in this case, was an unacceptable situation.  Not being used to Visual Basic and being relatively new to commercial programming and being pragmatic about software development I set about building a work around for this. I made a OCX component with this editable “combo box” and through an elaborate set-up of triggers, methods and checks made it un-editable. Essentially replacing the text in whenever it changed to what was there before, except when you selected an item which would then… you get the idea.

It did the job ok. Sort of.

The problem was that shortly after that the feature creature got hold of it and the OCX got a built-in label and validation… it kept growing. It was a problem because every time the OCX changed an elaborate update of the entire project had to happen on every developers machine, the old OCX had to be unregistered, the new one registered, Source Safe updated… for every  bug fix. It took weeks.

Of course, a senior developer was hired eventually who took one look at my work of art, barked a laugh and pointed to the “list box” control.

Some xkcd win and awesome

The original is here: http://xkcd.com/763/

Related posts:

  1. If only real life was as simple as working on a Linux box…
  2. If only real life was as simple as working on a Linux box…

8 comments

  1. “listbox control” – bwa ha ha ha ha ha ha …ohhh no no, I’ve never done anything like this .. ever .. of course not, no no .. umm … err … oh look is that a flying pig?

  2. Why, yes, that IS a flying pig!

  3. Oh the things I have done with VB6 and VBA, things that must not be uttered on the Internet because it will evaporate in disgust!

  4. Yea, this is true… I have another epic one that I’ll probably post later. It’s even more embarrassing than this one actually… perhaps I shouldn’t post it…

  5. James

    Without much VB experience, and if listbox was not available, can I ask, were you extending the combobox class and overridden the behaviour?

  6. Nein! I don’t think you can subclass a control in VB6. I created a new OCX, dropped the combo box in it and exposed only a couple of properties and methods in the OCX which I passed through to the combo box but overriding the bits I didn’t want… like text input.

    Like I said, work around…

  7. This reminds me of a time when bad documentation lead to the same thing…we had some networking software that read UDP sockets (stateless, didn’t know if I was listening on the other end etc)

    From what I understood on the docs, there was 19 UDP sockets….turns out they where 19 Multicast sockets (still UDP, but you have to subscribe to the multicast :) )…You google that, modify your code all before they see that you dropped out of the test…..only to trip up at the end….the data they sent, was quicker than what my crappy C code could read…

    The good from this…I re-wrote the software in threaded C….rocked the house….turns out, the other people that passed this test used 19 computers…running….Windows

    In the mortal words of DN:

    “Hail to the king baby”

    :D

Leave a Reply