International governance is a serious issue with major consequences. It doesn’t help that the British public enjoy electing clowns from UKIP and the BNP to these positions where they don’t even pretend to do any work. Politics is not a sports show, like the football league. This stuff matters. And it is logical.
This morning there were two politicians debating on the radio news program: LibDem MP Martin Horwood and UKIP Leader Nigel Farage squabbling about immigration, and tripping over themselves to praise the Transatlantic Trade and Investment Partnership treaty being secretly negotiated between the EU and the US. Horwood asserted, without any evidence, that this deal would “eventually help to create millions of British jobs”, while Farage said that if we were out of Europe we could sign this deal much faster than allowing Europe to do it.
Farage argues for Britain to get out of Europe on the basis that it gives us greater national sovereignty and control over our own laws — something which is flatly undermined by these trade deals whose sole purpose is to establish the supremacy of corporate rights over people’s rights, and where there will be no Parliament to over-see its operation.
Wednesday, February 26th, 2014 at 1:41 pm - Adaptive
Last year we got a chance to see SolidCAM’s iMachining and laughed at the way its progress bar jumped all over the place, from -14% to 200% and back again.
Then we looked at our own Adaptive Clearing strategy which we had just spent the past year making multicore — and noticed it did the same stupid thing!
You never notice yourself picking your own nose, but when someone else does it in your face, you realize it’s ugly.
Progress bars don’t get as much love and attention from the programmers as they ought to, given how much time the users have to stare at them. The users think it’s so normal for the progress bar to be absolutely wrong that it’s considered a sign of extreme naivety to think about complaining. They probably believe that we’d going to laugh at them if they raised the issue.
It turns out that the progress bar on multiple CPU processing is not hard to get right, but you do it differently to how you do it on a single-threaded process.
Let’s first think about what a progress bar is for. There are two different options. It could report the time remaining for the process to complete, or it could report the percentage of the process job that has been completed.
The time remaining might be the most useful information for organizing your life (is there enough time to grab lunch while this completes?), but there’s no way you’re going to get that information — even though it’s what everyone wants to know.
You will hear: “How many days till it’s done?” more often than “Are we at the 75% complete stage yet?” for a project — and that’s even before it’s over-run by a factor of two.
In fact, the only practical implementation for the time remaining is to run the whole job first, time it, and then set a count-down timer from that value when you run it again. It’ll make everything run twice as slow, but what’s the big deal?
Saturday, February 22nd, 2014 at 10:25 pm - Hang-glide
Today is Saturday and I’ve stayed home to work while Becka went off caving and having fun.
I’ve got absolutely no useful work done. I spent the morning fussing over my photos on various external drives and went to town to print a batch of them. Then I swapped them around with the photos in the frames on the walls, having decided that such changes would bring some variety over the years in addition to seeing the paint progressively peel from the plaster as the walls dampen. Then I swept out the garage after piling all the knackered gear onto the shelves. And finally I pondered over the fact that google appears to have just put my whole 3D scanning project completely out of business. Why bother trying to do anything?
I know what fun is. It involves being in Austria with a hang-glider. And, unlike work, if someone else has already done it, it does not imply that my time spent doing it is consequently wasted. Put into that perspective, I’m doing people a favour by not getting any work done. However, I now have a headache and I’m very annoyed.
Here are the webcam images for both places today:
Here’s the alptherm view:
Not very promising really. But I want to get into the habit of looking at it so I can think about picking my days for booking the ferry, driving straight out there, and getting it done when there is an adequate weather window.
Let’s check the record for when flights at these places early in the year:
I got some waiting to do. And I had better get some work done in the meantime. Not going to happen tonight, though.
Tuesday, February 11th, 2014 at 5:43 pm - Adaptive
Taking a break from all my other mindful notions to do some proper work on this stay-down linking job.
I have an A-star function that works on the underlying weave structure. The white zones refer to the weave which defines the interior of the contour, and the red zones are the places where it’s safe to go without colliding with the uncut stock.
Most A-star algorithms involve one start point in each tile which spreads out to all sides of the tile. But in my implementation the paths from the sides of the tile are pulled from the receiving end, so it’s possible to have two start points in the same tile with two paths going through, as shown above.
Wednesday, February 5th, 2014 at 8:33 pm - Canyon
Spotted the new(ish) Liverpool Wakepark on the docks when I cycled passed it on the weekend while taking a break from endless, endless coding every day.
So we booked a ride on a fine grey February afternoon.
The place (called “Industry.1″) is dude central, and appropriately disorganized and friendly. Downstairs from the changing rooms numerous fire service bods were practicing how to rescue each other with tow lines from the static salt water. Looked a bit dull, but they can’t justify wakeboarding on working time. If this flooding goes on much longer, they’d do better to get their training at one of those artificial whitewater courses where they’d get washed off their feet and they added tree branches into the flow. See that river: that’s your high street.
I took my caving wetsuit, still muddy from the last time I used it in July. This finally got it clean.
And we’re off. It’s probably exactly the same as water-skiing, except without the power boat, the mess and the noise. I never had rich enough friends to do that.
Becka seemed to enjoy it a heck of lot more than snowboarding. Or canyoning.
We both got standing and going in a straight line before our time was up.
Not bad for something that’s literally a quarter of a mile away from home. How lucky is that?
Now, back to work. This ain’t the summer yet.
Friday, January 24th, 2014 at 6:07 pm - Adaptive
Sometimes it’s a relief to be certain that I’m doing something which is exactly what I am paid to do. All the rest of the mouthing off comes for free. Though maybe it’s important to always question what you are paid to do, so you don’t wind up wasting everyone’s time doing something that’s actually pointless.
After having got the A* routing through the weave structure to work based on my unpatented subdividing model of a 2D area that forms the geometric basis of the adaptive clearing non-gouging motion algorithm, I noticed that it did not give enough sample points for a linking pass to be within tolerance. The route, which must avoid uncut stock, requires a greater sample rate than the basic weave cells. These cells were sampled to a resolution along the boundary contour so that it would be within tolerance, but it is insufficient to handle the uncut stock structures that exist in the interior space of this area partway through the clearing cycle.
There are two options to deal with this insufficiency of sampling. Either add in an additional sample rate system, or improve the basic underlying weave sampling structure.
Tuesday, January 14th, 2014 at 6:47 pm - Adaptive
A quick day’s work to make a multi-threading percentage progress handling object in Python that handles residuals.
Let’s start with the test code (which I wrote after the working code — take that TDD!):
class ACProgress: def __init__(self): self.sumprogress = 0 def ReportProgress(self, lprogress): self.sumprogress += lprogress print "The progress is at:", (self.sumprogress *100), "percent" def addprogress(a, n): for i in range(n): acprogress.ReportProgress(a/n) time.sleep(0.05) acprogress = ACProgress() addprogress(1.0, 25)
This prints numbers up to 100% in steps of 4%.
Now we want to do this in threads.
The stay-down linking code relies on an implementation of the A* search algorithm to quickly find a connecting path between the start point and end point by spreading a network of paths in an optimal way.
There’s a couple of nice animations from Wikipedia showing what they look like.
Suppose we have a network of paths, like so:
The path from Start to A and the path from Start to B rank the same in the priority queue because:
length(Start, B) + distance(B, End) < length(Start, A) + distance(A, End)
(The length function is the length of the green path, while the distance function is the length of the yellow path.)
According to the A* algorithm, the next step should extend outwards from the point B before we go from A on the basis that there could potentially be a direct path that takes us all the way from B to the End point that is shorter than the best one we are going to get by extending A.
But this is impossible, because the theoretical best direct path cuts through many paths (including the Start to A one) before it reaches End, and any one of these paths could be substituted up to the point of intersection into that Start-B-End path to make it shorter, which is illogical, captain.
Therefore, if there is going to be a shorter path from Start that passes through B, then it will have avoid at the very least the girth of the search tree, defined as a line connected two extreme points, like so:
And when you use this to increase the value of distance(B, End) in the formula above to the length of the two segments required to get round the girth line on either side (whichever is shorter), you don’t get quite so much unnecessary sprawl near the Start point. You can add more girth lines if you like.
It’s a small improvement, but practically for free, and may make a big difference for a lot of realistic cases where there is one major obstruction.
Friday, January 3rd, 2014 at 5:26 pm - Weekends
Well, it was a plan. Xmas is a drag, what with either having to go away on holiday or spend days overeating with the family feeling inadequate because you didn’t bring any presents. My thoughts of a flying holiday in Lanzarote had been deemed impractical, and Becka’s plans for a week XC skiing with friends in Norway looked equally difficult due to the lack of passenger ferries.
I’d had this walk in Wales on my mind for ages. Let’s do it, I said.
“But the weather will be crap.”
Exactly. It’s only a walk, and we wouldn’t be wasting good weather on something that doesn’t depend on good weather. In fact the worse it is, the more adventurous it will be. It’s only Wales. It’s not like the Pacific Crest Trail. How bad can it be?
Thursday, December 19th, 2013 at 12:29 pm - Whipping
It was getting rather full of electronic accretions that kept me awake at night. The server disks had been moved four years ago with everything left intact. It would have been easier to have renewed it another year, but I decided that it’s best to do this sort of spring cleaning when things were quiet.
Back when you had to buy computing resources by the barrel, you had to throw a big on-going party to use up all the resources. But nowadays you can buy it by the glass, which means each project can go into a separate container, which makes each one cleaner and easier to retire. It’s a nightmare when they are all in the same box and start depending on each other in unpredictable ways. The apache httpconfig file in there was a disaster area.
So many projects get started. And so many lie around half finished.
Here’s the Eulogy.
@symroe: @frabcus you’re killing seagrass??
@frabcus: Eulogy #1: Ah http://seagrass.goatchurch.org.uk/ it was nice sysadmining you all these last 8 years.
@frabcus: Eulogy #2: You did so much – in the early days running codeabode (a version control hosting thing with @rufuspollock) and
@frabcus: Eulogy #3: and parlparse (powers @theyworkforyou, @publicwhip) while it looked like @dodspeople might support it, and so many years since
@symroe: @frabcus just logged in to seagrass (for the last time), and found a copy of ‘MP fight!’ in my home directory!
@frabcus: Eulogy #4: For a while you were popular: with caving software and blogs and SaveParliament and Think Twice conference
@philipjohn: @frabcus Yay Save Parliament #memories
@frabcus: Eulogy #5: Changing the world around you with the move of ethereal bits in the electric dark of a new information age
@frabcus: Eulogy #6: Later you were the first place to have direct links to United Nations documents (UNDemocracy) and crowd-sourced election leaflets
@frabcus: Eulogy #7: All the while, tirelessly helping millions find out how their MPs voted, with PublicWhip and its @theyworkforyou feeding API
@symroe: @frabcus you missed out the first scraperwiki on seagrass!
@frabcus: Eulogy #8: Your hardware changed, you moved to Manchester. Yet stil your heart was the same, your systems Debian stable, your RAID monitored
@frabcus: Eulogy #9: In your twilight years all gradually left. Abstraction, commodification, the cloud in the real sense of IaaS. And your services
@kindofwater: @frabcus Thought about how we now just delete servers in the cloud. They have no personality. Total immateriality.
@kindofwater: @frabcus When I used to work at the University of Kent we turned off an ancient Sun server with similar ceremony.
@frabcus: Eulogy #10: Gradually left early adopter – either dieing, or entering mainstream to grown up servers.
@frabcus: Eulogy #11: And now finally, your paymaster sees no point in your bills. The energy of controlling you dispersed. You must go.
@frabcus: Eulogy #12: Put down like an old cat, when really you are at the prime of life. Your vhosts gradually erased, email directed from you.
@frabcus: Eulogy #13: The clock ticking on the last DNS entry pointing to your port.
@londonlime: @frabcus this one made me well up!
@frabcus: Eulogy #14: Ah seagrass, times were good. To the server afterlife – reformatted and reincarnated, like an @Mythic_Beasts you will rise again
@Floppy: @frabcus I’m humbled to be part of that story. It was truly a hero among servers. #seagrass