going to london: skillsmatter

i am excited. tomorrow i will fly to london to attend the progressive .net tutorials from skillsmatter. great people will be there: ayende aka oren eini, sebastien lambla and i will meet michel a comrade from the .net bootcamp last year. so i hope i will write some posts from london the next days. stay tuned…

first steps with trac

trac_logo in a recent little project of my alter ego dotob (website not yet nice and tasty) i wanted to try the project management tool trac from edgewall. its a webbased system written in python. nice because i want to look at python as a scripting language anyway.
so because my webserver is a debian system the installations first steps where easy:

apt-get install trac

after that trac is installed in /usr/share/trac. to create your trac-environment you have to call the admin console program from trac:

trac-admin /var/www/trac initenv

where /var/www/trac is the place where your website will go and initenv is the command to tell trac-admin to initialise a new environment. next i setup apache to serve the new site. there are a bunch of possibilities to let apache server trac: cgi, fastcgi, mod_python etc. i tried cgi and fastcgi first but the mod_python version worked at last. so i need to install mod_phyton:

apt-get install libapache-mod-python

ok got some tips for the site config out of the net. here is my virtualhost-config part:

# Trac Configuration
<VirtualHost *>
ServerName wop.dotob.de
DocumentRoot /var/www/trac/
<Location / >
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonInterpreter main_interpreter
PythonOption TracEnv /var/www/trac/
PythonOption TracUriRoot /
AuthType Basic
AuthName “trac”
# Use the SVN password file.
AuthUserFile /var/svn/.dav_svn.passwd
Require valid-user
</Location>
</VirtualHost>

sorry i assumed you have set your subversion on the same server an it is already up but i wont tell how this is done here. thats said: the /var/svn/.dav_svn.passwd is my subversion authentication file. i use the svn authentication for trac too.

well now trac is up and running. you can use trac-admin, which is a great commandline tool with tab-completion and all to config stuff like when you create a ticket which level of severity are displayed or what the name of your milestones is. what i suggest also is to set some of the user permissions so you can change more stuff via the webinterface.

another thing i wanted is to let trac look into subversion commits an retrieve some information from my commit messages. so assume i have a ticket #5 and i check some fix for that. now i can write “fix #5 introduce new style in xaml” in the commit message and trac will close the ticket #5 with the svn version mentioned and the commit message attached. so how is this done:

subversion uses hook files to let users run scripts. so you go to your subversion repository (assume /var/svn/src) into the directory hooks. rename the post-commit.tmpl to post-commit. than that file is executed by subversion. now you need to insert the code from trac:

REPOS="$1"
REV="$2"
LOG=`svnlook log -r $REV $REPOS`
AUTHOR=`svnlook author -r $REV $REPOS`
TRAC_ENV='/var/www/woptrac'
/usr/bin/python /usr/share/doc/trac/contrib/trac-post-commit-hook -p "$TRAC_ENV" -r "$REV" -m "$LOG" -u "$AUTHOR"

i found some tutorials where the LOG part was missing but i couldnt get it to work without it. another thing that cost me a lot of time: when you write the commit it didnt work for me to write: “Fixes: #5″. i think the : between the command Fiexs and the #5 was not considered by the scripts regex.

i am curious about using trac. will tell how it behaves.

damn, new server: forgot to enable mod_rewrite

dont know if someone besides thilo noticed, but since i reinstalled my server (2 weeks ago) all the links in this blog (running wordpress) where broken.

wordpress uses an apache module called mod_rewrite to rewrite the url. so what u see in the adressbar in your browser is not like

www.batterslave.com/?p=9

but

www.batteryslave.com/2009/02/lixhot-boysmeisenfrei-log/

a bit more readable. but i forgot to enable the module. that is an easy step if you running a standard debian 4.0 linux on your server like i do. apache 2 comes with some little helper scripts for managing modules and sites. in my case the script a2enmod will do the job (# will symbolise my prompt):

# a2enmod rewrite

after that you call

# /etc/init.d/apache2 reload

so apache relaods the module and config. and we are ready to run.

lixhot boys at meisenfrei log

lixhot party network

this is  a memory dump of the things we where talking about at the lixhot-boys meeting today.

-caltodo, sync todo from iphone to your mac
-lacie 5big, raid network drive
-qnap 439pro, raid network drive
-raid, wikipedia entry
-fotolia, buy photos online
-istockphoto, buy photos online
-tweetdeck, nice adobe air powered twitter client
-twitterific, iphone twitter client
-blue, beautiful vista twitter client
-scotts twitter intro
-evernote, multiplatform note organizer
-dropbox, online storage
-subversion, nice version control system
-mozy, unlimited online backup
-keynote, presentations on the mac
-wptouch, wordpress iphone plugin
-claas tajtes-blog, business and political oriented german blog

was a nice evening. had some kölsch and a good talk. hope to see you soon again.

oecher coder – .net user group aachen (germany)

there is a .net user group forming in aachen. we met twice. next time we meet end of januar 2009 and there will be a presentation about wpf.

iphone programming course

the university of stanford published a iphone programming course. you should check it out when are planing on iphone development.

get it here

TIP: i used wget to fetch all the pdf-files:

wget -r -l2 -H -A.pdf http://www.stanford.edu/class/cs193p/cgi-bin/downloads.php

another one joining the shelfari posse

i am adding myself into the line of book-shelf-sharers. after michel, björn and stefan here is my shelfari.

Shelfari: Book reviews on your book blog

Do not pollute your code

Last week a had another episode where i realized how important it is to remove code and files u are not shure why they are there. ok i have to admit i am still living in an environment with about 500k lines of code and a coverage far away from 10%. so testing was not our strength. so it is a bit harder to know if the code is used anywhere.

but still. to pollute your source-tree with stuff you dont need anymore but are afraid to loose is a bad habit. of course you should have source control to have the security to return to a point in the past where the code existed. but dont comment dozens of lines in production-code. it makes it hard to read and probably the next time you are going to implement the commented code your u are smarter and will do it better.

as i like to say: removing old code is as nice as producing new one.

happy removing…

Favorite Tools I

I know there are a lot of tools lists out there one of the the best i found for Windows based tools is the one of scott hanselman.  but because this one is very big and has a lot of tools in it and also lacks the mac os site of stuff i decided to compile my very little own tools list:

file manager

windows: total commander (26€)

most powerful two-pane-designed eplorer substitute i know. is around a long time now and still updated. with all the good stuff we loved in norton commander (which we called "the friend" back in the days). but here is what i like most:

  • obviously the two pane design
  • the focus on keyboard over mouse
  • instant search as you type like firefox (there are various other options to search the current filelist)
  • multiple tab support
  • syncronous navigation of the open panes (when developing software it is that you often have multiple nearly equal directory tree, open them both in one pane and navigate through them in sync, very nice)
  • the copy/move-queue (you can add to a queue when copying/moving files)
  • renaming assistant

mac os x: pathfinder (40€)

a nice replacement for the finder. no comparison to total commander but ok. i like:

  • the drop stack where you can drop files and dirs
  • intergated terminal
  • integrated preview

editor (usually for viewing only)

my normal editor for coding is the editor in my ide (visual studio or eclipse). but for viewing textfiles or searching/replacing in them i use:

windows: notepad++ (free, os)

  • fast
  • multiple opened files (can remember which files where open in last session)
  • can change encoding format

mac os x: macvim (free, os)

mac os clone of the glorious loved/hated vim-editor.

  • vim can do everything…

image viewing

windows: irfanview (free)

  • fast
  • can make screenshots
  • nice printing
  • view exif data
  • crop images

mac os x: xee (free)

  • fast
  • very easy interface
image editing

windows: paint.net (free, os)

  • fast
  • supports layers

mac os x: photoshop elements (70€)

  • most features i used from photoshop i can use here
  • repair brush
  • scan ability
  • the legendary photoshup user interface

to bee continued…

angry monkeys

today i got a copy of the book The Productive Programmer by Neal Ford seems like a great book. i will write about it when i read it more but while scrolling through it a small story got my attention: the angry monkeys. great stuff. here it is:

several years ago some scientist made an experiment. they put 5 monkeys in a cage, hung some bananas on the ceiling and added a stepladder to the scenery. the monkeys got the bananas with the ladder. in the next step the scientists sprayed the monkeys with ice cold water as soon as they touched the stepladder. so they learned not to touch the ladder what means no bananas. next step: remove a monkey and add one who doesn’t now the scene. so the monkey tried to get the bananas with the ladder. as soon as he reaches over to the ladder the other monkeys beat him up (angry monkeys). the monkeys that know the water where replaced by unknown monkeys in the next steps until not one monkeys knew why they beat up the new clueless monkey.

u see at the end none of the monkeys know why they beat up the clueless one. doesn’t this sound familiar? ever got the answer: “cause we do it that way forever?” the monkeys would say that…

so u should find a better cause for something. and when you dont know why. don’t do it!

so long basti