Archive for Mac

2009 Technical Resolutions

I began putting my personal 2009 Resolutions/Goals to paper today and by the time I was done found out that a good chunk (> 50%) were technology related.  I figure that I should make them public so that if nothing else, I feel just a little more pressure to not sluff them off.

The main focus for 2009 is learning new languages.  It’s all the action that I’ve seen develop over the past 2-3 years, but haven’t made a priority to learn given that at work I’ve moved out of being a developer and now manage developers (boo…hiss…).  So here they are, in order (with completion* dates for each):

* - I’m defining “complete” in that I should be able to do all of the following:

  • Give a 15-30 minute presentation on it
  • Write a small-ish app
  • Be comfortable enough with the language that if I needed to start a project, I would be able to hit the ground running in the language
  • Be able to intelligently decide where/if a certain technology/language could fit in our current exclusively Java environment.

If anyone has good book, site, newsgroup, etc recommendation, please let me know.

Getting Started with Textmate (and Groovy)

After attending last week’s inaugural Lambda Lounge meeting, I’ve had a renewed determination to get my Groovy/Grails learning on.

I had previously bought Scott Davis’ Groovy Recipes, and while that book is pretty awesome, I often felt like I didn’t have a good enough base in the Groovy language to realize the full potential of the material presented.

So this weekend, I went back to the Pragmatic Programmers website and picked up (in PDF form) Venkat Subramaniam’s Programming Groovy.  I’m not too terribly far into it, but so far it feels like I’m getting eased into the language quite well.  The table of contents also gives me comfort that a solid treatment of the language is to be had.

One of the first topics covered after installation of the Groovy binaries is choice of text editor or IDE.  For OS X users, TextMate is mentioned, along with the optional TextMate Groovy Bundle, created by Graeme Rocher (Grails Lead).  I also happen to be fairly new to OS X and therefore TextMate…but it seems like everybody who’s anybody uses it, so it must be good.

I was told very early in my career to pick a editor and stick with it.  The amount of mental energy that must be expended to keep all the different keybindings/macros/shortcuts in your head will detract you from the job at hand.  So I try to pick a side and just stick with it (sorry emacs).  This is most likely the reason I won’t move off of Eclipse anytime soon.  Back in the day, I could cruise around Eclipse pretty well…not as good as this guy, but pretty well.

Now that I’m exclusively Mac at Danker HQ, I feel pretty confident immersing myself in TextMate.  So with my new direction charted, I set out to put my Groovy learnin’ on the back burner for the afternoon and get my feet wet with TextMate.

After downloading the Groovy Bundle, I was a bit confused by the directions on the site, so I took a look at a blog posting by Jason Rudolph (check out his excellent tutorial on beginning Grails development).  His take was pretty much the same…so I ended up just double-clicking the 2 bundle files and TextMate automagically installed them into the proper directory.

Next up was a small tweak that Venkat mentioned on his blog.  This allows the output of your program to be shown as a tooltip instead of a pop-up.  Nothing big…but a nice tweak nonetheless.

I’ve probably got the most mileage out of this article.  Does a nice job explaining what makes TextMate special.  For reference, I assume the TextMate manual will come in handy.

The one area I haven’t explored yet is the TextMate book on the Pragmatic Programmers website.  If anyone has bought this book and found that it offered value above what’s freely available, please let me know.

Now that I’ve got my head wrapped around this new editor and have expanded my text editing bag-of-tricks, hopefully I’ll be able to keep my mind focused on the new goal of grokking Groovy.

Cheap backups with Dreamhost + rsync

In my last post (I know, it’s been a while), I was gushing about how my hosting provider (dreamhost.com) was allowing 50GB of disk space for personal backups included with basic hosting plans.

The excitement was a bit premature at the time, because they only allowed backups via FTP. It instantly became problematic to regularly backup anything of significant size (i.e. 30 GB of MP3s) due to my lack of knowledge of doing incremental backups over FTP. If only they would allow rsync over ssh.

Apparently I was not the only person thinking this because the dorks of the internet united, Dreamhost listened, and today I got the monthly newsletter letting me know that rsync, scp and sftp were enabled….Sweet!

So I got crackin’ tonight on my new solution, which is thus:

1. Super-simple backup script (offsiteRsync.sh)

#!/bin/bash

# Sync the local directory to the remote server, limiting the
# upload bandwidth to 10KBps
# Sync via ssh and compress the files over the wire
rsync -avz -e ssh --delete --bwlimit=10 /Users/eric b159xxx@backup.dreamhost.com:~

2. Setup ssh keys so I can run the above script via cron..

lenny:~ eric$ ssh-keygen -t rsa

After typing the above in, I hit enter twice to accept the default directory for the keys and to choose a password-less key

Then I just copied the last (or possibly only) line from .ssh/id_rsa.pub on my local machine (lenny) to the .ssh/authorized_keys file on the remote machine (backup.dreamhost.com)

3. Test!

4. Setup the whole mess via cron, as noted in my previous post.

OS X Cron Coolness

I just found out today that my webhosting provider, Dreamhost, is now officially adding 50GB of storage to each hosting account to be used as offsite backup for free (well, technically included with the cost of hosting)!

I figured that was a sign that I should get off my butt and setup a cron job that would tar/gz files on my home server (where the important stuff resides) and send it over to my Dreamhost acct on a monthly basis.

Cruising through the OS X cron man page, I saw this little gem:

Instead of the first five fields, one of eight special strings may appear:

           string          meaning
           ------          -------------------------
           @reboot         Run once, at startup.
           @yearly         Run once a year, "0 0 1 1 *".
           @annually       (same as @yearly)
           @monthly        Run once a month, "0 0 1 * *".
           @weekly         Run once a week, "0 0 * * 0".
           @daily          Run once a day, "0 0 * * *".
           @midnight       (same as @daily)
           @hourly         Run once an hour, "0 * * * *".

So my cron command ends up looking (mostly) like the following:

@monthly $HOME/scripts/createbackup.sh

How easy is that? I know that most modern linux distros have /etc/cron.monthly, /etc/cron.daily, etc…but the OS X way just seemed really nice.

Anyone know if this exact same shorthand is available on other systems?

Testdrive: OpenSolaris on OS X with VirtualBox

I finally got around to installing VirtualBox (read more about it here and here) on my Mac earlier this week.  Last night I installed the OpenSolaris (2008.5) disc that I picked up at the Sun booth at OSCON last week.

So far, everything has been going swimmingly.  I could walk you through the installation, but this dude at MacWorld did a much better job than I could.

The only trouble I’ve had thus far was learning some Solaris-specific commands (pkgadd, btw) to install the “VirtualBox Additions”.  The VirtualBox Additions are a small selections of add-ons that you install within the guest OS to ease integration with the host OS (mouse control, shared folders, etc).  While I’m not familiar with Parallels, I can say that VMWare (Workstation/Player) has a very similar guest additions installation procedure.

I’ve been using VirtualBox on my Vista desktop for a few months to virtualize a Xubuntu server (sshd, apache, mysqld, etc) with great success.  Typically, the VM is utilizing less memory than iTunes, which I find utterly ridiculous.  I decided to give it a spin on my MacBook Pro because the latest update of VirtualBox has brought the Intel Mac version out of beta.

While I don’t think that VMWare has much to fear from VirtualBox in the enterprise arena, for the average developer/desktop user, VirtualBox should suit you well.  I’ll be interested to see if Parallels and VMWare will be able to continue charging $80 for their consumer versions with such a capable free competitor (backed by Sun, no less) available.

OpenSolaris Impressions

Playing with OpenSolaris has generally gone well.  It helps that the UI is Gnome and the default shell is BASH, two things that most Linux folks should be comfortable with.  Cruising around the filesystem answered one of my main questions, which was that JDK6 (not OpenJDK, mind you) is installed by default.  I still haven’t figuresd out what mechanism, if any, OpenSolaris uses for automatic updates.  If anyone has some good “OpenSolaris for a Linux Guy” articles…please pass them my way.

OpenSolaris guest running on OS X host.

OpenSolaris guest running on OS X host.

Essential Apps for a new Mac

It has become abundantly clear to me over the past year (while attending CSS and NFJS) that to have any hope of being taken seriously as a software developer, a Mac must be purchased.  With OSCON 2008 rapidly closing in, a decision had to be made. So….

A shiny new MacBook Pro landed on the doorstep of Breo Media Labs HQ on Friday, so I decided to reach out to the geek community at large for their recommendations for must have Mac apps. Many thanks to Alex and Scott for sending me links to their previously blogged lists.

A little over 24hrs into owning a new Mac, here’s the list:

  • Firefox
  • Quicksilver - I know there’s more to this thing, but at the least it’s a super quick way for me to start apps without having to take my hands off of the keyboard.
  • Adium - Multi-protocol IM client.  I thought I would give Digsby a spin to kill 2 birds with 1 app (IM + Twitter)..but alas their Mac version is not ready yet.
  • Thwirl - An Adobe AIR Twitter client
  • NetNewsWire - RSS Reader.  I’ve been using Google Reader for a little over a year, but have been underwhelmed in it’s ability to manage my bazillion feeds.  While my preference is for a more “cloud-centric” reader, NetNewsWire seems to be cool enough that I’ll stick with a thick client based reader for now.  It will sync with newsgator online, but I’m holding out for the (remote) possibility of it syncing with Google Reader.
  • Growl - Alerts and such.  Seems to be leveraged heavily by Adium.  A nice side effect thus far is that I’ve setup my IM+Twitter apps in a different space (Space 2).  Because of the growl integration with Adium, I get IM responses as alerts on my currently active space…thus saving time flipping back’n'forth between spaces.  A small, but nice, touch.
  • iTerm -  All the super-geek presenters at the aforementioned conferences use it, so it must be good?
  • iStatPro - Dashboard widget that displays all sorts of system resources (CPU/Disk/Memory/etc)
  • Transmission - Bittorrent Client
  • Cyberduck - FTP Client.  Using it because I’m cheap and it’s free.  I’ve heard good things about Transmit though…
  • Textmate $$ - Text editing.

UPDATE (6/23/2008):

Clearly…this is not an exhausitive list, but just a list of apps that someone new to the Mac platform will install right off the bat to make their environment feel more like home.  Got some good feedback in the comments, so some additional apps would be:

Media:

  • VLC - Probably the best media player out there…for any platform.  I wish all pre-1.0 software was as useful and stable as VLC.  Java developers should take a look at DJNativeSwing for integrating VLC into a client app.  We use it at work and have had great success.
  • Miro - While not strictly Mac software, if you want to get your IPTV on, it’s pretty cool.  Combine it with tvrss.net for TiVo-like functionality.
  • MediaLink/Connect360 ($) - If you have an PS3 or Xbox360 and want to push your media to it, both of these programs will make that a breeze.

Virtualization:

Seems like I’m hearing pros/cons pretty evenly between Parallels ($) and VMWare Fusion ($).  Having a windows desktop (and most of my life lives in “the cloud” now) leaves me with little need (currently) to have Windows app on my laptop.  I have had pretty good luck running Xubuntu within VirtualBox on my Vista machine, so I might also give that a spin on the Mac and see how it goes.

Office/Productivity:

  • Neo Office / OpenOffice.org - Time was, you had to use Neo Office if you wanted a OS X native OpenOffice.org clone.  This appears to be coming to an end with the advent of OO.org 3.  For a lot of the basic things I do these days, Google Docs is serving me quite well…especially when I need to collaborate with someone on a spreadsheet/word doc.
  • SpanningSync ($) - Syncs iCal with Google Calendar.  The wife uses it on her MacBook at home and MBP at the office and loves it.  A friend mentioned that Sunbird from Mozilla is a great replacement for iCal and syncs with Google Calendar for free.

Recent Tweets

Powered by Twitter Tools.