Politics, Programming and Possibilities
11 Feb
The backtracer has been around for a while now, and seems to have done its job well enough to deserve a 1.0 mark. This release includes a small improvement from Geoff Grosenbach that limits the loading of this plugin to development mode only. Geoff notes that this “simplifies the backtrace when running tests”. Thanks Geoff.
1 Feb
Ralph Douglass has made some nice improvements to my earlier instructions for installing Ruby SDL on Mac OS X. In fact, his instructions are a mere 25 lines compared to my 90!
Now if only someone more knowledgable than myself would wrap this all up in to a Port file…
[tags]ruby, simple directmedia library, sdl[/tags]
1 Feb
OpenCV is a fast and well-designed C library for computer vision research and development. Since I’m not aware of an OpenCV library for Mac OS X, I’m using my old Ubuntu box to get things up and running.
So I don’t forget what I did, here’s some of the configuration I had to do:
#!/bin/sh
export LD_LIBRARY_PATH=/usr/local/lib
echo `pkg-config --cflags opencv`
echo `pkg-config --libs opencv`
g `pkg-config --cflags opencv` -g -o igaze igaze.c `pkg-config --libs opencv`
./igaze
26 Jan
Bundles that include javascripts, stylesheets and images are getting easier and easier. It’s a wonderful time to be a Rails developer
For those who would like to know what bundled_resource is, check out my earlier post that introduces the problem and solution offered by this package.
This release marks a much improved and nearly completely rewritten dynarch calendar bundle. Here’s what’s new:
Version 0.9 of bundled_resource now also includes a “stateful_form” bundle that makes it easier to store the open/closed states of form sections. This is particularly useful for AJAX forms that have hidden sections that the user can open up. When the form is submitted to the server and returned with an error, the form will retain its open/closed states so that it’s just as the user expects it.
You can download bundled_resource 0.9 here (345 KB) or use the subversion repository directly:
svn://syncid.textdriven.com/svn/opensource/bundled_resource/trunk
Compliments of syncPEOPLE social conference software development
23 Jan
Jamis Buck just pointed me to these two links, and I wanted to share the side-by-side snapshot. Not that this is new news:
I’m thinking of moving back to PHP, just so I can keep up with all of the mail each day. (just kidding).
20 Jan
Seems like I’m way behind the times, but I discovered today that the Virtue desktop manager is available for Mac OS X Tiger!
Just wanted to share, in case you haven’t found out about it yet ![]()
17 Jan
So my wife (Kelty) bought a 6 foot long extension cord a couple of days ago. It looks plain enough. But the label on this thing is hilarious. I can’t believe someone actually wrote this with the intent to educate another human being:
DANGER! ELECTRICAL CORDS CAN BE HAZARDOUS. Misuse Can Result in FIRE or DEATH by ELECTRICAL SHOCK. Please Read BOTH SIDES Carefully and Follow All Directions.
And that’s not even all of them.
But putting the long-windedness of this thing aside, the initial warning seems fair enough: electricity can be dangerous. Sure, that’s fine. I’ll be careful.
Of course, most people at this point are thinking, “Well, I don’t think I need to follow the rest of the directions for this so…” and then you can just hear the writer hoping that their uneducated audience will realize, “Oh, wait! The directions say to follow the directions. It’s a good thing I read the first sentence.”
So, being one of the ‘uneducated end-users’, I learn next that if it’s not for outdoor use, then it should only be used indoors. Brilliant.
I love the next one: Inspect Thoroughly Before Each Use. Who actually inspects an extension cord thoroughly before each use? Sure, if I ran it over with a lawnmower I’d probably check to make sure it’s still usable. But do I really need to check it thoroughly before each use?
And we’re supposed to unplug it after each use?? An extension cord exists to make my life easier, doesn’t it?
So, after I’ve read these instructions, thoroughly inspected it, grasped the plug carefully, assured myself that there is no water nearby, considered soberly whether or not I am indoors, checked the appliance for wattage equal to or less than the cord’s capacity, turned the appliance in to the OFF position, gently yet fully inserted the plug in to the outlet, and after I’ve wisely protected myself with a chemical suit against the imminent threat of cancer due to lead poisoning, then I can enjoy the comfort of my nice, warm space heater. I’m so glad these directions were here to guide me along such a rugged path.
Aahhhhhh. Peace at last.
Wait… it looks like there are some warnings on this space heater…
9 Jan
For those who expressed interest in the pre-dispatcher code I’ve been experimenting with, there is now an updated dispatcher.rb available for download.
This one appears to be much more robust in the method used to track down the “built-in dispatcher” and load that code first. If it can’t find the built-in one, it’ll fail silently so that your Rails application can work even if the pre-dispatcher doesn’t.
Thanks to Hans Fugal for testing the original dispatcher.rb code.
7 Jan
UPDATE:
There is now a version 0.9 available (download).
Hot on the heels of my previous announcement, there is now a bundled_resource plugin that takes advantage of all of my previous work in this area at syncPEOPLE, plus some (download).
If your development is in any way similar to mine, there are a number of useful resources out there that make web applications shine beautifully. For example, there’s the Dynarch calendar and the textarea tools. There are a number of others—too many, in fact. The problem is that as a web developer, it sometimes takes some real surgery to put each one of these in to an application. And then when you create a new page that uses these resources (even within the same app), you have to figure out which pieces to cut and paste to get it functional. Take the Dynarch calendar, for instance. There are 4 javascript files, 1 CSS file (among several to choose from), 2 images, several helper methods, and a controller method that you’ll need in order to get it to work with Rails. Sometimes it’s easier just to ignore the calendar bit because it’s such a pain to set up.
But what if it weren’t a pain? What if you could write this at the top of your page:
<% require_bundle :dynarch_calendar %>
And your dynarch calendar would just work? That’s what bundled_resource does. Now you can use this method:
dynarch_date_select 'post', 'publish_date'
anywhere on the page, and it’ll work. Easy
What the bundled_resource plugin does is it keeps all of your resources (javascripts, stylesheets, images) within the plugin’s directory structure and copies them in to the public folder whenever your app starts. This is very similar to James Adam’s technique that he uses with Rails Engines. The advantage, of course, is that you don’t have to worry about copying and pasting files all over the place whenever you want a new bundled_resource. They all belong together in one little folder inside the plugin.
Included with this release (0.7) are three bundles: the Dynarch Calendar, Textarea Tools and qForms. Setting up an app to use them is simple:
<%= stylesheet_auto_link_tags %> <%= javascript_auto_include_tags %>
For example:
require_bundle :qforms
And that’s it! Welcome to Easier Resource Management for Rails.
7 Jan
It’s a new year, and I’ve decided to upgrade to the latest and greatest WordPress. Unfortunately, bringing my data over from the previous version to this blog was not possible.
Instead, if you’d like to visit the archived (older) material, visit this area instead.