HomeAbout Me and This SiteWriting SamplesWeb PagesMy WorldArtworkLinks

Code Samples

Programming, programming, programming.

I have a B.Sc. in Computers at the University of Calgary, with plenty of experience in C++ and quite a bit of experience with C and Java. Most of my coding these days is done on web applications using Java or PHP. Unfortunately, I don't have a lot of samples since most of it is proprietary.



PHP Samples

Message Handler code (.inc/text)
A simple class for handling messages and errors during processing on a website. It prints out the list of errors in a bulleted-list, and can provide a list of links to alternative pages the user may wish to go to.

C++ Samples

Solitaire (1999)
code (.zip)
A simple solitaire game with an ugly text interface. A fairly interesting study in classes, and in splitting functions up into too many files. ;)

Graphics Library (1999)
code (.zip)
A heavily object-oriented program, this is basically a bunch of objects and methods which could be used as the backbone for a "shape" tool in a graphics program. The file "main.cpp" contains a hard-coded demonstration of the tools, but they obviously don't stand on their own; a user interface is needed.

Smalltalk Sample

Generator that finds pairs of primes (2001)
code (.txt)
This code was mostly given to me for a computer science assignment, but I had to modify some of it, and write the controlling method "PrimePairs". This was done in a couple of days, without having written a program in Smalltalk before. The code generates "pairs" of primes - that is, it finds prime numbers whose difference is two.




Send Mail to David
HomeAbout Me and This SiteWriting SamplesWeb PagesMy WorldArtworkLinks