Sunday, October 21, 2012

More adventures in the Paleofuture


My first actual programming job was doing Visual Basic – version 3.  I was getting into the nuts and bolts of C, C++ and Visual C++, but a job is a job and there you go.
Well – except…
The job was up in Park Ridge IL.  Seems there is a colony of Russian emigres in Park Ridge – as a lot of the code I started looking at looked very familiar – it ‘felt’ like C, not Visual Basic.  Which was a good starting place – as while a lot of the bad things classic VB would allow you to do was in the code base; there were a lot of other high level styles as well. 
Well, anyway I started my library of books etc. for my job.  One of first books I got was Bruce McKinney’s Hardcore Visual Basic.  It’s out of print, but Amazon still lists it.  The first chapter in McKinney's book gave a thumbnail history of the BASIC language, and provided some thoughts on what he termed the spirit of Basic. 
From that beginning followed chapters on how to turn what is often viewed as a weak, hobbyist language into ways to create high performance enterprise level product.  Yes, a lot bad code was written, and the language allowed that to happen.  But - a craftsman could quickly turn out journeyman level code in a fairly quick time.  To bring this back to my beginning paragraphs - you could write functions in Basic/VB that were similar to the type of functions you could write in C.  Well - maybe not as tersely, but the concept could remain the same.
The reason I mention all this is Lua, the language we are using for this project, in a lot of ways reminds me of the later versions of classic Visual Basic (versions 4 thru 6).  Lua is not an object oriented language, in that does not fully implement the three pillars of object oriented programming:
·         Encapsulation

·         Specialization/Inheritances (this doesn’t exist)

·         Polymorphism
Instead, it’s a lovely object based scripting language.  And it’s written in the Spirit of Basic – make things simpler than possible.
I think Edsger W.Dijkstra would hold as much disdain for Lua as he had for BASIC – but Dijkstra must not have been running into the programming sheep versus the non-programming goats problem other, later Computer Science instructors have been.
Summing up, I’m finding Lua to be much like classic Visual Basic was – fun, easy – potential to make very messy code that will at least run, probably poorly; yet with the potential to create elegant and well written programs.

No comments:

Post a Comment