Code portfolio

Projects:

New features:

Bug reports:

A couple of samples of my patches:

These are just personal projects. My employment history is on my CV, rather than here.

LED Thermometer / Humidity meter

A little Arduino project to log temperature and humidity, seen here being prototyped along with an interesting set of LEDs (two unrelated projects connected for amusement).

Lights in the dark

Further information

OWI/Maplin Robotic Arm driver

Language:C++ userspace
Language:C for the kernel driver
Repo:https://github.com/stevecotton/robotic_arm

This is a USB device where half the reviews are from people who've ignored the Windows drivers, and connected it to Linux instead. I've worked on Linux video drivers before, but wanted a device to practise on, and so picked up one of these.

The device is a toy robotic arm, with 5 motors and an LED light.

I wrote this to practise with an in-kernel driver, the C++ project simply being the client. But there's almost no reason to need an in-kernel module rather than using libusb. So having implemented the kernel driver driving one motor and the light, I continued with this project using plain libusb.

There are no sensors in the device, thus no way to programmatically determine where the arm is. Even when the limits are reached, there's no feedback to the on-device chip to turn off the motors.

Android

Android demos are on this page.

Contributions to Debian GNU/Linux

I've been using Debian GNU/Linux for years. Now that I have time without needing to worry about copyrights between employer and myself, I've contributed back to the Debian project.

From late 2008, Debian froze for the release of Debian 5.0, with development concentrated on the release-critical bugfixes, rather than adding new features. It released in mid February 2009, after which new development's pace is resuming.

I'm doing this as hobby-coding, and a chance to pick up new coding skills. There's an ecclectic range of software languages used; C is of course always helpful, but also C++, Perl and Python.

The three projects where I contributed to new development in are described below. There are many more projects where I simply fixed a bug.

Apt

Language:C++

System library for Debian's package management, and command-line interface to the same.

I started with a minor contribution to the bug-pruning (reviewing open ones, checking if they were still valid); followed by contributions to two of the long-standing bugs (380509 below, and 400768 ), combined with a study about removable dead code.

A patch for long-standing and oft-reported bug 380509 was well received by the software's maintainer. Preparing it was intertwined with a study of dead code leading to a further +5 -890 lines of code patch.

[mvo_]    stevecotton: woah, that is a suprisingly simple patch
   * mvo_ likes that
[mvo_]    simple++

Current involvement

None, other than occasionally weeding the bug list. For the current Debian release cycle (Squeeze), the big changes have gone in, and now Apt is restricted to minimal changes.

DebTorrent

pieces in a DebTorrent network

Subpage:DebTorrent
Language:Python

Debian is a non-profit Linux distribution, and relies on volunteers to provide HTTP and FTP mirrors. DebTorrent is one of the projects for end-users to contribute back to the system, by mirroring files that they've downloaded.

It terms of skills development, Python is a new language for me, and this gave me a working project to study.

After having a couple of small changes committed in time for Debian 5.0, I have a couple of development ideas in progress, including the graphic heading this section.

Further information.

Current involvement

On hold. Cameron (the main Debian developer for it) and I are waiting to see if it gets more users. It's currently functional, and we both have todo lists that we'll work on if the usage picks up.

Aethyra and TMW

Purple haired pirate day

Subpage:here
Language:C++
Source control:Git

Aethyra and The Mana World are a sibling pair of FOSS MMORPGs. The two projects are from a common base, but are diverging in all respects (world concept, artwork, server and client).

Having started playing back in 2007, I felt like making a new map for the game, which sidetracked in to doing some new artwork that my map needed leading on the work in the art gallery.

I didn't start off expecting to write code for this, but have moved from wanting to add a map to being an all-round contributor to the Aethyra project.

Further information.

Current involvement

I'm making GUI improvements (C++) to the Aethyra client.

2000 and before

These are projects written either while at university, or between leaving university and starting at Psion. Having completed a math degree, I wanted to check that I could switch to programming, which is part of the reason for writing the 2D RPG engine.

2D RPG engine

Language: Java
Compilers: Sun JDK 1.2, Jikes, Guavac and Kaffe
Tools: Perl, Gnu RCS, Gnu Make
Development enviroment: Vim, Linux
Work remaining: Some.
Status: Most of exploration section written, and the combat work was starting.

a screenshot

An RPG game (it works as both an applet and a stand-alone application) which is based on an overhead map view.

The design makes it easy to add extra maps, to let other people add locations to it, if they want to.

I'm doing it as a production-quality project*, with proper object-oriented design, and concentrating on getting the underlying non-graphical engine working before concentrating on the graphics.

* production-quality code. The quality of the artwork will not be above that in the gallery.

It is now close to complete, and has its own page complete with playable versions, here.


Minor projects

TCP bandwidth throttle

Language: Java
Development: Linux
Sun JDK
Vim
Status: Currently being used

When writing webpages, it's important to think about how it will look downloading over a modem. For that, a low-performance webserver would be ideal, something that only served 33 kilobytes a second.

Throttle is a Java application that sits between a browser and a webserver, and chokes the connection. There are actual bandwidth throttling modules for Apache, but this was an easy adaption of another program that I'd written. Advantages of this over a throttle module are that I can tweek it as I wish - for example, adding a delay at the start of each connection, to mimic network lag.

There are more details and the source code here, or you can find the Apache modules by typing "throttle" into the search engine at http://modules.apache.org/.

Blockdrop (a Tetris clone)

Language: Java
Development: Xterminals
Solaris 2.5 and Linux
JDK, Guavac, Kaffe
Emacs and Vim
Work remaining: Multiplayer not yet supported.
Tidying needed.
Better graphics would be nice.
Status: Playable

This was first written in Summer 1997.

(Comment from 1998) This was written out of curiosity - looking back on it now, a year after I programmed it, I can see a lot of technical improvements. It was intended to be a multiplayer system - if I get a webserver that will support CGI then I will finish it off. As it stands, all the network hooks are in the code.

(Aug 16th, 2000) Now, three years after I first wrote it, I went back and took another look at it. It took a while to adapt it to the new API java.awt.events.* callbacks model instead of the one. I never did write a server to go with it, and I know that if I did it wouldn't be classed as CGI.

(Aug 18th) Renamed it BlockDrop, until I think of an interesting name.

Playable version of BlockDrop

Stereogram (3D image) creator

Language: C
Development: Gnu C 2.7.2.1, under MS-DOS, Solaris, NT and Linux
Work remaining: Make the program work with a compressed image format (preferably PNG).
Status: Code works nicely.

Autostereograms used to be an obsession of mine. Finally I wrote a trio of programs to create them - the first on a BBC Micro, then a complete rewrite into QBasic. The third version started with a brief consideration of Pascal, 16-bit C, 16-bit C with an ugly bit of assembler, and finally C again. After which I left it for two years.

Eventually I took a Communications and Cryptography course. Visual cryptography and stenography were part of it.

Guessing that in the final exam almost everyone would do an RSA implementation, I thought that it would be fun to return to the stereogram creator. So I cleaned up the code to it's present form, ran it on a series of images, and ended up with a 5 megabyte animation of a rolling dodecahedron, a stereogram obsessed lecturer, and an A grade.

Here is an autostereogram of the greek letter pi (π).

Stereogram viewer

Language: Java (1998)
Language: SVG with JavaScript (2011)
Development: JDK, Guavac, Kaffe under Linux
Status: Complete

This is an attempt to help people who have difficulty seeing stereograms to see them.

Puzbob (a Puzzle Bobble clone)

Language: Java
Development: Xterminals
Solaris 2.5
JDK 1.0.2
Emacs
Work remaining: No score
The game-over needs work
Multiplayer not yet supported
Status: Discarded in favour of other things, and unlikely to be reworked.

A very silly project

The Talky Toaster

Description: In its Java form, an Applet that really wants to offer you some bread-related products.
In C, a fortune-like program.
In JavaScript, a somewhat neurotic toast-enabled device.
Language: One in each of C, Java and JavaScript
Development: Gnu C 2.7.2.1 under MS-DOS 6.22 and Solaris 2.5
JDK 1.0.2 under Solaris 2.5
Mozilla 0.6 under Gnu/Linux
Current version: Java applet
C source
JavaScript

This is a joke from the BBC series Red Dwarf.


Others

There a few other things that I've been working on, but that are too minor to have their own section: