Archive for 'coding'

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.

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

nothing but dotnet – jean-paul boodhoo’s bootcamp

last week i attended in jean-paul boodhoo’s nothin but .net – bootcamp course. this was a great experience.

i read about it in his blog and i could convince my boss to send me there. shure i heard some stuff about it and i read the overview from jp with the disclaimer :

**********Please be aware that the length of course days (based on prior iterations of the course) can fluctuate dramatically based on the level of student interaction. It is best to come ready expecting the course days to be no less than 10 hours.************

but what then happened exceeded all my expectations. jp previously send us prep material about what software to install and how to configure the laptop. he also included a small exercise where we should implement some function, so the tests get green. he also gave us the advise to have a look on his shows on dnrtv. so it is just as you may be thinking now: you can easily spend a weekend or two on the preparations.

after everybody had arrived jp took a look at the excercises we had prepared. then he choose one solution and the magic started. i have never seen someone before who grasps the code of others and navigates through it as fast as him. fast as lightning he refactors and afterwards nothing is like before. it was fascinating but sometimes hard to keep track. fortunately jp recorded everything (as long as anyone reminded him). now we have 6GiB (27h) worth of screencast lying around waiting to see them in slomo.

then we started configuring all laptops to run sql-server (or its express edition) and iis on all those different os (winx xp pro, win xp home, vista 32bit/64bit in german!!) so we all can run the webapplication which we wanted to implement in the following days. here is one of the few things that might be improved concerning the courses to come: the setup of the machines took several hours and at the end not everyone could run the app smoothly. i think it would be helpful to have a different approach to show alle the stuff we wanted to learn during the week. what came to my mind was to use a small wpf app with sql-server compact edition. that way there wouldnt be any complex setup needed. jp appreciated the suggestion. perhaps he will use that kind of environment in his next courses.

the following days we implemented the webstore-app. we mostly used a kind of ping-pong-style. jp wrote a test and we implemented the methods to green the tests. the team (usually small groups of 2-4) that finished the tests at first checked in so the others had to revert their changes and update. that was a bit frustrating when you were part of a slower team and it was hard to follow. but we re-paired perpetually so i think it was ok in the end and everyone was happy. sometime we had an assignment given by jp to implement a story by ourselves so we had the chance to write the tests ourselves.

for me the last two days where the best. i got used to jp’s speed and could therefore follow his curser and ideas more easily. moreover the extreme situation of coding till 4am (up until 18h) welded the team together. i think that is the main advantage of the bootcamp style. if we had the same time sliced in the usual 8h days the team wouldnt have become that close. its is a little bit like other situations where people experience extreme challenges. it brings them together. so i hope i will meet these great guys again. (perhaps just to dive into the memories we all share).

there are many things i didn’t mention here. but if you want to know more about what happened i list some blogs of other attendees:

overall it was a great week. thanks to the awesome team. especially jp who is an outstanding personality. i hope i get the chance to meet im again sometime.

keep on movin

basti