Tuesday, May 7, 2013

I Could Hang With This Guy...


More on his web site...

Sulfur Hexafluoride...

The London Cabbie...

Via my lovely bride:
A devout Arab Muslim entered a black cab in London . He curtly asked the cabbie to turn off the radio because as decreed by his religious teaching, he must not listen to music because "in the time of the prophet there was no music, especially Western music which is the music of the infidel."

The cab driver politely switched off the radio, stopped the cab and opened the door. The Arab Muslim asked him, "What are you doing?"

The cabbie answered, "In the time of the prophet there were no taxis, so get out and wait for a camel!"

Bidding on the Impossible Job...

I ran across this funny story about someone advertising a request for bids on an impossible programming job – and then getting (apparently) serious responses!

After I was done laughing, though, I started thinking about my very first programming job (that is, programming I did for money).  It happened much as in this story, except that it was before the Internet, so it all happened by snail mail.  Here's the outline:

The year was 1976.  Don Tarbell (founder of the then-famous Tarbell Electronics) had some very successful S100 boards, most especially his floppy disk interface.  He wanted a low cost Basic interpreter that he could sell along with his floppy boards; something that would compete with the dominant Microsoft Basic.  So he placed an ad in a computer hobbyist magazine (probably either TCH or Byte, but I've forgotten) asking for a quote on a Basic interpreter, written using “structured programming” techniques.  The ad was short, and very light on details; I'm sure Don was expecting it to be a catalyst for a more detailed discussion.

At that point I was still enlisted in the U.S. Navy.  Someone pointed out the ad to me, and suggested that I respond.  Those who know me will have trouble understanding just how incredibly naive I was back then about the ways of business.  Well, maybe they'll have trouble :)  Anyway, there were several very good reasons why my responding was completely crazy.

For starters, I had no idea what Basic was.  I'd never seen Basic, never written any Basic programs.  In fact, I'd never used a high level language of any kind.  My entire programming experience at that point was in machine code and assembly language (which, to me, was a high level language - macros!).

Then there was the niggling little detail that I didn't have any kind of programming environment.  I owned a 4MHz Z80 computer that I'd built from a kit, with 64 KB of RAM (woo hoo!).  The 5V linear power supply on that thing weighed about 50 pounds, and the computer put out enough heat to warm up a good sized room.  But there was no mass storage on it, and I didn't even have an assembler program.

Another challenge was that I didn't actually have a business yet, and I knew utterly nothing about contracts.  I also knew absolutely nothing about negotiations, or licensing, or anything else that smacked of business.

What I did know how to do was to write assembly language programs.  I figured that nothing else really mattered much.

So I wrote Don Tarbell a letter.  It was hand-printed in ink on Teletype roll paper, which is what I had at hand.  I wish I had a copy of that letter, but I don't.  It wasn't very long, and I can relate the important details from memory: I told Don that I'd write that Basic interpreter for $2,000, and that I'd deliver it in four months.  I dropped it in the post and forgot about it.

A few weeks later, I got a letter back from Don, telling me that if I could deliver that interpreter by the agreed date, he'd buy it from me.  As I recall, he had just one specific request: he wanted it to eliminate line numbers.  I agreed to his conditions and got to work.

Much later I had a conversation with Don wherein he told me that he had received several bids.  Most of them were for well over $100,000.  The bid closest to mine was for about $50,000.  The fastest delivery time quoted was close to a year, and a couple of them were for well over a year.  These bids were all from companies that routinely did programming jobs.  Don could tell from my letter (posted from the U.S.S. Long Beach!) that I was absolutely an amateur.  He judged it quite unlikely that I could deliver a usable product in the time given, but he also figured the risk to him was zero – so why not give me a chance?  That's the only reason I got the contract.

But back to my project.  The first thing I had to do was to get some kind of mass storage on my system – so I bought a couple floppy disk drives and a floppy interface card from Don.  Then I had to get an assembler.  I found a complete code listing for one in a magazine, typed it all in, got it to work, and then modified the crap out of it.  I added capability for “long” symbols (more than 6 characters!) and lots of debugger enhancements.  All this preparation took about a month of my four months, so I had just three months left.

I got to work.  I got a bootleg copy of Microsoft Basic and just played with it until had learned what the Basic language was all about.  I had no idea how to write an interpreter, and I had no reference material to work from.  There was no Internet for me to Google.  So I just thought about how to make one, and started writing code.  All my assembly language experience served me well during this work.  I understood a lot about how to write compact and efficient code, and I understood the capabilities and limitations of the Z-80 (that was my target machine) very well.  Interpreters for a simple language like Basic are actually quite straightforward beasts.  You don't have to worry about concurrency, for example.  The challenges were mainly in getting the code small enough to fit easily in 16 kb or less of RAM while still be fast enough to be useful. 

As things turned out, I spent most of my development time in two areas: the floating point math package, and the string package.  I probably spent two solid weeks simply on printing a formatted number.  Those areas were really the only parts that turned out to be difficult to write.

I wish I'd kept the notes and “design documents” for all that work, just to amuse myself (and perhaps others).  The designs were all done in my own made-up pseudocode, in pencil on scratch paper.  The pseudocode mostly made it into the assembly language comments, which helped when debugging.  I made liberal use of macros for some of the common structured programming constructs (such as  a “while” loop). 

Don would call me every few weeks, I suspect just to see if I'd given up yet.  As the delivery date approached, Don started to sound a little excited – the list of remaining Basic commands to implement started getting quite short.  In fact, I finished them all by about three weeks before the delivery deadline – but of course I had numerous bugs, some of them quite nasty “crashers” that would take out the entire system.  For that last three weeks or so, all I did was test, debug, and fix, in a cycle that seemed to repeat endlessly.

Just a couple of days before the deadline, I started to gain some confidence that I had built something deliverable.  My test programs were largely working.  There were some performance issues (especially with transcendental functions, like sines or logarithms), but in general my interpreter was faster than Microsoft Basic.  That really isn't an apples-and-apples comparison, as the Microsoft interpreter worked on 8080 machines (which the Z80 was compatible with, but extended).  I took advantage of the extra power of the Z80, which by that time dominated the personal computer scene.  But still...to beat Microsoft at that game felt pretty good.

I didn't sleep at all for the two days prior to the deadline.  I spent that entire time polishing every little thing I could.  Then I climbed into my beater of a car and made the drive up to Carson, California (a hundred miles or so north of where I lived at the time) to deliver it to Don.

When I walked into his shop I was  entranced.  Hardware was everywhere, and there were dozens of floppy systems set up for assembly or testing.  Don dropped everything else and we sat down together to install and demonstrate the interpreter on his system.  We had no trouble at all, really. He typed in a few short test programs, and got a big grin as they all worked just like he expected.  He then told me he had a “test suite” (something I'd never heard of at the time :) that he'd written and wrung out on Microsoft Basic, and he wanted to try it on mine.

That was a terrifying moment for me.  Once he'd explained what the test suite was, I instantly saw both the utility of it and the nearly infinite possibilities it provided for failure.  I was agonizing about this as he loaded up that test suite and kicked it off.  It printed out its progress as things went along, with the name of a test followed by “OK”, “Error”, or “Delta”. after it.  The “Delta” meant the result was different than Microsoft Basic, but not necessarily wrong.  As I recall, his test suite had about 200 tests in it, and the results were about 150 OK, 10 Error, and the rest Delta.  I was behind Don as he ran this, so I didn't know how he was reacting until he turned around.  He had an ear-to-ear grin, stuck out his hand for a handshake, and said “Accepted!”  Later he told me that he expected it to crash on his test suite, and that he was astonished to find it in such close correspondence to Microsoft Basic.  Whew!

Don handed me a check for $2,000 and took me out to lunch.  He then asked if I'd be willing to contract with him for enhancements and bug fixes.  My assumption was that the bug fixes were my responsibility, so when he said he was willing to pay for them I was very happily surprised :)  That started a collaboration that lasted several years.  Don kept coming up with ideas for enhancements, and we constantly nibbled away at performance issues.  He was delighted to be able to boast that Tarbell Basic (as he named it) was faster than Microsoft Basic, even though that wasn't one of the initial requirements.  That collaboration is what got me started on a career in software.  What a start!

Tarbell Basic never was a big commercial success for Don.  I know he got some satisfaction from it, though, and he did more than recover his costs.  After Don was done with enhancements, another company (the now-defunct NH Research) decided to use it for their line of automated power supply testers, based on the IEEE-488 bus.  They wanted some enhancements specific to their needs, and they contracted me to provide them.  So that project provided me with much-needed income even after Don was done with it, into the early '80s.

For years afterward, I assumed I'd never hear about Tarbell Basic again.  But then came the Internet, and some (crazy!) people who decided it would be a good idea to write simulators for Z80s and CP/M that ran on modern computers, and to curate all this ancient software.  There's a sizable community of these folks, and they've collected a large number of software packages – including Tarbell Basic (Don eventually put the source code for it in the public domain).  My name is all over the source code, and my name is easy to Google – and it wasn't long after that that I started getting queries from these new/old hobbyists.  Probably I've averaged two or three queries a year since about 1996; the last one was just last week.  Sometimes the queries are questions, sometimes requests for enhancements or bug fixes, and sometimes angry accusations about my incompetence (that's what the most recent one was :). 


I don't have any interest in running that old code myself.  But I sure wish I had those old notes!

Spider Termination...

Governor Awesome squashed a spider in front of some school kids the other day.  They applauded (see video below).  PETA calls it a “thoughtless act”.

Hmm...  Seems quite thoughtful to me!

Somehow when I think about PETA, the drums of doom start playing in the background...

The Wisdom of Humorist Steven Wright...

Via my cousin Mike D.:
  • I woke up one morning, and all of my stuff had been stolen and replaced by exact duplicates.
  • I'd kill for a Nobel Peace Prize.
  • Borrow money from pessimists -- they don't expect it back.
  • Half the people you know are below average.
  • 99% of lawyers give the rest a bad name.
  • 82.7% of all statistics are made up on the spot.
  • A clear conscience is usually the sign of a bad memory.
  • If you want the rainbow, you got to put up with the rain.
  • All those who believe in psycho kinesis, raise my hand.
  • The early bird may get the worm, but the second mouse gets the cheese.
  • I almost had a psychic girlfriend, But she left me before we met.
  • OK, so what's the speed of dark?
  • How do you tell when you're out of invisible ink?
  • If everything seems to be going well, you have obviously overlooked something.
  • Depression is merely anger without enthusiasm.
  • When everything is coming your way, you're in the wrong lane.
  • Ambition is a poor excuse for not having enough sense to be lazy.
  • Hard work pays off in the future; laziness pays off now.
  • I intend to live forever. So far, so good.
  • If Barbie is so popular, why do you have to buy her friends?
  • Eagles may soar, but weasels don't get sucked into jet engines.
  • What happens if you get scared to death twice?
  • My mechanic told me, "I couldn't repair your brakes, so I made your horn louder."
  • Why do psychics have to ask you for your name?
  • If at first you don't succeed, destroy all evidence that you tried.
  • A conclusion is the place where you got tired of thinking.
  • Experience is something you don't get until just after you need it.
  • The hardness of the butter is proportional to the softness of the bread.
  • To steal ideas from one person is plagiarism; to steal from many is research.
  • The problem with the gene pool is that there is no lifeguard.
  • The sooner you fall behind, the more time you'll have to catch up.
  • The colder the x-ray table, the more of your body is required to be on it.
  • Everyone has a photographic memory; some just don't have film.
  • If at first you don't succeed, skydiving is not for you.
  • If your car could travel at the speed of light, would your headlights work?

FJ Cruiser: Skids...

I purchased All-Pro's series of skid plates last month, including the transfer case/exhaust skid plate.  With some help from All-Pro a week or so ago, I got the front suspension skid installed.  I needed their help because the front-most holes in the skid weren't in the right place, or so I thought.  The real problem turned out to be some new parts (new for the 2013 model year) that All-Pro had never seen before.  These were small formed brackets.  When these brackets were removed, the front suspension skid fit just fine.  I was able to get the transmission skid plate in by myself; everything fit fine on it.

But then when I went to install the transfer case/exhaust skid, I ran into several fitment issues.  The worst one was that (again!) the front-most holes were in the wrong place.  This time there were no extra parts for me to remove, so I was stuck again.

I'm very impressed with the design and build quality of All-Pro's parts – but what has even that beat is their service.  These folks know they're dealing with a noob when they work with me, but they didn't hesitate to offer their help whenever I asked.  This time was no exception.  I drove up to Perris with my transfer case/exhaust skid, and Nick went to work on my truck.  To my great relief, he ran into the same issues I did – so it wasn't something completely dumb that I was doing.  It took him almost three hours, but he eventually got my skid installed.  He had to modify it slightly (drilling out those front-most holes to a larger diameter), but mostly what he did was to put things together in the right order and then pry, knock, bump, and cajole the parts into place so they could be bolted in.  I learned a great deal about the art of fitment in the face of annoyingly loose Toyota tolerances.  In fact, if I had any idea what I was doing I could have done all the things Nick did with my tools at home – but there is that pesky problem that I don't know what I'm doing :)

Bottom line: if you need armor for your FJ Cruiser, I recommend All-Pro without reservation.  Great products, service, and people!

In the end, I drove home with all three of the main skid plates installed.  The bottom of our FJ is now armored quite nicely; we'll have to try very hard to damage anything.  I still have a little more armor to install: the lower links for the rear suspension have their own cute little skids (four of them, one for each joint), and I have a rear differential skid on the way here.  After that, we're “armored up” and ready for bear...

The Kid and the Camel...

These two get along very well...


Sorry about the no blogging yesterday - I was on the road to Perris, California to get my transfer case/exhaust skid modified and installed...