Working on a website… client sends me his preferred color palate as a jpeg with circles of color labeled as to use. This left me with no idea as to what color codes were needed. It took a lot of googling around to find it, but I now have ColorZilla, which adds a bunch of color-related tools to Firefox. The ‘Eyedropper’ tool identifies the color of whatever you point the mouse at.
ColorZilla
August 24th, 2010Synergy+
August 11th, 2010As Howie Weiner so nicely put it: “Like any good developer, I’ve got mission control set up on my desk”. My desk is just big enough for the collection of displays, plus one keyboard & mouse. I was using a cheapo KVM switch I borrowed from my friend, but – having gotten used to sliding my mouse from laptop to external screen – I found myself trying to mouse over from the desktop to the adjacent laptop screen.
I had seen mention of various software that allowed for sharing one keyboard & mouse with multiple systems. A bit of googling led me to the article mentioned above, and another at raymond.cc, both of which mention Synergy. The download from the Synergy project was from 2006, which made me wonder, but given the name, I was able to do a bit more research on it. At the bottom of the Synergy wikipedia page is a reference to Synergy+, which turns out to be a fork of the synergy project which is currently maintained. Sold!
I installed synergy+ on both my Mac mini and my my PowerBook. Most of the installation goes as described in the Setup document, but having gotten it to work with the -f switch (for foreground mode). trying to move on to use it in normal background mode failed. I think someone there must know that is an issue, because the command strings provided for setting synergy+ to start on login include that switch and then toss the output into /dev/null and run the command in the background.
I run too much on my PowerBook and it tends to bog down on occasion. When it is bogged down, working on it as a Synergy client, can get a bit annoying, as the mouse lags. Also, if I’m working on the Synergy client machine whenever some software on the Synergy server machine grabs the mouse, the system enters a confused state until I drag the mouse back to the server.
I’ll have to live with it for a while to see if the usefulness of Synergy+ outweighs its oddities, but so far I’m happy with it.
(There’s also a SynergyKM project, which is “a GUI wrapper around the synergy command line tool”. However, I didn’t find configuring Synergy+ to be all that onerous, so I didn’t bother with it. If I find that I need to turn it on & off, a System Preferences panel which allows me to control that will be of use.)
Firefox Hang
August 11th, 2010A while back I had Firefox freeze up on me when I navigated to a particular website. Something about that page caused problems that required me to kill off Firefox. When I restarted Firefox, it reloaded all of the tabs that I had open – including the problematical web page – and promptly hung again. I had a large amount of context in my Firefox tabs that I did not want to lose, so I didn’t want to just dump all of my tabs and start over. As it happened, I was only marginally interested in the content of that page, so I didn’t delve into the specific cause of the problem.
What to do? I googled around a bit (with Safari) and didn’t see any useful bits of information our there. Poking around on my own, I found what looked like Firefox session data in~/Library/Application Support/Firefox/Profiles/*.default/ (note that this is on Mac OS 10.5.x). In there I found a file called sessionstore.js and a corresponding sessionstore.bak. Taking a WAG, I (preserved sessionstore.js first, then) copied sessionstore.bak on top of sessionstore.js. Restarting Firefox then restored the tabs I had before I ran into the problem web page.
Note that I have no idea how much of this is due to luck (Firefox could have updated the .bak file before I found it to swap around and then it would also have had the bad web page in it) and of course there are no guarantees that it will work for anyone else, or even for me at some later date.
Google Web Toolkit
August 10th, 2010Today’s adventure is to install the Google Web Toolkit (GWT) and produce at least a “Hello World” application.
Working off the Get Started with the GWT SDK:
- Confirmed that I had the most recent Java update for Mac OS X 10.5.
- The OS includes Ant 1.7.1, so I didn’t bother installing the current Ant 1.8.1.
- Installed GWT 2.0.4 under ~/Software/. I’m wondering if it should instead be installed under /usr/local/.
- The WebAppCreator tool automagically generates a trivial application.
- ant devmode starts up a little server and control panel.
- Launching the application starts up the application in one’s default web browser. Firefox needed the Google Web Toolkit Developer Plugin for Firefox in order to run the program.
- … and it just works.
I wanted to make sure that it operates in browsers that haven’t had the special plugin installed. Running it from a file:/// URL or from the Apache server that comes with the OS (have to turn on Web Sharing and move the project to be under ~/Sites/ for Apache to have access to the files) does work. Of course this fails as soon as an RPC is attempted because there is no servlet container.
I think my next step will be to install Tomcat and deploy this to my web server.
Installing Eclipse Helios
July 2nd, 2010Upgrading Eclipse 3.4 Ganymede to 3.6 Helios was not going to happen automatically, so I installed Helios Eclipse IDE for Java Developers, then added the PHP Development Tool on top of that.
Installing Subclipse (Subversion plug-in for Eclipse) was much more difficult than it needed to be, mostly due to the poorly written instructions on the subclipse Download and Install web page. The missing piece was that the “Eclipse update site URL” needed to be added to the Eclipse Install form as a source for the Subclipse plug-in. Once I did that, all went well. I skipped the “Subclipse Integration for Mylyn” and the “Subclipse SVNKit Option” items.
The next step is to add symfony as a PHP project within Eclipse. I found directions for doing that at http://tohenk.wordpress.com/2008/10/13/integrating-symfony-into-eclipse-pdt/. They are a bit hard to understand (perhaps English is the author’s second language? – certainly he or she did not bother to read it over for typos) but once deciphered, the directions are a valuable clue. Unfortunately, they were written over a year ago, and something has broken in the meanwhile. Various actions involving the symfony project trigger this message:
An internal error occurred during: “Refreshing workspace”. String index out of range: -252056764
I finally gave up on installing symfony with Eclipse and installed the PHPUnit plug-in so that I can at least write tests. I spent much of the day fighting with the software, but now I’m set to make progress on the project.
Revisiting a Hack
July 1st, 2010A while back, I needed a calculator for a moderately complicated set of calculations which I needed to use repeatedly with different parameters1, so I threw together a little PHP hack. It is ugly both in outwards design and in that I made no attempt to make it maintainable. It might very well be the worst bit of code I’ve written in recent memory, but it didn’t matter because it was just a little throwaway… then I found myself adding to it in small ways.
Now I want to add persistence to this, so that I can easily revisit a selection of calculations. (I’m envisioning additional parameters, so the currently trivial but annoying rekeying of settings might soon become a serious problem.) So long as I’m going to work with this code, I intend to bring it up to my standards in every way.
An investigation into tools led me to symfony, which I hope to use through eclipse.
My first step will be to add unit testing. I don’t expect to slavishly test all of the existing code – especially as a good bit of it will be replaced, but I will write tests for existing code around the areas I’ll be changing. I expected to use PHPUnit, as I’ve used it before with good results. However symfony defaults to its own lime unit test framework, so I might go with that instead.
1. The calculations describe a beam of light, where the parameters are the distance (horizontally and vertically) between source and target and the type of lighting device in use.
Comparative Shopping
June 30th, 2010I recently had need for two products: Loctite Threadlocker Blue and DeoxIT Fader Spray. I knew that they were sold in stores, but I didn’t know exactly where in my area to find them. In both cases, my need was immediate, so I didn’t want to order the product and wait for delivery – I needed to run out to a store and get them right away.
http://www.loctiteproducts.com/ opens with an annoying animation, but there is a link to “WHERE TO BUY“, which led me fairly simply to a local store which carried that product.
http://store.caig.com/ (makers of DeoxIT) is much more difficult to use. It is cluttered and confusing, and while it does offer it sell single item quantities directly to customers, it seems much more oriented towards selling large quantities to corporate customers. As for a helpful retail store finder… there is no such thing.
I’m much happier to be a Loctite customer than a DeoxIT customer.
ImageMagick
June 6th, 2010I once used ImageMagick to manipulate photos in the back end of a PHP web site I constructed. It has been a long time since then, but when I needed to resize, rotate, and crop the photos in another blog post, it was the tool I reached for.
Installing it on my aging PowerBook would have required me to build it myself, as the prebuilt download is targeted at Intel systems. OTOH, dropping it onto my Debian server was a trivial couple of moments with aptitude. It needed to install 77(!) dependencies, which would have been a nightmare to slog through on my own.
It took a couple of moments to refresh myself on the convert syntax, and a bit longer to fiddle with the images to get them the way I wanted them, but all in all a positive software experience.
Mirror Ball Motor
June 6th, 2010I need a mirror ball for the party scene in Die Fledermaus, for which I am designing the lighting (as well as serving as master electrician and board operator). We’re setting the show in the 1920s to 1930s and Act II is a fabulous party — with the very height of society. A mirror ball is almost a necessity. (See history of mirror balls.) What I would really like to add to my arsenal of equipment is a DMX-controlled mirror ball motor, but this usage does not warrant the expense, so I went with a cheaper alternative — a 2 RPM fixed-speed mirror ball motor. The cheap version is designed to be screwed directly to some surface, whereas I need to be able to hang it from a pipe.
My solution is to bolt the motor to a chunk of plywood and hang that with a pair of lighting clamps. It is a hack, but with washers to back up the nuts holding up the motor to distribute the load on the wood and Loctite to keep things from vibrating loose, it should be just fine. It doesn’t look all that professional, but it will be off-stage, so I don’t care what it looks like.
Installing WordPress
April 2nd, 2010Installed WordPress 2.9.2 today. It went very smoothly. Kudos to the development team!


