Archive for Category ‘Organization‘

 
 

Naming Conventions the Fun Way

Most people don’t think about what they name their computers. It’s just not important enough in peoples lives to be a question of relevance. But for us programmers who set naming conventions and coding standards, prefering convention over configuration, it seems like the next step to use see how these rules apply to naming other things in our lives. Remember – it’s all about having fun. You wouldn’t have a variable named Batman, but what’s to stop you from naming your computers after superheroes?

Naming Computer at Work

At one job I worked they took naming very seriously, in the fun way. All servers would be named after characters from The Matrix. So we might have a development server called Agent-Smith, or a database server called Trinity. If you’re connecting to a small set of servers, you won’t soon be confused over the names. It’s a great improvement over application-1, application-2, etc if you’re naming a small set of servers. There’s plenty of names to choose from. I wouldn’t recommend using the alternate Agent names though, unless you want to get Agent-Smith, Agent-Jones and Agent-Brown confused.

Desktop computers throughout the office were then named after Transformers. There’s plenty to select from, and it adds a personal touch to everyone’s computer. You could even take it a step farther and couple each computer with a Transformer. :) You could split the office into Decepticons and Autobots if you have a clear divide, and then the two sides can go to war — or something like that. It’s a lot easier to look at the network and see Starscream than “pc-rover-2245″. You can have all kinds of fun with this — big transformers are power computers, flying transformers are laptops.

Naming Computers at Home

My naming convention for devices in my home is largely copied from one of the above. All computers in my home are named after Matrix characters (aside from a few of my girlfriends devices which still need to fall inline). My computers that I use are named after human males – Link and Bane (Bane is the Windows partition on my Mac). Other devices of mine around the house that are named after male programs. So Keymaker is my router, my Drobo is Merovingian, portable hard drive is Seraph, my airport express is Trainman and our shared media center Mac Mini is Persephone (always coupled with Merovingian, you see?). At home you probably don’t have enough devices to really need much in the way of naming conventions, but if you have a few USB drives it suddenly makes a lot more sense.

Table of Elements

I don’t remember where I heard it, but someone mentioned to me that they’d organized their servers based on the periodic table of elements. Domain controllers would be noble gasses, halogens might be file servers, transition metals (which are the bulk of elements) could be desktops used by everyone in the office. There’s a few more groups built in for you to use, so long as you don’t have too many devices. This allows for a little more “professional” sounding names, or at least a different kind of nerdy.

Fun of Functional?

Whether you go with a fun or functional naming convention, or even have one at all, will depend on the atmosphere of where the devices will be. If you have a chance to have a little fun, go for it! Anyone have any other fun naming conventions they use or have heard about? Always looking for more examples.

Snow Leopard Upgrade Not Always Smooth

After reading post after post of smooth upgrades from Leopard to Snow Leopard, I felt more obliged to share my not-so-successful upgrade story. You must remember, if you’ve been using your computer a while, there’s a much greater chance that there’s a problem with it, and that installing a very large enhancement on top of that possibly fragile groundwork might cause issues. Make sure you have some backups (you use Dropbox right?), and that you do a full system save using TimeMachine prior to starting.

What Actually Happened

Insert disc, go through install. Apple products have easy installs right? No doubt there – within a minute it was already copying files over and doing it’s thing. Unfortunately it hit a very odd error “Unable to complete upgrade” with an option to restart. OK, time to restart. Booting up was when the problem hit me though. I saw the normal gray loading screen with the spinner, but it went from that to a complete black screen and turn off. Not a good start. After trying this a few times, I eventually tried holding option on boot, which brings up a boot menu allowing you to select which device to boot from.

With the Snow Leopard DVD still in the drive, I choose to boot from it. It made it to the install window again, and again I gave installing a shot (although much more pessimistic this time). Again it failed, but it suggested I run Disk Utility to verify my drives. Ok, good advice. Luckily you can run these straight from the installer (there’s the default menu bar up top with a “utilities” menu with “Disk Utilities” as one of these. This is the same program you should have available through Leopard. I select my drive, click verify and within a few minutes I see a big red flashing error message that says my drive is corrupt and that I should back everything up using TimeMachine, format and recover an install from TimeMachine. That’s when I realized my first mistake – not verifying the health of my drives before upgrading my OS.

Rather than reinstalling Leopard and upgrading to Snow Leopard, I opted for a complete hard drive format, then installed Leopard on that. It didn’t seem to have a problem installing everything, which was quite a relief. When you think ‘upgrade’ you don’t think you’d be able to get doing from a formatted disk, but luckily Snow Leopard didn’t have a problem with this. Eventually I had a completely clean install of Snow Leopard on a newly formatted drive.

At this time if you have a clean TimeMachine backup you can use it as a starting point to import all your files/settings/passwords/etc. I decided to start from scratch (perhaps it’s the lingering Windows masochist in me), and install only what I need. In not too long I had plenty installed, and didn’t miss what I didn’t know I was missing. The nicest part though, was that with TimeMachine you can just jump in and grab an old file from any computers backup. As someone who hasn’t used TimeMachine very much over the years, it was welcomed relief to backup. Still though, I prefer Dropbox for it’s ability to backup + sync files across multiple computers — but for large files it’s hard to beat TimeMachine.

What I Should’ve Done

Run Disk Utility first to verify disks, and repair them if you can. At least at that point you’ll have one more piece of information on if your Snow Leopard install will be a complete failure or not.

8 Awesome Uses for DropBox

Although only a very small part of my backup strategies post dealt with Dropbox, after using it for a second week I’ve fallen for it. Sure, it’s useful for syncing commonly used files between computers, and there’s many more files that it would be useful to have revision history on, but there’s more to it than just sharing files. With that in mind I’ve been on a rampage to use it for simplifying my life as much as possible. Here’s a few tricks I’ve found that help make things easier.

Backup Folders Not in Dropbox

Right now Dropbox installs itself into a pre-selected location, then everything in that folder is archived in Dropbox. Syncing outside of the Dropbox folder is on the todo list, but for now there’s a workaround to do this. Create a symbolic link within the Dropbox folder pointing to the folder you want to archive. For instance, lets say within Dropbox you want your Documents folder. To do this you’d create a sym link for this.

ln -s ~/Documents/ ~/Dropbox/Documents

Dropbox should start syncing right away, and will sync from here on out whenever. Anything that goes into your ~/Documents folder will be backed up. One very important thing to note is that if you delete something from the ~/Dropbox/Documents folder on another computer, it will be removed from your ~/Documents folder on the computer with the symlink, so keep that in mind.

Syncing Adium Log Files Between Macs

So you’re looking through chat logs for a conversation you know you had, but you can’t seem to find it. Turns out it was on a a different computer. Has this ever happened to you? There’s a convenient way of syncing Adium log files (or any other log files) with Dropbox. Adium doesn’t allow you to change your Log directory, but there’s no reason why you can’t make the default location a smylink to somewhere else. I have a ~/Dropbox/Sync directory where I store any settings/items that I want to keep in Sync between computers, so this is the perfect place for it. I created a ~/Dropbox/Sync/chat folder, quit Adium and dragged my existing Adium logs folder into Dropbox (from /Users/adam/Library/Application Support/Adium 2.0/Users/Default/Logs). All you have to do is point a folder at your Dropbox and you’re good to go! In my case, the command was:

ln -s ~/Dropbox/Sync/chat/logs/ "/Users/adam/Library/Application Support/Adium 2.0/Users/Default/Logs"

Just setup multiple computers with this same path and you should have a single repository for all your chat logs. I’m not too sure how this works with conflict resolution, but unless you’re chatting to the same person on multiple computers at the same time you should be good. If you’ve tried that though, I’d be interested to see how it works.

Backup configuration

This was mentioned earlier, but having a shared space for your backup scripts makes life easier. Dropbox is amazing, but the Dropbox application does have the ability to delete files from your computer. Lets say the worst happens and they delete your account, causing your Dropbox to be deleted on all your computers — would you mind? If you have your ~/Documents and other folders linked, this might be a huge blow to lose unless you’re backing it up somewhere. This same doomsday scenerio could happen if someone hacks into your Dropbox account and removes your files from the web interface. You’ll probably be able to restore them in that case, but then you’re relying on Dropbox to fix the Dropbox problem.

A more secure way of handling this might be to have a full copy of your Dropbox somewhere locally. With Dropbox maxing out around 55GB, making a full copy of this on some HD you have laying around isn’t a bad idea. Automating the process and backing up your Dropbox nightly is even better though! So what would something like this look like.

rsync -rpLtgoDE --delete ~/Dropbox /Volumes/Drobo/Users/adam/current

This rsync command will copy everything from my Dropbox to a local directory, in this case on a Drobo. This follow all symlinks and copy the contents of them, rather than copying the symlinks themselves. Try saving this one line in a file, backup.command. You should be able to run it by double clicking or from terminal. I store this file in ~/Dropbox/Sync/scripts/backup.command so it can be edited from anywhere.

Version your crontab

You don’t want to run that backup script manually everyday do you? To save time (and guarantee a good backup strategy), you’ll want to have this automatically run. I’ll recap real quick how to set this up. Just open up terminal on the computer you’ll be automating the backup. You can call things on a scheduling using cron, which can be opened by entering crontab -e. I’ve decided to run the above script every day, and backup my list of cron jobs every day.

@daily crontab -l > ~/Dropbox/Sync/scripts/crontab.txt
30 3 * * * sh ~/Dropbox/Sync/scripts/backup.command

The first line will save the crontab contents in the ~/Dropbox/Sync/scripts/crontab.txt file. The @daily parts means this’ll happen every night at midnight. The second line is scheduled to run every night at 3:30am as well, but usually takes a little longer. Rsync isn’t the fastest in the world, but it’ll get the job done — usually in under a minute for me.

Sync Your Things Tasks

For a while during the beta, Things was my GTD/todo list of choice. The interface has a level of polish that few apps obtain — and even fewer in the GTD relm where complexity is the norm. One downside of Things is that it doesn’t use MobileMe syncing like OmniFocus, it’s competitor. You can get around this and use your Dropbox for syncing in the same way as Adium though. Just close Things and move your Things database files folder to your Dropbox on one computer — I threw it in ~/Dropbox/Sync/Things. Create a symlink from where it used to be to the new Dropbox location and you should be good! You’ll need to do this same step on your other computer(s), but without the copying the file to Dropbox step. This does have a caviat though — you must close Things each time you switch computers. Unlike Adium, when there’s a conflict, well it’s very bad. Your Things database is a single XML file that cannot be merged. So be sure to always close Things when you switch computers to be safe. If anything goes wrong though, you can always sign into the Dropbox web interface and roll the file back.

Or you could just use Remember the Milk and not have to worry about syncing.

Host a Local Wiki

TiddlyWiki is a Wiki unlike any other I’ve heard of. It has all the storage characteristics of a normal wiki, but exists as a single html file that edits. Just copy it to your Dropbox, open it up in Firefox (you are using FireFox right?) and start making changes. Upon saving it’ll update the file in Dropbox. As with a few other tips, you probably shouldn’t have TiddlyWiki open on another when saving. If you’ve jumped on the TiddlyWiki bandwagon but you’re using a USB drive to transfer your Wiki around, Dropbox is a simple upgrade to save some time.

Sync your Passwords

I don’t personally use any sort of password manager, but LifeHacker has a good article on How to Use Dropbox as the Ultimate Password Syncer. According to the Lifehacker article, changes are pulled in right away, even when using multiple computers. This is because 1Password, the password manager used in the article, stores your data in lots of little files, making it ideal for minimal conflicts.

Sync your Firefox Bookmarks

Firefox bookmarks are another one that seem like a no-brainer to use Dropbox for. There are so many different bookmark sync services out there that can do this, but why use another service when you’re already using Dropbox? The basics for this are just copying your firefox profile to Dropbox, then starting Firefox with the -p option which allows you to specify a profile path. Just follow the directions on how to Sync Firefox Bookmarks from the Dropbox Wiki and you should be good. This tip doesn’t use symlinks like a number of others, making it a little easier to setup.

Join Dropbox

Dropbox provides 2gb of storage out of the gate, but if you signup with a referral link, you’ll get an extra 250mb of space (and I’ll get an extra 250mb too)! The desktop app works on Mac, PC and Linux with a very simple install on all of them. If you join up and have any other tips or tricks, feel free to share them here!