Keeping SSH connections open (in PuTTY)

February 20th, 2008

putty tcp keepaliveLifehacker posted an article this morning about keeping SSH connections open in Linux (which was just a re-posting of an article on FOSSwire).

This is helpful for all of those Linux users out there, but for those of us who have a Windows desktop with the same needs, the solution is a bit different. If you use PuTTY (or PuTTY Tray, like me), there’s a field for Seconds between keepalives on the Connection configuration pane. Check out the image at right for the rockin’ detail.

how-to, software notes

Clearing the Baffles

February 20th, 2008

Kevin, a buddy of mine from grad school, recommends the zen-like experience of disclosing your drafts and then deleting them. I only have three at the moment, but nonetheless:

  • Rebooting After Tough Crititcism (tags: management)
  • Using Outlook to Get Things Done (tags: lifehacks, productivity, software notes, windows)
  • Managing Burnout (tags: management)

Each one seemed like a good idea at the time. Maybe I’ll come back to the idea some day when the mood strikes or the topic is more fresh in my mind.

*delete*

blogging, productivity

Home Backup Project - Part 7: Four Months Later

February 19th, 2008

About four months ago, I set out to fix a looming technology problem at home, having no solid backup strategy. After some arguably un-scientific research, I came up with a solution which has given me a decent amount of the ever-sought-after piece-of-mind. It looked something like this:

  • I subscribed to JungleDisk using Amazon S3 storage. It backed up about 30Gb of data (in about 10 days! ouch!) and then ran in the early morning to keep itself in sync.
  • I set up an rdiff-backup script to mirror the important stuff to an external USB drive.
  • I created a subversion repository for all of my installers, tools, installation CD iso images (which I created using MagicISO)
  • I copied my entire media library onto a cheap, huge external SATA drive and brought it to work, which is a more secure location that my house.
  • I mirrored my svn repository onto that external drive as well and set up a batch script to update it weekly.

All in all, this was a really good first effort. I was happy and felt secure, though I haven’t once had the need to use this wonderful system. I have, however, found some parts of it to be annoying. First of all, JungleDisk is SLOW. Really, really slow. Well, ok, it’s only slow to upload. It took TEN days to upload about 30Gb of data, which is about 34kb/sec. As a test, I did some uploads to servers around the country (I have friends in fun places), and averaged about 100kb/sec, so in my opinion either Amazon throttles their incoming bandwidth, which I can understand, or my route to S3 stinks. In addition, it slows my computer down when it runs. I feel like that’s really out of the question for a modern application.

These things are annoying, but they aren’t a hill to die on. What was really bothering me was the cost. I had estimated that it would cost about the same each month to use S3 as it does to use mozy.com or other similar options. I was wrong! It costs $4.95 each month for mozy, and about $7 each month for S3 with my usage. It’s not a huge difference, but it is annoying.

Back when I was looking at online storage, I tried mozy seriously and found the biggest weakness to be their Mac client, which I failed to note at the time was just freshly out of private beta. On a whim, I tried it again, still in beta but a tad newer. It still does that thing every time you start it up where it tries to scan your probable backup sets even though I don’t want it to. It does not, however, keep crashing and it is, to my delight, a LOT faster. I got my averaged upload speed when I let it run untethered. And, even when I did that, my mac barely noticed it was doing anything major with its network connection. The client lets you throttle the bandwidth use during a specific time range, so I turned it down to about 48kb/sec when home in the evenings so that the wife doesn’t notice that it’s chugging away. (She definitely noticed with JungleDisk.. low WAF to be sure!) It, therefore, uploaded the same 30Gb of data in under FOUR days. I even got to tail its log file and watch it upload each file. Exciting stuff, I tell you.

ishot-2.pngBUT, to complicate matters in the mean time, I had started using svn to store my digital images as well, so all of those lovely .svn directories were lying around, and there was no smart way to tell mozy to leave them alone. So, I devised a fairly straightforward workaround: I modified my rdiff-backup job to ignore these files and populated my mozy backup set with the rdiff’d backup set instead. I stagger the cron and mozy jobs to keep everything in sync, up to date and backed up. It works quite well, and I never have to look at it. Ever.

I do, of course, look at it every single day because I’m paranoid. I’d love to say I’ll start trusting it to just keep working, but to be honest, I like knowing for certain that my data are safe in the event of a flood, fire, EMP, etc.

I also installed the windows client at work under a different e-mail account (I only want the 2Gb free service and you can’t use both with the same account) and use it to back up my work documents. We use Acronis at work, but also use PGP whole-disk encryption and I just don’t trust that my drive won’t some day get itself all corrupted in a tizzy. Acronis fails semi-randomly and so far mozy doesn’t, so I’m not going to take any chances with stuff that’s important because, well, that’s the whole point. Besides, mozy’s windows client includes an awesome mapped drive that lets me browse right into my recent backup and grab files as needed. Seriously, when they add that feature to the mac client my backup life will be complete. That was, actually, one of the only things I really liked about JungleDisk.

So, in the end, I only changed direction slightly. I have yet to do any of the other things I needed to do for extra security, though I did lock my mac to my radiator pipes when I went away for two weeks. It made prudent sense at the time, though when I think about it now, it seems silly.

geek habits, lifehacks

Do you ever feel like this?

February 14th, 2008

camel vs carAs the digg submitter said, “I’m betting on the camel”.

This image got me thinking about how this is allegory for bringing new ideas to old organizations. In a thankfully distant past job, I found myself in exactly this situation, trying to innovate where it was nearly impossible to do so. It’s hard when you come up against a camel - they’re hard to move when they don’t want to, but when they want to, they do, and good luck stopping them. It doesn’t matter at all how shiny the car is that you happen to be driving.

My advice to those driving cars in this post’s allegorical world is simple - find a different road. You’re not going to get the camel to leave or move on your own. If there happens to be a camel-wrangler around, you may be in luck, but they have to agree with the direction in which you want to go.

Save that sadly rare scenario, if innovation and newness is important to you, go find some newness somewhere else. I wish I had followed that advice sooner!

geek life, management

Testing Lightbox

February 9th, 2008

I thought I’d play with lightbox a little, because it’s just that cool.

First, a couple of independent images.

Pip on Floor Pip in a Basket

Then, a series of three images.

Nellie 1 Nellie 2 Nellie 3

I did have to modify lightbox.js a tad to give it absolute url paths for its included image files. Other than that, it’s a drop-in enhancement for image viewing.

geek life

Using Subversion to safeguard my photos

February 8th, 2008

During the backup project, I created a subversion repository for all of my installation media and installation files - anything I’d need to set up a new computer. The intention was to have a system that was a solid backup for these data, available for download from just about anywhere. Over the months, I’ve also added other stores to the repository, such as my useful windows standalone tools.

Recently, I thought it would be useful to have all of my digital photos in the repository, both for backup purposes as well as to allow me to, say, have all of my downloaded desktop wallpapers on my machines at work and at home. What better purpose, right? The biggest pain was keeping the repository up to date without constantly needing to issue pseudo-random svn add commands every time we take pictures. (I could use scplugin to make this easier, but as I found out, it kinda sucks.)

Instead, I turned to my love for shell scripting, and fairly quickly banged this out. I used the handy svn status command with impunity to help me handle recursive adds and deletes. Of note, yes, I wish SyntaxHighlighter worked here…

#!/bin/sh

local=’/Users/shelton/Pictures’
date=`date`
message=”Auto-Commit on ${date}”

# Update the local store
svn update ${local}

# Recursively delete all manually deleted files
svn status ${local} | sed -e ‘/^!/!d’ -e ’s/^!//’ -e ’s/^ *\(.*\)/\1/’ -e ’s/ *$//’ -e ’s/ /\\ /g’ | xargs svn rm

# Recursively add all manually added files
svn status ${local} | sed -e ‘/^?/!d’ -e ’s/^?//’ -e ’s/^ *\(.*\)/\1/’ -e ’s/ *$//’ -e ’s/ /\\ /g’ | xargs svn add

# Commit! Comment includes timestamp.
svn commit -m “${message}” ${local}

exit 0

It would be really nice if there were SyntaxHighlighter support for shell scripts. Maybe that’s worth working on myself, eh?

This also required some modification to my rdiff-backup cronjob since, well, I didn’t want to back up every single .svn directory and included files as that would effectively double the backup requirements for that directory. So, I played a bit more with rdiff-backup’s options and ended up changing from this:

45 04 * * * rdiff-backup -v5 --print-statistics --exclude /Users/shelton/rdiff-backup.log --include /Users/shelton/Documents --include /Users/shelton/Pictures --include /Users/shelton/Music --exclude '**' /Users/shelton /Volumes/backup/BACKUP >> /Users/shelton/rdiff-backup.log

to this:

rdiff-backup -v5 --print-statistics --include-globbing-filelist /Users/shelton/cfg/rdiff-backup-files.txt /Users/shelton /Volumes/backup/BACKUP >> /Users/shelton/logs/rdiff-backup.log

This is obviously MUCH cleaner. rdiff-backup-files.txt looks like this:

- /Users/shelton/**/.svn
- /Users/shelton/logs
+ /Users/shelton/VM
+ /Users/shelton/Documents
+ /Users/shelton/Pictures
+ /Users/shelton/Music
+ /Users/shelton/Sites
+ /Users/shelton/bin
+ /Users/shelton/cfg
+ /Users/shelton/.tcshrc
+ /Users/shelton/.vimrc
+ /Users/shelton/.crontab
+ /Users/shelton/.ncftp
+ /Users/shelton/.screenrc
+ /Users/shelton/.htpasswd
- **

That first line, - /Users/shelton/**/.svn, is by far the most important, and took way too much trial and error to get right. Order of statements is, apparently, VERY important for rsync/rdiff-backup. Another note about the above list, I’m now backing up things that I wasn’t before, namely my VM directory, which contains my Parallels virtual machines. It started to make prudent sense, though currently the only VM in there is a very tiny cfg fileset to virtual-boot my BootCamp partition. I’ve started doing several things differently with regard to my home backup, which I’ll have to summarize at some point soon.

code, geek habits, how-to

If I Am Ever a Starfleet Captain…

February 7th, 2008

I will not ask “What does God need with a space ship?” and then order a torpedo strike. I will order the torpedo strike first, and ponder theology on the trip home.

Taken from Viable Paradise. Many, many more funny responses taken right from the biggest, silliest plot holes in just about every Star Trek series. Awesome.

Being a fan of Wil Wheaton, I also chuckled hardily at:

I will not let the Whiz Kid conduct research aboard my ship. If he’s got a theory that he’s itching to test, I will deposit him on an uninhabited planet in friendly space, and make sure that I’m out of the system before he’s done unpacking.

geek life

Reading a book per month

February 1st, 2008

Stephenson, Neal - QuicksilverWhen I talked about Quadrant II, I also mentioned coming up with a long list of goals for things to accomplish over the next few years. Two related goals were:

  • Read one book per month.
  • Read the entire Baroque Cycle by Neal Stephenson

Stephenson is my favorite author. I’ve enjoyed reading (multiple times) every single book that he has ever written or co-written. His latest effort is a three-volume, eight-book set called “The Baroque Cycle”. It starts with the volume Quicksilver, and continues with The Confusion and The System of the World. I picked the first up a few years ago and have tried, valiantly, to get through it on more than one occasion. You see, every other book he’s written is set in the present, pseudo-future or cyberpunk-future. Those genres are fairly easy to read about. TBC, on the other hand, is set in the late 17th and early 18th century - the time of the Royal Society, Isaac Newton and the like.

Stephenson is also very verbose. He’s highly criticized for this, among other things. However, he says the following, with which I wholeheartedly agree:

Personally, I am delighted to read extremely long books, or series of books, as long as they hold my interest.

This is, admittedly, the very reason why it has taken me so long to get into these books. It’s harder to get lost in the verbosity about the old world than a fantastical future one, at least for me. However, in the spirit of killing at least two birds with a single stone, I’ve decided to start out my reading of a book per month with the rest of TBC. Difficult, to say the least, but not nearly as hard as I remember it being the first time. In more recent years, I’ve begun to have a greater appreciation for history in general. So it was none too shocking to find myself more easily engaged by this book now than I was two or three years ago.

I had a fairly solid recollection of the events in the first book in volume I, also titled Quicksilver, so I decided to start off with the second book, The King of the Vagabonds (which is really funny to read when you picture the main character as Johnny Depp’s Captain Jack from Pirates of the Caribbean). I finished it a few days ago, thus getting this goal off to a good start, and went right on into the third, and final, book of Volume I, Odalisque. February looks promising.

I can’t complement Stephenson’s writing enough. I’m never bored and often get lost in the worlds he creates. My only hope is that he happens to have something else coming on the horizon that I can start reading in later months. My backup plan is to read the rest of the writings of another favorite author, William Gibson.

books, geek life

Quadrant I: Delegate or Die!

January 30th, 2008

Urgent and Important

I seriously considered not even writing about the first Quadrant of the Time Management Matrix. I’ve written previously about keeping tasks from sliding down the slippery slope towards becoming both urgent and important, so I figured that I’d already covered my utter hatred for getting stuck working in Quadrant I. That being said, it’s not just about effective planning. Planning will certainly stave off the slide toward Quadrant I, but you can’t prevent every fire.

The best response to a fire? Call a fire-fighter. (Bear with me? I know the analogy is corny.)

As a manager, we can’t try to put out every fire. For folks like myself, who started out their career being the problem-solver, giving up the need to fix things is VERY difficult. I have a constant desire to tinker and a constant desire to fix what is broken. I hope I never lose that entirely. However, if we choose to be the go-to problem-solver, we’ll end up living in Quadrant I. We’ll never sleep, never plan, and never keep all of the other things we have to do later in line.

This is where delegation comes in. As a manager we have people (well, those of you who have been able to completely staff your teams, anyway). These people have jobs to do, but one of the best ways to effectively groom people to succeed and improve is to give them new, difficult things to do. Enter the fire-fighter.

Penelope Trunk, over at The Brazen Careerist, wrote a great post titled 7 ways to be a better delegator. I happen to agree with all seven ways. She also makes a fantastic point about how this relates to mentoring:

Hands-off management isn’t respectful — it’s negligent. People want mentoring and guidance from their manager. If you give that in a way that helps them grow while also treating them with respect, they’ll love having you around. And when your direct reports love having you around, they do their best work for you out of loyalty. Even younger workers — those notorious job-hoppers — are loyal to respectful, hands-on managers.

After reading the article, I was somewhat relieved that I’d figured most of this out already, (though I admit that I try to put out fires every now and again just to remind and be reminded that I still can). I make a real effort to keep my staff from needing to do any of the busy-work or crap-work that has come down the line. For instance, in functional and design specification writing, it makes more sense to have an engineer concentrate on the concepts and communicating them effectively than on document formatting. I can handle cleaning up a document… it takes me only a few minutes to re-format a document in Word, and hey, it’s kinda fun making everything line up perfectly.

Managers have to become ok with being good at silly things so that they can give the fun, interesting and difficult tasks to their employees. This is a two-outcome strategy. If they succeed, two things happen - first, they look good; second, you look good for having good employees. If they fail, it’s a learning experience for them and also for you as you get to find out by example what they’re capable of so that you know where they need to grow.

This is about to lead into a post about mentoring. Maybe another time… I don’t want my new employees who might google me to get all of my management secrets right away.

Back to the central point - handling Quadrant I tasks. If you don’t have someone to whom you can delegate, don’t spend too much time trying to get out of doing the work. It has to get done, and the sooner it’s done, the sooner you can get back to Quadrants II and III, which is where you should spend the bulk of your time. Obviously, if you have an appropriate person to whom you can delegate, you should do it with prejudice! It’s your job as a manager to keep the nonsense things out of the way of your employees. So, by giving them emergencies to handle, they grow, you look (are) good, and everyone’s happy. Eventually, you look like the person who can handle anything that gets thrown their way.

The funny thing about that is that at said point you actually are that person. To me, that’s a great goal. It requires some strategy to how you handle what gets thrown at you, but if you combine that with proper planning, proper prioritization and proper maintenance, you should be pretty effective at it.

management, productivity

Do glasses make the man?

January 29th, 2008

Glasses

Link is to an advertisement for Oogmerk opticians in the Netherlands, which is just brilliant and potentially viral.

(I don’t look like a butcher sans glasses, though admittedly I do look a few years younger!)

geek life