Fast ID3 tagging

This is solely for my friend saper who was recently telling me how much he loves it when people post snippets of code that they come up with during their everyday lives, even if they are relatively pointless in the grander scheme of things. Well, today I was listening to a few old mp3 files while coding more important stuff and realised that some had no id3 tags, which was a good excuse to put good ol' PERL and some shell magic to some use to tag them all, fast. Here's the two-minute script for tagging files based on the filename (note the '[trackno] - [title].mp3' regex). I ran the script twice, once for the trackname and once for the track number (not shown below, is trivial and left as an exercise for the reader). Hope this is useful to someone, although I guess it mostly serves as proof as to how much you can do with one line of PERL/shell scripting magic. Enjoy =)
ls *.mp3 | while read f; do TRACKNAME=`echo "$f" | perl -e '$a = ; $a =~ /(\d\d) - (.*).mp3/; print $2;'`; id3 -t "$TRACKNAME" "$f"; done

The real choice is liberty versus control

Tyranny, whether it arises under threat of foreign physical attack or under constant domestic authoritative scrutiny, is still tyranny. Liberty requires security without intrusion, security plus privacy. Widespread police surveillance is the very definition of a police state. And that's why we should champion privacy even when we have nothing to hide.

The App Store is an ongoing karma leak.

From Paul Graham's excellent article on the iPhone AppStore:
The dictator in the 1984 ad isn't Microsoft, incidentally; it's IBM. IBM seemed a lot more frightening in those days, but they were friendlier to developers than Apple is now.
But the most worrying part, in my view, is that people (and especially developers) are keener on accepting the ludicrous terms that Apple is imposing on them than they were even a few years ago.

Ο Δρόμος του Τσαγιού στα Ιντερτιούμπζ!

Πάει ένας περίπου χρόνος από τη πρώτη μου παραγγελία — και το σχετικό άρθρο για το δικτυακό κατάστημα τσαγιού tsai.gr. Οι εντυπώσεις ήταν ως επι το πλείστον θετικές, με μεγάλη ποικιλία τσαγιών και βοτάνων, άμεση εξυπηρέτηση και εξαιρετικό πακετάρισμα των προϊόντων. Μεγάλη (και σημαντική) εξαίρεση οι τιμές του καταστήματος οι οποίες ήταν περίπου 20% ακριβότερες […]

Οπτικοακουστικό Αρχείο ΕΡΤ — Μέρος Δεύτερο

Τον Δεκέμβριο του 2007, έγραψα ένα άρθρο με τίτλο ‘Οπτικοακουστικό Αρχείο ΕΡΤ’. Ο λόγος ήταν η τεράστια σημασία του εγχειρήματος, τόσο για εμένα, όσο και για εκατομμύρια συμπολίτες μου αλλά και για την ευρύτερη σημασία της διάθεσης του αρχείου, μιας μοναδικής κληρονομιάς και μέρος της ιστορίας αυτού του τόπου. Παρά τη θετική άποψή μου για […]

Commodity Infiniband

In 2004 I was asked to design a HPC cluster by my supervisor at Imperial; for a long time this process resembled choosing components for an enthousiast microcomputer in the 1970s and 1980s; choosing the right components that, together, would provide the best platform (processor, storage, memory bandwidth, interconnects) for your cluster. Even in 2004, […]