It looks like I have finally hit the very top of Google rankings. Just search for madhu. For years I have been #2 or #3, but it appears that at least for the time being, I’m at the top. I guess the only place I can go now is down ;-)

I always served two masters: hardware and software. In the early part of my career, I designed mostly hardware, such as control systems, computer interfaces, and data acquisition. Over time, there was greater demand for software, so that’s what I do for a living today. These days, hardware is more of a hobby than a profit center.

Recently, my interest in hardware has re-emerged. Fortunately, I’ve set up a nice bench with test equipment and soldering iron ready for action. I’ve been meaning to document some of circuits I’m working on. This article is a step in that direction.

I was cleaning out some old computer equipment from my parents house over the weekend and I found some real relics. There were numerous monitors, printers, scanners and the like. There was also Callan Unistar lurking in there (early 68k based Sys V Unix box). The processor board failed years ago. A DEC Alpha machine was there also. The real find was one of the original 128k Macs that my brother purchased in 1984. It’s actually a “fat mac”. The memory was upgraded to 512k by yours truly. It was one of our guinea pigs for a fly by night Mac upgrade business we were running in those days. I recall that it didn’t boot after soldering IC sockets (the original Mac had no sockets for memory). That was painful, but after removing all the sockets and resoldering with greater care, it worked. It’s a shame to toss out that piece of history. If you want it, let me know.
In a related note, I just purchased a new iMac and it is fantastic! It took only two days for delivery, which was really nice. If you read my previous post, it’s no surprise that I have just about had it with Windows. After talking with several colleagues, it seems that XP just doesn’t work smoothly with multiple users and I’m not about to figure out why.

The new Intel Macs are really nice. The LCD monitor is bright and crisp. The speed is excellent, maybe twice as fast as my 1.6 GHz pentium. The price is quite reasonable also. With Parallels Desktop, you can run Windows, Linux, and whatever else you like all at once. Macs are back and now it’s no longer an either-or proposition. BTW, Apple stock is up after the much anticipated announcement of the iPhone.

I was reviewing some old bookmarks in my browser the other day and I ran into a link to Naked objects. This time, I decided to read more about and I found myself unusually inspired. In the recent past, I have been disappointed with the pace and quality of software engineering. Certainly, there have been evolutionary improvements, but nothing that I would consider new or unique.

Naked objects is an architectural pattern for development of business applications. It was developed by Richard Pawson during the 1990s and culminated in a book published by Wiley in 2002, now available online, and Pawsons Ph. D. thesis in 2003. Richard Pawson was awarded a PhD by Trinity College, Dublin in June 2004 for his work on Naked Objects.

Pawsons thesis is an incredible read. If you have any interest in software and object-oriented systems, I strongly encourage you to read it. It traces the evolution of object oriented principles and suggests that somehow, somewhere, we went wrong. This view is supported by the creator of the venerable Model-View-Controller (MVC) design pattern, professer Trygve M. H. Reenskaug. Reenskaug was a visiting scientist at Xerox PARC in 1978-1979. Reenskaug believes that MVC has been perverted to the point of making the computer control the user, which was entirely not his intent.

In a forward contained in Pawsons thesis, Reenskaug retraces the purpose behind the MVC pattern. He laments that his original ideas were not published, which lead to the “C” or controller acting as a script controlling the user, rather than the other way around. This has lead to the belief that modern software systems are so complex that ordinary people cannot be expected to understand them. In the end, users do not develop a mental model that expresses the underlying software model. This disconnect can only serve to increase the cost of quality software, if it can be developed at all.

MVC is the staple of most user facing software systems today. It is widely heralded as the solution for user interfaces. Indeed, it is better than most other proposed solutions of the past. The real problem, as Pawson points out, is that most domain models built today are behaviorally weak. They are no more than value objects or glorifed structures found in Pascal and C programs of two decades ago. For this reason, many have argued that objects don’t work, and maybe functional programming is a better model.

Pawson promotes the use of behaviorally complete objects, objects that are more than simple containers for data. It follows that if objects do not encapsulate behavior, or related business logic, the logic will be expressed in some other place negating to whole purpose behind object orientation. Most often, the behavior is placed in a controller, which makes it difficult to reuse. Further, behaviorally weak object tend to be tightly coupled to the controller, which leads to inflexibility.

Pawson coined the term Naked Objects, which describe a pattern of usage where behaviorally complete objects are presented to user transparently. The users mental model is the domain model, there is no other logic or data to get in the way. Robert Matthews took the idea further by developing a Java framework which automatically generates an object oriented user interface by introspecting the domain model. This leads to impressive productivity gains during development. The 3.0 release of the Naked Object framework represents years of development on business systems. 3.0 automatically creates an object-oriented user interface, or viewing mechanism, along with automatic persistence using Hibernate.
Pawson and Matthews put their ideas to work in real world, large scale applications for the government of Ireland. Their framwork is available as open source. Still, some developers were not impressed with the user interface and considered it more of good start rather than a production solution. To address some of these concerns, Eitan Suez has developed a very impressive framework called jMatter. The user interface is entirely based on Swing and persistence is automatically supported through Hibernate. Following Pawson and Matthews lead, the developer need only prepare a behaviorally complete domain model, the view and persistence is automatically supported by the framework.

This is far from the end of the story. It appears that many developers have been inspired by Pawsons ideas and continue to develop their own frameworks. HTML viewing mechanisms are currently under development which has the potential to significantly affect the way in which Web applications are designed and built.

For months, I’ve been trying to track down a nagging problem with Windows XP on one machine. I can logoff and shutdown without any problems through my account, but when others logon, they can neither logoff nor shutdown. Usually, RPC PDP server doesn’t respond to the shutdown event and everything is hosed after that. My guess is the XP eventually shuts down, but that’s often 10 minutes or more, which is well past the limits of my patience.

I think I finally solved the problem. There are rumors that shutdown problems are usually due to misbehaving device drivers. I had not installed any device drivers in years, so I don’t know why that should cause trouble. More importantly, why would one account shutdown fine, but others cause trouble? Eventually, I found some posts pointing to Lexmark/Compaq inkjet driver bugs. I don’t use inkjet printers anymore (that’s a rant for another day!), so I uninstalled the driver. That seems to have done the trick, or so it seems.

This leads me to deeper questions about the internal workings of Windows XP. I can understand that misbehaving code at any level can cause trouble, but what I don’t understand is why the entire operating system halts or at least acts like it’s lost its mind. Maybe I’m missing something, but I just don’t think an operating system should fail if one driver acts badly. In the worst case, the OS should nuke that process and move on. Sure, this might break something, but what’s the alternative? Something is already broken, so waiting indefinately won’t fix the problem.

Over the years, Windows has increased in complexity. This is not entirely the fault of Microsoft. To their credit, they have done their best to maintain backward compatibility, even if it hurts. The downside is that lots of legacy code hangs around and likely never gets fixed. Who knows what will happen if it does get fixed? They just keep adding code resulting in an ever increasing code base that becomes harder and harder to maintain.
The real solution, IMHO, is to start over. I think Microsoft realizes this and has tried to start over with Longhorn. The problem is that it has taken them decades to get to this point and it’s not a simple matter to build something completely new while maintaining backward compatibility. There have been plenty of articles written about Longhorn development woes. Even with all the resources of the worlds largest software company, it’s simply too hard of a problem to solve easily.

In contrast, Apple seems to have dealt with the problem of a flagging OS by throwing it out and starting over. Clearly, it can be done. The transistion from MacOS 9 and MacOS X was by no means smooth sailing, but it was a necessary step. Without it, the Mac would probably have failed completely in the market. After the transition, MacOS has emerged as a stable, reliable operating system.

It remains to be seen if Microsoft can reinvent Windows. I mean really reinvent it, not just add features or improve the look and feel.

A friend sent me a link to an excellent article about Web 2.0, it’s written by Tim O’Reilly. If you believe Tim, Web 2.0 is more than AJAX and cool web pages. It’s all about collaboration and applications that get better as more people use it. eBay, blogs, and wikis are some examples. Read the article, it has some very interesting insights.

I recently ran across an interesting website that lists alcohol yields of various crops per acre. The results are quite interesting. Apparantly, one acre of Jeruselam Artichokes yields about enough alcohol each year for one car. Considering that grass is the largest irrigated crop in the United States, maybe it’s time we replaced some of that turf with artichokes?

Have you tried Eclipse Web Standard Tools (WST)? It is really nice! It has great support for editing a number of different types of files, including XML and XSD. It has a nice SQL query tool that works with any JDBC enabled database. It even creates Web service clients with a simple right-click on a WSDL file!

Installation requires three other plugins, and Eclipse SDK proper.

Labor day was a very slow day for email, or so it seemed. I got nothing, no response from previous emails, not even spam! This was suspicious, I couldn’t believe that every spammer was on vacation.

After a quick email from a secondary account, I got this bounce:

Recipient’s mailbox is full, message returned to sender. (#5.2.2)

I checked the mail server, but there were no messages there either. Clearly, something was configured wrong. Tech support determined there were more than 6500 emails in my inbox, but not the inbox I was looking at. It turned out that the primary email server was forwarding to a secondary email server and did not delete the originals. I was reading from the secondary email server and deleting messages, but the primary was filling up.

I logged into the primary and found that 6500 emails were received between March 2006 and September. That’s about 930 emails per month or 30 emails each day. Most of it was spam, of course.

Cleaning up my primary inbox without losing anything over the past few days was not trivial. Clicking through 300+ pages of emails would take at least half an hour. I figured I could use Thunderbird mail client to pull everything off and then sort out what I wanted to keep. I started it up and it seemed to cruise along at a reasonable clip. I figured it wouldn’t take more than an hour or so, but it didn’t. I failed to account for the non-linear distribution of email sizes. I went back to the server, sorted by email size and deleted the about 20 pages of really big emails. I guess I could have just pulled down headers only, but it wasn’t clear to me that messages would have been deleted on the server.

The POP mail client was still running on a laptop in the other room. The question of concurrency came to mind. What would the POP client do if messages were deleted from the server while it was retrieving? One would think it would just pull down what it could and keep going. When I went back to check, Thunderbird had stopped and complained that a message was missing. It didn’t seem to respond well after that. I restarted Thunderbird which took about 30 minutes to finish pulling down about 6000 remaining emails.

I’m getting spam now, so things seem to be back to normal.

Doing anything at the last minute is usually not a good idea. That seems obvious, but it’s something I had to learn the hard way.

Years ago, I used to work in the aerospace industry. It’s a lot of fun, but there’s also a lot of tedium and waiting. High dollar, single quantity products such as spacecraft, are not easy to build, test, and deliver. The problem is that everything has to be right the first time. This also applied to the systems used to test the flight systems.

There are many stages of testing, one of which is integration with a larger package, in our case the “ride”, or the satellite our instrument was piggybacking on. The satellite was built by GE Astrospace division, formerly RCA. This particular satellite system was quite old, it was primarily used by NOAA to measure cloud cover using infrared imaging.

Our instrument was bolted to the satellite after which GE would go through their automated test procedures. There are a lot of systems on a satellite, so the test takes a long time — usually hours. The test is monitored by GE and NASA staff in what is called the NAGE room. Our lead systems engineer was located there as well to monitor the test. Myself and another colleague were located in the NAGE annex. This was a small room far way from the NAGE room proper. We had a direct data link from the satellite telemetry stream which we would use to monitor our instrument. Our only communication was through that data link and a telephone.

The data link was a proprietary, synchronous serial stream designed in the 1960s. Nothing existed off shelf to interface to that stream, so we built our own interface. It was basically a couple of shift registers feeding a FIFO interfaced to a PC ISA bus. We had no idea if that interface would even work, this was the first time it had been used with a live system.

We were told that it would be several hours before our instrument was to be powered on and we would see data. In the mean time, we thought we might add a few features to our data capture and display software. It sounded like a good use of time. It didn’t really matter, we recorded everything on DAT tape in real time anyway.

We were given regular updates through phone calls from our systems engineer in the NAGE room. Eventually he called and told us we were about to be powered on. It was absolutely critical for our ground support (GSE) system to record all data during power up. If something went wrong, we could go back through the data and track it down. We sat patiently waiting, waiting, waiting for the bits to come down that cable in the wall.

Finally, it showed up. To our amazement, the instrument powered up normally, went through it’s built in test sequence and delivered good data. Our GSE interface worked flawlessly also. It was like the Eagle landing on the moon! We were jumping for joy along with the systems engineer in the NAGE room.

I thought I would switch screens to look at different telemetry streams. I hit one of the function keys. That was a mistake. The screen froze and the PC no longer responded. The tape drive write LED no longer flashed every half second indicating data was not recording.

Our GSE software was written in C, primarily by yours truly. As any C programmer knows, the C runtime does not have any runtime type safety. Simply put, a bad pointer caused the PC to crash. These were the DOS days, no hardware memory protection. Apparently, this was one of “features” I added while we were waiting in the annex. Things were not good, nothing was being recorded, bits were spilling on the floor. We were in shock. I handed the phone to my colleague who didn’t know what to do either. He hung up the phone without saying anything as we frantically tried to reboot as fast as possible.

Our systems engineer immediately called back, we felt like we were in the control room of Three mile island with the core temperature rising. Our systems engineer was very understanging, he tried to calm us down and said he was not going to yell at us, just to tell him what was going on. Eventully, we rebooted, started recording again and didn’t touch anything until the test was over.

Fortunately for us, nothing went wrong with the instrument. Everything we smoothly, but it was a hard learned lesson.

« Previous PageNext Page »