Blog

ThirstyHead.com now offers a news feed

ThirstyHead.com is where I'll be posting new and exciting Groovy and Grails announcements. Subscribe to http://thirstyhead.com/news/atom to keep up to date.

(Hmmm... isn't that what AboutGroovy used to offer? Stay tuned, True Believers -- changes are coming there, too.)

Posted on Sat, 24 Jan 2009 00:36 by default (587 day(s) old)

ThirstyHead.com for Groovy / Grails training

Things have been quiet on this blog -- too quiet... I'm working on a couple of things to remedy the situation.

First, I'm thrilled to announce ThirstyHead.com. If you are looking for advanced Groovy and Grails training, ThirstyHead.com should be just the thing. In future releases of the website, Andy Glover and I will be blogging, podcasting, screencasting, and all sorts of fun stuff. Keep your eyes open over there for an Atom link. It'll come soon -- promise!

You've probably also noticed that things are quiet over at AboutGroovy.com. I'm revamping the website as we speak. It started life in 2006 as a news site for Groovy and Grails. Other websites have stepped up to filled that need. (Groovy.dzone.com does a smashing job, and there are plenty of others...) AboutGroovy.com will come back as a valuable resource for Groovy and Grails developers. I'll announce it here when it goes live.

In the meantime, Mastering Grails over at IBM developerWorks continues to be a great resource for up-to-the-minute Grails information. 2009 brings a new version of Grails (1.1) and a new example application (Blogito -- a tiny little blogging application). I'll announce it here when Blogito.org goes live.

But wait, there's more... I'm honored to reboot the Practically Groovy series (also at IBM developerWorks). Starting in 2009, it'll be a great resource for all of those clever little things you can do with Groovy.

So, the radio silence here isn't due to a lack of activity -- quite the opposite. I'll try to do a better job of keeping you in the loop. Thanks for hanging around.

Posted on Thu, 15 Jan 2009 01:01 by default (596 day(s) old)

Denver Botanic Gardens

Every time I see a live show at the Denver Botanic Gardens, I think to myself, "This time I'm gonna blog about it." Then I get home and get distracted with other things. (Given the long silences at this URL, you are well aware of how easily I'm distracted...) After a Botanic Gardens show I almost always sit on the back patio, have a nice glass of wine, and try to stretch out the vibe of the evening just a little bit longer. That doesn't happen after other shows. Just Botanic Garden shows.

The venue itself is nearly perfect. As the name implies, you are surrounded by unspeakable beauty. It is a grassy amphitheater that seats just over 2,000 people. Being outside on a perfect Colorado night -- watching the sun go down early over the Rockies, listening to the cicadas accompany the band later -- is something that can only be experienced. Words hang hollow on the page in comparison.

Red Rocks is another local natural amphitheater. No one should die before seeing their favorite band play Red Rocks. But it is different. Deeply different. Shows there are events -- loud rock spectacles. Shows at the Botanic Gardens are intimate.

Just tonight, Patty Griffin marred an otherwise enjoyable set by playing three opening songs in rapid succession, and only then offering up a meek, "Hello [pause] Denver. Thank you for having us to this beautiful venue [pause], the Denver Botanic Gardens." At Red Rocks, that sort of stilted, scripted greeting is expected. ("Hello Cleveland! Are you ready to rock?") At the Botanic Gardens, you just expect more.

Like the time that Jewel forgot the second verse of a song. She stopped -- embarrassed -- and asked the audience for help with the lyrics. After she blew the third verse, she just quit. "Wow -- it wasn't the right night for that song, was it?" What in any other venue would've been a travesty, was greeted by applause and laughter at the Botanic Gardens. Here we want the performer to talk to us, interact with us -- not simply sing at us. The songs are nice, but as Garrison Keillor discovered, spoken words are just as well received as long as they are sincere.

Nearly every show at the Botanic Gardens is a sell-out. Since the "seats" are the blanket you spread on the grass surrounding the four-sided stage, reserved seating is a luxury that doesn't exist there. There is a comfortable ritual that we settle into for every show. The doors open at 6pm, but to get a seat in the front quarter of the stage you need to be in line by 4pm. Sometimes K draws the short straw. Sometimes I do. The loser has to stay at home. The winner gets to sit in line with a book (her) and a beer (me) waiting for the civilized rush into the park.

Once the blanket is spread, out comes the picnic and the wine. You can buy boxed dinners there (smoked salmon and mixed field greens), but it is always more enjoyable eating your own food. Prosciutto and brie. Fume Blanc. Sometimes a dessert from Whole Foods, other times a home-made Rice Krispie treat. It doesn't matter -- it all tastes better there.

You have an hour until the opening act starts. Tonight it was Scott Miller. If you can only buy a single disc of his, make it "Are You With Me?" The raw acoustic set -- a red guitar, three chords, and the truth -- fills the stage better than a full band. Less was certainly more when Patty braved the stage by herself for several songs. Her band was talented, but she connected best when she was up there by herself. She visibly startled herself by stomping on the floor in time with the song and actually hearing it.

The only exception to this "less is more" rule might have been Wynton Marsalis' set with African drum master Yacub Addy and Odadaa. The 20 (?!) piece Lincoln Center Orchestra shared the stage with another 6-8 African musicians. It was like nothing I've ever heard before. Chris Botti put on a helluva show, but hearing the unmic'd call and response of Wynton's band took the cake.

And then, before you want it to, the night ends. The Denver Botanic Gardens are nestled in a tony residential neighborhood. Like a sullen adolescent, it has a curfew of 9:30pm. Its big brother Red Rocks has no such (unfair) limit. You're tired and ready for bed after a Red Rocks show. In contrast, even after a 30 minute drive home from the Botanic Gardens, you're not quite ready to call it a night. So you sit outside on your back porch, sipping a nice glass of old vine Zin, trying to stretch out the vibe of the evening just a little bit longer. One of these days, you'll actually write about it...

Posted on Wed, 1 Aug 2007 01:02 by default (1128 day(s) old)

Pesky hidden files, beware

I was doing some spring cleaning on my hard drive this morning ("rm -Rf *" -- no, NOT in my home directory...). As an afterthought, I did a "ls -al" to verify that, indeed, everything was gone. To my surprise, there were a couple of StuffIt droppings left behind. ".$$ StuffIt Temp 1143648937" Big 'uns, too. Almost a gig worth of dead air. Them files needed killing.

Strange, though, that they wouldn't die. "rm -Rf *" is the command-line equivalent of "slash and burn, take no prisoners". I was the owner of the files, yet couldn't delete them. Perhaps it was a permissions problem. "sudo rm -Rf *" foiled my all-powerful alter ego, Root, as well. Apparently these files were laced with kryptonite.

The leading "." makes the directory or file hidden, but it shouldn't tattoo it to my hard drive. I'm pretty sure that it was the dollar signs that was slipping bash a mickey. Surrounding the file name in single quotes didn't help -- "rm -Rf '.$$ StuffIt Temp 114364'". Neither did letting the bash shell tab-complete the file name -- "rm -Rf .\$\$\ StuffIt\ Temp\ 114364". This was really beginning to harsh my mellow.

So, I pulled out the big guns. TinkerTool, among other things, gives Finder x-ray vision. It is, refreshingly, a free utility in a sea of $20 Mac add-ons. The very first checkbox on the very first tab of the utility is what I needed -- "Show hidden and system files". Once Finder could see 'em, Finder could delete 'em. Odd that the GUI came through when the CLI failed, but I'm not asking questions.

As TinkerTool rode off into the sunset, I heard him mutter under his breath, "I love the smell of Napalm in the morning." Me too, TT. Me, too.

Posted on Thu, 3 May 2007 10:24 by default (1218 day(s) old)

Groovysh and Readline

Groovysh is one of my very best friends. Unfortunately, he is a bit hard of hearing. Here is a typical conversation:

Me: rpintln "Hello"
Gs: Eh?
Me: pintln "Hello"
Gs: Beg pardon? Speak up, Sonny.
Me: println "Hello"
Gs: Ahh -- why didn't you say so? "Hello"

As you can see, the problem is clearly with Groovysh. I type the same thing three times, and Groovysh's hearing loss impedes our communication. (That is the only logical explanation...)

On Windows, you can just hit the up and down arrow keys to recall previously typed commands. On the Mac, this is one of the few things that doesn't "Just Work." Here are the steps you can take to get readline support enabled in Groovysh on the Mac.

Step #1:

This space left intentionally blank. (Stupid Windows -- gloating is much more fun when it is at your expense instead of mine. Falling off of one's high horse leaves a nasty bruise, let me tell you...)

Step #2: Install Readline

If you have MacPorts installed, you can type "sudo port install readline"

Step #3: Install Java-Readline

Download the pre-compiled binary, unzip it, and place the two resulting files (libJavaReadline.jnilib and libreadline-java.jar) in /Library/Java/Extensions. (For the brave-hearted / those with too much time on their hands, full build instructions are available here.)

Step #4: Install Groovysh-Readline

Download groovysh-readline.jar and place it in ~/.groovy/lib. If you don't have a .groovy directory in your home directory, create one. (Don't forget the leading "." -- this makes the directory hidden in Unix.) Anything in the lib directory will automagically be added to your classpath when you run groovy from the CLI.

You can create a .groovy directory under your home directory on a Windows box as well. The proper directory is c:\Documents and Settings\your-name-here. Of course, if you're on a Windows box you won't need to drop groovysh-readline.jar in there since command history is already enabled. (Stupid Windows, making me look bad...)

Step #5: Run Groovysh in All of Its Readline-Enabled Goodness

Type "groovysh". Type "println Hello". Type "go". Hit your up arrow and tell Groovysh "Hello" again. Your command-line history is saved between sessions in a plain-text file named ~/.groovy/groovysh.history.

Step #6: Give the Next Windows User You See the "Stink-Eye"

It may also help to mutter under your breath, "You may have won this battle, Windows-Boy, but you'll never win the war." When they look at you quizzically, wave your hand dismissively and say, "Never mind. Your blind allegiance to the Dark Empire will be your undoing in the end." Then whisper conspiratorially to your Mac, "That's right, my Precious. They don't understand you like I do. They don't deserve you like I do." If you cackle maniacally at the end, they'll leave you alone for weeks. By that time, the pain of this little exercise will be a distant memory.

Epilogue

Linux users should be able to follow similar steps to get readline support enabled in Groovysh on their platform. (No, it doesn't work there natively, either. Laugh it up, Windows-Boy...) The only thing that will change is Step #3. You'll need to compile Java-Readline for your platform.

Posted on Mon, 30 Apr 2007 17:15 by default (1221 day(s) old)

Riffraff

Due to the load the comment-spammers were placing on this server, I've had to turn off comments for now. Thanks, dudes, for really harshing my mellow. At some point, an intelligent spammer might come to the conclusion that choking the server that they're trying to deface isn't exactly a sustainable policy. I'll turn comments back on as soon as I can find a better solution for keeping out the riffraff. In the meantime, please enjoy what the Apple Dictionary/Thesaurus has to say about "riffraff":

riffraff |rif raf|
noun
disreputable or undesirable people : I don't think they talk to riffraff off the street.
ORIGIN late 15th cent.(as riff and raff): from Old French rif et raf 'one and all, every bit,' of Germanic origin.

rabble, scum, good-for-nothings, undesirables, lowlifes, hoi polloi, the lowest of the low;

'Nuff said.

Posted on Sat, 21 Apr 2007 09:51 by default (1230 day(s) old)

Tab Completion 101

I live and die by tab completion on the command line. Normally I use it to quickly navigate to deep directory structures. Rather than typing in the full path to something like "~/tmp/minneapolis/bookstore/grails-app/domain", I type "cd ~/tmp/min[tab]/b[tab]/g[tab]a[tab]/d[tab]".

Now that I spend most of my time in TextMate doing Groovy and Grails development, that little tab key is getting a workout. TextMate offers bundles for both Groovy and Grails that allow you to tab-complete your source code. Once the bundles are installed, I type "hm[tab]" instead of "static hasMany = [items:ClassName]". Note that this isn't really the same as the ctrl+space code completion you get from the Groovy/Eclipse plugin -- TextMate bundles just dump boilerplate code to the screen. But, quite honestly, I find myself spending less and less time in a full-blown IDE these days. IntelliJ still gets fired up for my increasingly rarer Java development, but the agile little TextMate editor is closer in spirit to the agile little Groovy language. (I am, however, eagerly awaiting IntelliJ 7 and its strong new support for Groovy and Grails. Since Groovy and Java mix together so well, I have ctrl+space envy whenever I'm working on a mixed project.)

Recently, Doyle of DoyleCentral.com posted an entry titled "Grails Tips and Tricks" that contained this intriguing little snippet: "If your [sic] on NIX and use bash/dash or some variant I have created an auto-complete feature that is quite handy for the command line."

Now, it seems, I can tab complete grails commands like "grails create-domain-class". You have no idea how happy this makes me. (You have no idea how happy this makes my students -- "grails crate^H^H^Hcrete^H^H^Hcreate-dmain"... you get the idea.) I now type "grai[tab] cr[tab]d".

So, here are the step-by-steps to get bash-completion running on your Mac.

Step #1: Buy a Mac

(That joke just gets funnier the more I tell it...)

Step #2: Install MacPorts

MacPorts is an apt-get-like tool for OS X. (Apt-get for Ubuntu, port for OS X -- easy breezy.) It allows you to quickly install Macintosh ports of popular Linux/Unix utilities. Utilities like...

Step #3: Install bash-completion

...bash-completion. Typing "port info bash-completion" says it all: "Brings programmable completion to bash like those pesky zsh users have had for years." Type "sudo port install bash-completion" to install it.

Step #4: Tweak Your .bash_profile

In your home directory, there is file called .bash_profile. This is where you can put all sorts of interesting little nuggets like environment variables and aliases. One line is "alias m=mate", so that I can type "m ." to pull up an entire directory of source code in TextMate. Another block of code looks like this:

### Grails
GRAILS_HOME=/opt/grails
PATH=$PATH:$GRAILS_HOME/bin
export GRAILS_HOME PATH

This, of course, is what allows me type in "grails" at the command prompt. BTW, I keep multiple versions of Grails in /opt using their fully-qualified directory names: grails-0.3.1, grails-0.4.1, grails-0.4.2. I then symlink "grails" the version I want to make active: "ln -s grails-0.4.2 grails". (I use the same trick for Groovy, Java, Ant, Tomcat, JBoss, Geronimo... it allows me to keep the environment variables static and flip them based on a single command-line tweak.)

To enable bash-completion, copy this block into .bash_profile:

### BASH Completion
if [ -f /opt/local/etc/bash_completion ]; then
    . /opt/local/etc/bash_completion
fi

To make sure that these changes take effect, type "source .bash_profile" or simply exit the terminal window and fire up a freshy.

Step #5: Download and Scatter the Grails Bits

Doyle posted a tarball that contains two magic files. Copy grails_commands to /opt/local/etc/bash_completion.d/. Copy command-list to $GRAILS_HOME.

Step #6: Enter Grails Nirvana

Here we go...

  • cd tmp
  • grai[tab] cr[tab]a[tab] bookstore (grails create-app bookstore)
  • cd b[tab] (cd bookstore)
  • grai[tab] cr[tab]d[tab] book (grails create-domain-class book)
  • m . (mate .)
  • add the interesting bits to /grails-app/domain/Book.groovy
  • grai[tab] r[tab]a[tab] (grails run-app)
  • visit "http://localhost:8080/bookstore" in the web browser of your choice

That, my friends, can only be called tabalicious.

Posted on Fri, 6 Apr 2007 11:39 by default (1245 day(s) old)

Podcasting 101

I just dropped my third podcast on aboutGroovy.com. It is an interview with Jeremy Rayner, one of the earliest committers on the Groovy project. There are enough interesting steps in the production process that other programmer-cum-podcasters might be inspired. Or at the very least, it might answer the inevitable question, "What was he thinking?"

Step #1: Buy a Mac

OK, maybe not, but it certainly eased the process considerably. 'Buying a Mac' is Step #1 for most everything I recommend these days, so you can safely ignore it. My wife doesn't even hear it any more. Some people say "um" or "uh" unconsciously. I say, "Step #1: Buy a Mac. Now, what were we talking about? Oh yeah, could I get onion rings with that instead of fries?"

Step #2: Download Skype

Each interview was done remotely. Scott Hickey, lead on the Groovy/Eclipse plug-in, is based out of Nebraska. Jason Rudolph, Grails committer and author of Getting Started with Grails, is in North Carolina. Jeremy Rayner, longtime Groovy committer and creator of the Groovy Ant tasks, is in the UK.

Skype allows us to talk for free. On occasion we'll pick up some digital static, but by and large the connection has been remarkably clear. This doesn't give you audiophile-quality output, but you can't beat the price. My recommendation is to find a quiet room, have a glass of water nearby, and have a hard ethernet cable connection to the internet. (WiFi is second-best, but you really feel the pain if bandwidth drops even for a minute. Sometimes Skype gets in a bad state and can't recover. The dreaded "Skype Echo" can really ruin a nice podcast.)

Step #3: Buy Rogue Amoeba Audio Hijack Pro

You might as well pick up Fission while you're at it. They sell them in a bundle for $50, and it is well worth the modest investment. (See the next step for details.) Audio Hijack Pro allows you to capture audio from any application running on the Mac. (Yeah, it's Mac-only.) Remember Skype? AHP grabs the audio and saves it to an MP3 file.

For Scott Hickey's interview, I dumped the raw MP3 up on the aboutGroovy server and called it a day. That is, I did that for the second interview. For the first interview, I clicked on the "Hijack" button in the upper left corner. The message said "Hijacker On", and we talked for twenty minutes. Only after we wrapped up did I notice the "Record" button in the upper right corner. [wince] Rookie mistake -- Scott was very gracious and we recorded the second interview right away.

Step #4: Don't fear the merge

When interviewing Jason a couple of weeks later, we inexplicably lost our connection midway through the interview. I didn't want Jason to have to repeat himself, so once we got connected again we just picked up where we left off. I knew that I'd find some piece of software that would allow me to join the two files after the fact. Little did I know that it would be the command prompt.

Unix-weenies are undoubtedly familiar with the "cat" command. You use it to display the contents of a text file ("cat myfile.txt"). While this doesn't sound like a likely candidate for MP3 files, stay tuned (no pun intended). You can also use cat to merge files -- "cat 1.txt 2.txt > merged.txt". Amazingly, you can use "cat" for your MP3 files as well. "cat jason1.mp3 jason2.mp3 > jason.mp3" Whodathunkit?

The one drawback of this is that cat doesn't update the metadata to reflect the new length of the track. Pull it up in iTunes and it will appear to be the same length as the first file in the merge (although the entire file will play without issues). Enter Fission.

Step #5: Don't fear the edit

In the quest for a simple audio editing tool, I found Rogue Amoeba's Fission. It does one thing very well -- opens an MP3 file, allows you to make basic edits, and saves it back to an MP3. (It does all of this in native MP3, BTW. No unencoding/reencoding nonsense...) I pulled up Jason's newly merged interview in Fission. It displays a nice waveform and allows you to play the file back. When you find a spot that you want to edit out, simply highlight the area and choose "cut". Voila. Even if you don't make any changes in the file at all, pulling it up in Fission and immediately saving it back again will fix the metadata so that the correct time appears in your MP3 player.

In my interview with Jeremy, he was fighting a cold. Fission made short work of snipping out all of the coughs and sniffles. I'd imagine that true audio experts might find Fission lacking, but for my bone-simple needs it is a perfect fit.

Step #6: Don't forget the tags

...like I did for the first two podcasts. Fission allows you to add tags for Artist, Album, Title, and the other usual suspects. Save the file again and you are done. Unless...

Step #7: Dude, don't you need a cool theme song?

I'd been looking for an excuse to learn GarageBand, and here it was. I whipped up about 30 seconds of lead-in music and saved it out to MP3. Use the "cat" trick for your bumper music and the Fission hack to correct the times again.

Unfortunately, my time in GarageBand foreshadowed what I'm going to need to do next. Being able to mix the volumes on individual channels is something I missed in my primitive Skype audio dump. Once I start interviewing folks face-to-face, having two microphones will become the next requirement. Knocking my overpowering "trainer voice" down to a reasonable level on par with the other normal person will make a huge difference. In my interview with Jeremy I would love to bring up the levels on his answers, but that would bring my questions to ear-shattering "Is it live or is it Memorex" levels. (In the meantime, maybe I could just ask the other person to shout their answers...)

Podcasting is meant to be a populist activity, and I certainly have the skills to embarrass anyone who has even the slightest bit of professional experience. ("Yeah, I swept the floors at a radio station while I was in high school. Even I know what an EQ is for.") But for right now I'm having fun. Hopefully this will give you to skills to do the same.

Posted on Tue, 13 Mar 2007 07:29 by default (1269 day(s) old)

Hello MBP

I ordered a new MacBook Pro. It came two days after Xmas. 3gb RAM. 160gb HD. Sex on a stick.

Oddly enough, I have to admit that I'm not as excited about this one as my last two. Getting my first 12" PowerBook was *exciting*. Life-changing, professionally speaking. I'd sit on the back patio summer nights with a glass of wine and just explore. Then I stepped up to a 15". I got a much faster box, back-lit keys, and general goodness ensued. Those were visceral upgrades. This upgrade feels more intellectual. Oh sure, I'm loving the dual-core. 3gb of RAM on a laptop is decadent. I doubled my disk space over my last deck. But strange as it may sound, having a remote control for my laptop is one of the killer features I'm really looking forward to. (Has being a professional speaker warped me that much? Nah -- I'm just looking forward to having my cell phone be just a cell phone instead of a Clicker as well...)

As my new MBP booted, it asked if I had an existing computer that I'd like to migrate. I plugged it into my firewire HD. (You *are* backing up to a firewire HD, aren't you? SuperDuper! makes it stupid easy, and when you are living off of your laptop it's simply criminal to not have an up-to-date backup everytime you leave the house.) I could've done this with my old PB as well, but why bother booting it into Target mode when I had a target already up and running? (And yes, up-to-date.) SuperDuper! made that firewire HD an exact clone of the PB, and the new MBP couldn't care less which I used.

I chose to migrate my home directory and my network settings, but not my Applications. I'm moving from a PPC to an Intel CPU. I know that Rosetta would've run my old binaries, but I took this as an opportunity to upgrade to the latest versions of everything and thin the herd. My humble attempt to minimize bit-rot, if nothing else.

I had about 40gb of data to move over. The installer told me initially that it'd take about 4 hours, but the clock looked like it was counting down a bit too fast for that. 30 minutes later and I was staring at a brand new desktop with "?"s in the Dock where my application icons used to be. Time to get to work.

User Apps

The end-user apps re-installed without a hitch. Since all of the user settings came across with my home directory (~/Library/Preferences) and KeyChain brought all of my passwords along for the ride, the transition was seamless. I didn't have to retype a single registration key. I'm using Mail.app, so all of my email was there waiting for me. (I also use IMAP whenever possible, so that would've been Plan B had Bad Things Occurred.) Even my copy of MS Office.X had a few recent patches that I hadn't installed (or known about) until this little exercise.

  • Firefox
    • Stepped up to FF2. Noticed that Next/Previous buttons are missing from the QuickFind bar when I press "/". One tweak to userChrome.css as described here and I was back in business.
  • NetNewsWire
    • The latest version shows inactive blogs in a different color. Nice.
  • iTerm
    • Tabbed terminal windows for me is a must. Shift+left|right arrows to move back and forth means that I don't have to reach for the mouse all the time...
  • Skype
    • Cross platform IM with my Windows brethren at its finest. I think that the vox chat is better than iChat -- less dropping with less bandwidth. I'm going to try a bit of Windows/Mac video conferencing now that 2.x is out. I'll let you know how it goes.
  • MS Office
    • It's fine. What more can you say about it? It's a requirement for business, and I have full binary compatibility with all of those Windows users out there. I can't complain, but I'm certainly not doing backflips. There are a couple of patches that claim to make the apps more stable. We'll see. We'll see.

Text Editors and IDEs

Next up were the text editors and IDEs. It's sad that I have four, but each does something unique. Smultron I like for a simple, pretty text editor. It does syntax coloring and is tabbed, which often times is all that I'm looking for. TextMate is fast becoming my editor of choice -- fast, fast, fast. The Ruby/Rails support is what brought me over, but the Groovy/Grails support is what might keep me there. IntelliJ is still where I go for my Java dev, but that is getting less and less these days. And finally, SubEthaEdit. I've been pairing up remotely with another developer, and I have to tell you that SEE does a bang-up job. It's really cool being able to simultaneously edit the same file across two time zones. I've dropped GVim for now, but it might bring my count back up to 5 if I miss it too much.

Utilities

These are the tools that knock the rough edges off of OS X. It's interesting -- as the OS matures, the number of tools I run has dropped dramatically. I'm down to three right now.

I've gotten absolutely hooked on virtual desktops. I used the prosaically named Desktop Manager on my last two PBs. I never had a problem with it, despite the dire "Alpha-quality" disclaimers all over its home page. But it seems to be abandonware at this point. So I decided to give VirtueDesktops a whirl. They say that they are based largely on the DM codebase, and they haven't disappointed yet. In fact, they have some clever new features. I can click on an active app in the Dock and VD will flip to the correct desktop for me. Pretty cool stuff.

I've already talked about SuperDuper! a bit. I was doing a "cp -R ~ /Volumes/mybackup" for a while, but the fact that SD clones my laptop is what won me over. I used it free for about 6 months, and then got tired of waiting 2-3 hours to back up my entire PB. Once I bought the full version, I regularly get 20 minute backups. This software is just no-brainer.

The only other utility I use by the hour is KeyCue. Hold down on the Apple key and it will show you all of the hidden keystrokes you can use in the active app. For example, in a Finder window you can use Apple+1, 2, and 3 to flip between Icon, List, and Column view respectively. Picking up on those hidden key combinations has paid for this little app many times over.

Server Apps

On my old laptop, I added my servers (Tomcat, JBoss, etc.) to /Library. (After all, that's where Apple put it -- good enough for them, good enough for me, eh?) This made it a challenge to migrate to the new laptop. This time around, I created /opt on the new box. We'll see if it makes it any easier to find just my stuff the next time I go through this little exercise.

I upgraded Tomcat to 5.5.20. Since Java5 has been out for well over a year, and Apple keeps the JDK updated along with the rest of the OS, I decided to roll with it. I was running Tomcat 5.0.28 on my last box. The move to the new version gave me the excuse to move over just the webapps that I wanted.

Interesting quirk: Tomcat 5.5 looks at the JRE_HOME environment variable, not JAVA_HOME. "$TOMCAT_HOME/bin/startup.sh" was failing silently, but "$TOMCAT_HOME/bin/catalina.sh run" quickly showed me the error. I tweaked my ~/.bash_profile, and was back up and running:

### java
JAVA_HOME=/Library/Java/Home
JRE_HOME=$JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME PATH JRE_HOME

While I was here, I bit the bullet and did all of the StartupItem stuff that I had never gotten around to on the other two boxes. This dated article walked me through it, and this recent slide-deck confirmed that nothing much had changed.

Of course since I moved $TOMCAT_HOME, JSPWiki couldn't find all of its stuff. (I run a local wiki to grab quick notes. No wiki spam, no authentication hassles, and I always have it with me.) An upgrade to the latest version shows some nice changes to the L&F (tabbed interface) and some beefed up security. I won't be using the latter, but I appreciated the former right away.

Ruby

Getting Ruby up to speed was where I spent most of my time. Even though I don't use the IDE, XCode was first on my list. I decided to go with the latest and greatest download from the website instead of the older bits I already had on CD. Let me tell you, nearly 1gb of bits marching single-file down the pipe was no treat to watch. It makes you appreciate BitTorrent all the more.

I followed the steps here to build Ruby from source. There is no better bootstrap HowTo out there, IMO. Only the version numbers have changed since I last ran through it over a year ago:

There are a number of other libraries that need to be built. (7 or 8 altogether.) Follow the HowTo step by step, and you won't go wrong. You'll even get an up-to-date MySQL installation out of the deal.

To smoke-test your installation, run thru this quick tutorial. You'll have a quick and dirty Rails app up and running and the peace of mind knowing that all the pieces are in place.

Of course, Mongrel must come next: "sudo gem install mongrel". Run your sample app using mongrel just to be sure.

Groovy/Grails

Groovy version 1.0 shipped on Jan 2nd. Might as well have the fresh bits installed. One "tar xvfz" in /opt, one "ln -s groovy-1.0/ groovy", a bit of .bash_profile tweaking and Groovy was ready for action:

### Groovy
GROOVY_HOME=/opt/groovy
PATH=$PATH:$GROOVY_HOME/bin
export GROOVY_HOME PATH

Grails.latest is 0.3.1 (although 0.4 should be out any day now). A quick walk through the QuickStart confirmed that everything was OK here. There is just nothing finer than having a complete environment in a box: webserver, database, the whole 9 yards. Then being able to type a simple "grails war" and have something ready for production is too cool. Check out the obligatory screen casts to see how quick it really is, and swing by aboutGroovy.com to keep up with the latest.

DarwinPorts

My final task was to get Subversion up and running. There is no joy in compiling that baby from source. (Welcome to Dependency Hell...) On my last two PBs, I used Fink to install native OS X apps with all the myriad of dependencies. It's got a nice GUI, but the binary versions of the installable apps seem to lag the latest stable source. I decided to give DarwinPorts a go. I've been doing a bunch of apt-getting on my Ubuntu server, so the lack of a GUI didn't scare me one bit.

In a master stroke of irony, the latest version of DarwinPorts (1.3.2) is only available as source. So, off to do the configure/make/make install shuffle one last time. One quick "sudo port -d selfupdate" to make sure that I have the latest versions of everything, and then a "sudo port install subversion" to get Subversion.latest (1.4.2) and all of the dependencies. It was really nice letting someone else do all of the dirty work for a change.

Conclusion

Yeah, I still have some GIS libraries to get installed. I'm sure that there is a utility or two that I've missed. But this box is for the most part ready for prime time.

So, out with the old, in with the new. The transition was a bit more work than most people go through, but it was completely self-imposed and well worth the effort. I'll keep my old laptop around for another couple of days, then wipe it clean and leave it by the couch. (Either I'll use it while my son watches cartoons, or he'll use it while I watch the Daily Show.)

Posted on Wed, 3 Jan 2007 02:59 by default (1338 day(s) old)

Port 587, Where Have You Been All of My Life?

I spend a lot of time in Starbucks. A *lot* of time. The $19.99/month I pay for my T-Mobile HotSpot account is money well spent. But there is one thing that has bugged me for the past 2 years -- I can receive email all day long (POP and IMAP), but sending email has never worked. I was already using authenticated SMTP with my various mail providers, but that didn't seem to be good enough for Starbucks.

Now, I'm a reasonably smart fellow -- I understand blocking port 25 to avoid the spammers. I could've devoted my meager intelligence to figuring out some sort of clever SSH port-forwarding scheme to get around this. I've read articles about running a SMTP server locally on my PowerBook (which, had I gone to the trouble, would probably have raised *even more* spam red-flags). I'm sure that I could've called T-Mobile tech support, but the thought of the infinite rounds of finger-pointing ("It's Apple's fault. It's Starbuck's fault. It's [insert anyone but our name here]'s fault...") was so unappealing that I couldn't muster the courage to even try it. Instead, I went through the same steps every time: I clicked "send", got the same dreaded "cannot connect to the SMTP server" error message, cursed under my breath, and fired up a web-mail client.

I used Yahoo mail as my primary client for years. But once I got started using Mail.app, the thought of going back is singularly unappealing. (Yeah, GMail as well...) Plus, I've started to depend more and more on Spotlight to retrace my steps. ("I said what? When? To who? What was I thinking?") Doing a non-insignificant portion of my emailing out of band was really beginning to cramp my style.

But what pushed me over the edge was the fact that port 25 was progressively getting blocked in more and more places. Starbucks, hotels, and finally my Mom's Wifi connection at home. Allow me to repeat that in case you missed it: I COULDN'T EMAIL FROM MY MOM'S HOUSE. Something had to change.

Out of desperation, I Googled "apple starbucks send email". At the end of one message thread, someone cryptically suggested changing port 25 to 587. No explanation, and no report back of whether it succeeded or not. I began Googling more: "starbucks port 587", "secure smtp port 587", etc. Apparently, all of the cool kids use port 25 for server-to-server communication and use port 587 for message submission. Allow me to quote RFC 2476:

3.1. Submission Identification

Port 587 is reserved for email message submission as specified in this document. Messages received on this port are defined to be submissions. The protocol used is ESMTP [SMTP-MTA, ESMTP], with additional restrictions as specified here.

While most email clients and servers can be configured to use port 587 instead of 25, there are cases where this is not possible or convenient. A site MAY choose to use port 25 for message submission, by designating some hosts to be MSAs and others to be MTAs.

The RFC is dated December 1998. How did I not know that already? Why has port 587 *never* come up in conversation?

You know what? Never mind. I can send email from Starbucks now. The thought of all of my so-called friends having lengthy conversations about the wonders of port 587 behind my back and then saying, "Shh, here he comes" is too much for me to consider right now.

Posted on Wed, 20 Dec 2006 16:01 by default (1352 day(s) old)

GIS for Web Developers is in beta

What book am I talking about? Why, I'm so glad you asked. GIS for Web Developers has been a labor of love for an embarrassingly long time. (The working title was Pragmatic GIS.) Let's just say that I started it before JBoss At Work... and Google Maps API... (of course, there was a full revision to the Google Maps API book when they moved to v2 as well...)

In a way, I'm glad that the book has taken a while to become fully realized. (My publishers, Dave Thomas and Andy Hunt, probably feel a bit differently about the matter.) When I began writing g4wd, Google Maps hadn't shipped yet. I would have been sick to my stomach had I missed that "Wizard of Oz / Technicolor" moment in mapping history.

[stage whisper] Umm, didn't Google Maps ship in February 2005?

I told you already; I've been working on this a long time. Honestly, what pleases me the most about this book is how timely it still is. Oh sure, I had to update some URLs and some software versions, but by and large this book has stood the test of time. I didn't set out to write a simple API book. Like most authors, I wrote the book I wish I had in hand when I got started in the GIS industry. I take you through the learning process I took, only without someone there pointing out the mistakes I was about to make. Those lessons learned are just as relevant today as they were waaaayyy back in the days before Google Maps. ([cranky old man voice] "In my day, we didn't have those slippy maps. We had to click and wait for our maps to load like all of the other web pages.")

The reason the last two chapters aren't included in this initial beta release is because they cover the slippy map interfaces that has everyone's attention these days. I'm putting the finishing touches on the "Deconstructing Google Maps" chapter right now. (For a sneak peek, check out the live code examples. You can download the tarball and run it in the web server of your choice -- Tomcat, Apache, even IIS. In 200 lines of JavaScript, you have a fully realized version of Google Maps running on your local box.) The final chapter covers goodies like OGC interfaces, running GeoServer, and using MapBuilder and OpenLayers to put together your very own standards-based slippy map.

The beta process at the Pragmatic Bookshelf is pretty unique in the industry. You buy your copy of the book right now, and the paper edition or the final PDF arrives at your doorstep when everything is finished. But by buying in now you get to influence the direction of the book. If a chapter is unclear, comment about it on the website. If a code example doesn't work, let me know. If you're someone who yells at the television, this is your chance to actually have someone hear your voice and make a change. Pretty cool, eh? Be forewarned: if you wait until the book ships in paper, I won't be able to help you. (What kind of idiot yells at a book, expecting it to change? [wink])

The biggest lesson I've learned through all of this is not to blog publicly about books that I'm currently working on. But I'll give you a hint--shortly after GIS for Web Developers ships, look for a book on another one of the Google APIs...

Posted on Fri, 10 Nov 2006 00:37 by default (1392 day(s) old)

Attention Boulder-Area Map Geeks

This email just hit my inbox. I'm going to do my best to be there. Hope to see you there as well...
All:
Post-election but pre-holiday crunch, FRUGOS will meet next Tuesday--November 14th in downtown Boulder at the Old Chicago's on the Pearl Street mall (at 11th St).

Time: 6PM

Topic: "Open Source on a Stick"--using FW Tools and QGIS off a USB drive.

Abstract: "Wanna tell all your friends that your 'into open source' without actually installing anything on your c:\ drive or delving into the mysteries of PostGIS, MapServer, et al? Dip your toe in the cool & refreshing free-and-open-source-geospatial-waters by running FW Tools and QGIS off a USB stick. We'll demonstrate--very quickly--a) how to get it to work; b) quick and dirty raster and vector transformations using the GDAL/OGR library; and c) making a quick map in QGIS."

Presentation time will be 6:45PM (and last 15-20 minutes)
There will be electricity to plug in laptops; however no wireless. So bring your own laptop and USB (1 GB should be fine) if you'd like to hack along. But let's be clear--it's mostly about pizza, beer, and conversation.

See you there; and tell a friend to tell a friend,

Brian
p.s. For those geographically disadvantaged by the Boulder location, we'll try and throw something together in the downtown Denver area in January.

You received this message because you are subscribed to the Google Groups "Front Range Users of Geospatial Open Source" group. To post to this group, send email to frugos@googlegroups.com To unsubscribe from this group, send email to frugos-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/frugos?hl=en

Posted on Tue, 7 Nov 2006 11:40 by default (1395 day(s) old)

Think Locally, Act Globally

I speak at many of the No Fluff, Just Stuff shows. While NFJS is based out of Colorado, we do 30 shows a year across North America including Canada.

As I was flying out to the Dallas NFJS show, I caught an amazing video of a folk artist named Arthur Lee Land. Visiting his website, I come to find out that he is a local Boulder, CO artist.

I was flying Frontier -- an airline based out of Denver. In addition to being the airline with the funny commercials with the talking animals on the tail, they offer personal DirecTV in the back of each headrest. (Which, BTW, is a *super-cool* feature...)

Although DirecTV isn't based out of Denver, it has a several offices here, employing many Denverites and Castle Rockians.

That's the end of the trail when it comes to Colorado connections, but in each case the company mentioned isn't a faceless multinational conglomerate. They have real personalities and ties to the local market. I've mentioned my occasional weakness for the national brand, but when I'm traveling I usually seek out the local, the unique. I always ask someone local for a restaurant suggestion with one stipulation: it needs to be something that I can only find in that city. Local pride. It lead me to the "Beef and Reef" in Calgary. It got me LaRosa's Pizza in Cincinatti.

When I ordered my Arthur Lee Land CD, I made sure that I did it through his personal website. There's nothing wrong with Amazon, but ordering it through the artist generally ensures that s/he gets a bigger cut of the profits. (Lesson learned from being a Pragmatic author.)

Arthur handles his e-commerce via CD Baby, a independent online store out of Portland, OR. Here is the shipping confirmation I got from them:

Scott -
Thanks for your order with CD Baby!

1 ARTHUR LEE LAND: dragonfly

Your CD has been gently taken from our CD Baby shelves with sterilized contamination-free gloves and placed onto a satin pillow.

A team of 50 employees inspected your CD and polished it to make sure it was in the best possible condition before mailing.

Our packing specialist from Japan lit a candle and a hush fell over the crowd as he put your CD into the finest gold-lined box that money can buy.

We all had a wonderful celebration afterwards and the whole party marched down the street to the post office where the entire town of Portland waved 'Bon Voyage!' to your package, on its way to you, in our private CD Baby jet on this day, Tuesday, October 31st.

I hope you had a wonderful time shopping at CD Baby. We sure did. Your picture is on our wall as 'Customer of the Year'. We're all exhausted but can't wait for you to come back to CDBABY.COM!!

Thank you once again,
Derek Sivers, president, CD Baby
the little CD store with the best new independent music
phone: 1-800-448-6369 email: cdbaby@cdbaby.com
http://cdbaby.com

Buying locally, if for no other reason, allows little breaths of fresh air like this to waft into your life.

While I was in Dallas at the NFJS show, we visited NerdBooks.com. The website looks pretty generic, but the store/warehouse itself was pretty cool. Imagine your typical Barnes and Noble-sized store, only dedicated to tech books. When you want to check out, you walk up to web terminals and go through the website. The employees are there to help, but they are fulfilling web orders. Their average time from web order to shipping is 17 minutes. Minutes...

Oh sure, I'm munching on Almond Joys and Snickers bars in a post-Halloween induced sugar haze, but I'll return to my Mountain Man munchies after I "dispose" of these impostors.

Posted on Wed, 1 Nov 2006 10:19 by default (1401 day(s) old)

Wintertime is here

This poor blog has been dark for a while, but it is not due to the lack of activity going on around here. To the contrary: in the month of October alone I will have visited Joplin, Madison, Milwaukee, Atlanta, Portland, San Jose, Toronto, Keystone, Dallas, and Reston. (I'm really looking forward to a quieter November...) Traveling out of a one-quart plastic see-through baggie full of toiletries might sound glamourous, but I'm here to tell you that pulling your toothpaste out of a wall-mounted cabinet is privilege, not a right.

I have given presentations at several Java Users Groups, GOSCON, the Colorado Software Summit, and (of course) many NFJS shows. I even spoke at career day at Pomona High School.

I'm in Keystone, CO right now at CSS 2006. Having a conference at a ski resort is pretty wonderful. I've seen plenty of the DIA skyline -- it's been nice being among the real mountains for a change. The two feet of fresh powder we got overnight is the icing on the cake. It was 70 degrees here on Monday. It is below freezing now, but you'd be mistaken if you thought for one moment that I am complaining. The food has been top-notch, the housing is great, but the quality of the speakers and the attendees is what stands out. Getting a chance to geek out during the day and then hang out with buddies at night (Tommy Bender, Bruce Snyder, Matt Raible) watching The Big Lebowski and Dave Chappelle -- now that's my idea of a tech conference.

Posted on Thu, 26 Oct 2006 15:04 by default (1407 day(s) old)

I know an old lady who swallowed a horse...

She died, of course.

Me, on the other hand? I'm feeling just fine after a meal of bifteck de cheval avec l'ail (horse steak with garlic). It was cooked to a perfect medium rare and tasted a bit like buffalo.

That same meal, I shared a fondue with another guy at the table (Christopher Schmidt). The waiter looked at us like we were out of our minds. Sacré bleu! Two entrees?! "This fondue, it could feed four!" Four Europeans, perhaps, but we are Americans. Please translate for the man: "Monsieur, we will have both the gluttony and the surfeit. And please bring a copious side of excess as well. Merci beaucoup." It was delicious.

The night before, I dined on médaillons d'agneau and crème de courgette (medallions of lamb and cream of marrow soup). Also delightful.

Being a vegetarian in Europe must be no small feat. Schuyler Erle, while reading a menu for a Vietnamese place, actually said, "$20 for tofu? Yeah, I'd pay it just to NOT EAT SALAD FOR DINNER AGAIN..." (We settled on pizza that night -- also no slouch on the yum scale.)

Tonight I had perch. Fresh from Lake Geneva. And a salad.

Aside from one sketchy lunch at the conference, all of my meals here have been nice. A smoked salmon sandwich on ridiculously fresh bread while walking along the water in Ouchy. Croissants with black coffee for breakfast. ("Really, monsieur? You do not take sucre or lait with it?")

But the conversation that accompanied the meals is what keeps me coming back to high-quality conferences like FOSS4G. Catching up with Tyler Mitchell, Paul Ramsey, and Jody Garnett was great. Meeting folks for the first time like Christopher Schmidt, Schuyler Erle, Jo Walsh, Chris Holmes, Brady Forrest, and far too many more to mention was great as well.

I feasted on Ajaxian web mapping frameworks this week. I met nearly all of the project leads on the top slippy map projects. I hung out at BOFs where they tackled tough issues like tiling and trying to reuse common elements across frameworks. And most enjoyably, I had people come up to me again and again telling me how much they enjoyed rolling their own Google maps.

So as FOSS4G wraps up tomorrow, I fly to Brussels to meet my lovely wife. Euro OSCON promises to serve up more of what I had this week. I can hardly wait. (Do they eat horse in Belgium?)

Posted on Thu, 14 Sep 2006 15:44 by default (1449 day(s) old)