Sunday, July 23, 2006

The horrors of installing Gruff

Whilst most of my ruby experiences have been very pleasant surprises, getting the graphing subsystem of the project to work has been truly truly unpleasant.
The main ruby/rails graphing library that gets bandied about mostly is Gruff graphs. Admittedly once it started working, its been reasonably good (ignoring a few irritating things with bad documentation and lack of features). Its the getting it to work part that was truly horrible.

There is a LOT of stuff on the web about this, so I'll make it less painful by starting from scratch (as far as I remember anyway).

There are 3 critical ingredients to get gruff to work. These are
  1. ImageMagick
  2. RMagick
  3. Gruff
At the heart of all your problems will inevitably be ImageMagick, so this is where you really need to be careful. I've become a little wary of automatic installers such as 'apt-get install imagemagick' or 'gem install RMagick' for just because an application install doesn't mean its functional. On my home system I had almost no problem, but on the development machine at work, it was a painful mess. Some of the problems I had were.

  • uninitialized constant Gruff
  • uninitialized constant Enum
  • No decode delegate for image format JPEG
  • Can't measure text. Are the fonts installed?
  • Can't find libMagick or one of the dependent libraries.
  • Unknown format: PNG
And nearly all of them can be traced back to a bad ImageMagick/RMagick install. This page helps a lot to debug these issues, but doesn't really give you everything to get it working.

ImageMagick's main saving grace is ./configure gives a nice summary of what it thinks it has and doesn't have. In my case, it picked up bad paths for the fonts, and the debian install didn't have libjpeg or libpng installed, both of which caused issues with installing. So I installed libpng (apt-get install libpng12-dev), and it got picked up no sweat. libjpeg was a little more annoying however. I had to download libjpeg from the website, untar, make, make install and of all things, copy into /usr/local/jpeg-6b.

After that I had to run configure in a bizarre manner

CPPFLAGS=-I/usr/local/jpeg-6b LDFLAGS='-L/usr/local/jpeg-6b' ./configure --with-gs-font-dir=/usr/share/fonts/type1/gsfonts/

The gs-font-dir is to kill my 'can't measure text' problem by making sure it used the correct fonts path for the machine, rather than the default. A make;make install later, I had a installed ImageMagick with correct support for fonts/png/jpeg.

The next thing I did was to install Rmagick (again from source).
Previously when I tried to install RMagick from the gem, it installed successfully (until you tried to use it, at which point it went poof), so source I go...

Once the RMagick installed (with no errors from the make), I installed gruff from the gem, which went smoothly. And voila, everything worked! Thank goodness. Undoubtably the most unnecessarily painful thing. That said, its not that bad once you know what you're doing.

Thursday, July 13, 2006

Career Development Part 1

The entire performance based culture is tough, its not like a normal company where you can be guaranteed to go up a bit just by 'being'. If you don't raise the bar for yourself everytime, you'll never get promotions and you'll never get raises.
Its good and bad at the same time. Improving yourself is always something to be happy about, but lifting that bar will get harder each time.

I know personally I have a few issues that I have to work out. The first and most important one is to use my coach better. I've got this great resource thats sitting there and I've never used it beyond the basics. I've been classified as a DPH person for coaching purposes after I tried out a assessment form. That is directed, programmatic and holistic. Before you think this makes no sense and sounds like psychobabble, let me clear it up. A directed coach will teach you thinks by telling you how things are done, what you can do to improve yourself, give you feedback externally. By programmatic, it means you should meet regularly in order to discuss how you are going and how to improve yourself. Finally holistic means that I'm not interested on learning about just day to day skills from my coach, but more about the overall career development. So I'm going to have to have to raise this next time and get it organized. Its my responsibility after all.

Also at work I'm a 'yes' person and it means I'll say yes to something that I cannot promise without working like a dog, which of course leads me wanting to cause mayhem and chaos. So really I need to learn to say no. I can say no plenty of times at home, but at work, I'll do it if someone says to do something.

I was shown a nice diagram which I'll remember pretty well. It was three concentric circles. The center most one is your comfort zone, the middle ring is FEAR and the outer ring is growth. I'm one of those people who have a comfort zone and a thick ring of fear around it. But I'm slowly getting better at breaking through the fear barrier of late to get something done. But its hard, but thats what personal development is about right?