<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>full fathom five: Category Development</title>
    <link>http://www.michaelstudman.com/fullfathomfive/articles/category/development</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>the blog of Michael Studman</description>
    <item>
      <title>Java snippet: Debugging a Java library used from Ant</title>
      <description>&lt;p&gt;I recently needed to debug a library which seemed to be misbehaving when used within Ant. After a bit of research here&amp;#8217;s the best way I found to debug within Ant that doesn&amp;#8217;t require sprinkling your bin/ant or bin\ant.bat with temporary JPDA pixy dust.&lt;/p&gt;

&lt;p&gt;Ant doesn&amp;#8217;t directly accept the -X arguments needed to set up the JPDA settings so the question is: how do you pass these from a shell or command line? In this, the ANT_OPTS environment variable is your friend. Its contents will be directly passed to the Java process Ant calls.&lt;/p&gt;

&lt;p&gt;So here&amp;#8217;s how you do it:&lt;/p&gt;

&lt;p&gt;Step 1: Set ANT_OPTS to the debug options appropriate for your JVM:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;for Java 1.4:

&amp;gt;&amp;gt; export ANT_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8453

for Java 1.5:

&amp;gt;&amp;gt; export ANT_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8453
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Step 2: Run ant like normal:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;  
&amp;gt;&amp;gt; ant
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Step 3: Set your breakpoints.&lt;/p&gt;

&lt;p&gt;Step 4: Now attach your debugger.&lt;/p&gt;

&lt;p&gt;There might be better ways to do this but this was the least invasive route for me.&lt;/p&gt;</description>
      <pubDate>Fri, 01 Sep 2006 09:05:02 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:6963d35f-f1ad-4f81-8f2e-3bd966c39dd5</guid>
      <author>Michael Studman</author>
      <link>http://www.michaelstudman.com/fullfathomfive/articles/2006/09/01/java-snippet-debugging-a-java-library-used-from-ant</link>
      <category>Java</category>
      <category>Development</category>
      <category>java</category>
      <category>ant</category>
      <category>development</category>
      <category>snippet</category>
    </item>
    <item>
      <title>Challenges - knowing when to say no</title>
      <description>&lt;p&gt;Many dynamic and energetic developers I have known share a characteristic of reflexively accepting the challenges put to them by their organisation. I think many people are just wired that way - they are presented with a challenge and their sense of self worth or their desire to please or whatever it is compels them to accept it; and beat it.&lt;/p&gt;

&lt;p&gt;What do you do when the challenges are nonsensical, not worth doing or based on clearly broken assumptions. In a &amp;#8216;can do&amp;#8217; culture that places a high value on &amp;#8216;being pro-active&amp;#8217; a challenge can often take on mystical properties that make it unasailable and immune to rational questioning or discourse. If it was uttered thus must it be worthwhile.&lt;/p&gt;

&lt;p&gt;It takes a lot of guts to say to someone (especially someone you report to or someone in a position of substantial power) &amp;#8220;your challenge doesn&amp;#8217;t make sense, I refuse to accept it&amp;#8221;. In such organisations rejecting a challenge is often worse than failing the challenge itself and you may run the risk of being labeled a recalcitrant, nay-sayer, lazy or worse.&lt;/p&gt;

&lt;p&gt;If a friend came to you and challenged you to invent a perpetual motion machine, would you accept or reject the challenge? Kooks aside, most of us would reject it and we wouldn&amp;#8217;t judge ourselves by the standards of the challenger - we&amp;#8217;re not failures because we refuse to invent a perpetual motion machine. We know it&amp;#8217;s sheer folly.&lt;/p&gt;

&lt;p&gt;Organisations should do the same when they&amp;#8217;re forced to into a Mythical Man Month scheduling &amp;#8216;challenge&amp;#8217; by overzealous upper management eager to make their mark. Adding manpower to a late (or tight) project will just make it later (or tighter) and we shouldn&amp;#8217;t be afraid to rebuff a challenge to come up with aggressive project plans  based on the assumption that &amp;#8220;men and month are interchangeable&amp;#8221;. This, too, we know is sheer folly.&lt;/p&gt;

&lt;p style="text-align:right;font-size:10px;"&gt;Technorati Tags: &lt;a href="http://www.technorati.com/tag/development" rel="tag"&gt;development&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/management" rel="tag"&gt;management&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/Mythical Man Month" rel="tag"&gt;Mythical Man Month&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/projects" rel="tag"&gt;projects&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 18 Aug 2006 21:15:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:ca8eb951-826e-492f-a002-05cc36ef77ed</guid>
      <author>Michael Studman</author>
      <link>http://www.michaelstudman.com/fullfathomfive/articles/2006/08/18/challenges-knowing-when-to-say-no</link>
      <category>Development</category>
      <category>development</category>
      <category>management</category>
      <category>MythicalManMonth</category>
      <category>projects</category>
    </item>
  </channel>
</rss>
