Technical and geeky posts
Neither rad nor shit
I’ve just been contacted by someone who runs the blog yourbikeisrad letting me know that my blog contains the only google hit for the “word” yourblogisshit. This is due to a throwaway joke on the “about me” page.
I’d like to take this opportunity to state categorically that myblogisnotshit, and mybikeisnotrad.
Zooming and panoramas
VITAE researcher blogs
I mentioned a while back (in this post) that I’d applied for a paid blogger job with VITAE, the organisation that supports UK researchers, but didn’t get it because I couldn’t make an induction session in London. To my delight I was contacted a few days ago and asked if I was still interested. So I’m now on the official team until it’s reviewed at the end of March.
The theme of the blog is staff development and career support for researchers, but people seem to be interpreting that quite broadly. My first post as one of the core bloggers has just gone up here – The Coffee Club theory of departmental sociability. It’s a bit frivolous, but with the current economic climate doing what it’s doing to the UK HE system I thought something lighthearted might be in order.
I’ve got to do three posts each month, comment on other people’s blogs, and encourage other people to visit the blog and comment (so off you go now, there’s a dear). It’s not going to enable me to retire early but it’s nice to be recognised. This is my first paid writing job, unless you count a poem I got published in the skateboard magazine RAD when I was 14. So in all, I’m quite pleased.
Some more thoughts on Citeulike
I’ve been using Citeulike to manage my references for a few months now and there are some things about it that are great. I love the browser button (available from here) and the way that it means I don’t have to type in article details any more. However, there are a few glitches.
Sometimes, upon import, a conference paper is incorrectly entered as being a journal paper or a full conference proceedings. I’ve not worked out which sites this happens with yet, but I’ve definitely seen it with Springer LNCS imports and maybe some others. To correct this, you need to edit the article details. However, the “journal name” field can’t be blanked out just by deleting it. To remove a journal name you have to actively tell citeulike that you want that field to be empty, which is done by putting two slashes in the text entry box – that is, //. Otherwise you’ll end up with both journal name and conference name (identical) appearing in your output.
This information (and much more) can be found in the citeulike FAQ wiki.
Another guest post – vitae researcher blogs
VITAE (a UK organisation to support researchers) recently advertised for paid blogger positions on their career development blogs. I wasn’t successful in my application, as I couldn’t make it to their training day in London, what with me living in France and all. But they said they’d publish the submission from my application and it’s now up: ranting about powerpoint overview slides. Seriously, I have, in the past, considered adding a slide to my conference presentation which says:
- Waffle
- Other people’s stuff
- What I did
- How it worked
- Waffle
The other thing I’ve considered doing is photographing every overview slide in a conference and turning all 30+ of them into an animated gif. I guess I’d better wait until I’m better at taking photos without flash though, as it could get a bit distracting for the other attendees…
On dancing a bit and thinking too much
I’ve taken up dance lessons – partly because I enjoy dancing, partly because I know I’m not very good at it and lessons will help, and partly because it’s something sociable that gets me out of the flat and doing some exercise. I’ve been to six or seven lessons now and am beginning to be able to string a few moves together, but I’m always counting in my head and trying to remember stuff. There are a few sentences that repeat and I am sure I have a look of absurd concentration on my face – I don’t think it goes as far as sticking my tongue out and frowning, but it might…
“don’t look at your feet“
“relax your shoulders“
“try to move on the balls of your feet, not your heels“
etc.etc.etc.
It’s good for my french, in a limited way – I expect I’ll soon start believing that counting in french goes un, deux, trois et quatre, cinq, six, sept et huit, and every now and then I am completely baffled by what the instructors say. Sometimes I catch just one word in a sentence, and try to work it out from there. Other times that doesn’t help… Pamplemousse? That means grapefruit. How should I dance like a grapefruit?! Yellow? Sour? Turns out I had to pretend I had a grapefruit in each armpit. I worked it out in the end, but it wasn’t easy.
On top of the lessons, I have been to two or three social dance evenings now. It’s really interesting, for me as a teacher, to observe myself and my classmates dancing in a less constrained setting. I find myself being a bit of a robot – the things I know from class I am OK on (so if I dance with people from the same level I’m not bad), but the few times I’ve danced with the instructor, or the inimitable Vinnie, I’ve been embarrassingly bad. Others are much more natural; they take what they’ve learned in class and are able to build on it and take cues from the more experienced dancers. Some of these people I find out have done other dance classes before, so have a framework to work with; others just seem to have natural talent.
The parallels with learning maths, or programming, are surprisingly clear – those who take what we teach them and immediately try to apply it in different contexts, and who see beyond what’s shown, are the students we all love to teach. People like me, the robots, take work; we’re not so easy to teach but we do get there in the end. It’s quite instructive to do the learning in a context that’s so different, and it’s equally instructive to see the teaching. I think the instinctive element in maths & programming actually has quite a lot in common with dance.
I’ll finish with an embedded video; one of these is the inimitable Vinnie, and another is my instructor… and yes, they really are that cool.
Controlling WordPress autoformatting
The last post contained lots of StreetView frames, and it took me a while to work out how to get them to appear properly. WordPress automatically adds <BR /> tags to the line endings, which is kind-of ok for text, but really messes things up if it chooses to do it in the middle of a block of embedded HTML.
There’s a plugin which fixes this – it’s called PS disable auto formatting. It doesn’t work quite how you’d expect though. What it does is disable auto-formatting completely, therefore changing the appearance of all your past posts, and means that for all future posts you’ll have to add the line feeds manually if you do your editing in HTML mode. The latter isn’t too much of a problem for me, but the former? Well it’s not exactly what I was hoping would happen.
Fortunately there’s a way around this. The plugin adds an option at the bottom of your settings panel (bottom left in the WordPress admin screen) for Autoformatting. If you look in this option, you’ll see that you can do “Batch formatting on past posts”. This will insert the required line endings in posts before a certain date. Set the date just after the date of the last autoformatted post, press go, and your back catalogue will be nicely autoformatted. It advises you to backup your database before using it (which is good advice, but I never heed good advice, and it worked OK for me).
Many thanks to Kieran for pointing me in the direction of this plugin.
Organising references with citeulike
This post, whilst a bit geeky, might be useful to anyone who’s got to write documents with references in them…
I’ve recently discovered Citeulike, a website that organises your references and bibliographies for you in a nice shiny web2.0 kinda way. A colleague pointed me at it a while ago and I was sceptical – because it would be terrible to have all of your references and bibliography saved on an internet site and then for that internet site to go bust. But you can always download the database files (they export to many formats) and keep your own backups, and now they’re now sponsored by Springer so are probably a bit more stable than most web startups. And as someone who works from homes in France and the UK, and from my desk in INPG, and from lab machines in Leeds, and from cafes and trains and other places with WIFI, it is really handy being able to access my references from wherever I am.
I have only been using it seriously for a few weeks but am already very impressed. Here are the things I like about it:
- You can install a browser button in Firefox that lets you post directly to citeulike from various online journals with one click. IEEE Xplore, ACM Digital Library, Springerlink, PubMed, DOI links… Pretty much all the major online journals and databases seem to be covered. This sucks the bibliographic information from an authoritative source directly into your bibliography. No more mis-spelled author names! No more typing anything in!
- You can download your bibliography in loads of different formats. I’m a LaTeX person so I choose BibTeX, but you can also get the bibliographical information as RIS, BibTeX, PDF, RTF, Formatted Text, or Delicious.
- You can import existing BibTeX files, so all those references that you HAVE typed in yourself won’t represent wasted effort.
- You can tag each entry with keywords of your choice, and you can choose to download your entire library or just those with particular tags. So when you’re writing a paper, just tag each entry you will want to cite, then export it. Et voila! Instant bibliography.
- You can mark your own publications as being yours. This means that you can use citeulike as a dynamic publications list with links to the right places. Here’s mine.
There are also lots of social networking type functions where you can see people who are “close” to you in terms of articles they’ve posted, and you can link to specific individuals. I’ve not really been using it long enough to evaluate these features, but it seems to me like it’s going to be a very useful tool already.
Video->images, images->video
Another geeky interlude with mplayer and mencoder… See this earlier post on streaming video for video download assistance. You can get the software from here and it’s free.
Taking a video file and splitting it into a load of numbered jpeg files is a useful thing to be able to do (particularly if you can’t get video input to work with OpenCV). This can be done really easily with mplayer:
mplayer input.avi -vo jpeg:outdir=output_directory
Replace “output_directory” with the directory you want the files to end up in and there you go. You will of course end up with lots of files if your video is of any length, so mplayer has options to make numbered subdirectories and store N frames of video in each. To do this, add subdirs=prefix and maxfiles=N to the command. The “prefix” says what each subdirectory will start with, and the maxfiles determines how many files are put in each subdirectory before moving on to the next one. So this line…
mplayer input.avi -vo jpeg:outdir=output_directory:subdirs=aa:maxfiles=100
…will put 100 files in each subdirectory, and each sub directory will start with the characters “aa”. This is most useful if you’ve got a massive video and there’s a limit on the number of files you can keep in a directory. For example, on a FAT32 system you can “only” have 65,534 files per directory. However, if you’re using Windows you’ll find that performance drops considerably before then, so splitting a huge number of image files between subdirectories is probably a good idea.
Going the other way – from images to video – can also be done really easily. This is useful for creating stop motion animations, or for taking a video that you’ve processed frame by frame and putting it back together into a video file. This command takes a load of jpg files (numbered, in the current directory), and encodes them as a video also in the current directory:
mencoder "mf://*.jpg" -mf fps=25 -o output.avi -ovc lavc -lavcopts vcodec =mpeg4
To change the frame rate, alter the fps option; to change the output format, change the vcodec option and optionally output filename. If you just want to watch a stack of (numbered) jpgs as a movie, you can use mplayer as follows without saving any output video:
mplayer mf://*.jpg