Wednesday, July 16

On Second Thought

On the drive into the office this morning, I was listening to one of the bazillion technology news/interview/round-table podcasts to which I subscribe, and the gentlemen on the microphones were going on and on and back and forth about an age old tech topic that has been beaten to death and then some. The particular topic isn't pertinent to my story; what matters is that I thought to myself, "I was dealing with that issue ten years ago, and I'm sure I've blogged about it long ago." And as an afterthought I wondered to myself, "What was my stance on the issue so many years ago? And, has it changed?" That inspired me to pull up some old posts from long ago, re-read them, and reconsider their tone. I was surprised to find that I had indeed changed my tune on an issue or two, so in the unforeseeable future I hope to pen a handful of "On Second Thought" posts where I revisit my former younger self and try to analyze the rhyme and reason of my flip flops.

Sunday, July 6

Book Review: Secrets of the Rock Star Programmers

Not many secrets revealed in this book, more-so just a collection of formulaic interviews. The author sits down with a little over a dozen industry celebrities and presents them with a thematic collection of questions, which are conveniently cataloged and charted by interview in an appendix. Admittedly I didn't know half the subjects in the book - I knew of their accomplishments, their companies, their products, but this was my first exposure to the people behind the curtain. The author peppers each interview with side notes comparing and contrasting one subject's response with another's - I liked that. It kept things more grounded to see that even though some two guys are considered experts in their field and they both speak very authoritatively, they completely disagree on some matters, reminding the reader that some topics are quite subjective and simply a matter of opinion or personal experience and not necessarily the law of the jungle. The questions asked and the people selected for the asking weren't entirely my cup of tea, but I enjoy a good interview with a smart person as much as the next programming geek, so I would recommend this book. My only major gripe is that it's not available in e-book form; I would have gladly paid for a digital copy but instead had to borrow the dead-tree version from the local library.

Tuesday, May 13

Hamachi on OS X, redux

A few days ago I raved about my revitalized love for Hamachi with my discovery of OS X support and the HamachiX GUI. But after I got Hamachi re-installed on all my personal and business machines (including a couple Windows boxes), I realized that I had no practical use for the GUI. Once you get everything configured, it's "set it and forget it." Any administration you need to perform is pretty simple and intuitive via the command-line interface.

The only caveat is that you need to ensure Hamachi starts on boot so that you don't have to manually log-in and start it (which presents a pretty tough chicken-and-egg issue for headless remote servers).

The free/unsupported version of Hamachi for Windows has the "run as a Windows service" feature disable, but there's a dirt simple work-around. Create a scheduled task for the Hamachi executable (Start -> Control Panel -> Scheduled Tasks) with a schedule of "at system start-up". That's it!

On OS X it's a little more hairy. You need to create a create a special folder in a special directory with a special script and a special configuration file and blah blah blah. It took me about half a day to figure out and get working reliably, and I've shared it over at GitHub, so grab it, read the README file, and enjoy!

Sunday, May 11

Dirt simple personal VPN (Hamachi) on OS X

lock
Uploaded with plasq's Skitch!
I was a big Hamachi fan back in the day when I was shackled to Windows, but when I broke loose into the Linux and OS X days I had to graduate up to OpenVPN. I'm still a huge fan of OpenVPN but it has two drawbacks:
  1. You need a place to host the server, and that place needs to be up and accessible 24/7.
  2. You need to configure the server and generate and distribute keys for the clients. Not for the feint of heart.
In light of needing to add a couple more clients and machines to one of my OpenVPN networks I had to ask myself, "surely there's a better way by now!?" I saw that OpenVPN has a Windows GUI slated for it's next release, and that's a step in the right direction, but a far cry from the elegancy and simplicity I desire. So I was elated to stumble across some OS X support for my old friend Hamachi. I decided to devote my Sunday afternoon to trying it out and to my surprise I was done in a matter of minutes... and it's an awesome as ever.

Unfortunately it's not as simple as most OS X installs; you can't just download it and drag it into the Applications folder. There's three essential steps:
  1. Install the tun/tap drivers.
    1. Head over to http://www-user.rhrk.uni-kl.de/~nissler/tuntap/ and grab the drivers for Leopard (assuming you're running Leopard).
    2. Untar it and run the package installer.
  2. Install the OS X command-line version of Hamachi.
    1. Head over to LogMeIn and accept the "Conditions of Use" to download the OS X universal binary
    2. Untar it
    3. Run sudo ./install
    4. Run sudo /usr/sbin/tuncfg
  3. Install the OS X GUI for Hamachi.
    1. Grab the latest version from the download page. As I'm writing this, the links on that page are broken, but you can find working ones here and the latest (that I'm using) is 1C6.
    2. Run the package installer.
    3. You should be rocking now. Click the "Add" icon (the plus sign) to create or join a network.
    4. Repeat this on each machine you want to be accessible on the VPN, joining the same network on each of course.
  4. Preferences
    Uploaded with plasq's Skitch!
    Optionally, and recommended, you can set up a hot-key for VNC. By default HamachiX maps some hotkeys so you can click on a server name and immediately jump to FTP, AFP, SMP, but of course I wanted VNC so I had to set that up myself. Just go to HamachiX -> Preferences -> Proxies and hit the "+" icon; it creates a pre-populated one for you, just replace the protocol with "vnc" and you're done. If you set the priority to zero it will act as the default when you double-click a server name in your list of peers.

Thursday, April 17

Git for Idiots (and Java developers)

headbutt
Uploaded with plasq's Skitch!
Sorry, I couldn't resist the little jab. This is actually a quick reference cheat sheet for a team of Rails developers (myself included) about to make the leap from Subversion to Git...

Your first time?

  1. Head on over to github.com
  2. Create an account.
  3. Generate a public key.
  4. Get a copy of the repository:
  5. git clone git@github.com:trak3r/rss2twitter.git
  6. Move into the new directory:
  7. cd rss2twitter
  8. You're ready to go!

Business as usual...

  1. Say you're assigned ticket 222.
  2. Make sure you have the latest code:
  3. git pull
  4. Create a branch to work in (named after the ticket number):
  5. git branch 222
  6. Switch to that branch:
  7. git checkout 222
  8. Make your changes (and write lots of tests).
  9. Add the file(s) you've changed:
  10. git add somefile.rb
  11. Make sure you didn't miss any:
  12. git status
  13. Commit often (it's cheap):
  14. git commit -m "a clear but brief summary of the changes"
  15. All done? Make sure all the tests pass!
  16. Switch back to the "master" branch.
  17. git checkout master
  18. Merge your branch:
  19. git merge 222
  20. Publish your changes back to the central repository so everybody else can get them:
  21. git push
  22. You're done! (...as soon as you deploy to staging and assign the ticket back to the creator for validation.)