Skip navigation

Category Archives: Computing

For a bit of a laugh, I made a Twitter bot today. Not just any old bot, it’s a crime fighting bot bringing your criminals to justice.

What’s a your criminal? You know, people who don’t know when to use “you’re” instead of “your”.

The idea was inspired by the athiest bot, which cracked me up when I first saw it. I made this one using the python-twitter wrapper, and it’s surprisingly easy to get a simple little automated Twitter thingy happening.

Basically, it searches for people misspelling “you’re”, then retweets their crime with a friendly suggestion of how they should spell it. Here’s some of the tweets it generated before the account was suspended for unsolicited tweeting 😛

The software I’m currently working on is a mod for the very popular animation-creating tool called Scratch, developed by MIT. Our mod, tentatively named Cellular, extends the capabilities of Scratch by allowing the sprites to not just interact with each other, but also the environment beneath them.

The environment (known as the stage in Scratch), is divided up into cells that can have attributes assigned to them, which can then be read from and written to by the sprites as they move about.

Here’s an example of what can be achieved with Cellular…

Maze Cat

So what’s happening here? Well, the cat is creating a maze using a well known algorithm based on a depth-first search. In brief, the algorithm goes:

  • Mark all cells as unvisited, and place the cat in a random cell, which will be the exit.
  • Get a list of neighbour cells, and for each neighbour, starting with a randomly selected one:
    • Move to the chosen cell and remove the wall separating the two
    • Recurse the algorithm, using the new as the current cell
    • Move back to the previous cell

The cat will eventually fill all available space on the stage with paths, and an entry to the maze can be chosen at will (obviously a good choice of entry will be suitably far from the exit).

There’s guaranteed to be only one correct path out of the maze, as the algorithm will neven create any loops or circuits.

What I find particularly cool about maze generation algorithms is that they expose students to the concept of recursion in a fun and practical way. Also, maze generators are typically just modified search algorithms, which form part of the fundamentals of Computer Science education.

Being a software developer doesn’t give you any sort of license to design beautiful things, particularly when you can’t draw, like me. Yet every development role I’ve ever been employed in has required some sort of UI design, and in most cases a small amount of web design. Understandably on larger projects the work is more cleanly split between developers and designers, but on the small-medium end of project sizes it’s reasonable to expect that a developer can do more than just write lines of code.

In the two rounds of computing studies I have undertaken I’ve found that design theory has been grossly understated, to the point where it’s almost non-existent. Obviously web design is a field in its own right, and for a comprehensive education in this area you don’t study Computer Science. Why though, is design not more integrated throughout Computer Science and related degrees, even if only very mildly?

If you were to use the assignments and pracs used throughout the Software Engineering degree I completed (similar to a Computer Science degree) as a guide to what I would be spending my career doing, I’d spend 90% of my time developing console applications that read some input, do something, and produce some output. Sure this is the easiest way to learn about data structures, algorithms, and the theoretical side of computing, but I find myself with a gaping hole in my skill-set with respect user experience and design.

For now I’ll be hitting the books and trying to get myself up the curve, but at some point I may need to do some formal PD in this area.