<?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/"
	xmlns:georss="http://www.georss.org/georss" >

<channel>
	<title>seidbereit.de &#187; Coding</title>
	<atom:link href="http://seidbereit.de/topics/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://seidbereit.de</link>
	<description>ideas.each { &#124;x&#124;  post x }</description>
	<lastBuildDate>Wed, 11 Nov 2009 20:23:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Documenting Cocoa code with Doxygen</title>
		<link>http://seidbereit.de/2008/10/06/documenting-cocoa-code-with-doxygen/</link>
		<comments>http://seidbereit.de/2008/10/06/documenting-cocoa-code-with-doxygen/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 12:05:02 +0000</pubDate>
		<dc:creator>Ullrich</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://seidbereit.de/2008/10/06/documenting-cocoa-code-with-doxygen/</guid>
		<description><![CDATA[As some of you might know, I have a strong Java background. Documenting my code just feels natural to me. That's why I was wondering about how to document the code I write in XCode. I found a <a href="http://www.macdevcenter.com/pub/a/mac/2004/08/27/cocoa.html">post on MacDevCenter</a> which describes how to use Doxygen to generate Javadoc like documentations out of Objective-C code. Since this post is quite old (2004) and I want to draw some more attention on the possibilities of documentation in XCode, I'm going to refresh the steps necessary to setup Doxygen for XCode.

First of all you'll need to get the OS X version of Doxygen from <a href="http://www.doxygen.com">doxygen.org</a>. Doxygen comes in a dmg image. Just copy the Doxygen application into your Application folder.]]></description>
			<content:encoded><![CDATA[<p>As some of you might know, I have a strong Java background. Documenting my code just feels natural to me. That&#8217;s why I was wondering about how to document the code I write in XCode. I found a <a href="http://www.macdevcenter.com/pub/a/mac/2004/08/27/cocoa.html" class="liexternal">post on MacDevCenter</a> which describes how to use Doxygen to generate Javadoc like documentations out of Objective-C code. Since this post is quite old (2004) and I want to draw some more attention on the possibilities of documentation in XCode, I&#8217;m going to refresh the steps necessary to setup Doxygen for XCode.</p>
<p>First of all you&#8217;ll need to get the OS X version of Doxygen from <a href="http://www.doxygen.com" class="liexternal">doxygen.org</a>. Doxygen comes in a dmg image. Just copy the Doxygen application into your Application folder.</p>
<p><span id="more-59"></span>Further create a folder called <span style="font-family: Courier;">Documentation</span> inside your XCode project. All generated documentation will be created in this folder.</p>
<p>Now run Doxygen and set it up for your XCode project.</p>
<ol>
<li>In Doxygen use the Wizard to set up your project:<a href="http://seidbereit.de/wp-content/uploads/2008/10/1-doxygen.png" class="liimagelink"><img src="http://seidbereit.de/wp-content/uploads/2008/10/1-doxygen-tm.jpg" alt="1_Doxygen.png" width="480" height="355" /></a></li>
<li>In the first tab of the wizard, set up your projects name and version. Further set the source code destination directory as shown in the screenshot (remember to create the Documentation directory before). Enter the directories manually, since using the Select dialog will result in absolut paths. Relative paths allow us to move the project later without reference problems.: <a href="http://seidbereit.de/wp-content/uploads/2008/10/2-doxywizard.png" class="liimagelink"><img src="http://seidbereit.de/wp-content/uploads/2008/10/2-doxywizard-tm.jpg" alt="2_Doxywizard.png" width="480" height="363" /></a></li>
<li>The second tab (Mode) allows you to define wich output entities will appear. Select to also include undocumented entities. C++ is fine for language optimization <img src='http://seidbereit.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  : <a href="http://seidbereit.de/wp-content/uploads/2008/10/3-doxywizard.png" class="liimagelink"><img src="http://seidbereit.de/wp-content/uploads/2008/10/3-doxywizard-tm.jpg" alt="3_Doxywizard.png" width="480" height="363" /></a></li>
<li>The Output tab allows you to specify which output formats shall be generated. Make sure to check HTML with frames and navigation tree. Afterwards press OK to close the wizard. Configuring the Diagrams tab is optional:<a href="http://seidbereit.de/wp-content/uploads/2008/10/4-doxywizard.png" class="liimagelink"><img src="http://seidbereit.de/wp-content/uploads/2008/10/4-doxywizard-tm.jpg" alt="4_Doxywizard.png" width="480" height="365" /></a></li>
<li>As the second step in Doxygen save the configuration as file <span style="font-family: Courier;">Doxyfile</span> in your project folder and you&#8217;re done. Step 6 &amp; 7 are optional and not required, as they will be performed automatically from within XCode. But you may perform them to test your configuration.</li>
<li>Set the location of you project directory in step 3.</li>
<li>Step 4: press &#8220;Start&#8221; and the generation shall begin. Afterwards check the <span style="font-family: Courier;">Documentation</span> directory in your project. A folder named html has been created inside it. Check the documentation by opening the <span style="font-family: Courier;">index.html</span> file. Congrats! <img src='http://seidbereit.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p>Now on to setting up XCode to automatically execute Doxygen on build.</p>
<ol>
<li>Open your XCode project.</li>
<li>Add a new build phase (Script Build Phase) to your projects target:<a href="http://seidbereit.de/wp-content/uploads/2008/10/5-xcode.png" class="liimagelink"><img src="http://seidbereit.de/wp-content/uploads/2008/10/5-xcode-tm.jpg" alt="5_XCode.png" width="480" height="145" /></a></li>
<li>Enter &#8220;<span style="font-family: Courier;">/Applications/Doxygen.app/Contents/Resources/doxygen Doxyfile</span>&#8221; as the Shell command: <img src="http://seidbereit.de/wp-content/uploads/2008/10/6-xcode.png" alt="6_XCode.png" width="469" height="550" /></li>
</ol>
<p>On your next project build, the documentation shall be created. Try! <img src='http://seidbereit.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
But wouldn&#8217;t it be nice to access that documentation from within XCode? So let&#8217;s set this up next.</p>
<ol>
<li>Right click your project and add a new Group. Call this group &#8220;Documentation&#8221;</li>
<li>To that group add an &#8220;Existing File&#8221; and choose the index.html in your projects <span style="font-family: Courier;">Documentation/html</span> folder (Did you compile yet? You&#8217;ll need to, to have the folder and file created <img src='http://seidbereit.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). Don&#8217;t copy item to destination groups folder and set reference type relative to project.</li>
<li>Finally you&#8217;ll have to tell XCode that this is no regular html source file. Do this by setting its file type to &#8220;text.html.documentation&#8221;. Now the file should be opened in XCodes HTML viewer. If not, check your file type settings in XCodes preferences.<a href="http://seidbereit.de/wp-content/uploads/2008/10/7-xcode1.png" class="liimagelink"><img src="http://seidbereit.de/wp-content/uploads/2008/10/7-xcode-tm1.jpg" alt="7_XCode.png" width="480" height="441" /></a></li>
</ol>
<p>Now everything should be set up for you to create great source code documentation!! Now all you need to do is document your source code. I&#8217;ll post about this later, but to get you started check out <a href="http://www.stack.nl/~dimitri/doxygen/docblocks.html" class="liexternal">http://www.stack.nl/~dimitri/doxygen/docblocks.html</a> for a brief introduction. Everybody who ever used javadoc shall find himself comfortable instantly.</p>
]]></content:encoded>
			<wfw:commentRss>http://seidbereit.de/2008/10/06/documenting-cocoa-code-with-doxygen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wasting time with JAXB, ANT and APT</title>
		<link>http://seidbereit.de/2008/07/03/wasting-time-with-jaxb-ant-and-apt/</link>
		<comments>http://seidbereit.de/2008/07/03/wasting-time-with-jaxb-ant-and-apt/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 16:56:02 +0000</pubDate>
		<dc:creator>Ullrich</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Diploma]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://seidbereit.de/2008/07/03/wasting-time-with-jaxb-ant-and-apt/</guid>
		<description><![CDATA[Hello,
I just wasted 2 days finding a damn problem with the mentioned combination. What i tried to do ist: Using JAXB from within a APT AnnotationProcessor from within ANT.
Now to the problem:
From within my processor i could access the classes in the jaxb jar files (jaxb-api.jar and jaxb-impl.jar) but when i tried to unmarshal some [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>I just wasted 2 days finding a damn problem with the mentioned combination. What i tried to do ist: Using <a href="http://jaxb.dev.java.net/" class="liexternal">JAXB</a> from within a <a href="http://java.sun.com/j2se/1.5.0/docs/guide/apt/index.html" class="liexternal">APT</a> AnnotationProcessor from within <a href="http://ant.apache.org" class="liexternal">ANT</a>.</p>
<p>Now to the problem:</p>
<p>From within my processor i could access the classes in the jaxb jar files (jaxb-api.jar and jaxb-impl.jar) but when i tried to <em>unmarshal</em> some XML file, i got a ClassNotFoundException. See <a href="http://pastie.org/227136" class="liexternal">http://pastie.org/227136</a></p>
<p>I tried thousands of things to fix this. Passing the classpath in multiple ways. Even passing a new bootstrap classpath, but non worked.</p>
<p>After lots of try and error, some conversations on <a href="irc://irc.freenode.net/java" class="liinternal">#java@freenode</a> (<a href="http://pastie.org/227143" class="liexternal">http://pastie.org/227143</a>) and a look at the JAXB sources i found the solution in passing the classloader of the calling class when instantiating the context:</p>
<pre lang="java" xml:lang="java">
String contextPath = ObjectFactory.class.getPackage().getName();
JAXBContext c = JAXBContext.newInstance(contextPath, MyClass.class.getClassLoader());
</pre>
<p>Hope this could help someone and save some time <img src='http://seidbereit.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://seidbereit.de/2008/07/03/wasting-time-with-jaxb-ant-and-apt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Putting the Discogs API on Rails &#8211; ActiveDiscogs</title>
		<link>http://seidbereit.de/2008/06/15/putting-the-discogs-api-on-rails-activediscogs/</link>
		<comments>http://seidbereit.de/2008/06/15/putting-the-discogs-api-on-rails-activediscogs/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 18:40:29 +0000</pubDate>
		<dc:creator>Ullrich</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[ActiveDiscogs]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://seidbereit.de/2008/06/15/putting-the-discogs-api-on-rails-activediscogs/</guid>
		<description><![CDATA[I had a look inside ActiveResource as it is part of Rails since version 2.1, and tried to use it to access the Discogs API. It turned out to be a bit difficult and required a bit more coding than accessing a regular Rails RESTful API.
That&#8217;s the reason why i created a Rails Plugin which [...]]]></description>
			<content:encoded><![CDATA[<p>I had a look inside <a href="http://railscasts.com/tags/19" class="liexternal">ActiveResource</a> as it is part of <a href="http://rubyonrails.org/" class="liexternal">Rails</a> since version 2.1, and tried to use it to access the <a href="http://discogs.com/" class="liexternal">Discogs</a> <a href="http://www.discogs.com/help/api" class="liexternal">API</a>. It turned out to be a bit difficult and required a bit more coding than accessing a regular Rails RESTful API.</p>
<p>That&#8217;s the reason why i created a Rails Plugin which supports the basic tasks for now (getting releases, artists and labels). Future versions will support searching and caching and a bit more.</p>
<p>The project goes by the name of <em>ActiveDiscogs</em> and is available on <a href="http://activediscogs.rubyforge.org/" class="liexternal">http://activediscogs.rubyforge.org/</a></p>
<p>Feel free to join and play with it <img src='http://seidbereit.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Ah, before i forget: To install just use</p>
<pre>
script/plugin install svn://rubyforge.org/var/svn/activediscogs
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seidbereit.de/2008/06/15/putting-the-discogs-api-on-rails-activediscogs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Methods &#8211; Rails Object extension</title>
		<link>http://seidbereit.de/2008/05/29/my-methods-rails-object-extension/</link>
		<comments>http://seidbereit.de/2008/05/29/my-methods-rails-object-extension/#comments</comments>
		<pubDate>Thu, 29 May 2008 08:43:29 +0000</pubDate>
		<dc:creator>Ullrich</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://seidbereit.de/2008/05/29/my-methods-rails-object-extension/</guid>
		<description><![CDATA[This post is in English as the whole Coding category will be.
What&#8217;s this all about.
Ryan wrote on his blog about a ruby snippet he came up with a friend. His code snippet won&#8217;t be that useful for ruby on rails starters since his example only gives half of the solution.
So here&#8217;s the rest  
Create [...]]]></description>
			<content:encoded><![CDATA[<p>This post is in English as the whole <span style="font-style: italic;">Coding</span> category will be.</p>
<p>What&#8217;s this all about.</p>
<p>Ryan wrote on his blog about a <a href="http://theryanking.com/entries/2008/04/02/my-methods/trackback/" class="liexternal">ruby snippet</a> he came up with a friend. His code snippet won&#8217;t be that useful for ruby on rails starters since his example only gives half of the solution.</p>
<p>So here&#8217;s the rest <img src='http://seidbereit.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Create file app/overrides/object.rb</p>
<pre lang="ruby" line="1">
class Object
  def self.my_methods
    methods - (superclass ? superclass.methods : [])
  end
  def my_methods
    methods - (self.class.superclass ? self.class.superclass.new.methods : [])
  end
end</pre>
</p>
<p>Also create app/overrides/all.rb containing just</p>
<pre lang="ruby" line="1">
Dir[ File.dirname( __FILE__ ) + "/**/*.rb" ].each { |file| require( file ) }</pre>
</p>
<p>This file now needs to be included in the environment.rb</p>
<pre lang="ruby" line="1">
require "#{RAILS_ROOT}/app/overrides/all"</pre>
</p>
<p>This should do the trick. Now get out there and code, code, code!</p>
]]></content:encoded>
			<wfw:commentRss>http://seidbereit.de/2008/05/29/my-methods-rails-object-extension/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

