Wednesday, August 13, 2014

It Must Have a Sort Function

Sorting things is the Rubix Cube of programming as it's such an apparently simple thing to stack the blocks in the right order ... but getting a computer to do it isn't quite the same as teaching Roger, your goofy li'l rugrat to do it.  Rugrats are vastly more intelligent than computers.  In fact, most slabs of granite are vastly more intelligent than computers.

The Artist has her Portfolio of her works and new ones get added when they will ... but it won't be in the order they were painted, perhaps for quite some time yet.

So ... what gets them in the right order.

Well, replacing the Art Information File will do it.  An array is a computer word for a list of things.  A complex array is a one that contains arrays.  Forty years ago with IBM computers we would have called this ISAM.  Four letters are much better than writing it myself with PHP but the capability is in PHP so why not use it.

Why not as that the Art Information File is in use and this introduces a chance for a programmer stunt that you've all come to love since everything became available around the clock.  Yep, that'd be screwing with the car while the motor is running.

(Ed:  you're going to do it, aren't you?)

Yep.

The Artist is moving and she's starting a new job so she's busier than a Campfire Girl in a field full of brownies and cupcakes.  There's almost no chance of messing things up for her if I bork it so that sums in two words:  do it.


I'm keenly aware that people may be looking at it while I make changes.  However, I also know that so long as I can recover a mistake quicker than someone is likely to do a page refresh, I can get away with it.

(Ed: this excites you doesn't it?)

Sure.  You measure everything up, down, and sideways.  You review all the potentials.  You know if you fuck up then the sky will melt and people will really hate that.

Then you execute.  The big bang is pushing the Blue Button.  All your careful studies have shown this will work ... but what if it doesn't.  Get ready to send in the paratroopers, General.

(Ed:  you must be the one with the mutated genes.  Mother warned about that.)

Yep, that would be my conclusion as well.


For the benefit of geeks tonight
There will be a show on this here trampoline

Doing sequential flip sort on thirty elements took 292 passes.  The efficiency is something only a government worker would love ... but ... unlike a government worker, it gets it done.

No comments: