Thursday, October 23rd, 2014 at 4:31 pm - - Machining, University 1 Comment »

I just got myself a new laptop and installed Ubuntu-Linux on it. Scares the hell out of me the speed with which I got it up and running. I am now lost in a sea of code. It’s like walking into a public library after you’d been out in the sticks for a month with only two dog-eared issues of the Reader’s Digest to keep you company. There’s almost too much here. I want to read all of it. And any book or manual you do pick up and spend an hour with means there’s another ten thousand you’ve not picked up that you should have been reading.

Anyways, while doing my apt-cache searching stuff for stuff, I noticed stimfit – Program for viewing and analyzing electophysiological data show up in the search for scipy.

It appears to take datasets of electo-potential readings from a single neuron at every tenth of a milisecond and then fit exponential decay curves [the thick grey line] to selected sections from the (negative) peak to the baseline.

stimfit

A bit like a temperature sequence, eh?

Oh, and it has a funky Python shell built into it to help you automate the analysis functions. What’s not to like?

(more…)

Thursday, August 2nd, 2012 at 8:51 pm - - Other

Recently, every time I come back to this blog, the apache webserver on my server has crashed. I have to log on and restart it. I can’t find out the problem. Maybe it’s due for an upgrade or something. But anyway, I’ll keep muddling along as I do.

Sunday, November 28th, 2010 at 1:01 am - - University, Whipping 5 Comments »

Students have been getting all uppity about university fees of late and channeling their anger into marches in London that are supposedly going to get noticed by politicians.

Seems like a waste of time to me, given that the actual origin of the policy has been on campus, pushed by the cadre of senior managers circulating through the higher education institutions like generals on tour of their military bases.

Take Sir Howard Newby of Liverpool University, now the third highest paid Vice-Chancellor in the country.

In 1999 Mr Newby had already made his position clear — especially on the importance of controlling access to the best universities by the ability to pay:

(more…)

Saturday, November 27th, 2010 at 9:00 pm - - Other

Just saw For The Best down in town thisafternoon (newspaper review here). Aside from the dull choice of name, this site-specific performance was pretty intense.

Afterwards, when I came past the building after doing some shopping, death was outside in his bathrobe and slippers smoking a cigarette.

Monday, September 15th, 2008 at 11:53 am - - University, Whipping 1 Comment »

In spite of many incoming links to this blog from this trivial post, Gary (the unnamed owner of that very-new-but-already-much-more-popular-than-this blog) didn’t make it to Pycon 2008, so I went there knowing only one person.

I’d gone to Cambridge (to hack on Tunnel) using someone else’s return train ticket to London and didn’t want to get screwed by a single train ticket back to Liverpool (prices hiked by another £20 last week), so caught the bus which involved a 40 minute stay in a layby in Milton Keynes where I could see the great avenues of horse chestnut trees dying due to global warming (the mild winters not killing off the parasites). Apparently, this isn’t news, though it was news to me, and I wonder how it connects to the business of planting trees to offset a gratuitous jet-set flight across the Atlantic for a handful of hours at a conference when it’s about time someone started experimenting with telepresentations.

I checked in at Birmingham Central Backpackers and spent half an hour walking around in the rain unable to find their second bunkhouse because it was in a converted pub which still looked exactly like a pub, so I walked past it.

The talk schedule was so-so. But some of the talks turned out to be very good and important, though I couldn’t tell from the titles. The keynote speakers were Mark Shuttleworth, who seemed kind of ordinary, and Ted Leung, whom I would have recognized as being very important if he had phoned his talk in from Sun headquarters on a big screen, instead of being flown over bodily, as is the standard, unquestioned, routine practice at geek conferences that are supposedly tuned in to the future of the internet and planet. Readers of this blog will know that this is a big issue for me, and I don’t want to hear arguments about how presenting in person is better than doing it as a giant video conference, because I Have Never Yet Seen It Attempted.

I quickly wrote up and scheduled a lightning talk about the Metroscope project and cunningly inserted it into the half hour slot before Mark Shuttleworth’s speech, making sure to mention my wholly unsupported but very farsighted work on undemocracy.com, (where you can find some of the international documents establishing the Registration Convention, among other things). The video channel failed to work when I tried to display my slides from someone’s machine which had recently been installed with Ubunto, so I was lucky enough to move my slot on by ten minutes and get them to show up on a Windows machine donated by someone in the audience.

undemocracy.com still has no supporters whatsoever, but a lot of people could see the point of the Metroscope. I have developed the notion that scrapers and parsers for these tiny sources of civic data should be run using a codewiki that runs in a sandbox using pypy. I have not found such a sandbox on-line. trypython.org is not it, because it’s python running in your browser with the right plugins. Who wants to work on it? I must get a new laptop urgently as I my old one is really beginning to hamper this work.

The conference dinner which came with free wine and beer was excellent. The conference hangover the next day was not so good. I got back to the hostel at 3:30am, got up at 8am, sat on the road for 20 minutes until they opened the door and I could have breakfast of lots of tea with peanut butter and banana sandwiches. Still felt terrible. I needed to find a talk that was boring enough to fall asleep in, but failed because instead I went to one on software complexity where the speaker made us all stand up and talk in pairs to our neighbours about the problems we’ve had with software complexity.

The second keynote speech (the Leung one) was on the same theme as Mark Shuttleworth’s, though in greater detail. These two speakers saw their duty as trying to drive the direction of this herd of cats known as the python programming community. Big changes are happening in computing and the language has to get out of its box to make itself relevant so it doesn’t get eclipsed by, for example, Javascript. This is the greatest threat. Javascript captured the browser and now there are ten times more Javascript programmers as Python programmers. Javascript has also been stealing a lot of ideas from Python as well. The catastrophe will be when people start using Javascript on the server and displacing Python from there. (I lost the argument with HSMWorks that postprocessors should be in python — they chose instead to use Javascript.) The place to look is at the weaknesses of the language, and don’t accept them as part of the design.

The issues are multicore processors, performance limitations, no clear recommended web-framework, and being able to run on the browser platform — these are things that Java (do not confuse with Javascript) dominates. Regarding the web-framework, Django is seen with a lot of hope and optimism. I have to give up going to talks about pylons, as I’m just not getting it. I have resolved to try Jython, which is Python running on a Java virtual machine, once I get a new computer with some space in which to install things.

To me, the most important talk was about pro bono work converting climate science software to python from its old, incredibly impenetrable FORTRAN implementations. You could guess it would be them from reading their company’s heartful goals. Far too little pro bono programming happens outside of the field. A huge amount of volunteer work is done by programmers to improve and promote the public free open source software tools used by programmers (eg Python), but the phenomenon rarely breaks out of this arena and into dealing with civic and government software and data. I don’t know why. It’s considerably easier as the quality can be so ultra-bad outside the open source communities, especially when it relates to billion dollar government contracts. But, on the other hand, nobody out there seems to give a damn about software quality, so you for sure won’t get any thanks. It’s like writing poetry in a language nobody understands. The belief that good quality software is a gift that keeps on giving is nowhere around. Consequently, there’s a disincentive to produce it in the professional world.

Next year there is no UK Pycon. Instead they are holding EuroPython. This is a very good thing and everybody should go.

Tuesday, July 22nd, 2008 at 2:58 pm - - Cory Doctorow, Machining, University, Whipping

While we’re waiting for someone to ask the Question from Hell, Becka has appeared in today’s New York Times.

Evidently this is related to the conference in Hamburg she’s just been to. I can’t give you a link because conference alerts takes things down too quickly, and I can’t even check it up yet on archive.org. I’ll be able to find out maybe in 5 months time what it was without asking. This is an information black-hole.

A tip for any of you reporters who don’t see your job as sitting back and waiting for the PR industry to spoon-feed you with well-crafted press-releases, she’ll be at the ECVP 2008 in Utrecht showing off her haptic experiments.

Update: Stumbled upon this crude visualization of point-cloud data used to make a music video. For decades CADCAM engineers have been trying to convert this sort of data into usable surface models (eg at the meshing round table). This is one of those insoluble problems, because only when you make a concerted effort to solve it do you realize that what seems to be enough data is in fact insufficient, and everyone who hasn’t gone through that process just thinks it’s because you’re not smart enough.

Anyway, what’s makes this effort cool is they’ve released the point cloud data in downloadable format so people can play with it. Some results, using standard applications, are here. Maybe someone in the wider audience will prove smart enough, having been exposed to some real messy data. Working from clean data at the start seems always to spoil the intuitive understanding of the problem. That’s why I am thankful that my initial CADCAM experience was with the output of NCG Toolmaker, where everything was broken and none of the surfaces connected up, as you get from proper solid modellers these days.

Tuesday, July 8th, 2008 at 11:30 am - - University, Whipping 1 Comment »

It’s outrageous. A mere five months after his ordinary rendition from Zimbabwe to Equatorial Guinea, Simon Mann suffered an unfair trial that lasted three weeks and found him guilty of something for which he was caught red-handed and has continued to confess to, providing evidence that is consistent with many other facts on the ground.

Clearly, Simon Mann was trying to cause a public emergency threatening the life of the government nation, and in a civilized country like Britain, this would get officially declared so that those guys who were a threat to the nation could be held in captivity indefinitely without taking them to trial or even telling anyone exactly what they had done wrong.

Timelines of this plot have been printed in the press. But this single link gives you a timeline for what’s been happening in the UK Parliament about this important issue of a colleague and friend in need.

Then our man from the Campain for Nuclear Weapons, Julian Lewis, went berserk and had 9 questions answered on 18 February 2008. The issue at hand was the sudden transfer of Simon Mann from Zimbabwe to Equatorial Guinea when the appeals case against extradition had not been fully exhausted in the Zimbabwe courts.

Man, you’ve got problems if you’re fighting to stay within the jurisdiction of the Zimbabwean courts!

One of Lewis’s questions was:

Will the Secretary of State “make representations to the United States Administration requesting it to exert its influence on Equatorial Guinea to secure the safe return of Simon Mann.”

You see, the problem was, Simon Mann wasn’t going to get a fair trial in Equatorial Guinea of the kind that Mark Thatcher got in South Africa, where he was allowed to confess to something no one believed was possible (ie that he gave money away to a humanitarian cause and accidentally bought a tactical weapons system), pay some cash, and run home to mummy.

That’s the issue at stake.

Lewis isn’t concerned about those British citizens who were in Guantanamo Bay. There’s this strange concept that the bad guys are all powerful, and, for example, because al-Zarqawi was not arrested in Iraq 2004, the whole US bombing of Falluja was a response to the havoc this single guy was causing.

I mean, the amount of damage that can plausibly be caused by someone who is being evil must relate to the quantity of resources he has at his disposal. And Mann connects to a lot more resources than al-Zarqawi. Also, Mann’s removal from the field of battle was followed by no coup against the government of Equatorial Guinea. Meanwhile, after the 2006 photo of al-Zarqawi’s mutilated corpse was tastefully framed in gold by the US military, the war in Iraq quickly drew down, didn’t it?

Now, Simon Mann hasn’t yet been killed and had the photo of his corpse put up on display, but Julian Lewis was sure of the threat:

“My constituent, Mr. Simon Mann, has been illegally handed over by Zimbabwe to a dictator in Equatorial Guinea who has promised to sodomise him, skin him alive and drag him through the streets of the capital city. What steps can the Government take against Zimbabwe for the outrageous breach of my constituent’s human rights when he was handed over before his appeal procedures were completed.”

And it went on.

What more to say?

Well, the fingerprints of a campaign are scattered all across the Official Record, if one cares to look for them. And each incident makes its mark and leaves a permanent blemish on the fool who took part in the process.

Now there’s nothing wrong with standing up for individual and unpopular causes like this one, just as there’s nothing wrong with donating a helicopter air-ambulance to an impoverished African country who may or may not benefit from the generosity.

Mistakes happen.

But form means something, and can be found in the evidence.

If Henry Bellingham’s and Julian Lewis’s concern for due process of the law extends to certain privileged individuals, and not to other more blatant cases which ought to demand their attention, then maybe their cries for human rights are not as helpful as they seem.

There are other cases, someone else can go into. Maybe starting with Natwest Three. Here’s the wikipedia article.

The tools and the techniques are now all here. Essentially it’s about getting a complete assessment of the wider context, and observing which cases are chosen from it for focused attention, and asking why.

It dries down to the single question when you hear of a politician going on about something:

What are they not going on about?

Wednesday, November 15th, 2006 at 4:17 pm - - University

Python programmes can be for mulltiple platforms. If you can get away with not using platform specific packages in theory at least you should be able to run one python script on several different operating systems with the same look and feel.
I recently (last week Friday 10-11-2006) had the pleasure to put this to the test once again: I was asked to programme a psychology experiment where the person experimented on is exposed to a series of 3 letter sylabels on the screen, one of which is red. They have to press a corresponding key and time as well as the correctness of the answer is saved to a file for later statistical analysis. I programmed this in python and used Python Imaging Library and wxwidgets for the graphics and the user interfacey bits. All done on windows xp, and it works fine. Now, making a Mac version should be very easy: you should be able to take the code and run it on the Mac. Some hours later, compiling all sorts of stuff to be able to read and render font files on the Mac, work around the fact that a Mac keyboard has a different layout than a PC keyboard… In short, you still have to do platform specific programming; and the biggest annoyance is that there does not seem to be a very simple sound interface to just do a beep on the Mac. Do I really have to read and play back a wave file to just sound an acoustic warning? And, I have the suspicion that keyboard events are buffered differently on the Mac version of wx than the PC version. This is critical, because i have to filter out multiple key strokes, when the tested person goes maybe into ‘computer game’ mode and starts hammering one key…

Saturday, October 21st, 2006 at 6:13 pm - - University

Friday was a day at the psychology department. I battled with wxwidgets to get a full screen frame without any window decorations on Mac OS X, not with the desired outcome. The best I can get is a screen filling frame, but with a title bar and a ‘close window’ button at the top. Acceptable. Shame that it works as desired under windows. The other thing I looked at was using py2app to wrap up a python application that uses Python Imaging Library and wxwidgets to run on another mac. After some unsuccessful attempts I decided to upgrade python and site packages to newer versions. I upgraded python from version 2.3 to 2.4 and downloaded wxwidgets latest available version. The new site-packages installation meant I had to reinstall py2app. Success, with the latest versions py2app created mac a working application. A lot of these different packages come with their own installation tools. Ever heard of ez_install.py (say eazee(!))? Well, that is used for setuptools and py2app. Or python eggs? Don’t quite know what they are good for, but some got laid in my working directory.

And I had a chat with another scientist at the department about programming some experiments for her.

Thursday, October 19th, 2006 at 8:07 am - - University

On Tuesday afternoon I went to the engineering department and together with Carl rejigged the python script he uses to control their machine. We now use two python threads, one controls all moves of the motors, updates the user interface edit boxes with the current position and speed data, and also controls buttons that are pressed or unpressed automatically when the machine is rotating. We have a separation of user interface and motor control so that the user interface is always responsive. The UI passes requests for movements through a queue to the motor thread.

In the past we could use just one thread because we always ever had to handle one request for the motors to move. The calls to the DLL for the controller card always return immediately, the controller maintains it’s own motion queue. But we had to implement sequences of movements of different speeds and pauses. The queueing system we have now in place in the python thread allows that now easiy.