|
Programming
news
Hello-
Welcome to the second installment, the second
in just under a year, of the news and latest in
my programming career. This output my seem a little
paucitous for a site, and indeed an individual,
who claims to have, if not exactly mastered, but
engulfed the language of pascal to the extent
that little of it falls outside their auspices,
but I assure you that several of the items featured
in the four new articles accessible to the left
contain coding of an order unprecedented in much
of my earlier work, and some have applications
which could actually be viewed by some as practically
useful. The first offering is a breakthrough in
another way as well, as it features my first functional
offering written in 32-bit protected mode code
for the Freepascal compiler, which has now largly
become the favoured option for the application
of pascal code on XP platforms (any DOS
interupts are essentially nonfunctional under
XP, which renders many of the more complex Turbo
programs unusable). The Directdraw graphical
engine for Freepascal is a complete graphical
toolkit for high resolution, 16-bit graphical
work on a directdraw surface, with all routines
scripted in pure assembly language and mind-blowingly
fast. Anyone considering high-speedindependent
graphical programming should investigate. Both
of these qualification apply with fullest force
to the third of my featured projects, the knattily
and catchily named biochemical rate equation
generator based upon the King-Altman method
of mechanism analysis. The function of this program,
which despite its marginal audience (pascal programming
biochemists, anyone?) and strictly academic use
(although there is something very aesthetically
pleasing in watching it factorise) contains some
of the most sophisticated code I have ever written,
is to generate a model rate equation as based
upon an enzymatically catalysed chemical reaction
mechanism, entered into the application. By applying
an algebraic (the original King-Altman method
is, in fact, geometric, but this kind of procedure
is notoriously difficult to render in any language,
let alone Delphi) algorithm to the variable names
entered, the program will generate a full rate
equation, and even factorise the denominator to
make transformation of the equation into a form
with physical significance more simple. If you
have no knowledge of biochemistry, enzyme kinetics
or rate equations, then this program could still
be of interest due to its noel way of solving
a 'branching tree' problem (ie one where each
procedure can branch into 2 or more sub-procedures,
themselves versions of the main procedure which
can then branch again, ad infinitum), by using
a rather simple and elegant procedure that calls
itself, resulting in several procedures with the
same name, with a bunch of local variables also
with the same name being resident in memory. Brain-aching
to write and light on the eye, take a look at
the rate generator opposite. Another breakthrough
was achieved in another field, this one more suited
to the usual content of the programming section:
3D vector models. The unpromisingly titled Ramachandran
digram generator encompasses a fully rotating
and manipulating accurate 3D model of a peptide
bond in poly-L-alanine, glycine, serine and phenylalanine
respectively, and will generate a diagram depicting
which conformation, according to the angles of
the two bonds with free rotation, are thermodynamically
feasible, based upon the Van-der-Waals non-bonding
interactions that occur. This is a chemically
accurate model that uses vector maths (rotation
etc) in 3D to rotate and move parts of the molecule,
and again is (highly) biochemically relevant,
investigating as it does the most important bond,
in, well, the world. Very briefly, the scrabble
engine employs some of the finest logical
AI programming I've incorporated into an application.
Written in delphi, the engine can investigate
every possible combination in less than 2 seconds,
and play the best. Despite my obstreperous lexicon,
it pounds me every time. I hope you extract some
enjoyment from these jotting and sketches- Thanks,
Jon,
15th December 2004
|