Notes

Hard Disk Data Encoding and Decoding

h2. Hard Disk Data Encoding and Decoding Digital information is a stream of ones and zeros. Hard disks store information in the form of magnetic pulses. In order for the PC's data to be stored on the hard disk, therefore, it must be converted to magnetic information. When it is read from the disk, it must be converted back to digital information. This work is done by the integrated controller built into the hard drive, in combination with sense and amplification circuits that are used to interpret the weak signals read from the platters themselves.

C++ Basic Framework Design for a Simulation System

This set of code is derived from the work performed building the Direct2Learning Java Avionics training platform (now defunct).

It uses multiple inheritance, however base classes are pure virtual effectively to provide interfaces.

The code sample is missing the complicated ExecScheduler which is where the scheduling of modules is performed. Writing the ExecScheduler is reasonably complex - it needs to work with threads and provide timing. I've got a Java version of this which is at the end for illustration.

The ends squeezing the middle in object oriented design.

Often when designing anything it is all to easy to forget the simple fact that when you add 1 to a number you will eventually be doing ADDQ.L #1, D2.

I follow, but not rigidly, the following rules of thumb

If you have a design with 2 classes you probably should be writing something procedural.

If you have a design with more than 30 classes it's probably time to revisit the design.

View update complexities

On a page where there are lots of views but all from the same entity there is an interesting challenge when an individual item is updated within a view. Normally this is catered for during a full postback simply because the entire page is recreated dynamically, so it is enough that the post is processed during the construct phase.

However this isn't true when we are using an ajax update to modify an item.

ZXAF Development notes

ZXAF is really the culmination of a lot of individual techniques that I've used in many different developments.

So, I decided to pull of these together into a project, release it as opensource, and continue developing it with a view to doing everything the right way. It is a development without a timescale or a budget, and its nice to be able to spend time on pure development.

Flash always ontop of page content.

I had this problem today with Flash (SWF) content appearing ontop of a JTip popup. I tried changing the z-index within the CSS, but it didn't work, it took me a long time to discover what needed to be done to fix it, but basically it was quite easy;

1. Add the following parameter to the OBJECT tag:

<param name="wmode" value="transparent">

2. Add the following parameter to the EMBED tag:

wmode="transparent"

reference http://kb2.adobe.com/cps/142/tn_14201.html

The dangers of global variables revisited because of PHP.

In 1985 after about two years of full time programming I had an epiphany; realising that global variables are a very bad idea. Roughly 20% of the bugs that I kept finding were down to abuse or misuse of global variables, so I stopped using them, apart from the time when you really should use one (e.g. for a pointer to global shared memory that never changes).

So here I am over 20 years later, and I've just realised exactly the same thing, except this time it's in PHP not 'CORAL' '66'.