This photo was taken with a pocket size point and shoot camera. That fact amazes me. There has never been a better time to be a photographer. At least in terms of tools. And they keep getting better and better.
The Ruby Version Manager (or, RVM) is an incredibly useful tool for working with Ruby. It provides a way to install and switch between multiple versions of the language with ease. It also provides an excellent example of how to be a useful piece of software.
When installing a new version of Ruby, RVM checks itself to see if it's up to date. If not, it shows a warning:
Warning, new version of rvm available '1.25.25',
you are using older version '1.25.14'.
Pretty standard stuff there. The nice design touch comes on the next lines. Not only does RVM describe two solutions, it also provides the actual commands that implement them.
You can disable this warning with:
echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with:
echo rvm_autoupdate_flag=2 >> ~/.rvmrc
Just copy and paste the echo rvm_autoupdate_flag=2 >> ~/.rvmrc string into the command line and RVM will update itself whenever it needs. Very nicely done, RVM.
In the 1971 movie Dirty Harry, Clint Eastwood delivers the famous passage:
I know what you're thinking, punk. You're thinking "did he fire six shots or only five?" Now to tell you the truth I forgot myself in all this excitement. But being this is a .44 Magnum, the most powerful handgun in the world and will blow you head clean off, you've gotta ask yourself a question: "Do I feel lucky?" Well, do ya, punk?
The official name for the .44 Magnum in the film is "Smith & Wesson Model 29". I have no idea if was the most powerful handgun in the world in 1971. It's certainly not anymore. Enter the Smith & Wesson Model 500. The .50 caliber (compared to .44) hand cannon. It might not stop Godzilla, but any non-fiction land animal is fair game.
While hanging out with a buddy for a Redneck Weekend, I got the chance to fire this piece of personal artillery.
We shot rounds loaded with 40%, 60% and 80% of the maximum amount of gun powder the pistol can safely handle. Safely, in this case, meaning that it fires the giant, deadly bullet down range without removing your hands in an uncontrolled explosion of fire and steel.
The 40% rounds felt like trying to catch a cinder block thrown by an angry line backer. At 80%, the blast concussion knocked animals within 100 yards and smaller than a raccoon unconscious. We didn't have any rounds packed to capacity with powder but I don't feel slighted. I'm not sure if I could have held onto the gun.
Incidentally, the Model 500's bullets are bigger than the .44 Magnum's. It only holds five shots instead of six. So, if you're in a Dirty Harry situation remember those numbers when you're trying to count.
This is the story of an Adobe ExtendScript ToolKit bug. A bug that took two hours to figure out. It's unlikely that anyone else will ever run into the same bug. On the off chance someone does, maybe they'll find this post and it'll save them some time.
The scaffold logs errors when it can't complete a request. To test the error messages when it can't create a directory, I tried to make a folder at the root of the file system. Since that's not a place normal users have the ability to write to, it should have failed. It didn't.
Produces this the first time:
And this on subsequent runs:
This makes no sense for three reasons:
There is no way the script should be able make directories at the top of the file system.
Checking for it should have given the same result the first time through as the following times.
When actually looking for it, there is no directory where the script reports there is.
After a lot of fruitless command line exploration and googling, I tracked down what's going on. Instead of making the directory at the top of the file tree (e.g. /ExtendScriptTestDir), it's created in the /Volumes directory (e.g. /Volumes/ExtendScriptTestDir). Then, for some odd reason, the exists check doesn't see it immediately but picks it up after a short period of time.
I can't explain the behavior, but at least it's consistent. More importantly, as log as there is at least one sub directory thing behave as expected:
The moral of the story: don't try to make a folder at the root of the file system.
Note: This was all using a Mac running 10.9.2 and the CS6 version of Photoshop and ExtendScript Toolkit. I started to open a bug with adobe, but they don't list ExtendScript Toolkit in their drop down of apps and the login page timed out. I'm putting a note in the scaffold's docs about the bug. Maybe they'll see it there.
Macs don't crash much. They also handle themselves well when a ton of apps are running. This was brought home when a co-worker saw me do a Cmd+Tab app switch. Here's a shrunken version of my active app icon bar that popped up.
That makes 62 apps (not counting all the behind the scenes stuff). Pretty good considering I haven't rebooted the machine in a month. The negative aspect is that with all this stuff open, I really put off any software updates that require restarting. Based on this XKCD strip, I'm not alone.