-
Get a monthly update on best practices for delivering successful software.
A few weeks ago, I wrote about the Skype Video Phone, part of a trend towards trading needless complexity for simplicity and ease of use. It's also on the wrong side of another trend: The trend away from single purpose mobile devices to flexible mobile platforms.


For a while there was a trend towards more and more purpose built digital products, from ebook readers to portable picture frames and pocket size digital cameras, all the way to recipe, to digital recipe readers ($299), to tablet pcs with tough cases, handles and barcode scanners for the medical industry.
The iPhone, the iPod Touch and the soon to be launched iPad signal a reverse of that trend. Apple has designed and built flexible platforms that combine the ease of use and simplicity that single purpose devices with the flexibility of general purpose devices, and that is proving to be a compelling value proposition.
On the iPad, for example, you can easily get as good or better a recipe reader experience as you would with the demy digital recipe reader, a better digital picture frame or slide show experience than with a digital picture frame, likely as good or better of an ebook reader experience, and likely as good or better of a bar code scanning medical tablet experience.
How is that last possible, when the iPad does not come with a bar code scanner? The solution will likely be through peripherals built into functional cases. As an example, take a look at the digital checkout devices like Apple's own EasyPay touch (used at Apple's retail stores), Verifone and Morphie - that combine a magnetic card reader, a bar code scanner and a battery in a case for an iPod touch.



And of course, when the video enabled iPad finally comes out, it will likely replace the Skype Video Phone that my parents so love.
Topics: ease of use, iPad, iPhone, Kindle, Mobile, purpose built devices, simplicity

Tiling a Polygon
One of the most challenging problems I came across working on a .NET PDF Annotator and Editor application was to tile a 2-D polygon and also accurately determine the number of tiles that fill the surface of the polygon. The tiling part was not as much of a challenge as the counting part. The tiled polygon was to be rendered on a PDF document since the application in question is a PDF Annotating and Editing tool. We looked for anything the third party .NET PDF rendering/manipulation API that was used could provide for the tile rendering but there was nothing unfortunately.
So we set out to use C#'s native GDI+ library to render the tiles for the polygon. After trying out different approaches to accomplish the rendering of the tiles, we discovered the one that would work best. The idea was simple. Every 2-D shape on the drawing surface has a bounding rectangle that encloses the shape. Starting from the top left bounding point of the rectangle, iteratively render a rectangle (tile with whatever length and width) across the X axis until the right most edge of the rectangle and this iteration needs to happen over the Y-axis (not sure if I explained clearly enough
. So now we have rectangular tiles laid out across the bounding rectangle for the polygon. GDI+ gives us a clip method that allows us to clip the rendering surface to a specific graphics path or region. Using the clip method, clip the drawing surface to be the graphics path for just the Polygon so that only tiles within the polygon's graphics path get rendered on the screen. We could apply other transformations to the rendered tiles like offseting, rotation or a gap between each tile.
Coming up with the most efficient way to count the number of tiles (including partial tiles) was a little trickier than rendering the tiles. It turned out that the ideal approach was to essentially count each tile as it was drawn and checking whether the tile was partially or fully part of the polygon's graphics path/region. So, there is this method Region.IsVisible that lets you test whether a rectangle is partially or fully contained within a graphics region. During the rendering of each rectangular tile, the method was used to check whether the tile was going to be part of the region associated with the polygon and was counted if it was going to be. Even though, this was the most efficient solution for the problem, we did nt see 100% accuracy sometimes when rotation transformation was applied to the tiles. Still havent found an answer to this anomaly.
Topics: .NET, C#, Drawing, GDI+, Window Forms Development
We've discussed the benefits of Agile development before and that the iterative approach to building the architecture -- where you explore architectural issues (very few apps are completely new and unknown) a little bit through each iteration -- is an effective method for arriving at a good application architecture. What is less obvious is the psychological benefit to working in this way.
It's frankly been a while since I've participated in a large waterfall project directly (one benefit of working for a firm that does agile software product development), but I regularly talk with folks who are still in the corporate trenches doing things the old fashioned way. One thing that hasn't changed is the BIG ARCHITECTURE wrestling match up front. Management wants to know the architecture, the guys with "architect" in their job titles want to know the architecture (so they can criticize, natch), the project manager(s) want to know the architecture. How will we scale? How will we ensure security? More useless brainpower is spent on this ultimately fruitless task -- solving problems that end up being no problem at all -- than almost any other activity in the project.
Topics: agile, Divide and Conquer, Stress, waterfall
Sphinx (and its rails plugin thinking-sphinx) is my choice of search engine on ruby/rails project. It is powerful yet super easy to setup.
However, testing Sphinx code is not easy at first. Since Sphinx works by leverging database commit hooks, it cannot be tested within the bounds of unit testing framework that rails provides. This is understandable because, in rails testing, a transaction is started before each test that is bound to rollback after the test is finished. Since the test data is never committed, sphinx doesn't get a chance to index anything and cannot be tested.
The documentation for sphinx testing suggests using cucumber for integration testing. To me, cucumber test are still miles away from the smallest piece of sphinx code (inside Model) to be tested. So, I turned to how transactional code is tested in rails framework for some cue.
Here is what I ended up with:
class TransactionalUserTest < ActiveSupport::TestCase // any transactional test needs to have this self.use_transactional_fixtures = false context "with no users in database" do setup do // clear the existing data for our test - not sure if this affects other test but we use machinist instead of fixture files, so we should be good here. User.destroy_all UserProfile.destroy_all end context "with a few users created" do setup do @john = @david = nil // any data for sphinx test should be wrapped in transaction so sphinx can see these changes User.transaction do @john = User.make(:first_name => "John") @david = User.make(:first_name => "David") end end should "find user with first name john" do // start sphinx server ThinkingSphinx::Test.run do // give sphinx an opportunity to index newly added data (required before calling search) ThinkingSphinx::Test.index assert_equal([@john], User.search("john").collect) assert_equal([@david], User.search("david").collect) assert_equal([],User.search("cheese").collect) end end end end end
Isn't it nicer to be able to test sphinx code in isolation
I remember my first real grownup and serious web project outside of the university environment. It was 1994 and SSL was a novelty. People were making insane predictions that one day up to $600 million (think Dr. Evil) worth of consumer goods would be sold on the web worldwide. In 2007, just Canadian B2C sales were US$12.9 Billion.
Some folks, especially startups and smaller companies, saw the web as an opportunity to shake up the established order and establish a new sales channel or an entirely new business model. They invested what they could in building the first of what became known as e-commerce sites. Among established players, and some more conservative smaller players, there was initial hostility toward the new medium. When in 1994 I proposed to Ameritech (now part of SBC/AT&T) that they bring their lucrative print yellowpages online, I was run out of Hoffman Estates on a rail.
A friend of mine from college is a physics professor who does a lot of stuff with the space station and the new Google Lunar X Prize, that awards up to $30 million for the first non-governmental organization to land a robot on the moon. He likes to get his students involved and has a gift for expressing things in terms they can immediately grasp. "The robot," he tells them, "can be small. Think of an iPhone with wheels."
When something has penetrated the collective consciousness the way the iPhone has, it changes the way we look at what is possible.
Topics: Google X Prize, iPhone

It's no accident that Steve Jobs is arguably the ultimate technology pitch-man. He's worked with some of the best designers, ad agencies and creative people on the planet even since the early days of Apple. But how would he pitch your idea? It's a fun question to ask and I found a book that just might have the answer. While browsing in a discount brick-and-mortar bookstore I came across "The Presentation Secrets of Steve Jobs" by Carmine Gallo of Businessweek.com. There was one copy on the shelf and it immediately caught my attention. As I flipped through the pages, I was impressed with the many "how-to" pieces of wisdom. For example, you'll see how answering four simple questions can yield a powerful elevator speech. You'll see how to use high impact words, tight headlines and key numbers to get your point across in a way that seems effortless. While I think the book is a "must have on your desk" for product managers and marketers, I also think it's a great reference for designers to think about what makes a design more marketable and enticing to the customer.
Topics: apple, keynote, marketing, presentation, product manager, Steve Jobs
Laptops are a strange, inefficient tradeoff between an iPhone’s portability and a desktop’s capabilities. They don’t satisfy either need extremely well, but they’re much closer to desktops than they are to iPhones. The usefulness and portability gap between a laptop and an iPhone is staggeringly vast ... Ergonomics are awful unless you effectively turn them into desktops with stands and external peripherals. But they can do nearly any computing task that desktops can do, and they’re able to replace desktops for many people.
- Marco Arment, “The Tablet” and gadget portability theory"

One of Steve Jobs slides during the iPad announcement last week showed an iPhone, a macbook, and a space in between with a question mark. Was there room for a third device between a laptop and an iPhone?
If it's a small space, suitable for a few niche products like the Kindle, then the iPad hullabaloo is much ado about nothing. If the space is big, and eats into laptop market share, then this becomes a major turning point in how we interact with computers.
Apple is betting that the space is big, and that the future of computing will look a lot more like the iPhone than the Laptop. Let's think about what that means: If Apple's tablet, like it's smartphone, and it's music player before that, becomes the preferred and dominant device of it's kind, and that device starts displacing the preferred computing device of the current time (the laptop, which in turn replace the previous preferred computing device (the desktop computer), a market for which they currently only have 8.8% (although 91% of laptops above $1000) then they win really big.

Why would you replace your laptop (with it's bigger screen and it's moderately comfortable keyboard) with a tablet?
Both are portable, but a tablet is more portable, and more usable while on the go.
To realistically use a laptop, you need a large surface, enough room in front of you, and preferably a seat. Otherwise, you look like this.
A seat on the subway or in economy class on a plane is too cramped and uncomfortable for most people. You need at least some time.
For the times when you need a keyboard - when you're writing an email, or a document, or a presentation, or developing software - you can set your tablet up in a work environment, just like you do with your laptop - docked, or at least connected to a large display, a wireless keyboard and a wireless mouse. You can take the last two with you when you go home, or to a coffee shop, or your in laws house.
Those rare situations where you really need that full keyboard in that cramped setting without a work surface, you can either make do with the onscreen keyboard, or find yourself a flat work surface when you need a laptop.

Of course some people will not be able to do without even in those rare circumstances, like this fellow on a plane, or like those who cannot do without their blackberry, and those people will not switch (at least not right away.) The same way that many people bought desktops for a long time, and then eventually switched to laptops when the computing power difference and cost difference no longer outweighed the convenience factor.
But for the rest of the world (and I'm betting that's a much larger audience,) having a multifunction, always connected, portable computing device that I can use like a desktop or in truly portable fashion will be clearly preferable.
At that point, you've introduced a serious disruption to the personal computing market. People who don't buy your laptops but buy your iphones and ipods, now will have another reason to buy a device from you, that's a replacement for their current laptop (likely not a mac, but a windows box.) If that happens, Apple will have won not just the current battle, but the war with Microsoft and IBM that they fought and lost 40 years ago. If it happens, that's the business story of our time.
A while back I looked at the Vaadin Plugin and tried to make it work with the Multiton PureMVC. Back then I proposed the following code:
public static ApplicationFacade getInstance() { if (instance == null) { // nuke the multiton so we can do the grails recompile if (ApplicationFacade.hasCore(CORE)) { ApplicationFacade.removeCore(CORE); } instance = new ApplicationFacade(CORE); } return instance; }
A little more noodling and you'll see that doesn't work. In a multi-session environment, each user will need his own core. Furthermore, inactive cores should be harvested, otherwise we will have a memory leak.
Continue reading »

I just finished looking at a couple of live blogs on Apple's big iPad event, flipping back and forth between Macworld and Ubergizmo's coverage.
While initial reaction has been all over the map, mine is overwhelmingly positive. I think they hit a grand slam.
Here's why:
1. There are lots of reasons why a tablet is a better mobile device than a laptop or a netbook.
2. The price is right (Starts at $499, goes to $829)
3. The data plans are right (Wifi, 3G $14.95 to $29.95 for data plan coverage from AT&T, use at all wifi hotspots, no contract.)
4. iWork for $30. Web browsing, photos, vidoes, reading, games, email, word processing, spreadsheets and presentations - that's 95% of what 90% of people do with a computer.
5. Dock and Keyboard. Use it like a desktop, if you must.
6. iPhone and iPod Touch software works on it now, the SDK (iPhone OS) and emulator are released the same day, and units will ship in 60 days. That means iPhone developers like us will be pushing out new versions of those 100,000 apps as well as brand new apps out there as fast as we can design and code.
7. The app store model makes installing new apps a one click affair. I don't get any "Honey, can you help me" shouts from my wife with the iPhone, and I wont get them with the iPad either (especially since it doesn't have a camera;-)
In short, this is great news for those people yearning to trade away technical complexity for vastly increased simplicity and ease of use.
Sure there are things that a lot of people (smart, tech savvy analysts and developers all) will bemoan* and think are missing, but the same thing could be said of the iPhone. It's Apple's way (only release it if it kicks ass and makes them money) it works, and it will work here as well.
* I of course was hoping for front facing video camera for video phone support.
Topics: apple, apple tablet, iPad, iPhone, iPhone SDK, tablet, touch, touch screen
Anther interesting item from yesterday's earnings call:
Over 90% of iPhone apps are approved within 14 days of submission.
Given over 100,000 apps in the store from a wide variety of developers (from amateurs to experts) and a wide variety of topics, that's actually pretty good. Apple claims that most rejections are actually for bugs in code, which makes sense given the wide disparity in development quality and test coverage.*
* For example, are you testing your software for ipod touch as well? You should - applications have been rejected for working on the iPhone, but not the iPod touch.
Topics: ap store, iPhone, ipod touch, Testing
Macworld’s Coverage of Apple’s Quarterly Results and Finance Call had some interesting news on continued enterprise iPhone adoption:
Not bad given that Apple has only been in this business for 2.5 years.
This certainly jibes with a lot of what we are seeing from our customers, that the iPhone is the first choice for mobile application development and the first choice among consumers and corporate customers when given a chance. It also validates our recommendations from last year on which mobile platform to develop for.
Let's see what tomorrow's big announcement brings.
Topics: enterprise iphone development, iPhone
This morning I sat through two pitches by two startups looking for funding. I won't get into the details, but they both had clever ideas at their root. But while one company was attractive and poised for success, the other was mediocre and not getting much traction. Why was that? They both had clever ideas, no?
Over the years I've looked at a lot of business plans for Venture Funds. The first lesson that I learned was that cool ideas didn't equal successful companies. While I would get all hot and bothered by a particularly elegant software solution, the VC's I was consulting to preferred the plans that understood the market and the customers in it (and had a kick ass management team, natch).
Continue reading »
Topics: User Modeling, Venture Capital
Academic research is incredibly inefficient when it comes to producing products and services. Grad students, post-docs and professors work on "problems" that some collection of graybeards has deemed "interesting." Their "solutions" -- sometimes successful, sometimes not -- are published as research and then, occasionally, if the stars align, is turned into a product or service through the application of venture capital via a startup.
The only thing less efficient in producing innovative products and service is the corporate R&D department. In most places you have a phase-gate process (waterfall under a different name) of conceptualization, feasibility testing, definition/specification, development and launch. They are typically bloated, bureaucratic monstrosities with huge documentation requirements and endless committee meetings that do more to stifle innovation than promote it.
There is a way, however, of applying Agile principles to the concept phase, and it relies on two of the basic tennets of Agile: failing fast and self organizing teams.
Topics: agile, Innovation
As an answer to those asking why we need a tablet anyway, there's a very funny set of pictures and comments at WTF Is Wrong with Laptop Users in the Media. The author went through the first 400 images (out of 28,886) he got on a search at Getty Images of "Using a laptop" and compiled the highlights. My favorites:





Now ask yourself, in which of those pictures would (a sealed, always on, always connected) tablet make more sense?
In all of them (although the beach one still seems like a bad idea.)
Topics: apple tablet, laptop, tablet