Mostly for my own record, these are a few of the programs I've written
since starting around 1982 on a Commodore VIC-20. This list has
some of the programs that meant something to me or that I learned from.
It starts with college projects, both assigned and unassigned, and goes
back to the early days hacking C64 BASIC as a kid. I've also
written many, many other programs that aren't on the list.
Graphics Class Project, written in C and Xlib. This was
a 3d->2d polygon projection using (self taught) BSP trees that allowed
the user to walk through a virtual Blacksburg, VA. The display was real-time
and at least 30 frames per second on Pentium 75 machines, even running
over the network! Most of the rest of the class was all "holy cow our
project sucks"
but I was so excited about mine that they couldn't really get upset.
Also I was using object-oriented methods in C before I knew anything
about OOP! Giving object instances automatically generated descriptive
names such as "Normal for Cube-face6" or "PolySplit: Temp positive-side
points" made debugging very simple because it was easy to see what data
a particular matrix was supposed to have. By far the most fun of any assigned
project!
MIPS assembler, written in C for (surprise)
assemblers class. This was a complete assembler except for output
being in a non-executable format. Let's face it, a non-optimizing
assembler is fairly simple, so I set out to make it high quality and elegant.
The instructions were all specified in a flexible data structure so it could
actually assemble many different instruction sets without changing the logic.
The actual assembly was easy since the data structure said where to put bits
(say for an address), what parameters were expected, and etc, instead
of using conditions to determine those.
Later on in the project the professor added the requirement to support
back substitution (identifiers being used before they are defined).
This was challenging for some assemblers because the number of bits specifying
the address of the label and the position of those bits in the instruction
word varied depending on the type of instruction. (one guy sent me an
if statement for this from his program that had
at least 10 different expressions and'ed and or'ed together!) In
my program I simply looked up the instruction type and shifted and or'ed
in the bits. Definitely my favorite program from college.
BB, written in C using sockets and termcap (curses was
too slow). This was an internet-based BBS; mail and messages, active
menus, author-editable messages, comprehensive user permissions
(turn on/off everything independently like VMS), fast! All
in an 86K static Ultrix binary! I was inspired to write it after visiting
my brother, also a CS major, at JMU and seeing their campus message board
system. I didn't distribute the completed system because the web had
taken over about that time, so polishing off the details would just be wasted
effort.
An Ultrix crash program, written in C. I discovered
and tracked down a bug with blocking IO in Ultrix while writing a queue
program; the queue would block on writing to a file (using the file as
a semaphore) and it worked great except that if you hit ctrl-c (or sent
any catchable signal) while it was blocked the entire OS would crash with
a "CPU0 panic". I was really excited about discovering such a huge bug
and reported it through the proper channels. Supposedly the bug was fixed
with Ultrix 4.4, but I was disappointed that it never was actually fixed.
Source code is basically two lines:
open("/tmp/file", O_CREAT|O_RDWR|O_BLKANDSET, 0700); open("/tmp/file", O_RDWR|O_BLKANDSET, 0);
.. run and then hit ctrl-c
AutoRunner, written in Pascal for the Commodore Amiga.
This program automatically executes a command line when a disk is inserted.
Similar to Microsoft Windows AutoRun feature, which runs commands when
a CD is inserted -- the difference being that I thought of it first! (sometime
near 1988, long before Window95)
Maybe Microsoft just stole the idea, but I suppose it's possible
that they "innovated" it independently. Look for it on Fred Fish
Disk 744.
TradeWars 2000 visualization program. TradeWars
2000 was a text-based multiplayer game set in a Star Wars-like universe
divided into a thousand 'sectors' each connected by 1-7 'warps' to other
sectors. The visualization program I wrote was a terminal emulator
that parsed the game data as the game was played and displayed a graph of
the universe along with tools to efficiently explore it (discover unvisited
sectors), find optimal 'base' locations, aid in trading to aquire credits,
and help play the game in several other ways.
Basic2Basic, written in Amiga Basic. This
converted Amiga Basic programs into GWBASIC programs. Amiga Basic was
one of the newer BASICs, where line numbers were not needed and also it had
subroutines, labels, and if..then blocks (in old-school BASICs
the code after then had to fit on one line). Amiga
Basic if..then blocks were converted to GOSUBs to the
code, plus a return. Subroutines, labels and other features of Amiga Basic
were converted into forms gwbasic could understand. Line numbers were
added since gw needed them.
Later I went back to figure out how I had written the program and
how I should have done it, after the all my college Buchlernen
. Basic of any kind isn't a very friendly language to do this
sort of thing in and looking back at the way I had done it just blew my
mind it was so cool! I'll have to dig it up sometime and post it.
TetraWriter, written in C64 BASIC, was my first
text editor (a character based one). The program basically just remembered
everything you typed in, and saved and loaded it. Changing the text
color was fun, and at the time I thought it was neat that it 'typed' the
letters just as you did, changes and all. Porting this to AmigaBASIC
was an early object lesson in writing clean code, and I took it to heart
-- it was simply impossible to port: loops that end earlier in the code than
they began were simply not allowed. I was really young at the
time!
Since then I've written two other text editors, one storing the
text in memory as whole lines and another, using a kind of buffer-gap approach.
|