2007-02-28

JMicron trouble

The last two days I've been spending most of my time facing the trouble I had with my DVD drive: DVD movies were lagging and data rate was at the bottom as wells as 100% cpu load during operation of the drive.

The relevant setup includes:
- Pioneer DVD-111R (IDE)
- Intel P965 / ICH8 Chipset and a
- JMicron JMB363 SATA/RAID/IDE controller
- ABIT AB9 motherboard
- Windows XP SP2

The problem was that the IDE DVD drive was operating in PIO mode and not in the preferable DMA mode, that won't bother the processor with data transfer. You can determine the state of an drive by checking the IDE channel its attached to in the windows device manager.

Changing the mode manually as well as through the registry did not work. I tried reinstalling the drive, channel and the controller. No success, so I ran a firmware update onto the DVD drive and tried another cable. Continuing to an bios update, still nothing changed. Switching again to some web research I found, that the JMicron controller caused similar problems for other guys. So I grabbed the firmware for that thing and started to hassle into that direction. The upgrade still showed no success so I tried variant modes that were adjustable in the BIOS together with the new driver.

The thing that finally did it was installing the drivers in the RAID mode of the controller, then switching it back to IDE mode. The switching back caused an reinstallation of the drivers, which it performed automatically. The strange thing was, that the IDE DVD drive now runs as SCSI drive (!!) and the as IDE configured controller shows up as SCSI controller.

That was the worst driver hassle I've had in the last years, so perhaps you should think twice about buying a mainboard with the JMicron controller.
Read more!

2007-02-26

The Next Generation

...of imperative programming languages is my name for the rough category of languages like C# and Java supporting rapid application development through framework libraries as well as an intermediate code layer.

The ongoing battle is an interesting one and I personally can't wait to find a reason to do professional work with the upcoming C# 3.0 or Java 6. You too might want to have a look on the proposed changes to the C# language (Click the post title).

They are integrating lambda expressions and other nice stuff like LINQ - find media on those topics on channel9.
Read more!

Control flow

Recently I've been reading some articles about control flow and programming language theory in general, which I'm getting more and more interested and I am sharing one issue with you that got me into this.

Maybe you also encountered a situation like this in your programming language:

readSomeFile;
while
( dataLeft )
{

printData;
readSomeFile;
}

Notice the code duplication of the readSomeFile statement. Dirty solutions to this look like:
while( readSomeFile, dataLeft )
{

printData;
}

This works in C++ if readSomeFile is an expression, fails obviously for multiple statements. A Cleaner solution is:
while( true )
{

readSomeFile;
if
( !dataLeft )
break
;
printData;
}
A structure like this is named loop with test in the middle and was proposed as integrated control flow statement for programming languages some 30 years ago by Ole-Johan Dahl and integrated in Ada.
Donald Knuth also discussed statements of that kind in his publication contributing to the goto discussion back then. He also elaborated that one syntactic statement could cover the do-while, while-do, loop-with-middle-test and the endless-loop cases probably improving writability and readability of programs. I wonder why this had not become mainstream since then, but programming languages are still evolving...
Read more!