Myth of the Genius Programmer

From the Google I/O 2009 conference:
A pervasive elitism hovers in the background of collaborative software development: everyone secretly wants to be seen as a genius. In this talk, we discuss how to avoid this trap and gracefully exchange personal ego for personal growth and super-charged collaboration. We’ll also examine how software tools affect social behaviors, and how to successfully manage the growth of new ideas.

Despite being almost an hour long this is a very insightful video that I’d recommend any Software Engineer watches. I find it fascinating that so many programmers want to erase their perceived (or actual) mistakes in source control systems. I guess everyone secretly wants to be the perfect super programmer. However I typically learn more from my failures than my successes: perhaps it is natural to be more introspective about failure than success?

If you find the title or video too pretentious then the question and answers session (around 42:40) is still quite interesting as the presenters get grilled by the audience.

Installing MatPlotLib on Snow Leopard with MacPorts

I have been trying to install the excellent MatPlotLib graphing module for the Python programming language on my iMac for a while now. Unlike most python module installations I’ve done the excellent python SetupTools (a.k.a easy_install) has not been up to the task.  So I ended up using MacPorts (version 1.8.1) to get MatPlotLib (version installed on Snow Leopard (OS X 10.6.2) with X-Code (3.2.1 – 1613).

So here is a brief description of how to do it:

  1. Install the X-Code developer tools (for GCC, make and other build tools) from your Snow Leopard installation DvD.
  2. Install the X11 Window System from your Snow Leopard installation DvD.
  3. Run ‘Software Update‘ from the apple menu on your Mac to get the latest X-Code updates.
  4. Download the latest MacPorts installer (.dmg file extension) for Snow Leopard from here:
  5. Mount the installer image file (.dmg) and run the contained MacPorts installer (.pkg).
  6. Once installation is complete open a terminal window from Applications->Utilities->Terminal.
  7. Type ‘port‘ at the terminal then press enter to run MacPorts.  You should see output like the following if it installed correctly:
    MacPorts 1.8.1
    Entering interactive mode… (“help” for help, “quit” to quit)

    Then type ‘quit‘ then press enter to exit port’s interactive mode.
  8. Type ‘sudo port selfupdate‘ and press enter to update MacPorts to the latest version.  You will be asked to enter the administrators password before continuing.  Depending on how new the version you downloaded is, MacPorts may do some upgrading.
  9. Once the update is finished type ‘sudo port install py26-matplotlib‘ and press enter.  This will attempt to install the latest version of matplotlib for Python version 2.6.*.   You may be asked to enter the administrators password before continuing.  MacPorts will now download, configure, build and stage the dependencies needed to build the latest matplotlib for Python 2.6.  This took at least thirty minutes on my iMac and involved lots and lots of scrolling text output from the build process.
  10. Next we need to switch our environment to use version 2.6.* of Python that MacPorts just built and installed with matplotlib.  To do this run the following two commands, note you may be asked to enter the administrators password before continuing:
    1. sudo port install python_select‘ and hit enter.
    2. sudo python_select python26‘ and hit enter.
  11. To test this all worked type the following: ‘python -V’ and hit enter.  You should see output like ‘Python 2.6.4‘ which should match the version of python MacPorts built and installed.
  12. Finally to test if matplotlib was installed correctly do the following:
    1. Type ‘python‘ and hit enter to enter the python interactive shell.
    2. Type ‘import matplotlib‘ and hit enter, this will import the matplotlib module.  There should be no output if this works.
    3. Type ‘print matplotlib.__version__‘ and hit enter. This will print the version of matplotlib that is installed, you should see output like ‘‘.
    4. Type ‘exit()‘ to quit the python interactive shell.