Join the largest DeFi ICO (new crypto coin offering) in 2021 »
scorpioncity
HOME · Welcome. This is my earlier site (~1997 to 2010); my new website is now here but some stuff remains on the scorpioncity site. - David Joffe

Programming background

[Not DJSoftware Logo] Here is a little background on my programming history, with free source code in each section (wheeee .... ) ...


History: In the beginning ...

I present here my humble beginnings in my career as a computer programmer.

Way back when I was 15, (in Standard eight, South African schooling system), my father brought home our first computer (not counting, of course, my brothers ZX Spectrum from yonks before that). It was an 8 MHz 286, with a 20MB hard disk and a 16 Color EGA monitor (heard of those?), and it soon developed an annoying habit of hanging every 10 minutes or so. It was thanks to this, though, that I developed the habit of SAVING OFTEN - something I'm sure almost all other programmers have had bad experiences with ...

So what could I do with this new toy? Hmm ...
Well, I soon found out there was a "LANGUAGE" on it! GW-BASIC!!! (remember that?)
(As a side point, I remember reading recently that the GW stands for Gee-Whiz, if anyone could clarify that for me, I would appreciate it, but I'm sure as hell not going to lose any sleep over it.)
(New side-point: I recently got e-mail from someone who remembers the GW as standing for George Washington; so the issue is still unclarified.)
(Newer side-point: Someone else recently emailed me saying that they were "pretty sure" that the GW stands for Gee-Whiz.)

Anyway, to get to the point (finally) ... so I'd discovered this language. What a feeling it was - I could CREATE something! It's sorta difficult to describe ... you probably know what I'm talking about though if you're a programmer.

Here are my first steps, exactly copied ... (this is a true story! Only the facts have been changed.)

This first program is a multi-featured WYSIWIG word processor, called Deluxe Write ...

5   CLS
10  INPUT "Greetings! What is your name?  ",C$
20  PRINT : PRINT "Hello, ";C$;"!"
30  PRINT "This program is brought to you by the people at Djoffe Software. It is a
           fully equipped proffesional word processor. It is called 'Deluxe Write'"
40  PRINT : PRINT "These are your options:"
50  PRINT : PRINT
60  PRINT "                      1. Write"
70  PRINT "                      2. Save"
80  PRINT "                      3. Load"
90  PRINT "                      4. Quit"
100 PRINT "                      5. Help on Write"

... and that is about where Deluxe Write fizzled out.

But I was not about to give up because of a few minor setbacks, such as having absolutely no knowledge of how to program whatsoever. Heck no, Djoffe Software went on to create other masterpieces, like Deluxe Draw! (move aside, GIMP ...)

I'm not making this up. Really. Here is the program listing.

5   CLS
10  '***********************************************************
20  '*                                                         *
30  '*                D A V I D    J O F F E                   *
40  '*                - - - - -    - - - - -                   *
50  '*                                                         *
60  '*      This program, brought to you by the people         *
90  '*      at Djoffe Software, is a fantastic Graphics        *
100 '*      Package, equipped with all the most modern         *
110 '*      functions, and most amazingly, it is all           *
120 '*                 done on GWBASIC!                        *
130 '*                                                         *
140 '***********************************************************
150 '*                                                         *
160 '****                Menu Options                       ****
170 '*                   ---- -------                          *
180 INPUT "Greetings! What is your name? ",C$
190 PRINT "Hello, ";C$;"!"
200 PRINT "This program, brought to you by the people at Djoffe Software, is a fantastic
           Graphics Package, equipped with all the most modern functions, and most
           amazingly, it is all done on GWBASIC!"
210 PRINT :PRINT :PRINT "These are your options: " :PRINT :PRINT
220 PRINT "                            1. Draw"
230 PRINT "                            2. Save"
240 PRINT "                            3. Load"
250 PRINT "                            4. Quit"
260 PRINT "                            5. Help on 'DRAW'"
270 PRINT :PRINT :INPUT "What is your choice?  ",Q$
280    IF Q$="1" THEN GOTO 1000
290    IF Q$="2" THEN GOTO 2000
300    IF Q$="3" THEN GOTO 2500
310    IF Q$="4" THEN GOTO 3000
320    IF Q$="5" THEN GOTO 3500
330    IF Q$<>"1" AND Q$<>"2" AND Q$<>"3" AND Q$<>"4" AND Q$<>"5" THEN PRINT : P
RINT "That is not a viable option. Please try again.":GOTO 270
340  '
2999 '******************************************************************
3000 '****                   Quitting                               ****
3002 '******************************************************************
3005 PRINT :INPUT "Quit back to (D)os or to (B)asic ?  ",S$
3010    IF S$="D" OR S$="d" THEN CLS:SYSTEM
3020    IF S$="B" OR S$="b" THEN CLS:NEW
3030    IF S$<>"D" OR S$<>"d" OR S$<>"B" OR S$<>"b" THEN PRINT :PRINT "That is n
ot a viable option. Please try again.":GOTO 3000
3500 '*****************************************************************
3510 '****                   Helpline                              ****
3520 '*****************************************************************
3530 '
3540 CLS
3550 PRINT "Welcome to the helpline at Deluxe Draw!"
3560 PRINT
3570 PRINT "    To the right of your editting screen you will see several blocks
in which youmay select such things as color, filename, save, etc. This is where
you make    your selection of what you want to do."
3580 PRINT "When you have finished using the editor, and wish to save your drawi
ng, move to the block that says 'EXIT TO MENU'.This should return you to the mai
n menu,";
3590 PRINT "     where you may save your drawing."
3600 PRINT :PRINT "That is all you need know about Deluxe Draw. Return to the ma
nu now and draw."

Erk. I just noticed a slight logic error. Oh well, better late than never :). Can you spot it?

You may use this source code freely --- just remember to give me credit OK? ;) And oh yes, send me some money if you like Deluxe Write or Deluxe Draw .. OK? :)

Anyway, I VERY soon progressed from GWBASIC to ... C++, I hear you ask? No. Pascal, I hear you inquire? Well, no; QuickBasic actually! :). It was still a while before I "tackled" pascal, and when I had conquered both pascal and BASIC, only then did I move into the realms of REAL programming ... C++!!
<Ducks and runs for cover from the Delphi crowd ... !>

Tic-tac-toe and Equations of Motion

... continuing with the saga of QuickBASIC.

I soon learned various programming thingy's like a bit about graphics, arrays, the if statement etc etc. Here are some more examples of my early BASIC programs.

I like keeping these old programs around 'cause I find they're always good for a nostalgic laugh :-).

TIC-TAC-TOE tictacto.bas (tictacto.bas in new window)

This probably qualifies as being the first real program produced by Djoffe Software. Its worth a laugh or two. The keys are w,a,x,d and space to place a piece; I did not know how to read the arrow keys back then. Meaningful identifier names were a concept I initially rebelled against .. so don't be surprised if you see labels like "itchyleg" and "hotsoup".

CAR car.bas (car.bas in new window)

I had just learned about equations of motion at school - Wheeee!!! I also have a bouncing ball somewhere, under the influence of gravity.

TEMPLE OF GLOOM tog.zip 12,151 bytes

You are adventurer Flodd (sic). Monsters run (?) about trying to kill you. You may want to change the start-up level to check out the levels; change line 125 to change the start level. The tree in level 2 was drawn painstakingly in a very early drawing program that I wrote, which unfortunately had not been properly tested and I came very close to losing the tree! (Exciting little story that eh? It was a very tense moment for me, anyway)

Update (13 August 2001): I now have a dedicated QBasic page, with some more programs.

Minesweeper, Sokoban ...
Here it is; my version of Minesweeper for DOS.

djmine.zip

[Sokoban screenshot] Screenshot of a simple little Sokoban I wrote a few years ago in a few hours, just for fun. I first wrote a text mode version, then I revamped it to use graphics mode; here's the VGA/EGA version.

djsok.zip

Pascal

After BASIC I learned Pascal, and at the same time learned assembler. At the end of 1994 I learned about the wonders of Object Oriented Programming, and I realised how well-suited the Object Oriented paradigm is to creating user interfaces. Here are a couple of screenshots of an isometric landscape editor I created using a user-interface which I created in pascal. This was my first real object-oriented program, and was one of the last things I did in Pascal before moving onto C/C++ in 1995. The UI can run in any screen mode and looks much better in 256 colors, but I could not screen-capture the 256 color VESA modes under Windows 95. The entire program is a little under 7000 lines of pascal code. I may make the source code available if there is any demand for it. (Although the source is a right mess.)
Update: (Dec 26, 1998) I shoved all this into a .zip file and created a "quickie" readme.txt file. djwin.zip (379,354 bytes).

C/C++

I eventually got around to learning real languages. C++ is an incredibly beautiful and powerful (but complex) language, and is by far my favourite language, although I will admit it is true that it easier to write buggy code in C++ than most other languages. C++ is also one of the slowest languages in terms of Application Development Time, particularly when compared to languages such as Delphi or Visual BASIC. C++ is far more flexible and powerful, so it is more suited to creating more advanced types of programs, such as editors, CAD's, Virtual Reality applications, games etc. Delphi and Visual BASIC are generally more well-suited to creating visual front-ends for databases etc. I will not say that any one of them is better than the rest, since they are each more well-suited to different types of applications, and (WARNING: cliche ahead) in the fast-moving competitive computer industry, ADT (Application Development Time) is King. There is no time to waste with programmers who have personal issues with languages or environments.

Java is probably still too new (and still a bit too slow) to have really "found a place" in the application development world. I believe this will change over the next few years, as we start to have more real full-blown applications written using Java. (Update, 27 July 2001: Make that "I do believe this will change over the next few years, as Microsoft proceeds to kill Java".) (Update, 16 November 2002: Make that "I do believe this will change over the next few years, as Microsoft proceeds to kill Java, and Sun seems to allow the development of Java to stagnate".)

I started learning C/C++ just for kicks in '95 (during my "free time" in my first year at university) and one of the first things I wrote (mostly C) in Borland C++ v3.1 was a little scrolling platform game that "was inspired by" Duke Nukem 1 (one of my all time favorite games.) The graphics is (are?) all my own (with the exception of one notable thing ;) and I drew it (and designed the levels) using editors I wrote with Borland C++. I never quite finished the game; it was soon after this that I got my job doing Virtual Reality (simulation) programming, which takes most of my time up. I got bullets, jumping, inventory, health, and keys and doors all working; I'd still like to finish it up someday, possibly using DirectDraw or maybe rather GGI.
Update: (Dec 1998) I have decided to have a go at porting this to Linux/GGI. See djgame.html.
Update: (Jul 2001) Now ported to SDL, runs on Windows and Linux.

My development environment of choice is, at the moment, Visual C++ 6.0. It is a surprisingly powerful and stable package and the compiler is excellent, although a bit buggy when it comes to code optimization.

Here is a screenshot of a High Voltage Yard editor (DOS4GW platform) I created using Watcom C++ for an application for work. I also created the UI, using (whoop) "Object Oriented design principles".

Doiley for Windows 95

Doiley screenshot

Official blurb: "Doiley is Yet Another version of that stupid 15-piece slider puzzle. But at least this one looks nice :)"

The "official" home of doiley is now here.