<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Developer Dad</title>
	
	<link>http://developerdad.com</link>
	<description>The Blog of Jeff Layton / jeffl8n</description>
	<lastBuildDate>Fri, 02 Jul 2010 21:45:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/DeveloperDad" /><feedburner:info uri="developerdad" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/</creativeCommons:license><item>
		<title>Building Axis2 Java Classes From WSDLs Using Ant Foreach</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/8loeo-PPU7A/</link>
		<comments>http://developerdad.com/2009/10/23/building-axis2-java-classes-from-wsdls-using-ant-foreach/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 03:59:20 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[axis2]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[foreach]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://developerdad.com/blog/?p=62</guid>
		<description><![CDATA[I&#8217;ve had a few requests to get an example of the build script I referenced in my post, Ant Foreach Properties, so here it is. In our ant build.xml file we have a task called buildAllWsdls which gets all of the WSDL files from the web service URL, then feeds each of them into Axis2]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F10%2F23%2Fbuilding-axis2-java-classes-from-wsdls-using-ant-foreach%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F10%2F23%2Fbuilding-axis2-java-classes-from-wsdls-using-ant-foreach%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve had a few requests to get an example of the build script I referenced in my post, <a title="Ant Foreach Properties" href="http://developerdad.com/2009/03/13/ant-foreach-properties/" target="_blank">Ant Foreach Properties</a>, so here it is.</p>
<p>In our ant build.xml file we have a task called buildAllWsdls which gets all of the WSDL files from the web service URL, then feeds each of them into Axis2 to convert them to Java classes.</p>
<p>Here are the basic steps of what this build does:</p>
<ol>
<li>Finds each property which ends with &#8220;Service&#8221; and concatenates them into a comma delimited string (ex. ATestService, BTestService, CTestService&#8230;)
<pre class="brush: xml;">&lt;propertyselector property=&quot;services.list&quot; delimiter=&quot;,&quot; match=&quot;(\w)*Service&quot; /&gt;</pre>
</li>
<li>Loop through each of those Service properties using the foreach task and get the WSDL file from the WSDL end point URL.
<pre class="brush: xml;">&lt;foreach list=&quot;${services.list}&quot; inheritall=&quot;true&quot; target=&quot;-getSingleWsdl&quot; delimiter=&quot;,&quot; param=&quot;prettyName&quot; /&gt;</pre>
</li>
<li>Translate the namespace to package properties file into a comma delimited list (as required by Axis 2).
<pre class="brush: xml;">&lt;loadfile srcfile=&quot;${conf.dir}/NStoPkg.properties&quot; property=&quot;ns2p.all&quot;&gt;
     &lt;filterchain&gt;
         &lt;striplinecomments&gt;
             &lt;comment value=&quot;//&quot; /&gt;
         &lt;/striplinecomments&gt;
         &lt;prefixlines prefix=&quot;,&quot; /&gt;
         &lt;striplinebreaks /&gt;
         &lt;tokenfilter&gt;
             &lt;trim /&gt;
             &lt;ignoreblank /&gt;
         &lt;/tokenfilter&gt;
     &lt;/filterchain&gt;
 &lt;/loadfile&gt;</pre>
</li>
<li>Run each WSDL in the download directory through the Axis2 Java class creation Ant task.
<pre class="brush: xml;"> &lt;foreach target=&quot;-createStubs&quot; param=&quot;file&quot; inheritall=&quot;true&quot;&gt;
     &lt;path&gt;
         &lt;fileset dir=&quot;${wsdldir}&quot; /&gt;
     &lt;/path&gt;
 &lt;/foreach&gt;

&lt;target name=&quot;-createStubs&quot;&gt;
    &lt;basename property=&quot;wsdl&quot; file=&quot;${file}&quot; /&gt;
    &lt;echo message=&quot;Generating client code for service: ${wsdl}&quot; /&gt;
    &lt;java fork=&quot;true&quot; classname=&quot;org.apache.axis2.wsdl.WSDL2Java&quot; failonerror=&quot;true&quot;&gt;
        &lt;arg line=&quot;-ns2p ${ns2p.all} -s -u -uri ${wsdldir}/${wsdl} -o ${stubsdir} --noBuildXML&quot; /&gt;
        &lt;classpath refid=&quot;cp.axis&quot; /&gt;
    &lt;/java&gt;
&lt;/target&gt;</pre>
</li>
</ol>
<p>If you don&#8217;t mind your web services being in a Java package that corresponds with the web service namespace, you can skip step 3 and leave out the -ns2p command line argument in the java ant task in step 4.</p>
<p>Here is the full example Ant build.xml file for doing this:</p>
<pre class="brush: xml;">&lt;project name=&quot;Axis2WSDLBuild&quot; default=&quot;buildAllWsdls&quot; basedir=&quot;.&quot;&gt;
 &lt;tstamp&gt;
 &lt;format property=&quot;TODAY&quot; pattern=&quot;MM/dd/yyyy HH:mm:ss&quot;/&gt;
 &lt;/tstamp&gt;

 &lt;property name=&quot;ws-domain&quot; value=&quot;http://services.test.com:8080&quot; /&gt;
 &lt;property name=&quot;webservices.dir&quot; value=&quot;${app.dir}/axisStubsProject&quot; /&gt;
 &lt;property name=&quot;wsdldir&quot; value=&quot;${webservices.dir}/wsdls&quot; /&gt;
 &lt;property name=&quot;stubsdir&quot; value=&quot;${webservices.dir}&quot; /&gt;

 &lt;!-- patternsets --&gt;
 &lt;patternset id=&quot;jar.files&quot;&gt;
 &lt;include name=&quot;**/*.jar&quot;/&gt;
 &lt;/patternset&gt;

 &lt;path id=&quot;cp.axis&quot;&gt;
 &lt;fileset dir=&quot;${lib.dir}/axis&quot;&gt;
 &lt;patternset refid=&quot;jar.files&quot;/&gt;
 &lt;/fileset&gt;
 &lt;/path&gt;
 &lt;path id=&quot;cp.antcontrib&quot;&gt;
 &lt;fileset dir=&quot;${lib.dir}/antcontrib&quot;&gt;
 &lt;patternset refid=&quot;jar.files&quot;/&gt;
 &lt;/fileset&gt;
 &lt;/path&gt;

 &lt;!-- Allow usage of ant-contrib defined tasks --&gt;
 &lt;taskdef resource=&quot;net/sf/antcontrib/antlib.xml&quot;&gt;
 &lt;classpath refid=&quot;cp.antcontrib&quot;/&gt;
 &lt;/taskdef&gt;

 &lt;!-- =================================================================== --&gt;
 &lt;!-- Project initialization                                              --&gt;
 &lt;!-- =================================================================== --&gt;
 &lt;target name=&quot;init&quot;&gt;
 &lt;property name=&quot;version&quot; value=&quot;build ${TODAY}&quot;/&gt;
 &lt;property file=&quot;${conf.dir}/soa-addresses.properties&quot;/&gt;
 &lt;filter token=&quot;version&quot; value=&quot;${version}&quot;/&gt;
 &lt;filter token=&quot;today&quot; value=&quot;${TODAY}&quot;/&gt;
 &lt;/target&gt;

 &lt;!--=======================================================--&gt;
 &lt;!-- TARGET [buildAllWsdls]                                --&gt;
 &lt;!-- Target which gets and creates the web service stubs necessary for client invocation. --&gt;
 &lt;!--=======================================================--&gt;
 &lt;target name=&quot;buildAllWsdls&quot; depends=&quot;init&quot;&gt;
 &lt;antcall target=&quot;wsdlGet&quot; /&gt;
 &lt;antcall target=&quot;buildWsdls&quot; /&gt;
 &lt;/target&gt;

 &lt;!--=======================================================--&gt;
 &lt;!-- TARGET [buildWsdls]                                --&gt;
 &lt;!-- Target which creates the web service stubs necessary for client invocation. --&gt;
 &lt;!--=======================================================--&gt;
 &lt;target name=&quot;buildWsdls&quot;&gt;
 &lt;!-- create the download directory --&gt;
 &lt;mkdir dir=&quot;${stubsdir}&quot; /&gt;
 &lt;!--
 Translate the namespace to package properties file (as typically used in
 an Axis 1 implementation) into a comma delimited list (as required by
 Axis 2).
 --&gt;
 &lt;loadfile srcfile=&quot;${conf.dir}/NStoPkg.properties&quot; property=&quot;ns2p.all&quot;&gt;
 &lt;filterchain&gt;
 &lt;striplinecomments&gt;
 &lt;comment value=&quot;//&quot; /&gt;
 &lt;/striplinecomments&gt;
 &lt;prefixlines prefix=&quot;,&quot; /&gt;
 &lt;striplinebreaks /&gt;
 &lt;tokenfilter&gt;
 &lt;trim /&gt;
 &lt;ignoreblank /&gt;
 &lt;/tokenfilter&gt;
 &lt;/filterchain&gt;
 &lt;/loadfile&gt;
 &lt;!-- run client generation for each WSDL in the download directory --&gt;
 &lt;foreach target=&quot;-createStubs&quot; param=&quot;file&quot; inheritall=&quot;true&quot;&gt;
 &lt;path&gt;
 &lt;fileset dir=&quot;${wsdldir}&quot; /&gt;
 &lt;/path&gt;
 &lt;/foreach&gt;
 &lt;/target&gt;

 &lt;!--=======================================================--&gt;
 &lt;!-- TARGET [wsdlGet]                                --&gt;
 &lt;!--  Target retrieving all the WSDL files necessary for generating client code. --&gt;
 &lt;!--=======================================================--&gt;
 &lt;target name=&quot;wsdlGet&quot;&gt;
 &lt;!-- create the download directory --&gt;
 &lt;mkdir dir=&quot;${wsdldir}&quot; /&gt;

 &lt;!-- find the properties related to WSDL locations --&gt;
 &lt;propertyselector property=&quot;services.list&quot; delimiter=&quot;,&quot; match=&quot;(\w)*Service&quot; /&gt;

 &lt;!-- for each property found, retrieve the WSDL --&gt;
 &lt;foreach list=&quot;${services.list}&quot; inheritall=&quot;true&quot; target=&quot;-getSingleWsdl&quot; delimiter=&quot;,&quot; param=&quot;prettyName&quot; /&gt;

 &lt;/target&gt;

 &lt;!--=======================================================--&gt;
 &lt;!-- TARGET [-getSingleWsdl]                                --&gt;
 &lt;!-- Hidden Target to retrieve a single WSDL. --&gt;
 &lt;!--=======================================================--&gt;
 &lt;target name=&quot;-getSingleWsdl&quot;&gt;
 &lt;!-- get the property value --&gt;
 &lt;propertycopy property=&quot;fullPath&quot; from=&quot;${prettyName}&quot; /&gt;
 &lt;!-- download the WSDL file --&gt;
 &lt;get src=&quot;${ws-domain}/${fullPath}?wsdl&quot; dest=&quot;${wsdldir}/${prettyName}.wsdl&quot; verbose=&quot;true&quot; usetimestamp=&quot;true&quot; /&gt;
 &lt;/target&gt;

 &lt;!--=======================================================--&gt;
 &lt;!-- TARGET [-createStubs]                                --&gt;
 &lt;!-- Hidden target to run WSDL2Java on an input file. --&gt;
 &lt;!--=======================================================--&gt;
 &lt;target name=&quot;-createStubs&quot;&gt;
 &lt;!-- strip the full path from the file --&gt;
 &lt;basename property=&quot;wsdl&quot; file=&quot;${file}&quot; /&gt;
 &lt;echo message=&quot;Generating client code for service: ${wsdl}&quot; /&gt;
 &lt;java fork=&quot;true&quot; classname=&quot;org.apache.axis2.wsdl.WSDL2Java&quot; failonerror=&quot;true&quot;&gt;
 &lt;arg line=&quot;-ns2p ${ns2p.all} -s -u -uri ${wsdldir}/${wsdl} -o ${stubsdir} --noBuildXML&quot; /&gt;
 &lt;classpath refid=&quot;cp.axis&quot; /&gt;
 &lt;/java&gt;
 &lt;/target&gt;

&lt;/project&gt;</pre>
<p>the soa-addresses.properties file, which contains the different web service URLs:</p>
<pre class="brush: plain;">ATestService=services/ATestService
BTestService=services/BTestService
CTestService=services/CTestService
DTestService=services/DTestService
ETestService=services/ETestService</pre>
<p>and the NStoPkg.properties file which converts the default web service namespace based off the WSDL URL to a specified java package:</p>
<pre class="brush: plain;">http://typens.test.com/common=com.test.axis.common.types

http://servicens.test.com/common/ATestService=com.test.axis.common.services.atestservice

http://servicens.test.com/common/BTestService=com.test.axis.common.services.btestservice

http://servicens.test.com/common/CTestService=com.test.axis.common.services.ctestservice

http://servicens.test.com/common/DTestService=com.test.axis.common.services.dtestservice

http://servicens.test.com/common/ETestService=com.test.axis.common.services.etestservice</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/VKSYZ_Kd2pmDU8J7Nw3aW5WBIFU/0/da"><img src="http://feedads.g.doubleclick.net/~a/VKSYZ_Kd2pmDU8J7Nw3aW5WBIFU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/VKSYZ_Kd2pmDU8J7Nw3aW5WBIFU/1/da"><img src="http://feedads.g.doubleclick.net/~a/VKSYZ_Kd2pmDU8J7Nw3aW5WBIFU/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/8loeo-PPU7A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/10/23/building-axis2-java-classes-from-wsdls-using-ant-foreach/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/10/23/building-axis2-java-classes-from-wsdls-using-ant-foreach/</feedburner:origLink></item>
		<item>
		<title>How To: Don’t Allow Facebook To Use Your Profile In Ads</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/K-yFv_7nH6k/</link>
		<comments>http://developerdad.com/2009/07/28/how-to-dont-allow-facebook-to-use-your-profile-in-ads/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 02:15:26 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[privacy]]></category>

		<guid isPermaLink="false">http://developerdad.com/blog/?p=41</guid>
		<description><![CDATA[Facebook has been doing a few sketchy things recently with privacy.  First, there was a big terms of service change which most of the Facebook community petitioned against and was later reverted back and the terms were changed with the community&#8217;s input.  Now Facebook is using user&#8217;s profile information in their Ads.  Now these ads]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F07%2F28%2Fhow-to-dont-allow-facebook-to-use-your-profile-in-ads%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F07%2F28%2Fhow-to-dont-allow-facebook-to-use-your-profile-in-ads%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Facebook has been doing a few sketchy things recently with privacy.  First, there was a big <a title="On Facebook, People Own and Control Their Information" href="http://blog.facebook.com/blog.php?post=54434097130" target="_blank">terms of service change</a> which most of the Facebook community petitioned against and was later <a title="Update on Terms" href="http://blog.facebook.com/blog.php?post=54746167130" target="_blank">reverted back</a> and the terms were <a title="Governing the Facebook Service in an Open and Transparent Way" href="http://blog.facebook.com/blog.php?post=56566967130" target="_blank">changed with the community&#8217;s input</a>.  Now Facebook is using user&#8217;s profile information in their Ads.  Now these ads are Facebook ads (<a title="Debunking Rumors about Advertising and Photos" href="http://blog.facebook.com/blog.php?post=110636457130" target="_blank">not third party</a>) and only shown to people you have confirmed as a friend, but I still would prefer to not have random ads which basically say I endorse something because I am a &#8220;fan&#8221; of it.  I thought other people might want to know how to as well, so I made this quick how to for making sure your profile won&#8217;t show up in Facebook Ads.  It&#8217;s just three simple steps&#8230;</p>
<ol>
<li>Login to Facebook and click Settings &gt; Privacy Settings in the upper right of the screen:
<p style="text-align: center;"><a href="http://www.facebook.com/privacy/"><img class="size-full wp-image-42 aligncenter" title="Privacy Settings" src="http://developerdad.com/wp-content/uploads/2009/07/FacebookProfileAds1.jpg" alt="Privacy Settings" width="281" height="101" /></a></p>
</li>
<li>Click on News Feed and Wall:<br />
<a href="http://www.facebook.com/privacy/?view=feeds&amp;tab=ads"><img class="aligncenter size-full wp-image-43" title="Facebook Ads" src="http://developerdad.com/wp-content/uploads/2009/07/FacebookProfileAds2.jpg" alt="Facebook Ads" width="515" height="275" /></a></li>
<li>Make sure you have &#8220;Show my social actions in Facebook Ads&#8221; set to &#8220;No one&#8221;:<br />
<a href="http://www.facebook.com/privacy/?view=feeds&amp;tab=ads"><img class="aligncenter size-full wp-image-44" title="Don't Use My Profile In Facebook Ads" src="http://developerdad.com/wp-content/uploads/2009/07/FacebookProfileAds3.jpg" alt="Don't Use My Profile In Facebook Ads" width="683" height="750" /></a></li>
</ol>
<p>That&#8217;s all you have to do!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/1gxz_oiO8PFUFTIi2v950OWN-lY/0/da"><img src="http://feedads.g.doubleclick.net/~a/1gxz_oiO8PFUFTIi2v950OWN-lY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/1gxz_oiO8PFUFTIi2v950OWN-lY/1/da"><img src="http://feedads.g.doubleclick.net/~a/1gxz_oiO8PFUFTIi2v950OWN-lY/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/K-yFv_7nH6k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/07/28/how-to-dont-allow-facebook-to-use-your-profile-in-ads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/07/28/how-to-dont-allow-facebook-to-use-your-profile-in-ads/</feedburner:origLink></item>
		<item>
		<title>Happy 12:34:56 7/8/9</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/foyH8XyjVZ4/</link>
		<comments>http://developerdad.com/2009/07/08/happy-123456-789/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 01:11:00 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://developerdad.com/blog/?p=36</guid>
		<description><![CDATA[Well, it&#8217;s been quite a while since I&#8217;ve posted.  In fact the last time I posted, the date was a significant math date, as was today.  This time only happens once a century (though 12:34:56 7/8/90 is probably a more significant math date&#8230;).  Anyway, we&#8217;ve been moving and getting our new house together the past]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F07%2F08%2Fhappy-123456-789%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F07%2F08%2Fhappy-123456-789%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Well, it&#8217;s been quite a while since I&#8217;ve posted.  In fact the last time I posted, the date was a significant math date, as was today.  This time only happens once a century (though 12:34:56 7/8/90 is probably a more significant math date&#8230;).  Anyway, we&#8217;ve been moving and getting our new house together the past couple months, which is partially the reason for my lack of posting.  Now that we&#8217;re <em>mostly</em> done (if you&#8217;re a home owner, you know a house is never truly finished fixing&#8230;), I will be posting a bit more again.  In the mean time, hope you had a nice 12:34:56 7/8/9 today!</p>
<p style="text-align: center;"><a title="12:34:56 7/8/9 by jeffl8n, on Flickr" href="http://www.flickr.com/photos/jeffl8n/3702159793/"><img class="aligncenter" src="http://farm4.static.flickr.com/3465/3702159793_0dfc75b29a_m.jpg" alt="12:34:56 7/8/9" width="240" height="240" /></a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/VSRfziCzt2ns2BXeqhtKAJS_CzI/0/da"><img src="http://feedads.g.doubleclick.net/~a/VSRfziCzt2ns2BXeqhtKAJS_CzI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/VSRfziCzt2ns2BXeqhtKAJS_CzI/1/da"><img src="http://feedads.g.doubleclick.net/~a/VSRfziCzt2ns2BXeqhtKAJS_CzI/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/foyH8XyjVZ4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/07/08/happy-123456-789/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/07/08/happy-123456-789/</feedburner:origLink></item>
		<item>
		<title>Happy Pi Day</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/DPNwssMDEvY/</link>
		<comments>http://developerdad.com/2009/03/14/happy-pi-day/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 23:22:57 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[pi]]></category>

		<guid isPermaLink="false">http://developerdad.com/?p=30</guid>
		<description><![CDATA[Hope everyone is celebrating Pi day accordingly today:]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F03%2F14%2Fhappy-pi-day%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F03%2F14%2Fhappy-pi-day%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Hope everyone is celebrating Pi day accordingly today:</p>
<p style="text-align: center;"><img class="aligncenter size-medium wp-image-31" title="Pi Pie" src="http://developerdad.com/blog/wp-content/uploads/2009/03/pic-0255-300x225.jpg" alt="Pi Pie" /></p>

<p><a href="http://feedads.g.doubleclick.net/~a/KBPr6rE7TitP4RawCHxLr7BiIWc/0/da"><img src="http://feedads.g.doubleclick.net/~a/KBPr6rE7TitP4RawCHxLr7BiIWc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/KBPr6rE7TitP4RawCHxLr7BiIWc/1/da"><img src="http://feedads.g.doubleclick.net/~a/KBPr6rE7TitP4RawCHxLr7BiIWc/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/DPNwssMDEvY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/03/14/happy-pi-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/03/14/happy-pi-day/</feedburner:origLink></item>
		<item>
		<title>Ant Foreach Properties</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/r3ceAXLgqHc/</link>
		<comments>http://developerdad.com/2009/03/13/ant-foreach-properties/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 20:38:01 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[axis2]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[foreach]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://developerdad.com/?p=27</guid>
		<description><![CDATA[Update 10/23/2009: An example of this build has been posted. I&#8217;ve been working with Apache Ant a bit at work the past couple weeks. We&#8217;ve been setting up a Hudson continuous integration server to automate some of our builds and deployments. We&#8217;re also hoping to setup more automated tests using tools like Selenium, HTTPUnit, JUnit,]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F03%2F13%2Fant-foreach-properties%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F03%2F13%2Fant-foreach-properties%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Update 10/23/2009: <a title="Building Axis2 Java Classes From WSDLs Using Ant Foreach" href="http://developerdad.com/2009/10/23/building-axis2-java-classes-from-wsdls-using-ant-foreach" target="_blank">An example of this build has been posted</a>. </strong></p>
<p>I&#8217;ve been working with <a href="http://ant.apache.org/">Apache Ant</a> a bit at work the past couple weeks.  We&#8217;ve been setting up a <a href="https://hudson.dev.java.net/">Hudson</a> <a href="http://en.wikipedia.org/wiki/Continuous_Integration">continuous integration</a> server to automate some of our builds and deployments.  We&#8217;re also hoping to setup more automated tests using tools like <a href="http://seleniumhq.org/">Selenium</a>, <a href="http://httpunit.sourceforge.net/">HTTPUnit</a>, <a href="http://en.wikipedia.org/wiki/JUnit">JUnit</a>, etc., but those are going to be gradually added with the coming releases.</p>
<p>I&#8217;ve worked with Ant a lot before, but hadn&#8217;t really used the <a href="http://ant-contrib.sourceforge.net/">Ant-Contrib Tasks</a> until modifying this build script. The <a href="http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html">foreach task</a> is useful for running a list of things through a certain ant target.  We have a properties file that has the webservice name and the associated WSDL URL.  We feed that list to an Ant target through the foreach task (for each URL, go get the WSDL file/definition), then we generate <a href="http://ws.apache.org/axis2/">Axis2 </a>stubs from each WSDL file.  To automate the generation/retrieving of these WSDL files I was moving the base URL (ex: http://services.test.com/) to the environment property file, since this is different in each environment (Test, QA, Production), but the relative URL (ex: /services/&#8230;) stays the same.  So to summarize, the webservices properties file now has ExampleService=/services/ExampleService and the environment properties file has SERVICES-DOMAIN=http://services.test.com (SERVICES-DOMAIN is assigned to the ws-domain after the environment properties file is loaded in the ant build file).</p>
<p>Here&#8217;s where I ran into a little issue that I wanted to share so no one else has to spend a half hour debugging it.  Well, also so I can find the answer here the next time I run into it. The property for the base URL wasn&#8217;t evaluating when I was running the WSDL list through the foreach call to get/download the WSDL file.  It kept erroring saying ${ws-domain}/services/ExampleService?wsdl couldn&#8217;t be found.  I spent a few minutes putting echo&#8217;s in the ant script to see where it was failing until I saw ${ws-domain} was set up until the ant target that gets the WSDL file.  It was then I saw this <a href="http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html">foreach task</a> attribute:</p>
<blockquote><p><strong>Attribute             Description</strong><strong><br />
inheritall             If <code>true</code>, pass all properties to         the called target.  Defaults to <code>false</code>.</strong></p></blockquote>
<p>Now I&#8217;m not sure why you wouldn&#8217;t want properties passed, but I&#8217;m sure there is some good reason why this is false by default.  Maybe.  So of course, adding this attribute set as true to the foreach ant task made everything work without a hitch.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/bg5w_98dTFOiBvVhgW_K2u3DZXk/0/da"><img src="http://feedads.g.doubleclick.net/~a/bg5w_98dTFOiBvVhgW_K2u3DZXk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/bg5w_98dTFOiBvVhgW_K2u3DZXk/1/da"><img src="http://feedads.g.doubleclick.net/~a/bg5w_98dTFOiBvVhgW_K2u3DZXk/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/r3ceAXLgqHc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/03/13/ant-foreach-properties/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/03/13/ant-foreach-properties/</feedburner:origLink></item>
		<item>
		<title>New Site Design</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/7dwFVmeN2vk/</link>
		<comments>http://developerdad.com/2009/03/05/new-site-design/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 00:10:40 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[Websites]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://developerdad.com/?p=21</guid>
		<description><![CDATA[Note: I wrote this last night about 1:00am and just realized at 7pm, 18 hours later, I never hit publish&#8230; After a couple weeks/months, I&#8217;ve finally gotten around to creating a design for my site. Hopefully it&#8217;s pleasing to the eyes, but either way, twitter me to let me know what you think. I created]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F03%2F05%2Fnew-site-design%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F03%2F05%2Fnew-site-design%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Note: </strong>I wrote this last night about 1:00am and just realized at 7pm, 18 hours later, I never hit publish&#8230;</p>
<p>After a couple weeks/months, I&#8217;ve finally gotten around to creating a design for my site.  Hopefully it&#8217;s pleasing to the eyes, but either way, <a href="http://twitter.com/jeffl8n">twitter me</a> to let me know what you think.  I created the design originally for <a href="http://jeffl8n.com">my main site</a>, then ported it over to a wordpress template for <a href="http://developerdad.com">my blog here</a>.  Actually, you might have already noticed that the &#8220;Home&#8221; link in the top goes to jeffl8n.com, and the blog link is to&#8230; well&#8230; here, my blog.</p>
<p>Now that I&#8217;ve finished the design, I hope to spend some more time on these other <a href="http://jeffl8n.com/projects/">projects</a> (almost all of them not listed on my website yet) I have been neglecting.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/1HGB-rfoksnrnQ2pw9a3afD4kTA/0/da"><img src="http://feedads.g.doubleclick.net/~a/1HGB-rfoksnrnQ2pw9a3afD4kTA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/1HGB-rfoksnrnQ2pw9a3afD4kTA/1/da"><img src="http://feedads.g.doubleclick.net/~a/1HGB-rfoksnrnQ2pw9a3afD4kTA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/7dwFVmeN2vk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/03/05/new-site-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/03/05/new-site-design/</feedburner:origLink></item>
		<item>
		<title>New Blog Address</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/5G1L_E9egRQ/</link>
		<comments>http://developerdad.com/2009/02/18/new-blog-address/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 05:40:11 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://developerdad.com/?p=19</guid>
		<description><![CDATA[As you might have already noticed (because of the magic of Apache mod_rewrite), my blog URL has changed. I bought http://developerdad.com a couple months ago and wasn&#8217;t really sure what to do with it at the time. I had considered using it for a developer dad community site, but finally decided I would just use]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F02%2F18%2Fnew-blog-address%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F02%2F18%2Fnew-blog-address%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>As you might have already noticed (because of the magic of Apache mod_rewrite), my blog URL has changed.  I bought <a href="http://developerdad.com">http://developerdad.com</a> a couple months ago and wasn&#8217;t really sure what to do with it at the time.  I had considered using it for a developer dad community site, but finally decided I would just use it for my blog.  Perhaps in the future I will expand the site to be more than just my blog&#8230;</p>
<p>I still have <a href="http://jeffl8n.com">http://jeffl8n.com</a> and I&#8217;ll start/continue using that as my &#8220;web hub&#8221; or whatever you would call the central place you can find all of my online presence and projects.  Right now it is just a link to my blog, but as soon as I get the design figured out, I&#8217;ll get it up and running.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/37WBlbMkB4lTomjDiH2oMpvLMzA/0/da"><img src="http://feedads.g.doubleclick.net/~a/37WBlbMkB4lTomjDiH2oMpvLMzA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/37WBlbMkB4lTomjDiH2oMpvLMzA/1/da"><img src="http://feedads.g.doubleclick.net/~a/37WBlbMkB4lTomjDiH2oMpvLMzA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/5G1L_E9egRQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/02/18/new-blog-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/02/18/new-blog-address/</feedburner:origLink></item>
		<item>
		<title>Measurement Lab Being Throttled?</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/LRgTSj93AFk/</link>
		<comments>http://developerdad.com/2009/01/29/measurement-lab-being-throttled/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 17:00:13 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[Websites]]></category>
		<category><![CDATA[Comcast]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[MeasurementLab]]></category>
		<category><![CDATA[Net neutrality]]></category>

		<guid isPermaLink="false">http://jeffl8n.com/blog/?p=16</guid>
		<description><![CDATA[Comcast has been known before for filtering or throttling bandwidth, especially bit torrent traffic, so I thought this was an interesting coincedence. Measurement Lab is &#8220;an open platform that researchers can use to deploy Internet measurement tools.&#8221; One of their first measurement tools is to &#8220;measure the speed of [your] connection, run diagnostics, and attempt]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F01%2F29%2Fmeasurement-lab-being-throttled%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F01%2F29%2Fmeasurement-lab-being-throttled%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Comcast has been known before for <a href="http://www.engadget.com/2007/12/02/eff-claims-that-comcast-is-still-meddling-with-data/">filtering or throttling bandwidth</a>, especially <a href="http://www.engadget.com/2008/01/09/fcc-to-investigate-comcast-bittorrent-filtering/">bit torrent traffic</a>, so I thought this was an interesting coincedence.</p>
<p style="text-align: center;"><a href="http://www.measurementlab.net/"><img class="aligncenter size-full wp-image-15" title="Measurement Lab On Comcast" src="http://developerdad.com/wp-content/uploads/2009/01/measurementlaboncomcast.jpg" alt="Measurement Lab On Comcast" /></a></p>
<p><a href="http://www.measurementlab.net">Measurement Lab</a> is <a href="http://googleblog.blogspot.com/2009/01/introducing-measurement-lab.html">&#8220;an open platform that researchers can use to deploy Internet measurement tools.&#8221; </a>One of their first measurement tools is to &#8220;measure the speed of [your] connection, run diagnostics, and attempt to discern if [your] ISP is blocking or throttling particular applications.&#8221; It appears that the Measurement Lab website and several of the servers running these tools are getting bombarded with traffic, but I thought it was quite funny given Comcast&#8217;s <a href="http://en.wikipedia.org/wiki/Network_neutrality">net neutrality</a> history when I first got the error&#8230;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/kL0iLe7JSWk7hISNccNwfG7f9E4/0/da"><img src="http://feedads.g.doubleclick.net/~a/kL0iLe7JSWk7hISNccNwfG7f9E4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/kL0iLe7JSWk7hISNccNwfG7f9E4/1/da"><img src="http://feedads.g.doubleclick.net/~a/kL0iLe7JSWk7hISNccNwfG7f9E4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/LRgTSj93AFk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/01/29/measurement-lab-being-throttled/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/01/29/measurement-lab-being-throttled/</feedburner:origLink></item>
		<item>
		<title>Project Euler Primes</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/lWXd6mnhitA/</link>
		<comments>http://developerdad.com/2009/01/17/project-euler-primes/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 04:03:23 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[challenges]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://jeffl8n.com/blog/?p=10</guid>
		<description><![CDATA[I first checked out Project Euler a couple years ago when one of my friends mentioned it to me. If you haven&#8217;t heard of it before it is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. I took a couple classes in college for basic C++]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F01%2F17%2Fproject-euler-primes%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F01%2F17%2Fproject-euler-primes%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I first checked out Project Euler a couple years ago when one of my friends mentioned it to me.  If you haven&#8217;t heard of it before it is <a href="http://projecteuler.net/">a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve.</a></p>
<p>I took a couple classes in college for basic C++ programming, but we never got too deep.  It was mostly principles of programming, etc. and, since it was a class aimed at Electrical Engineers first programming class and not Computer Science majors, we spent a bit of time on structures of programs and other general concepts that are core to most programming languages.  I was (and still am) interested in strengthening my C++ knowledge, so I decided to try the Project Euler problems in C++.</p>
<p>So far I haven&#8217;t completed many (13 out of 228), but haven&#8217;t spent <em>too</em> much time on it, even though I started a couple years ago&#8230;  The questions range in difficulty from <a href="http://projecteuler.net/index.php?section=problems&amp;id=1">Problem #1</a> <strong>Find the sum of all the multiples of 3 or 5 below 1000.</strong> to <a href="http://projecteuler.net/index.php?section=problems&amp;id=198">Problem #198 </a><strong>How many ambiguous numbers <var>x</var> = <var>p</var>/<var>q</var>, 0 <img style="vertical-align: middle;" src="http://projecteuler.net/images/symbol_lt.gif" border="0" alt="&lt;" width="10" height="10" /> <var>x</var> <img style="vertical-align: middle;" src="http://projecteuler.net/images/symbol_lt.gif" border="0" alt="&lt;" width="10" height="10" /> 1/100, are there whose denominator <var>q</var> does not exceed 10<sup>8</sup>?</strong> The higher number problem # doesn&#8217;t necessarily mean it is more difficult, but difficulty is measured by how many people have solved the problem.  You can see a trend of how people may start doing some of the problems, but quickly the numbers dwindle.  For example, over 48,000 people have completed problem #1, but less than 20,000 people have completed more than 10 and less than 2,000 people have completed more than 25 problems.  Once you&#8217;ve solved a problem, you can look at other ways people have solved it in other languages or even by hand.  However, you can&#8217;t see any hints or other posts about a problem on the site until you&#8217;ve typed in the correct answer for that problem.</p>
<p>Today I spent a little bit of time optimizing some of the old algorithms I had used for previous problems.  (Several algorithms can be re-used between problems and the less time it takes for them to run, the less time you have to wait to see if your answer is correct&#8230;)  I started with optimizing my function to check if a number is a <a href="http://en.wikipedia.org/wiki/Prime_number">prime number</a>.</p>
<p>There are basic things you can do to make figuring out if a number is prime or not.  For example, it&#8217;s very easy and quick to find the remainder of a number when it is divided by 2 or 3.  Since this is a lot of the cases for non-prime numbers, it&#8217;s best to check these cases first before checking if a number is divisible by any other number.  A  couple other quick (and perhaps obvious) things to do is to not check every single number from 1 &#8230; n where n is the number you are trying to check is prime or not&#8230; We know that anything even is divisble by 2 , so instead of checking if the number is divisible by 2, 4, 6, 8&#8230; start by checking if it&#8217;s divisible by 5 (since we&#8217;ve already checked 2 and 3) and check every odd number from there (5,7,9,11&#8230;).  This cuts your computations in half.  Also, we know that we only have to check up to the square root of the number (16/2 = 8, so there&#8217;s no point in checking if there is a remainder with 16/8).  This cuts the computations in at least half again.  After adding this optimizations, my code went from a minute or two to run down to a few seconds.</p>
<p>If you enjoy programming, math, or especially both, I would recommend checking out some of the <a href="http://projecteuler.net/index.php?section=problems">problems</a> on the site.  It is a great way to keep your math skills from getting too rusty and a great way to learn how to do some math programming in a new language. If nothing else, you&#8217;ll get your mind thinking of different ways to solve problems.  <img style="display: none;" src="http://projecteuler.net/index.php?section=problems&amp;id=198" alt="^(" /><img style="display: none;" src="http://projecteuler.net/index.php?section=problems&amp;id=198" alt=")" /></p>

<p><a href="http://feedads.g.doubleclick.net/~a/EyF4_X8bvRS82DC7BLJg4HqSDJg/0/da"><img src="http://feedads.g.doubleclick.net/~a/EyF4_X8bvRS82DC7BLJg4HqSDJg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/EyF4_X8bvRS82DC7BLJg4HqSDJg/1/da"><img src="http://feedads.g.doubleclick.net/~a/EyF4_X8bvRS82DC7BLJg4HqSDJg/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/lWXd6mnhitA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/01/17/project-euler-primes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/01/17/project-euler-primes/</feedburner:origLink></item>
		<item>
		<title>And we’re back…</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/ngH_W_AvoZ8/</link>
		<comments>http://developerdad.com/2009/01/13/and-were-back/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 05:26:42 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Disney]]></category>
		<category><![CDATA[family]]></category>
		<category><![CDATA[vacation]]></category>

		<guid isPermaLink="false">http://jeffl8n.com/blog/?p=8</guid>
		<description><![CDATA[It was a nice week away in Walt Disney World, but we&#8217;re getting back to the real world now. I&#8217;ve just finished uploading some pictures I took to Flickr if you want to see some of the sights. This was a good trip for us. We celebrated both my and my dad&#8217;s birthday (consecutive days,]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F01%2F13%2Fand-were-back%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F01%2F13%2Fand-were-back%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>It was a nice week away in Walt Disney World, but we&#8217;re getting back to the real world now.  I&#8217;ve just finished uploading some pictures I took to <a title="My Flickr" href="http://flickr.com/jeffl8n/">Flickr</a> if you want to see some of the sights.</p>
<p style="text-align: center;"><a href="http://flickr.com/jeffl8n"><img class="aligncenter" title="Magic Kingdom Castle" src="http://farm4.static.flickr.com/3509/3192701851_d13f37c2a9.jpg" alt="" width="500" height="333" /></a></p>
<p>This was a good trip for us.  We celebrated both my and my dad&#8217;s birthday (consecutive days, not the same) and it&#8217;ll definitely be one of the most memorable.  Our daughter was of course always excited and happy, which makes everything great on top of already being at Disney World. We went to Disney World in September with our daughter for our first family vacation since our marriage 4 years earlier.  She was very excited then, so we couldn&#8217;t want to go back.  We found out Disney had a great deal this year where if you booked 4 nights, you got 3 free, including room and park admissions.  On top of that, they gave you a $200 gift card, plus since we already had park tickets, a $75 gift certificate on our birthdays.  It was really a no-brainer to take advantage of the deal, so we did!</p>
<p>If you follow me on <a href="http://twitter.com/jeffl8n">Twitter</a>, you probably saw where our original flight down to Orlando got <a href="http://twitter.com/jeffl8n/status/1095384239">smoked out</a>.  You can follow the timeline through my twitters and apparently it was on the <a href="http://www.wtvr.com/Global/story.asp?S=9615305">local nightly news too</a>. If only the local news groups had followed me on Twitter, they would have known some more info about what was going on.  Luckily, AirTran was able to cancel another flight and let us use that plane to get down to Orlando before too late at night.  They even gave us meal vouchers and a $75 credit on our next flight.  I&#8217;m glad we waited around the airport, though.  We had the opportunity to trade in our tickets for a flight the next day and get a free flight somewhere else, but I think getting to Disney that night worked out best.  (The flight back went without a hitch.)</p>
<p>I won&#8217;t bore you with the details of the trip, but it was fun.  We rode everything suitable for our 2 year old at the parks, met with other family we hadn&#8217;t seen in a while, and had good meals with different Disney characters.  (I would recommend that the character meals are worth the extra costs if you have children.)</p>
<p>Now that we&#8217;re back home, we can&#8217;t wait to get back to Disney again, but who knows how long that will be now.  Our next trip to Disney will probably be with my wife&#8217;s family, but we&#8217;re not sure when yet.  I don&#8217;t think we&#8217;ll be making it back before the end of March (when the $200 gift card deal expires), but maybe we&#8217;ll make it back by the end of the 3 free nights deal (end of June I think).</p>
<p>The first day back is always a bummer, but today was a pretty good transition.  Work was pretty slow today, so I was able to catch back up on e-mails without any major issues to worry about resolving immediately.  It helps that nothing really went wrong while I was gone, too.  I was able to delete about 75% (~300) of my unread e-mails right from the start because they were just automated &#8220;FYI&#8221; e-mails.  Sometimes, well often, I wonder the usefulness of those e-mails&#8230;  They would be much better delivered in RSS or through a Jabber client or similar.  I suppose that&#8217;ll be another post some day.  Enough of my late night rambling&#8230;  For now, it&#8217;s on to the rest of the week&#8230;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/ZFom88ev8aXnYioKExogepl1_QM/0/da"><img src="http://feedads.g.doubleclick.net/~a/ZFom88ev8aXnYioKExogepl1_QM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ZFom88ev8aXnYioKExogepl1_QM/1/da"><img src="http://feedads.g.doubleclick.net/~a/ZFom88ev8aXnYioKExogepl1_QM/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/ngH_W_AvoZ8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/01/13/and-were-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/01/13/and-were-back/</feedburner:origLink></item>
		<item>
		<title>We’re going to Disney World!</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/7TWqlOlzY-A/</link>
		<comments>http://developerdad.com/2009/01/04/were-going-to-disney-world/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 13:47:58 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Disney]]></category>
		<category><![CDATA[family]]></category>
		<category><![CDATA[vacation]]></category>

		<guid isPermaLink="false">http://jeffl8n.com/blog/2009/01/04/were-going-to-disney-world/</guid>
		<description><![CDATA[If you&#8217;re reading this, you probably already know that we&#8217;ll be in Disney world for the next week. So it goes without saying that I won&#8217;t be posting again till next week. Hope everybody has a good first full week of the year!]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F01%2F04%2Fwere-going-to-disney-world%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F01%2F04%2Fwere-going-to-disney-world%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>If you&#8217;re reading this, you probably already know that we&#8217;ll be in Disney world for the next week.  So it goes without saying that I won&#8217;t be posting again till next week.  Hope everybody has a good first full week of the year!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/n1B4SvxQdnKcS7haqHIVw82tKPk/0/da"><img src="http://feedads.g.doubleclick.net/~a/n1B4SvxQdnKcS7haqHIVw82tKPk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/n1B4SvxQdnKcS7haqHIVw82tKPk/1/da"><img src="http://feedads.g.doubleclick.net/~a/n1B4SvxQdnKcS7haqHIVw82tKPk/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/7TWqlOlzY-A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/01/04/were-going-to-disney-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/01/04/were-going-to-disney-world/</feedburner:origLink></item>
		<item>
		<title>(Re)Start a Blog</title>
		<link>http://feedproxy.google.com/~r/DeveloperDad/~3/M_ZiqoWo9nI/</link>
		<comments>http://developerdad.com/2009/01/01/restart-a-blog/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 04:59:04 +0000</pubDate>
		<dc:creator>Jeff Layton</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[Bible]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[family]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[working out]]></category>

		<guid isPermaLink="false">http://jeffl8n.com/blog/?p=3</guid>
		<description><![CDATA[Well it&#8217;s 2009 and I&#8217;ve finally started blogging again&#8230; So, with it being the first day of the year, it only seems fit that I post about some of my goals for the year. (And gives me an excuse to cross one off already). Leave a few of your goals for 2009 in the comments.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F01%2F01%2Frestart-a-blog%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloperdad.com%2F2009%2F01%2F01%2Frestart-a-blog%2F&amp;source=jeffl8n&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Well it&#8217;s 2009 and I&#8217;ve finally started blogging again&#8230;  So, with it being the first day of the year, it only seems fit that I post about some of my goals for the year.  (And gives me an excuse to cross one off already).  Leave a few of your goals for 2009 in the comments.</p>
<p><span style="text-decoration: line-through;"><strong>Start blogging</strong></span><strong> (<a href="http://altimatum.com/">again</a>). </strong>I had a blog a few years ago that I posted on pretty frequently for a while.  Then I got busy and I just dropped it and the domain name.  I&#8217;ve wanted to start blogging again for a while, but just hadn&#8217;t taken the time to start the process of getting the domain names and hosting.  I think blogging is important for anyone working in the computer industry because it helps you stay on top of things.  So hopefully I&#8217;ll be posting some note-worthy things here in the coming year to help people besides myself.</p>
<p><strong>Read more of the Bible.</strong> I&#8217;ve started reading a chapter from the Bible every night recently and it&#8217;s been going well so far.  I just finished reading Ezekial, and if you&#8217;ve ever read it, you know it&#8217;s hard to comprehend so I&#8217;ve just started Psalms, which should be a little easier of a read.  I want to read more of the Bible besides just one chapter a night, though.  There are 1189 chapters in the Bible, so even if I read two chapters per day, it would still take over 1.5 years straight to read the entire thing.  (I plan on reading the whole Bible, but that is a lifetime goal.)  I read Proverbs recently and would recommend anyone, Christian or not, to read through it.  A majority of it, as you can guess, are sayings that most people hear or say throughout their lifetime.</p>
<p>&#8220;Hatred stirs up dissension, but love covers over all wrongs.&#8221;  Proverbs 10:12</p>
<p><strong>Work out regularly.</strong> I&#8217;m sure this one is on most everyone&#8217;s New Year&#8217;s Resolutions.  I started doing small work outs semi-frequently towards the end of last year.  If you follow me on <a href="http://twitter.com/jeffl8n">Twitter</a>, you probably saw me tweet about <a href="http://hundredpushups.com/">hundred push ups</a>.  If you need a place to start, I would greatly recommend this program.  You only do push ups three days a week (Monday, Wednesday, and Friday worked best for me) for six weeks.  It felt great to do the exercises and the difference it was making.  Of course since the program only goes for 6 weeks, you can guess what happened at the end&#8230; I&#8217;ve started doing pushups again the past few nights, but I would also like to do some other exercises to help the rest of my body, too.</p>
<p><strong>Take more, and hopefully better, pictures. </strong>I&#8217;ve had a digital SLR camera for about 8 years now and it wasn&#8217;t till last year that I actually started working with the manual settings on the camera.  Ever since starting that, I&#8217;ve had more inspiration to take more pictures.  Since I don&#8217;t really do any post-corrections on my pictures, just adjusting the manual settings has made them look much better.  I&#8217;d like to take many more pictures, and possibly even some that could be sold or used for someone besides myself.</p>
<p><strong>Contribute to an open source project. </strong>I think contributing to something like an open source project is a great way to both become a better programmer and meet other people like yourself.  I&#8217;m not sure which project I would try to help out, but I&#8217;m sure one will stick out at me sooner or later.<br />
<strong></strong></p>
<p><strong>Finish (and start) some of the projects I haven&#8217;t made time to work on. </strong>I&#8217;ve sadly been neglecting a few projects that I&#8217;ve been meaning to work on for a while (one I started with someone almost 2 years ago).  Hopefully we can get kicking on that one and a few others and get some products/services out there for people to use and enjoy.<br />
<strong></strong></p>
<p><strong>Wake up at 5am, every day.</strong> Like a few of my other goals, I had been doing this for a bit last year, but stopped for one reason or another.  I&#8217;ve changed my alarm so it is much more annoying and loud, which gives me extra incentive to turn it off so I don&#8217;t wake the rest of the family too much.  This should give me some time to work on all of these things without having to forfeit anything on my final goal&#8230;<strong><br />
</strong></p>
<p><strong>Continue to spend good quality time with my family. </strong>If none of these other goals get done because I don&#8217;t have time, that&#8217;s alright, as long as I get to be with my loved ones.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/iPxkZhu8yUoPzxKf-zmn-EzBiDk/0/da"><img src="http://feedads.g.doubleclick.net/~a/iPxkZhu8yUoPzxKf-zmn-EzBiDk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/iPxkZhu8yUoPzxKf-zmn-EzBiDk/1/da"><img src="http://feedads.g.doubleclick.net/~a/iPxkZhu8yUoPzxKf-zmn-EzBiDk/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/DeveloperDad/~4/M_ZiqoWo9nI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developerdad.com/2009/01/01/restart-a-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://developerdad.com/2009/01/01/restart-a-blog/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.724 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-08-25 04:17:17 -->
