Thursday, January 4, 2024

 Lost Horizons by Larry Becker

Where are you now oh friends of youth?
I wonder in sad reflection.
Have we lost the key that we once used
to open the doors-of-perception.
Remember when we saw the world
in colors without names,
and looked into eternity
inside the campfire's flames.
What merry pranksters we were then,
and what experiences we knew,
as we saw the worlds that might-have-been,
like stars in a drop-of-dew.
But somewhere down some forest path
where the road had forked-in-two,
we missed the one that might-have-led,
us to Xanadu.
But sometimes when the night is dark 
but the moon is shining clear,
I feel like the ancient's wedding guest 
who 'cannot choose but hear',
or like some westward pioneer
who first viewed the great herds of bison.
Then do the mists roll up again
and I glimpse the Lost Horizon.

Tuesday, April 7, 2020

"Balderdash"

by Larry D. Becker

I awoke to a morning so crisp in its borning
   that icicles hung in the air
But what it inferred I deftly deffered
   and remained quite snug in my lair
Fate's providence and habitual slovenliness
   have conspired with unnatural care
To produce an obtuse and ridiculous excuse
   to sleep on a morning so rare
So up I did spring and commencing to sing
   a ballad quite passably fair
I sprang to the shower and dialing full power
   I continued my singing with flair
But needing some soap and searching with hope
   in a cupboard under the stair
I looked once again but to my chagrin
   I saw that the cupboard was bare
Except for some documents left by previous occupants
   and a can of something called "Nair"
The product's instructions were obscured by reductions
   in price, but the purpose was there
It seems that in some way, the use of this spray
   was something to put on your hair
So lacking shampoo, I used that witches' brew
   (I'm telling this now with despair)
That's how on the morrow, with parting's sweet sorrow
   I bid farewell to my hair

Wednesday, March 30, 2016

 If?

If you can keep your job when all about you
 Are losing theirs and blaming it on (downsizing,
outsourcing, technology, globalization, the fed, Obama, you?)
If you can build a reputation on a forum,
  And dispense advice for free and not be snide;
If you can educate and not just bore 'em,
  And take all the ingratitude in stride,
Or being hated, don’t post "haters gonna hate",
  And yet don’t post too often, nor too wise:

If you can daydream—and still type all the faster;
  If you can code—and not make code your aim;
If you can draw with vector and with raster,
  And treat those two abstractions just the same;
If you can bear to see the code you've written,
  Twisted by knaves to make a hack for fools,
Or watch the software you gave your life to, broken,
  And reboot and build ’em up with trial-ware tools:

If you're fluent in both windows and ubuntu,
  Or work with macs—nor lose the common touch,
If neither Haskell, Bash, nor Java code can faze you,
  If all registers count for you, but none too much;
If you can fill the unforgiving nano-sec,
  With sixty cycles’ worth of CPU,
Yours is the net and everything that’s in it,
  And—which is more—you’ll be employed, my son.

with no apology to Rudyard Kipling

Wednesday, November 5, 2014

E. W. Dijkstra

"If academic research is often astonishingly successful, it always is because the researchers had the wisdom and the opportunity to avoid both the trivial and the impossible, and to follow the very narrow path in between. It is that narrow path in between that defines the intellectual autonomy of successful scientific research."

"The second reason is that what society overwhelmingly asks for is snake oil. Of course, the snake oil has the most impressive names —otherwise you would be selling nothing— like "Structured Analysis and Design", "Software Engineering", "Maturity Models", "Management Information Systems", "Integrated Project Support Environments" "Object Orientation" and "Business Process Re-engineering" (the latter three being known as IPSE, OO and BPR, respectively)."


prof.dr. Edsger W. Dijkstra

http://www.cs.utexas.edu/users/EWD/transcriptions/EWD11xx/EWD1175.html

Going back to origins

Here is a poem that describes the future shock felt by we lucky few who first encountered the phenomenon that would become the world wide web:



World Wide Web

Robert Thibadeau 
November 30, 1993

I never thought I would see the day
When books looked superfluous.
I saw, the day before yesterday,
The world.

I leapt about, from Japan, to Here, to
Australia
To Finland,
To Italy.
Like it was nothing.

And I got deep
Deep
Into people
What they were thinking and doing
What they wanted and thought
I might like.

This is what a book
Was supposed to be.
But this was much better.
I made up the plot,
And I discovered the real story.

All right there. Right then. And,
Like the world,
It would never repeat again.

Oh.
I really would like to have books
With their tree paper
Go the way of the dinosaur.
This is nearly it.
It is a place to really learn.

Will Internet become the dragon?
You know, the house dragon.
The oldest dragon. From China.
You know, the
Dragon of Peace holding
The Pearl of Everlasting Life.

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.

Wednesday, May 9, 2007

Teaching is the Best Software Test


With all of the emphasis that has been recently placed on software testing methodology, I thought I would share my final acceptance test that never fails to find those last lingering bugs and badly designed features. All you have to do is offer an advance training course to some of the typical users of the software before you do final delivery. Some of you already know what I'm talking about and are nodding your head as you read this. The rest of you, read on.

In my experience, teaching the first training class can be one of the most humbling experiences an application designer will ever encounter. First you will have to prepare a lesson plan, and once you start putting down on paper what the steps are to accomplish some example scenario, you will likely discover, as I did, that it doesn't seem so simple as when you were designing and testing. But suppose you are so supremely confident that you decide to wing it and just go in cold. After all, you designed the application, so what could you possibly need to look up?

"OK class, first I guess I'll have to walk you through creating some sample data so that we can have something to try out all of the features on. Hmm, we'll need a blank database to get started, so we'll just copy the one from the examples folder."

"I can't find the examples folder. Where is it?" someone asks.

"It's right there in the C:\MegaApp folder."

"I don't see it."

"Ok let me look. Hmm, are you sure you installed it in the same place as I demonstrated?"

"I don't know, I never pay much attention to that installer stuff. It's always the same."

"Ok here it is in the My Documents folder. I don't have time to fix it so you'll just have to remember to look here whenever I say to look in the MegaApp folder."

"OK class, let's move on. Use explorer to copy the blank database to a new folder."

"I can't find the blank database. What is it called?"

"Blank.dbs"

"I don't see it. Wait, there is an icon shaped like a cylinder labeled blank. Could that be it?"

"You must not have file extensions showing. Not really surprising really since that is the default, I suppose. OK class, listen up. Everyone make sure you have file extensions showing. The option is under folder Options under the Tools menu in explorer. Not finding it? I'll be around to show you in a minute."

Later: "OK, you should now have a copy of the Blank database in a new folder. Let's rename it Sample1.dbs. Done? OK, now double-click on the icon to open it in MegaApp. Problem?"

"Mine opened in Microsoft Word. Looks like garbage"

"Mine opened in something called PRODAS, and crashed."

"Mine just opened the folder in explorer. Were we supposed to rename the file instead of the folder?"

"OK," you say, starting to get rattled, "Apparently these PCs we borrowed from operations aren't as clean as the ones we tested with, and the DBS file extension might be used by a few other apps. Let's take a break while I work this out."

Much later: "Is everyone ready to get started again? OK, now as I was saying, the blank database Sample1 is now open in MegaApp. Question?"

"Mine isn't blank any more. I got bored waiting and filled out some data already."

"OK, just exit MegaApp and throw the file in the trash and make a new copy."

"I threw it away and emptied the trash, but I can't find another one to copy now. Wait, I remember, I decided to skip the copy step and just open the original. It didn't seem important at the time."

"Fine. Will someone please pass him a copy on a floppy? These machines don't have floppies do they? How about a USB stick?"

"I've got one, but when I insert it, it says I need to install a driver. Do we have an internet connection?"

"No, I'm afraid not. I'll tell you what, just uninstall MegaApp and reinstall it. It'll only take a few minutes. While we're waiting, are there any questions? Yes?"

"My screen just went all black. What did I do wrong?"

You're really starting to panic now, "Uh, I'm not sure. What were you doing before it went black?"

"Not a thing. In fact, I haven't touched it for over twenty minutes."

Relief, "Ah, just move the mouse a little. Is that better? It was just the screen saver. Ha, ha."

"OK, I'm finished uninstalling and reinstalling, and maybe I'm just dumb but couldn't all this have been avoided if there was just a New Database option in MegaApp?"

"Oh, well I suppose so. It didn't seem very important with all of the real features that we had to implement, and it's just a few steps after all."

...

And that's just the beginning. By the end of the day total exhaustion sets in from having to constantly troubleshoot 10 problems simultaneously. After a day or two like that you learn that you will do anything to keep the class out of Windows explorer where data magically vanishes down a black hole. Stay in your own app and odds are you won't be surprised more than five times in an hour, but avoid Windows like the plague.

There is a good reason why many modern software packages still include the tried and true installation instructions: "Insert the disk and click on the Start button and choose Run... Type D:\install where D: is the drive letter of your CD-ROM."

As retro as it sounds, it almost always works. If autoplay is enabled , you're usually golden, given you get past the virus checker or the Add or Remove Programs wizard if the user happens to fancy that method, but if not, those simple words printed on the cover of the CD-ROM will save you many support hours, because no one can talk someone through the steps of using a GUI to copy a file. Believe me, even if you can forget your muscle memory and you mirror each step yourself, it will all go horribly wrong because it can.

So schedule that advance training class. You'll be glad you did, but only after a lengthy recovery period.

Saturday, April 7, 2007

Has Google Gone To The Dark Side?


Recently I noticed that my PC was thrashing around with a lot of disk I/O while I was trying to work. When this happens, I usually find that I inadvertently left Automatic Updates on or a virus scan is running, but this time I find that a process in Task Manager called GoogleToolbarNotifier is using up quite a bit of CPU time every second or so. Self-Googling Google, I found this site that explained that this is basically Google's answer to Microsoft's attempts to set the default search engine to MSN. Since I didn't want my PC to be part of this virtual battleground, I used the listed instructions to delete GoogleToolbarNotifier, and once again my PC is tranquil and speedy.

Saturday, March 17, 2007

Pragmatism in Programing

A book called "The Pragmatic Programmer: From Journeyman to Master" by Andrew Hunt and David Thomas promises to "cut through the increasing specialization and technicalities of modern software development to examine the core process--taking a requirement and producing working, maintainable code that delights its users."

Pragmatism is a school of epistemology. Most of the thinkers who describe themselves as pragmatists consider practical consequences or real effects to be vital components of both meaning and truth. In ordinary usage, pragmatism refers to behavior which temporarily sets aside one ideal to pursue a lesser, more achievable ideal. It is difficult to determine what ideal the authors are setting aside in order to achieve their programming goals, however their list of tips (sample shown below) looks interesting. The Stroop effect is also kind of neat. See also Jon Aquino's blog post for his explanation of the benefits of reading code aloud.

Extracted From The Pragmatic Programmer
by Andrew Hunt and David Thomas.
Copyright 2000, Addison Wesley.
  1. Care About Your Craft. Why spend your life developing software unless you care about doing it well?
  2. Always Use Source Code Control. Source code control is a time machine for your work---you can go back.
  3. Use Blackboards to Coordinate Workflow. Use blackboards to coordinate disparate facts and agents, while maintaining independence and isolation among participants.
  4. Estimate the Order of Your Algorithms. Get a feel for how long things are likely to take before you write code.
  5. Some Things Are Better Done than Described. Don't fall into the specification spiral---at some point you need to start coding.
  6. Costly Tools Don't Produce Better Designs. Beware of vendor hype, industry dogma, and the aura of the price tag. Judge tools on their merits.
  7. Invest Regularly in Your Knowledge Portfolio. Make learning a habit.
  8. Separate Views from Models. Gain flexibility at low cost by designing your application in terms of models and views.
  9. Work with a User to Think Like a User. It's the best way to gain insight into how the system will really be used.
  10. Don't Be a Slave to Formal Methods. Don't blindly adopt any technique without putting it into the context of your development practices and capabilities.
  11. Sign Your Work. Craftsmen of an earlier age were proud to sign their work. You should be, too.

Perpetual Motion and Lossless Infiinite Compression


Once a master was walking with a student.
The student exclaimed, "I have an idea for a new data compression scheme. I'll use a lossless compressor and pipe the output back into the input, looping until the desired size is achieved."
The master considered mentioning Shannon and his Limit,
but instead bought a balloon from a street vendor and releasing the knot, he deflating the balloon and handed it to the student saying,
"Remove the air from this balloon."
At that moment the student was enlightened.

Stepwise Refinement

Khan's Koan

In the days when Khan was studying at ETH,
he was hacking at a terminal when Wirth happened by.
"What are you doing?" Wirth asked him.
"I'm teaching the computer to think," Khan replied.
Wirth reached behind the terminal and unplugged it.
He placed a large blank sheet of paper in front of Kahn,
saying, "First teach the paper to think."
At that moment Khan was enlightened.

Here are a couple of excerpts and links from articles by the master.

Program Development by Stepwise Refinement by Nicklaus Wirth

Programming is usually taught by examples. Experience shows that the success of a programming course critically depends on the choice of these examples. Unfortunately, they are too often selected with the prime intent to demonstrate what a computer can do. Instead, a main criterion for selection should be their suitability to exhibit certain widely applicable techniques. Furthermore, examples of programs are commonly presented as finished "products" followed by explanations of their purpose and their linguistic details. But active programming consists of the design of new programs, rather than contemplation of old programs. As a consequence of these teaching methods, the student obtains the impression that programming consists mainly of mastering a language (with all the peculiarities and intricacies so abundant in modern PL's) and relying on one's intuition to somehow transform ideas into finished programs. Clearly, programming courses should teach methods of design and construction, and the selected examples should be such that a gradual development can be nicely demonstrated.

Computing Science Education: The Road not Taken by Nicklaus Wirth

As computing professionals, it is our duty to speak up against a culture that equates computer literacy with mastering the intricacies of a production programming language.

This reminds me of E. W. Dijkstra’s tale of his worst night after reading the specifications of the new programming language PL/1 in 1965. He said he had the painful vision that in the future programming will be equated with learning PL/1, and computer science with mastering OS/360 JCL. Replace PL/1 by C++ or Java, and JCL by Windows or Linux, and you are miraculously transposed into the present time.

Wednesday, March 14, 2007

Zen and Tic Tac Toe (Part 1)

AI Koan: Sussman attains enlightment

In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
What are you doing?", asked Minsky.
"I am training a randomly wired neural net to play Tic-Tac-Toe.", Sussman replied.
"Why is the net wired randomly?", asked Minsky.
"I do not want it to have any preconceptions of how to play", Sussman said.
Minsky shut his eyes.
"Why do you close your eyes?", Sussman asked his teacher.
"So that the room will be empty."
At that moment, Sussman was enlightened.


Tic-Tac-Toe is my current favorite in the search for the perfect task to demonstrate good programming practices. I believe it can be used to demonstrate the vast range of solutions that are available for many similar problems, and it should also be a good example of the range of quality in solutions.

Tic-Tac-Toe has a special personal significance to me as it figured in the first piece of hardware that I ever designed in 1969, and it was the first program that I ever wrote using my first personal computer in 1978.

In 1969, I was a sophomore in high school trying to come up with a decent entry for a science fair. I had recently learned to make electric relays using wire, nails, and tin cans, and I decided that it might be possible to wire up nine of these relays to switches and lights in such a way as to play a fair game of Tic-Tac-Toe. I worked for months on the wiring diagram until I came up with what I thought was a solution. Unfortunately, the relays kept sticking and I could never get the thing to work. I never learned whether my solution would have worked if I had access to better hardware.

Later, in 1978, I had bought a Radio Shack TRS-80 microcomputer that had an excellent chess program that I liked. Unfortunately, or perhaps fortunately, the game cassette tape deteriorated after a few months and I was left with no use for the computer. I decided that I would have to learn to program chess myself, so I got out the manual and, quickly getting over my delusions of grandeur, I settled for programming Tic-Tac-Toe. Hundreds of lines of code and about ten hours later, I had a working version of the game that met all of my requirements. I was hooked on programming, but obviously had a lot to learn, since the program was incredibly more complex than my teenage relay machine.

All of these years later, I have decided to revisit the problem of the Tic-Tac-Toe machine with 9 relays and determine if it is indeed possible to construct such an elegant solution to the problem. I will also endeavor to discover if the solution will carry over to software implementation as well, or if it is only possible in dedicated hardware.

...

Friday, February 23, 2007

More Inspirational reading

For fun and enlightenment, I recommend:
THE HACKER CRACKDOWN, Law and Disorder on the Electronic Frontier by Bruce Sterling

To increase your programming prowess on the subject of optimization I recommend Michael Abrash's Graphics Programming Black Book.

Monday, February 12, 2007

Blackboards and Memory Systems


When I was a freshman in college, I took an introduction to psychology course that required either a field trip to a mental institution or an independent project of my own choice. I chose the later because I had developed an interest in how human memory works, and also perhaps due to a certain amount of squeamishness about the insane.

My project was inspired by a television program where a "memory magician", whose name I (ironically) can't recall, would begin by being introduced to each person in the audience. Later, after performing some other tricks, he would recite each person's name correctly as they stood up. He said that this feat was not accomplished by magic tricks, but was due to a system that anyone could learn, and went on to explain that the key to remembering was to associate something in the sound or meaning of the words with a visual image of the person. This was not like a trivial example of say, Mr. Green wearing a green shirt, but something outlandish and unforgettable. I didn't learn exactly what this meant because, as it turned out, in order to learn this secret method, I had to send in $29.95 for a pamphlet and audio tape.

So armed with only this one rather questionable bit of knowledge, I begin my project on memory systems. Rather than doing research and regurgitating the work of others, I decided that I would perform a field test and report my results. Since I couldn't really persuade dozens of strangers to meet my test subjects, I felt that the next best thing would be to have the subjects memorize a list of 200 words arranged in two columns. The test would be to produce the second word when given the first after hearing the list only once.

Now associating 100 pairs of nouns that were randomly chosen from the dictionary sounded quite a bit more difficult than memorizing names, and I fully expected the tests to report rather poor results, which I hoped wouldn't affect my grade on the project, since in science, results are results. Imagine my surprise when my first two test subject were able to recall all 100 responses correctly when given the key word! I tried the system myself and found it was absurdly easy to memorize any number of noun - noun associations. The only magic required was to connect the two with a visual image of an outlandish and unforgettable action. I still remember the first pair of words on my list: squirrel - doorknob. What I did was to imagine a squirrel opening a door in the sky and peering out. This image was so vivid that it has stuck in my mind for mumble mumble years.

Needless to say, I was pretty excited to report my astonishing discovery, but it turns out that the market for associating random lists of nouns was a lot smaller than you would think. What people really want is help remembering names and dates and numbers, which is quite a bit different (try coming up with something outlandish to help remembering say, October 20, 1987). The only thing that really helps with that is the personal computer, which came along mumble years later. That brings me (finally) to the subject of this article, which is using Blackboard Systems to improve your programs.

Real blackboards first appeared in a Philadelphia school in 1809 and were made of pine wood colored with a mixture of egg white and charred potatoes( mmm, can't you smell those potatoes charring in the Franklin stove?) They served pretty much the same purpose as whiteboards do today, as a place to display information that everyone in a room can read.

Software blackboards occupy much the same niche as their real world equivalents. They store data using associative lists in a readily accessible location for the purpose of communicating information between a program's various objects or subprograms. A program may contain more than one blackboard, for instance, if the application allows multiple documents to opened at one time, it might have both an application blackboard and a document blackboard. The application blackboard would be used to store or remember information that pertained to the behavior of the whole application, and the document blackboard's scope would be limited to one document or window.

Some examples of data that might belong in a text editor's blackboard include, the last font chosen, color, font size, number of spaces in a tab, and justification mode. It might be a good idea to store this data in the persistent blackboard for the application so that each new document will inherit the same defaults for these settings.

How useful blackboard data structures can be is not readily apparent until you start using them. It is one of those concepts you keep finding more and more uses for over time. It seems that object oriented technology has brought increased capability for abstraction though information hiding, but there always seems to be a need to access data outside the object metaphor though methods like relational databases or blackboards.

When blackboards or similar structures (like the Windows registry) are used for communication between cooperating programs, it becomes close to the biological concept of stigmergy which is the name given to the communication between social insects facilitated by the structures they build.