Friday, February 27, 2009

Computer Science is really about managing complexity

The process of developing a software application is approximately as follows:

1. Write a bunch of functions that do useful things.
2. Package them in a container with an interface.
3. Organize the interface around some logical scheme.

In subsequent versions:

1. Fix a few bugs.
2. Add a few more functions.
3. Randomly reorganize the interface around some other logical scheme, because hey, the old one wasn't working since users couldn't find the functions they needed.
4. Rinse and repeat step 1.

Any reasonably large application is impaled upon the horns of the following dilemma: old users don't want the interface to change because it took so long to learn, however new users do want change because the current interface takes a long time to learn.

The problem is not with our methodology, or our programming languages, or even our interface technology. Some of you may take exception with that last one, but imagine that we have just invented a voice recognition system with an AI smart enough to understand our every request. Like Alāʼ ad-Dīn and his magic lamp, we would still not know what is possible unless we commanded the genie to list all of the possible wishes (which may be an infinite number).

The problem comes down to anticipating what the user wants. This is the basis of all user interface "improvements". We are all looking for the "easy button" that will just do whatever needs to be done, without any need to specify how or even what.

Begin a discriminating user of software is no special qualification to design user interfaces, in the same way that being a gourmet does not confer any special powers of cooking. And yet, need is at the heart of user interface design. Users want the functions that they perform with the software to be simple and straightforward and require the minimum of clicking and navigation. The ideal scenario is for the software to act like a surgeon's assistant, always standing ready with the appropriate tool at hand, and gently reminding us when we miss a step due to over concentration on the task at hand.

Building a great user interface then, requires not only study of UI concepts, but also study of usage patterns by the target audience. This in turn leads to dipping one's toes into the waters of operations research to determine if the entire process has been optimized from a global perspective.

...


Monday, July 7, 2008

Child of Wonder

Child of Wonder, Worldly Wise.
Who Parried the Frigid Fight's Reprise,
Hardly Humble, Scarcely Grown,
To You is Given All that's Known.

Forged in Freedom, Tempered True,
To Cut the Gordian Knot in Two,
Family of Fathers, Seldom Seen,
One was Knighted by the Queen,

Chain of Characters Rightly Wrought
Wove Words in Which our Conscious Caught
Strings of Dimensionality Untold
in Wàn Wéi Wang Ten Thousand-Fold

Rich in Robbery, Strictly Lax,
You Nobly Never Paid Your Tax
Loudly Lauded, Cruelly Cursed,
When Fortune's Fable Finally Burst,

Slumber's Songs are Now Unsold,
Make Members Message Manifold,
Eight Oh One, Twenty Six Sixteen,
Care to Comment? What's it mean?

Child of Wonder, Worldly Wise.
Come of Age 'Neath Darkening Skies,
Wiley Wizard, Scandalous Scam,
Will You Wonder Who I Am?

Wednesday, October 3, 2007

JavaWocky

I looked the deadline in the eye and blinked.
I ordered the GUI Builder - only then did I think.
Productivity it will enhance, but only if you do the dance.
So stay in step, keep to the road
and never ever hack the code.



The following is from an article at: Hacknot titled "Beware the GUI Builder":

Twas WYSIWYG, unsightly code
Did file and frumble by the way;
All grinsy were the morrow-knows,
And the dumb sooths outlaid.

Beware the GUI Builder, son!
The drag that drops, the cut that pastes!
Beware the graphic god, and shun
The nerdious interface!

He took his QWERTY keys in hand,
Long time the dialog he fought-
So rested he by the Widget tree,
And sat awhile in thought.

And, as in WIMPish thought he sat,
The GUI Builder, icons lame,
Came blitting through the worldly web,
And googled as it came!

Grid bag! Grid bag! And layout do
The QWERTY keys went clicker-clack!
With one last call, he uninstalled
And went compiling back.

And hast thou slain the GUI Builder?
Come to my arms, my beanish boy!
O wizard real! Just look and feel!
He buffered in his joy.

'Twas WYSIWYG, unsightly code
Did file and frumble by the way;
All grinsy were the morrow-knows,
And the dumb sooths outlaid.

With apologies to Lewis Carroll

Monday, June 25, 2007

Deep or Wide

Put on your hip boots, it's about to get deep here.

The other day I was thinking about how hard it is to be a Java programmer when I realized something. Old style languages like Pascal were very small so that in order to do anything useful, you had to know a lot of good algorithms. On the other hand, a modern language like Java is very large and already has support for most common programming tasks. This calls to mind the depth vs. breadth tree search problem. Under this metaphor, being a good Pascal programmer involves a lot of depth, but not a lot of breadth of knowledge. Whereas being a good Java programmer involves having a large breadth of knowledge about the libraries, but very little depth about how they work.

These are fundamentally different kinds of knowledge, and different programmers will attain proficiency at each language differently. Java, or indeed any modern language, requires memorization of vast numbers of APIs. Otherwise you risk reinventing the wheel, and the bugs that go with it. Which methodology is superior? I suppose I must reluctantly admit that breadth overcomes depth more often.

The depth vs. breadth tree search is often explained in the context of game theory, especially using chess as an example. As a chess player I have always relied on depth as a strategy, but a good player with a broad knowledge of standard chess openings will beat a depth first thinker every time. This is unfortunate, since it means that to be a serious chess player implies years of study and memorization just to know the state of the art. No one enjoys this, but it is necessary to be taken seriously.

What is true for chess players is also true for modern programmers. Is there any escape from the problem of rote memorization? All professional fields have this problem, but programmers are different. We don't have to live within the limitation of human brains. Isn't there a software solution that will free us from the chains of memorization? I know it isn't Google. That instrument is way too blunt. It isn't Javadoc. That is too tightly focused. It is something like Googling Javadoc though, with more intelligence. I want something that reads my code, determines basic purpose, and suggests possible solution classes that are appropriate to the job at hand. A kind of automated design pattern filter. Not AI, mind you, just good old fashioned breadth first tree searching.

...

Saturday, June 16, 2007

Fast Times at a High Tech Company (Part 1)


A personal look at Hayes, the canonical microcomputer modem manufacturer in the turbulent 80's.

In his fascinating INCOMPLETE HISTORY OF PERSONAL COMPUTING Ver. 6.3, Rory Donaldson says, "As the ‘80’s progress a number of familiar names come and go: Wang, Lanier, TRS-80/TRS-DOS, CP/M, SOL, Osborne, Kay-Pro, Cromemco, Stellation II, Digital Research, MicroPro, Ashton-Tate, Vic, Commodore, Atari, Northstar, Morrow … These companies were largely victims of the futile attempt to freeze the past to guarantee their future."

Hayes Microcomputer was the first, and for over a decade, the dominant force in modem manufacturing. They too fell victim to the relentless press of change that weighed so heavily during the '80's.

As this article in the Atlanta Journal-Constitution shows, the founders of Hayes Microcomputer, Dennis Hayes and Dale Heatherington were eerily similar in temperament to Apple's Steve Jobs and Steve Wozniak. Dennis was the business tycoon and Dale the shy inventor. This photo album chronicles the early days and the final fall, but I was there in the middle period when times were golden, money flowed freely, and it seemed like the sky was the limit.

My story begins in Florida in 1986 where I was taking a sabbatical from work to get a masters in business administration that I hoped would further my hopes of starting a software company. I had made it past the half way point in the degree program when I got a call from Charles P. an old friend with an offer that I couldn't refuse. "You should come and be a consultant for Hayes Microcomputers," he said, "We need someone who can write efficient Z-80 assembler for our new modem. You can name your salary."

Unfortunately, I hadn't gotten to the course in business administration that covered salary negotiation, so I admitted, "I have no idea what consultants make."

"Why don't you ask David what he's getting?" Charles said, "He's just started work here as a consultant too."

David G. had been an undergraduate student assistant at GTRI when Charles and I had worked there. He had won a National Youth Science Foundation or some-such award in high school, and was the fastest programmer I ever met. If you used too much southern drawl, David would finish writing the code before you were finished with the specifications. He ended up only working at Hayes for a few months before going on to Auburn University for a PHD in math. He let me know that he was getting xx dollars an hour, so I figured I should be able to ask for xx+10. Hayes agreed immediately, so I must have asked for too little. I later found out many consultants were making xxx dollars an hour. Ouch! Oh, well it was still more money that I had ever seen at that point in my life.

A week later I pulled into the parking lot of a modern glass and steel office building nestled on the shore of a man-made lake in the back of Norcross Georgia's Technology Park. From the size of the parking lot, there seemed to be about a hundred and fifty people working at the Hayes Research Facility. I couldn't help admiring the peace and tranquility that the swans congregating near the lakeside gazebo foretold, especially compared with my previous Atlanta digs at the Electronics Research Laboratory in the Georgia Tech campus downtown. You couldn't ask for an easier commute. This was the life!

After the usual formalities, I found my way up to the third floor cubicles and met the rest of the team. "Welcome to the Very team," said Charles.

"The what team?" I asked.

"Its Marty's idea of humor. You know that Hayes modems are called SmartModems, right?" Charles continued, not waiting for an answer. "Well we are creating the Very SmartModem."

"Let me explain," Marty said. "We are actually working on two products in one. Those folks over there," he pointed to the southwest end of the third floor, "are working on the new 9600 baud technology that we call ping-pong. You'll understand the name when you hear it. Our firmware will make the 9600 the first Very SmartModem out-of-the-box. However, we are also working on a device to make one of these," Marty paused to indicate a current generation Hayes 2400 buad Smartmodem, "into a Very Smartmodem too by adding this Very box."

"But how does a Very vary?" I punned, picking up the box. "Very Very, please tell Larry how does your IQ grow?"

"With wizard's spells and unix shells, and pretty bits all in a row." came a voice from the next cubicle.

That was my introduction to Robert W. , one of the funniest guys I've ever met and a serious Monty Python fan. We would spend the next few years turning every design meeting into one long rehash of every Python sketch ever done. Robert had gotten his start at IMSAI, one of the first microcomputer manufacturers. The IMSAI was powered by an Intel 8080 CPU, and Robert is the only other person I ever met who could program the 8080 using hexadecimal.

In fact, everyone on the Very team was absolutely stellar. Charles, who I've already mentioned, is one of those rare people who regularly have original thoughts, and is one heck of a designer. Charles and I had collaborated on a very successful project redesign while we were at Georgia Tech Research Institute. Our team there had completely replaced hardware, rewrote the OS, and the drivers, and every line of the application software in four months. We went from 60,000 lines of code to 15,000 while increasing functionality.

Speaking of GA TECH, Marty had worked in the mainframe computer lab there while working on his masters and was an OS guru and all around smart guy. When I once had to go to Jody F., the team leader, and tell her that I had hit a problem that I couldn't solve, she said, "Have you talked to Marty?" True to form, Marty was responsible for building the master contorl program for the modem, a kind of low level OS.

"As I was saying," Marty continued, "the 9600 baud speed up over the current standard of 2400 is reason enough for people to buy it, but we need something extra to sell an add-on box to owners of the current generation. That something extra is X.25."

"X.25 implementes the physical, data link, and network layers of the OSI Model." he said, "In essence it gives the user the capability to route their own call through a network. Are you a Compusere user? Have you ever heard of PC Pursuit? No? It's a new service that allows you to connect to a service provider locally though your modem, then make a virtual call to say, the west coast, and dial out to a local modem there, all without long distance charges."

"Yes, and X.25 is an error-free protocol," added Robert. "So it is possible to use data compression to speed up the link."

"Why is that a requirement?" I asked. "I've used Kermit to download compressed data using current modems."

"True, but we are going to be compressing all of the data going though the modem on-the-fly without users needing to care how it is happening." Robert answered, "Besides, there is another important advantage to X.25, it supports multiple data channels over a single connection."

"OK, so X.25 divides the software neatly into layers. Who is implementing what layer?" I asked.

Marty looked at me. "You're really asking what your job is, aren't you? So we'll start at the DCE (Data Communications Equipment) at the back of the modem where the phone line connects and work our way forward to the DTE (Data Terminal Equipment) where the PC connects. That tall guy over there is George. George has written the modem engine code for all of the SmartModems since Dale Heatherington left. The modem engine pushes bits to the DSP (Digital Signal Processor) which encodes them into tones that will go over the phone line."

"Next in line is back end of the Very which I am implementing." Marty continued, " We are implementing a synchronous Lap-B protocol to get the best possible throughput for X.25. I'm also designing a macro language that we will be using to implement all of the control logic."

"Then comes the X.25 protocol stack which Letha is programming," Marty said indicating the only other female on the team besides Jody, the team leader who I had spoken with earlier. "Followed closely by Robert, who is doing the PAD, which is the user interface for making X.25 virtual calls."

"Yea, and in my spare time I'll be implementing the compression algorithms," Robert added.

"That brings us to the front end of the modem and your job, the DTE driver."

"That doesn't sound like much code," I complained. "I'll get bored."

"Don't worry," Charles interjected, "We have an extra special something that the head of research, Dr. Copeland came up with called MSP that should keep you interested. I'll show you later on today. "

...

Cue the organist. That concludes this exciting episode. Tune in next time when Larry discovers the truth behind the secret Multi-Streaming Protocol.


Tuesday, May 15, 2007

Everything is Miscellaneous

Author David Weinberger has just released a marvelous new book called Everything is Miscellaneous, subtitled The Power of the New Digital Disorder. This book is about the way we categorize information, how that is changing in the digital age, and how that affects how we think, the very nature of meaning, and perhaps even the meaning of nature.

He captures you attention right away in the Prologue, which begins by bringing out real world examples of how and why we classify and organize real-world things, and then moves on to point out how this limitation of purely physical things has infected our mental organizational picture up-to-now.

Visit David Weinberger's blog or view his Google Tech Talk on Google Video.

Highly recommended.