Archive for the ‘Allgemein’ Category

Visualizing Ant Scripts.

Dienstag, April 8th, 2008

XML is generally not only tedious to write, but also hideous to look at, yet sometimes you gotta bite the bullet and use an ant build script.

I’ve written a little tool that renders a dependancy graph of all the tasks in a ant build.xml file. The result looks like this:

ant_deps

The above was generated from this xml file which is too long and ugly to include here.

In case you’d also like to generate nifty little pictures like the above, to beef up skimpy documentation, for example, you can download the tool here. Just call:

java -jar antvis.jar

And all the rest should be self-explanatory. You’ll need to have a copy of Graphviz installed in order to render the pictures. In case you are interested in the source, you can grab a copy using subversion here:

svn co http://a2800276.googlecode.com/svn/branches/antvis

Erste Fahndungserfolge bei Soko „Brücke“

Donnerstag, April 3rd, 2008

Nach der Ausstrahlung des Phantombildes der mutmaßlichen Brückenmörder im ZDF Dauerbrenner „Aktenzeichen XZ: ungelöst“ konnte sich die Oldenbürger SOKO „Brücke“ kaum noch vor Anrufen aufgereger Tokio Hotel Fans retten:

Bereits eine Stunde nach Ende der ZDF-Sendung „Aktenzeichen XY … ungelöst“ konnten rund 200 Anrufe verbucht werden, bis heute stieg die Zahl auf 350.

Quelle: Spiegel Online

tokio.jpg

Werbung, furchtbar im Arsch.

Montag, März 31st, 2008

Es gibt normale Werbefachleute und es gibt die Vollprofis von Werbetechnik Dick in Köln:

arsch2.jpg

Nein, da hat nicht irgendein obzöner Betrunkener einen Aufkleber zwischen die Arschbacken geklebt, „das soll so sein“.

EURUKO 2008: Native Extensions

Sonntag, März 30th, 2008

fish.png

You were expecting cats?

Here are the code examples in case you want to try them out yourself.

Here is a copy of the slides, unfortunately, they’re quiet huge at the moment, I’ll try to get smaller one as soon as I figure out keynote…

Suggestions from the audience

  • Ruby Hacking Guide : more detailed information about Ruby internals.
  • RubyInline : allows you to write C code in the middle of Ruby code
  • Somebody said the videos of the talks would be put up here
  • Dr. Nic was kind enough to write a generator to handle native extensions for his newgem tool. newgem is definitely worth trying out, it generates a LOT of boiler plate, which is sort of overwhelming. But it’s more fun to figure out what his tool does than to type boilerplate code.

Arguments vs. Parameters

Mittwoch, März 19th, 2008

Just friendly reminder from the language police. The terms argument and parameter aren’t synonyms. Parameters are the variables declared in a function definition, as in:

    void range(int to, int from)

„the function range has two int parameters named to and from„. Arguments on the other hand are the values being passed in when the function is called:

    range(0,x)

„the function range is being called with the arguments 0 and x.“

Neues vom Tibet

Montag, März 17th, 2008

Pranken wie ein Klodeckel
Heiner Brand („Handball Manager 4“) spricht sich jetzt in einem großen Spiegel-Online-Gespräch gegen ein Olympia-Boykott aus Anlass der Unruhen im Tibet aus. Ihm ist das 1980 mit der Olympiade in Moskau schon einmal passiert. Sein Argument:

„Wir soffen uns 1980 gerade auf Vatertagstour durch Gummersbach, da habe ich von dem Boykott erfahren. Das hat mir im Ernst den ganzen Vatertag verdorben. Da war die Kacke am Dampfen. Ein Boykott bringt garnichts, abgesehen davon, dass darunter auch die chinesischen Prostituierten zu leiden haben, die wir schon durchgebucht haben fürs Mannschaftshotel.“

Das ganze Interview:
http://www.spiegel.de/sport/sonst/0,1518,541949,00.html

ruby main idiom

Mittwoch, Februar 20th, 2008

Because I keep forgetting, it’s


if $0 == __FILE__
  puts "main"
end

where __FILE__ contains the name of the file that the currently executing code is located in and $0 is the name of the currently executing program.

Digest Ruby (MD5, SHA) in Ruby

Sonntag, Februar 10th, 2008

I don’t know how many times I’ve gone to the stdlib documentation for usage information concerning digest. Unfortunately, there’s nothing to see there, move along. Documentation is provided in the src distribution [src]/ext/digest/digest.txt. The abridged version:

require 'digest/[md5|sha1|sha2|rmd160]'    
digest = Digest::[MD5|SHA1|SHA256|SHA384|SHA512|RMD160].new   
while #some loop     
  digest.update(bytes)
end
digest.digest #raw bytes
digest.hexdigest #hex

alternatively, the short form:

require 'digest/MD5'
d = Digest::MD5.new
d.hexdigest('whatever you're digesting')

sha2 contains implementations for the digest classes SHA256,SHA384,SHA512

Finally the lengths of the returned hex strings:

len bytes len hex
MD5 16 32
SHA1 20 40
RMD160 20 40
SHA256 32 64
SHA384 48 96
SHA512 64 128

2008 zu besuchen … Mejorada del Campo

Sonntag, Dezember 16th, 2007


In Mejora del Campo bei Madrid baut Justo Gallego Martínez seit über 40 Jahren eigenhändig und eher improvisiert an einer eigenen Kathedrale…

2008 zu besuchen… Reggio Emilia

Sonntag, Dezember 16th, 2007


Die Collezione Maramotti in Reggio Emilia.