Sunday, March 28, 2010

Welcome to My Research and Development Lab

In search of the perfect next development tool to create our shop floor control system I was now in full blown research and development mode. I would read lots of magazines looking to learn as much as I could. I had a modem and a phone line in my office now too, and I was downloading free programming tools and trying them out.

Bob allowed me to take off and go to the public library so that I could read magazines articles about languages and programming. There were plenty of articles about object oriented extensions to languages like C and Forth. I found all this very interesting, but I had no experience with object oriented programming so I really didn't know what to think.

I saw an ad in a magazine for a language called Actor by the Whitewater Group, and this really caught my attention. The code looked like C, but it was supposed to be object oriented. There was a code snippet in a screenshot in the ad that implemented a very simple drawing program. The code was just a few lines long. The screenshot also showed the simple drawing program and they used it to draw a version of the product logo. The idea was that you could create very sophisticated software with very little code. The only thing was that the software was not cheap, and it required a copy of Microsoft Windows 2.1. We weren't yet running Windows on any computer in our office. This was in the summer of 1988.

One other tool I was interested in was called Matrix Layout. This was a visual flowcharting tool that produced graphical DOS applications. I guess you could call it a kind of HyperCard, which is a Macintosh programming tool for end users. It was only $149 so I obtained a copy for myself. The developer's office was in Boston, so I just drove there one day after work and bought it at the receptionist's desk. I was ultimately quite disappointed by this product. I tried to prototype a version of the video rental application I wrote in BASIC, but it was too much effort for the result. Once you've used a real programming language, these visual tools for non-programmers feel very limited. Clarion is really a lot better because it has a real programming language you can use to script extensions beyond the visual layout tools. Matrix Layout did not provide any way to write scripts. A simple BASIC interpreter would have done great things for this tool.

Then there was Ashton Tate's Framework. This was a fascinating programming system where modules of your application are in a frame, which can hold more frames, and these can hold yet more frames, etc. It had a scripting language called FRED which was based on a Lisp, a very powerful language. Framework was an integrated office suite, and it was extensible using the frame concept and the the scripting language. I never actually got to try it out, but I'm not sure it would have been suitable for the shop floor control system I wanted to develop anyways.

If Bob was beginning to wonder about whether I was ever going to produce anything for all the time and money spent, I never knew it. He was very patient. I did manage to stay busy with smaller projects. He had lots of ideas to enhance the applications I had already written, and he would come to me and we would talk about what he would like.

Tuesday, March 23, 2010

Thinking Forth

After my disappointing experience with Wendin DOS and C I decided that I needed a more expressive programming language. I started to dabble in different languages, and I would write toy shop floor control systems to see how the code would come together. My work was exploratory in the sense that I wasn't in a big hurry to produce a result. I felt that I didn't know which course to take. In particular, I didn't know how to code a solution to overcome the hurdle of multitasking.

For example I experimented with a 4GL called Clarion. Bob was willing to spend several hundred dollars on this based on some stellar reviews that it received in magazines. Clarion really was great, but it was oriented primarily as a development tool for forms based database apps, and it had a nice reports engine. It did also include a compiler for BASIC-like language, but this was a short lived experiment. I do seem to remember creating a custom app for accounting with Clarion so we did get some value for the money.

So after this my mind turned back to the Forth programming language. I had already some experience with it, and I was excited to see if I could use it to create a multiuser shop floor system.

I found a version of Forth called Fifth, which included a simple IDE for MS-DOS. I also played with a couple of other Forth implementations.

So I went looking and bought a book titled Thinking Forth by Leo Brodie, the same author of the wonderful Starting Forth book I encountered a few years earlier. This was the most inspiring book about programming I had read yet. I enjoyed Leo's explanations about how software needs to be written abstractly, that code should be as small and simple as possible, about the importance of choosing the best words for procedures and variables, and also how to write well factored code and what that really means. The book also has great interviews with experienced Forth programmers and many funny and illustrative cartoons. Great stuff. Now, where did I put my copy?

Monday, March 22, 2010

Books I didn't buy

Before there were big book stores like Borders or Barnes & Noble there was The New England Mobile book fair in Newton. This could hardly be considered walking distance from my home growing up in Needham, but I had made the trip on foot a couple of times as a kid with my brother Ernie. Now I made the trip more frequently since I had a car.

This store was really just a big warehouse, poorly lit, and not very well organized. However this was the largest collection of books for sale to be had for miles.

I remember clearly two books that I browsed there that I didn't buy but which left an impression on me.

One was called A Small C Compiler, by James Hendrix. Not the famous musician, of course. ;-) I read just enough of the book to appreciate its biggest idea. Once you write enough of a C compiler in assembly language, you can use that C compiler to write itself! Like I said I didn't buy the book, but I learned important ideas from just browsing through it.

Another book was call Smalltalk-80: The Language and Its Implementation. This was a tan and blue hardcover. I can't say I really understood at that time what I was looking at, but it was interesting enough that I didn't forget it. In more recent years I did find a copy of it used and now am a proud owner. Smalltalk is a terrific language this book explains in wonderful detail how it works. Nowadays the entire contents of this book can be read for free online.

Friday, March 19, 2010

Moving to Belmont

About this time I moved to Belmont with my brother Paul and his little daughter Christina, and also a friend of ours from our church named Stuart Harrington. Belmont is a very nice little town between next to Waltham where I worked, so I had a 15 minute commute. What a great place to live. Drive 15 minutes one way and you're in Boston. Drive the other direction and you're in Lincoln. I really enjoyed that.

Eventually Stuart got married and moved out and we were joined by another friend from church named Paul Ward. Paul was a sonar operator in a fast attack sub when he served in the Navy. He told interesting stories. We decided to share a room. We bought a steel tubular framed bunk cot. I would get up early in the morning and help him deliver newpapers in Lexington. I had inherited one of the Osborne 1 computers from work which Paul and I would spend some time tinkering with and banging out simple BASIC programs. My memory is a bit foggy, but I seem to remember giving the computer to Paul.

I thought I might be able to purchase a new computer for myself now that I had a regular paying job. I was interested in practicing my C programming and Radio Shack had a nice little portable called the Tandy Model 600. I read somewhere that CP/M and a C compiler could be had for this little machine and I thought this would be a very neat computer to own. When they were getting ready to discontinue this model the price dropped well below a thousand dollars. However I wasn't very good at saving money.

I never did purchase a Model 600. Just as well because I think I would have outgrown it very quickly.

Thursday, March 18, 2010

Mousing Around

Since my Tandy 1000SX had high resolution graphics (if you could call monochrome CGA 640x200 high resolution) we thought it made sense to get a mouse and learn to program with it. Then we might be able to write even better software for the engineers to use when setting up each circuitboard for production. We had a crude graphical CNC simulator that ran on the Kaypro machines, so this could be a step forward for us with more detailed graphics and a mouse for a pointing device.

We bought the mouse at Radio Shack. It was a pretty nice little mouse, and it came with its own interface card like most mice did back then. I'm guessing that this mouse was made by the same people who made the the famous Microsoft Mouse. It was very similar. All the mice at that time had a ball for tracking movement, and this one was a metal ball with a rubber coating.

I believe that my first experiments with the mouse were in Turbo BASIC. There were no built in commands for the mouse. I don't remember exactly how the mouse was read either, but I remember there was documentation. Playing around with some code for drawing on the screen with the mouse inspired me to write an experimental character recognizer. I would draw letters on the screen and the program would attempt to convert them to ASCII characters. It really wasn't that hard to do, but prototypes don't have to be practical. It was fun.

The Epson QX-10

Somewhere we had acquired an Epson QX-10. This was a Z80 powered machine running CP/M, but it wasn't originally conceived as such. Epson had written a CP/M compatible operating system called TPM, and they had some lofty ideas about how a computer should interact with people. They chose Forth as the language to deliver their ideas. So there were some applications which were seamlessly integrated together, but this didn't wind up being a successful product.

So instead we treated this machine like it was another Kaypro. Bob asked me to write a program that would optimize the use of the fiberglass panels we made our circuitboards from. The panels were 24 by 36 inches (I think). For some order we might need a panel that was 8 by 10 inches. How should we cut the panel to reduce waste?

So I wrote a program in Microsoft BASIC for the QX-10. The user would enter the desired size of the material, and it would draw a rough image of the panel as it should be cut with instructions something like:

Insert the long way and cut 10 inches for 3 panels 10 by 24 inches.
Take each of those panels and cut 8 inches for 3 panels 8 by 10 inches each.
Total yield 9 panels 8 by 10.
Waste 1 panel 6 by 24 inches.

We used the computer for this purpose for several years. Hopefully the computer paid for itself in this role. :-)

Monday, March 15, 2010

Wendin DOS and C

One of Bob's ideas about improving our shop floor tracking system was to purchase a bunch of very simple wall terminals and control them from a single computer. This was meant to be a very economical solution. Workers in each department would type in the job numbers and quantities and so no one would need to run around collecting data with a bar code wand. I thought this was a great idea, and I figured I could write something like this in C.

To make this work I would need to write a service routine to monitor the serial ports, and the application would need to essentially multitask. I used C structs to manage related bits of information and created routines to read and write data to disk files. The program would present a simple prompt for logging in, specifying a department and entering a job information.

This was all fine, but it was hard to add new functionality to the system, and I was finding it frustrating dealing with memory bugs and pointer related bugs.

I decided that I needed a multiuser system. If I took the multitasking out of my C code then my programs would be simpler. I noticed an ad in a magazine for a multitasking version of DOS called Wendin DOS. This version of DOS was based on a VMS architecture, and it was very inexpensive. I approached Bob and he bought a copy.

On my Tandy 1000SX Wendin DOS was sluggish. I hoped that this wouldn't matter much because if I could create a working system then we could buy a more powerful 80286 computer to run it on. I was able to create multiple sessions and run my C tracking system in them. Each of them ran in its own text window. This was amazing to me!

Now the bad news. Wendin DOS would crash without warning. The whole screen would suddenly clear and display a "guru" error message. Guru error number such and such. This was really weird. What was a guru, and why was it in my computer?

Some of the error messages were explained in the manual, but some weren't. It became clear to me that there was nothing I was doing to make this happen. I contacted the people at Wendin and even got a response, but they didn't fix anything.

Ultimately I had to give up on Wendin DOS and look for another solution.

Friday, March 12, 2010

Watch City

C.F.C. needed a bigger place to make its product, so we decided to move to 179 Bear Hill Road in Waltham, Massachusetts right on Route 128 and across from a Polaroid plant. 3Com was in the building next to us. This facility was huge compared to the building it occupied in Newtonville. I got my own office, as did a lot of other people. This was an interesting turn in my own life just because my mother grew up in Waltham and I was born there.

Waltham is often billed as "the birthplace of the American industrial revolution" and is famous for being the home of the Boston Manufacturing Company. It was also home to the Waltham Watch Company, and so Waltham is known as Watch City. As of the time of this writing I live in Ashland, Massachusetts which is the birthplace of the electric clock. An interesting coincidence.

C.F.C. was growing fast and a lot of interesting things were about to happen.

Monday, March 8, 2010

All Night Long

About this time I got a phone call from the video rental store in Somerville which was using the software that I wrote when working for Patrick Alessi. They were having a problem with their hard drive. They were using an IBM PC/XT with a 10MB hard drive. They were backing up their hard drive onto about 30 floppy disks but for some reason their restore wasn't working correctly. They asked if I could help.

I drove to Somerville and took their computer home with me. I used a disk editor application to examine the disk. I needed to look at each sector on the disk and manually reconstruct their database. I was up all night long working on this. Thankfully I did manage to make their system work again. I took their computer back to the store and gave them the bill. $115. I was surprised to see the owner thought this was too much, but I thought it was actually a good deal given the heroic effort I put in. I didn't lower my price.

I was really, really tired and when I got home there was a church meeting going in our living room, so I sat down. My eyelids were very heavy, and I could barely stay awake. When the meeting was over I'll never forget that Joe Silipo, the one doing most of the speaking, came up to me. I thought he was going to scold me but he just smiled and said, "Brother, get some sleep."

MIX C

Unlike today, in the 1980s most computer magazines like BYTE, Compute!, and PC Magazine had lots of articles about programming and programming languages. BASIC, Pascal, Prolog, Lisp, Forth, assembly language; you name it. In 1987 C was a very popular language and a good C programmer made good money so I decided that I should learn it.

I found an magazine ad for MIX C headlined "C for yourself". They had a very special deal called MIX C Works and this included the compiler, a split screen code editor, and a source level debugger for only $89.90. The ad claimed that the included book would make learning C easy. I paid for this software myself, and it was so exciting to open the package when it arrived in the mail. Nice new crisp books and disks. It all felt very professionally done. It was a great investment.

It was very exciting to dig into the C tutorial and use the editor and the source level debugger. This was really well written software and book was as good as the ad promised. C is a nice, small language and well written C is actually quite pretty to look at with those curly braces.

We had some simple applications in engineering that were perfect for learning a new language. Open a file, translate the information in some way and write it back out to a new file.

VP Planner application development

Accounting wanted an application using a spreadsheet like Lotus 1-2-3. We did a little research and decided to try VP-Planner which was an inexpensive Lotus 1-2-3 clone. One of the nice features of VP-Planner was that it had a macro recorder. Instead of just creating a spreadsheet using a completely unrestricted form, it was possible to create a more shrinkwrapped type of application that limited which fields could be entered and to perform validation and such. I had never used this sort of development tool before so I had to learn everything fro scratch.

In retrospect I probably would have been able to produce what they needed faster in BASIC, and I certainly would have had more control over the result but this was a useful experience. Spreadsheets can be a good tool for people who don't want to learn a real programming language.

Tuesday, March 2, 2010

Enter the Robots, or... Old Apple IIs Don't Die, They Just Walk Away

Bob had made an arrangement with an entrepreneur (I wish I could remember his name.. Steve, maybe?) who was developing robots. The idea was that a robot could be developed that could tour a factory or other business and move materials automatically from one place to another. I don't know the details of their agreement, but it was probably that Bob would get one of these robots on the cheap or for free for providing the developer with space to work and for providing a real world factory for the robot to be tested in.

The entrepreneur was also the engineer developing the robot technology. I had a few good conversations with this guy because I shared an office with him briefly. He explained to me that the robot had two computers. One was an IBM PC compatible motherboard and the other one was an Apple II+ motherboard. The Apple II+ motherboard would later be replaced with a more generic 6502 card later on. One computer controlled the movement of the robot and read sensors, and it was programmed in C. The other computer had a goal seeking program written a language called Arity Prolog, and this computer controlled the other one.

The robot itself looked kind of like a big R2D2 with a flat top for placing materials to be transported. It had small sonar detectors like you would see on early Polaroid instant cameras, and on the top it had a small dome with a rotating infrared sensor. The robot was taught the layout of the factory, and it would continually adjust its course based on what it knew, what it sensed with sonar, and also by using the rotating sensor to look for infrared senders located in different locations in the factory.

Trouble with the Floppies

In my first years of computing my experience with floppy drives was pretty good. I had used several computers for thousands of hours total, and had seen hardly a hiccup reading and writing floppy disks.

The computers I had experience with floppies included:

Apple II+
IBM PC
Heathkit H-89

These used brands like Shugart and Tandem for their floppy drives.

Working with Patrick Alessi there was little trouble. He did smoke a pipe constantly around the equipment but this didn't seem to cause any problems.

At C.F.C. it seemed like floppy disks were more temperamental. Not that they weren't reliable enough for day to day use but they would cause problems just enough to be annoying. Maybe it was the industrial environment, or maybe the quality level for drives and floppy disks was falling. I dunno. Some of our disks came from customers and were formatted by their computers, so maybe that also had something to do with it. Floppy disks had become cheap and didn't have the same quality they did a couple of years earlier.

Some floppy drives could be calibrated using software and a screwdriver. I did try some of that, but I can't say I remember it being very successful.

Monday, March 1, 2010

Bombs away!

If a customer sent us a disk with drilling hole data this made our job easy, but many times they only sent us artwork on film, or worse. In this case it was up to Daniel Donoso (a very nice guy from Chile) to digitize all the drilling locations for a board. You take a different color permanent magic marker for each hole size, and then you connect the dots making a track that leads through all the drilling positions.

Then you place the artwork on a large digitizing machine called an OPIC II made by Excellon. This had a large polished granite platform, and on top rested a platform on top of felt pads. The artwork is placed on the table, and then using two control wheels the table is moved with several decimal places of precision through the course laid out in marker. Daniel would sit and peer into a "bombsight" down at the table and drop imaginary bombs on each position with a foot pedal. Each time he did this the X and Y position of the table was recorded to paper tape. This could take a while to do, and it took practice.

One really cool thing about the OPIC II was the digital display for showing the X, Y coordinates. It didn't have an LED display. Instead each digit position had one of those little vacuum tubes that had incandescent filaments shaped like each digit. I guess this might have been a plasma display, and not incandescent, I'm not sure. If you looked carefully you saw that the different digits were not all the same exact distance from your eyes because they were all packed into the tube in a row, one behind the other.

The OPIC II could not be called a computer, but later on we would find a way to use a computer with this machine.

The TRS-80 Gets a New Home, Briefly

After we built the new tracking system using one of the the Kaypro II machines, the TRS-80 was re-purposed by the drilling crew. A fellow by the name of Robert Doulbakian was in charge of that group. He wanted to use the TRS-80 to manage inventory for the drill and rout tool bits. I was very familiar with inventory management, having worked with Mr. Alessi on a couple such systems and Robert's requirements were very simple. I pulled something together for him quickly in Level II BASIC.

It seems to me that this particular computer was beginning to reach the end of its useful life. The keys were beginning to be sticky (and I think one of the keycaps had fallen off). In addition the machine was exposed to a more corrosive environment out in the factory, and these TRS-80 Model I computers had only silver and tin solder for contacts between the main unit and the expansion box. The computer would hang or reboot frequently.