Thursday, January 15, 2009

It's a mystery to me why the FreeBSD folks don't publish this better (for example, a mention on http://www.freebsd.org/security/ doesn't seem unreasonable), but FreeBSD has an easy to use system for updating the base system:

# freebsd-update fetch

Review the changes to be applied, then

# freebsd-update install

If there's a new kernel in there then you should reboot. That's it. Not quite sure when this was fully integrated into the base OS, I'm only an occasional FreeBSD user, you used to have to install a few ports to get this working.

Even their official security advisories don't mention this, instead referring to PITA methods of patching and building from source. I installed the OS via pre-built binaries, why would I then update by patching the source? Sigh.

Tuesday, January 06, 2009

Went looking around today for a way to generate charts/graphs in my Rails apps. Wow are there a lot of choices.

The executive summary is that I'm going to use the first Open Flash Chart plugin listed. I'm adding charts mainly for the "wow, neat" effect and the Flash charts max out that aspect. It seems like I might be able to work around the problems with printing. My second choice would probably be the ProtoChart Javascript library.

Plugins that generate images and/or SVG files:

Gruff
Scruffy

There are a couple of problems with these. Both use the RMagick library to generate images. RMagick is a Ruby wrapper around ImageMagick. So you're stuck with installing native dependencies (ImageMagick and all its dependencies) outside of Rails/Gems. And because you're providing the chart as a separate file you have to deal with sending the client a URL for the chart that comes back to your controller to generate the chart. There are probably neat Rails ways to handle that cleanly, but neither plugin seems to offer any best practices in their docs. I've also heard rumors that the RMagick/ImageMagick combo leaks memory like a sieve, but can't confirm that.

Plugins that use the Google Chart API:

Googlecharts
gchartrb
Google Charts on Rails

These all leave you dependent on connectivity and latency to Google.

Plugins that generate graphs using CSS/HTML:

css_graphs

There's only so much you can do in pure CSS/HTML, so this approach is fairly limited. If your needs are confined to basic bar charts this is a minimal-headache approach.

JavaScript libraries, particularly ones that work with Prototype since it is included with Rails:

Plotr
Flotr
ProtoChart

These are all pure JavaScript, so you're stuck dinking around in that instead of Ruby. There's a Rails wrapper for Plotr:

Chartr

Development of the JavaScript libraries and the Ruby library all seems largely stalled.

Plugins that generate Flash charts:

Wrappers for Open Flash Chart:

Open Flash Chart II Plugin for Ruby on Rails
Open Flash Chart Lazy
OFC2 4 Rails

These flash charts are the most visually interesting, as they are often animated and interactive, doing various cute (and maybe useful) things on mouse-over, etc. However, they leave you dependent on the client supporting/enabling Flash. It is also difficult/impossible to print the chart. You might also have the same issues as the image/SVG charts of having to generate a unique URL for the chart, although the author of the first plugin listed has a blog post that shows how to handle that in a very clean, Rails-like fashion.

Wrapper for XML/SWF:

ZiYa

Wrapper for amCharts:

Ambling

XML/SWF and amCharts are both demoware so I did not pursue these options.