Sunday 29 September 2013

VB6 vs the modern world

A long, long time ago I worked on VB6. I was fixing, mostly, a bookkeeping application that someone before me ( this time it was actually true ;-) ) left in a really bad state. It was developed as a bespoke application for a professional college. After my normal hours I would have to go to their offices to work alongside the accountant to get it working correctly. It was worst when the summer came, as I would have a half working day (which mean reduced holidays), so after leaving work and enjoying the afternoon and early evening I had to go to the client's office to continue with the bug fixes. At the end of that summer I moved to England, and after a few years here working I decided I was not going back to Spain as an employee. Even with the better quality of life outside work.

Back into the main point of this post, VB6. Oh, what memories!

I used to be annoyed at the option of not declaring variables and their types. I would make sure that the option to force declaration was selected. Now that I am learning properly a dynamic language (Python) I see the advantages (and still see the disadvantages). Was the language team of VB6 into something?

First time I hit on the maximum length of a subroutine I was angry. "What kind of shit is this!!!!" I exclaimed. Actually, it was: "¡¡¡Que pedazo de mierda!!!". So I got the ultra massive function divided in two consecutive ones. I have been always good a keeping on my mind only the important things (or you could say that I have bad memory, which is true as well), so ultra massive methods will not slow me down that much, as I never tried to understand the whole of it. Neither I was dismayed because of the size of  a method. One line at a time to rule the world. But, oh the joy of discovering Clean Code. Making small, single purpose functions. The code becomes so much easy to read, to understand. I wonder again, was the language team of VB6 into something?

My last big annoyance was the lack of proper recursion calls. You had to create two different methods that would call each other. Taking into account that recursion is my favourite construct, that was painful. I wasn't even asking for tail recursion optimisation (ok, back then I did not know what it was). Oh, well, order is restored and VB6 still ranks as the worst language I have worked on. Which doesn't mean that it wasn't useful. It's simplicity and easiness to create windows app at that time was only matched by Delphi (of the languages that I did now)


No comments:

Post a Comment