One More Time, From The Top

Last time I’ve demonstrated a way to create mosaics from images. I wanted to do a little bit of image processing using javascript and HTML5’s new canvas abilities. As I mentioned, this was only the first of an idea I had about turning social experience into a beautiful, expressive and personal graphic.

Mosaics, Revisited

Canvas is an extremely powerful concept, allowing web developers to create more expressive web pages. The web will soon be filled with rich user experience and we will be dancing like it’s 1995. This has been a long haul, but we are finally WINNING. I just hope we have better designers on the web than we did on the desktop. I never (ever!) want to see the Word 6.0 toolbar sprawl on a web page.

My favorite web sites focus on content. They try to let everything else blend into the background. On the best sites content is king. Google, YouTube and Facebook all use a clean, white background, but there are other examples for beautiful design. TheSixtyOne is both artfully designed, while the functionality just melts away into an incredible user experience.

So, I took the mosaic idea one step further, creating a (very simple) tiling jQuery plugin that allows to recreate a large image from small images. Here’s a demo.

Continue reading →

Honing my Craft

Baby Steps

I’ve been programing for the better part of my life. I’ve started with BASIC, in which I’ve written a small piece of software that allowed me to manually paint a series of bitmaps and animate them. My home computer had a 4-color CGA screen, and the computer at my school was a blue-black Commodore 64, but I knew I was hooked.

In high school I’ve written my first big project as part of a computer graphics course. I ended up creating a (very bad) car racing simulator in Pascal, complete with track editing and several car models. I’ve created all the graphics from scratch, from line rendering to lighting gradients on surfaces, camera tracking and even font display. The year ended just when I was about to add the simplest AI for an opponents car. Pascal was the language I used when I’ve learn the basic concepts of Obeject Oriented Design and the use of pointers.

University is just a blur of C/C++, Java and Matlab, but mostly it was about theory. There’s nothing in the university that prepares you to become a better programmer. I’m not saying that it should, either, just stating a fact. In the basic curriculum, even though many classes require that you program, almost none of them teach best-practices, processes of developing as part of a team, source control, bug tracking, unit testing, etc. Even design patterns are hard to come by. When I left the university, I wasn’t a much better programmer. I was just a little more experienced, and I had a much better resume (Java? Sure, I’m very experienced with Java!).

What did I learn?

Bits of Useful Knowledge

Surprisingly enough, linear algebra rises to the top. Most of the math classes are about learning how to learn and learning how to think. This is how you approach a new subject. This is how you dissect it to pieces, and build knowledge on top of other knowledge. This is how you read a scientific articles. Linear algebra was the only subject I used in later classes, and in my career later on, in subjects such as machine learning and image processing.

Machine learning algorithms, which later I’ve used for data mining. This one course I’ve taken on a whim, was broad enough so I could navigate my way around the subject during my years in BigCo. I have come back to this course again and again, when devising classification and clustering algorithms.

Data structures and basic concepts of complexity. This is the single most important thing that a programmer could get out of the BSc in computer science as it is built today. Even though these data structures are already implemented in most languages, knowing how they work and when to use them is very useful.

Bytes of Outdated Knowledge

Turing machines. Calculus. Outdated models of database design and concepts for relational databases. Classical mechanics.

Things I’ve learned in The Real World and I Wish Someone Would’ve Told Me

I’ve really started honing my craft when I’ve arrived at BigCo, fresh out of the University. The first thing I had to do was read a long and boring book about the working of relational databases and schema design. Most programmers hate the database. They hate the interfaces to the databases and they wish they didn’t have to deal with it. They don’t like the fact that it has it’s own language called SQL. Most of all, they don’t like the  fact that there’s a lot of black magic in dealing with a database, because the thing is so damn smart, you can hardly predict how it will behave.

At this point I realized that most of what I’ve learned in the University is outdated and wrong. Complexity models are a terrible model to anticipate behavior. In the real world, you are not plagued by O(NlogN) problems. You are troubled by the time it takes to the spindle in your hard-drive to spin, the seek time, the read speed, the round trip between servers. You are interested in cache behaviors and what to do when not everything fits in memory.

The basic concepts of schema design don’t work. Normalization? Huh. No wonder programmers are flocking to NoSQL solutions. Everything they think they know about databases is wrong, because Universities teach bad-practices.

There is no Spoon

Once I was free of the notions of academia, I was free to start reading on my own. Google, blogs and Wikipedia really came to the rescue here. I’m not big on books (teach yourself nothing in 21 days), and rather have a constant stream of news, tips and relevant knowledge as I need it. My reading lists change often. C# and .Net gave place to Python. Centralized source control were replaced by decentralized source control. Model-View-Controller (MVC)  is now Model-view-template (MTV). Waterfall became agile.

Until I’ve left BigCo last year, I was always learning new things, and I’ve had the privilege to test new ideas both inside and outside of BigCo. I’ve learned that the most important thing is not taught in schools: It’s about the people. A small, dedicated group can out maneuver a bigger group by adopting better processes, not better technologies. Human interactions and communications are more important to a team’s success than anything you can learn in computer science.

I haven’t learned any new technology this year. Instead, I’m now spending part of my time honing my craft and becoming a better programmer by learning about processes. I think you should too.

The Right Hand Side of The Network Effect

We all know about network effects. We understand them intuitively.

In economics and business, a network effect (also called network externality) is the effect that one user of a good or service has on the value of that product to other people. When network effect is present, the value of a product or service increases as more people use it.

The classic example is the telephone. The more people own telephones, the more valuable the telephone is to each owner. This creates a positive externality because a user may purchase their phone without intending to create value for other users, but does so in any case.

Network Effect, Wikipedia

The Four Stages of Product Adoption

I bet most of you know this image. Dividing customers into early adopters, majority and laggards is Business of Software 101. What we usually don’t discuss is the effect of the accumulated graph, which is the level of technology saturation.

The stages of a product need to fit not only the type of people in the segment, but also the level of market share and saturation in the population. Getting a repeat customer is very different than selling for the first time. Expectations are different and so the product must be different.

Network effects are paramount to the adoption of new technologies, and not only because early adopters talk about them and evangelize them. Network effects have everything to do with usability, and this is something you need to understand when you think about strategy.

1. The Runway (The Chicken and Egg Problem)

Let’s take HDTV, as an example. We don’t usually think of TV as a business with network effects, but in fact it has very strong network effects. The more people buy TVs that support HD, the more incentive there is for media producers to provide HD content. It also goes backwards. The more HD content is out there, the more people will buy HD television sets. Basic rule of network effects applies: value is proportionate to adoption rates.

Early adopters eat eggs for breakfast, if you show them a chicken. The rest, not so much. The runway can be very long. Fax machines took almost twenty years to catch up. Color TV took ten years, etc.

2. The Hockey Stick (Ramping Up)

Network effects are getting stronger. Value of adoption is rising as the product gets more popular. This is what every investor is looking for.

The Hockey Stick growth phase is a wild ride. You hang on for dear life, as you turn (faster and faster) into the next big thing. You will see very steep growth in revenue. You are happy, your investors are happy, your users are happy. This is when DVD becomes available at every Blockbuster, the USB port is suddenly available on every computer or the internet makes newspapers look arcane.

The image below displays adoption rates of some of the most popular technologies of the past century. The X axis is time and the Y axis is percent of penetration. You can see the hockey stick on most product. Then, there are those who seem to rise slower, like cable TV. That also has to do with network effects (or lack thereof). Click on it to see a larger version.

3. Saturation (Super Size Me)

Everyone has a TV, a DVD player, a cellphone. Revenue streams steadies, as there are no more new customers buying the product. Stockholders are anxious. They expect the company’s revenue to continue to grow. Strategy changes drastically.

There are no more new customers. Now you need old customers to replace the product they already have. I replace my cellphone every two years, my DVD player breaks every six months, the TV goes out every five. How do they manage to get me to spend, spend, spend? There are several strategies:

  • Sell more to each customer. A household of six should have four TVs, six cellphones and three cars. Wait. What? When I was your age, we only had the one horse!
  • Sell better features, minor changes within the same technology. This is the age of bigger TVs, super sized McDonald’s meals, smaller cellphones, shiny cars.
  • Sell services and not products. Flickr for your pictures, YouTube for your videos, Facebook for your friends, and very little ownership.
  • Make it to break. Price goes down, and so does quality.
  • Make minor changes to the technology. Faster networks (and the always-connected-bandwidth-guzzling iPhone charged by the kilobit).

4. Decline (So 90’s)

Ye Olde GramophoneVHS was replace by the DVD. Newspapers are replaced by news websites. Books will be replaced by e-readers. Each of these newer technologies had or will have a long runway, but change is inevitable. The old product declines inversely to the hockey stick growth of its replacement.

Some companies predict the change, and move from one technology to the next. Others die. It’s the circle of life.

Technical Addendum

Bass Diffusion Model helps you calculate the adoption rates of your technology:

So if at given point in time t, N(t) consumers have adopted the new technology, and a total of x(t) consumers have adopted it so far, 0<p<1 is the internal influence  and 0<q<1 is the external influence (the network effect) then dx/dt is the rate of adoption of the technology by the market.

For more on this, you can read the materials from a course I’ve taken about diffusion of new technologies, available here.

So can you now predict the growth of your product?

Location, Location, Location

estate agents explain that the three most important features of any apartment is location, location, location. The Internet made the world a small place, ubiquitous, the entire world shrunken to the size of a dot at the end of a mouse cursor. Well, that really doesn’t work that well for us. We live local. We interact with local businesses. We have local friends. We speak local languages and eat local food.

There is no wonder, then, that we see so many geographical services popping about. The virtual world is changing again. It is no longer a dot. It is expanding to contain the physical world.

Our Images Interact

I’m fondly following Microsoft’s image registration technology for a few years, since the first demo of Photosynth. You can try this demo (requires Silverlight):

Photosynth has the ability to analyze photos and register them into a three-dimensional model of the location, which you can then navigate through images. Take a look at the demo, to get the notion of what I’m talking about. This is a new way of interacting with imagery. Today Photosynth is limited to demos and small locations, due to copyright issues. What they really wanted to do is take all the images on the web and register them into the three dimensional model of the world they are gathering.
Imagine going to the Empire State Building, pointing your iPhone at it and seeing pictures taken by other people, sharing notes, and adding your own pictures into this global pool.

Reality Augmented

Microsoft is trying to beat Google Maps for a long while now, but the service really wasn’t much more than a me-too, with a slick UI. Live Maps wasn’t as fast and snappy as Google Maps, and frankly, it was integrated with the wrong search engine. Live never really took off.

Bing, however, is a different story. Steve Ballmer knows why Bing is better. And it is gaining some serious traction. Statistics show Bing is at 10.7% of the search market share – and growing. If it keeps this up, I may have to actually test this search engine and see what it’s all about.

Bottom line is – after many faulty starts, Microsoft has now taken a serious swing at Google. They are combining all their imagery projects together to create a very interesting experience. Enter Bing Maps. Watch this eight minute demonstration of Bing Maps given at TEDActive this week. I literly heard a Klang as my jaw hit the floor.

Playing around with Google Maps and hearing about Google Goggles, I must admit the race is very tight. Microsoft may actually be one step ahead in the technological field, for the time being, but their execution still needs work.

Wii Hacks and Other Innovative Interfaces

For years, we have dreamed of liberation from the limitations of our computer. We wanted a computer that was portable. We wanted to use controls that were designed for humans, and not for computers. We wanted to be free when interacting with our world. And we wanted the computer to just understand us.

Here are few examples of innovative user interfaces:

Head Tracking & VR

I’ve learned about Johnny Chung Lee about two years ago, when a video instructing how to create a hand tracking  user input device that costs less than $50 went viral on the net. Since that day, I’ve followed Johnny Lee with awe, as he was involved in many other innovative interface projects.

How to use the Wiimote to create head tracking, and enhance first person shooters to full body motion. And the code is open source, so you can download it and start making games.

Low Cost Electronic Whiteboard

How to use a simple projector with the Wiimote to create an electronic whiteboard at a fraction of the price. If you are like me, you like using a physical pen and whiteboard to express yourself, but hate copying the result of your doodling session. Problem solved.

Direct Muscle-Computer Interface

Using electrodes to read the electric pulses from you arm muscles can turn your hand into a four-key input device. This can help you control devices when your hands are busy – for example, when exercising or carrying the groceries. It can also be used to play air-guitar hero, Guitar Hero with an air-guitar!

Project Netal

This amazing project by Microsoft is turning computer vision to a whole new level, making the Wiimote feel like a clunky legacy from a time when we actually needed controllers in order to interact with computers. Netal is by far one of the most ambitious projects I’ve seen in a while. I suppose there’s a good chance it won’t be as good as promised, but there is still time to hope.

The Sixth Sense

Pranav Mistry turns the computer and the entire Internet into a wearable, portable, invisible tool that enhances our lives wherever we may go. Using current day technology, he was able to create a new paradigm of personal computing. Unlike Netal, Sixth Sense isn’t pushing the boundaries of what is algorithmically possible. It uses simple mechanisms to change the way we interact with computers, to create a more useful synthesis between the real and the virtual world.