Dijkstra’s Three Golden Rules

Edsger Dijkstra’s Three Golden Rules for Successful Scientific Research [via RGrig’s blog]

  • Raise your quality standards as high as you can live with, avoid wasting your time on routine problems, and always try to work as closely as possible at the boundary of your abilities. Do this, because it is the only way of discovering how that boundary should be moved forward.
  • We all like our work to be socially relevant and scientifically sound. If we can find a topic satisfying both desires, we are lucky; if the two targets are in conflict with each other, let the requirement of scientific soundness prevail.
  • Never tackle a problem of which you can be pretty sure that (now or in the near future) it will be tackled by others who are, in relation to that problem, at least as competent and well-equipped as you.

{ Add a Comment }

New Tachy Version Available

A new release of Tachy is now available. This release includes the following changes:

  • Separated the Tachy interpreter into a DLL to make it more easy to embed
  • Visual Studio.Net 2003 project now included
  • Let, letrec, and, or, cond special forms now supported
  • Added preliminary macro system (for example of use see implementation of above special forms in init.ss)
  • Define special form now supports creation of functions without explicit lambda (a form used extensively in SICP)
  • Many more standard R5RS library functions now available

{ Add a Comment }

Fonts and Coding

André Pang is surprised that programmers use the default monospace fonts (like Courier) on their OS to edit their code, and as an alternative listed several alternative monospace fonts for programmers .

I have an even more radical suggestion: ditch monospace fonts for coding entirely and edit in a variable-width font like Verdana or Helvetica. I’ve been coding this way for about 5 years now and won’t use an editor that doesn’t support variable-width fonts, as I almost immediately notice the eyestrain. There’s support for variable-width fonts in moderns IDE’s—Visual Studio.NET has supported it for years(“Fonts and Colors” under the “Environment” option), as has Emacs since version 21 (see the “set-default-font” function).

Pretty much every programmer that has seen me editing in a variable-width font has initially recoiled in horror. “But how do you line things up in your code?”, they ask. Other than code indentation, I rarely need to do that, and for indentation tabs work fine.

Try it for a week or two. Your eyes will thank me.

{ Add a Comment }

Why I’m spending more time in Linux and less in Windows XP

  • The ProMepis Linux distribution automatically installs a hardware accelerated OpenGL driver on my laptop
  • While the GUI is slower and less polished, I can tweak it to my heart’s content.
  • While Firefox is slower, it’s getting faster, and via the magic of Debian packages it’s automagically upgraded to the latest version on a regular basis (along with the rest of the software on my system). For example the HTML rendering component in my current Firefox browser is from February 10th, a mere 7 days ago.
  • The following software has become crucial to my project work: Objective CamlCoin3DCairoLablGLLablGTK2 (with native code & GtkGLArea support), and MPICH
    Each can be installed on a Debian Linux system like ProMepis with one line (“apt-get install [packagename]”). Compare that to how long it would take to get them all installed under Windows XP (hint: I’ve spent many hours trying to get just lablgtk2 working right under either Visual Studio or MingW, to no avail)

{ Add a Comment }

Parody, Maps, & Media

If you read Paul Graham’s Essays, check out a parody of his writings called Taste For The Web. It’s done so well that it actually took me until halfway through the article to realize it was a parody.

The parody led me to Google Maps, which I hadn’t seen before. It’s rough around the edges, but really nice. Here’s what comes up if you search for all of my remote office locations near my apartment with the query: “starbucks near paulina and chicago, chicago”. Try zooming in and panning around—it’s hands down the nicest interface I’ve seen for maps on the web.

A few quality pieces of media I’ve encountered lately:

And speaking of science, I’d been tempted to subscribe to New Scientist for years but was put off by the subscription price. I finally went ahead and got a subscription for myself for Christmas and am so happy I did. I’ve never looked forward to having a magazine arrive every week before, but I look forward every week to this one

{ Add a Comment }

GP & Linux

I’ve been immersed in getting a Genetic Programming implementation up and running over the last few weeks. The combination of OCaml’s pattern matching and type inferencing have really come through for me, allowing me to comfortably experiment with alterations to the foundations of the system.

In the process, I’ve read quite a few research papers. CiteSeer has proven very helpful and Google just announced Google Scholar which looks promising.

Genetic Programming is extremely computationally expensive and as a result I’ve been doing quite a bit of CPU profiling lately. OCaml unfortunately doesn’t support profiling on Windows, so I’ve been spending some quality time with Linux. I’ve been surprised by how nice the latest distributions are, particularly the “sarge” release of Debian. In fact, for the first time, I now consider Linux a credible alternative to Windows on the desktop.

{ Add a Comment }

Life

Since becoming interested in Artificial Life & computer based simulation several months ago I’ve spent a great deal of time researching Artificial Life & simulation, and a great deal of time programming. But I realized recently that most of that programming has been building foundations to do work with, but very little coding on the actual topic that got me started! So yesterday I put together a simple implementation of Conway’s Game of Life‘s_Game_of_Life . If you’ve never played around with the Game of Life, I highly recommend giving it a try. My implementation (along with full OCaml source) can be downloaded here. There’s an included binary for Windows, but it should be compilable on any system that OCaml/LablGL works on.

I had a lot of fun programming my Life implementation and it’s neat to see the complex patterns that can be generated from such simple rules. The pattern that’s loaded up when the program runs is one that I found while playing around that surprised me just how interesting the result was (the pattern is just 8 cells in a jagged line, but runs for many generations).

For a much more feature rich version of Life (for Windows) check out Life32. It’s an impressive piece of work.

{ Add a Comment }

Memory Profiling in .NET

A .NET project I work with has recently run into issues with the application slowing down machines when the application has been running for days. After a fair amount of head-scratching, it turns out that checking to see if a class that you’re instantiating implements IDisposable (and then disposing it) can be very important. I knew it was important, but it’s also the sort of thing that can easily get overlooked during crunch time on a project. In fact, it’s so crucial that I’m surprised exceptions aren’t thrown when a program ends that hasn’t properly disposed of disposable objects.

To make a long story short, the Icon class in Windows Forms is one of those classes, and we were creating a great deal of Icons instances. It turns out there are more classes than I’d suspected in .NET that need to be disposed of manually.

Scitech’s .Net Memory Profiler made the process of finding all this out much easier. If you’re a .NET developer (and especially if your application is distributed to end users), I highly recommend picking up a copy. At $99 it’s a steal. It’s already saved the project I’m working on several times that, just counting the hours I would have put in tracking all this down manually.

{ Add a Comment }