New kinds of computers

I wrote a post some months back about the new trend to make computers appear more and more like appliances instead of exposing their programming guts. I am still trying to figure out if that is a good thing or not, but here is an interesting article I read with someone else’s perspective. It is about a chance encounter between a yuppie and one of the computer greats in a Seattle coffee shop:

However, the rot is even deeper; while we bemoan the inability of the lay public to understand the programming aspect of computers, as opposed to, say, the video displaying, music playing, web browsing aspect, even programmers are getting into familiar ruts of thinking.

My education about the arcane aspect of programming was at the hands of who I think is Chennai’s most innovative programmer, K S Sreeram, the inventor of the Clay programming language. K S and I meet up for the occasional beer and I always return enlightened.

Some time back, K S was on a trip about ‘live’ programming systems. In most computing systems, a team of programmers makes a program, which is sold as a package to a customer. On the customer’s computer, the program runs, processing input and producing output. However, there exist systems where the user has control not only over the input but also over the program itself, and has the power to change the way the program behaves through the program itself. This is called a live system.

The usual example that people give when asked to name one such system is the programmer’s editor, emacs. At the shallow end of the pool, a user can use it as a notepad replacement. However, with experience, a user can create so-called macros in emacs that are sort of mini programs which add functionality to emacs. These macros are written in a language called lisp, which can be executed by emacs. And the beauty of this program is that emacs itself is written in lisp, with all its accompanying data structures. So an emacs expert could use emacs to modify itself.

So computer programs could, at the extreme case, be like emacs. However, there are a number of other models possible. When I started learning digital circuits, for example, I learnt VHDL, which is (in some sense) a programming language. VHDL is meant to model the behavior of hardware. So it has one interesting feature: instead of the various statements of a program running one after another, they all run concurrently. This gives rise to some very interesting program structures, which can all be eventually converted into a circuit diagram through a process of synthesis. The circuit will, of course, duplicate the behavior of the program.

But there’s another very interesting program model which combines data and code, and that’s the spreadsheet. In Microsoft Excel, for example, you could enter formulas into different cells which produce outputs, which are themselves dependent on other cells. So the data and the ‘code’ that produces the data can be tightly coupled into intricate loops. And formulas are not limited just to what you type in a single line – you could write an entire program in a language like Visual Basic that would perform complex calculations before updating a cell. It is by exploiting the tight interdependence of data and code that people have, for example, written flight simulators in Excel!

I think these ideas are important because we are now no longer limited to ‘standard’ computers, which execute a series of instructions one after another. Multi-processor systems could execute several strands of instructions in parallel. But more interesting types of computers emerge; for example, Fredkin and Toffoli proposed a billiard ball computer that (at least theoretically) would execute programs without consuming any power. It is only by expanding our definition of what a computer program looks like, that we are able to take advantage of the computational power inherent in the universe around us.

Inventing Aakash

Through a series of wheelings and dealings, I have gotten myself infiltrated into the Aakash project, which (if you live on a different planet and therefore haven’t heard yet) is the Indian Government’s plan to make a $35 tablet and universally distribute it to students. There was a review meeting yesterday for Aakash 3 (Aakash 2 is now shipping, as I understand it) and I have some strong opinions about the process by which it is conceptualized.

First, I must say the people engaged in this project nation-wide are very forward-thinking about the kind of applications that Aakash will have. I can’t reveal specifics, but I came away from yesterday’s meeting with a very upbeat feeling that this device, widely deployed, could revolutionize education in the country. The promise justifies the investment of time and effort that people are making on the project.

It was interesting to see the way Aakash is being designed (by committee), and contrast it with the way I designed Avaz (almost alone). And the way I was taught to design products in my first year in college…

The objective of product design is to build something that is useful to the customer, with the least amount of effort and cost, and in a reasonable amount of time. (As Steve Jobs said, ‘Real engineers ship.’) However, making a product involves making literally thousands of design decisions, from the color of the casing to the clock speed of the microprocessor. And this is true even if a product doesn’t need fundamental invention. What differentiates the good product engineers from the bad, is the way in which they are able to make those decisions quickly and efficiently, while being able to think outside the box, while always keeping the customer’s interest in mind.

It is not at all easy to do this. The problem is cross-linkages; if you add muscle power to a car, you increase its weight. If you add rich user experience to a tablet, you increase its cost. How do you make those trade-offs?

There are a lot of good engineers and product managers who make those decisions by the gut. They know the rough countours of a product spec (usually from competing products out there) and are able to tweak in the right areas to get things moving. However, if you are making a ‘first-of-a-kind’ machine, you’ll have to use some kind of process to stay on top of the Engineering beast.

When I started designing Avaz, I started with ‘use cases’. I visualized ten kids who would be the ‘power users’ of Avaz three years from its launch. They would use Avaz in different ways: some would talk to their teachers and parents using Avaz, some would achieve independence with their daily activities, some would use it for taking exams and finishing schooling, some would use it for creative expression. I visualized them to an incredible level of detail: their age, their gender, the occupation of their parents, the town where they lived, the number of aunts and uncles in their families… Then I visualized how these ten kids would use Avaz in their daily lives. I must emphasize that though none of the kids were real, they were all composites of real people (and I kept track of which real kids they were modeled from). This formed the basis of my ‘customer stories’. I wrote my customers’ success stories even before I had a product concept!

Then I used these stories to create a list of ‘user specifications’. These are specs for what the user would want to do with the product. For example, one spec was ‘should be able to demonstrate my personality through Avaz’. Another was ‘it should not break when I drop it’. Though I made the first list using my imaginary users, I showed this list to about 20 people (parents, kids, teachers) and fleshed it out, adding new requirements as people came up with them.

Then the difficult bit: figuring out how to convert the user specifications into technical specifications. This requires solid engineering understanding and deep product knowledge. For example, you need to figure out that the ability to control the pitch of a voice synthesizer would be critical in helping an Avaz user individualize the product, or that the drop-test performance of an enclosure would directly relate to its ruggedness.

What you do with the user specs and the tech specs next depends on who taught you design. What I do is something called QFD – quality function deployment. This is a table which maps ‘Whats’ – the customer requirements – to ‘Hows’ – how the engineer will implement them. In this table, you capture cross-relations between Whats, between Hows, and between the Whats vs Hows. QFD provides detailed guidelines also on how to assign quantitative measures to each of the Whats, and allows you to rank the Hows based on how difficult or resource-intensive they would be to implement.

If you have successfully built a House of Quality, you now have everything you need to make quick, good design decisions. You could create a weighted list of technical features, and order them based on how important each one is to each type of customer. You could do market research to figure out the segmentation of different customer types, and weigh their importance accordingly. And finally, you would come up with engineering specifications for your product.

At that point, the QA team takes over. I’ve always insisted, on all the products I’ve worked on, that when the designers get their pencils out, so should the testers; for each engineering spec, there should be a way to figure out the extent to which it is being met. Only then does the implementation team even get formed.

So that’s how I do design. I swear by QFD, I swear by testing, and I believe my customers.

I think the incredible potential of Aakash – and the sheer amount of resources the Government is planning to put behind it – means that some form of design quantification should be done before the pencils come down on drawing sheets. I’ll do my best to steer this agenda from the inside, but I have no idea how successful I’ll end up being. Wish me luck!

The nature of intelligence

I really cannot get yesterday’s audacious idea out of my mind, that there is no such thing as pure mathematics. Why is it so fascinating? I guess one reason is because I have always been fascinated by the nature of intelligence. What it is, where it comes from, how it relates to being human.

I remember when I was about 15 years old, I attended my first talk about AI. It was by a man called Vidyasagar but I wish I could remember more about him. He asked the question, if a computer program comes up with a new theorem in mathematics and proves it, where is the intelligence? In the computer? In the program? In the programmer? In the person who proves that the program works? And he went on to say that his own opinion was the last. It struck me as dreadfully strange. I was to bashful at that time to ask him why, and hoped someone else would, but no one did. So I never knew…

Now, however, I have a slightly better understanding about the nature of mathematics, so I can guess why. Let’s use Egan’s argument as a starting point. In Luminous, he asks (and I have asked this before), could there be a physical system that constitutes a proof of, say, Fermat’s last theorem? A certain configuration of billions of quarks, perhaps, that by its very existence proves it? Egan’s answer is, yes; if nothing else, a certain configuration of neurons in Andrew Wiles’s head is the physical proof of Fermat. This is still a bit bizarre for me to wrap my head around, but if true, then intelligence being defined as the place where the proof dwells is somewhat more acceptable.

The corollary, and this is another of Egan’s favorite themes, is that intelligence is a configuration. It is a certain state of matter and energy, a pattern, that doesn’t have to be spatially or even temporally contiguous. (This is the theme he explores in such detail in Dust.) This, too, mirrors my own belief. Do you remember that scene in Hofstadter’s GEB, where a character called Aunt Hillary is introduced? She is an intelligence that emerges from an ant hill. The ants perform a function in the anthill that mimics neurons in our brain, each ant having no intelligence at all but by their patterns being able to represent thoughts as deeply as any human.

The problem with recognizing this as intelligence is the limitation that we cannot communicate with it. Hofstadter introduces some whimsical way in which this anthill communicates with the world through pheromone trails, but I don’t remember the details.

I do remember thinking, though, that this mirrors a long held belief of mine, that trees are intelligent, albeit in a timescale and space scale that are so different from us that we cannot communicate with them.

At least, not yet. But as we slowly come to terms with artificial intelligence, I have faith that we will establish ways of communication with the millions of non human intelligences that lurk in nature, too.

Experiences blogging from a phone

I often find myself in situations where I have to post on the blog and am handicapped by either not having my computer with me or not having an internet connection. So the fallback option is always to use my phone and try to post.

I only have a 2g connection, so my experience of using wordpress on phone is limited by many factors. The wordpress admin site from which I make my posts takes forever to load on a phone. Much experimentation later, assisted in no small part by serendipity, I discovered that I could use the wordpress mobile site instead… m.wordpress.com and voila! the site is suddenly easier on the bandwidth, eye, and wallet.

The second limitation is that typing with the ancient phone I normally use (a Nokia E72, yes, I know, I must be the last one now) makes pulling teeth seem like a picnic in the park on a warm sunny day by comparison. It takes me 4 times the effort to type a post using its keyboard compared to using a computer (yes, I timed it). Part of the inefficiency is explained, perhaps, by the fact that I consider myself a fairly rapid touch typist, and on a small cell phone keyboard, touch typing is essentially touching with the thumb. The 4x slowdown is explained by the 4x reduction in fingers I can use.

Today I decided to try out a new phone and a technology that I have been curious about for ages but only recently got my fingers on… a Galaxy Nexus and Swype, respectively. It takes aim he getting used to, the number of fingers hasn’t increased, and the word predictions are sometimes an amusing distraction in themselves (for example, the word Number in this last sentence was mangled into the rather frightful sounding bum binder!), but this is something that I could have fun with…

Another thing I did was to download the WordPress app and use that instead of the regular webpage that I would have used with my Nokia phone. My hope was that this would help me overcome the severe styling limitations of using the mobile site, such as being unable to insert pictures into my posts. (The sharp detectives among you will possibly be able to use this nugget of information to deduce which of my posts so far have been posted from my phone.) But no longer… my cunning use of the app means that I can inflict my gratuitous use of completely irrelevant images in even the most hastily typed posts.

The final problem is that of multitasking. The way I write many of my posts is that I start with a germ of an idea which I expand only as I start writing…so much googling and Wikipediaing is done in the process of writing. This is still impossibly difficult for me to do even with a very smart smart phone.

No matter, though… the fact that I have completed this post (though today’s sense of achievement is more one of successful use of technology than any great intellectual achievement) is in itself testament to the fact that there is hardly anything you can do with a computer today that you cannot with a phone, and it’s only going to get better.

The world is full of simulators (part 3)

There is nothing quite like a simulator which works. I’ve seen them in action in electrical and mechanical systems – after lumbering through several hours of calculations, a simulator will tell you where exactly a bridge will buckle, or how much current exactly would flow through a transistor, and lo! it would be true. Simulators of bridges and transistors don’t simulate every atom and electron in their subject of simulation, but that’s the wonder of engineering: you don’t need to make a simulator so exact – the results are very nearly the same even if you use a vastly simplified model of the object being simulated.

That is the crux of one of my favorite science fiction stories, Greg Egan’s ‘Dust’. Egan rewrote this short story as a novella called Permutation City (which I haven’t read). In the world of Dust (which is set in Sydney about 50 years in the future), engineers are able to build a model that simulates the brain. The computer simulator in Dust doesn’t simulate every single neuron, but it is able to simulate a brain in enough detail to be able to model thought processes and communication. In tandem with the simulator, scientists also find a way to ‘initialize’ the model with a real brain (from a living, sleeping human) through a series of scans. The output of the simulator is ‘speech’, so the brain being simulated is able to communicate with the user of the simulator, and you could have a ‘conversation’ with the simulated brain. However, the simulator runs 17 times slower than the real brain, so you’d have to speed up or slow down a video recording to communicate with it.

The protagonist of the story is trying to explore his own consciousness by building a model of his own brain, simulating it under various conditions, and seeing if it ‘thinks’ the same thoughts. In a fascinating sequence of experiments, he runs the simulation in a random sequence of time-slices (so that the system simulates t=5s first, then t=1s, then t=3s, and so on), and then on a ‘cloud’ of servers distributed all over the world. And knowing that this ‘brain’ is nothing more random bits flipping in random machines in a random sequence all over the world – and yet able to tease ‘consciousness’, in the form of the ‘brain’ being self-aware – he has the epiphany that human consciousness is nothing more than dust.

My final thought about simulators is something that began with Feynman many decades back. Feynman was interested in the physics of computation, and towards the end of his life, he began working on what he called ‘exact simulators’. A simulator is, by its nature, approximate – either because it has finite precision, or because it reduces the number of parameters in a system to a much lower number than are really there. Feynman was interested, however, in quantum simulators, where one quantum system would exactly replicate the quantum behavior of another quantum system. He spoke about it at a landmark keynote address he gave at a conference on physics and computation just a few months before I was born. Here is the paper, which is generally readable, except for a few bits for which you need some background in quantum physics: http://www.cs.berkeley.edu/~christos/classics/Feynman.pdf

Feynman, in his paper, drew the outlines of how it was indeed possible to simulate one quantum system with another. As he described the technique in detail, someone from the audience asked him a question: “Doesn’t this reduce to the ordinary boundary value, as opposed to initial-value type of calculation?” And Feynman’s profound answer:  ”Yes, but remember this is the computer itself that I’m describing.”

In other words, his technique gives us a computer that is capable of simulating itself…! Such are the bizarre properties of a quantum computer.

One of Feynman’s fellow scientists went about calculating a few more bounds on quantum computer simulators, and he discovered a very peculiar thing: that in order to simulate a quantum system of a certain volume, you need a quantum computer of a lower volume. And to simulate the quantum states of the entire universe, — and this is the nice bit –, all you need is a computer the size of a biggish star.

This is one of the great unsolved mysteries of the universe, up there with dark matter: dark complexity. The universe can be exactly simulated with a computer that is 10^69 times smaller than the universe itself.

Gates, Jobs

I have been re-reading Hard Drive – the very old and rather rare biography of Bill Gates. the book was published in 1992, so it doesn’t cover most of ‘modern’ Microsoft products. Rather, it’s a story of the foundations, because by ’92, Microsoft had already become a little behemoth, and Gates was still a very young man then.

Nowadays it is very fashionable to like Steve Jobs. It’s almost as though just invoking his name makes you ‘cool’. I know a wannabe entrepreneur who told me, ‘I treat my employees like shit and I am impatient with my developers… I am like Steve Jobs.’ Yeah right.

I haven’t read Steve Jobs’ biography (yes, the famous one) and I intend to read it sometime in the near future, but I doubt that it will change my mind about Gates being the real hero of the computer revolution. In fifty years, both Jobs and Gates will probably be forgotten by the unwashed masses; but for computer scientists and computer historians, Gates will be the revolutionary, the visionary. Jobs will be one of the multitude of fads and trends that will go in and out of fashion between now and then.

I like Gates a lot more than Jobs (this is, I hasten to add, purely judged by entrepreneurship and engineering) because Gates focused on problems; Jobs focused on solutions. In other words, Gates seems to me to be the kind of guy who went out into the world and looked at what people wanted, and used that as a starting point. Jobs went into himself and tried to discover what he could do well, what would make him happy, and used that as a starting point.

I do not see anything wrong with Jobs’ approach and certainly he deserves a lot of adulation for his ‘internal courage’ and consistency of expression. But let’s face it. Jobs’ career was about making pretty white boxes and selling a lot of them. Did the iPod revolutionize the world? No, it didn’t. True, it opened up a new industry of digital music. But today, downloadable music exists, the iPod hardly does. Even the industry has faded out – who buys MP3 players any more? Jobs was possibly motivated by the fact that he knew that he could make an MP3 player better than everyone else out there. And he went ahead and did it.

On the other hand, Gates made his career by building permanent stuff: languages. compilers. operating systems. office applications. He did not do it because he knew how to make a perfect operating system – in fact, he didn’t. A lot of early Microsoft software was buggy, and it took till the 3rd or 4th iteration before it became world-class. But Gates deserves respect for identifying a problem and providing a solution – not just out of the need to scratch an intellectual itch, but out of a vision to make computing ‘fuller’, to solve all the unsolved problems, to create (however imperfectly) a brave new world, this world today, where computers and software are ubiquitous. When he made his billions, he started looking at bigger problems: water. disease. education. And there, too, he isn’t perfect — but he is the man in the arena, he isn’t afraid of trying, and he is driven not by the elegance of the solution but by the importance of the problem.

Real engineer, real entrepreneur.

The Twitter revolution

Cue was here, and apart from the various exciting things we spoke about, he found time to enlighten me about Twitter.

I know it exists, and I’ve even checked out some twitter feeds once in a while, but it took Cue to open my eyes to a whole new world out there. He told me he’d completely stopped reading newspapers and visiting new websites any more. All of his world information is assimilated 140 characters at a time, through Twitter.

It’s a fascinating phenomenon. You wonder – when news becomes personal and ubiquitous, and when written communication is dissociated from the need to write well, Twitter emerges. And suddenly the floodgates are open, and anyone can write anything. As you learn the ropes, you realize that you can build a completely freeform community for yourself on Twitter – you choose who you listen to, whom you speak to, and what you say. You are part of the trends, and you create some of your own. Your five minutes of fame are stretched out to an eternity. Some people even build their entire lives around Twitter. As someone said recently – ”Twitter. Where the invisible people in your phone are more supportive and encouraging than 99% in your real life.”

I think Twitter (and other online communities) can never be a substitute for real life, but imagine – being able to communicate with the world. And imagine being Twitter – being able to eavesdrop on the world’s conversation.

I had the pleasure of watching Deb Roy – the MIT Media Labs guy who recorded every sound made by his baby to track the genesis of every word – present about using Twitter to visualize the impact of TV advertising. It was an awesome presentation: by correlating what is happening in the real world to what millions of people are saying about it, you can get an insight into how everything affects everything else. Deb Roy’s company, Bluefin Labs, is trying to identify a “TV genome” which identifies and quantifies all conversations about TV.

Where is the science fiction about the brave new world that Twitter is ushering us into? Bring it on, I say!

What people think about computers

I met someone interesting for lunch today, an engineer from Chicago who did his master’s thesis in ubiquitous computing. We had a very interesting conversation about how computers are viewed, and how they *ought to be* viewed.

We’ve heard numerous examples of people who have never used computers in their lives take to devices like an iPad or a mobile phone. We’ve also heard of people who have never used ‘high technology’ in their lives use cell-phones on a daily basis. And that serves as a kind of role model for us when we try to design computers nowadays, and target them at the ‘digital have-nots’ – for the billions that have not had access to computers so far.

However, there is a difference between a mobile phone and a computer, even at the conceptual level. A mobile phone is an appliance; so is an iPod, for example. They are meant to perform one task (or a few tasks) well. In the case of a mobile phone, it is to make and receive calls, and send and receive messages. In the case of an iPod, it is to play music. So the conceptual model for their use is straightforward; for a mobile phone user making a call, it is: choose a recipient, initiate a call, talk, and hang-up.

It has become fashionable of late to design software for computers that make them appear as appliances. For example, if you pop in a DVD into a computer, most likely the software that plays the DVD will have controls that mimic a DVD player, with a play/pause/volume button. So anyone who is comfortable using a real DVD player would, hopefully, be able to relate the user interface of the computer’s DVD playing software to the actual functioning of a DVD player, and feel familiar (or at least, less intimidated) by the software.

Packaged software has become the mainstay of our interaction with computers today. That is why, when I ask people of my father’s generation (who have probably started using computers only in their 40′s or 50′s) what computers can do, they say, computers can create documents, play music and movies, browse the internet, solve equations, video-conference.

All of which are true, except: it is not the computer that does these things (except indirectly); it is the appropriate software package that does them.

And no one who is exposed to computers in that way will ever answer the question of “what do computers do?” with the right answer, which is, “computers compute.”

And that is why, despite innumerable efforts by several groups of people, all of these people will feel intimidated by ‘programming’ a computer. Their mental model only fuzzily (if at all) recognizes that computers can be programmed to do anything that is computationally feasible, not limited by what software exists. For them, the basic conceptual blocks of computers are menus, mouse cursors, pointing and clicking, buttons, and volume control – not data structures and algorithms.

The question we discussed over lunch today – a discussion which did not definitively end – was: what would it mean to have people build non-appliance mental models of computers?

Is it a good thing? -Would we empower people if we described computers to them as ‘programming machines’, or would we go back to a world where only the intellectual elite felt safe around computers?

And, is it good to teach all people that they, too, can program a computer? Or should the status quo continue – where everyone is more or less comfortable using a computer, but only a handful of anointed experts, mostly with engineering degrees, are capable of programming them?

Which way? What do you think?

Blog at WordPress.com.
Theme: Esquire by Matthew Buchanan.

Follow

Get every new post delivered to your Inbox.

Join 40 other followers