No comments in source code? Really?

A few weeks ago I came across an interview with an academic software researcher, now working for Microsoft. (Unfortunately the interview was in a non-English print publication, so I can’t link to it.) The interview was quite interesting, far better than I’d expect from a magazine targeted at a wider audience; it certainly wasn’t a trade publication.

Near the end of the interview, I had to stop reading and went “What?? That’s the stupidest thing I ever heard!” This was where the interviewee said that one distinguishing mark of good code is the lack of (inline) comments. Properly written code, the theory goes, is so clear and simple that it needs no comments.

This was a bit of a shocker for me. I have some software development experience, and in the fields I’ve worked in, lack of comments in code is a clear mark of poorly written, sloppy code. Even suggesting that code should not be commented would be an obvious sign of utter ignorance, perhaps too strange to even take seriously. Continue reading

Posted in Development | 14 Comments

Why Windows NT from October 1992 refuses to install on modern CPUs

Attempting to install the October 1992 pre-release on any CPU less than about 20 years old is likely to result in the following error message:

This is similar to the behavior of the official Windows NT 3.1 and 3.5 releases, but harder to work around, and likely to happen even on Pentiums and some 486s. The reason for that is that Microsoft knew too much, but not enough. Continue reading

Posted in Intel, NT | 15 Comments

Windows Update Fail

The other day I needed to update a server blade with Windows Server 2008 R2 installed on it. The system hadn’t been running for a while and now had about 100 updates available. I wasn’t looking forward to this as Windows Update always finds reasons to reboot the system a lot (which takes extra long with server systems), and this blade is a bit special in that it has a rather slow an small flash disk.

In fac the blade has a 16GB (flash) drive and 64GB RAM. This upsets some older OS installers in an amusing way, because they want to create swap space twice as big as the RAM. That just isn’t possible with this sort of hardware…

The first attempt at applying updates took quite a while before spitting out Error 80243004. A repeated attempt fared no better. A quick trip to Google revealed a very unexpected cause: The Windows system tray was confused and this was causing the Windows Update to fail! For all I know, the batch of updates even included a fix for this problem, and the best Microsoft can do is throw some hexadecimal number at me. It’s as if Microsoft were trying to prove that putting a GUI on a server is a really, really bad idea.

Sure enough, changing the tray settings helped (why?!) and the updates could finally be installed. Which of course triggered a few reboots, a few more updates, and finally the Server 2008 R2 Service Pack 1 became available. There I hit a wall because the system ran out of disk space.

Naturally I attempted to run the Disk Cleanup tool, only to realize that it wasn’t there. Except that’s not quite true either. Google fairly quickly led me to Microsoft’s own website, which explains that by design, the Disk Cleanup tool is not installed with Windows Server 2008, but it is in fact present on the disk and can be run if one just copies two files over to the \Windows directory tree. Why anyone would want to call such schizophrenic craziness “design” is beyond me.

Sadly, even after Disk Cleanup was brought back from limbo, it couldn’t free up enough disk space. At that point I realized that during installation, Windows had created a swap file (pagefile.sys) which was taking up about 25% of disk space (nearly 4GB on a drive a bit smaller than 16GB). Very helpful.

After removing the swap file, there were over 4GB free and I hoped SP1 could finally be applied. But no dice. After more than an hour of trying, Windows Update finally announced that it needed more disk space. How much more is apparently a secret.

So I grabbed an ISO image with SP1, remotely mounted it on the server, and tried to update the system that way. This failed too, but now at least the setup program told me what Windows Update didn’t, i.e. that it needed 8GB of free disk space. And unlike Windows Update, the standalone SP1 installer told me this before chugging away for an hour or two.

There’s no way to free up 8GB on this system (again, the Windows partition has slightly less than 15GB total). So now I’ll flip a coin as to whether I should cut my losses and probably disable the useless pile of junk called Windows Update, or reinstall the system with Server 2008 R2 with SP1.

But it’s not all bad. Windows Update is clearly providing work, possibly even perverse entertainment, for thousands if not millions of system administrators. That’s not a bad thing in today’s economy. Let’s just hope that the powers that be don’t realize that there has to be a better way of doing things…

Posted in Microsoft, Windows | 7 Comments

OS/2 Library Expansion

Thanks to a very generous donor, the OS/2 section of the library at the OS/2 Museum has been recently expanded by 25 new arrivals (although a few of them are duplicates of books already in possession of the OS/2 Museum). The newly added books are approximately a 50-50 mix of titles written for software developers and titles written for more general audience. The books are in very good condition, nearly all of them like new, and survived a long journey from Australia quite well.

Looking at the publication dates, the books span approximately the 1988-1996 era. Most of them were published either around 1988 or around 1995. This is not a particularly wide sampling, nevertheless it is probably fairly representative. A number of OS/2 books was published in 1988, when OS/2 was the Next Big Thing. When OS/2 failed to take off, there was a corresponding lull in publishing activity. When OS/2 Warp became popular again, there was a spike in the number of OS/2 new books, followed by a sharp fall-off after 1996 when IBM essentially admitted that OS/2 would not be developed anymore. Continue reading

Posted in Books, OS/2 | 7 Comments

Book Review: DOS Internals

A Few Decades Late Book Reviews

DOS Internals, by Geoff Chappell
Addison-Wesley, March 1994; 768 pages, ISBN 0-201-60835-9; $39.95

DOS Internals is a very unusual book. Written by an academic whose field isn’t computer science, it is a in-depth and highly analytical look at DOS, very thorough and detailed. Significant space is devoted to exploring to the way DOS interacts with Windows (a hot topic in 1994 when the book was published). Continue reading

Posted in Books, Development, DOS, Microsoft | 6 Comments

IBM PS/2 Model 50 Keyboard Controller

Thanks to John Elliott, a ROM dump of the PS/2 Model 50 keyboard controller (an 8742 chip) is now available. The IBM PC/AT keyboard controller (KBC) ROM has been analyzed earlier.

So what exactly changed between the PC/AT and the first generation PS/2 systems? The obvious difference is the addition of auxiliary device (typically mouse) support. However, since the PS/2 architecture is noticeably different from the PC/AT, how many other changes are there in the keyboard controller? The answer is “fewer than one might think”. Continue reading

Posted in IBM, PC architecture | 1 Comment

Book Review: Developing Applications Using DOS

A Few Decades Late Book Reviews

Developing Applications Using DOS, by Ken W. Christopher, Jr., Barry A. Feigenbaum, and Shon O. Saliga
John Wiley & Sons, February 1990; 573 pages, ISBN 0-471-52231-7; $24.95

Developing Applications Using DOS is a surprisingly obscure book for what’s perhaps the best official-unofficial DOS programming reference. Unofficial because it was published by a 3rd-party publishing house (John Wiley & Sons), official because its authors worked as the lead DOS engineers at IBM (among other achievements, Barry A. Feigenbaum designed the ubiquitous SMB protocol in 1984).

Perhaps the relative obscurity of Developing Applications Using DOS has something to do with the fact that it concentrates on the ill-fated DOS 4.0; however, the vast majority of the book applies to both earlier and later versions of DOS. The book is—unsurprisingly, given its title—aimed at DOS developers, but some of the expository material may be useful to advanced DOS users as it explains certain performance characteristics and illuminates a few of the darker corners of DOS. Continue reading

Posted in Books, DOS, IBM | 2 Comments

Why does Apple hate RSS?

Last week I was setting up a new Mac and obviously the first thing I did was to upgrade the OS to Mountain Lion. No problems there. As one of the follow-up steps of the setup process, I tried to subscribe to this site’s RSS feed, something that worked extremely well with Snow Leopard’s Safari and Mail.

But oops—the RSS button didn’t show up. Yet it’s still there on a different Mac running Snow Leopard… Attempting to subscribe to one of Apple’s own many RSS feeds results in the following error message:

That’s very broken. One expects better from Apple. Continue reading

Posted in Apple | Leave a comment

86-DOS Was an Original

In case it wasn’t sufficiently obvious already: A forensic expert now confirmed that 86-DOS, née QDOS, and (by extension) MS-DOS were not copies of CP/M, either on source or binary level. This comes hardly as a surprise, despite years (nay, decades) of vague accusations against Tim Paterson and Microsoft.

Proving that 86-DOS was a copy of CP/M was always going to be very much an uphill battle based on what was known of the operating systems. 86-DOS ran on 16-bit 8086 systems, while CP/M at the time was 8-bit only (8080, Z-80); in fact the unavailability of CP/M on the 8086 was the sole reason why 86-DOS was written in the first place.

While 86-DOS was compatible with the CP/M API, it used a completely different disk management strategy (based on the FAT idea of Microsoft’s Marc McDonald) and DOS-formatted disks were never compatible with CP/M. In addition, 86-DOS supported the 8086 segmented architecture and accepted 16:16 far pointers for input/output buffers passed to DOS (because the segment address was passed in DS, small model programs, including those converted from CP/M, could ignore this feature). There was no equivalent in 8-bit CP/M. Continue reading

Posted in DOS, Microsoft, PC history | 6 Comments

Another witness against WordStar

Previous posts examined the question why IBM implemented the A20 hardware in the PC/AT, causing endless headaches to future PC hardware and software developers. WordStar emerged as a possible culprit, but no one would quite point the finger at it.

The OS/2 Museum is now in possession of the original MS-DOS Encyclopedia (1986) which identifies WordStar in print. This is the same book that Larry Osterman claimed to have been subject to a publisher recall; either Microsoft Press didn’t do a very good job of pulling the book from the shelves or Larry Osterman’s recollection is inaccurate, but the book isn’t very difficult to find. (However, at about 8 pounds, or nearly 4 kilograms, it is quite difficult to carry around!) Continue reading

Posted in DOS, PC history, WordStar | 17 Comments