<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>batteryslave &#187; coding</title>
	<atom:link href="http://www.batteryslave.com/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.batteryslave.com</link>
	<description>minor thoughts about gadgets, code, podcasts and other technical stuff...</description>
	<lastBuildDate>Sat, 20 Feb 2010 18:41:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>walk in the park: installing mod_rails aka phusion passenger</title>
		<link>http://www.batteryslave.com/2009/10/walk-in-the-park-installing-mod_rails-aka-phusion-passenger/</link>
		<comments>http://www.batteryslave.com/2009/10/walk-in-the-park-installing-mod_rails-aka-phusion-passenger/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 15:43:41 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=158</guid>
		<description><![CDATA[man that was easy. after my problems with getting ruby, gem and rails to run installing mod_rails aka phusion passenger was really easy:

gem install passenger
passenger-install-apache2-module

i followed the steps that the installer told me and go. just needed to apt-get some apache dev packages and was ready to run. 
cant tell you how happy i am.
now [...]]]></description>
			<content:encoded><![CDATA[<p>man that was easy. after my <a href="http://www.batteryslave.com/2009/10/getting-ruby-on-rails-to-run-on-my-debian-4-vps/">problems</a> with getting ruby, gem and rails to run installing mod_rails aka phusion passenger was really easy:</p>
<ul>
<li>gem install passenger</li>
<li>passenger-install-apache2-module</li>
</ul>
<p>i followed the steps that the installer told me and go. just needed to apt-get some apache dev packages and was ready to run. </p>
<p>cant tell you how happy i am.</p>
<p>now the rails fun can start.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/10/walk-in-the-park-installing-mod_rails-aka-phusion-passenger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>getting ruby on rails to run on my debian 4 vps</title>
		<link>http://www.batteryslave.com/2009/10/getting-ruby-on-rails-to-run-on-my-debian-4-vps/</link>
		<comments>http://www.batteryslave.com/2009/10/getting-ruby-on-rails-to-run-on-my-debian-4-vps/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 12:29:26 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=151</guid>
		<description><![CDATA[man&#8230;always fighting to get a recent version of anything to run on the debian 4 (etch) vps i have. this time: ruby on rails. ruby v1.9.1, gems 1.3.5 and ror 2.3.4 is what i had i mind. 
first step: download ruby. execute the usual ./configure &#038;&#038; make &#038;&#038; make install triplet. worked fine. then download [...]]]></description>
			<content:encoded><![CDATA[<p>man&#8230;always fighting to get a recent version of anything to run on the debian 4 (etch) vps i have. this time: ruby on rails. ruby v1.9.1, gems 1.3.5 and ror 2.3.4 is what i had i mind. </p>
<p>first step: download ruby. execute the usual ./configure &#038;&#038; make &#038;&#038; make install triplet. worked fine. then download ruby gems. but when i tried to run anything with gem i got:</p>
<p><code><br />
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- zlib (LoadError)<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:1<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:5<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:167:in `load_and_instantiate'<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:88:in `[]'<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:144:in `find_command'<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:131:in `process_args'<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:102:in `run'<br />
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in `run'<br />
	from /usr/local/bin/gem:21<br />
</code></p>
<p>after googleing and trying some stuff i solved it this way:</p>
<ul>
<li>edit ruby-1.9.1-p0/ext/Setup</li>
<li>uncomment the line zlib</li>
<li>make &#038;&#038; make install again</li>
</ul>
<p>next step. successfully let gem install rails. but then <code>ruby script/server</code> stopped with:</p>
<p><code><br />
=> Booting WEBrick<br />
=> Rails 2.3.4 application starting on http://0.0.0.0:3000<br />
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.4/lib/initializer.rb:271:in `rescue in require_frameworks': no such file to load -- openssl (RuntimeError)<br />
	from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.4/lib/initializer.rb:268:in `require_frameworks'<br />
	from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.4/lib/initializer.rb:134:in `process'<br />
	from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.4/lib/initializer.rb:113:in `run'<br />
	from /var/www/rails/ukk/config/environment.rb:9:in `<top (required)>'<br />
	from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'<br />
	from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `block in require'<br />
	from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'<br />
	from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'<br />
	from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.4/lib/commands/server.rb:84:in `<top (required)>'<br />
	from script/server:3:in `require'<br />
	from script/server:3:in `<main>'<br />
</code></p>
<p>after a another round i found <a href="http://linuxnuggetz.blogspot.com/2009/06/ruby-on-rail-on-ubuntu.html">this site</a> with help:</p>
<ul>
<li>apt-get install openssl libssl-dev</li>
<li>apt-get install ruby1.9-dev</li>
<li>cd ruby-1.9.1-p129/ext/openssl</li>
<li>ruby extconf.rb</li>
<li>make &#038;&#038; make install</li>
</ul>
<p>that worked. nice. so now i am waiting for the next fail</p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/10/getting-ruby-on-rails-to-run-on-my-debian-4-vps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>itemtemplate selection by type in xaml only</title>
		<link>http://www.batteryslave.com/2009/09/itemtemplate-selection-by-type-in-xaml-only/</link>
		<comments>http://www.batteryslave.com/2009/09/itemtemplate-selection-by-type-in-xaml-only/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 17:29:23 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[wpf]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=136</guid>
		<description><![CDATA[some days ago i found my self in need to change the itemtemplate in a listbox according to their type. and if with less code as possible. i had done this in a treeview but i couldnt find the code again. so i needed to figure it out again and with some help from a [...]]]></description>
			<content:encoded><![CDATA[<p>some days ago i found my self in need to change the itemtemplate in a listbox according to their type. and if with less code as possible. i had done this in a treeview but i couldnt find the code again. so i needed to figure it out again and with some help from a collegue we ended with this:</p>
<pre class="brush: xml; ">

&lt;!-- more xaml here --&gt;

&lt;ItemsControl ItemsSource=&quot;{Binding Items}&quot;&gt;
  &lt;ItemsControl.Resources&gt;
    &lt;DataTemplate DataType=&quot;{x:Type MyNameSpace:MyType1}&quot;&gt;
      &lt;RadioButton /&gt;
    &lt;/DataTemplate&gt;
    &lt;DataTemplate DataType=&quot;{x:Type MyNameSpace:MyType2}&quot;&gt;
      &lt;ComboBox  /&gt;
    &lt;/DataTemplate&gt;
    &lt;DataTemplate DataType=&quot;{x:Type MyNameSpace:MyType3}&quot;&gt;
      &lt;TextBox /&gt;
    &lt;/DataTemplate&gt;
  &lt;/ItemsControl.Resources&gt;
&lt;/ItemsControl&gt;

&lt;!-- more xaml here --&gt;
</pre>
<p><strong>remark</strong>: you arent allowed to give a key to that resources. i suppose the type is kind of key here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/09/itemtemplate-selection-by-type-in-xaml-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>prio conf 28.-29.10. in munich</title>
		<link>http://www.batteryslave.com/2009/09/prio-conf-28-29-10-in-munich/</link>
		<comments>http://www.batteryslave.com/2009/09/prio-conf-28-29-10-in-munich/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 17:28:41 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[conference]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=135</guid>
		<description><![CDATA[i am existed about a conference i am attending end of oktober in munich, germany: prio conference. its totally ui centric and that why its so hot. never saw such an interesting conference all about ui in germany before. 
]]></description>
			<content:encoded><![CDATA[<p>i am existed about a conference i am attending end of oktober in munich, germany: <a href="http://www.prio-conference.de">prio conference</a>. its totally ui centric and that why its so hot. never saw such an interesting conference all about ui in germany before. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/09/prio-conf-28-29-10-in-munich/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>what is wrong with focus in wpf</title>
		<link>http://www.batteryslave.com/2009/05/what-is-wrong-with-focus-in-wpf/</link>
		<comments>http://www.batteryslave.com/2009/05/what-is-wrong-with-focus-in-wpf/#comments</comments>
		<pubDate>Thu, 14 May 2009 18:13:20 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=114</guid>
		<description><![CDATA[lately we wanted to set the initial focus on a window in wpf to improve the  keyboard experience in our app. what we want to achieve is just the initial  focus. so when one opens the window he can type or push the most meaningful  button instantly. unfortunately we encountered several problems. [...]]]></description>
			<content:encoded><![CDATA[<p>lately we wanted to set the initial focus on a window in wpf to improve the  keyboard experience in our app. what we want to achieve is just the initial  focus. so when one opens the window he can type or push the most meaningful  button instantly. unfortunately we encountered several problems. at first lets  see what wpf offers to set the focus. there are at least 4 possibilities:</p>
<ul>
<li>FocusManager</li>
<li>Keyboard.Focus</li>
<li>InputElement.Focus</li>
<li>InputElement.MoveFocus</li>
</ul>
<p>what i understand from <a href="http://msdn.microsoft.com/en-us/library/aa969768.aspx">msdn</a> is that  the best way to set the initial focus is the focusmanager. but we encountered  two problems where that wont work:</p>
<ul>
<li>set initial focus to a button with a commandbinding</li>
<li>set initial focus to an element defined through a contenttemplate</li>
</ul>
<p>i did not understand why that is. but i found two strange things: when  setting a breakpoint in the ContentRendered-Event you can see the button is  visible, but it is disabled. so i understand that i doesnt make sense to set the  focus to a disabled element. this seems like a bug to me. another thing i could  not understand is when the content of the control is set through a  ContentTemplate the Method FrameworkElement.FindName(string elementName) wouldnt  find the element. isnt that a bug too? when you inspect the window on screen  with scoop u can see all the elements of course.<br />
i tried to use the other  focus-methods in various events but none worked. funny thing: if you set the  focus and have a breakpoint in the Loaded-Event and just go on after stopping  there the focus is correct. Racecondition?</p>
<p>so is there someone who had similar problems? am i wrong with my feeling that  these are bugs?</p>
<p>i added an example <a href="http://www.batteryslave.com/wp-content/focustests.zip">solution</a> where you can see the sourcecode.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/05/what-is-wrong-with-focus-in-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>skillsmatter, london: day 3</title>
		<link>http://www.batteryslave.com/2009/05/skillsmatter-london-day-3/</link>
		<comments>http://www.batteryslave.com/2009/05/skillsmatter-london-day-3/#comments</comments>
		<pubDate>Thu, 14 May 2009 17:52:29 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[.net]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=121</guid>
		<description><![CDATA[man, again a hour too early. but needed to pack my stuff so i arrived at the old sessions house on time. first session with david laribee: &#8220;towards a new architect&#8221;.
man is dave a good speaker. nice minimalistic slides. and we got teamwork. i think a great exercise was the condensation of team values. we [...]]]></description>
			<content:encoded><![CDATA[<p>man, again a hour too early. but needed to pack my stuff so i arrived at the old sessions house on time. first session with david laribee: &#8220;towards a new architect&#8221;.</p>
<p>man is dave a good speaker. nice minimalistic slides. and we got teamwork. i think a great exercise was the condensation of team values. we startet in small groups (5 people) &#8211; diversion phase. where we found around 25 values. all the stuff that came to our minds. then we voted on the values and found 5 top values (conversion phase, we could have summed al the teams values up but to see how it works it was enough) for which we had to find sentences to declare why we honour that value. dave suggested to print those team values so the team have them in mind always. great idea.</p>
<p>after the usual lunchbox i decided to attend the second workshop from dave. unfortunately it started a bit messy. not everybody understood what to do because the exercises where really abstract. and because i had to depart about an hour too early i couldnt see the end result.</p>
<p>as i mentioned my flight was early so i had to leave skillsmatter at 17 o&#8217;clock. too bad because they instantiated a discussion with all the speakers at 18 o&#8217;clock and a beer at the crown pub nearby after that. i should have planned my home ride on thursday. hmmm&#8230;next time.</p>
<p>baseline:<br />
i think the progressive .net workshops from skillsmatter where great. i had very good conversations (mostly limited by my speaking skills). the speakers where always near. not that they leaved after their talk but one could always get to them and ask questions. the atmosphere was very familiar. i liked the location and the organisation was very good. two things i didnt like: the internet-connection was very bad. that was really really annoying. many attendees had 3g-connections but i think if i had used mine (german provider!!) i think by boss had killed me. the second thing: the lunch boxes where a little small for my taste. but i can recommend the workshops without a doubt.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/05/skillsmatter-london-day-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>skillsmatter, london: day 2</title>
		<link>http://www.batteryslave.com/2009/05/skillsmatter-london-day-2/</link>
		<comments>http://www.batteryslave.com/2009/05/skillsmatter-london-day-2/#comments</comments>
		<pubDate>Thu, 14 May 2009 17:22:23 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[.net]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=117</guid>
		<description><![CDATA[i am still not adapted to the hour time difference between germany and the uk. so i awoke a hour to early.
arrived early at the old session house where the workshops take place and decided to hear the f#-workshop with robert pickering. the workshop was full of f# content. robert is real expert. the speed [...]]]></description>
			<content:encoded><![CDATA[<p>i am still not adapted to the hour time difference between germany and the uk. so i awoke a hour to early.</p>
<p>arrived early at the old session house where the workshops take place and decided to hear the f#-workshop with robert pickering. the workshop was full of f# content. robert is real expert. the speed we rushed through the slides was amazing. but at the and we arrived at some beautiful examples of the power of f# which robert ported from python out of the book &#8220;collective intelligence&#8221; by <span class="ptBrand">toby segaran &#8211; great read by the way. he drawed some nice dendrogramms e.g. of a blogclustering algorithm. </span></p>
<p><span class="ptBrand">after the light lunchbag (nearly the same like yesterday) james, david and i got a small beer before we joined the advanced nhibernate workshop with ayende.</span></p>
<p><span class="ptBrand">wow the room was full. big speaker, big room, big audience &#8211; great. so ayende told he has no slides and nothing prepared at all. he questioned the audience to supply topics he would then talk about. he collected about 25 topics&#8230;for a 4h workshop&#8230;not bad. and it was fun. for example the suggested topic &#8220;stored procedures&#8221; he wrote down as &#8220;stored procedures, and how they bite you in the ass&#8221;. ayende is really cool. the rest of the talk was also very passionate.</span></p>
<p>after that gojko guided the group to the alt.net beers. snacks and drinks where sponsored by thoughtworks and skillsmatter (thanks for that). i learned serialseb is the dictator of the alt.net beers. he managed the geeky crowd to really get to two talks around document databases and bdd. some of the speakers had an alcohol clouded mind to say the least. but it was real fun. it was an amazing day 2.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/05/skillsmatter-london-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>skillsmatter, london: day 1</title>
		<link>http://www.batteryslave.com/2009/05/skillsmatter-london-day-1/</link>
		<comments>http://www.batteryslave.com/2009/05/skillsmatter-london-day-1/#comments</comments>
		<pubDate>Mon, 11 May 2009 22:06:15 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[.net]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=110</guid>
		<description><![CDATA[so the first day is finished. when i arrived at skillsmatter i met michel. like expected. first talk with ian cooper about internal dsls in c#. cool intro to the matter. now i need to have a look at some stuff:

push-button- vs. fluent-api
nbuilder
closures are code handled like data
static reflection
rhino dsl
mite

after that we got a lunchbag [...]]]></description>
			<content:encoded><![CDATA[<p>so the first day is finished. when i arrived at skillsmatter i met michel. like expected. first talk with ian cooper about internal dsls in c#. cool intro to the matter. now i need to have a look at some stuff:</p>
<ul>
<li>push-button- vs. fluent-api</li>
<li><a href="http://code.google.com/p/nbuilder/">nbuilder</a></li>
<li>closures are code handled like data</li>
<li><a href="http://ayende.com/Blog/2005/10/29/StaticReflection.aspx">static reflection</a></li>
<li><a href="http://ayende.com/default.aspx">rhino dsl</a></li>
<li><a href="http://code.google.com/p/mite-net/">mite</a></li>
</ul>
<p>after that we got a lunchbag and sat in the sun for an hour. then sebastien lambla joined. i didnt know much about him but he seemed funny and interesting so i decided to see his talk instead of the fitnesse one. and it was great. he stated that he had only 3h of sleep because he had to get openrasta to work for the workshop. but he got it and the workshop went great.<br />
when the workshop ended we all went to have a beer. there where some discussions with lambla aka serialseb, oren aka ayende and some other nice guys.<br />
we ended the evening with pizza at pizza express with 14 funny people where we had also some great discussions about latin as a language in school and introducing agile techniques to teams in very big and long lasting projects. very interesting.</p>
<p>know i am done, have a good night</p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/05/skillsmatter-london-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>going to london: skillsmatter</title>
		<link>http://www.batteryslave.com/2009/05/going-to-london-skillsmatter/</link>
		<comments>http://www.batteryslave.com/2009/05/going-to-london-skillsmatter/#comments</comments>
		<pubDate>Sat, 09 May 2009 20:24:44 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=107</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>i am excited. tomorrow i will fly to london to attend the progressive .net tutorials from <a href="http://skillsmatter.com/event/open-source-dot-net/progressive-dot-net-exchange">skillsmatter</a>. great people will be there: <a href="http://ayende.com/Blog/">ayende</a> aka oren eini, <a href="http://serialseb.blogspot.com/">sebastien lambla</a> and i will meet <a href="http://geekswithblogs.net/alternativedotnet/Default.aspx">michel</a> a comrade from the <a href="http://www.jpboodhoo.com/training.oo">.net bootcamp</a> last year. so i hope i will write some posts from london the next days. stay tuned&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/05/going-to-london-skillsmatter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>first steps with trac</title>
		<link>http://www.batteryslave.com/2009/02/first-steps-with-trac/</link>
		<comments>http://www.batteryslave.com/2009/02/first-steps-with-trac/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 20:36:25 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[toolz]]></category>
		<category><![CDATA[apahe linux coding]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=89</guid>
		<description><![CDATA[ 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 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.batteryslave.com/wp-content/trac-logo.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://www.batteryslave.com/wp-content/trac-logo-thumb.png" border="0" alt="trac_logo" width="218" height="65" /></a> in a recent little project of my alter ego dotob (website not yet nice and tasty) i wanted to try the project management tool <a href="http://trac.edgewall.org/" target="_blank">trac</a> from edgewall. its a webbased system written in python. nice because i want to look at python as a scripting language anyway.<br />
so because my webserver is a debian system the installations first steps where easy:</p>
<p><code>apt-get install trac</code></p>
<p>after that trac is installed in /usr/share/trac. to create your trac-environment you have to call the admin console program from trac:</p>
<p><code>trac-admin /var/www/trac initenv</code></p>
<p>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:</p>
<p><code>apt-get install libapache-mod-python</code></p>
<p>ok got some tips for the site config out of the net. here is my virtualhost-config part:</p>
<p><span style="font-family: Courier New;"># Trac Configuration<br />
&lt;VirtualHost *&gt;<br />
ServerName wop.dotob.de<br />
DocumentRoot /var/www/trac/<br />
&lt;Location / &gt;<br />
SetHandler mod_python<br />
PythonHandler trac.web.modpython_frontend<br />
PythonInterpreter main_interpreter<br />
PythonOption TracEnv /var/www/trac/<br />
PythonOption TracUriRoot /<br />
AuthType Basic<br />
AuthName &#8220;trac&#8221;<br />
# Use the SVN password file.<br />
AuthUserFile /var/svn/.dav_svn.passwd<br />
Require valid-user<br />
&lt;/Location&gt;<br />
&lt;/VirtualHost&gt;</span></p>
<p>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.</p>
<p>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.</p>
<p>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 &#8220;fix #5 introduce new style in xaml&#8221; 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:</p>
<p>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:</p>
<p><code>REPOS="$1"<br />
REV="$2"<br />
LOG=`svnlook log -r $REV $REPOS`<br />
AUTHOR=`svnlook author -r $REV $REPOS`<br />
TRAC_ENV='/var/www/woptrac'<br />
/usr/bin/python /usr/share/doc/trac/contrib/trac-post-commit-hook -p "$TRAC_ENV" -r "$REV" -m "$LOG" -u "$AUTHOR"</code></p>
<p>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: &#8220;Fixes: #5&#8243;. i think the : between the command Fiexs and the #5 was not considered by the scripts regex.</p>
<p>i am curious about using trac. will tell how it behaves.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/02/first-steps-with-trac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
