Tuesday, November 30, 2010

The decimation of language

This video is awesome, but not just in the creativity (you really have to stick around until the very end to see it's full awesomeness). The phenomenal Steven Fry's point about the intractable disdain some people have for failures in grammar and expression is provoking at a fundamental level for me.



I admit it, I still bristle when I see a sign saying "thank's for your support". And, seeing pictures like this still causes me to guffaw a bit:



But, as someone who studied Linguistics during his brief college career, I also must acknowledge that language is about communication. Grammar, spelling and punctuation rules are nothing more than arbitrary conventions created for the sole purpose of greasing society's linguistic needs. They don't do a whole lot to convey meaning in and of themselves. As Steven points out, we all still know what "10 items or less" means, even if it's proper to say "10 items or fewer". Frankly, how many of us even knew that "10 items or less" was wrong before watching this? I confess I didn't.

Funny as it is, "We out of meet" still conveys the message intended. It did so with a humorous flourish, I won't dismiss, but meaning was still conveyed. Only those who choose to be scrungent, when faced with a grammatically incorrect but symantically valid sentence, will fail to understand...

No, I'm wrong. They'll FEIGN ignorance while fully grasping the concepts presented, but bemoan loudly to everyone trying to ignore their rants that they just don't understand "how someone could be lacking in the becoming acquainted with?"

To me, even worse are those who still can't grok that meanings change. Anyone who has read ANY Shakespeare knows that between Bill's time and ours our language has evolved slightly. They manufacture* extensive artificial* complaints about how awful* the latest generation's understanding is. If they're feeling brave* enough, they'll tell* you to your face how you're an example of our declining civilization. Yet, I have to wonder how they would read THIS paragraph, seeing as I chose a few common words whose meaning has become quite different from its original intent. I wonder, too, if they'd read the title of this article to mean "the utter destruction of language"?**

Perhaps they're just nice***?

There are currently two major wars in effect, not to mention a few minor border skirmishes and disputes and a couple of completely insane dictators who seem to think they own the world. The economy's collapsed, and while it shows some signs of rebound the fact is it's only going to continue to get a lot worse overall since people keep voting in the same dimwits who created the messes in the first place. The Earth's climate's being forced to change in new and terrible ways. A billion people in the world don't have access to clean drinkable water or a consistent source of food...and yet there's still a large percentage of people who will read this paragraph and complain about my excessive use of ellipses and/or commas.

Seriously, it's time to worry about more important things, don't you think?


* Manufacture: to make by hand. You thus can't "manufacture" an argument. Artificial: full of skill. Awful: wonderful, amazing. You know...full of awe. Brave: cowardly. No, really. Google it. Tell: to count. Now you know why they're called "tellers" at the bank.

** Decimation: a form of military discipline used by officers in the Roman army for punishment. After conquering a country or town then would line up all of the people who lived there. They would then kill every tenth person; man, woman or child. Just enough to make a point without, ahem, decimating the resources of the Roman Empire.

*** Nice: In Latin it meant "not to know". A nice person was an ignorant one. Hmmm..

**** Bonus: scrungent's my word. I made it up. :)

Wednesday, November 24, 2010

Thankful? Me? Duh!

Of course I'm thankful! How could I not be? First, I've got the greatest wife in the world. She really is magnificent. She's brilliant, she's talented, she's funny and she loves me (for whatever reason). That's not to mention that she's also drop dead gorgeous and a fantastic mom to our beautiful, intelligent and hilarious daughter..

Whom I'm also thankful for! Holy crap, I had always thought being a parent would be a lot of hard work and sleepless nights. Hmmm, maybe that's more true for my wife. After all, I was mostly in it for the spankings. But, Maeby's really made me realize how awesome it is to be a parent. Granted, I think we were really lucky and got a really good kid. I'm sure my mother would have plenty to say about the ease of raising one like me. I'm thankful her curse of "I hope you have a kid who's just like you" appears to have not taken hold. In general, that kid of mine is pretty laid back and usually listens when you tell her to do something. Usually.

I'm also grateful for my family, as annoying and wacky as they can be. They certainly add a whole lot of "color", and I'm not just talking about my father's side...

And then there's my friends, some of whom we're spending the day with tomorrow gobbling down a gobbler. But, there's some new and truly wonderful friends I've met as a result of TEDxRochester...which I'm also thankful for, but only when it's over. :)

All in all, I consider myself a very lucky guy.

Monday, November 22, 2010

Dropbox: spreadin' the love, gettin' the space

Today a couple of odd posts showed up on my Facebook and Twitter pages about my favorite online service, Dropbox. (Note: the previous link is a referral link to Dropbox. More on this in a bit.) This is because Dropbox recently put up a page where folks could get up to an extra 768M of space by doing some simple social media connection stuff.

I've talked about Dropbox before, but it still never ceases to amaze me how many times I find new uses for it. Let's look at a few of the ones I've been using:

- There's a folder called "Torrents" in my Dropbox. I've also installed Dropbox on the server I have at my house running uTorrent. uTorrent monitors this folder and when new torrents show up there, it starts downloading them. So, I just download a torrent into that folder from any machine I'm logged in to and I'm good to go!

- If I need to get a file into my new EC2-hosted Ubuntu box, no worries. I've got the text-based install on it and I just drop them into there. Also, if I need to do major edits on config files, I can get them to my desktop quickly.

- Thanks to some of Dropbox' partners, I essentially have an extra 4G on my iPhone now. More and more mobile apps are using Dropbox for back end storage because it's easily accessed and ubiquitous. I've held off until now, but I'm finally upgrading to iOS 4 simply to give Picbox a try. But for now...

- When I have a quiet moment at the office, I plug my iPhone into my laptop and dump all current photos from the phone into my Dropbox folder so they're ready to be organized when I get home.

- Still in the works: I've got Portable Firefox out there. I've put in a master password, so my passwords are encrypted and thus protected from prying eyes @ Dropbox. I'm in the process of setting up the instance of Firefox on my laptop to use the profile directory that's in the Dropbox folder so I have one universal Firefox profile across machines.

- When I first started my new job, I had some coding work that they needed me to do for my old team. Unfortunately, I didn't get Visual Studio with my new machine and didn't have rights to install it. So, I used an online service to take control of my home machine's desktop and did my changes there. Once the code was compiled, I plopped the executable into my Dropbox and was able to get it back to my team.

- My wife doesn't have a lot of data she keeps on her machine. In fact, almost all of it fits within her 2G of space, so I have her keep all of her files in the Dropbox folder on her machine. Tada! All of her files are backed up as soon as they're created!

- Dropbox also keeps old versions of files. There's been a couple of times where I saved a file and overwrote an original I didn't want to change. No biggie, find the file on the website and click "Previous versions" to get the older instance back. Lifesaver!

I'm sure you can find plenty of other uses yourself or at least find dozens of solutions other folks have come up with. I've looked at some of the other services that are out there, but I just keep coming back to Dropbox for its ease of use and ubiquity. Here's a quick start guide to get you up and running with tons of space as quickly as possible:

1. Hit Dropbox' site. That link is a referral which will give both you and I an extra 250M of space in our accounts once you've installed the software.

2. Download and install a client on your machine. At this point, we each get our extra space. Total space: 2.25G

3. Revisit your Dropbox home page. At the top of the page, you'll see a set of tabs (Getting Started, Files, Events, Sharing, Help). That Getting Started tab is where we're headed next. Go through the steps listed and you'll get an extra 250M of space! You don't have to do all of them, I'd start with 1, 2, 3, & 5. I think those were all I needed to do to get the extra 250M. Total space: 2.5G.

4. Head to the new Free page and do each of the steps listed. Once you're done, you'll get up to an extra 768M of space for free. If you're not happy about exposing everything to Dropbox on Facebook or Twitter, simply deactivate the application's access once you're done. The free space will stay. Total space: 3.328G.

5. Get referrals. At that link, you'll find your referral link that you can give out to friends and family for more space. You can get up to an extra 10G of space this way. Please be aware of some etiquette. There are a number of sites like Lifehacker that will ban you if you post your referral link in their comments. A lot of people take advantage of their Dropbox-based posts to try and drum up some space, and the comments become useless because of it.

Also, the URLs posted to your Facebook and Twitter pages after you do step 4? All of them are referral links to your account. So, once you've done that step, you've also put out a couple of requests for referrals. How cool is that?

Thursday, November 18, 2010

The new "paper or plastic"

A friend recently posted the question on his Facebook page "Nook or Kindle?". Some folks offered up useful advice, but just as many felt the need to chime in with "REAL BOOKS!!" Sigh...

I often wonder about people who get upset when new technologies supplant the old. Do they still have rotary phones? Hell, do they still have a land line? When Verizon stops automatic delivery of phone books, will they call to get one? It's been a decade since I've even had one of those in my house. When I come home and find them on the porch, they go right into the recycling bin. I have an iPhone, why do I need a phone book? To quote the song, I've got the whole world in my hand. These strike me as the same kind of people who would've dwelt on the "loss" to society when cars replaced horse-drawn carriages.

As someone who is a habitual pack rat, even I see the value in not holding on to the past. My comic books are stored in digital format, along with my documents, ebooks, pictures and movies. As pointed out in an earlier article, if there's a fire in my house, I won't lose a single picture of my daughter. Can the Luddites say the same?

Look, I get it. There's a certain romanticism about books. Back when I had time in my days, I used to read as well. I love to read, but the reality is, actual books are inconvenient. Electronic books and publishing is the future, so you might as well start dealing with it. The last couple of books I've purchased were both ebooks. I read them on my iPhone when I had a moment or two. There are times I feel like putting the effort into finding pirated digital copies of every book I have and ditching the paperware versions. It would certainly make my wife happy, and certainly make moving a whole lot easier when the time comes.

And since some will wonder, my response to my friend's question was: iPad. Before the "fanboi" accusations start flying in, yes, I have an iPhone. But, I won't be going back to an iOS device for my next phone, I'm going Android. The Apple platform's just gotten far too restrictive and I have no interest in dealing with it anymore. However, an iPad wouldn't be my primary device so I could live with some level of restriction there. For my friend, for just a little more than the cost of either dedicated device, he could get an iPad, install both the free Nook and Kindle apps as well as a host of other apps and get a much better experience. I've seen the iPad's book readers, they're fantastic. The iBook app is brilliant, you really feel like you're turning a page with it. Personally, I'm waiting for the second gen of the iPad (With a camera, please, Steve! Seriously, what were you thinking?), but there's no reason the first gen can' t be a primary ereader.

Nope, I know I'm a technophile and I know others are not. But, when someone's making a decision between two new technologies, they're obviously not interested in hearing that they're destroying civilization and should stick with the old stuff. Because, really, that's what these people were saying. These kids these days and their new-fangled ebooks...

Tuesday, November 16, 2010

Top o' the EC2 ya!

So, things have been a little quiet here lately. Most of the blame can be placed on TEDxRochester, of course. But, now that it's over, life is slowly starting to return to normal and I'm returning back to my projects. As you saw from my last post, I still continue playing around with Ubuntu, but aside from just my laptop getting my attention I've added a new Ubuntu project.

A few weeks ago, I learned that Amazon was opening up a free tier to their Amazon Web Services. Now, I haven't wrapped my whole head around the platform yet, but it really is an amazing suite of products and offerings the big "A" has put out there. In a nutshell, AWS is a virtual hosting service, commonly referred to as a cloud service.

AWS is made up of a couple of offerings, but the one I'm currently spending the most time on is the Amazon Elastic Compute Cloud (Amazon EC2), their virtual machine hosting service. I've actually got a virtual machine running Ubuntu Server out on their hardware. In fact, you're visiting it right now! Amazon, and other members of the AWS community, provide base images that can then be built on to establish your own presence on the web. As an example, this machine is built from AMI-00877069. This is a Canonical-provided Amazon machine image (AMI) of the Maverick Meerkat (10.10) version of Ubuntu Server. Simply select your AMI, launch your instance and you've got a machine in the cloud!

From there I added Apache, MySQL, Wordpress, etc. These machines are not accessible from the Internet immediately, though. They exist on a private 10.x.x.x subnet, but Amazon provides what they call their "Flexible IPs" which are nothing more than externally accessible IPs that you can then map to your "box". What's even nicer is Amazon provides you with a dead-simple firewall setup to decide how accessible your systems are. You can create groups to segment ("Web" group is accessible on port 80, but incoming mail servers on 25 only) and open up only what you need.

Since I'd already registered the domain, all I needed to do was modify the DNS at my registrar and I was on the web! In fact, if you want to visit my wife's site and get yourself a zombie portrait done, that too is hosted on this virtual box.

As mentioned, I haven't really dug too deeply into the full offering set, but as I find need I check it out. Most of the services are geared to the web developer/web applications crowd. For example, the SimpleDB service allows you to host your database at Amazon without having to worry about the details of administering a database server. Put your data in, pull it out as needed. Next on my list to work with is S3, their cloud storage solution. There's apparently a bug in their console that makes it inaccessible to browsers using the newest Flash, and so I haven't fiddled much with it.

So, aside from giving me yet another toy to play with, what's the market for Amazon Web Services? The answer: the sky's the limit. I first became aware of EC2, for example, when checking out web hosts for the domains my wife and I needed. A number of the more inexpensive hosts proudly boast that they're hosted at Amazon. Quite a few of the newer "Web 2.0" (are we still using that term?) services also are hosted here. Think about it: you want to run a web host or a web-based application, but you don't want the hassle of a server farm. With Amazon Web Services, you simply fire off instances as needed and manage your entire infrastructure from your living room in your PJs.

You also can provide your customers with a level of scalability that's difficult for even the most experienced admins to provide (said as an admin who's had to provide those levels of scalability!) You can, for example, start with a single instance to handle traffic. As traffic expands, you can configure AWS to fire off new instances of your hosts to handle the load. As the load decreases, the instances are shut down. How cool is that?

I've spent some time in my career working with VMware and Citrix XenServer farms, and Amazon Web Services is that to the next level. In the IT world, virtualization's the big buzz now as you can provide your end users with scalability and availability that was never before possible. Amazon's made it easy for anyone to tap into that power with nothing more than a web browser. But, beyond all of that, the services are CHEAP! A "small" instance, which is a VM with 1.7G of memory will run you about 8.5 cents/hour. That's about $60/month. You can barely lease a physical server for that much, and when you add in costs for electricity and maintenance, Amazon Web Services is a steal.

As I mentioned, I'm taking advantage of the free tier that's being offered right now. New AWS customers can get on this tier for 12 months. This includes:

- 750 hours of Amazon EC2 Linux Micro Instance usage (613 MB of memory and 32-bit and 64-bit platform support) – enough hours to run continuously each month

- 750 hours of an Elastic Load Balancer plus 15 GB data processing

- 10 GB of Amazon Elastic Block Storage, plus 1 million I/Os, 1 GB of snapshot storage, 10,000 snapshot Get Requests and 1,000 snapshot Put Requests

- 5 GB of Amazon S3 storage, 20,000 Get Requests, and 2,000 Put Requests

- 30 GB per of internet data transfer (15 GB of data transfer “in” and 15 GB of data transfer “out” across all services except Amazon CloudFront)

- 25 Amazon SimpleDB Machine Hours and 1 GB of Storage

- 100,000 Requests of Amazon Simple Queue Service

- 100,000 Requests, 100,000 HTTP notifications and 1,000 email notifications for Amazon Simple Notification Service

Now, even if you're a seasoned IT pro you're probably wondering what some of those things mean. The reality is, Amazon has come up with their own phrasing and terms for some things, so you really have to dig in yourself to see. For me, though, having that free virtual machine is more than enough reason to give it a try! Keep in mind, though, it's free for a year. After that, it's 2 cents/hour to run your box. Oh, my, 2 cents/hour! That's $15/month! Told you...holy crap this is a cheap service!

Now, if you're going to sign up, learn from one of my big mistakes: don't just grab an AMI to launch. There are two types of instances you can use, a standard EC2 one and one that's EBS-backed (Elastic Block Storage, part of the Amazon S3 services). Non-EBS instances are temporary only. If you shut the machine down, even to reboot, it goes away permanently. It's designed for scenarios like I mentioned above: firing up new, temporary instances for handling load. Is there anything more fun than rebooting to install updates only to have all of the work you've done vanish into the ether? Yeah, pay attention to your AMI types, people!

When you choose to launch your first instance, select the "Community AMIs" tab and select "EBS Images" in the dropdown and go from there. If you're going to try out Ubuntu, stick with the official Canonical-provided images. These all come from user 099720109477, so you can just search for them. You need to remember to add an Elastic IP to it and at least open up port 22 so you can SSH in later, but beyond that...you're done (assuming you remember to make it a Tiny instance). Build your box and go. Don't want to be limited to Server? No reason you can't build a full desktop accessible everywhere. :)

You also have options to run Windows boxes, but you cannot get them in a Tiny instance, so they're not free. But, it's doable! As I learn more about the services and offerings, I'll be posting my findings and learnings. I've also learned tons about managing Apache, MySQL and Wordpress that I'm looking to share, too. For now, give it a try! It's FREE!!

Sunday, November 14, 2010

Lazyman's back up - the only kind that works! (Part 1)

Backup and backup often, right?  We all do it, don't we?  Yeah, I didn't do it for a while, either.  I did get better at it once my daughter was born.  Those pictures of her first few years of her life are irreplaceable, so I became diligent in ensuring they were as safe as I could make them. Since I had a machine in our living room that served as our media center and file server, I would backup to that.  When out of town, I'd always have my laptop with me to serve as my "offsite backup".

The problem was, I did everything manually and that's the fastest way into Mistakeville I've found (Most folks take I-380S and then get off at Exit 19. That's the long way). Whenever I'd want to backup, I'd look to see what backups I had out there on the network. Since I did it haphazardly, I'd have a few different copies of previous dumps from my laptop. Since I never knew what was the most current version, I'd just create a new dump. At one point I had about a dozen copies of the same data occupying half a terabyte of drive space.

It was absurd, and I one day I finally decided to get it under control. I went through and consolidated them as best I could as I MOVED them from the server onto my laptop. At that point, the laptop contained the master copy of my data. I then used Microsoft's Synctoy to sync it back to the server. Synctoy gets a bad rap from folks, but it really is a simple and easy to use tool. I created a sync pair for my data and once a week scheduled it to run automatically. I kept my backups down to just one copy and life was good.

Fast forward to today.  New OS means new paradigms.  Since the laptop's been traveling with me a bit more, using it as an off site backup still works.  But, there might come a time where I'll want to leave it at home when I'm at work.  Worse, if there's a disaster in the house (more on this topic at another time), I'm probably not going to make an effort to get my laptop!  So, I need an additional backup I can keep permanently out of the house.  Since I had an extra 200G hard drive lying around, and that's more than enough to hold my REALLY critical data, I ordered an inexpensive USB enclosure to put it in.  Once a week, I'll bring it into the house and do a backup, but the remainder of the time it will live in the car.  I need to figure out how to handle the very cold winters we have 'round here, though.  A week in the car could get it down to absolute zero!

That's a detail for another day, though.  Today, we just want to get it setup so I can use it to backup my laptop quickly, easily AND securely.  This drive's going to be in my car, so there's always a chance it could "disappear" one day.  I don't want my data so easily absconded with!  Fortunately, there's an easy solution: Truecrypt.  A free, open source encryption application.  It's cross-platform, so no matter where my brain leads me in terms of OSes in the future, I'll be able to read it.

Installing on Ubuntu's a doddle: download from here, follow the instructions. Now we create an encrypted volume. I'm not going to take you through this step as Truecrypt's docs are top-notch. I will mention that I created the volume on my Windows box and I did so for a reason: I wanted it formatted as NTFS. My plan is for this to be accessible regardless of the platform or machine I plug it into. NTFS support has become much more ubiquitous, so that's the route I went. I could've probably gotten it formatted with Ubuntu, but it was simplest to just plug it into a Windows box and do it. The final detail: create a keyfile for the disk and tell Truecrypt to use it. You'll see why later, but for now Truecrypt's docs on keyfiles are the best place for a howto.

Everything's in place, now we just need to make it really easy to use.  First, I create a couple of scripts to automate the process with.  I'll be writing a number of scripts to manage my machine with, so I'm creating a .bin directory in my home directory. Since a lot of these scripts will be for automated processes, I'm going to hold off adding it to my PATH for the moment.  Also, I'm putting it in my home directory instead of /usr/bin for a reason which you'll see with the first one I write for this process.

We start it with: joe ~/.bin/mountrose


#!/bin/sh

truecrypt /dev/rosewill1 /mnt/rosewill --password=ComplexPassword --keyfiles=/home/tonyk/.bin/rosekey --protect-hidden=no --fs-options="uid=1000,gid=1000"

rm -rf ~/.bash_history
history -c


Yes, I use joe.  I like joe.  You also now have one question and one complaint, I think: the maker of my external drive enclosure is named Rosewill and I'm not worried about putting the password for the volume in the script because my home directory is encrypted.  If someone were to steal my laptop and the enclosure, they'd have to decrypt my home directory to get this script to get my password to get it open.  Of course, at that point, they have the primary of the data anyway.  The makers of Truecrypt do make a good point we have to acknowledge.  If someone should get onto my machine while it's backing up, they could see the whole command line passed to the Truecrypt process and thus be able to get it that way.  Again, at that point my machine's been compromised while I'm logged in with the home directory decrypted.  I'm done no matter what. Since the plan is for this to be plugged in once a week for only a few minutes, I'm not as concerned about this particular security issue.

So, this script mounts the encrypted partition we created before and then wipes history to make sure there isn't a trail with my password, just in case.  When I started playing around with this, I thought I'd be able to just use the password option on the command line, but I found it absolutely would not work unless I put all of the other options in, including using a keyfile. I don't know why that is, nor do I feel like digging far to find out. The remaining two options included:

--protect-hidden=no tells Truecrypt that there's no hidden partition it needs to be concerned about

--fs-options="uid=1000,gid=1000" tells it to set the newly mounted volume as owned by my user account so I can work with the files.

We need another command to unmount the disk when backup's done. As mentioned above, I'm not adding my personal .bin directory to my path until I'm sure I need it, and the command to unmount is only one line, so I decide instead to create a Bash alias. Append the following to the end of your .bash_aliases file:

alias urose="truecrypt -d /mnt/rosewill"

Now we have the mounting and unmounting of the disk automated.  Of course, being the lazy fellow I am, I certainly don't want to have to TYPE these commands when I want to back up.  I want it to do even that trivial task for me.  S'okay.  Computers are here to do our work for us, remember?  Besides, having the computer do this means I literally have to remember to plug the thing in once a week.  Hmmmm...I think I just came up with an excuse to build a robot!

Back to the matter...how do we automate this process?  Fortunately, this part's trivial.  We write what's known as a udev rule. udev is the Linux subsystem that detects hardware and creates device nodes for them. When you plug in a device hot, udev reads its pre-defined rules to determine what to do with it. We're just adding one of our own that's particular to this single, unique device. First, we find out the perts* about the drive by plugging it in, turning it on and using udevadm to find out more info:

udevadm info -a --name=/dev/sdb

This will give you TONS of useful information about your drive, but we only need a little bit. Specifically, I need to know the manufacturer and model number of what just got plugged in so I ensure it's the disk I want and not some USB flash drive or something. Now, you'll notice this info is broken up into sections that begin "looking at parent device". This is because udevadm looks at the device and then everything that links this device to the OS. Since this is a USB enclosure, that means: the IDE-USB interface, the USB interface, the USB hub, the USB-PCI bridge, etc, etc. I'm most interested in the section below. Keep in mind, when you're writing udev rules, the attributes you're looking at must all reside in one of these blocks. You can't pull the vendor attribute from the SUBSYSTEMS="usb" section and the model from the SUBSYSTEMS="scsi" one. The reason I chose the block below is because that block had all of the relevant data I need.


looking at parent device '/devices/pci0000:00/0000:00:0b.1/usb1/1-1/1-1:1.0/host6/target6:0:0/6:0:0:0':
KERNELS=="6:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{device_blocked}=="0"
ATTRS{type}=="0"
ATTRS{scsi_level}=="0"
ATTRS{vendor}=="Initio "
ATTRS{model}=="WD2000JB-00EVA0 "
ATTRS{rev}=="1.06"
ATTRS{state}=="running"
ATTRS{timeout}=="30"
ATTRS{iocounterbits}=="32"
ATTRS{iorequest_cnt}=="0x48"
ATTRS{iodone_cnt}=="0x48"
ATTRS{ioerr_cnt}=="0x1"
ATTRS{modalias}=="scsi:t-0x00"
ATTRS{evt_media_change}=="0"
ATTRS{dh_state}=="detached"
ATTRS{queue_depth}=="1"
ATTRS{queue_type}=="none"
ATTRS{max_sectors}=="240"


We now have all we need to create a rule. First, su and joe /etc/udev/rules.d/10-local.rules. We only need one line for this:


KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="Initio", ATTRS{model}=="WD2000JB-00EVA0", SYMLINK+="rosewill%n", RUN+="/bin/sh /home/tonyk/.bin/mountrose"


What that's saying is "when you see a device that the kernel labels a scsi disk, from the vendor Initio with this model number symlink its devnode as rosewill. Also, since this is a disk, symlink the devnodes for each partition as rosewill1, rosewill2, etc and then run the script /home/akarakas/.bin/mountrose using /bin/sh".

So, why do we do it like this? Let's say, for example, I've plugged in a USB flash drive prior to plugging in this hard drive. There's a chance that flash drive might become /dev/sdb and my backup hard drive /dev/sdc. Can't really write a script for variable disk names, now can I? By setting up the udev rule in this way, this disk will ALWAYS be accessible via /dev/rosewill and its partitions via /dev/rosewillX. I don't need to poke and prod as part of my script, I'm always going to have the right devnode. As to why I launch the script this way, for some reason a bash script doesn't honor the shebang properly when run by udev. I could not find any way to run this script by simply calling it. No biggie, it works.

And now, the moment of truth...plug it in, turn it on and...../mnt/rosewill is mounted, and I can see and modify the files. Woo hoo! Now we have my media setup! Kewl!

At this point, I'm going to conclude this article and leave the remainder for Part 2. In that article, I'll present the full script the system runs when the disk is plugged in and reasons for some of the choices I've made.

*perts = Pertinent details.  I'm trying it out, what do you think?

Tuesday, November 9, 2010

Happy birthday, Carl!

I think it's safe to say we all have defining moments in our lives.  Those moments when something happens that directs the course of the remainder.  The first one I remember came in the latter part of 1980 when I was 10 years old. I was going through the dial on the TV (It was 1980. Yes, it had a dial!) when I glimpsed just a second of this:





"What the heck was that??" I thought. I quickly turned back the dial, but that image of some blob floating around a DNA strand wasn't there anymore. I assumed it must've been on PBS, because even in 1980 none of the major networks had quality programming. I turned back and watched the remainder of a promo for a new series called Cosmos by astronomer, author and poet, Carl Sagan. For the next 13 weeks, you could find me every Tuesday night from 9-10PM eyes glued, unblinking as I stared up at the TV from the floor.

Prior to Cosmos, I was a science geek, sure. But, after Cosmos my life was radically altered. I was introduced so early to the scientific method and critical thinking, how could that not have a profound influence on me? It certainly had an effect on my schooling since I was enrolled in a Catholic school at the time. I found my religion classes to be interminable bores once I learned to apply even basic critical thinking to them...."Really? You really believe that?" was a sentence I found myself quietly asking the nuns as they'd prattle on.





But, this is about Carl, and the impact he had on my life. I learned so much from that first series that I followed along with his other books; The Demon Haunted World and Pale Blue Dot being two of my favorites. In high school, I was fortunate to have taken a class in my senior year called "Science Odyssey" in which we watched Cosmos along with classics from James Burke such as The Day The Universe Changed and Connections. These would be followed up by discussions in later classes along with assignments for reading and further discussion. Never before and never since have my days been filled with conversations like that!

But, then I made the biggest mistake a person can: I decided to take a year off before going to college. Which turned into two, then three, then four...it wouldn't be until 6 years after high school that I'd finally be enrolled in a science program (Cognitive Sciences @ the University of Rochester), but by then it was too late. I didn't have the funds to finish and had to drop out. The saddest part of that time was I found out that Carl Sagan was coming to UofR give a lecture. I found out the day of. That was in 1995 and he died a year later. He would've been 76 today. I did get to see his limo, though. His license plate was "COSMOS".

The Internet will filled with people saying things about Carl and the influence he had on their lives, more likely doing a better job of it than I...most certainly will have probably accomplished a bit more due to his original influence. But, he influenced me as well, and I am thankful to have decided to turn the dial back that day. The lessons I learned I hope to one day pass on to my children, assuming my wife doesn't "artist" them up too much. :) Perhaps they'll one day do great things thanks to those lessons. His wasn't a life lived in vain. Because of his passion and poetic nature, he inspired so many people to enter scientific fields that it is impossible to calculate the good that has been done in his honor.

I leave you with one of my favorite videos. Whenever I am feeling down, or feel that world has gone insane (which happens far too frequently lately), I need only watch this and get the strength to carry on and fight the good fight. Perspective is always important, and there's no better group than astronomers to give it to you!



Thursday, November 4, 2010

And sometimes, you make 'em happen

TEDxRochester 2010 was on Monday and I have to admit, it ROCKED! Really, though, surprise is unwarranted. We put together a fantastic speaker lineup and the caliber of attendees we had registered was just so high.

Yeah, right. It's so easy after the fact to say you knew everything was going to go well, but had you asked me even just minutes before the first attendee walked through the door I would've told you I was ready to collapse in terror. Last year was such a great event, we had a high bar to jump. But, somehow we managed.

From the moment Alemeta Whitus started her song of welcome to bring us into the event, to Shantarra Randall's poem to close out the day, pretty much everything went according to plan. Of course, not everything, but nothing we couldn't deal with or learn from for next year.

I've been asked by a few folks to point out my favorite moment of the day, but I don't have just one. Let me share some of my faves:

- One of my close friends brought his 12-year-old son to the event, and he was a networking machine. He must've walked out of there with 40-50 business cards. If he didn't meet everyone at the conference, it wasn't for lack of trying. Good for him to learn that lesson early. None of what we've done so far at TEDxRochester could've been possible without our team members constantly networking around town.

- Moka Lantum's talk. Not just because of the content (I must confess I wouldn't mind building and living in one of his eco-domes), but because of the man himself. Apparently we'd forgotten to tell him he needed to memorize his talk. On Saturday night, he found that out and was terrified. He stepped up, though, and rocked the house with his talk. I had told him on Saturday that I wasn't worried about him, though, and my faith paid off!

- Ralph Spezio's talk, of course. Ralph was the highlight of the event for a lot of people, and the standing ovation he received was very well deserved. Ralph is an honest, genuine man who cares deeply about children and is PASSIONATE about eliminating lead poison in this country once and for all. But, like Moka, he was nervous about giving his talk. He's not used to giving presentations to such a large crowd, but he, too pulled it off. Not only that, but he did so while the roofers had begun (unauthorized) and noisy construction on the roof. He did not let it bother him and he handled it like a solid pro!

If pressed, though, I'd have to say my favorite moment was after the show was over. Gary, Amanda and I were going through the FIFTY donation envelopes we received from the attendees. We found one that had three one-dollar bills in it. Someone had looked into their wallet and taken all they had and given it to us. It meant so much to us that it meant so much to them and if you're reading this, anonymous donor, thank you.

But, thank you to all of the wonderful people who made this event a success; from the organizers and volunteers to the sponsors and attendees, everyone has been so excited about this year's event and it shows. The only problem....


....the bar is MUCH higher for next year!!