<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.1-alpha" -->
<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/"
>

<channel>
	<title>Software Steeplechase</title>
	<link>http://steep.blogsome.com</link>
	<description>Hayden Steep's development obstacle course. (Java, JEE, and beyond)</description>
	<pubDate>Fri, 13 Nov 2009 16:49:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.1-alpha</generator>
	<language>en</language>

		<item>
		<title>Prosperity of the mind</title>
		<link>http://steep.blogsome.com/2009/11/13/prosperity-of-the-mind/</link>
		<comments>http://steep.blogsome.com/2009/11/13/prosperity-of-the-mind/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 16:45:45 +0000</pubDate>
		<dc:creator>Hayden</dc:creator>
		
	<category>General</category>
		<guid>http://steep.blogsome.com/2009/11/13/prosperity-of-the-mind/</guid>
		<description><![CDATA[<p>I really enjoy writing about my work, but over the past 2 years I have been dramatically improving my life through some counseling at Savannah Self Help.  Under the counsel of Helen Brown, I have improved my life in ways that my passion for technology never could.</p>

<p>You need goals in life to get ahead [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>I really enjoy writing about my work, but over the past 2 years I have been dramatically improving my life through some counseling at <a href="http://www.savannahselfhelp.com">Savannah Self Help</a>.  Under the counsel of Helen Brown, I have improved my life in ways that my passion for technology never could.</p>

<p>You need goals in life to get ahead and an inner-peace to take the lumps and bumps along the way.  If you are reading this, what fulfills you?  I hope you are whole and happy, as I am now.</p>

<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://steep.blogsome.com/2009/11/13/prosperity-of-the-mind/feed/</wfw:commentRss>
	</item>
		<item>
		<title>TheLadders.com where not everyone can play, just the suckers.</title>
		<link>http://steep.blogsome.com/2008/02/12/theladders-is-for-superbowl-calibur-suckers/</link>
		<comments>http://steep.blogsome.com/2008/02/12/theladders-is-for-superbowl-calibur-suckers/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 20:16:50 +0000</pubDate>
		<dc:creator>Hayden</dc:creator>
		
	<category>General</category>
		<guid>http://steep.blogsome.com/2008/02/12/theladders-is-for-superbowl-calibur-suckers/</guid>
		<description><![CDATA[<p>While watching the Super Bowl (go Giants!), I noticed a somewhat humorous advertisement for TheLadders.com
The ad was set at a professional tennis match, but everyone in the stands pulled out a racket and ran onto the court to join the game.  The voice-over sounded &#8220;When you let everyone play, nobody wins.&#8221;  A graphic [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>While watching the Super Bowl (go Giants!), I noticed a somewhat humorous advertisement for TheLadders.com<br />
The ad was set at a professional tennis match, but everyone in the stands pulled out a racket and ran onto the court to join the game.  The voice-over sounded &#8220;When you let everyone play, nobody wins.&#8221;  A graphic then showed the company logo and the slogan &#8220;The most 100K+ jobs.&#8221;  I made a mental note and just over a week later, decided to visit the website.</p>

<p>What I found was a business that picked up the torch of failed Super Bowl advertiser Pets.com that deserves the same fate.</p>

<p>1) I performed a search having chosen a field of industry and a regional location.
2) I was presented with a screen that forced me to create an account in order to see the job results.
3) I created an account and was able to see the job results.
4) I clicked on a job result and was told that I needed to sign up for a premium membership to view the job details.</p>

<p>I&#8217;m very hesitant to throw around platitudes like bait-and-switch, but after doing some Googling, <a href="http://www.cheezhead.com/2007/02/02/theladders-bait-switch/">it would seem the bad taste in my mouth was not unique,</a>  and that this particular .com has been annoying people for far longer than I&#8217;ve heard of them.</p>

<p>The icing on the cake (or should I say &#8220;slime&#8221;?) is that should you actually fork over money for viewing the same job postings that show up for free on other popular job boards&#8230; you will continue paying until you explicitly cancel your &#8220;subscription.&#8221;</p>

<p>Yes sir, it&#8217;s the Columbia House music club of job boards.  When TheLadders.com prompts you to pay, it doesn&#8217;t read&#8230;
&#8220;Which subscription plan would you like? 1 month, 3 month, etc.&#8221;  It reads something to the affect of &#8220;How long would you like to subscribe?  1 month, 3 months, etc.&#8221;  with smaller, italic print indicating you have to manually cancel your service, even if you only payed for 1 month.</p>

<p>TheLadders.com may be a very good resource, but the fundamentals of &#8220;duck-typing&#8221; come to mind when I visit their website.  If it looks like a rip-off, smells like a rip-off, talks like a rip-off&#8230; it&#8217;s probably a rip-off. </p>
]]></content:encoded>
			<wfw:commentRss>http://steep.blogsome.com/2008/02/12/theladders-is-for-superbowl-calibur-suckers/feed/</wfw:commentRss>
	</item>
		<item>
		<title>Enabling Validation in Struts 2</title>
		<link>http://steep.blogsome.com/2007/11/13/15/</link>
		<comments>http://steep.blogsome.com/2007/11/13/15/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 21:24:09 +0000</pubDate>
		<dc:creator>Hayden</dc:creator>
		
	<category>Java</category>
	<category>Struts 2</category>
		<guid>http://steep.blogsome.com/2007/11/13/15/</guid>
		<description><![CDATA[<p>I&#8217;ve been learning Struts 2 recently.</p>

<p>I spent too much time figuring out that in order to enable the framework&#8217;s validation behavior, your action classes must extend the ActionSupport class.</p>

<p>The documentation fails to mention this small fact.  Maybe it&#8217;s common knowledge to experienced Xwork developers, but wasn&#8217;t to me.  I was very excited to [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been learning Struts 2 recently.</p>

<p>I spent too much time figuring out that in order to enable the framework&#8217;s validation behavior, your action classes must extend the ActionSupport class.</p>

<p>The <a href="http://struts.apache.org/2.x/docs/validation.html">documentation</a> fails to mention this small fact.  Maybe it&#8217;s common knowledge to experienced Xwork developers, but wasn&#8217;t to me.  I was very excited to be writing my new web application using POJO&#8217;s that didn&#8217;t extend any classes, but it looks like you have to unless you feel like rolling your own validation utilities.</p>

<p>Before I started using Struts 2, I learned everything i could about it so that I could be productive with it right away.  However, I&#8217;ve been learning too much about this framework via the TIAS (try it and see) approach.  </p>

<p>I signed up for an Apache confluence account hoping that I&#8217;d be able to edit the wiki to supplement the documentation, but am not sure who to contact to get right permissions to the docs.</p>
]]></content:encoded>
			<wfw:commentRss>http://steep.blogsome.com/2007/11/13/15/feed/</wfw:commentRss>
	</item>
		<item>
		<title>Preserving actual size when displaying 4x3 aspect ratios on a 16x9 TV/Monitor</title>
		<link>http://steep.blogsome.com/2007/03/09/preserving-actual-size-when-displaying-4x3-aspect-ratios-on-a-16x9-tvmonitor/</link>
		<comments>http://steep.blogsome.com/2007/03/09/preserving-actual-size-when-displaying-4x3-aspect-ratios-on-a-16x9-tvmonitor/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 22:43:48 +0000</pubDate>
		<dc:creator>Hayden</dc:creator>
		
	<category>General</category>
		<guid>http://steep.blogsome.com/2007/03/09/preserving-actual-size-when-displaying-4x3-aspect-ratios-on-a-16x9-tvmonitor/</guid>
		<description><![CDATA[<p>With prices continuing to drop, I&#8217;ve been looking into upgrading my television to a wide screen flat panel model.  Besides high-definition, I&#8217;ve also been looking forward to an increase in raw size that a new TV will offer, but what constitutes an increase in size?  A 32 inch television with an aspect ratio [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>With prices continuing to drop, I&#8217;ve been looking into upgrading my television to a wide screen flat panel model.  Besides high-definition, I&#8217;ve also been looking forward to an increase in raw size that a new TV will offer, but what constitutes an increase in size?  A 32 inch television with an aspect ratio of 4 by 3 has a larger viewing area than a 32 inch 16 by 9 (wide screen) TV, since the dimension is that of the hypotenuse of the corners.</p>
<br />

<div align="center"><img src='/images/normal.gif' alt='' /></div>
<p>

For example, if you were to &#8217;stuff&#8217; a 16x9 image into a 4x3 TV set, it doesn&#8217;t fit.  You have to scale the image down in order to preserve the aspect ratio.  This scaling down is what creates the letter boxing above and below the image.  In the example below, you can see how a 36 inch television is capable of displaying a wide screen image that is the same physical dimensions that would result from a 32 inch wide screen TV displaying that image.
</p>

<div align="center"><img src='/images/size.gif' alt='' /></div>

<p>
Screen-sizes alone are poor indicators of the raw picture size unless we are comparing television sets that have the same dimensions.  So, in order to compare these apples and oranges, you need the idea of a scalar.  A scalar can be used to bridge the gap between comparing the wide screen TVs with the televisions many of us are used to.  In the previous example, our scalar would be 1.25 or %12.5 since you need a 4by3 TV that is %12.5 bigger than a wide screen TV in order to display the exact same picture size.
</p>

<p>When displaying  a 4x3 image in a wide screen TV, the same scaling takes place, but now it is the 4by3 image that is being scaled down to fit inside of the 16x9 aspect ratio of the wide screen TV.  This results in the vertical letter boxing depicted below.
</p>

<div align="center"><img src='/images/wide.gif' alt='' /></div>

<p>So if I upgrade to a wide screen TV, I surely don&#8217;t want to view a picture broadcast in a 4x3 ratio in a size that is physically smaller than the image I would have seen in my &#8220;old-fashioned&#8221; television.  Therefore, what size wide screen TV do you need to ensure that the 4x3 images are at least as big as they were on your old set?
</p>

<div align="center"><img src='/images/aspectratio.gif' alt='Tv Ascpect Ratios' /></div>

<p>
1) When normalized with the 16x9 ratio, the 4x3 ratio becomes 12x9.
<br />
2) Using the good old Pythagorean theorem, we can find a hypotenuse of ratio 15 for the 12x9 (4x3) set, and a ratio of 18.358 for the 16x9 set.
<br />
3) Dividing 18.358 by 15 results in a <b>scalar of about %122 or 1.22</b>
<br />
<b>4) To find the minimum size wide screen TV you would need in order to match the raw picture size of your 4x3 TV, just multiply the size of your 4x3 TV by 1.22.</b>
<br /><br />
For example, if you currently have a 27 inch television, you would need a wide screen TV that is at least 27 X 1.22 = 33 inches in order to prevent having a smaller image on your new TV set.
</p>

<p>I hope you find this scalar useful when shopping for your new television/monitor so that you don&#8217;t end up with a smaller image than what you had!
</p>
]]></content:encoded>
			<wfw:commentRss>http://steep.blogsome.com/2007/03/09/preserving-actual-size-when-displaying-4x3-aspect-ratios-on-a-16x9-tvmonitor/feed/</wfw:commentRss>
	</item>
		<item>
		<title>Creating a servlet with a self-contained web server</title>
		<link>http://steep.blogsome.com/2006/10/25/creating-a-servlet-with-a-self-contained-web-server/</link>
		<comments>http://steep.blogsome.com/2006/10/25/creating-a-servlet-with-a-self-contained-web-server/#comments</comments>
		<pubDate>Wed, 25 Oct 2006 18:51:42 +0000</pubDate>
		<dc:creator>Hayden</dc:creator>
		
	<category>Java</category>
	<category>JEE</category>
		<guid>http://steep.blogsome.com/2006/10/25/creating-a-servlet-with-a-self-contained-web-server/</guid>
		<description><![CDATA[<p>For those of us who haven&#8217;t become guru&#8217;s at developing user interfaces in Swing/SWT/.NET or other technologies used to develop GUI&#8217;s, (in other words web developers),  there is an easy way to leverage your JEE skills to create stand alone programs.  Just create a web application as you normally would, but instead of [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>For those of us who haven&#8217;t become guru&#8217;s at developing user interfaces in Swing/SWT/.NET or other technologies used to develop GUI&#8217;s, (in other words web developers),  there is an easy way to leverage your JEE skills to create stand alone programs.  Just create a web application as you normally would, but instead of deploying your creation to an application server, deploy the application server to your application.</p>

<p><a href="http://jetty.mortbay.org/">Jetty WebServer</a> is one such application server that can be instantiated inside of a Java program and configured to handle web requests on a certain port.  When your application has completed its task, just stop the web server and your super-servlet will exit.</p>

<p>Here are the 4 basic steps to turning your server application development skills into client-application development skills.</p>

<h2>Step 1: Constructor</h2>

<p>The constructor instantiates an instance of the Jetty embeddable web server.
It adds itself as the servlet that should handle all incoming requests on port 8111.
It then starts the server.</p>

<pre><code>    private Server server;
    private Context context;

    public ExecServlet() {
        server = new Server(8111);
        context = new Context(server, "/", Context.SESSIONS);
        context.addServlet(new ServletHolder(this), "/*");
        try {
            server.start();
        }
        catch(Exception e) {
            e.printStackTrace();
        }
    }
</code></pre>

<h2>Step 2: Get/Post functionality</h2>

<p>In the methods below is where your servlet will do whatever it is you want it to do.
The programmer has the full power of the Java API and libraries at his disposal in
order to launch a process, process user input, write files, etc.</p>

<pre><code>    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        if(request.getPathInfo().equals("/DoSomething")) {
            //Do Something and return a response.
        }
    }

    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        if(request.getPathInfo().equals("/PostSomething")) {
            //Do Something and return a response.
        }
    }
</code></pre>

<h2>Step 3: Executing</h2>

<p>The servlet&#8217;s main() method instantiates an instance of itself and then
launches a browser to point to itself.  The code in the example is Windows
specific, but some conditionals and a check of system properties can make the
servlet operational in other operating systems.</p>

<pre><code>    public static void main(String[] args) {

      ExecServlet servlet = new ExecServlet();

        Runtime runtime = Runtime.getRuntime();
        String[] cmd = new String[4];
        cmd[0] = "cmd.exe";
        cmd[1] = "/C";
        cmd[2] = "start";
        cmd[3] = "http://localhost:8111/";
        try {
            runtime.exec(cmd);
        }
        catch (IOException e) {
            e.printStackTrace();
        }
    }
</code></pre>

<h2>Step 4: All Done</h2>

<p>Some process or user created condition will signal that the application has completed running, and now it
is time to close up shop and stop the web/application server.</p>

<pre><code>if (request.getPathInfo().equals("/finish")) {

    try {
      server.stop();
    }
    catch (Exception e) {
      e.printStackTrace();
    }
}
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://steep.blogsome.com/2006/10/25/creating-a-servlet-with-a-self-contained-web-server/feed/</wfw:commentRss>
	</item>
	</channel>
</rss>
