What Programmer Type Are You?

Your programmer personality type is:

*DHSB*

*You’re a Doer.*
You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money.

*You like coding at a High level.*
The world is made up of objects and components, you should create your programs in the same way.

*You work best in a Solo situation.*
The best way to program is by yourself. There’s no communication problems, you know every part of the code allowing you to write the best programs possible.

*You are a liBeral programmer.*
Programming is a complex task and you should use white space and comments as freely as possible to help simplify the task. We’re not writing on paper anymore so we can take up as much room as we need.

What Programmer Type Are You?

Getting GD Module Working With Tiger

I always find it a challenge getting the perl GD.pm module working whenever I upgrade or do a fresh install of the operating system. The GD module is perl’s interface to the gd graphics library, which itself requires various libraries installed in order to work with jpegs, truetype fonts, etc. GD lets cgi scripts create custom graphics on the fly, like the Who Owns Vermont map Robin and I created for the Snelling Center a while back. GD can composite and caption photos, watermark them, resize them, convert GIFs to JPEGs or PNGs (and vice versa), draw charts and graphs, and so on. Fun and geeky stuff indeed.

Ever since the hard disk crashed last January, I’ve been unsuccessful getting GD to install despite several attempts using Fink, and even going so far as hunting down the sites hosting the individual parts and trying to install them. No go. (Note: The following assumes you’ve installed the Developer Tools, know what GD is for, and have already installed and configured CPAN.)

Yesterday I decided to try something completely different, and use Darwin Ports to install gd and all its parts. Darwin Ports itself was an easy download and install, so I was encouraged by this good start. I found gd as well as gd2 on the Available Ports, graphics category page; feeling brave, I decided to install the newer gd2. The page reported that gd2 requires the jpeg, libpng, XFree86, and freetype libraries, and I used ‘port’ command (installed by Darwin Ports) to install each of these libraries, like so:
> sudo port install jpeg

Installing software can take a while to compile and, making it a great time to surf the web, catch up on blogging, or whatever. Not a good time to use PhotoShop or other processor-intensive applications, tho, or you’ll be there forever because your Mac is crawling along at a snail’s pace.

Well, the jpeg and libpng libraries installed just fine, and altho XFree86 to a very long time to compile, at the very end it complained that another X package was already installed. I remembered installing Apple’s X11 when I installed Tiger, so I decided to leave that alone and continue with my install (hoping that wouldn’t cause a problem).

The freetype library also installed just fine (and pretty quickly, compared to the behemoth that’s XFree86). I held my breath and installed gd2, the graphics library that ties all the other libraries together. Thankfully, gd2 installed without complaint. And at this point I’m really liking this Darwin Ports thang!

With the last piece in place, it was time to install the GD.pm module, and of course CPAN is the best way to do that. It installed without a hitch, woohoo!

I ran a quick little test perl script that created a 100×100 gif, framed it with a red rectangle and drew some text in the center. And it worked! I was thrilled and pleased that Darwin Ports made installing gd so easy.