Wednesday, December 30, 2009

That strange old thing called "Windows"

Apparently, I've been working with Linux more than I realize.

It's not just the little things, like trying to use CTRL-W to close windows (the key sequence used by MS-Windows is CTRL-F4). It's bigger things.

This morning, I came to the office, logged in to Windows, and started MS-Outlook. Outlook refused to run. It provided a dialog with the message "Outlook has had a fatal error" or something to that effect. I and a colleague worked on the problem for about fifteen minutes with no success. Eventually the colleague suggested that I restart Windows.

Restarting Windows is of course the first suggestion offered by most help desks. And it works. (It worked in this morning's case, too.)

I've gotten used to Linux and its ability to run and run and run, for days or weeks or months. So much so that I forgot the number one solution to problems in Windows.

Somehow I don't feel bad about that.


Monday, December 21, 2009

Side trip to Ruby

The office was closed today, so I took advantage of the free time to work on a side project. It's one I started earlier this year: creating OOXML files with Ruby.

This project was a nice change from the normal work. (That work uses C++.) I needed some time to "dust off" the programs and refresh myself on their internals. I had last used them back in October, and while they are not that large, they are large enough to require some thought.

The organization of the project helped me, as did the test framework. I've divided the project into a two groups of programs. One group generates a set of files in a mini-language that is specific to XML, and the second group (a single program, actually) converts the mini-language scripts into proper XML. I find this division of labor yields a clean design and small programs that are easily constructed and modified.

I also met some former co-workers for lunch. They were working, so I went to them and we had lunch at a nice little Irish pub. It was good to chat with them and catch up on news.


Thursday, December 17, 2009

Microsoft .NET - implementation, not innovation

I just finished reading O'Reilly's ".NET Framework Essentials", printed in 2001. It's a good overview of the first release of Microsoft's .NET platform.

The authors comment on Microsoft's focus on distributed development. Looking back, we can see that distributed development did not occur. The idea that .NET was a better DCOM didn't take hold with developers.

Yet the book highlights the success that Microsoft has achieved. The .NET platform is much easier to use than the previous mix of DLL, VBX, OLE, COM, DCOM, ATL, DAO, ADO, and what-have-you components. The object framework is reasonably consistent and provides a greater degree of interoperability for Windows development. (Not with much outside of Windows, perhaps, but better interoperability within Windows.)

Granted, Microsoft invented very little in .NET. They took ideas from Java and other platforms. They cannot be lauded for innovation, but we can appreciate the implementation. Microsoft made development in Windows a lot saner. (And possibly saved their company. Without .NET and C#, Microsoft would be losing ground to Java, Perl, Python, and Ruby, languages with run on multiple platforms.)


Wednesday, December 16, 2009

I was wrong

In my previous post, I described a problem that occurred in 'release' mode but not in 'debug' mode. These can be difficult problems to solve. (Frequently they are the result of optimizations made by the compiler.)

I was wrong.

The problem is not a defect in the code, or in the compiler. The problem was in my code, but occurred only when run with certain input data. My debugger tests don't run with that data, but the more comprehensive test suite (which runs in 'release' mode) does use it.

I identified and corrected the problem. And learned a lesson: don't assume that a problem is caused by someone else.


Tuesday, December 15, 2009

A visit by an old problem

I have been visited by an old and long-forgotten friend, like Scrooge.

For me, the friend is a coding problem. Or perhaps I should call it a debugging problem. Or an environment problem. It is the classic problem of "it works in 'debug' mode but not in 'release' mode".

Yep, that's the problem I have. I wrote some code and carefully tested it today. (The code is the 'delete a tree of directories' routine, and I was extra careful when testing it.) The code works -- in the debugger. The code almost works in release mode. It fails to remove the one directory (but removes all the files and subdirectories).

I cannot remember the last visit by this problem. If pressed, I would guess sometime in 1997, but I can't be sure.

Some things change, and some things don't.