Welcome to New York

May 29, 2014

My fellow passenger missed a beautiful landing.

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.


Backyard Double Rainbow

May 16, 2014

Mother nature put on a spectacular light refraction show yesterday. She did Roy G. Biv proud.


Backyard Wildlife - Dragonfly

May 15, 2014

My favorite of the mosquito eaters.


Nice Design Touch in RVM for Auto-Update

May 10, 2014

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.


Firing a Hand Cannon

April 24, 2014

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.


Folder creation bug in Adobe ExtendScript ToolKit

March 02, 2014

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.

I'm building a JavaScript scaffold for Photoshop automation scripts. Something to help build them with less overhead. It will provide config file parsing, logging and simplified file creation. One aspect is that it will automatically make folders when necessary. This is where the bug popped up.

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.

Running:

var testFolder = new Folder("/ExtendScriptTestDir");
$.writeln("Create should return false. Got: " + testFolder.create());
$.writeln("Exists should return false. Got: " + testFolder.exists);

Produces this the first time:

// Create should return false. Got: true
// Exists should return false. Got: false

And this on subsequent runs:

// Create should return false. Got: true
// Exists should return false. Got: true

This makes no sense for three reasons:

  1. There is no way the script should be able make directories at the top of the file system.
  2. Checking for it should have given the same result the first time through as the following times.
  3. 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:

var testFolder = new Folder("/ExtendScriptTestDirAlt/subdir");
$.writeln("Create should return false. Got: " + testFolder.create());
$.writeln("Exists should return false. Got: " + testFolder.exists);

// Always produces:
// Create should return false. Got: false
// Exists should return false. Got: false

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.


Backyard wildlife - Sandhill Cranes

March 02, 2014

Snowy Egrets and Great Blue Heros frequent my backyard. Now, a new type of avian guest has appeared: Sandhill Cranes. Since their heads are Crimson and White, I'd like to think they are Bama fans.

Roll Tide, birds. Roll Tide.


What I'm Running - Open Apps - March 1st, 2014

March 01, 2014

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.

From left to right:

nvAlt My grimoire and external brain
Sublime Text 2 The go-to text editor
Photoshop CS6 The standard (and last version available without a monthly subscription)
ExtendScript Toolkit For making Photoshop JavaScriptsex
Oxygen XML Editor Totally worth the expensive cost XML tool
iTerm2 The better terminal for Mac
CodeRunner The handy code snippet tester
Chrome Google's Netscape Navigator
Lightroom 5 Main photo workflow tool
Photo Mechanic 5 First step on the photo workflow path
BBEdit Backup text editor
Soulver The reimagined calculator
SQLite Database Browser Way better than the command line (beware sourceforge adons)
Dash The pain reliever for looking at documentation
Finder Apple's happy app
Firefox Mozilla's Netscape Navigator
Safari Apple's Netscape Navigator
DayOne Daily note taking
Preview Non-Adobe PDF viewer
1Password Bringer of sanity and security
ScreenFlow Maker of screencasts
Better Rename 9 Bulk renaming of files without the command line
Spotify The replacement for my 20,000 song mp3 library
System Preferences Machine tweaker
TextExpander Auto-Expander for text snippets
Console The tool to peak behind the machine curtain a little
Terminal For long running items that would be distracting in iTerm2
MAMP Pro The Linux, Apache, MySQL, PHP stack, but for Mac
Stickies Post-it notes for the virtual desktop
OmniFocus A fighting chance against the ever-growing TODO list
Activity Monitor Checking performance when this many apps are running
Contacts Names, numbers, addresses, etc…
Dictionary For those times when auto-correct fails (or you don't trust it)
Transmit FTP, SFTP, etc…
Quicksilver Most used app - Don't let the position in the list fool you
Calendar Days, Weeks, Months… Time flies.
iTunes Relegated to a Podcast tool in the post-Spotify world

Of course, this post wouldn't be complete without also showing the apps running in the menu bar:

Again, from left to right:

Hazel "Automated Organization for your Mac"
LiveReload Reload browsers automatically after editing files (no more constant app switching)
Quicksilver Menubar access to the go-to app launcher
ScreenFlow Not currently recording
DayOne Unnecessary, but doesn't appear to be able to be disabled
TextExpander Menu access to snippets when you forget the keyboard way
Dropzone Drag things here and make them go elsewhere
Divvy Hotkeys for shuffling and positioning windows
Dropbox File syncing done right (referral link)
Monosnap Quick and easy screengrab posting
Alfred Alternate app launcher and automation tool (current overshadowed by Quicksilver)
i1 Profiler Shame on X-rite for not updated software even though the hardware is discontinued
Flycut Continuing the search for a multi-clipboard tool that works with my brain
Caffeine Single click to keep monitor from going to sleep during presentations and processing
Houdini Tries to keep the desktop clean by hiding apps after a time
GeekTool Sends output from scripts to the desktop background
Symantec AntiVirus Must have for the corporate network
1Password Menu bar access to password sanity and security
VMware Fusion To run Linux and Windows machines inside a Mac
Messages Another icon that won't die
MenuMeters The next two icons are: Disk Activity and CPU usage
TimeMachine Only use this if you care about keeping your files and data
Bluetooth status I wonder who came up with the name "Bluetooth"
WiFi status Signal strength at a glance
Volume Don't really need this since I just use the hotkeys
Batter level Figure out technology to make this irrelevant and make a zillion dollars
Keyboard To look up key combos to make letters with umlauts
Date & Time Day of the week I can remember - Day of the month I need help with
Spotlight Haven't been able to kill this one
Notifications Haven't been able to kill this one either

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.


Go To Index Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106


© Alan W. Smith
RSS Feed