2012-12-12

Happy Path Programming

There are two kinds of sloppiness in software engineering that really annoys me.  Both are variations over the same theme:  just programming the "happy path", the scenarios where everything works and everything is okay, and just skipping the rest.

The first has to do with misapplication of the current fad in startups "lean".  Everyone is "lean" now and everyone is doing "minimum viable" this and that.  Well, that is all well and good when you need to validate stuff.  You should go at it as heartlessly minimalist as a busload of Bauhaus architects when you need to validate something.

But it is idiocy when it comes to stuff that doesn't need validation.  For instance, when Toyota build a new car they do not put cardboard brakes on the car because they need to validate a bunch of stuff and they think they can skimp on brakes.  They put real brakes in.  Because they know the car is going to need brakes and they know how to build brakes(*).

The other comes from people trying to sell you some technology.  A framework, a language, whatever.  They'll show you how you program the happy path and point to how easy that was. ...And then mostly omit gnarly real-world stuff like error handling and the fact that someone might come along to maintain the code or perhaps even integrate it into something else.  Quite possibly without the benefit of developers that are as enthusiastic about whatever it was you got tricked into buying.

Turns out that when you add all the stuff you actually have to think about back in, it isn't so easy after all.  Because the cognitive workload lies in actually understanding the problem you are solving.

(*) Actually, they just take the brakes off the shelf and bolt them onto the car.  Because they have this brilliant concept of components that can be re-used by composition on different cars.  But you get the idea.

2012-12-02

UI challenges.

When I wish to fire up an application on my smart phone I don't really look at the icon -- I usually remember the position.  

Call?  Bottom left.  Mail?  Second icon, bottom left.  Audio books?  Second screen, first line, second from left.  Podcasts? Third screen, next to last line and either second or third icon from the left depending on what sort of disappointment I want today (Apple's podcast app is utter crap and the alternatives are just slightly better).

I have something like 6-7 screens of icons.  Anything I don't use many times every day is a pain in the ass to find -- that is: anything for which I can't remember the placement.

Of course, I could have arranged icons into groups, but moving things around is exceptionally clumsy.  It'd take hours to figure out a good arrangement and then move things into their new places -- on both of my iOS devices.  That works for 2, perhaps 3 screens of icons, but not if you have lots of screens.

Grouping, hierarchies, space.


iOS needs an automated grouping of icons and some fast workflow for navigating them.  If you show a human a hundred icons, she isn't going to find shit.  Humans can't orient themselves if you present them with an overwhelming number of items at the same level.  Our brains work by association, by spatial memory etc.  Expose us to long matrices filled with small patches of color and we get confused.

And you'd think that making icons stand out by shape and color would make it easier.  On the dock of my Macs (which have much fewer icons and are a linear affair) finding the iTunes icon requires actual concentration.  "Blue and round" is not sufficient to locate the iTunes application on pure reflex.  I have to look and to make sure I don't click any of the other blue and round things.

Just to make it clear: I don't know exactly how to solve this.  Designing intuitive and fast interfaces is exceptionally hard.  But I have a sense that hierarchy and spatial placement will play a role in solving this properly.  We will also need some way of applying the same organization across devices.

My desktop.


As an aside, when I work on my desktop or laptop I have a system for organizing things that means I can find anything with one, possibly two key combinations.  Some time in the early 1990s I started using window managers that support having multiple virtual desktops.  For almost 20 years now I have arranged my windows in the same manner:
  • Desktop 1 (communication) : chat and messaging
  • Desktop 2 (browsers) : two side-by side, vertically maximized browsers
  • Desktop 3 (programming): command shell on the left, Emacs on the right
  • Desktop 4 (shells): additional shells, music player
Most desktops have two tiled windows covering all of the screen real-estate.  Some things have changed over time.  For instance I used to read mail in Emacs.  Then I started to use Mozilla Thunderbird, and then I started to use Gmail for all my mail (because who wants to manage their own mail server these days?).

The thing is: I know where everything is.  I can go to any window in one, perhaps two key combinations.  I have a spatial model in my head of where everything is.  I never look for lost windows.

As I said, I don't know how to solve this for mobile devices and small screens, but just having heaps of hard-to-manage icons on the same level doesn't work.  Grouping them manually doesn't cut it either -- especially not with the current UI for doing this on iOS.  But I think a solution has to involve automated placement in both conceptual hierarchies and space.  We are good at association and spatial reasoning -- we suck at rapid identification of small, similar-looking, meaningless icons.