All posts by bradland

Bash one-liner: Copy current working directory to clipboard in OS X

I frequently find myself in need of copying the path to my current working directory. Under OS X, you can pipe the output of any command to the clipboard using the pbcopy and pbpaste (see `man pbcopy`). Easy enough with `pwd | pbcopy`, but you end up with a newline. No problem, `tr` to the rescue.

pwd | tr -d ‘\n’ | pbcopy
^[1] ^[2] ^[3] ^[4]

1. `pwd` prints the working directory; pwd outputs a newline, which isn’t very handy if you need to paste this elsewhere, and especially unhelpful in a shell
2. `tr` is short for translate characters (think find/replace); normally it takes two arguments, but passing the `-d` flag deletes the string passed as an argument from the stdin
3. `\n` is the escape sequence for newlines; the character we want to get rid of
4. `pbcopy` is the OS X bash clipboard tool; see also: xclip or xsel for X-Windows environments

Use `man ` for more details about any of the above.

I’ve added the following as a bash alias so I can call this one quickly:

alias cpwd=”pwd | tr -d ‘\n’ | pbcopy”

Easy!

Backup: The same rules apply

It appears that Backify, a popular remote backup service offering a free plan, has cancelled all free accounts. Backify was a reseller of LiveDrive, the company that actually owns the infrastructure and software. Ivo Flipse [broke the news on his Google+](https://plus.google.com/112313173544747389010/posts/3D1jTWWSrKt “Backify cancels all free accounts”) page early this morning. If it sounds too good to be true… There’s no such thing as a free lunch… Ok, ok, I’ll stop. This is, undoubtedly, a jarring experience for the many users of Backify’s service. The lesson learned is that even in today’s world of offloaded complexity brought to you by software as a service, the same rules apply. Caveat emptor, and all that jazz.

This is a good time to take a step back and look at your backup strategy. I’ve read plenty of write-ups on backup strategies that involve copious amounts of drive shuffling and user maintenance, but the truth is that most of us don’t take the time for these tasks. After all, we all have plenty of other housekeeping duties like taking out the trash and cleaning the litter box. You do love cats, right? Where do you think all [these cat pictures](http://icanhascheezburger.com/) come from? Swapping out backup drives isn’t something I want to do, so I’m pretty sure you don’t want to either. Here’s my “no touch” backup strategy.

A good backup strategy meets the following criteria:

* Creates multiple copies of your data – what if one fails?
* Keeps these copies in separate geographical locations – what if you have a fire or flood?
* Works without your involvement – I’ll be the first to admin, I’m lazy.
* Runs quickly and frequently – what good is a backup if you lose everything you’re working on?

Before we go any further, let me address the question I get most frequently: [Do I need a backup?](http://www.google.com/search?q=i+think+my+hard+drive+is+dead “Do I need a backup?”) I won’t answer it directly. I’ll let the over 42 million Google results speak for themselves.

Let’s talk about costs for a moment. The Backify situation underscores an excellent point. *Things are often worth exactly what you pay for them.* When thinking about your backup strategy, ask yourself this question: “If someone took my computer from me today, how much would I pay to get it back?” If your answer is “Nothing, I’d just go buy another one.” Stop reading here and go enjoy your carefree, zero-attachment life. No cynicism implied. Seriously, go back to what you were doing, and drink a cold one for those of us trudging away at our daily tasks. If you’re like me, your heart rate increased a little while asking that question. I’d pay large sums of money to get my computer back. If someone said, “I’ll give it back for $250,” I’d be elated. A good backup strategy is *worth paying for*.

This leads me to unveil the two paid services I use, as well as the one free one:

* [Backblace](http://www.backblaze.com) – $50/year or $5/monthly for unlimited storate
* [Dropbox](http://www.dropbox.com) – $99/year or $9.99/monthly for 50 GB of storage
* [TimeMachine](http://www.apple.com/macosx/apps/#timemachine) – Included in OS X (Windows also has [built-in backup](http://windows.microsoft.com/en-US/windows7/products/features/backup-and-restore))

But Brad, the two paid services above only cost $150/year? You said $250! The extra $100 is because you’ll need to purchase a backup hard drive for use with TimeMachine, or Windows backup, err whatever. I recommend an external in the 2.5″ size (the smaller of the two available), because they don’t require an external power supply. You’ll need one that is at least as large as your computer’s hard drive. Larger is better, as TimeMachine will store multiple versions of your files if it finds the space. This is handy when you realize you accidentally deleted three crucial paragraphs from your proposal during editing. TimeMachine will let you recover a previous version.

Here’s how these services tie in to the “good backup strategy” I outlined above:

**Create multiple copies**

TimeMachine, Backblaze, and Dropbox all create separate copies of the files.

**Keeps these copies in separate geographical locations**

TimeMachine backs up to the external disk on your desk. Backblaze backs up to their data center. Dropbox backs up to their data center, and in my case, to the other iMac sitting in my office, so it’s both local and remote.

**Works without your involvement**

Outside of archiving to the Documents folder when my Dropbox folder gets full, the backup process is hands-off. I use [DaisyDisk](http://daisydiskapp.com/) for Mac and [WinDirStat](http://windirstat.info/) for Windows to identify large folders.

**Runs quickly and frequently**

Because I leave the external drive plugged in all the time, and TimeMachine only copies new and changed files, it runs very quickly. Backblaze has to upload files, so if I create a large file, it can take a while to update. It is recommended that you exclude extremely large files from your Backblaze backup, but you do this at your own risk. Dropbox, because it can sync over my network, backs up very quickly to the iMac on Angel’s desk in my office. It also uploads quickly thanks to my Comcast connection’s fast 3 mbps upload.

The really great part about this backup strategy is that it’s dead simple to set up. Each of these applications has a very simple installer that only takes a few steps to get running. When you couple that with the four points of solid backup strategy, I’m not sure I can do much better without a lot more effort.

So what’s your backup strategy? See any ways I could improve my plan? [Tell me about it](https://www.facebook.com/brad.landers).

When Apple IDs attack

This blog post was originally going to chronicle the saga of my attempts to recover my primary email address as my Apple ID (ok, so it still kinda does), but this morning, I finally received a definitive answer as to why I cannot use my primary email address – the one I’ve been using for the last 11 years – as any email associated with my Apple ID or iCloud. This sounds like my problem, but it’s not just me. Unfortunately for most, they don’t have a blog or any place to talk about this other than the Apple discussion forums, where many will assume the complainers just don’t know what they’re doing. Well I do know what I’m doing, and gosh-darnit I’m going to tell you about it.

This isn’t going to be short. Unfortunately, Apple IDs are complex, and my adventure had lots of twists and turns. I’ve tried to simplify it, but it’s still pretty long and boring. Skip ahead to the “tl;dr start here” if you want to cut to the chase.

First, some housekeeping. Rather than put my email out here for all the spammers to pick up, let’s just say that my primary email is: brad@myname.com.

I’ve been using brad@myname.com as my Apple ID for as long as I can remember. The email brad@myname.com pre-dates my switch to a Mac as my primary computer some time back in 2003. This means that all my music was purchased under brad@myname.com, as well as all the apps I bought when I bought the very first iPhone… On launch day, I might add.

I’m also a MobileMe user. When I signed up for MobileMe, Apple requested an “alternate email” where I could be reached in case I was unable to access my MobileMe account. No problem! I have an email address, and I know how to use it. I provided brad@myname.com as my alternate email. This was at least two years ago; I’ve renewed MobileMe twice. MobileMe accepted this email – my primary Apple ID email – without so much as a hiccup.

Fast-forward a couple of years to when iOS 5 came out. I waited a day or two for the iOS 5 dust to settle and upgraded my phone on Friday, October 14th. The upgrade went smoothly up until the point where I downloaded the Find My Friends app, and my MobileMe email popped up in the authentication box. You see, Apple assumes that because you have a MobileMe address, that you’ll want to use this email as your primary email for everything Apple. This includes your Apple ID that is used to purchase items from iTunes, iBooks, Newsstand, etc. That’s a big assumption.

Any time I purchase something with a specific Apple ID, I’m married to that Apple ID for the life of the product; be it music, apps, or any other product sold through Apple. Any time in the future, you’ll need to provide the specific Apple ID and password used to purchase the item in order to “Authorize” your device to play back or read media. Your Apple ID is relevant to your Mac and iOS devices too! When you want support, you have to provide an Apple ID. My point is that your Apple ID is not an insignificant part of your relationship with Apple.

With the introduction of iCloud, your Apple ID takes on a new role. Truthfully, this started back with Game Center. With Game Center, you search for other users by email. The same principle is applied to iCloud. There’s a good write-up over at TiPb on how iMessage works. Basically, your iCloud email is important if you own devices that aren’t an iPhone, and I do. I own an iPad, which I am (well, was) really looking forward to using iMessage on.

tl;dr start here – This is still longer than you’ll enjoy. Sorry.

So what’s the problem, Brad!? Cut to the chase already!

After I installed iOS 5, Apple automagically used my MobileMe email for iCloud. This is not what I want. I want to use my email. When I tried to change the iCloud login to brad@myname.com on my phone, I received some cryptic message along the lines of “Verification required”. Ok, off to the Google machine for some answers! My searching revealed that I need to verify my Apple ID email.

Wow, that’s strange. I’ve been using this Apple ID for years. How is it possible that I haven’t verified? So I log in at the Apple ID website and attempt to verify my email, but this is where things really begin to go off the rails. I’m not going to go in to the gory details, because you’re already half-comatose, but suffice it to say the Apple ID website did not perform as expected. Button-links didn’t work, data wasn’t saved properly, and at one point, I thought I was permanently locked out of my Apple ID.

After phone and email support sessions spanning ten days and over 15 emails back and forth, iTunes support arrived at this conclusion:

If you provide an email address as an alternate email for a MobileMe account, that email cannot be used as an Apple ID primary email address or alternate.

Yes, we know you’ve actually been using this as your Apple ID for years, but that’s irrelevant. You can’t verify for iCloud with that email, and you can’t change your MobileMe alternate email now because we’re shuttering the product. Sorry bub, you’re out of luck.

So in the process of troubleshooting, the Apple representatives had me change my primary Apple ID email to blanders@myname.com, instead of brad@myname.com. I cannot change it back. No one at Apple can change it back. Their suggestion? To submit feedback to MobileMe.

As of today, if you look for me on iCloud or Game Center with the email you have in your address book for me, brad@myname.com, you won’t find me. You have to use blanders@myname.com. My Apple ID is the only service on the web where I cannot use my primary email address that has been my home for the last 11 years.

In the words of the internet: Apple, I am disappoint.

An introduction to Rack

If you write much Ruby, you’ve definitely encountered Rack. For users of frameworks like Rails and Sinatra, Rack can easily be relegated to the world of “plumbing” down there with the web and app servers; something to be configured and ignored. But that would be a mistake. This intro to Rack provides the most straightforward explanation of Rack I’ve seen. Every concept from the bottom up is discussed with clear code examples. If you write web applications using Ruby, you owe it to yourself to brush up on your Rack knowledge.

From RubyLearning.com and Satish Talim: A Quick Introduction to Rack

Steve Jobs 1955-2011

I never met Steve Jobs, but in many ways, I felt that I knew him. When I was around the age of 10, I went on a field trip to the Kennedy Space Center in Cape Canaveral, FL. Interacting with the people there set my mind ablaze. When we returned home, I got out of the car, looked across the hood at my mother and said, “Mom, I’m going to do great things.” She responded reassuringly, “I know.” My mother believed in what I had said. She believed in me.

By the measure of Steve Jobs, nothing I’ve done in my life qualifies as “great”, but with the exclusion of one thing. I made the decision to become an entrepreneur. Being an entrepreneur is not about making money. To paraphrase John F. Kennedy, it is about “doing the other things.” It’s making a decision that you believe in yourself enough to go out and forge a new path along which others will follow. I cannot think of an individual who embodied this spirit more than Steve Jobs. Throughout his life, when the chips were down and things appeared to be going in the wrong direction, Steve Jobs had the belief and courage to stick to his ideas and persevere. Many of the products that we take for granted today were panned by others in the industry at the time of launch. How did Steve Jobs know that these products would be a success?

To many, Steve Jobs was perceived as some kind of ruthless dictator within his company; always demanding that things be done his way. But the reality is that while some reached for the stars, Steve Jobs reached for our lives. Steve Jobs didn’t make his products beautiful because he wanted them to sit in museums, he made them beautiful because he wanted us to embrace them in to our lives. He wanted to improve the way we live. He pursued this dream relentlessly throughout his life.

There is another experience from my childhood that feels familiar today. When I was 5 years old, Mr. Hooper passed away. I never spoke to Mr. Hooper, but Mr. Hooper spent a lot of time speaking to me. I remember sitting there in my 5 year old mind, not understanding why I felt so sad. It was the first time I had dealt with loss, but this was a person I had never met. Today I face the same conundrum. Steve Jobs’ life goal was to connect with people through his products. Mission accomplished, Mr. Jobs. You will be greatly missed.

Stop thinking iPad killer

Amazon announced their new tablet product today, the Kindle Fire. In my last post, I outlined how I thought Amazon was going to “pull an Apple“. Today, I’m feeling even more confident in that assertion, but not in the way I thought I would. Initially I thought that the Kindle Fire would be a direct strike at the iPad. I don’t get that feeling from the product Amazon launched today.

Apple has more media savvy than many of their hardware competitors like Samsung and HTC. Neither of these competitors have meaningful media marketplaces in consumers’ hands. Apple has the iTMS, iBooks, and App Store, which cumulatively offer consumers access to a wide variety of content. Interestingly, some media bleeds over to and from places you wouldn’t expect it. For example, I get my magazine subscriptions through Zinio, which is downloaded through the App Store, and in turn, my content is downloaded in-app. I expected magazines to be available through iBooks, and speculation on the internet makes it seem that others do too. To further complicate matters, some magazines are available as an “app” in the App Store.

If I knew nothing about Apple’s distribution channels, that discovery would require a not-insignificant amount of exploration. Yet thus far, Apple has actually lead the pack in terms of application quality and discoverability. I attribute much of the iPad’s success to its simplicity and the draw of its many apps.

Step back and look at Amazon’s offering. Simplicity is taken to the next level. All content comes from Amazon and is logically categorized. Movies, TV shows, magazines, books; they’re all right where you’d expect them. There’s no interstitial abstraction of a store, with the exception of apps. Even there, the naming is about as straight forward as you can get. Content is front and center on the Kindle Fire.

So how exactly is this different than the “Apple” maneuver I thought they were going to pull. When you compare the Kindle Fire to the iPad… Well, you can’t. The Kindle Fire isn’t an iPad. It doesn’t try to be. With the iPad, you’re aware of the platform you’re using. There are elements that make you aware that you’re using an Apple iOS device. All iOS devices come with a suite of apps for general productivity. Compared to the Kindle Fire, the iPad is a generalist device. The Kindle Fire is laser focused on consumers that want a device to access content. Amazon has commoditized the platform. They don’t call this device an Android tablet, because they don’t want people thinking about the OS. They want them focused on the 18 million (HELLO!) pieces of content they have access to.

Some of you are screaming at your computer right now, because when the iPad initially launched, geeks everywhere cried out in desperation over the fact that it wasn’t able to run desktop applications like Photoshop and their favorite code editor. The Kindle Fire takes this focus one step further, and you can expect every geek who is just now adjusting to the iPad to scream about what’s lacking in the Kindle Fire. The iPad has taught us that sometimes it’s a worthwhile exercise to ignore the “experts” and see what the consumer has to say.

I don’t know if the Kindle Fire will match the iPad in sales numbers. I don’t even know that it will work well. The hardware could be a let down, resulting in a laggy, uncomfortable user experience. What I do know is that Amazon just pulled an Apple. Rather than go after an existing market, they just created their own.

Amazon is about to pull an Apple

So, MG Siegler says an “Amazon tablet is coming”:http://techcrunch.com/2011/09/02/amazon-kindle-tablet/, and that he’s used it. Meanwhile, HackerNews is caught up in a lengthy discussion as to whether tablets are consumption devices, and whether or not that’s good for society… or something. Elsewhere in the discussion, the tablet is being doomed to failure because Amazon chose to fork Android, risking app compatibility with the plethora of high-quality applications available on the wonderfully organized and widely praised Android Marketplace. Pardon my condescending sarcasm.

Way to miss the point, folks.

I feel like history is repeating itself. I have a feeling that Amazon is about to pull an Apple here, and one of the only communities of people I know who are supposed to be dedicated to looking _forward_ are stuck on a backward-facing philosophical discussion of consumption versus creation. That ship has sailed! Others are failing to see that creating “yet another Android tablet” isn’t the way to distinguish yourself in the market.

Amazon is a unique company. Have a look at the existing players in the tablet market:

*Apple*

* At their core, a computing device company
* Has content distribution relationships (iTunes content partners) for music, movies, and books
* Powerful infrastructure support (data centers, iCloud)
* Makes money on the hardware sale, as well as the sale of content

*Google*

* A search company
* Builds a tablet OS, but doesn’t actually sell a tablet
* Wants customers to spend a lot of time in Google web properties
* Wants to expand in to media (Google Music) and shopping search to sell more ads

*Samsung*

* A consumer electronics company
* Makes a wide variety of devices, including several tablets
* Doesn’t have their own tablet OS (relies on Android)

*Amazon*

* World’s largest online retailer
* Has 137 million active customers [1]
* Has quality content distribution relations for music, movies, books, clothing, electronics, lawn mowers… anything else you can think of
* Knows how to build a successful hardware platform (Kindle)
* Highest rated in customer satisfaction [2]

Amazon is unique in their online retail scope and experience with hardware products. Only Apple can come compare, and the focuses are flipped. Apple’s primary focus is hardware, with a strong media distribution backing. Amazon’s primary focus is online retailing, with a strong hardware product. Arguably, their converse efforts are disproportionate. That is to say, I don’t think the Kindle is as strong a corollary to Amazon’s retail business as Apple’s iTunes Store (apps, music, and movies) is to their hardware. Still I don’t think Amazon’s diverse strengths can be easily dismissed. They’re in a better position than both Google and Samsung to challenge the iPad as the dominant product in the tablet space.

If I were on Amazon’s tablet team, I’d try to make the device the center of the mass market consumer’s consumption lifestyle. People clearly love to shop Amazon, so make it easy for them. An Amazon tablet could fulfill the dreams of 1970s futurists who believed that housewives would purchase household products from a screen in their kitchens and living rooms. Amazon is in a unique position to provide a customer experience that spans everything from digital music to purchasing a new lawn chair on a single device through software that is smart and intuitive. This could be the device that actually makes people _want_ to do these things. If they deliver on that, they’ll be in the game.

h3. Footnotes

# “Google cached page: Inside Amazon”:http://webcache.googleusercontent.com/search?q=cache:CwHkwbSb-IIJ:www.amazon.com/Inside-Careers-Homepage/b%3Fie%3DUTF8%26node%3D239367011+amazon+active+customer+accounts&cd=1&hl=en&ct=clnk&gl=us&client=safari
# “Amazon replaces Netflix at the top of a customer satisfaction survey”:http://www.internetretailer.com/2011/05/10/amazon-replaces-netflix-top-customer-satisfaction-poll

Simple wrapper for Ruby scripts running in an RVM environment

Ruby is a fantastic programming language, but I’ve not been all that happy with the community’s viewpoint of the execution environment. Ruby is fast moving, so you often encounter scripts or applications that require specific versions of Ruby. This problem isn’t unique to Ruby, but the solutions the Ruby community offers are.

Typically, versioned interpreters are installed using a convention that works something like this. If Ruby 1.9 and Ruby 1.8 were installed concurrently, the interpreters would be installed using /usr/bin/ruby19 and /usr/bin/ruby18. Scripts that require Ruby would have their shebang altered appropriately. You’d also typically symlink /usr/bin/ruby to your preferred (default) Ruby install.

Ruby eschews this convention. Ruby interpreters that come with many Linux packages use this convention, but most Rubyists will advise you to avoid OS packages because of other issues. As a system administrator, the entire scenario borders on horrifying. I get why Rubyists feel the way they do, but to people on the “other side”, it’s terrifying. Hearing “just install from source” keeps sysadmins up at night.

Enter RVM. Ruby enVironment Manager is a tool for installing and managing Ruby interpreters and RubyGems (Ruby’scripts library package manager). At it’s core, RVM is a collection of bash scripts, written by author Wayne Seguin. It’s an excellent tool, and while it gets some public criticism over methodologies like overriding common shell commands like cd, I’m generally happy with it. I’m one of a growing group of sysadmins who cross over in to the programming side of things, so the power and flexibility of having multiple Ruby interpreters and multiple RubyGems gemsets is has a lot of value to me.

RVM works by altering the execution environment. I won’t go in to details about how to use RVM, but you should be able to glean enough from this simple statement to get some idea of what’s going on:

$ rvm use ruby-1.9.2-p290@sprinkle

This tells RVM to “use” (load) the environment for Ruby version 1.9.2, patch level 290, and use the “sprinkle” gemset. A gemset is just a collection of gems that you give a name. This appears to work like magic, but it’s really quite simple. RVM changes a set of environment variables that are relevant to the execution of Ruby and RubyGems. Basically, a bunch of load and execution paths. That’s all.

So where’s this all headed? The beauty of RVM is that it encapsulates Ruby execution environments. The primary drawback of RVM is that it encapsulates Ruby execution environments. How’s that? Take the ruby executable path for example:

/Users/myser/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

Not exactly as friendly as /usr/local/bin/ruby. Fortunately, that’s a solved problem. We have /usr/bin/env to work around that problem. The catch is, env works by searching the current environment. As we know, RVM dynamically loads an environment that works for each Ruby. What happens if RVM is never executed, and why would that be the case?

One example is cron. When you run a cron task, a very minimal environment is loaded. This means that RVM isn’t loaded. The standard solution to this is to source the rvm script prior to execution, but this means including the source line in every cron task, which A) requires that you remember it, and B) adds a lot of visual clutter to the crontab. When you’re reviewing a list of cron tasks looking for something specific, all these source lines make a real mess.

Additionally, if you write shell scripts in Ruby, you may need some scripts to run in Ruby 1.8, while others work in Ruby 1.9. In an interactive session, Ruby shell scripts are executed in the currently loaded environment, so you may not get what you expect. I’d prefer a self contained script that loads an expected interpreter and environment explicitly.

Wayne provides some example code for loading the RVM environment on the scripting page, but stops short of a working script example. I’ve taken the very, very small leap to a working script wrapper. The benefit of this wrapper is that it is portable to any environment where RVM is available at a user or system-wide level. You will, however, have to ensure that the appropriate Ruby and gemset are available. The script looks like this:

#!/usr/bin/env bash

# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
  # First try to load from a user install
  source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
  # Then try to load from a root install
  source "/usr/local/rvm/scripts/rvm"
else
  printf "ERROR: An RVM installation was not found.\n"
fi

# Configure ruby and gemset
rvm ruby-1.9.2-p290@gemset_name >/dev/null

ruby <<-rb
  puts "Hello!"
rb

I’m a jack of all trades, so I’m sure that there are different ideas and methods that may be better than this. I’d love to hear about them! Trackbacks are open on this page, so please comment and let me know what you think.

What’s up with this Wave Disk engine?

I say this a lot, but “I’m no expert.” By this I mean that an engineer who specializes in this field would rip my little essay apart for technical inaccuracies and abuse of terminology. Fortunately for me, many people know less than I do and will not be similarly offended by my ham fisted treatment of the subject matter I’m about to attack.

Having said that, I’ve always been a gear head of sorts, and being a hacker, I’ve always been interested in non-traditional engine designs, so the wave disk engine simultaneously interested me and set off my bullshit meter. Most of the press coverage sucks wind. There isn’t a whole lot of appetite for loosely-detailed explanations of complex engineering phenomenon, but that won’t stop me from rambling on here. So, if you’re up for it, get comfortable in your chair and let’s talk about this new fangled wave disk engine.

The wave disk motor has hit “Hacker News”:http://news.ycombinator.com/item?id=2704614 a few times, so I’ve had some time to look in to it. I’m going to take a few kilobytes of text here explain my understanding of this new technology, which lies somewhere between a complete layman and an actual engineer. Hopefully it will help everyone understand a little more about this motor and why it is, indeed, significant.

*Introducing, the engine in your car*

The engine in your car is the most common type of gasoline powered engine on the planet. The long form description of the engine in your car would be something like: piston-in-sleeve, reciprocating, otto-cycle, internal combustion engine.

Let’s break that down:

_Piston-in-sleve_ – Inside the engine are cylinders, inside which a piston moves up and down. This up and down motion compresses the air/fuel mixture, which is ignited by a spark. The rapid expansion of gasses in this sealed compartment are the basis of energy production in this type of engine.

_Reciprocating_ – The piston that moves up and down is attached to a crank. This is the mechanism that converts the up/down motion of the pistons to rotating motion. It is not unlike a bicycle crank, where the pistons would be your legs moving up and down.

_Otto-cycle_ – Otto-cycle is frequently referred to as 4-cycle. It defines the steps required to draw the air/fuel mixture in to the cylinder, compress it, ignite it, then expel it… repeat.

_Internal combustion engine_ – Basically this means that the fire occurs inside the engine, as opposed to outside. Steam engines are a good example of external combustion engines. Also look up a Stirling engine for more fun times.

Google any of these terms and you’ll get more info than you can read in an afternoon. If you want a good overview, “HowStuffWorks has a nice one”:http://auto.howstuffworks.com/engine1.htm.

For the rest of the time here, I’m going to simply refer to this type of engine as an ICE (internal combustion engine). There are other types of ICE other than otto-cycle, but I’d like to keep it simple.

Despite all the complex engineering elements outlined above, the ICE operates on some basic underlying principles that you learned in primary school science class: if you heat something up, it’s volume increases. The burning fuel/air mixture is a simple means of heating the mass of gas inside the combustion chamber. Because the volume expands as it is heated, it forces the piston down.

The efficiency of this type of engine is limited by certain factors:

* The friction involved with all the moving parts required to regulate the otto-cycle
* The thermodynamic characteristics of the engine’s design

From here, the conversation gets pretty complex. This is where “I’m no expert” becomes very apparent. If you’re interested in further reading, google the Carnot cycle.

Here’s my layman’s understanding of the limits:

_Friction_ – The engines in our cars experience a lot of friction. Ever use a syringe? The principle mechanical operation of your car engine isn’t all that different. The piston experiences friction as it moves up and down inside the cylinder, and in addition, it must force air in and out of the cylinder through small-ish holes regulated by valves. Additional friction is present in all the rotating parts; and there are many. Lots of time, money, and effort has been spent decreasing friction and the resistance of air moving in and out of the engine. Virtually every performance mod you can do to your car’s engine has to do with these two limiting factors. The inherent mechanical complexity of your car’s engine prevents it from reaching high levels of efficiency.

_Thermodynamic characteristics_ – With this type of engine, we’re relying on the fact that we’re going to draw in a (hopefully) cold mass of air mixed with fuel, then light it on fire and harness the energy produced by its expansion. The problem is, we’re doing this deep inside a giant hunk of metal that is constantly soaking up a portion of this heat. This stolen heat energy must be dissipated – lest our engine begin to overheat – so we use a huge fan to blow across a radiator full of water that is constantly pumped through the engine. Both the fan and the water pump require energy to operate. Additionally, the piston moves only a short distance, so we’re not harnessing the entire heat cycle; only a small portion of it. The gasses that come out of the exhaust are still very hot. If you haven’t gotten the picture by now, the ICE leaks energy all over the place.

Despite the major limitations outlined above, this type of engine works well for us because it produces mechanical energy in a range that is easy to use. A typical ICE found in your car “idles” at around 800 RPM and can spin up to 5,000 RPM (much higher in many cases). This rate of rotation is easily geared to match the required traveling speed of an automobile. This is not coincidence. Using gears to change the rotational speed of mechanical energy means additional mass and friction in the driveline. The engine’s energy must be used to accelerate all that mass up to traveling speeds and overcome the increased friction. Overall, the ICE is a good fit for the automobile.

That’s just about all I have to say about the venerable ICE. It’s a fine piece of engineering that has served us well over the years, but I suspect its time is coming to a close.

*Ride the wave dude*

As the wave disk engine is yet to be released, details aren’t exactly plentiful. Although, it does share a lot of commonalities with another type of engine that has been around since the mid-twentieth century: the turbine. It’s probably easiest at this point to explain how the turbine differs from the ICE found in your car, rather than tackle the wave disk head on.

Coincidentally, a turbine is also an internal combustion engine (ICE), but I’m going to refer to it more specifically as a turbine, and continue to refer to your car engine as an ICE. That ought to bring the pedants out in force! Likewise, HowStuffWorks has a good article on “how a turbine works”:http://science.howstuffworks.com/transport/flight/modern/turbine.htm.

A turbine engine is, in ways, far simpler than a traditional ICE; and in other ways, more sophisticated. In operating principle, a turbine is a series of fans oriented axially inside a housing. Air is drawn in from one end, compressed through a series of fan “stages”, then mixed with fuel, ignited, and shot out the other end, passing through another series of fans.

All these fans are attached to a shaft. The pitch of the fans on the way in progresses to compress the air before it is mixed with fuel and ignited. The fans on the aft end of the turbine are like a windmill that harnesses the breeze. This breeze happens to be thousands of degrees Fahrenheit. The burning fuel air exits the rear of the turbine, rather than the front, because expanding gasses are lazy and generally like to leave through the nearest/least crowded exit. Since all the air is moving toward the back, the pressure at the front of the engine is higher, thus the gasses are happy to exit out the rear.

So you could think of a turbine like a desk fan blowing on a pinwheel, only instead of an electric motor powering the fan, there’s a giant ball of fire in-between, and the pinwheel is hooked up to a shaft that drives the desk fan. I’m probably losing you here.

Let’s talk efficiency and limiting factors. Turbines are generally more efficient than the ICE in your car because of a few mechanical advantages:

_Fewer moving parts_ – Well, maybe not fewer (there are a lot of fans), but simpler. Turbines are typically constructed of one or two shafts with a series of fans, and a burner.

_Conservation of motion energy_ – All the parts inside a turbine rotate consistently. They don’t change directions as the turbine operates. The pistons in your cars engine have to change from up to down in a very abrupt change of direction. This is not efficient.

_Less friction_ – The fans inside a turbine rotate on a shaft. They compress the air as it moves along by having very, very close tolerances with the tube shape of the turbine, but they don’t actually touch. Also, there are no valves and camshafts to operate.

Sounds good, huh? Turbines for everyone!

So why don’t we all drive turbine powered cars? For a few reasons. First, some practical limitations.

_Time consuming to start_ – The raging inferno that powers a turbine only happens when the fans are spinning really, really, _really_ fast. I’m talking hundreds of thousands of RPM here. This takes some time to get going. Not to mention, you don’t just go from cold to spinning 200,000 RPM without some wear and tear. A turbine takes far longer than the ICE in your car to warm up.

_Loud_ – Even small turbines emit a mighty roar. The combustion inside a turbine occurs very close to the outside air, and the exhaust leaving the turbine is traveling at a very high rate of speed. All of this results in a lot of noise. Mufflers for turbines are more complicated because of the forces involved. The rapidly exiting exhaust of a turbine is used to push jets through the air. That should give you some sense of the pressures involved, and remember, sound is just pressure waves.

_Rapid rotation_ – Remember how the ICE operates at a favorable rotational rate (RPM)? Turbines spin much faster. To add insult to injury, smaller turbines typically spin much faster than larger turbines. A micro-turbine may spin as fast as 500,000 RPM. That is 100 times faster than the engine in your car. The gearing required to slow this down to operational speed is heavy and involves a lot of friction.

_Slow rate of change_ – The high rate of rotation means lots of kinetic energy. Throttling a turbine up results in a gradual increase in rotational speed. During acceleration, a tremendous amount of fuel is consumed to little effect. This makes accelerating a turbine relatively inefficient. Turbines like to be run at a consistent speed, and when they are, they’re wonderfully efficient.

_It’s hot in here_ – The pressures and temperatures inside a turbine are extreme. There’s a lot of combustion going on, so the materials used in turbine construction must withstand these high temperatures. This means exotic metals like titanium are required.

_Expensive_ – Turbines are simple in principle, but exacting and demanding in practice. The aforementioned exotic metals as well as the tight tolerances make turbines expensive.

So where does this leave the wave disk? The wave disk is similar to the turbine in operating principle. Air moves in and out of the wave disk in a continuous motion. The mechanical components of the wave disk rotate in a consistent fashion (no changes in direction). The compression of the air/fuel mixture is performed by pressure waves (they call them “shock waves”).

There are significant differences, however. In a turbine, the movement of gasses in and out of the combustion chamber is limited only by air pressure. In the wave disk, the combustion chamber is actually closed for a portion of the rotation. This is a good thing. Trapping expanding gasses gives a greater ability to harness the expansion energy. Additionally, there appear to be no “stages” inside the wave disk. The mechanical construction is much simpler. This should make it less expensive to produce.

One of the greatest questions is rotational speed. The source links on the Wikipedia page for the wave disk indicate that “the rotational speed of a wave rotor is low compared with turbomachines”. They state this in the context of material stresses though, not operational practicality. How much lower is a big question.

That’s about all I’ve been able to gather about the radial flow wave disk at this point. I don’t know of any production units, so information is pretty scarce. It does appear to have some advantages over a traditional turbine, however. The significance of the simplicity of the mechanics involve cannot be understated. One of the primary reasons the ICE continues to dominate automotive applications is because the manufacturing process is well understood and not terribly demanding. Turbines, by contrast, require exacting precision, and the cost of failure is extremely high.

If the radial flow wave disk delivers on its promises, its most likely application will be driving a generator. I suspect that even with its simpler construction, the energy required to accelerate the engine will still be a hinderance. This means continuous, peak operation is where it’s at. Spool the wave disk up to run a genset and capture unused energy with batteries or other energy storage devices.

This is, ultimately, where the wave disk engine may fall flat. With a claimed 3.5x efficiency, it’s got a lot of room to run, but the process of charging batteries is inefficient, and most modern hybrids don’t rely on their batteries and electric motors for all of their propulsion and accessory (hello, air-conditioning) needs. What is the efficiency of the wave disk at 10% to 20% operating capacity? That’s a relevant question if you need the energy to drive things like air-conditioning and power accessories.

In the real world, the wave disk will be part of a greater system. Current hybrid cars still link the ICE directly to the wheels. With newer generations of hybrids, we may see this change. If we do, the climate for the wave disk engine will improve. Until it does, I don’t see it reaching practical, widespread application in the automobile.

Dear Comcast: Why are you not crushing Netflix?

First off, no, I will not call you Xfinity. Sorry, but that name is just silly. I won’t use it. But I digress (already).

Why are you not killing Netflix? And by “killing”, I do not mean, “Whining to Congress that Netflix is not regulated and threatens to commoditize your industry.” I mean, why are you not killing them in the market with the absolutely staggering number of advantages you have?

Comcast, you are poised to go vertical in a way that few companies can. Netflix couldn’t _dream_ of going vertical like this.

* You have a relationship with a huge base of existing customers. You’re one of the few media companies with a subscriber base close to Netflix (who just passed you, btw).
* You have a large last-mile network based on good technology. Sure, it’s not entirely fiber, but it’s a lot better than what most of the RBOCs are sitting on; and Netflix has zero.
* With NBC, you have established relationships with all the major content providers. Not just relationships, but leverage!
* You own the distribution channel from content library, transport, and the end-user hardware. Pst, this is a go to market pathway that others only _dream_ of having.

The problem I have with your service is that the “experience” sucks. Your cable box is a slow, buggy pile of crap. Browsing content on my cable box is only marginally better than the craptastic PPV movie systems in a cheap hotel. The new Xfinity apps for my iOS devices are a huge step up in terms of usability, but I’m not convinced that using my iOS device as a gigantic remote for my television is where I want to be. I don’t want to use the 10″ display in my lap when I have a 50″ display hanging on the wall. Not to mention, I already have four other remotes. Despite appearances, I’m not really interested in collecting these things.

This is what the Xfinity Mobile experience is like:

* Pick up my iPad and browse for “On Demand” content
* Initiate playback from my iPad
* Switch to the Comcast remote to play/pause, ffwd/rwnd
* Experience huge lag in response to my control inputs from any of these devices

I’ve measured it, and it can take up to three full seconds for my cable box to respond to inputs from the remote. Three seconds is an eternity in this context. When you compare it to the Netflix app running on my PS3, it’s just flat out embarrassing. Not to mention, with Netflix, I don’t have to keep my iPad around. I can just use the PS3 remote to browse, select, play, and ffwd/rwnd content. And it’s responsive. Have you ever tried to rewind an On Demand movie ten seconds to see something you missed? All too often, the DVR gets stuck on rewind and I’m left sitting there watching the entire movie in reverse… again. Miserable!

Netflix is kicking your ass because using their service is a pleasure. Have you used it? You should! I’ve got really bad news. If I were able to get network programming through Netflix or an Apple TV, you’d be my brand new _commodity bandwidth_ provider. That’s where you’re headed if you don’t shape up.

If you’re sitting in your executive office right now, looking at a feature list and scratching you’re head, *you are doing it wrong*. I’ll take a product with 3 features that work exceptionally well over 10 features that work like crap any day of the week. Guess what, so will the rest of us. Apple seems to have figured this out, and they’re not exactly struggling to eek out a profit. See also: Apple FY2011 Q2 profits of $5.99 billion.

Comcast, you have only yourselves to blame for this situation. You’re sitting on all the right pieces, and no individual component is a huge weakness. Dedicate yourself to a product that has great content, that’s delivered over a great network, and is accessible on competent hardware with an outstanding interface. Your Xfinity mobile apps are a good start, but pawning the hardware platform off on Apple isn’t the smart choice (for a number of reasons; _hint_, they’re gunning for your seat at the table). I don’t need another player in my living room. Despite our storied past, I’m willing to put it all behind us. I want you and me, alone, in my living room. Only you can make it happen.

Your pal,
Brad