Archive for August, 2007

Aug
30
Filed Under (IT, free software, programming) by ge on 25-04-2007

Once upon a time, I’ve been asked
“Greg, which console command would convert track filenames of the type INTERPRET_Trackname.mp3 to Interpret – Trackname.mp3 ?”

I’ve answered with a simple python script that can be found down below. It could be easily enhanced to gather data from existing id3 tags:


#! /usr/bin/env python


import sys
import os.path
import re


def visit(arg, dirname, names):
for name in names:
sn = os.path.splitext(name)
if sn[1][1:] == 'mp3':
oldName = os.path.join(dirname, name)
p = re.compile('_')
s = p.split(name)
if len(s) > 1 and s[0].isupper():
newName = os.path.join(dirname, s[0].capitalize() + ' - ' + s[1])
os.rename(oldName, newName)
print 'File "' + oldName + '" renamed to "' + newName + '".'


if len(sys.argv) > 1:
path = sys.argv[1]
else:
path = '.'


os.path.walk(path, visit, 0)

With that amount of code one wouldn’t even have collected the filenames in C.



Aug
19
Filed Under (sustainable?) by ge on 25-04-2007

I do not understand the traffic policy of the german government. Whilst I understand the aim of efficiency increase of the privatisation of the german railway Deutsche Bahn – and believe that this is a good idea given that the trains are still too slow and too inflexible – I do not understand why the Deutsche Bahn AG has to possess the tracks. This combination contains a big danger: The first goal of an incorporation is the enhancement of the shareholders’ value and not the realisation of the governmental mandate of traffic infrastructure. In such a scenario it is very likely that only main tracks will survive. For example, faster trains should lead to disproportional increasements of ridership finally possibly implying even lower prices.

Some german highways such as the north-south A5 are a sole chain of trucks. Where is DB Cargo? Wouldn’t a train be much faster? Where’s the flexible DB Cargo solution for this? How’s the reasoning? DB Cargo is too inflexible because the tracks are not spread all over Germany? Ergo, more trucks on the road and the side tracks become unprofitable. Thus, keep only the main tracks. Hence, DB Cargo is inflexible! This circulus vitiosus can only be broken up when ensuring the widespread of tracks over the land. And here comes in the state’s responsibility.

Air flights have been identified as climate threat? Then, non-taxation of kerosene is of course a still reasonable and maintainable decision whilst the greenest way of travelling – via the railway – is fully taxed. We need a pragmatic rethink.



Aug
14
Filed Under (policy) by ge on 25-04-2007

Another thing I do not understand:

It really makes sense to have locally constrained governments and governmental institutions in a very global world. Some examples and scenarios:

  • An usual event – breaking news: Flood in some poor country. If it keeps raining, thousands of people are concerned. Day 1 after: First numbers are published. Day 2: Numbers are corrected upwards. Evening of Day 2: Serious health threats possible. Day 3: The concerned country’s government can cope with the threat. Day 4: The obviuous becomes evident – the local government is overchallenged. Day 5: A task force is built. You know the rest. Where’s the permanent global task force with strongly powered representatives from every country?
  • It is further reasonable to fight the economically harmful global SPAM problem with local institutions equipped with weak powers.


Aug
10
Filed Under (sustainable?) by ge on 25-04-2007

This summer drosophilae attacked my organic banana whilst they were not interested at all in the conventionally planted banana from my housemate. A random event?



Aug
03
Filed Under (dotProject, free software, programming) by ge on 25-04-2007

I currently receive a considerable number of [upstream] patches for dotProject or related fields. Unfortunately some of these important contributions cannot (at least not easily) be adopted because theyare built against outdated files or not reflecting the core product’s purposes or targets or are inconsistent with present code.
I am really willing to add your contributions, but I have one entreaty: It is always a good idea discussing the aimed changes with the responsible developers in advance. I’ll be happy to give you the necessary hints, advices and guide you through the contribution process. Thank you very much for your comprehension.



Aug
01
Filed Under (IT, sustainable?) by ge on 25-04-2007

This site is green in the sense of neutralisation via carbon credits. I’d prefer hosting powered by alternative energies which is currently only available with a too small feature set.