MontlakeBlog

Entries as of Wednesday, July 23, 2008
   |  Programming

[ ]

If you read certain kinds of blogs, you often see a specific set of questions get passed around among The Big Guys. Sometimes, their responses are interesting to read. I've enjoyed thinking about what my own responses would be to a certain set that is recent, so I've written down a bit of what I've thought for each question.


How old were you when you first started programming?
About 40. The key here is 'programming'. As an early user of personal computers, you had to be able to find your way around various pieces of code. Even our BIOSes were often available in assembly language, and there were scads of minor applications for which you had code that could be modified. But that's not "programming." A modern term for someone who does stuff like that is a "script kiddie."

How did you get started in programming?
I had been a script kiddie for a few years, and had adopted a public domain database system (written in BASIC) to store terminology for what was then my translation career. At some point, I switched to a different database system, and in those days it wasn't common to have conversion facilities built into the new application. I thought about what it would take to write a Z80 assembly language program that would convert the existing data into the format of the new db system. Fortunately, I had no idea whatsover, so I went ahead.

What was your first language?
Z80 assembly language. Is it a language? I'm not sure. I had "scripted" BASIC and even COBOL before my first actual program, but wouldn't get to true languages until various forms of BASIC over the past 15 years or so.

What was the first real program you wrote?
The aforementioned data conversion project. What had made that seem reasonable was that I was involved in a hacker movement of the day that I believe was called "Z System." Some truly talented folks had decided to resist the powerful trend toward the IBM PC, and had extended a previous operating system for 8-bit processors called CP/M. Part of their work was to create libraries of standard functions. So, instead of having to specifically code (in assembly) the opening of files, reading thereof, saving, all that stuff. you could set up a call to one of these functions, and the miracle would be achieved. I don't recall how many weeks I worked on this program, but it was deeply engrossing, and I eventually finished. It took approximately 17 seconds to run, and would never be needed again. I was hooked.

What languages have you used since you started programming?
Z-80 assembly, Word BASIC, Visual Basic scripting, and C#.

I'm not going to include COBOL in that list, but I love my COBOL stories. A short version of one of them is that I adopted a college textbook on COBOL, and used it to teach myself. Because I had no real teacher, I depended upon the numerous examples in the textbook. Not all of the examples worked. I began writing the author (a professor at an Eastern school), and she kindly responded (she had to, really, because I was right about the examples being flawed). At one point she told me that my efforts came at a wonderful time, because the textbook was being revised (for the nth time). When it came out (after I had passed the need to know the language), I wanted to see whether I had been credited for my efforts, but the textbook was $75 and came only in plastic-sealed editions. Some day, I'll stumble upon an old copy.

When I started working at a real job (but not as a programmer), I discovered the powerful language built into Microsoft Office. I suppose it is uniform now, but then each Office application had its own flavor of BASIC, and I was only interested in that for Word. I had become a specialist in writing Windows Help, and in those days that meant that you compiled your code + text into Windows Help files. There were some intricacies possible with Help that even Microsoft didn't bother with, but as I learned about them, I had the cooperation of such developers as Barry Allyn, who would code the detail-level stuff necessary in our product to hook into my detail Help. I used WordBasic to create a system that went into the code that The Boys had checked in each night, picked out stuff relevant to Help, and automated the system so that I could write the Help text for those items without them even having to inform me that they were available. This system worked marvelously until Microsoft changed their Office programming model, and I've never revisited Office programming again (which is not to say that I don't want to).

When I started contracting to the government, I happened into a formless project that was ready to be made into whatever an energetic couple of guys wanted to make of it. Because of such wonderful developer resources as Barry and Ramesh Rajagopal, I had become familiar with the technologies behind the new web-based application environment I was seeing for the first time—Microsoft Active Server Pages (ASP). In those days, one had the choice of Visual Basic scripting or Javascript, and I chose VB, even though I am a confirmed C kind of guy (I know now). But that wasn't my first language experience with ASP.

Our company had been contracted to bring Windows tools into a Unix-based project. The government supervisor had found lots of applications that "did all the work for you," and "anyone could create web-based applications." He was specifically interested in reports (from the data collected over the previous ten years), and my buddy Ed was able to use one of those commercial off-the-shelf (COTS) products to create just exactly the report the government guy had wanted. Almost. "Oh, Ed. See those repeated outline markers (A,B,C; i,ii,iii) that get put in front of every paragraph? I don't want those." What to do. The code-generating application didn't allow for such customization. But because I knew that they generated code, I had him send me the Javascript output. I modified the code to do what the boss wanted, and everyone was very happy. "Oh, Ed. Now do all those other reports the same way." What to do. The report application wouldn't accept the code I had created, so Ed couldn't use the COTS appliation anymore. We became real programmers.

We went on to create, over the next three years, a very successful suite of web applications that performed tasks of what is called "litigation support," that is, computer support for the activities of lawyers. It was a very satisfying period of both our lives, and when I look over materials from that time, I see that we had every reason to be proud.

ASP was to be replaced by something called ASP.NET, and I had time in my last year of that contract to work on preparing myself for the new technology and what would probably be a new job. For reasons I can't recall, I immediately adopted the new version of C that had been developed for Microsoft .NET—C#. I think I knew from previous exposure to C-based languages that this was "me." Languages really are like that.

C# is now in its third edition, and I'll never even know the first edition very well. You don't have to, really, for work with .NET. Like my original Z80 assembly language programming environment, most of the work has been done for you, and the language that you use to call those ready-made functions is immaterial. You can still do real, low-level programming, of course, and that's where the steadily increasing new functionality has most application. I doubt that my interests and career will ever take me to that level, and I'm fine with that.

What was your first professional programming gig?
Although it had certainly not been intended as a programming gig, the work that Ed and I did for our government litigation support tasking was the first programming for which I had been paid. All subsequent professional work has been as a contractor to the government.

If you knew then what you know now, would you have started programming?
Absolutely. I'm sure that some have compared it to a disease, and it is certainly addicting. There is something enormously satisfying in just doing programming, irregardless of the purpose. As I can testify, when to that is added purpose, my goodness, you almost begin to float.

If there is one thing you learned along the way that you would tell new developers, what would it be?
You're never too old to start, but you have to accept that some things will never come as easily to you as they do to folks who got to do them before they had even started to think. Much like learning spoken languages.

What's the most fun you've ever had ... programming?
I'm delighted to say that the projects I have done as a government contractor (over three different contracts) have equal regard in my memory. And I think there's a reason for that fun in each.

Each contract had one government supervisor who believed in computer technology. In some cases, these people had trouble turning on their own computers, and you would certainly never have let any one of them turn on your computer, but their faith in what this technology can do was simply child-like in its simplicity. And so, making their dreams come true—as I interpreted their intentions—provided the stimulus that generated fun. You'd get an idea to satisfy what they wanted, and then show it to them. Yes! But make it more... Fine, and I did.

Without the mandate to apply computer technology to everyday tasks of these government organizations—a mandate that did not come with micro-management (and often with no management at all)—left this untrained programmer full freedom to find out what needed to be done and do it. It has not been a conventional programming career, but then I was older when I started than most programmers are now, well into their careers.



posted at 02:17 PM | | |

   |  Whodunit? I know, I know!

[ ]

I finished Qiu Xiaolong's second Shanghai Inspector Chen novel, where Inspector Chen had just explained how he came to understand who done it and all, and I turned to check email and the latest news. There on MSNBC is an article about a Canadian model killed in Shanghai. This case evidently didn't need Inspector Chen, although of course we don't know who solved it. A young man was found, and will probably soon be executed. I hope he did do it, not that it will make any difference to his fate.

From what we hear, the major cities of China are "modernizing" at a rapid rate, and of course the upcoming Olympics event has added to the international nature of those changes. Such crimes are part of modernization, I suspect.

For all the supposed control a communist government exercises over its society, it looks like the reality is that China is more like our Wild West than Nazi Germany. Inspector Chen is a good cop (like any self-respecting fictional hero), but not everyone in the various police departments he encounters shares that quality with him.

That sad event shares characteristics with a rather exciting film from about ten years ago—Richard Gere in The Red Corner, which also has more than a little to do with modeling, China, and death. That film needed Inspector Chen desperately, and so do we...


posted at 10:13 PM | | |

   |  Happy Birthday, USA

[ ]

Although I live in our nation's captial and am situated a simple 2-mile walk from the famous Mall where fireworks fly and explode in peals of thunder every 4 July, I chose last night to watch a movie, instead.

Not just any movie, mind you. Everyone had been telling me how great the HBO John Adams mini-series was, so I bought it, and there it was waiting for me on our nation's birthday.

I only made it through a disc and a half (there are three), but I'll finish it this weekend. I was a bit disappointed, built up by all the raves. First, it is truly a TV movie (despite its wonderful 1.85 aspect ratio—I guess that's TV today, too), and I made myself try to be aware of what made me feel that way. From the point of view of content, everything is politically correct by today's standard. A woman has an equal role, and in fact she often tells Adams what he should do and say. Blacks are obvious in both slave and non-slave roles. The subject of slavery is brought up, then everyone agrees not to force the subject at this time.

Cinematically, 90% or more of the filming is only of a single face or of the two faces in discussion. I suppose the TV soap opera is the model for this style. TV movies are really plays, I guess.

But I'm enjoying it. No Paul Giamatti character is totally likable, and Adams makes that point about himself on more than one occasion. It was a wonder to see David Morse as George Washington. If I hadn't seen his name in the credits, I would not have recognized him. Morse played the sympathetic tall, tall doctor on the 1980s TV show St Elsewhere, and he was not only tall but quite thin. He and I share similar physical transformations.

I burst into fits of pride, as I recognized scenes from Colonial Williamsburg. "I sat in that pew," "I walked on that path," etc. And the scenes of the Continental Congress actually take place in the very room in Philadelphia where the actual events occurred. And I've stood there, too. They were filming at Williamsburg, the last time I was there, but no one seemed to know the name of the film. I just remember the immense catering effort, which had been set up a few yards from my room.

Right from the beginning, the main point of the film and of our country is strongly made, that what became the United States of America shall be a nation ruled by law and not by privilege and emotion. Anyone who has sat on a jury knows this, and we get to see it in its infancy.

Happy 232nd, US of A! It hasn't been a smooth ride, and I have my doubts that it will ever be done, but we're on the way, and John helped start us on the right path...

posted at 07:14 AM | | [1] |

   |  Gates leaves

[ ]

You're probably much aware of Bill Gates stepping down from his position as God at Microsoft than am I, but I have heard about it.

Andrew Connell, a major figure in the SharePoint community (a Microsoft product, although he uses a Mac!), has a nice piece on Gates' new career, and writes some things I didn't know.

Connell on the Gates Foundation.

The line about how most charitable organizations hang on to their money was quite an eye-opener...

posted at 07:24 AM | | [3] |

   |  Wisdom from a Thai detective

[ ]

Speaking of dissertations, I remember yelping with glee as I read (in Fritz Mote's translation of KC Chang's A History of Chinese Political Thought) this explanation of the difference between the West and China [standing, I would argue, for the East]:
The intent underlying Western thought and learning was to extend knowledge. Chinese thought and learning were based on the idea of practical application. The one whose purpose is to extend knowledge seeks truth, and no matter whether his methodology is inductive or is deductive, is that of analysis or that of synthesis, his argumentation must be free of contradiction and it must take form in a system...The one whose purpose lies in practical applications has implementation as his objective...When something worthwhile comes to mind, it is set forth in words; it need not find its proof in argumentation...

Another yelp of delight, tonight. I'm reading John Burdett's Bangkok Tattoo, second in his series of Thai detective novels, and come across this passage after a girl who works for the detective (he also runs a whorehouse) appears to have killed an American customer:
I'm very happy that Vikorn has saved Chanya from that crude and undiscriminating justice they have in America where, if they extradited her, they would never make allowances for her youth and beauty, the stress inherent in her profession, or the ugliness of her victim.

Sigh. So much wisdom...


posted at 07:50 PM | | |

   |  Chinese, too!

[ ]

I'm a great fan of a Russian optical character recognition (OCR) application called ABBYY. After using OmniPage for years, and getting increasingly frustrated over its poor Windows programming (however good it might have been at character recognition), I switched to ABBYY a few years ago, and have been delighted at the results. I bought version 9 a few months ago, more to keep up with ABBYY than to meet any scanning need I currently have.

They sent email the other day notifying of an update, the only feature of which seemed notable was the inclusion of Chinese OCR. I downloaded the free upgrade (actually, it is the entire program, and at twice the size of the recent release, was clearly something more than I already had), and couldn't resist running a page of Chinese text through it. Absolutely amazing.

I include both a page (Word) that is the result and also an image of the page it was scanning. ABBYY didn't have it as good as that image, though. It took some work to increase the contrast enough to make the bleed-through text on the reverse page disappear. ABBYY didn't have that luxury, and I simply deleted the characters it thought it was seeing.

It recognized the language (Chinese PRC) without difficulty, and so far as I've been moved to check, has made no errors.

The only practical application I can imagine for this in my current life (more than 20 years past my dissertation in a field of Chinese) would be to provide the Chinese text that I ended up writing in by hand on the manuscript that is the only version of my dissertation to see the light of day. About ten years ago, I converted whatever text I had into a modern word processing file (how modern is that now!), and then set about seeing what it would take to "print" the Chinese text as well. A whole, whole, whole lot of work, and Real Life has intervened ever since. Although converting the Chinese original text(s) into modern digital forms through OCR is approximately Project #458 in my current list of things to do before I die, it least it has a position.

The image
The recognized Word file

posted at 07:50 PM | | [1] |