Resurrecting Old Development Workstation — My First Program
The memories of writing my first line of program
I had a nice idea that came of nowhere of reproducing the development workstation when I was still 13 years old, when my mom bought me my first computer. A glorious Pentium 166 MMX with 16 MB of RAM. I searched the internet for something similar as I’ve lost the computer. I found in vogons and here’s roughly how it looked.
When I first bought it I didn’t have the CD-ROM and sound card. It has 2 GB hard drive. I eventually added CD-ROM, Sound Card, and speakers but still no NIC, no WIFI, nothing. It’s a really stand alone machine. It’s amazing how it’s progressed in the past 16 years. Can you imagine buying a computer which can’t play sound nowadays?
So how we install software? Well there was no internet back then, let alone high-speed WiFi. We used CD, where you might be familiar and these things!
This “save icon” is real thing. The bigger size of each piece for 3.5" Floppy Disk is 1.44, no not gigabyte. MEGAbyte. Installer is still big in size though, they usually came in multiple floppies. Like this guy:
Enough about the hardware and storage, let’s dive in to real programming, shall we?
Cuddly, Friendly, Quick Basic
My first hello world was in Quick Basic. I scavenged the internet and got the latest DOS Quick Basic. Here’s the program I wrote.
The file is saved in .bas
extension. The file name cannot exceed 8 characters. I built the executable by running Run > Make EXE
and the file QBHELLO.EXE
is produced. The file is around 12Kb. After I run it. The result is as expected: showing my name and current date.
Ah the joy of “making an exe” a file that I don’t think be able to write myself. EXE is that mythical file that you can type and do something. AND I COULD MAKE ONE. I was so happy.
Edit: I added a nice article from Nicolas Bize about QBasic (the QuickBasic Little Brother) for educating kids about programming
Good ol’ Pascal
When I was getting my first computer. I dive my head straight in to Pascal. Because what I’ve learnt that it’s a little bit harder, not like that lame-a*se basic. It has pointers! Which I don’t know what the F**k is that. Well for now let’s just write some classic hello program.
and then let’s run it!
Very nice, an interactive hello world. The first joy of succeeding to write something in new language. I played with pascal for a little while until I got bored. I try my way to do things like this!
But the source code contains assembly, and I couldn’t understand whatever written on that particular file. “F**k that!”, I said and then I move on to easier tools. You know, tools appropriate for 16-years old me to make awesome software that I can show to my friends at school and text only DOS program won’t cut it.
Visual Basic 6.0
As you can see all of the development environments are for DOS. It’s not like we didn’t have Windows back then. There was slow-as-snail internet you can rent for 10K an hour in internet cafe. It’s just DOS games was still prevalent back then, therefore as a kid I played with DOS a lot.
Once upon a time, I came to a local computer shop I saw a buch of CDs sold. I didn’t know if that’s bootleg or not. What I knew that the CDs were not cheap for a high school student, but the cover enticed me. It has “Basic” on it. I think I’m familiar with that.
So I bought the Visual Basic CD and then install and fire up the IDE. I was in awe. I can create graphical user interface with few clicks!
It’s all “Visual”. I can see it. I can drag and drop it. This thing is actually addicting. Here’s the result
I can’t get a grip on documentation because who will sell a bootlegged 1GB big-ass MSDN Library right? So I just play with it. I then realised that this program is not self contained, there are a lot of DLLs and OCXs to be included if you will show them to your peers. Later on, I know that Visual Basic is just an ActiveX application editor. All components are ActiveX which needs to be globally registered or locally contained.
ActiveX was Microsoft bread and butter. It even made its way to browser. I’m glad that HTML-5 is gaining popularity, thanks to iDevices so Microsoft finally kicked ActiveX out.
Pascal’s Big Brother: Delphi
My gut feeling said that there’s something ‘better’ out there. I found a book about “programming with delphi”. I read that book, and eventually bought it. I search for stores who sell Delphi. I was lucky there was some “software rent shop” who has it. I rented the CD and then install it on my PC. I didn’t know that it’s not the ‘right way’ to do it. But that was what I know about obtaining software that i want.
I fired up the IDE and immediately became very excited and overwhelmed with the options. Interbase, Indy I/O, … I didn’t care what the F was those. I just want to create a program with GUI. I then port my VB program to delphi.
I ran it and greeted with familiar view. Very satisfied with the result. I feel it’s a little bit different this time. I didn’t know why, but my feeling said that it’s better platform to write app on.
I stumbled upon a tool called Dependency walker which will show you what kind of DLLs you’d need to run a particular app. I run it against VB EXE and Delphi EXE.
So the reason my Visual Basic app didn’t work on my friends’ computer was due to its dependence to MSVBVM60.DLL. I always felt that VB6 compilation was very fast. As I learnt later, Visual Basic is much more like Java where the code is compiled to bytecode, or in Microsoft parlance, p-code and then self-contained inside an exe.
The delphi one tho, depends on the system DLLs directly. I learnt that Delphi’s pascal code is compiled to machine code. I eventually used Delphi to write some of my ‘earlier’ software. One of them were sold door-to-door.
Summary
Those are the codes I wrote during my high school time. It’s simple and sucked a lot (where’s the test! omg!).
Writing code is and always a joy for me. I was lucky, the pressure of ‘making something’ was not as high as now and the barrier to entry is arguably low. I don’t even need to connect to internet or write any server REST API to make a commercial software. Heck, I sold my first commercial software door to door.
Today’s software engineers are exposed to advanced apps which talks to the server and use network communications. So the expectation is high. However, I can argue that the information is plenty and pretty accessible with the ubiquitous WiFi and internet.
If you want to be a software engineer, which is actually a nice job. I think you can still apply my old approach. Write something that have low barrier to entry, like an offline note-taking app. It’s much more like writing a desktop app back then.
I have plan to continue this nostalgia article to cover my discovery about Web, Server, and Graphics. I may write about archaic APIs which was used a lot back then but now it’s hidden or abstracted away to ease developers like Windows API (then, Win32), COM, DirectX/OpenGL, etc.