<?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>//TODO: Create Blog Title</title>
	<atom:link href="http://DontForgetYourTODOs.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://DontForgetYourTODOs.com</link>
	<description></description>
	<lastBuildDate>Thu, 29 Oct 2009 16:57:36 +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>What You Need to Learn Before Leaving College</title>
		<link>http://DontForgetYourTODOs.com/2009/10/what-you-need-to-learn-before-leaving-college/</link>
		<comments>http://DontForgetYourTODOs.com/2009/10/what-you-need-to-learn-before-leaving-college/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 13:59:00 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[College]]></category>

		<guid isPermaLink="false">http://DontForgetYourTODOs.com/?p=457</guid>
		<description><![CDATA[Computer Science and Software Engineering curriculums do an exceptional job at preparing students for their careers. Coming from experience and seeing the same thing happen with other students, I am recognizing areas that students can improve furthering their chances at landing their first professional job.]]></description>
			<content:encoded><![CDATA[<p><a href="http://dontforgetyourtodos.com/wp-content/uploads/2009/10/leaving_college.jpg"><img style="border-right-width: 0px; margin: 0px 0px 0px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Leaving College" border="0" alt="Leaving College" align="right" src="http://dontforgetyourtodos.com/wp-content/uploads/2009/10/leaving_college_thumb.jpg" width="244" height="230" /></a></p>
<p>In the last few years, I have interviewed a number of college students and graduates (Computer Science) and recognized an obvious deficiency in real world skills. While most have gathered details on how to work independently and discipline themselves to learn, the students lack exposure to life outside of a classroom. Those that understand stand to perform better since they are familiar with expectations.</p>
<p>What can the other candidates do to improve their chances of landing a decent job straight out of school?</p>
<h4></h4>
<h4>…But I Have Straight A’s</h4>
<blockquote><p>Straight A’s will not make you a CEO, only a great entry level employee. Straight A’s means you are great at doing assigned work. Leading a company requires social skills, vision, and creating work when there is nothing tangible there.</p>
<p><em>&#8211; Ryan Healy in</em> <a href="http://www.employeeevolution.com/archives/2008/07/10/8-on-the-job-rules-you-unfortunately-cant-learn-in-college/">8 On-The-Job Rules You Unfortunately Can’t Learn in College</a></p>
</blockquote>
<p><strong>Note: </strong>I am not making excuses if to not finish the curriculum. Put some effort in and you will be out soon enough. After all… I made it.</p>
<p>Traditionally in academics, we provide you problems that teach core concepts: object-oriented programming, data structures, proper database design, etc. Beyond that we need to foster the ability to perform independent thought and collaborate. You should receive an overview of software design patterns, when and where it is OK to sacrifice quality for the sake of performance, or to how to make accommodations to meet a deliverable.</p>
<p>The real world is much more open-ended. You are responsible for the decisions you make. Did you make a design decision that supports reusability? Does the design pattern hinder the ability of the application to extend beyond its initial scope?</p>
<p>Defining your own design, also requires you to <em>sell</em> that design. If no one else is biting, most likely it’s a bad decision or was explained poorly. Not everyone will agree and will find points of design failure. Expect that. Your ability to mitigate failures those will improve with experience.</p>
<h4>Requirements?… Check</h4>
<p>Requirements always change from start to finish of a project. Be prepared to be told your release date has been moved up a week or you are responsible for an entirely new set of features. How does this impact your current work to date? Do you need to modify your design without a complete rewrite? You may also be forced into a negotiation for what features are important enough to hit deadlines and which can be left out.</p>
<h4>Twenty-One Year Old Looking for Solution Architect Position</h4>
<p>Leading teams of one or two does not qualify you lead developer. No developer position in college prepares you for the pressure of the role of solution architect, responsible for multiple implementations and ensuring teams have a clear understanding. <em>You will not know how to manage until you really manage</em>.</p>
<p>Instead focus on team player skills. Work on an open-source project. Build a solution that solves a problem. Leadership skills are identified when you state, “I took ownership of building the <em>flux capacitor </em>by proposing a design to the rest of the team, and after some discussion, built a proof of concept and focused on integrating with the solution.”</p>
<h4>Coding by the Book</h4>
<p>Working with teams will get you exposed to other developers’ source code. When you went through your introduction courses, everyone was taught to code using the same standards. Just like fashion, people change coding styles over time. Stop reformatting their code to follow your standard and evolve a set of standards that the team will adhere to.</p>
<h4>Stop Wasting Time Rewriting Existing Code</h4>
<p>Moving into my last point, it is important that you build core understanding of basic data structures and OOP. Once that foundation has been laid, in the real world, you need to focus on using external libraries, and code that has already been written. Understand how frameworks are designed, how to integrate with third party components, and when not to reinvent the wheel. While doing this, you will easily see that there are many different styles (interaction, development, standards) that other authors use. In doing so, you may create your own unique development style.</p>
<p>As a last point, the following are skills I was not taught in college that are important to understand post-classroom:</p>
<ul>
<li>Developing simple reusable libraries </li>
<li>Web services </li>
<li>Proper exception handling </li>
<li>Debugging techniques </li>
<li>Writing unit tests </li>
<li>Revision control and source merging </li>
</ul>
<p><strong>What do you think students stand most to understand before entering the workforce?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://DontForgetYourTODOs.com/2009/10/what-you-need-to-learn-before-leaving-college/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Entity Framework Balloon</title>
		<link>http://DontForgetYourTODOs.com/2009/09/the-entity-framework-balloon/</link>
		<comments>http://DontForgetYourTODOs.com/2009/09/the-entity-framework-balloon/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 19:00:38 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Entity Framework]]></category>

		<guid isPermaLink="false">http://DontForgetYourTODOs.com/?p=427</guid>
		<description><![CDATA[I have used the Entity Framework for two successful project implementations. In my opinion EF lies somewhere between &#34;awesome framework that makes application development a breeze&#34; and &#34;generic tool that requires too much effort to do anything besides out of the box&#34;.
Before I explain myself, I need to identify the common patterns I think are [...]]]></description>
			<content:encoded><![CDATA[<p>I have used the <a href="http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx">Entity Framework</a> for two successful project implementations. In my opinion EF lies somewhere between &quot;awesome framework that makes application development a breeze&quot; and &quot;generic tool that requires too much effort to do anything besides out of the box&quot;.</p>
<p>Before I explain myself, I need to identify the common patterns I think are necessary in any application that needs to persist data:</p>
<table border="0" cellspacing="0" cellpadding="2" width="516">
<thead>
<tr>
<td valign="top" width="514"><strong>Common Data Access Tasks</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" width="514">Design and Create Database Tables</td>
</tr>
<tr>
<td valign="top" width="514">Write SQL Statements or Stored Procedures/Packages</td>
</tr>
<tr>
<td valign="top" width="514">Design and Create Logical Entities</td>
</tr>
<tr>
<td valign="top" width="514">Write Code to Map Entities to Database</td>
</tr>
<tr>
<td valign="top" width="514">Tune Database via Indexing, Constraints, and Referential Integrity (if RDBMS)</td>
</tr>
<tr>
<td valign="top" width="514">Unit Test Data Access Methods</td>
</tr>
<tr>
<td valign="top" width="514">Handle Transactions</td>
</tr>
</tbody>
</table>
<p>EF works to simplify the development for database dependent applications by removing the redundant work involved in each project. Namely, the below highlighted tasks:</p>
<table border="0" cellspacing="0" cellpadding="2" width="516">
<thead>
<tr>
<td valign="top" width="514"><strong>Common Data Access Tasks</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" width="514">Design and Create Database Tables</td>
</tr>
<tr style="background-color: yellowgreen">
<td valign="top" width="514">Write SQL Statements or Stored Procedures/Packages</td>
</tr>
<tr style="background-color: yellowgreen">
<td valign="top" width="514">Design and Create Logical Entities</td>
</tr>
<tr style="background-color: yellowgreen">
<td valign="top" width="514">Write Code to Map Entities to Database</td>
</tr>
<tr>
<td valign="top" width="514">Tune Database via Indexing, Constraints, and Referential Integrity (if RDBMS)</td>
</tr>
<tr>
<td valign="top" width="514">Unit Test Data Access Methods</td>
</tr>
<tr style="background-color: yellowgreen">
<td valign="top" width="514">Handle Transactions</td>
</tr>
</tbody>
</table>
<h4>What is so bad about Entity Framework?</h4>
<ol>
<li>Most developers do not know to optimize database operations. EF creates a sandbox so that they may do whatever the hell they want with the data. This will drive any DBA crazy when they are asked to make optimizations. </li>
<li>With 99% confidence, I believe that most of the .NET framework code is bug-free (or has yet to become a problem for me). Knowing this, we can believe that our EF SQL queries are probably legit. But isn&#8217;t it important to test our queries themselves through unit tests? The ability to unit test our own data access methods without requiring an active database (in-memory or XML defined?) is a necessary feature. </li>
<li>Consequently, the application is fully aware of the ties to the EF and cannot be tested without. Persistence ignorance support is necessary so that developers are not forced to implement additional interfaces or provide unnecessary references. </li>
<li>Developing N-Tiered Applications with EF is difficult. Reattach objects into the data context after client modifications requires too much work. </li>
<li>Lazy loading improves performance, but excess code is needed to check if a related set is loaded. If it is not loaded, additional code is required to perform the operation. Consequently, it could make database operations unnecessarily chatty. </li>
</ol>
<p>I am only able to list five points about what is bad about the EF, after working on it for 8 months. In that time I have managed to work around two of the five issues with ADO.NET Data Services (unit testing data access methods with a mock implementation and creating N-Tiered applications). Performance issues have cropped up that I am 100% confident would not exist if custom code had been written to manage data access.</p>
<h4></h4>
<h4>So what is the &#8216;Entity Framework Balloon&#8217;?</h4>
<p><a href="http://dontforgetyourtodos.com/wp-content/uploads/2009/09/squashed_balloons.jpg"><img style="border-right-width: 0px; margin: 0px 0px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="squashed_balloons" align="right" src="http://dontforgetyourtodos.com/wp-content/uploads/2009/09/squashed_balloons_thumb.jpg" width="244" height="118" /></a></p>
<p>Someone once provided this analogy to me.</p>
<blockquote><p>If our project were a water balloon, each development task would have its own piece of space. The introduction of EF attempts to shrink the cost/time to do the redundant tasks by compressing that side of the balloon. But the other tasks have to go somewhere else, and their piece just gets bigger and requires more effort in the long run.</p>
</blockquote>
<p>There always seems to be a new tool for the job. EF obviously serves its purpose, but it fails at making everything as easy as it seems.</p>
<h4>.NET 4 with the new Entity Framework</h4>
<p>Looking ahead, the <a href="http://blogs.msdn.com/adonet/archive/2009/05/11/update-on-the-entity-framework-in-net-4-and-visual-studio-2010.aspx">ADO.NET Team Blog</a> has focused on a list of concerns for the next version of EF.&#160; They are focusing on improving:</p>
<ol>
<li>Enabling settings to make development simpler such as lazy loading, eager loading, and stored procedure mapping. </li>
<li>Improving the readability of the generated SQL. </li>
<li>Persistence Ignorance support, allowing you to write POCO and later tie them to Entity Framework or another Data Provider. </li>
<li>Better N-Tier Support allowing the serialized entities to include their own change tracking properties. </li>
<li>Model-First and Code-Only development!<br />
<h4>&#160;</h4>
<h4>Entity Framework Reading List:</h4>
<p><a href="http://msdn.microsoft.com/en-us/magazine/dd882522.aspx">Anti-Patterns to Avoid in N-Tier Applications</a>         <br /><a href="http://msdn.microsoft.com/en-us/magazine/cc700340.aspx">The Entity Framework in Layered Architectures</a>        <br /><a href="http://www.develop.com/entityframework4">What&#8217;s New and Cool in Entity Framework 4.0</a></p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://DontForgetYourTODOs.com/2009/09/the-entity-framework-balloon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scott Hanselman&#8217;s 2009 Ultimate Developer Tool List for Windows</title>
		<link>http://DontForgetYourTODOs.com/2009/09/scott-hanselmans-2009-ultimate-developer-tool-list-for-windows/</link>
		<comments>http://DontForgetYourTODOs.com/2009/09/scott-hanselmans-2009-ultimate-developer-tool-list-for-windows/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 15:59:00 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Shout Out]]></category>
		<category><![CDATA[developer tools]]></category>

		<guid isPermaLink="false">http://DontForgetYourTODOs.com/2009/09/scott-hanselmans-2009-ultimate-developer-tool-list-for-windows/</guid>
		<description><![CDATA[I just could not resist reposting Scott Hanselman’s most recent post: 2009 Ultimate Developer and Power Users Tool List for Windows. 
I am currently waiting for parts to come to rebuild my home machine and install Windows 7 on. I cannot wait to review every item in this list to see if they increase my [...]]]></description>
			<content:encoded><![CDATA[<p>I just could not resist reposting Scott Hanselman’s most recent post: <a href="http://www.hanselman.com/blog/ScottHanselmans2009UltimateDeveloperAndPowerUsersToolListForWindows.aspx">2009 Ultimate Developer and Power Users Tool List for Windows</a>. </p>
<p>I am currently waiting for parts to come to rebuild my home machine and install Windows 7 on. I cannot wait to review every item in this list to see if they increase my productivity!</p>
]]></content:encoded>
			<wfw:commentRss>http://DontForgetYourTODOs.com/2009/09/scott-hanselmans-2009-ultimate-developer-tool-list-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle GUID Converter</title>
		<link>http://DontForgetYourTODOs.com/2009/08/oracle-guid-converter/</link>
		<comments>http://DontForgetYourTODOs.com/2009/08/oracle-guid-converter/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 19:00:25 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Shout Out]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://DontForgetYourTODOs.com/?p=417</guid>
		<description><![CDATA[Using the Entity Framework against Oracle requires the presence of a third party provider. It becomes even more difficult when one of the data types that you store is a GUID which is not natively supported in Oracle.]]></description>
			<content:encoded><![CDATA[<p><img style="margin: 0px 10px 10px 0px; border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="Oracle Guid Converter" src="http://robobunny.com/images/robo_head.png" align="left">Important lesson for those who prefer using GUIDs as record identifiers.</p>
<p>The MS SQL data type, <strong>uniqueidentifier, </strong>does not have a counterpart in Oracle. In the past it was easy to make the column CHAR(36), the max string length of a GUID. I was not in a situation to do this as we were dealing with the Entity Framework against Oracle.&nbsp; </p>
<p>Entity Framework is compatible with SQL Server out of the box and translates the uniqueidentifier column to GUID type. This is not the case for Oracle. The use of a third party adapter, <a href="http://http://www.devart.com/dotconnect/oracle/">dotConnect for Oracle</a>, is required. This provider requires that the storage data type for GUID be RAW(16).</p>
<h4>What&#8217;s the problem with RAW(16)?</h4>
<p>GUID representation</p>
<p><span style="border-right: black thin dashed; padding-right: 10px; border-top: black thin dashed; padding-left: 10px; padding-bottom: 10px; border-left: black thin dashed; padding-top: 10px; border-bottom: black thin dashed">{922B0A87-7A88-DE11-BBA7-0AEA0522E79F}</span></p>
<p>&nbsp;</p>
<p>RAW(16) representation</p>
<p><span style="border-right: black thin dashed; padding-right: 10px; border-top: black thin dashed; padding-left: 10px; padding-bottom: 10px; border-left: black thin dashed; padding-top: 10px; border-bottom: black thin dashed">870A2B92887A11DEBBA70AEA0522E79F</span></p>
<p>&nbsp;</p>
<p>As if it was not tough enough already to read and write a GUID. Now it is represented differently in Oracle!!??</p>
<p>The best solution that I discovered to get around this was through the use of a handy <a href="http://www.robobunny.com/cgi-bin/guid">GUID Converter</a>. I don&#8217;t know how many times I have relied on this to help me out. </p>
]]></content:encoded>
			<wfw:commentRss>http://DontForgetYourTODOs.com/2009/08/oracle-guid-converter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Five Steps to Making Fellow Developers Miserable</title>
		<link>http://DontForgetYourTODOs.com/2009/08/miserable-developers-2/</link>
		<comments>http://DontForgetYourTODOs.com/2009/08/miserable-developers-2/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 12:00:46 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Series]]></category>
		<category><![CDATA[Unmaintainable Code]]></category>

		<guid isPermaLink="false">http://DontForgetYourTODOs.com/?p=320</guid>
		<description><![CDATA[1. Setters that do more than SET
All property setters should validate their input and set the value of other properties. This will remove the burden of validation from other developers.

private string _id;
public string Id
{
&#160; get
&#160; {
&#160;&#160;&#160; return _id;
&#160; }
&#160; set
&#160; {
&#160;&#160;&#160; _id = value.ToString();
&#160;&#160;&#160; _AnotherPropertyValue = value.ToString();
&#160; }
}

private string _AnotherPropertyValue;
public string PropertyValue
{
&#160; get
&#160; {
&#160;&#160;&#160; return [...]]]></description>
			<content:encoded><![CDATA[<h4>1. Setters that do more than SET</h4>
<p>All property setters should validate their input and set the value of other properties. This will remove the burden of validation from other developers.</p>
<div style="border-bottom: black thin dashed; border-left: black thin dashed; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; font-family: courier new; background: white; color: black; font-size: 11pt; border-top: black thin dashed; border-right: black thin dashed; padding-top: 10px">
<p style="margin: 0px"><span style="color: blue">private</span> <span style="color: blue">string</span> _id;</p>
<p style="margin: 0px"><span style="color: blue">public</span> <span style="color: #2b91af">string</span> Id</p>
<p style="margin: 0px">{</p>
<p style="margin: 0px"><span style="color: blue">&#160; get</span></p>
<p style="margin: 0px">&#160; {</p>
<p style="margin: 0px"><span style="color: blue">&#160;&#160;&#160; return</span> _id;</p>
<p style="margin: 0px">&#160; }</p>
<p style="margin: 0px"><span style="color: blue">&#160; set</span></p>
<p style="margin: 0px">&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160; _id = <span style="color: blue">value</span>.ToString();</p>
<p style="margin: 0px">&#160;&#160;&#160; _AnotherPropertyValue = <span style="color: blue">value</span>.ToString();</p>
<p style="margin: 0px">&#160; }</p>
<p style="margin: 0px">}</p>
<p style="margin: 0px">
<p style="margin: 0px"><span style="color: blue">private</span> <span style="color: blue">string</span> _AnotherPropertyValue;</p>
<p style="margin: 0px"><span style="color: blue">public</span> <span style="color: blue">string</span> PropertyValue</p>
<p style="margin: 0px">{</p>
<p style="margin: 0px"><span style="color: blue">&#160; get</span></p>
<p style="margin: 0px">&#160; {</p>
<p style="margin: 0px"><span style="color: blue">&#160;&#160;&#160; return</span> _AnotherPropertyValue;</p>
<p style="margin: 0px">&#160; }</p>
<p style="margin: 0px"><span style="color: blue">&#160; set</span></p>
<p style="margin: 0px">&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160; _AnotherPropertyValue = <span style="color: blue">value</span>;</p>
<p style="margin: 0px">&#160; }</p>
<p style="margin: 0px">}</p>
</p></div>
<p><strong>Workaround: </strong>Property getters and setters should only save and return values. Getters and setters should not validate against null, perform regular expression checks, or typecast. Additional logic can take place in business logic classes. Setters that do more than set also cause issues during unit testing. What goes in, must come out.</p>
<h4>2. The Golden Hammer</h4>
<p>Whenever implementing something new, remember the last successful (or similar) experience and reuse.&#160; There is no doubt about it. What worked for you in the past, will continue to work for you now.</p>
<p><strong>Workaround: </strong>With the <a href="http://sourcemaking.com/antipatterns/golden-hammer">Golden Hammer</a> approach, your solution is the hammer and every project you come up against is a nail. If you find yourself trying to implement an exact replica of a solution that you built in the past, chances are that you will miss some requirements or pigeonhole yourself into somewhere you do not want to be. Instead, step back, learn what the functionality of the system must be, and compare/contrast the differences between past experiences.</p>
<h4>3. Swiss Army Class</h4>
<p>Just as in <a href="http://dontforgetyourtodos.com/2009/07/five-steps-to-unmaintainable-code/">bloated class</a>, minimize how many separate classes your code must deal with. If you know all of the different functional areas your application needs to cover, extract them to an interface. Using interfaces will allow you to switch out the implementation types without changing your code. Just make sure that you keep your number of implementation classes low so that it is more maintainable. If necessary, make the lone class implement every interface in the project.</p>
<p><a href="http://dontforgetyourtodos.com/wp-content/uploads/2009/07/SwissArmyClass.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="SwissArmyClass" border="0" alt="SwissArmyClass" src="http://dontforgetyourtodos.com/wp-content/uploads/2009/07/SwissArmyClass_thumb.png" width="163" height="191" /></a></p>
<p><strong>Workaround: </strong>Focus on keeping the implementation of your classes very specific to single units. If you feel the need to implement multiple interfaces to create a hybrid of a few simple interfaces, this is perfectly acceptable.</p>
<h4>4. Yet Another Damn Layer</h4>
<p>Encapsulation is one of the greatest features of object oriented programming. If you can find a way to make existing code more generic so as to make it easier for implementation efforts (and less code writing!) you should do so. Create a generic interface that will take care of defining all of the different functionality in one call.</p>
<p><strong>Workaround: </strong>Encapsulation should be used to hide any of the internal mechanisms of a separate software component. Good examples of this are code that is used to perform common tasks such as logging, serialization, or instrumentation metrics.</p>
<h4>5. Unit Testing and Stale Data</h4>
<p>Since testing is usually a hassle to go through, try and spend as little time doing it as possible. It already takes long enough to set up the tests and the test data. Try not to worry about clearing out the test data since it is only in the development environment.</p>
<p><strong>Workaround: </strong>Unit tests should take care of setting themselves up and tearing themselves down. Unit testing should and can be a full-time job position as it should account for every possible variation of data input and output that can occur. If you can not write your unit tests to clean their test data up, then they should use in-memory data providers so as not to impact any other users in the same environment.</p>
<p><strong>* DISCLAIMER *</strong> Please note that my views are that of the <strong>Workaround</strong> type method and this article is meant to prove humor at what can go wrong when unsafe practices are used. Also keep in mind, I’ve probably done each and one of these plenty of times in my career.</p>
]]></content:encoded>
			<wfw:commentRss>http://DontForgetYourTODOs.com/2009/08/miserable-developers-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Code-smell: Whack-a-Mole</title>
		<link>http://DontForgetYourTODOs.com/2009/08/code-smell-whack-a-mole/</link>
		<comments>http://DontForgetYourTODOs.com/2009/08/code-smell-whack-a-mole/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 21:00:52 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Unmaintainable Code]]></category>

		<guid isPermaLink="false">http://DontForgetYourTODOs.com/?p=395</guid>
		<description><![CDATA[It&#8217;s 4:00 on Friday afternoon. Do you know where you want to be?
Definitely not at work. About fifteen minutes before you decide to log off and bolt out early, a critical defect is logged with your application. Your data import isn&#8217;t working correctly and it is losing content during execution. The client, and project managers [...]]]></description>
			<content:encoded><![CDATA[<h4>It&#8217;s 4:00 on Friday afternoon. Do you know where you want to be?</h4>
<p>Definitely not at work. About fifteen minutes before you decide to log off and bolt out early, a <em>critical</em> defect is logged with your application. Your data import isn&#8217;t working correctly and it is losing content during execution. The client, and project managers stress to you that this is a must fix issue as the testers cannot continue until your content is valid.</p>
<p>You grumble, sit back down, and pull up the code to inspect the issue. Ten to fifteen minutes later the fix looks relatively easy. Excited that a resolution was identified so fast, you settle in and begin the fix. Shortly after the fix is in place, you test to make sure everything continues to work as is&#8230;. then you gasp as you realize what happens next: it is the <em>Whack-a-Mole </em>bug.</p>
<p><a href="http://www.flickr.com/photos/smcgee/1317231016/"><img class="aligncenter" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://dontforgetyourtodos.com/wp-content/uploads/2009/07/whack_a_mole.jpg" border="0" alt="The Whack-a-Mole bug" width="244" height="164" /></a></p>
<blockquote><p><strong>whack-a-mole bug </strong><em>n </em><strong>1. </strong>a defect that reappears throughout your application in multiple locations and is difficult to get rid of no how many times you attempt to get rid of it</p>
<p><strong>Related Code-smells: </strong>DUPLICATE CODE, SHOTGUN SURGERY</p></blockquote>
<p>Most often this <a href="http://www.codinghorror.com/blog/archives/000589.html">code smell</a> is a by-product of <a href="http://en.wikipedia.org/wiki/Shotgun_surgery">Shotgun Surgery</a>. While it may seem easy to copy the same validation code used during data-in to data-out, you know it is not the right choice. Now later on, that specific code had particular issues and it must be fixed in more than one place.</p>
]]></content:encoded>
			<wfw:commentRss>http://DontForgetYourTODOs.com/2009/08/code-smell-whack-a-mole/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XP-Dev.com : Free Subversion Hosting &amp; Project Tracking</title>
		<link>http://DontForgetYourTODOs.com/2009/07/xp-dev-com-free-subversion-hosting-project-tracking/</link>
		<comments>http://DontForgetYourTODOs.com/2009/07/xp-dev-com-free-subversion-hosting-project-tracking/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 12:00:03 +0000</pubDate>
		<dc:creator>josh.tucholski</dc:creator>
				<category><![CDATA[Shout Out]]></category>

		<guid isPermaLink="false">http://DontForgetYourTODOs.com/?p=345</guid>
		<description><![CDATA[ A few months ago I started working on a new home project that I wanted to keep under source control. My only requirement was that it be closed-source as I wasn&#8217;t ready to share my idea with the world yet. I am cheap, and I decided to look for a free alternative first before [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dontforgetyourtodos.com/wp-content/uploads/2009/10/xpdev.jpg"><img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xp-dev" border="0" alt="xp-dev" align="left" src="http://dontforgetyourtodos.com/wp-content/uploads/2009/10/xpdev_thumb.jpg" width="244" height="185" /></a> A few months ago I started working on a new home project that I wanted to keep under source control. My only requirement was that it be closed-source as I wasn&#8217;t ready to share my idea with the world yet. I am cheap, and I decided to look for a free alternative first before I decided to pay someone. I stumbled upon <a href="http://www.xp-dev.com/">XP-Dev.com</a>.</p>
</p>
<p>What I get with XP-Dev Free:</p>
<ul>
<li>Subversion Hosting up to 500 MB </li>
<li>Unlimited number of Projects </li>
<li>Wiki Pages </li>
<li>Blogs &amp; Forums </li>
</ul>
<p>XP-Dev.com has only suffered one outage since I&#8217;ve been with them, and the owner of the site was very vocal with what the status was for getting back online.&#160; For any new projects that you are working on, or if you want to have something under version control, I definitely suggest using XP-Dev.com.</p>
]]></content:encoded>
			<wfw:commentRss>http://DontForgetYourTODOs.com/2009/07/xp-dev-com-free-subversion-hosting-project-tracking/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Are You Writing Baby Proof Software?</title>
		<link>http://DontForgetYourTODOs.com/2009/07/are-you-writing-baby-proof-software/</link>
		<comments>http://DontForgetYourTODOs.com/2009/07/are-you-writing-baby-proof-software/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 17:00:00 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://DontForgetYourTODOs.com/?p=318</guid>
		<description><![CDATA[The other day while eating lunch the topic of newborns came up. We discussed that when parents prepared for a newborn to enter their home, they gave their best effort to ensure that the home was “baby proof”. Outlets were covered, stairway gates were in place, and cabinets locked to stop the little one from [...]]]></description>
			<content:encoded><![CDATA[<p>The other day while eating lunch the topic of newborns came up. We discussed that when parents prepared for a newborn to enter their home, they gave their best effort to ensure that the home was “baby proof”. Outlets were covered, stairway gates were in place, and cabinets locked to stop the little one from getting into trouble with anything in reach. Now they look back as their children become mobile, and say a whole new can of worms is opened. Cabinets are not locked to protect what is inside. They are locked to prevent them being turned into steps to get other items originally out of reach.</p>
<p><a href="http://www.flickr.com/photos/kohlerfolk/3144861603/"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="aligncenter" border="0" alt="christmas-tree" src="http://dontforgetyourtodos.com/wp-content/uploads/2009/07/christmas-tree.jpg" width="274" height="364" /></a></p>
<p>Baby proofing your home serves as a solid analogy to writing software. As much as we wish it were not true, we unintentionally write buggy software. If you are lucky, the bugs are never found once the software goes out the door. Try as much as you wish to hide the errors and gracefully recover, there is always some way to work around the system. Users are just like babies in that they just putter around in the application trying different things until they find what works. They may not be expect to find these issues, but once they find them, watch out because they&#8217;ll remember how to get back and exploit what you hoped was &quot;safe software&quot;. The <a href="http://en.wikipedia.org/wiki/Twilight_hack">Twilight Hack</a> for example allowed Wii users to exploit a buffer overflow just by changing the name of the character’s horse.</p>
<p>It is very difficult to try and prevent this seeing how you cannot really tell exactly what you are looking for. Keep in mind though that software development is a lot more forgiving than raising a child. You cannot run usability tests in your house to see how safe it is. The only solution that I have to getting around this is to draw from past experiences. Focus on thorough testing and make sure past issues are no longer a problem.</p>
<p>Below is a refresher on the types of software testing that most products should undergo:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Unit_testing">Unit Testing</a> &#8211; validate that individual units of your code work for a given input and expected output. Never rely on external factors to write your unit tests (e.g. Database Engine having correct data and up to date) </li>
<li><a href="http://www.testinggeek.com/index.php/testing-types/life-cycle/54-integration-testing">Integration Testing</a> &#8211; ensure that you are clear of your expectations and what you expect when working in multiple distributed environments or systems </li>
<li><a href="http://en.wikipedia.org/wiki/Software_performance_testing">Performance/Load Testing</a> &#8211; you will want to try and avoid being surprised when you get a call on Cyber Monday telling you that your site is offline due to heavy load </li>
<li><a href="http://en.wikipedia.org/wiki/Usability_testing">Usability Testing</a> &#8211; before you go live, do some testing on your application to make sure that you see how well subjects can perform tasks and respond to errors </li>
<li><a href="http://en.wikipedia.org/wiki/Regression_testing">Regression Testing</a> &#8211; remember that feature that you added in last month&#8217;s release? Yeah well now the user cannot update their profile ever since then. Regression test to ensure that updates you make do not cause existing functionality to break. </li>
<li><a href="http://en.wikipedia.org/wiki/Security_testing">Security Testing</a> &#8211; is your software capable of SQL Injection? Do you follow correct authorization rules for your users and does your data retain its integrity? </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://DontForgetYourTODOs.com/2009/07/are-you-writing-baby-proof-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Five Steps to Making Fellow Developers Miserable</title>
		<link>http://DontForgetYourTODOs.com/2009/07/miserable-developers-1/</link>
		<comments>http://DontForgetYourTODOs.com/2009/07/miserable-developers-1/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 12:00:59 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Series]]></category>
		<category><![CDATA[Unmaintainable Code]]></category>

		<guid isPermaLink="false">http://DontForgetYourTODOs.com/?p=289</guid>
		<description><![CDATA[For all of the new developers and the seasoned veterans, today I am going to shed some light on things (not) to do when writing unmaintainable code. I am hoping this to make this into a series post, so any feedback or your own personal tricks are a great contribution to make.]]></description>
			<content:encoded><![CDATA[<h4>1. Long Method</h4>
<p>Short methods specific to single units are <strong>bad</strong>. Try to limit the number of methods in each class. This will ensure that each method is as long as possible.</p>
<p><strong>Workaround: </strong>In order to prevent <em>long method</em> from happening, I recommend limiting the length of your functions to 30 lines or less (40 including exceptions).  Focus on keeping your functions less then one screen&#8217;s length.  Try <a href="http://www.secretgeek.net/6min_program.asp">bumping up the font-size of your IDE</a> so that a lot less code fits on the screen.</p>
<h4>2. Out of Sync Comments</h4>
<p>Just like you learned in college, comments are the best form of documentation. Comment blocks are better. Provide details about every line of code and include <strong>pre-conditions, </strong><strong>post-conditions</strong>, and <strong>expected exceptions</strong>. Comments are important because they help other developers calling the code understand how it works.</p>
<div style="border-right: black thin dashed; padding-right: 10px; border-top: black thin dashed; padding-left: 10px; font-size: 10pt; background: white; padding-bottom: 10px; border-left: black thin dashed; color: black; line-height: 10px; padding-top: 10px; border-bottom: black thin dashed; font-family: courier new">
<p style="margin: 0px"><span style="color: gray">///</span><span style="color: green"> </span><span style="color: gray">&lt;summary&gt;</span></p>
<p style="margin: 0px"><span style="color: gray">///</span><span style="color: green"> Saves data into database</span></p>
<p style="margin: 0px"><span style="color: gray">///</span><span style="color: green"> </span><span style="color: gray">&lt;/summary&gt;</span></p>
<p style="margin: 0px"><span style="color: gray">///</span><span style="color: green"> </span><span style="color: gray">&lt;remarks&gt;</span></p>
<p style="margin: 0px"><span style="color: gray">///</span><span style="color: green"> Save Data opens up a SqlCommand object and calls the </span></p>
<p style="margin: 0px"><span style="color: gray">///</span><span style="color: green"> sp_SaveUsers stored procedure to save a user object.</span></p>
<p style="margin: 0px"><span style="color: gray">///</span><span style="color: green"> </span><span style="color: gray">&lt;/remarks&gt;</span></p>
<p style="margin: 0px"><span style="color: gray">///</span><span style="color: green"> </span><span style="color: gray">&lt;preconditions&gt;</span></p>
<p style="margin: 0px"><span style="color: gray">///</span><span style="color: green"> User object must be created. sp_SaveUsers must exist in SQL server</span></p>
<p style="margin: 0px"><span style="color: gray">///</span><span style="color: green"> </span><span style="color: gray">&lt;/preconditions&gt;</span></p>
<p style="margin: 0px"><span style="color: blue">public</span> <span style="color: blue">void</span> SaveData()</p>
<p style="margin: 0px">{</p>
<p style="margin: 0px"><span style="color: green">//Get Connection String</span></p>
<p style="margin: 0px"><span style="color: blue">string</span> connectionString;</p>
<p style="margin: 0px"><span style="color: #2b91af">SqlConnection</span> connection = <span style="color: blue">new</span> <span style="color: #2b91af">SqlConnection</span>(connectionString);</p>
<p style="margin: 0px"><span style="color: green">//Open Connection</span></p>
<p style="margin: 0px">connection.Open();</p>
<p style="margin: 0px">
<p style="margin: 0px"><span style="color: green">//Create Sql Command call &#8220;sp_SaveUsers&#8221;</span></p>
<p style="margin: 0px"><span style="color: #2b91af">SqlCommand</span> cmd = <span style="color: blue">new</span> <span style="color: #2b91af">SqlCommand</span>();</p>
<p style="margin: 0px">cmd.Connection = connection;</p>
<p style="margin: 0px">cmd.CommandText = <span style="color: #a31515">&#8220;INSERT INTO USERS (userId, userName) VALUES (?,?)&#8221;</span>;</p>
<p style="margin: 0px">cmd.CommandType = System.Data.<span style="color: #2b91af">CommandType</span>.TableDirect;</p>
<p style="margin: 0px">
<p style="margin: 0px"><span style="color: green">//Add Parameters for Stored Proc</span></p>
<p style="margin: 0px">cmd.Parameters.Add(u.ID);</p>
<p style="margin: 0px">cmd.Parameters.Add(u.Name);</p>
<p style="margin: 0px">
<p style="margin: 0px"><span style="color: green">//Execute Command</span></p>
<p style="margin: 0px">cmd.ExecuteNonQuery();</p>
<p style="margin: 0px">
<p style="margin: 0px"><span style="color: green">//Close connection</span></p>
<p style="margin: 0px">connection.Close();</p>
<p style="margin: 0px">}</p>
</div>
<p><strong> </strong></p>
<p><strong>Workaround: </strong>If you are going to write comments, specify the problem that your code solves, not how it solves it. Think of the last time you picked up a book at the store and read the back. Would you have wanted it to tell you what the story is about, or how the plot is laid out? <strong>If you change the implementation (bug, refactor, etc.), the comments can remain the same.</strong> Try and get away from code commenting all together by writing self-documenting code. For examples read Jeff Atwood&#8217;s <a href="http://www.codinghorror.com/blog/archives/001150.html">Coding Without Comments</a>.</p>
<h4>3. Bloated Class</h4>
<p>Enforce a limit to the number of classes allowed in the codebase. To reinforce this, place all logic into one big <a href="http://sourcemaking.com/antipatterns/the-blob">blob class</a>.  With this class you are the ultimate tool that can do anything. The more classes you have, the more source files you maintain. More source files increase the compile time of your project.</p>
<p><a href="http://dontforgetyourtodos.com/wp-content/uploads/2009/07/blobclass.jpg"><img class="aligncenter" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://dontforgetyourtodos.com/wp-content/uploads/2009/07/blobclass-thumb.jpg" border="0" alt="Blob Class" width="163" height="318" /></a></p>
<p><strong>Workaround: </strong>Follow the <a href="http://mmiika.wordpress.com/oo-design-principles/">Single Responsibility Principle (SRP)</a> to keep the implementation of your class specific to its&#8217; purpose. Classes should only have one reason to change, and no other components of that class should be affected during that change.</p>
<h4>4. Classes that are &#8220;involved&#8221;</h4>
<p>The more that each class knows and relies on another class, the better your code is as a single unit. New developers will need to understand every class in your solution because one change creates a ripple effect throughout the system. <a href="http://en.wikipedia.org/wiki/Dependency_hell">Dependency hell</a> is much nicer than it sounds.</p>
<p><a href="http://www.flickr.com/photos/rattodisabina/1422826582/"><img class="aligncenter" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://dontforgetyourtodos.com/wp-content/uploads/2009/07/dominos1.jpg" border="0" alt="dominos" width="244" height="184" /></a></p>
<p><strong>Workaround: </strong>Develop code that is loosely coupled. Loosely coupled code is attained by making each class units that do not have knowledge of how other classes work. This creates more flexible design. <a href="http://weblogs.asp.net/sfeldman/archive/2008/06/09/too-loosely-coupled-code.aspx">Do not overkill</a> as too much can lead to unneeded code complexity.</p>
<h4>5. Developer Ego</h4>
<p>The smarter a developer and the better coder that they believe they are, the better the code output. The only one capable of creating awesome code is one who looks at the world as one complex problem. Try to avoid breaking it down into simple smaller problems, otherwise any regular programmer is capable of doing your job.</p>
<p><strong>Workaround: </strong>Give the developer the smack-down.</p>
<p><strong>* DISCLAIMER *</strong> Please note that my views are that of the <strong>Workaround</strong> type method and this article is meant to prove humor at what can go wrong when unsafe practices are used. Also keep in mind, I&#8217;ve probably done each and one of these plenty of times in my career.</p>
]]></content:encoded>
			<wfw:commentRss>http://DontForgetYourTODOs.com/2009/07/miserable-developers-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating too Big to Fail Apps</title>
		<link>http://DontForgetYourTODOs.com/2009/04/creating-too-big-to-fail-apps/</link>
		<comments>http://DontForgetYourTODOs.com/2009/04/creating-too-big-to-fail-apps/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 08:00:05 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Design Flaws]]></category>

		<guid isPermaLink="false">http://tucholski.wordpress.com/?p=243</guid>
		<description><![CDATA[I can&#8217;t help it. I read Steve&#8217;s post too big to fail on brip blap and I immediately apply its principle to life as a developer. The focus is about breaking down &#8220;too big to fail&#8221; life events into smaller more manageable components that are less likely to wreak havoc.

How is this relevant to anything [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t help it. I read Steve&#8217;s post <a href="http://www.bripblap.com/2009/too-big-to-fail/">too big to fail</a> on brip blap and I immediately apply its principle to life as a developer. The focus is about breaking down &#8220;too big to fail&#8221; life events into smaller more manageable components that are less likely to wreak havoc.</p>
<p><a href="http://www.flickr.com/photos/cfamighetti/813128275/"><img src="http://tucholski.files.wordpress.com/2009/03/buckling_wall1.jpg?w=275&#038;h=192" alt="Too Big to Fail" title="Too Big to Fail" width="275" height="192" class="aligncenter size-thumbnail wp-image-266" /></a></p>
<p>How is this relevant to anything in the world of software development?</p>
<h3>1. System Design</h3>
<p>When designing systems, separate components by logic functionality. Systems that are responsible for continuous database queries, should not be tied to a web site that serves content, such as in <a href="http://www.codeproject.com/KB/aspnet/ASPNETService.aspx">Simulate a Windows Service using ASP.NET</a>. While this idea may be good in theory and for any shared hosting environment when you can&#8217;t install or run services on the server, the potential that a deadlock or frozen thread occurs will increase. If that occurs, you can kiss all of your active user sessions goodbye.</p>
<h3>2. Application Design</h3>
<p>Separate application logic out so that when one component gets changed, it doesn&#8217;t force a complete rewrite. Websites and web services should not tie directly to the data layer. Design N-layer systems (read the <a href="http://davidhayden.com/blog/dave/archive/2005/07/22/2401.aspx">differences between N-Tier and N-Layer applications</a>) so that there are no direct dependencies on lower-level technologies being used.</p>
<p>Maintainability in separate components increases as the number of layers does. Take this in moderation though, too much loose-coupling in your layers, leads to <strong>overkill and needless complexity</strong>.</p>
<h3>3. Class Design</h3>
<p>When designing classes, follow the <a href="http://en.wikipedia.org/wiki/Single_responsibility_principle">Single Responsibility Principle (SRP)</a> of the <a href="http://mmiika.wordpress.com/oo-design-principles/">S.O.L.I.D Class Design Principles</a>. If your class has more than one reason to change, then it may be &#8220;too big to fail&#8221;. The below example helps:</p>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;line-height:10px;border:thin dashed black;padding:10px;">
<p style="margin:0;"><span style="color:blue;">public</span> <span style="color:blue;">class</span> Worker</p>
<p style="margin:0;">{</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">public</span> <span style="color:blue;">string</span> GetTaxRate() { }</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">public</span> <span style="color:blue;">void</span> Save() { }</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp; <span style="color:blue;">public</span> <span style="color:blue;">string</span> GetId() { }</p>
<p style="margin:0;">}</p>
</div>
<p>The above breaks the SRP because any minor change required to one of the three purposes of this class causes the whole class to change:</p>
<ol>
<li>The process to calculate the tax rate of the employee</li>
<li>Database Schema that matches to the Worker</li>
<li>Employee Id that is used. SSN today, numeric number tomorrow</li>
</ol>
<p>Any single change impacts the class which is responsible for three very different purposes. While this is not &#8220;too big to fail&#8221;, the class is &#8220;too big for its own good&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://DontForgetYourTODOs.com/2009/04/creating-too-big-to-fail-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
