|
Here are some scraps of code from past projects that may come
handy down the road whether for reference or for use with new
software. Damn, if I knew I was going to do this a long
time ago, I would have tried to save all of my
code. But alas, some of them have been lost over the
years, so this is only a partial list. Feel free to
dig around -- just make sure you wash your hands afterwards.
Title
|
File(s)
|
Description
|
Binary Tree
|
cData.cpp
|
A binary tree implementation. You can insert data
into the tree with a string key. The tree is then
"balanced" for optimal searching. No delete
function though -- you'll have to destroy the whole
tree.
|
Board Control
|
RwBoardCtrl.cpp
RwBoardCtrl.h
|
Displays a sorted list of records. Unlike the
Windows' ListView control, items are inserted in sorted
order and can be displayed in different colors. I
originally built this control to display stock
ticker information.
|
C++ Template
|
rsList.h
|
A C++ linked-list template.
|
Clipboard
|
clipboard.cpp
|
Demostrates reading from and writing to the Windows
clipboard. Since this code is from Reypad, TEXT
and application formats are used.
|
Curses
|
screen.c
keys.c
|
These demostrate the use of "curses.h" for displaying
graphical text on UNIX terminals.
|
MySQL C++/.NET
|
smMySQL.cpp smMySQL.h smDatabase.cpp smDatabase.h
|
The first pair of files just wraps the MySQL API
into a C++ class. The second pair of files is
used for wrapping the first class into a managed C++
class so that it can be used in the .NET framework.
|
Printing(Win32)
|
printer.cpp
|
This demonstrates writing data to the device context for
printing. In the case of "print previewing", the
data is written to a bitmap instead of the DC directly
to speed up the display.
|
Pro/C
|
oraMgr.pc
|
Oracle Pro/C implementation. This was used by a
C++ program to interface with an Oracle database.
|
Sort Page
|
RwSortPage.h
|
This is the underlying data structure for the
RwBoardCtrl. It combines the key access of a
map, the random access of an array, and the
insertion speed of a binary tree. This has been implemented
as a template.
|
These are some of the code I wrote before I started working in
the software development profession. They date back from
when I got my first PC in junior high (which was the IBM PCjr)
to college. Some of these were done for school, others
were done just for fun. I'm amazed at how some of
my old programs look from a coding perspective and to see
my style and techniques change over the years.
Title
|
File(s)
|
Description
|
CompuDraw
|
compudraw.txt
|
My first program I ever built (around 1983). I
just started playing around with the BASIC interpreter
that came with the PCjr and a paint program evolved out
of it. Notice that I tried to cram as many
statements into each line so that I don't have to use
too many line numbers.
|
ArenaMasters
|
arena.txt
|
I was the second program and the first game I built on
the PCjr. It was a cross between chess and
Dungeons &Dragons. It was first written
using the BASIC interpreter, then Turbo Basic
came around so I rewrote it and thus the line
numbers started disappearing from my code.
|
Bull's Eye
|
bullseye.txt
|
In this game, there are ten targets on the screen
each associated with a key. The objective is to
hit the key when its target opens. Each successive
level increases the speed in which you have to react.
|
KayBee
|
kaybee.txt
|
A variation of "Simon Says" but with the
keyboard (KB or KayBee, get it?).
This is one of the programs I did for a high school
computer class. Ah, I miss those 5 1/4" floppy
drives.
|
Stock Manager
|
stock.txt
|
One of my bigger Pascal programs I wrote while in
college. I learned Pascal before C and for a time,
I was more comfortable with Pascal. Early on when
I had to write a C program, I wrote it first in Pascal
then translate it to C. Windows was a term that
started to come around then. Most PC apps were
using text-based windows. You can tell I already
had an interest in the stock market.
|
Spades
|
play.c
spades.zip
|
This was a project I did with three other classmates for
the Artificial Intelligence class in college. Not
very AI'ish, but the program does demonstrate decision
making abilities based on arbitrary values assigned to
each card. If you want to learn to play spades,
let the computer play itself, then sit back and watch.
|
|
|
|