Category Archives: Computers

Relating to computers and technology

Joined the Club

The Ubuntu As of yesterday, I have became a full-fledged Ubuntu member!

Ubuntu is the Linux-based operating system I use on my desktop at home and at work, and in fact I’m also using it to serve up this web site. I’ve been running for a year now, and started to become active in helping with development of the software, and with technical support, in August of last year. Being an Ubuntu member, though, will mean that I have a vote in the governance of the project. 🙂

Becoming an Ubuntu member isn’t so simple a matter as adding your name to some list. Official membership is given only to people who have demonstrated ongoing and significant contribution to the Ubuntu community. This could be helping to triage or to fix bugs, contributing artwork or documentation, offering help to users with technical difficulties, or actively advocating Ubuntu in your local community.

In order to become members, applicants need to appear before the Community Council, and concretely demonstrate that they have been and will continue to be a significant asset to the Ubuntu community. This pretty much means that you need to have been documenting anything important that you’ve been doing on your page in the Ubuntu community wiki (here’s my wiki page), so that you can point them at it, along with your launchpad page if your contributions tend to be related to bug fixing or triage. The Community Council is the small group of the community leaders who are directly responsible for the directions Ubuntu takes as a project. At this moment, there are only four members in the council (this is probably going to double very soon).

After successfully surviving the council’s scrutiny, you are then rewarded with:

  • an official ubuntu.com email address (mine will be micahcowan@ubuntu.com, but it won’t be set up yet for maybe a week);
  • the right to print and distribute official Ubuntu business cards; 🙂
  • a snazzy ubuntu/members/yourname hostname cloak for your IRC communications on irc.freenode.net; and, of course,
  • a vote in community government decisions!

The main reason I’m excited about obtaining membership, though, is that it’s the first step towards becoming an Ubuntu developer, something I’m currently pursuing. Being a developer means I can upload packages to the Ubuntu software repositories (that is, upload new software or new versions of software that will become part of the Ubuntu operating system—currently, I need to have a sponsor upload for me), and will require ademonstrated ability to package software for the system, which can be fairly complex sometimes. I already have some experience in this regard, as I have packaged fixes to existing software already (such as this package I improved); but I will need to do a good deal more.

Update: my micahcowan@ubuntu.com address is now working! 🙂

PostScript is Amazing

A sample mazeWell, I finally completed a little toy project I’d been working on, off and on, for a while.

It’s a program written in PostScript that generates random mazes. You can try it out, and a random maze will be generated to a PDF file which you will see (if you have Adobe Acrobat Reader or some other PDF viewer). I have another version which produces six mazes to a page. The original PostScript version (which you can download here) can be configured to print an arbitrary number of mazes to a page, and was written using the Test-Driven Development paradigm (so it includes a fairly complete set of regression tests).

I wrote it after I read the source code to the program “Amazing”, written in BASIC, which was presented in a book I used to read when I was a kid, to try things out on my TRS-80 or in Microsoft BASIC on my Macintosh Plus.

I dug up the source code again while I was searching for code to simple, text-based games that I could use as means to teach the C programming language to newbies. The example from the BASIC Computer Games book was rather illegible, and I spent a weekend deciphering it so I could understand the underlying algorithm. In the process, I ended up finding a couple bugs in the progress, such as the occasional omission of the maze exit point, or generating unreachable locations in the maze. I wish now that I’d found the original version of the program, which is much more readable. I think David Ahl’s version from the book must have been written to conserve absolutely as much space as possible, at the expense of comprehensibility.

What Is a Good Test Case?

Found this brief PDF essay to be an interesting read. I feel that the title is a bit of a misnomer, though, as it doesn’t really answer that question. It does a good job of defining some sometimes-confusing software QA terminology, and identifies common testing paradigms that are used to define test cases.

Clever C Code to Calcluate “π”

Someone on IRC (#ubuntu-offtopic on irc.freenode.net) sent a link to the following delightful little 1988 IOCCC winner, written by Brian Westley:

The functionality of the above program is to print the value of the constant π (“pi”, ∼3.14). The beauty of it is: the larger you make the circle, the more accurate the value (but you’d need to adjust the precision of the printf() format string).

Intellidiscs

Did you ever own an Intellivision video game system?

After our Atari 2600 got stolen out of our home, along with a guitar and camera, my uncle Gary bought our family an Intellivision, along with scads of games. That console makes up my earliest childhood memories of videogame-playing (I barely remember anything at all about the 2600; just a dim memory of playing Basketball with my dad).

Nightstalker was cool enough, and my best friend Laban (still is) and I spent hours discovering neat tricks in Utopia, like how to turn your PT boat invisible or make it travel on land, or sink a harbored fishing boat. But far and away, my most favorite game was Tron® Deadly Discs.

Tron® Deadly Discs mini-screenshot

I’d always loved that game, Continue reading

Five Truths About Code Optimization

I discovered a terrific blog post on code optimization, through my friend Mars’s blog.

To summarize in my own words, the most important parts are:

  1. Start with unit tests, so you can be confident that the code worked in the first place, and that you haven’t broken anything in the optimization process.
  2. Never assume you know what the bottleneck is, even if it’s “obvious”. Profile first, code later.
  3. Reprofile after every code change, so you know whether the remaining efficiency issues are still in the same place, or if a new spot is the current big problem.

There are two more points in the post, but they are either obvious or much less important, IMHO.