Posterous theme by Cory Watilo

NPEs: Permission vs. Forgiveness

Is it better to ask for permission or forgiveness? That is a question that always depends on the context.

For one shot events forgiveness is always less of a hassle. For example, if your motivational speaker for your group at work performs stunts like juggling flaming batons and swallowing swords, it's best not to get HR involved. From your perspective it is a onetime deal and if nothing goes wrong it will just be an uncomfortable e-mail thread when the responsible adults in the company find out. And that is assuming HR isn't dealing with any real issues (like making sure everyone has finished their sensitivity training). However, the speaker will likely have been through this process before. A true professional who does these stunts all the time will insist on signed releases from the company, especially from anyone authorized to sue.

Another context is programming. Instead of lawsuits we have exceptions. And instead of juggling flaming batons and swallowing swords we dereference pointers, a truly dangerous practice. When writing code to deal with these pointers there are two broad approaches: guard blocks where you check for null before dereferencing, and attempting it without the guard and catching the inevitable exception.

Old school C and C++ coders will always use guard blocks. This is primarily for two reasons, (a) null dereferences were almost always fatal, and (b) they didn't always have fancy things like exception handling... and they liked it! Permission was the only reliable approach (now get off my lawn you script kiddie).

New generation languages like Java and later incarnations of C++ standardized exception catching. If you make a mistake you can pick up the pieces and move on. Forgiveness became an option. And for a lot of code it is easier to read and write forgiving code rather than permission seeking code.

But easier to read and write is a very subjective criteria. Whether permission or forgiveness is better has no hard metric. But which is more efficient and faster? That is a hard metric! Time of execution. So I coded up an experiment to get cold hard numbers.

But before we conduct this experiment we should predict the outcome. Can forgiveness ever be faster than permission? If we get rid of all of the null checks those are less cycles to burn on every execution through a loop. If the overhead of an exception is low enough then with infrequent enough exceptions it should be faster. Kind of like a parking ticket. If it's 5 cents a minute to park and for every 4 hours you are parked you will get a $20 ticket (with no other consequences) should you feed the meter? Never! you can save about a dollar an our just paying the parking ticket. But if the fine is $24 then it's a wash, and you depend on beating the parking enforcement officer to make any gains. So if the exception overhead is low enough eventually forgiveness makes sense. Right?

Permission vs Forgiveness

Well, it looks like forgiveness is not very rewarding on the JVM. For this chart the Y axis is the average time through my test call, and the X axis is the increasing rarity of the exception, a probability of between 2-4 and 2-20, or 1 in 16 to over 1 in a million (so your saying there's a chance!). Forgiveness is at best nearly as good as permission, and at worst over two magnitudes of order worse (it's like 147x at 100% forgiveness).

So that motivational speaker may really be awesome, but it is almost always better to ask for permission. Especially when he sets the carpet on fire.

 

Well, That Was Quick. Part 2.

My kindle fire lasted a little longer than my flirtation with a MacBook Air, but not much longer.

Two months ago I impulsively signed up for the pre-order of the Kindle Fire all of 10 minutes after the press conference was over. Initially I thought I would wait, but then something inside of me realized that this was going to be the foil to the iPad the tech world has been waiting for. Not an iPad killer (there will not be one for years) but something that can sit next to it: a foil, like McDonalds and Burger King. Room for both and distinct but they serve nearly the same market. The key selling point was expense, $199 fell below the 'let your wife know before you buy it' threshold. All Apple products worth buying are priced above this threshold.

As the time rolled by I got more and more excited. Even when Barnes and Nobles announced their Nook Tablet I held firm. When it cost $50 more and had only 1GB of user non-purchased storage I could rationalize the differences in favor of my purchase. Even though the lanyard hook was super-sexy industrial design. I still kind of want one just for the hook.

So when it was nearly time to ship I contemplated upgrading my shipping so I could get it sooner. Or even canceling it and just buying it at Best Buy since I had learned they would be at retail locations on ship day. But when I checked at Amazon it said the estimated arrival day was Thursday. I could wait two days. Except when they shipped it they used some horrible FedEx/Post Office hybrid called SPEEDY, which is anything but fast. Thursday turned into Saturday and was nearly Monday except our house was on an afternoon route and I got lucky. Really, I didn't stalk our postal carrier. At least it didn't meet the legal definition of stalking.

When I got the tablet there were some things I didn't like. There weren't enough physical buttons for things like home and (more critically) volume. The volume rocker is of critical importiance because it is super hard to snatch the tablet from your child and mute it when he takes the tablet out of your bag and starts playing Peggle at inopportune times. Inopportune times like the middle of church. Not that I have ever had such an experience.

There was also the issue of the touch panel. All touch panels have little electrical channels etched into them that you can see if you get the right refraction off of them. For good panels like ones on my Transformer and the iPad it takes some unusual circumstances like direct unpolarized sunlight at an unusual angle. The Kindle Fire? Overhead florescent lights allow you to see some of the squares, and different angles allow you to see the diagonal lattices that make you think there is a hairline fracture or slight surface scratch. Not something I would want from a $400 tablet. Oh, wait... I only spent $200. Good enough I guess, I won't return it.

The problem was that my 7 year old son had taken to it as though it was his own tablet. In two and a half days he had played all 44 levels of Peggle and was already working on the second play through. That is, until Tuesday morning. When, despite the case I had bought to prevent such incidents, the Fire slipped from his hands. It fell slightly over two feet onto a kitchen floor, landed face first, and promptly shattered.

A little over two days. Well, that was quick.

Fish out of Water

Of all the places you would expect to find me, the Peak Venture Group pitch night is one place you wouldn't even think to see me.  Yet there I was Tuesday night.  I couldn't feel any more like a fish out of water like I was then.  Only one person there was wearing a t-shirt.  Lucky for me I had thought at least that part through before I showed up and I was wearing a full button shirt... and jeans.  But you could tell beyond just the dress code that it wasn't a technology user's group.  Young urban hipsters mingling with older and (what I presume were) successful business men and women looking for a good use for their money. Nobody was pontificating on the impact of Oracle demonstrating JavaFX on an Android device at JavaOne last week.  They either didn't know about it or didn't want to admit knowing about it, not in this room.

The unfamiliarity of the scene only compounded my anti-social impulses, as I stood alone munching on pretzels and potatoe chips along the side of the room.  Lucky for me some ER doctor had mercy and started a conversation with me.  Actually there were two people wearing t-shirts, his was the second.  It had an iconic half glass of water on it and the text 'half-full.'  You need to be an optimist to go these functions.

If I were in the Bay area I would expect the pitches to all be along the lines of 'Our website will make the world a better place a dollar at a time.'  But this is Colorado Springs, and we only got one of those (ChangeMob.com).  The other pitches were for patented blinds cleaning tools, a concert venue in a neighboring city, a fitness facility, and a science fiction MMO.  A surprisingly diverse group of pitches, from a surprisingly diverse city.  After all, it's not all tea parties and mega churches here in Colorado Springs. 

But this still doesn't answer why I was there.  I almost didn't come, except that the person running the whole show was the former marketing director at one of my former startups.  So at least I knew someone there.  But I have an idea.  Not as crazy as my e-book idea, but an idea that I haven't been able to discredit.  It's the kind of idea that if you don't let it run it's course that it will consume you, and bother you.  This idea isn't a new company or a new enterprise, so I felt the need to do some reconnaissance.  Make sure this was the right venue to let it see the light.  But I think I have my answer, I just need to get my ducks in a row and be ready for the next pitch night.

Caught Up in the Web : Amazon Silk

I'm a sucker, I placed my Kindle Fire pre-order within ten minutes of it going live.  And I've got 45 days to reconsider it.  That may be 44 too many.  After digesting some of the reveal I am starting to have some reservations and doubts.  It's cool, it's inexpnsive, and they are selling it at a loss.  But how are they going to recoop the loss?  E-books?  Nope, not for people like me who love our tax supported public libraries.

The way they will cover the loss is the Silk web browser, and it's a subtle side effect of it's architeture.  If every one of your requests is funneled through Amazon's architecture that is an amazing opportunity to do amazing stuff with that entire stream of data.  "For Science" of course.  But what they will be getting is an amazing density of clickstream data that no amount of cookies and javascript can ever match.  It's the whole stinking stream!  This looks like how they will do "with special offers" on the Fire.  They will anonymize and aggregate the web data, and sell it.  And if I'm wrong about it and it's not in their EULA or TOS then I will eat a McDonalds hamburger.

So this is where I am thinking twice about the Benjamins I am about to lay down for this.  There are too many unknowns still.  Can I load external apps?  Can I put Dolphin or Firefox on it?  The Amazon App Store currently doesn't have a full featured version of either one of them right now.  Just Opera mini which has the same archetecture as silk. 

It's not that I'm a privacy freak.  I just want the ability to opt out.  I probably would use Silk if it really does optimize the downlods and speed up the web page.  If silk had a "local only" mode that dispensed with th cloud and did all of it's own network connections then I would be OK with that too.  I just need to have a choice in the matter.

Strange Loop -- Lessons Learned


A little over a week ago I gave my talk on "Applying the Principals of Stage Magic to the User Experience" at StrangeLoop. Simply stated one of the best conference I've ever gone to. This also had to be the most well received talks at a conference I've ever given. And it was nearly off topic. You've got people talking about monads, git trees, and actual development on actual hardware. Then you have some goofball with dime store magic tricks showing YouTube videos that accidentally queued up some Georgia O'Keeffe illusions. But it's all about the relevance to the topic at hand. After all, some of the best phone apps are little more than dime store magic tricks with very well executed user experiences. However, there are some important lessons I learned.

Use a Concise Title - It wasn't until the speakers dinner that I realized how much of a mouth full my session title was to say. Something like "Making a Magical User Experience" would have been better. The attendees could read the abstract to see I was talking about stage magicians and not Harry Potter or card games. 

Turn Off Your Phone - I'm not talking to the audience here, I'm talking to the presenters. Sometimes your friends can pick the worst time to schedule a weekend game of Battlestar Galactica. For the record, I was a human and the Cylons actually took down the Galactica by damage.

Download Your Videos - If you are going to use videos, download them ahead of time. Find that Perl script that does ti for you if you have to. The network may be congested. The codecs may not be supported on the target machine. Or YouTube may have some strange videos to suggest next. But by all means, credit the video source.

Autoplay Your Videos - Next you will want to put your videos on autoplay. Give it a 10 second lag to start if needed so you can explain it. And loop it. Because if you are trying to use the presenter view in PowerPoint or Keynote it is very difficult to us the mouse over your shoulder.

Attend Your Tech Rehearsal - And if your conference doesn't have a tech rehearsal, do it guerrilla style that morning or the day before. You want to be ready to show up, plug in, and be ready to go. Because of the logistics of the hallways and the amount of gimmicks I had to set up the tech person was wiring my mic on me literally the minute before I was supposed to start. On the other hand, that was five less minutes of standing there awkwardly pretending I was prepared for the talk.

Practice Makes Perfect - Since practice was one of my points I felt it was important to test out the patter several times before I went live. I also wanted to make sure I was under 50 minutes. That was time well spent. At times I was able to go into autopilot and obsess on the guy puring ice cold water in the back while I was blabbering on about what a skeuomorph was.

I'm sure I made the right decision choosing StrangeLoop over JavaOne. Although I got a whole lot less swag and t-shirts. But that's OK, I can buy t-shirts and trinkets elsewhere, but I can't see literal Computer Science luminaries assemble near the largest unbalanced parenthesis in the world without going to StrangeLoop.

Brad Feld in the COS

I'm kicking myself for not going to the +Brad Feld breakfast here in Colorado Springs of course if I won't get up that early to go Jogging so why would I get up that early to do anything good for myself?
Any way, I see the five biggest barriers to creating a Boulder or Silicon whatever type area in this town are the following:

  • Cheyenne Mountain Air Force Station
  • Fort Carson
  • Peterson Air Force Base
  • Schriever Air Force Base
  • nited States Air Force Academy 

Other than DC there aren't many other towns with as many military bases as Colorado Springs, and I think that is driving the local technology presence. We have our own Angel group, called the SBIR set aside program.

How did this happen? Nature abhors a vacuum, and after the meltdown of MCI/ChannelPoint/DMW/NooChee/TribalVoice and RIFs from Sun/HP/Agilent between 2000-2003 defense spending went way up (for obvious reasons). Engineers needing work and DoD contracts needing workers brings the new equilibrium. And until we get serious about austerity that won't change.

This is not a bag on the sector by any means. I myself benefited from the change and I feel more secure at my job than I have at any of the COS companies I've worked at. The work is still challenging, to me it is meaningful, and the pay allows me to spend less than I bring in, so I can ignore a lot of that craving I have to build something of my own.

So I think tech entrepreneurship in the Springs is a lot like firewood left out in a 12 hour rainstorm. It can still light, just not today.

Who's Got Two Thumbs and Loves Touchscreens? This guy!

Some of the intracate details about Windows 8 are now making the rounds now that Build 2011 has started. And it's a good thing my clothing is made of asbestos, because there is no shortage of flameboys whenever Microsoft announces something. But beneath the markting there are some real interesting gems. What I find more interesting than the new windows tech is some of the research findings they are sharing. Alot of it just makes you say 'duh' when you've realized that you intuitively understand it. Who's got two thumbs and loves touchscreens? This guy!

Thumbs drive touchscreens - This was one of the more interesting findings. Thumbs drive touchscreen tablets. Check out the main link for this post over at iStartedSomething. This goes counter to almost all of the visual advertising on how we are tought to use our touch devices. You hold it in one hand and you use the index finger of your other hand to interact. Unless it's a multi touch gestire, then you can us the other fingers, or you can lay it down flat and use both hands. Because the reason we grew opposable thumbs wasn't to grasp tools, it was to use it to zoom in on your maps and web pages.

We need a replacement for Fitts's Law - Fitts's Law (http://en.wikipedia.org/wiki/Fitts's_law) is an old user interface principal that is used to drive thigns like the placements of menus and the size of buttons. Basically the speed at which you interact with something on the UI depends on how close and how big the target is. It also presumes a uniformly flat "effort surface" where traveling across one part of the screen is as easy as any other part of the screen. Touchscreens change this.

Multiple cursors - Since you can change the finger with which you touch the screen, you have concievably ten places to start the gesture. And then with multipoint gestures there is the issue of which fingers are used where. And then groups of the cursrors tend to be togeather, because they are on the end of separate hands. And then you have to figure in the disabled, how is a quadraplegic with a wand attached to his head going to do pinch to zoom?

Limitations of range - Also, depending on the configuration of teh device, some of the fingers may have limited range. If you are using your phone one handed your thumb will make one of the top corners exceedingly difficult to use, without doing some excessive gesture like taking your other hand off the steering wheel. Err... I mean putting your cup of coffee down.

So to me it looks like Microsoft is betting big on the fact that touchscreens will fundamentally impact the way we interact with our computers. And looking at how different it is shows us just how big that change will be. What we have started with our smartphones and current generation tablets is just the beginning.

Now how do I rationalize yet another laptop purchase, this time with a touchscreen, to the spousal unit?

http://www.istartedsomething.com/20110914/the-comfort-science-behind-windows-8/

Steve Jobs was Wrong About Touchscreen Macs

If you think back nearly a year ago when Steve Jobs was introducing the new features of Lion at the "Back to Mac" event he did an interesting thing, especially for an Apple keynote. He spent a good amount of time talking about what was not in OS X Lion. And what was that specifically? Touchscreen support. Despite the virtuous circle between iOS and OS X one of the features, in fact the key distinguishing feature, that iOS wouldn't be giving back was touchscreen support. Since they were omitting it that was an elephant in the room that absolutely had to be addressed. However, I have come to the conclusion that Steve was both right and wrong. Touchscreen support has to come to desktop OSes for them to remain relevant. But there are some issues.

Fat Fingers - I am not saying that everyone who uses a computer is a sedentary fatso (I know of at least two), but compared to a mouse pointer or even a stylus the human finger is very imprecise. This gets even worse when you consider the current preferred touchscreen technology is the capacitive screen. While it is good for detecting how much of your finger is touching the screen, the physics and mechanics of the setup dictate that you won't see the middle of where you are pointing. (This, my friends, is the miracle of magnetism).

Larger Hit Targets - To compensate, you would need to make larger hit targets. Traditionally in UI design when you made a larger hit target the reason was that the target was usually a far distance from the previous focus (Fitt's Law for those keeping score). But once you got close you could shrink the sizes of the next hit targets. This is what happens with the Macintosh menu bar. It is no accident that the menu bar is on an edge of the screen. Because the mouse, when moved up against the edge of the screen, will remain at the zero Y position the effective target size is infinite. Plug infinity into the equation and you get awesome results.

It's Not Zero Sum - When Jobs dismissed the touchscreen Mac he made an argument that you arm gets tired. (It's cool and intuitive at first, but then it gets tired after extended use). He then goes into a discussion about how awesome touch pads are, in fact they put one into their most recent mouse. In that argument he makes no allowance for the hybrid use. Just because you have a touchscreen Mac doesn't mean you ditch the mouse. (The irony is that apple sucks when it comes to mice. First the one button mouse. Then the iMac hockey puck. Then the mighty mouse. And the magic mouse is no improvement. They finally got it right with their current trackpad: don't ever let Jobs try and do a mouse.)

It's How You Use It - While using my Transformer I see myself using both the screen and the touchpad when docked. If I need to do a single quick hit I use the touchscreen. For finer repeated work I use the trackpad. And for longer reading sessions I use my thumb, on the screen. With my hand around the back of the screen. Good thing that the Google Reader app puts the forward/back button on the sides with the wrap around technique, because middle buttons tend to be a pain. And then Evernote absolutely nails it. They put their formating controls on the bottom of the screen, close to the keyboard. Even if it is a soft keyboard.

More of the GUI Has to Change - And this is where I think Steve-o decided to go the path he chose. My prediction is that OS X 10.8 will support touch screens (Mountain Lion? Tabby?). But there are things that need to change, and they need to be brought in slowly. No where is this more evident that in the new Launchpad. If launchpad were written five years ago all of the icons would be packed madly together. In fact, it would look exactly like the stacks do in list mode, but on a full screen basis. But now that people have been acclimated to the iPad Apple can ease the users into a more spaced out user interface. One friendlier to large hit targets and fat fingers.

So in effect Steve pulled a sly one by not addressing the 'hybrid' touchscreen/touchpad approach, while simultaneously taking the users halfway there with some of the improvements in OS X Lion. Touchscreen Macs would have been a failure in the current OS for reasons unrelated to flabby arm muscles, and that's why it didn't ship. But by laying some groundwork for a more touch friendly UX in Lion that places Apple in the position to make the shifts needed in 10.8 without it seeming overly dramatic.

Windows 8 File Explorer Isn't All Bad

There has been a lot of whining about the Windows Explorer ribbon update coming in Windows 8. Generally speaking I see this as a general usability improvement rather than a degradation. But there are some important caveats that need to be kept in mind when evaluating this.

It's not about you - These changes are not for the uber-techie developer crowd. It's for the casual to intermediate user. Because, let's face it, if you are an elite user you are likely doing a lot of your file management in the command prompt. Probably in Cygwin bash. That is of course assuming you are not running Linux or a Mac.

It's about touch screens - The biggest reason I see Microsoft going towards the ribbon is that context menus don't work on touchscreens. Tap and hold can feel like filling a bucket of syrup from a maple tree some times. In addition to the fact there is rarely a visual indicator that you can get a context menu anywhere, you just have to guess. With the ribbon you can see if there is a new context available for your selection because the tab area notifies you. And the buttons on a ribbon tend to be bigger than your vanilla context menu or event he old school menu bar / toolbar combo. Bigger buttons are friendlier to fat fingers and capacitive touch screens.

It's about command discovery - Did you know if you held down shift while right-mouse-clickingperforming the context menu gesture you get an option to copy the path of a file? Unless you read developer blogs you likely never knew that. But once I learned it I think that is one of the top things I use the context menu for! Now with more space on a menu to communicate those options any old user can see that feature, right in the home tab. Same goes with shift-delete, i.e. incinerate. No more hidden incantations needed.

It's about verbosity - Sometimes you need to be verbose. Take the view tab, now I know which of those funny side drawer icons is the preview pane and which is the details pane now that they have text. There was always a tool tip, but referencing my second point, fingers don't hover. And since it is on some tab other than the home tab, if I don't care about it I don't need to see it.

It's an appropriate vector for new features - Open command prompt here? That used to be a "power toy," and as a developer with an affinity towards command line build tools, it's awesone. And since the casual user never opens the file menu they never needs to be bothered with it when they habitually clicks on the right mouse button. 

Some people are never satisfied - That's one of the things Steve Jobs nailed when he saved Apple from the dustbin of history -- you can't please everyone. I wonder if OpenDoc guy is still fuming about Steve capitulating to OLE (as if it matters anymore). But i you can articulate any opinion, there is someone out there who has it. I personally know someone with an irrational hatred towards wizards or anything wizard like, and still develops in enterprise software in Emacs and thinks the caps lock key should be the control key. Whiners are everywhere, and there's no accounting for taste.

If there is one thing I could change from what I've seen in the videos, I would have the ribbon start out minimized. Or at least globally remember the last minimized/expanded state.

Collapse this post

 

Well That Was Quick

I was the proud owner of a 2011 11" Macbook air (4GB model) for all of 20 hours. I returned it because while I'd spend $300 on a display with haloing, I won't spend $1300. And what made it more frustrating was that every single Air at the Briargate store was exhibiting the same haloing, all the floor models and one more from the back they opened up for me. It's a shame because I really wanted a nice 11" ultrabook but with a display issue like this and especially with a screen that small haloing like that will freak me out all day long.

It also made me wonder if I'm being to hard on what I expect when I spend on tech. I owned a Xoom for about a week before I returned it. I hated hated hated the location of the power button. While it is cool at first making it the only location was a totally asinine decision. If it goes to sleep I then mustpick up to turn it on.

Then I tried an Acer Iconia 501A. The screen made my eyes hurt, so bad that I took the tablet back to the store that night. You just can't figure out those things in a warehouse.. err... I mean a showroom. The lights are always florescent bright.

I also returned an OG Droid the day after it was released. The slider mechanism was inexcusable, it kept opening in my pocket. I swore off thumb keyboards after that.

I also returned a 1st and 2nd generation iPod Touch. They both had the same flaw, if you synced it twice to the same instance of iTunes, without restarting the process, it would randomly reset the time to something within the past 12 hours. i.e. data corruption. Because I don't wear a writswatch my phone/iPod is my timepiece. Back they went.

So while I am generally tolerant of "almost there" defects, like the Genius button on the MyTouch 4G being a general wast of CPU cycles, there are some "instant win" defects that make me demand my money back. Things like displays and power buttons really cannot be ignored.

http://forum.notebookreview.com/apple-mac-os-x/606276-2011-13-macbook-air-inconsistent-screen-quality.html