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

<channel>
	<title>Joel Hainley &#187; programming</title>
	<atom:link href="http://www.joelhainley.com/index.php/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joelhainley.com</link>
	<description>my thoughts and adventures</description>
	<lastBuildDate>Mon, 19 Dec 2011 19:34:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tagging and Hierarchy</title>
		<link>http://www.joelhainley.com/index.php/2010/08/05/tagging-and-hierarchy/</link>
		<comments>http://www.joelhainley.com/index.php/2010/08/05/tagging-and-hierarchy/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 17:49:29 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[hierarchy]]></category>
		<category><![CDATA[set theory]]></category>
		<category><![CDATA[tagging]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=332</guid>
		<description><![CDATA[I was considering ways of generating trees based upon tags and realized that there&#8217;s probably two ways to go about generating them. What brought me up short and made me think about writing this down was the following thought :  &#8221;when considering the hierarchical implications of tagging what we&#8217;re really doing when we tag something [...]]]></description>
			<content:encoded><![CDATA[<p>I was considering ways of generating trees based upon tags and realized that there&#8217;s probably two ways to go about generating them. What brought me up short and made me think about writing this down was the following thought :  &#8221;when considering the hierarchical implications of tagging what we&#8217;re really doing when we tag something is indicating it&#8217;s ancestry&#8221;. I&#8217;m not sure this is really a new thought but it does lead to some interesting thoughts.</p>
<ol>
<li>We don&#8217;t generally consider tagging to be a hierarchical activity, but what would happen if we just tried some different models for constructing hierarchies from tagging. A perusal through set theory might yield some interesting thoughts on this idea.</li>
<li>The whole concept of tagging is that we can add an ever increasing number of tags to an item to allow us to describe at some &#8220;meta&#8221; level what that item means to us. It&#8217;s your basic set theory sort of thing, I&#8217;ll add an item to this group and this group and this group. From a hierarchical perspective you could say that you are assigning a large number of parents to a particular group, and this seems goofy when you first consider it. This is probably due to connotations that ancestry brings up in our minds. Our DNA is determined solely by our ancestry. Consider a virus though, it can pick DNA up from a bunch of different sources and not just from it&#8217;s ancestors. I think I&#8217;m digressing.</li>
<li>My initial idea of implementing a hierarchy was to simply take the tags and show them as children of an item, and to then do some funny business to show things farther down in the hierarchy with some algorithm to avoid duplicates. When I considered the point in item #1 above I realized that perhaps showing ancestry &#8220;downstream&#8221; instead of &#8220;upstream&#8221; ( that is, as branches/leafs of the subtree under a particular item ) might have some interesting implications.</li>
</ol>
<p>I&#8217;m not sure there&#8217;s anything of value here, but it&#8217;s been interesting thinking about it..more later&#8230;maybe.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/08/05/tagging-and-hierarchy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>11-05 Challenge : Weekly status update for 2010-06-05</title>
		<link>http://www.joelhainley.com/index.php/2010/06/08/11-05-challenge-weekly-status-update-for-2010-06-05/</link>
		<comments>http://www.joelhainley.com/index.php/2010/06/08/11-05-challenge-weekly-status-update-for-2010-06-05/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 23:57:09 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[11-05 Challenge]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=296</guid>
		<description><![CDATA[Mike challenged me to a contest, hopefully this one goes better than the last one.
The challenge : write a web-based application and release it to the world on or before November 5, whoever generates the most revenue between November 5 and January 5 wins. The only other requirement is a weekly development blog posting detailing [...]]]></description>
			<content:encoded><![CDATA[<p>Mike challenged me to a contest, hopefully this one goes better than the last one.</p>
<p>The challenge : write a web-based application and release it to the world on or before November 5, whoever generates the most revenue between November 5 and January 5 wins. The only other requirement is a weekly development blog posting detailing status and the work on the agenda for the coming week.</p>
<p>The stakes : I think it&#8217;s either hot wings at Hooters or Wing Stop and maybe a case of Mountain Dew or Jolt&#8230;can you even buy Jolt anymore?</p>
<p>My project : ClikClock a time tracking program. I really want to do a good, solid, well thought out time tracking program because the few I&#8217;ve used drive me nuts. Everyone I talk to hates the applications that they are forced to use at work. So I&#8217;m going to give it a shot. See if I can make something that&#8217;s powerful and easy to use.</p>
<p>Update : I have had several false starts on ClikCLock in the past but I want to get this idea out of my system, because I&#8217;ve had thoughts about doing it for so long. I have written a couple of partial implementations and was reasonably happy with how things were turning out. However some business reasons ultimately forced a rewrite on a different technology platform. On May 1 I opened up an editor and started the current implementation of ClikClock. Since then I&#8217;ve written my own MVC framework and have integrated Doctrine and Smarty to create a pretty nice framework to do development in. I had to build a lot of stuff in the beginning to get things working that I wouldn&#8217;t have had to build if I had used one of the existing frameworks but I had a desire to build the framework and quite frankly it only took between 4-6 hours to build out the MVC framework and It&#8217;s WICKED fast.</p>
<p>I have also decided to use git for this project so I&#8217;ve been learning that as I go along. So far I like it but I haven&#8217;t had to do anything too crazy with it yet.</p>
<p>Tasks for the week :</p>
<ul>
<li>New Account Setup wizard</li>
<li>Account Administration screens</li>
<li>Build out the Account Configuration system</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/06/08/11-05-challenge-weekly-status-update-for-2010-06-05/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eating my own dogfood</title>
		<link>http://www.joelhainley.com/index.php/2009/08/17/eating-my-own-dogfood/</link>
		<comments>http://www.joelhainley.com/index.php/2009/08/17/eating-my-own-dogfood/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 23:12:10 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[uISV]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=163</guid>
		<description><![CDATA[Work on Clik Clock is continuing at a rapid pace, there is still a lot of work to do but this weekend saw a major milestone reached. I am now able to enter/edit data using the UI that I have been designing for the Time Entry module. The other modules are all still being edited [...]]]></description>
			<content:encoded><![CDATA[<p>Work on Clik Clock is continuing at a rapid pace, there is still a lot of work to do but this weekend saw a major milestone reached. I am now able to enter/edit data using the UI that I have been designing for the Time Entry module. The other modules are all still being edited with the development UI but it&#8217;s getting closer. There&#8217;s something magical when the code you&#8217;ve been working on suddenly starts doing some small piece of what you&#8217;ve been envisioning. When it does enough that it can now support you in your efforts and you are able to &#8220;eat your own dogfood&#8221; it&#8217;s like it has taken it&#8217;s first breath and is now starting to take on a life of it&#8217;s own. It&#8217;s really a special time, at least for me.</p>
<p>Paul Graham ( the y combinator guy ) stated in the book Founders At Work that he wished they had setup an online store and sold SOMETHING so they would have had better insight into their customer experience. I can definitely see the value in this as I am more likely to overlook the bumps and bruises of something when I have my engineering hat on than when I have my user hat on. You get annoyed with things that you might not as a developer, watching fancy animations over and over again because they make the screen transitions cool comes to mind as something a developer might like but a user is going to eventually say &#8220;just get on with it.&#8221; I know powerpoint does a boatload of wipes and dissolves but I rarely see more than the default setting unless I&#8217;m watching the first handful of powerpoint presentations the person has made.</p>
<p>Anyways, I&#8217;m eating my own dogfood now and it tastes pretty damned good.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/08/17/eating-my-own-dogfood/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Partial Classes and NUnit</title>
		<link>http://www.joelhainley.com/index.php/2009/04/13/c-partial-classes-and-nunit/</link>
		<comments>http://www.joelhainley.com/index.php/2009/04/13/c-partial-classes-and-nunit/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 05:30:03 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[nunit]]></category>
		<category><![CDATA[partial classes]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=136</guid>
		<description><![CDATA[Shad, a fellow developer and good friend, and I were hiking a great new loop I found in Mt. Diablo State Park the other day and after solving the rest of the world&#8217;s problems we eventually came around to talking about things that were driving us nuts in our current projects. We both had recently [...]]]></description>
			<content:encoded><![CDATA[<p>Shad, a fellow developer and good friend, and I were hiking a great new loop I found in Mt. Diablo State Park the other day and after solving the rest of the world&#8217;s problems we eventually came around to talking about things that were driving us nuts in our current projects. We both had recently found ourselves with code that was initially a quick and dirty library with a &#8220;Button 1&#8243; interface. ( You know the type, programmer&#8217;s make them. They have a single command button on them and you click them and then they do stuff..and never notify you when they are done, and don&#8217;t resize and a host of other things that a normal UI should have ). These &#8220;Button 1&#8243; quick and dirty apps have a nasty habit of turning themselves into indispensible tools for production/operations stuff.</p>
<p>The big problem we were both having was that while the apps were decent enough for their initial use we were being asked to extend them and both of us wanted to do some refactoring of the application before we released them into the wild. The best approach for this sort of thing is to develop unit tests so that, once refactored, we could be sure that we hadn&#8217;t broken anything important.</p>
<p>The biggest problem with dropping unit testing into an application after the fact is that sometimes you run into problems where you have to refactor just to get the unit tests access to all of the routines that you want to test. This isn&#8217;t an ideal situation, as you quickly end up wondering if you are breaking things just trying to get some unit tests built that are supposed to ensure you aren&#8217;t breaking anything. So you start wondering if instead of refactoring if you simply make functions that wrap your private functions and expose the behaviour might be the answer, pretty soon you have stuff everywhere and you wonder which is your testing code and which is your unit testing code to make all of this possible. Madness.</p>
<p>As we dropped off of the fire trail back into a heavily wooded area with a nice creek, it came up in conversation that perhaps partial classes were the way to go. If you haven&#8217;t used c# partial classes, you will. You can write class code in multiple files and yet at compile time it is assembled into a single logical unit. Several days later I had some free time and was able to verify that this would indeed work, I could drop all of my unit testing code into a single file that would provide all of the unit testing logic and wouldn&#8217;t muddy up the existing class. Furthermore, with a couple conditional complilation statements I could get rid of all of the unit testing code from the final release of the new library.</p>
<p>This is obviously not the approach you want to take if you can avoid it. It is arguable that you do not want your classes invaded in such a way for the purposes of unit testing. This is something you can work around if you use unit testing from the beginning, but what if you inherit a project and it doesn&#8217;t have any unit test capabilities built into it? What if the way that the classes are structured make unit testing pieces of the application difficult? Do you just plow forward and hope for the best? I hope not, and hopefully this stop gap measure to get unit tests built into the classes so that you can test existing functionality is the way to go. With these &#8220;nunit partials&#8221; in place you should be able to then start refactoring the rest of the application to be a little bit better structured for unit tests without having to risk dropping anything.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/04/13/c-partial-classes-and-nunit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Example of Proxying Binary Data With ASP.NET</title>
		<link>http://www.joelhainley.com/index.php/2009/02/28/example-of-proxying-binary-responses-with-aspnet/</link>
		<comments>http://www.joelhainley.com/index.php/2009/02/28/example-of-proxying-binary-responses-with-aspnet/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 03:29:31 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[.NET C# Proxying Binary Responses]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=129</guid>
		<description><![CDATA[Recently I was working on a project and needed to proxy a request to a website that was returning a binary file.  I ran into some problems with my first pass at a solution. I believe the problem was a consequence of proxying binary data without getting at the underlying streams. I&#8217;m not sure how [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was working on a project and needed to proxy a request to a website that was returning a binary file.  I ran into some problems with my first pass at a solution. I believe the problem was a consequence of proxying binary data without getting at the underlying streams. I&#8217;m not sure how often I&#8217;ll need to do this, but I thought it might be useful to post here for others to know about in case they ran into the same problem I did. So here&#8217;s the code that worked for me, hopefully it&#8217;ll work for you too.</p>
<hr/>
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(&#8221;http://to.some.binary.data&#8221;);<br />
req.Timeout = &#8220;blah&#8221;;<br />
req.Method = &#8220;GET&#8221;;</p>
<p>HttpWebResponse resp = (HttpWebResponse)req.GetResponse();<br />
Stream reader = resp.GetResponseStream();<br />
// you might want to set your responses content type here<br />
System.IO.Stream r = Response.OutputStream;</p>
<p>int Length = 256;<br />
Byte [] buffer = new Byte[Length];</p>
<p>int bytesRead = reader.Read(buffer, 0, Length);<br />
while(bytesRead &gt; 0){<br />
r.Write(buffer, 0, bytesRead);<br />
bytesRead = reader.Read(buffer, 0, Length);<br />
}</p>
<hr />
Hope that helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/02/28/example-of-proxying-binary-responses-with-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A quick note about .NET Web Services, Adobe Flex and Namespaces</title>
		<link>http://www.joelhainley.com/index.php/2008/11/01/a-quick-note-about-net-web-services-adobe-flex-and-namespaces/</link>
		<comments>http://www.joelhainley.com/index.php/2008/11/01/a-quick-note-about-net-web-services-adobe-flex-and-namespaces/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 18:52:31 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[.NET c# webservices web services flex]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=95</guid>
		<description><![CDATA[I was building out some .NET based web services for a Flex project I&#8217;ve been working on and bumped up against something that gave me a bit of trouble. When you create a .NET Web Service there is a namespace attribute associated with the service. Here&#8217;s an example (in c#) :
namespace HelloWebService
{
[WebService(Namespace = "http://www.examplenamespace.com/")]
[WebServiceBinding(ConformsTo = [...]]]></description>
			<content:encoded><![CDATA[<p>I was building out some .NET based web services for a Flex project I&#8217;ve been working on and bumped up against something that gave me a bit of trouble. When you create a .NET Web Service there is a namespace attribute associated with the service. Here&#8217;s an example (in c#) :</p>
<blockquote><p>namespace HelloWebService<br />
{<br />
[WebService(Namespace = "http://www.examplenamespace.com/")]<br />
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
[ToolboxItem(false)]</p>
<p>public class Service1 : System.Web.Services.WebService<br />
{</p>
<p>// implementation &#8230;</p>
<p>}</p></blockquote>
<p>This value is required by .NET for a web service, or at the very least .NET gets VERY upset if this value is not set.</p>
<p>You will then need to let Flex know about this namespace in order to access the results. To do this you simply add the following lines to Flex:</p>
<blockquote><p>private namespace lh = &#8220;http://www.examplenamespace.com/&#8221;;<br />
use namespace lh;</p></blockquote>
<p>Not much to it, but it can be a bit of a pain when you&#8217;re not aware of this. Flex doesn&#8217;t complain, it just gives you empty values when you try to access the values.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2008/11/01/a-quick-note-about-net-web-services-adobe-flex-and-namespaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPUnit and global variables</title>
		<link>http://www.joelhainley.com/index.php/2008/04/30/phpunit-and-global-variables/</link>
		<comments>http://www.joelhainley.com/index.php/2008/04/30/phpunit-and-global-variables/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 19:43:56 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[global variables]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/index.php/2008/04/30/phpunit-and-global-variables/</guid>
		<description><![CDATA[The first time I did some work with PHPUnit I was writing out tests in preparation for some refactoring. So I put together a bunch of tests for my utility classes, and pure logic classes etc, database access classes, etc. So everything was trucking along wonderfully, things are falling into place and then I run [...]]]></description>
			<content:encoded><![CDATA[<p>The first time I did some work with PHPUnit I was writing out tests in preparation for some refactoring. So I put together a bunch of tests for my utility classes, and pure logic classes etc, database access classes, etc. So everything was trucking along wonderfully, things are falling into place and then I run a test that tests some database stuff.</p>
<p>The application was setup with a configuration file that defined all of the database connection information, this file is included by the database library providing a single set of database routines to be shared by the application. Pretty standard stuff here. Perhaps in a nod to the rails/java crowds it could have been put in a non-code file and read in by the application but as far as I&#8217;m concerned that&#8217;s just personal preference. At some point you&#8217;ve got to have some configuration information somewhere and this works as well as anything.</p>
<p>So now that you know how things were setup, we&#8217;re back to the PHPUnit test&#8230;it bombed, failed, crashed, whatever. After digging into it a bit I discovered that PHPUnit has a problem with munging the global namespace when it runs. Things that are global variables can&#8217;t be pulled down into local scope because they don&#8217;t exist there anymore. I did some reading and found numerous complaints about this in the PHPUnit bug system, all of them closed with &#8220;this issue resolved&#8221; when the issue most assuredly had not been solved. I even found a conversation where one of the developers stated that it was not a bug, that the user simply needed to modify their code to work with PHPUnit. Huh? Modify the architecture of your code to work with a testing framework?!?</p>
<p>I spent some time thinking about this and I think it could be said that he&#8217;s right, but for the wrong reasons. First off, if this is a technical limitation of PHP then just say so and let it go. If it&#8217;s an implementation problem with PHPUnit then say so and try to put together plans to fix it. However, I think in this particular instance the problems that I was experiencing with PHPUnit could indicate a larger problem in my application.</p>
<p>Here&#8217;s how..One of the things that I hated when I first started using PHP was having to pull things out of the global namespace into the local namespace to use them. When PHP5 came out and the object model finally had a good amount of maturity I moved to utilizing classes for most of my code and this allowed me to start using the $this operator for accessing a lot of variables that I needed to deal with. In fact, the only place I was really using globals was in my library routines. After thinking about this for a bit I realized that it was much more convenient to wrap all of the configuration data into Singleton then I&#8217;d have a single object that I could use to get all data instead of having to pull in everything I needed one variable at a time.</p>
<p>It was at that moment that I realized if I had a singleton that housed all of the configuration data I could instantiate it in all of the routines where I needed to access configuration data and it would avoid the problems that PHPUnit had with the global namespace. When I looked in the todo&#8217;s for the configuration file there was an item at the top &#8220;Maybe I should turn this into a singleton&#8221;&#8230;two birds with one stone? Ten minutes of work and I had everything setup and ran my tests and &#8220;bingo&#8221; everything worked.</p>
<p>So in the end, modifying the way that configuration information is disseminated throughout the system by using a singleton has been &#8220;the right thing&#8221;. I had some heartache over the responses from the PHPUnit developers about the &#8220;solution&#8221; to the problem their users were having mostly because the solution involved a lot of extra crap with addressing the global namespace in a particular way. Using a singleton ended up providing the needed functionality, didn&#8217;t do anything retarded with variable access, and ended up making the application much cleaner to work with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2008/04/30/phpunit-and-global-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Developer&#8217;s View Of Maintenance Work</title>
		<link>http://www.joelhainley.com/index.php/2008/03/17/one-developers-view-of-maintenance-work/</link>
		<comments>http://www.joelhainley.com/index.php/2008/03/17/one-developers-view-of-maintenance-work/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 16:32:34 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[maintenance]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/index.php/2008/03/17/one-developers-view-of-maintenance-work/</guid>
		<description><![CDATA[One of the things that you notice if you are around development/engineering teams enough is that there is normally the existing solution, and the &#8220;next iteration&#8221;. Much has been written about the &#8220;second system&#8221; phenomenon and all of the pitfalls and failures that have resulted by second system thinking. Today I just want to talk [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that you notice if you are around development/engineering teams enough is that there is normally the existing solution, and the &#8220;next iteration&#8221;. Much has been written about the &#8220;second system&#8221; phenomenon and all of the pitfalls and failures that have resulted by second system thinking. Today I just want to talk about the importance of maintenance work to the growth of a developer towards understanding the hard problems within their chosen problem domain.</p>
<p>It seems like maintenance programming is, according to some developers, the lowest form of development on the planet. If you&#8217;ve ever been on a team in the role of maintenance programmer you have probably noticed that it&#8217;s not considered &#8220;sexy&#8221; by most of the team. Everyone is glad that you&#8217;re the designated maintenance programmer because that means that they AREN&#8217;T. Everyone wants to be working on the second system where &#8220;things are cleaner&#8221;, &#8220;we&#8217;re using better technology&#8221;, etc.</p>
<p>I&#8217;ve never agreed with this mentality, and here&#8217;s a dirty little secret, I LIKE maintenance work. There are few things as challenging as debugging a problem in a system you haven&#8217;t designed and fixing the problem in such a way that you leave the code better than it was when you got there. Here&#8217;s another amazing benefit of maintenance development, you learn the system and you learn how other people think and approach problems. In a similar way that Rorschach and Perceptive Aptitude Tests work, code is a projective tests for the thought processes of the developer who wrote the code. The other amazing benefit of  supporting an existing application is that within a VERY SHORT amount of time supporting an existing application, a new developer is going to learn the system backwards and forwards. The developer will end up having a very deep understanding of the problems inherent in the existing design from a very realistic standpoint.</p>
<p>See new development is easy, you&#8217;re just trying to hit the 80% mark. If you&#8217;re in development you know what I&#8217;m referring to. &#8220;80% of the functionality is solved by 20% of the work.&#8221;. I&#8217;m willing to argue that the real work involved in a new application is done after the application is in production, that&#8217;s when you start to work on the last 20% of the application.</p>
<p>Maintenance work ( debugging production problems, adding new features, etc )  is when you start to solve the really hard problems that were not seen, or deferred, by the team creating the application.  You often have to be creative in how you quantify the problems you are seeing, and you have to be a bit of an artist in terms of how best to quickly and easily ascertain what the hell is going on. The great part though is that you start to see how the choices made during the implementation of the system impact your ability to respond to certain things. This is the reason that I think solution architects should be in the trenches writing code with everyone else. They need to understand the results of their decisions at a very fundamental level, and the only way to do that is to keep their head in the game.</p>
<p>The other great thing about doing maintenance development is how easy it is to measure your contributions to the team. It normally goes like this, Tuesday morning the big client calls, he has found a bug that needs to be resolved by Friday or else they are going to have to leave the team. Tuesday, just before lunch, a meeting is called, and bad pizza is ordered. You are brought into the meeting and asked how in the world this can be fixed before Friday. If you just built the application but haven&#8217;t spent time doing maintenance since it&#8217;s release, you&#8217;re going to have to look into the application and reacquaint yourself with how it works, and see what new things have been added since you last saw the code. However, if you&#8217;ve been doing the maintenance work you can speak with authority right there in that meeting about what it is going to take to deal with that issue, and with any luck it&#8217;s already something that you have thought needed to be dealt with and have an idea about the best approach to take. So you grab two extra cokes and the last box of pizza and go back to your desk and solve the problem, test it, get it through qa and into production.  A specific measurable result for your efforts, and something that others will remember.</p>
<p>Obviously I love to do maintenance work, I am VERY often called by clients to deal with legacy situations. I can&#8217;t count the number of times that I have had a client call up and tell me that the only person who knows anything about the application has left and &#8220;they have a huge bug and he&#8217;s trying to charge them $400 / hr to deal with it&#8221;, or they &#8220;have fired their consultant and are now left with a huge mess on their hands and could you help us&#8221;. I love this work, it&#8217;s real, it&#8217;s necessary and it&#8217;s often challenging and interesting.  If you need maintenance work done feel free to contact me, I&#8217;m always looking for chances to sharpen my debugging, and code-reading skills.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2008/03/17/one-developers-view-of-maintenance-work/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP Soap &#8211; A Simple PHP Web Service Example</title>
		<link>http://www.joelhainley.com/index.php/2008/03/03/php-soap-a-simple-php-web-service-example/</link>
		<comments>http://www.joelhainley.com/index.php/2008/03/03/php-soap-a-simple-php-web-service-example/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 18:50:14 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[php soap example]]></category>
		<category><![CDATA[php web services]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[soap client]]></category>
		<category><![CDATA[soap server]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/index.php/2008/03/03/php-soap-a-simple-php-web-service-example/</guid>
		<description><![CDATA[There&#8217;s no doubt that today web services are hot, all of the commercial platforms ( J2EE, .Net, etc ) have tools that make the development of web services very easy. There are also a bunch of tools that are out there that help people generate their WSDL&#8217;s and can generally ease all of the difficult [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s no doubt that today web services are hot, all of the commercial platforms ( J2EE, .Net, etc ) have tools that make the development of web services very easy. There are also a bunch of tools that are out there that help people generate their WSDL&#8217;s and can generally ease all of the difficult parts of developing web services. The great thing is that with the release of PHP 5 we now have tools that allow us to quickly develop web services in PHP. The great thing about this is that you can stub out api&#8217;s and start to have different solutions speak easily among themselves, share business logic to languages and technologies that are &#8220;not native&#8221;.</p>
<p>Within this article I&#8217;m just going to hit some highlights about creating your own web services using SOAP and PHP. I will also provide a URL to a web service that I have written for people to fiddle around with their first SOAP client. Please note that I&#8217;m not providing an exhaustive example of all of the details of wsdl&#8217;s/SOAP and the like, this is the SOAP equivalent of a &#8220;hello world&#8221; program, but with parameter passing included since most  &#8220;Hello Worlds&#8221; don&#8217;t have parameters passed into them.  We&#8217;re going to be building a little service that will support 2 operations, rot13 of a supplied string, and the mirroring(reversing) of a supplied string. Nothing terribly fancy, but certainly more interesting than &#8220;hello world&#8221; <img src='http://www.joelhainley.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>You can see the<a href="http://www.joelhainley.com/examples/soap/scramble.wsdl" > WSDL for this service here</a> . There isn&#8217;t much to note with the WSDL it is a simple service and I&#8217;m not trying to get too crazy here. So take a look at it and see if it makes sense, if not, try to compare it against the code samples below and see if you can determine how it all relates.</p>
<p>Now that we have the WSDL defined it&#8217;s time to build the SOAP server to support this WSDL. Here&#8217;s the full listing for the server :</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw2">function</span> getRot13<span class="br0">&#40;</span><span class="re0">$pInput</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
<span class="re0">$rot</span> = <a href="http://www.php.net/str_rot13" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.php.net');"><span class="kw3">str_rot13</span></a><span class="br0">&#40;</span><span class="re0">$pInput</span><span class="br0">&#41;</span>;return<span class="br0">&#40;</span><span class="re0">$rot</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="kw2">function</span> getMirror<span class="br0">&#40;</span><span class="re0">$pInput</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
<span class="re0">$mirror</span> = <a href="http://www.php.net/strrev" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.php.net');"><span class="kw3">strrev</span></a><span class="br0">&#40;</span><span class="re0">$pInput</span><span class="br0">&#41;</span>;</p>
<p><span class="kw1">return</span><span class="br0">&#40;</span><span class="re0">$mirror</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="co1">// turn off the wsdl cache</span><br />
<a href="http://www.php.net/ini_set" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.php.net');"><span class="kw3">ini_set</span></a><span class="br0">&#40;</span><span class="st0">&#8220;soap.wsdl_cache_enabled&#8221;</span>, <span class="st0">&#8220;0&#8243;</span><span class="br0">&#41;</span>;</p>
<p><span class="re0">$server</span> = <span class="kw2">new</span> SoapServer<span class="br0">&#40;</span><span class="st0">&#8220;scramble.wsdl&#8221;</span><span class="br0">&#41;</span>;</p>
<p><span class="re0">$server</span>-&amp;gt;addFunction<span class="br0">&#40;</span><span class="st0">&#8220;getRot13&#8243;</span><span class="br0">&#41;</span>;<br />
<span class="re0">$server</span>-&amp;gt;addFunction<span class="br0">&#40;</span><span class="st0">&#8220;getMirror&#8221;</span><span class="br0">&#41;</span>;</p>
<p><span class="re0">$server</span>-&amp;gt;handle<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</div>
<p>Pretty easy to understand, you&#8217;ll notice that we are just defining the functions at the top, then once we have created the soap server using the WSDL we simply associate our php functions with the functions defined in the WSDL by passing the function name to the addFunction message of the newly created SOAP server. Note that we have turned off the caching of the WSDL, this is something you&#8217;ll wanna do while you&#8217;re developing. When you don&#8217;t do this and make changes to your WSDL and they never seem to take, it can get frustrating <img src='http://www.joelhainley.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>Ok with the server out of the way let&#8217;s turn our attention to the client. Here&#8217;s the listing for a simple client :</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="co1">// turn off the WSDL cache</span><br />
<a href="http://www.php.net/ini_set" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.php.net');"><span class="kw3">ini_set</span></a><span class="br0">&#40;</span><span class="st0">&#8220;soap.wsdl_cache_enabled&#8221;</span>, <span class="st0">&#8220;0&#8243;</span><span class="br0">&#41;</span>;</p>
<p><span class="re0">$client</span> = <span class="kw2">new</span> SoapClient<span class="br0">&#40;</span><span class="st0">&#8220;http://www.joelhainley.com/examples/soap/scramble.wsdl&#8221;</span><span class="br0">&#41;</span>;</p>
<p><span class="re0">$origtext</span> = <span class="st0">&#8220;mississippi&#8221;</span>;</p>
<p><a href="http://www.php.net/print" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.php.net');"><span class="kw3">print</span></a><span class="br0">&#40;</span><span class="st0">&#8220;The original text : $origtext<br />
&#8220;</span><span class="br0">&#41;</span>;<br />
<span class="re0">$scramble</span> = <span class="re0">$client</span>-&amp;gt;getRot13<span class="br0">&#40;</span><span class="re0">$origtext</span><span class="br0">&#41;</span>;</p>
<p><a href="http://www.php.net/print" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.php.net');"><span class="kw3">print</span></a><span class="br0">&#40;</span><span class="st0">&#8220;The scrambled text : $scramble<br />
&#8220;</span><span class="br0">&#41;</span>;</p>
<p><span class="re0">$mirror</span> = <span class="re0">$client</span>-&amp;gt;getMirror<span class="br0">&#40;</span><span class="re0">$scramble</span><span class="br0">&#41;</span>;<br />
<a href="http://www.php.net/print" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.php.net');"><span class="kw3">print</span></a><span class="br0">&#40;</span><span class="st0">&#8220;The mirrored text : $mirror<br />
&#8220;</span><span class="br0">&#41;</span>;</div>
</div>
<p>I&#8217;m sure you could write a fancier example, but it gets the point across. First, You turn off the WSDL caching on your client as well as the server. Then you create a new soap client using the wsdl. Then you just start calling methods that you defined in the server. That&#8217;s about all there is to it.</p>
<p>Note, I&#8217;m going to keep the Soap Server referenced in this article up for you all to use. Please feel free to use it for testing your clients as you&#8217;re getting up and running. Eventually you&#8217;ll wanna start using your own servers for more interesting things though <img src='http://www.joelhainley.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2008/03/03/php-soap-a-simple-php-web-service-example/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Setting up Google&#8217;s ReflexUtil for debugging flex applications</title>
		<link>http://www.joelhainley.com/index.php/2008/02/20/setting-up-googles-reflexutil-for-debugging-flex-applications/</link>
		<comments>http://www.joelhainley.com/index.php/2008/02/20/setting-up-googles-reflexutil-for-debugging-flex-applications/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 18:58:57 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[flex development]]></category>
		<category><![CDATA[flex2]]></category>
		<category><![CDATA[flex3]]></category>
		<category><![CDATA[reflexutil]]></category>
		<category><![CDATA[UI tweaking]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/index.php/2008/02/20/setting-up-googles-reflexutil-for-debugging-flex-applications/</guid>
		<description><![CDATA[Last time I talked about setting up logging for your Flex applications using the debug version of the flash player and configuring it to write to a text file. This is can be useful for debugging, but it&#8217;s not always the most efficient route for quickly getting to the bottom of a problem within Flex. [...]]]></description>
			<content:encoded><![CDATA[<p>Last time I talked about setting up logging for your Flex applications using the debug version of the flash player and configuring it to write to a text file. This is can be useful for debugging, but it&#8217;s not always the most efficient route for quickly getting to the bottom of a problem within Flex. Thankfully there are a few other useful tools that we can utilize to help us in our debugging. One of these tools is a project put out by Google called ReflexUtil.</p>
<p>For this article I&#8217;m gonna be using Adobe Flex Builder 2 to describe the process for  setting up ReflexUtil in your project. It should be relatively obvious how to add this to your project if you&#8217;re building everything using the flex sdk for development, if not let me know and I&#8217;ll post a note here about setting it up.</p>
<p>The process for setting this up is really well documented on the <a href="http://code.google.com/p/reflexutil/" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');">ReflexUtil website</a> but if you haven&#8217;t used third party libraries in your Flex projects before you might spin your wheels for a few minutes. So here&#8217;s a step by step for getting things setup :</p>
<ol>
<li><a href="http://code.google.com/p/reflexutil/downloads/list" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');">Download the appropriate version of ReflexUtil library from google code</a> &#8211; there are versions for Flex 2 and Flex 3 so make sure you get the latest version for whichever version of Flex you are running .</li>
<li>Unzip the file and place it in your libraries folder &#8211; I have a master directory for all of my libraries, 3rd party and custom libraries, and I drop them into subfolders of this folder so that I have everything in one place.</li>
<li>Open up your project in Flex Builder and add the library to your project. If you&#8217;ve not done this before you just go to Project-&gt;Properties in Flex Builder then click on &#8220;Flex Build Path&#8221; on the left, once there you click on the Library Path tab on the right hand side. Then click &#8220;Add SWC&#8221; then browse to the location of the file for version I have installed in the project it is called ReflexUtil2.swc . Once you select the project a bunch of options will be availble for how to link the library to your project etc. You can get more details on things over at the Adobe documentation page that describes <a href="http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&amp;file=projects_035_30.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/livedocs.adobe.com');">how to use SWC files in your Flex project</a></li>
<li>Now open up the application&#8217;s MXML file</li>
<li>Add <strong>&lt;reflexutil:ReflexUtil /&gt;</strong> tag within the application tags. ( in XML speak : make it a child node of the application element )</li>
<li>Add the ReflexUtil namespace to the application tag by adding the following : <strong>xmlns:reflexutil=&#8221;net.kandov.reflexutil.*&#8221;</strong></li>
<li>When you run your application right click on a control and you will see some new options in the pop-up menu. Links to the ReflexUtil homepage, Open Reflex util and an option to inspect the control that has focus, and perhaps options to inspect a few more controls.</li>
<li>Click on one of the Inspect options. This will bring up a dialog bog that allows you to drill down through what could be thought of as the Flex DOM and actually modify things at runtime, layouts, values, etc. It&#8217;s pretty impressive.</li>
</ol>
<p>That&#8217;s about it, there&#8217;s a lot of things you can probably think of that this might be useful for in your own projects. The ability to get in and muck with the UI in this way is really convenient, instead of constantly incrementing layout parameters, then recompiling, checking, then tweaking again. You can now  just pop up your ui and make adjustments until you have it the way you like, then just make a note of your settings.  It might be kinda useful to modify ReflexUtil to have the ability to write out all parameters to the debug file so that you wouldn&#8217;t have to write things down, perhaps the developers will do this.</p>
<p>The only other thing that really comes to mind at the moment is that you probably would want to remove ReflexUtil from your project when you put your Flex application into production. The ability of users to muck with things could be catastrophic <img src='http://www.joelhainley.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2008/02/20/setting-up-googles-reflexutil-for-debugging-flex-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to configure Flex for writing debug information to a file.</title>
		<link>http://www.joelhainley.com/index.php/2008/02/12/how-to-configure-flex-for-writing-debug-information-to-a-file/</link>
		<comments>http://www.joelhainley.com/index.php/2008/02/12/how-to-configure-flex-for-writing-debug-information-to-a-file/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 02:57:33 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[adobe flash]]></category>
		<category><![CDATA[adobe flex]]></category>
		<category><![CDATA[builder]]></category>
		<category><![CDATA[debug file]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex debugging]]></category>
		<category><![CDATA[flex development]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[to]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/index.php/2008/02/12/how-to-configure-flex-for-writing-debug-information-to-a-file/</guid>
		<description><![CDATA[So you&#8217;re bumping along doing some work in Adobe Flex using the flex sdk and you need to get some debug information about what&#8217;s going on in one of your applications. You know that the guys using Adobe&#8217;s Flex Builder IDE have source level debugging but you don&#8217;t have the Flex Builder or, for whatever [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;re bumping along doing some work in Adobe Flex using the flex sdk and you need to get some debug information about what&#8217;s going on in one of your applications. You know that the guys using Adobe&#8217;s Flex Builder IDE have source level debugging but you don&#8217;t have the Flex Builder or, for whatever reason, don&#8217;t want to use it.</p>
<p>Here&#8217;s a quick how-to for setting up flex debugging to an output file, plus a link to a very simple test application that is known to work so that you can ensure that you have debugging setup properly on your test machine before you start tearing your hair out.</p>
<ol>
<li> You need to ensure that you have the debug version of the Flash Player installed. You can find instructions on <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19245&amp;sliceId=1" onclick="javascript:pageTracker._trackPageview('/outbound/article/kb.adobe.com');">installing the Flash Debug Player here</a>. The instructions appear to be a bit dated, in the version of the SDK that I have on my development box there is no &#8220;uninstall_flash_player.exe&#8221;. I simply ran the &#8220;Install Flash Player 9.exe&#8221; and then after rebooting my system seemed to work fine. Notice that the link above also allows you to validate that you have successfully installed the debug player.</li>
<li>To enable writing to a text file you will need to create a mm.cfg file on your system placing it in the appropriate directory for your operating system.
<ul>
<li>OSX : /Library/Application Support/Macromedia/mm.cfg</li>
<li>Windows : C:\Documents and Settings\&lt;username&gt;\mm.cfg</li>
<li>Linux : /home/&lt;username&gt;/mm.cfg</li>
</ul>
</li>
<li>Now open the file you&#8217;ve just created and add the the following 2 lines to the file :
<ul>
<li>ErrorReportingEnable=1</li>
<li>TraceOutputFileEnable=1</li>
</ul>
</li>
<li>That&#8217;s about all there is to it, although I think I ended up rebooting before it worked properly. Now go to a <a href="http://www.joelhainley.com/fdt.html"title="Flex Debug Tester"  >simple Flex test app</a> I threw together to generate output data to the file.</li>
<li>Click on the button labeled &#8220;Click Me&#8221;.</li>
<li>If you have been successful in setting up the debugging you should see output written to a file appropriate for your operating system :
<ul>
<li>OSX : /Users/&lt;username&gt;/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt</li>
<li>Windows : C:\Document and Settings\&lt;username&gt;\Application Data\Macromedia\Flash Player\Logs\flashlog.txt</li>
<li>Linux : /home/&lt;username&gt;/Macromedia/Flash_Player/Logs/flashlog.txt</li>
</ul>
</li>
<li>Next time we&#8217;ll get into some more advanced debugging tools available.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2008/02/12/how-to-configure-flex-for-writing-debug-information-to-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Development</title>
		<link>http://www.joelhainley.com/index.php/2007/11/06/flex-development/</link>
		<comments>http://www.joelhainley.com/index.php/2007/11/06/flex-development/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 10:55:55 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=48</guid>
		<description><![CDATA[I&#8217;ve been reading through a bunch of books on Flex development. It&#8217;s pretty interesting stuff. It is probably most easily understood as a programmatic interface into Flash with a bunch of widgets such that you can develop very sophisticated applications that talk asynchronously to a backend server. The upside of this being that wherever you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading through a bunch of books on Flex development. It&#8217;s pretty interesting stuff. It is probably most easily understood as a programmatic interface into Flash with a bunch of widgets such that you can develop very sophisticated applications that talk asynchronously to a backend server. The upside of this being that wherever you can get a Flash player installed you can have your application and it works the same everywhere, something that can&#8217;t be said for AJAX.</p>
<p>I wrote up a quick app yesterday afternoon to look at a customized RSS feed for this blog and allow a user to navigate through the results. It&#8217;s just something I was fiddling with, it&#8217;s not complete and probably never will be. I&#8217;m going to investigate a different approach to some things I was doing to see if it makes things cleaner. <a href="http://www.joelhainley.com/George.swf"title="George : The Flex Blog Reader" target="_blank"  >Check it out here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2007/11/06/flex-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Web Console ( of sorts )</title>
		<link>http://www.joelhainley.com/index.php/2007/03/22/a-web-console-of-sorts/</link>
		<comments>http://www.joelhainley.com/index.php/2007/03/22/a-web-console-of-sorts/#comments</comments>
		<pubDate>Fri, 23 Mar 2007 00:34:25 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/wordpress/?p=27</guid>
		<description><![CDATA[I&#8217;ve been reading Paul Graham&#8217;s book on ANSI Common Lisp, and Gleick&#8217;s Chaos, and probably a Remo Williams adventure or two ( gotta have the mindless fiction, it&#8217;s like TV but, Remo is entertaining ). At some point, while reading either Graham&#8217;s book, or essays on his website, i realized that i could implement a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading Paul Graham&#8217;s book on ANSI Common Lisp, and Gleick&#8217;s Chaos, and probably a Remo Williams adventure or two ( gotta have the mindless fiction, it&#8217;s like TV but, Remo is entertaining ). At some point, while reading either Graham&#8217;s book, or essays on his website, i realized that i could implement a &#8220;top level&#8221; ( of a sort ) in PHP. It wouldn&#8217;t be as powerful , but it would allow me to interact with my system in a way that would normally require lots of screwing around otherwise.</p>
<p>So I sat down and coded it up before work one morning and then a few days later I updated the console to utilize a bit of AJAX to support history browsing. It has worked terribly well, i&#8217;ve been pretty impressed with what i&#8217;ve been able to pull off with it.  Building new classes has gotten easier, because i can build out a test harness quickly and just keep executing it while i&#8217;m developing, but the more impressive bit is when I have a bug in the system, i&#8217;m able to test specific pieces in the system quickly without having to open up a bunch of different files.</p>
<p>I realize that this is not the behaviour that a top-level provides, as a top level allows you to drop new classes/methods into the system and they stay there until the system is rebooted or you get rid of them. However, i&#8217;ve sorted through this by using a text area for the input, giving me the ability to write large bodies of script. This allows me to write classes/methods/etc and execute it all at once, so while it is not exactly the same, the spirit is there. I suppose it would be relatively straightforward to add in some stuff to actually write out these things to files and then have them hang around indefinitely, but there&#8217;s some issues with the implementation that make it a non-trivial problem, and i don&#8217;t know that there&#8217;d be much benefit.</p>
<p>The system is almost completely stabilized from the massive rewrite of pretty much everything. The resource management system is almost there, a few things to finish as part of the cleanup of the database during the move to Postgres.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2007/03/22/a-web-console-of-sorts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>picprep bug fix and other stuff.</title>
		<link>http://www.joelhainley.com/index.php/2007/01/15/picprep-bug-fix-and-other-stuff/</link>
		<comments>http://www.joelhainley.com/index.php/2007/01/15/picprep-bug-fix-and-other-stuff/#comments</comments>
		<pubDate>Mon, 15 Jan 2007 19:09:26 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[picprep]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/wordpress/?p=21</guid>
		<description><![CDATA[I was doing some work for a client this weekend and needed to resize a photo. I dusted off the picprep source, built the app, and did what I needed to do, but i noticed an odd problem in the way it worked. So i earmarked that for further investigation when my work was done. [...]]]></description>
			<content:encoded><![CDATA[<p>I was doing some work for a client this weekend and needed to resize a photo. I dusted off the picprep source, built the app, and did what I needed to do, but i noticed an odd problem in the way it worked. So i earmarked that for further investigation when my work was done. Sure enough, when I got some time to look at it in detail there was a bug in picprep, and it was a kinda major bug.</p>
<p>I know how it made it this long without being discovered, the bug only shows up when you are working against single files, and not doing appending of characters to the output filenames, but i should have caught this a lot sooner. I fixed the bug, and then started looking through the rest of the source and found some interesting things in my notes about this project. I had mentioned that I would port this to linux at some point. However when i looked at the source, it had been ported to linux ( i think i did this one morning when shad needed it, and forgot to package it up for general release ) So the application now runs natively on windows/osx/linux, pretty cool on that deal.</p>
<p>I thought of a couple of features that I could use in this product so perhaps when time allows i&#8217;ll add them they include :</p>
<ul>
<li>rotate process : the ability to rotate images would be nice</li>
<li>collage process : the ability to point picprep at a bunch of image files and have it turn them into a single large file would be nice. this would include the ability to generate an image map coordinates file back to the original pictures such that you could drop the resulting image and coords onto a webpage and have a interface into the pictures</li>
<li>command files : it would be convenient to be able to save a set of operations into a text file such that if you were always wanting to process files in a particular manner you could just drop them into some directory and then say &#8220;run these commands on this directory&#8221;. The thing about picprep is that its processes are discrete operations such that if you want to rotate, add border and then create a collage that is three seperate commands that must be issued to picprep in series, having the ability to create command files for multi-step operations would obviate the need of ways to chain the operations together internally.</li>
<li>border process : i haven&#8217;t looked into this but i&#8217;ve seen a bunch of images on the web where people add a little white border around their photos, I guess to give it the polaroid instamatic touch. It might be kinda nice to be able to say &#8220;add border to these photos&#8221;</li>
</ul>
<p>I&#8217;ll probably spend some time on this when I need a little bit of sanity in my life. The myndkryme website has been down for a while not sure why, haven&#8217;t talked to the ISP about it yet. So if you want new builds of picprep ask me directly here, and i&#8217;ll get them posted somewhere where you can download them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2007/01/15/picprep-bug-fix-and-other-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Knuth!!!</title>
		<link>http://www.joelhainley.com/index.php/2007/01/12/knuth/</link>
		<comments>http://www.joelhainley.com/index.php/2007/01/12/knuth/#comments</comments>
		<pubDate>Fri, 12 Jan 2007 20:22:08 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[knuth]]></category>
		<category><![CDATA[lectures]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/wordpress/?p=19</guid>
		<description><![CDATA[Went to Stanford in December to watch a Knuth lecture. It was interesting, he kept the heavy math bits out of the lecture so i could understand it. ( well not so I myself could understand it, but as a consequence of him keeping the math bits out, i was able to understand it. )
I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Went to Stanford in December to watch a Knuth lecture. It was interesting, he kept the heavy math bits out of the lecture so i could understand it. ( well not so I myself could understand it, but as a consequence of him keeping the math bits out, i was able to understand it. )</p>
<p>I&#8217;ve been slowly reading through his MMIX paper, it has been interesting, although i have had to take detours to understand some things that he takes for granted.</p>
<p>Shad sent me this today :</p>
<p><img align="middle" alt="KNUTH!!!" title="KNUTH!!!" src="http://www.joelhainley.com/images/knuth_homeboy.jpg" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2007/01/12/knuth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proof of my lack of brilliance</title>
		<link>http://www.joelhainley.com/index.php/2006/10/27/proof-of-my-lack-of-brilliance/</link>
		<comments>http://www.joelhainley.com/index.php/2006/10/27/proof-of-my-lack-of-brilliance/#comments</comments>
		<pubDate>Fri, 27 Oct 2006 20:16:01 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[scheme]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/wordpress/?p=17</guid>
		<description><![CDATA[I&#8217;ve been reading through Structure And Interpretation Of Computer Programs in the evenings, and have started going through the exercises as well. I figure it&#8217;ll help bring home the finer points of the text, and it&#8217;s sorta like little puzzles to work on, plus i&#8217;m learning scheme, and since I have a well documented affection [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading through <a href="http://www.amazon.com/Structure-Interpretation-Computer-Programs-Engineering/dp/0262011530/sr=8-1/qid=1161978141/ref=pd_bbs_1/104-2277028-0811100?ie=UTF8&#038;s=books"title="Structure And Interpretation Of Computer Programs"  onclick="javascript:pageTracker._trackPageview('/outbound/article/www.amazon.com');">Structure And Interpretation Of Computer Programs</a> in the evenings, and have started going through the exercises as well. I figure it&#8217;ll help bring home the finer points of the text, and it&#8217;s sorta like little puzzles to work on, plus i&#8217;m learning scheme, and since I have a well documented affection for lisp it works out well.</p>
<p>One of the first exercises that they recommended was given three numbers square the sums of the two greater numbers. Pretty straight-forward right? Yea..pretty much. I implemented the usual if (and (> a b) (> b c)) then A is the biggest number. Pretty easy to find the largest and smallest numbers with that approach. However, start coding up for the middle number and you end up with this mess of unreadable garbage, well not unreadable but you end up wishing there was something elegant you could like the above statements.</p>
<p>After a bit of thought I hit upon it it goes something like this (- (+ a b c)  (+ (get-max-num(a b c)) (get-min-num(a b c))) which works out rather well because the both the max and min of three numbers are very easy found using just a couple of lines of code. This is obvious when you think about it, but when you&#8217;re coming from a bunch of >, <, and, cond statements it&#8217;s not the thing you would consider at first..i guess&#8230;well i didn&#8217;t.</p>
<p>I mentioned this to shad and his response was something along the lines of &#8220;duh, obviously b = (a + b + c) &#8211; (a + c) it&#8217;s algebra&#8221;. This response further reinforces the theory that i&#8217;m in over my head most of the time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2006/10/27/proof-of-my-lack-of-brilliance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Unit Testing&#8230;.NUnit, PHPUnit, Smarty..and stuff</title>
		<link>http://www.joelhainley.com/index.php/2006/10/17/unit-testingnunit-phpunit-smartyand-stuff/</link>
		<comments>http://www.joelhainley.com/index.php/2006/10/17/unit-testingnunit-phpunit-smartyand-stuff/#comments</comments>
		<pubDate>Tue, 17 Oct 2006 17:16:43 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/wordpress/?p=16</guid>
		<description><![CDATA[My personal project has been coming along quite nicely recently, I have been retooling my PHP framework to be able to utilize the Smarty templating engine and it has been going really well. I rewrite several pages using smarty and i am terribly enthused about how clean things have become. My framework went to great [...]]]></description>
			<content:encoded><![CDATA[<p>My personal project has been coming along quite nicely recently, I have been retooling my PHP framework to be able to utilize the Smarty templating engine and it has been going really well. I rewrite several pages using smarty and i am terribly enthused about how clean things have become. My framework went to great efforts to keep things as clean as possible but this makes the whole system significantly cleaner. Very VERY nice.</p>
<p>I have also been spending some time fiddling around with unit testing in both php and .net using PHPUnit and NUnit respectively.</p>
<p>In the .NET project i&#8217;ve been working on I started writing unit tests alongside the creation of the application. This has already saved me quite a bit of time in terms of changes in various objects/classes breaking things in unexpected ways. I am almost sold on the whole concept, my initial thoughts around this were that the unit tests would be instructive for the initial development but their benefits would not be realized until the client requested new features to be implemented, at this point I could make the changes and then ensure that the application had been broken because of these changes. However, there have been many times that I have found the unit tests very useful during development, whether it is catching coding errors, or providing a convenient way to run a bit of code and see how it behaves.<br />
This has carried over to the personal project and efforts to get PHPUnit setup and tests written for all of my business objects. Work is going a little slower on this mostly due to challenges I had with Centos but I have done a few small tests and everything seems to be in working order. I am probably going to write tests for all of the new classes, and then build the tests for the existing objects when I touch them.</p>
<p>One thing that has worked extremely well for me is to start each session off by writing a couple of unit tests, or going through the testing code and seeing if there&#8217;s any way I can test something better. It helps get me into the groove of writing code, and gets my head in the project, but it doesn&#8217;t just dump me right into the middle of the business logic. I can sorta ease my way into it. Write a test..did it pass? Cool..or damn! why not?. I&#8217;m a big believer in inertia when it comes to development, you&#8217;ve gotta crank through a few things, get the mind, and fingers, warmed up then start to tackle some of the bigger things.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2006/10/17/unit-testingnunit-phpunit-smartyand-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Out of the muck&#8230;</title>
		<link>http://www.joelhainley.com/index.php/2006/09/19/out-of-the-muck/</link>
		<comments>http://www.joelhainley.com/index.php/2006/09/19/out-of-the-muck/#comments</comments>
		<pubDate>Tue, 19 Sep 2006 19:04:50 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[bicycle]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/wordpress/?p=12</guid>
		<description><![CDATA[There are a bunch of people I owe emails to, if you are one of those people, i&#8217;m sorry for the tardy responses. I&#8217;ve been &#8220;hiding&#8221; ( as Tina puts it ). I&#8217;ll try to get caught up on email in the next week or so. Reasons for hiding, you ask? I&#8217;m just gonna keep [...]]]></description>
			<content:encoded><![CDATA[<p>There are a bunch of people I owe emails to, if you are one of those people, i&#8217;m sorry for the tardy responses. I&#8217;ve been &#8220;hiding&#8221; ( as Tina puts it ). I&#8217;ll try to get caught up on email in the next week or so. Reasons for hiding, you ask? I&#8217;m just gonna keep that all to myself, but thanks for asking.</p>
<p>I&#8217;ve been riding the bicycle regularly since the end of June and have now logged over 1000 miles. I rode 88 miles this last Saturday, not very hilly though. I&#8217;m preparing for a ride around lake tahoe ( 72 miles ) in october, and then the next weekend a 100 mile ride in the davis area. The training has been pretty straighforward, i&#8217;m no longer taking bart to concord, but am riding down highway 4 and getting about 18 miles a day of riding in. There&#8217;s a few good hills and some good flat stuff, so i&#8217;m getting a great bit of training in every day. I tend to push myself during the week, and then just go with what&#8217;s comfortable on the weekends. That said, I did 77 miles in a little under 5 hours on saturday, then met up with Amy in Pleasant Hill and rode back to Baypoint with her.</p>
<p>The century ( 100 mile ride ) in october is my big ride for the year i guess. I don&#8217;t think i&#8217;ll be doing any more centuries during 2006 but that could change. I&#8217;m going to pull back on my weekend mileage a bit, and try to increase my speed and do some more interval training on the weekends, but I also need to spend some time riding with Amy and help her get some mileage under her belt. That&#8217;s hard to do when i&#8217;m going out and riding 75-90 miles on the one day when she can go riding with me.</p>
<p>Some people have made comments about how fast i&#8217;ve been able to get back into high mileage riding, however I have a few responses to that.</p>
<ol>
<li>I&#8217;m commuting to work every day ( or at least 4 days a week ) on the bicycle, and though it&#8217;s only 13-18 miles per day depending on the route, riding every day has a dramatic effect on your strength/stamina.</li>
<li>I&#8217;m not just riding to work, but pushing myself towards my limits every day of my commute. I don&#8217;t get a lot of miles on my commute so i&#8217;m trying to make the most of them by really pushing myself.</li>
<li>100 miles is not really high mileage. It&#8217;s a good goal but it&#8217;s not that far. Look at the double centuries, randonneurs, brevets, Firecreek 508 and other high mileage rides. 100 miles is a great goal, and a good amount of distance for your first year of riding, or even your first 4 months back on the bike in 22 years.</li>
<li>I&#8217;ve been here before, i was riding centuries when I was 9 years old on an all-steel &#8220;girls&#8221; bike. It&#8217;s amazing what the body remembers, and how easily it jumps back into old routines.</li>
</ol>
<p>Let&#8217;s see what else has been going on. I&#8217;ve been working on a C# windows application using windows forms for a client. I have been trying to figure out the best approach to using MVC in C#, the approach that I ended up having to use in VB6 is not really applicable/possible in the windows forms world. I&#8217;ve almost got it figured out but it&#8217;s required me to dig back into my texts and relearn everything i thought i knew about MVC. I might put together some more notes here when I get things where i&#8217;m happy with them.</p>
<p>Someone gave me a 14-day free trial to eve online. The game is really cool, but it&#8217;s apparent that one could lose a lot of time playing it.</p>
<p>Let&#8217;s see what else&#8230;.oh been doing some work with Smarty on php, i kinda like it. When it was first mentioned to me, i didn&#8217;t see that it was terribly useful, and to some extent it wasn&#8217;t with the framework that i&#8217;ve put together for php, but at the same time, extending the framework and little bit and dropping it in there, makes the separation between developer/html-monkey that much clearer.</p>
<p>I&#8217;ve also been doing some work with Mysql5. I&#8217;ve used mysql for a few years off and on, written a bunch of apps on it, but have always thought of it as a hobby database. Postgresql is the clear big dog of the open source db management systems. However, mysql, for whatever reason, has a lot more traction, i don&#8217;t quite get it, but whatever. So i&#8217;ve been spending some time getting up to speed on mysql5 because it&#8217;s now starting to have some interesting features, although they are still FAR behind postgres on the extensibility front. Not to mention the command syntax for the cli is easier in postgres ( fewer keystrokes ).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2006/09/19/out-of-the-muck/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>3 chapters of the pickaxe</title>
		<link>http://www.joelhainley.com/index.php/2006/07/11/3-chapters-of-the-pickaxe/</link>
		<comments>http://www.joelhainley.com/index.php/2006/07/11/3-chapters-of-the-pickaxe/#comments</comments>
		<pubDate>Tue, 11 Jul 2006 23:27:41 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/wordpress/?p=9</guid>
		<description><![CDATA[I&#8217;ve been reading the Pickaxe book for the last few evenings. Just a chapter a night, so far i&#8217;m liking a lot of what I&#8217;m seeing in ruby. The syntactical shortcuts, and sugar, is really nice. I also like irb it reminds me of working in clisp. I am looking forward to rolling up my [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading the Pickaxe book for the last few evenings. Just a chapter a night, so far i&#8217;m liking a lot of what I&#8217;m seeing in ruby. The syntactical shortcuts, and sugar, is really nice. I also like irb it reminds me of working in clisp. I am looking forward to rolling up my sleeves and spending some time with it.</p>
<p>Using ruby/rails on simply alerts will require me to recode some of the stuff i&#8217;ve already completed, i&#8217;m hopeful that it won&#8217;t be for naught. Ruby/rails is supposed to excel at the things that I need it to do on this project.</p>
<p>If ruby/rails ends up being the toolset it is reputed to be, I will probably resurrect the labor logic project and finish it up using ruby. I&#8217;d really like to have another coder on this project, working on it with an artist never worked out for me, but I think with another developer we could bang it out pretty quickly.</p>
<p>I&#8217;ve gone back and forth on this product a lot, but i&#8217;m starting to believe that google&#8217;s recent efforts will offer a lot of credibility to the approach i have taken on this. I have been convinced that clients would be comfortable with their data being hosted by the application developer if it meant that backups were performed, new features/bug fixes appeared without painful upgrade cycles etc. Google and their ever growing cadre of web-based applications is making this an easier and easier sell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2006/07/11/3-chapters-of-the-pickaxe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

