<?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>Turnleaf Design &#187; Ramblings</title>
	<atom:link href="http://www.turnleafdesign.com/category/ramblings/feed" rel="self" type="application/rss+xml" />
	<link>http://www.turnleafdesign.com</link>
	<description>Ramblings of a junior developer</description>
	<lastBuildDate>Thu, 21 Oct 2010 01:39:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>6 traits of successful developers</title>
		<link>http://www.turnleafdesign.com/6-traits-of-successful-developers</link>
		<comments>http://www.turnleafdesign.com/6-traits-of-successful-developers#comments</comments>
		<pubDate>Thu, 16 Sep 2010 04:40:47 +0000</pubDate>
		<dc:creator>Billy Korando</dc:creator>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[Best practices]]></category>

		<guid isPermaLink="false">http://www.turnleafdesign.com/?p=336</guid>
		<description><![CDATA[While perhaps easier to get into than it should be, software development is a difficult and demanding field to be successful in over a long period of time. A lot is asked of developers as we are often given nebulous business requirements and asked to make a functioning system. In my experience here are six [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.turnleafdesign.com%2F6-traits-of-successful-developers"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.turnleafdesign.com%2F6-traits-of-successful-developers&amp;source=TurnleafDesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>While perhaps easier to get into than it should be, software development is a difficult and demanding field to be successful in over a long period of time. A lot is asked of developers as we are often given nebulous business requirements and asked to make a functioning system. In my experience here are six traits all successful developers seem to poses.</p>
<h4>1.Pupil</h4>
<p>For a developer to be successful over any period of time a continued commitment to learning is absolutely vital. The field is too large, too quickly changing, and too in depth for any developer to ever "know it all." Luckily there are a lot of resources a developer can use to learn; books, co-workers, classes, <a href="http://www.turnleafdesign.com/" target="_blank">blogs</a>, among many others.</p>
<p>In my personal experience I have found one of the best resources for learning have been my co-workers. Books, classes, and most online resources are largely impersonal and geared toward large audiences, they simply cannot provide the help that a co-worker familiar with your issue or habits can provide. Which leads me to my next important trait...</p>
<p><span id="more-336"></span></p>
<h4>2.Mentor</h4>
<p>As a developer understands he does not know it all, he will also realize that this same quality exists in all developers. It is important for every developer to act up this knowledge and be willing to help other developers learn. It is particularly important when dealing with junior developers, those fresh out of school. Often these developers know just enough to be dangerous and do not realize this yet, so it is important to teach junior developers good practices, to prevent them from picking up (and potentially propagating) bad practices.</p>
<p>There is a responsibility in being a mentor and that is ensuring the knowledge being passed on is good. I have taken this responsibility <a href="http://www.turnleafdesign.com/trends-getters-and-setters-going-the-way-of-the-dinosaur" target="_blank">for granted in the past</a>, at the time I didn't understand the importance of getters and setters and I irresponsibly suggested not to use getter setters. Mentors who take this responsibility seriously however end up helping themselves just as much they help others. In order to understand why a practice is good a deep understanding is often required and understanding the fundamentals of a concept in my experience offers the most benefit.</p>
<h4>3.Flexible</h4>
<p>As alluded to under the pupil trait, software development is a rapidly changing discipline. Developers must constantly be looking at and reviewing their practices to see where improvements can be made. Much of the time the improvements are small and incremental, but occasionally entire upheavals must take place. A developer must be willing to accept that one day practices and technologies once relied upon have become obsolete and entirely new technologies and practices must be learned. Clearly this isn't an endorsement to blindly jump on <a href="http://highscalability.com/blog/2010/9/5/hilarious-video-relational-database-vs-nosql-fanbois.html" target="_blank">every new trend</a>, but to be aware of how the industry is evolving, familiar with the emerging technologies and practices, and willing to learn them should your job or the industry demand it.</p>
<h4>4. Tester</h4>
<p>Testing isn't simply a responsibility of the QA team. It is a core responsibility of a software developer. Testing isn't just part of the development process, but even the design process, from both a business and system perspective. The system perspective is somewhat obvious, but testing can also play a role in change business requirements as well; scenarios could be discovered that were not previously accounted for, or a technology may be found to be inadequate to meet business needs.</p>
<p>Testing, specifically unit testing, is also an important part of writing quality and maintainable code. In the same way a structural engineer writes mathematical models to test his design and eventually creates scale models, a software developer writes unit tests to test his code. Unit tests give a developer instant feedback on rather the changes made broke the system, or fixed an issue. Just like it is a responsibility of a mentor to pass on good knowledge it is the responsibility of developers to write good tests. Good unit tests replicate real world scenarios as well as hit fringe scenarios and negative scenarios. Obviously such a task would be extremely laborious to write for an entire system, so it is important for developers to recognize when this practice must be applied.</p>
<h4>5. Farmer</h4>
<p>Just as a crop is a farmer's livelihood code is a developer's. A lot goes into growing crops, a farmer must; pick good seeds, ensure the fields are fertile, and be ever vigilant against pests. Similarly it is every developer's responsibility to; ensure the code he adds to is of good quality, ensure there are ways of monitoring it's continued quality, and remove bad code when found.</p>
<h4>6. Reporter</h4>
<p>Every so once in a while a picture comes along to <a href="http://imgur.com/jacoj" target="_blank">perfectly describe a point</a>. Few things are more infuriating to a developer than to be told there is a problem and given no additional information. It considerably increases the time turnaround time to fixing an issue (if one actually exists) as a developer must track down what he thinks is the problem.</p>
<p>This issue isn't just relegated to when a problem arises or just non-developers (which is why this trait is included). As a company grows its developers become increasingly specialized and responsible for individual systems within a collective whole. Before asking a question a developer should read up on a system's documentation (a lot of times a question need not be asked), good questions lead to good answers and ultimately a lot less frustration on both sides. Conversely a developer should also provide good documentation on the system(s) he is responsible for.</p>
<p>So there are six traits every successful developer should have. If you have suggestions for traits I should add or disagree with the ones I listed leave a comment.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3063474103916505";
/* 468x60, created 9/14/09 */
google_ad_slot = "1115297999";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Best+practices' rel='tag' target='_blank'>Best practices</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.turnleafdesign.com/6-traits-of-successful-developers/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Ramblings: Should unit tests talk to a data source?</title>
		<link>http://www.turnleafdesign.com/ramblings-should-unit-tests-talk-to-a-data-source</link>
		<comments>http://www.turnleafdesign.com/ramblings-should-unit-tests-talk-to-a-data-source#comments</comments>
		<pubDate>Thu, 05 Nov 2009 04:48:40 +0000</pubDate>
		<dc:creator>Billy Korando</dc:creator>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[Best practices]]></category>
		<category><![CDATA[Mock]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Unit testing]]></category>

		<guid isPermaLink="false">http://www.turnleafdesign.com/?p=280</guid>
		<description><![CDATA[Last week I published an article on test driven development. One person who read my article (briefly) suggested I did not know that unit tests shouldn't talk to their data source. I plan on covering how to mock JDBC connections later this week, however I wanted to do some research to see if what my [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.turnleafdesign.com%2Framblings-should-unit-tests-talk-to-a-data-source"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.turnleafdesign.com%2Framblings-should-unit-tests-talk-to-a-data-source&amp;source=TurnleafDesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Last week I published an article on test driven development. One person who read my article (briefly) suggested I did not know that unit tests <a href="http://www.reddit.com/r/programming/comments/9yq8p/an_intro_into_test_driven_development_with_junit4/c0f29uc" target="_blank">shouldn't talk to their data source</a>. I plan on covering how to mock JDBC connections later this week, however I wanted to do some research to see if what my critic says is an industry standard or a philosophical choice.</p>
<p>Surprisingly there seems to be relatively little information on this subject, or I have been incapable of finding information. From what I have gathered though, the theory that data sources should be mocked is sound, but its may not always be practical to implement it. Below is two reasons why data source connections should be mocked and three reasons why they should not. <span id="more-280"></span></p>
<h3>Why you should mock connections</h3>
<p><strong>Speed –</strong> Talking to a data source is one the primary operations that slows an application's performance. Most data sources require some sort of network connection and retrieving data is often a processor intensive task. Obviously performing these tasks take time. Unit tests are most useful when they are run automatically and frequently to ensure changes being made are not breaking the application. Unit tests that are run automatically should be somewhat speedy, by mocking a data source connection, this can reduce considerably the amount of time it takes to run unit tests.</p>
<p><strong>Remove the reliance on the data source logic –</strong> Unit tests should be testing relatively small parts of code, individual methods and/or small collections of methods. By connecting to a data source you are depending upon the logic of not only how you are connecting, but how the data source operates. This goes beyond the scope of what a unit test should be testing.</p>
<h3>Why you shouldn't mock connections</h3>
<p><strong>It's time consuming –</strong> Writing mocks can be a quite laborious task. I often avoid writing mocks like the plague, because even relatively simple mocks can require a considerable amount of time to get running and running correctly. Even my very simple example of running a single query against a five column table took several hours to setup. Granted this was my first time creating a JDBC mock and future mocks would be easier and quicker to write, but it would still take longer than simply connecting to my database.</p>
<p><strong>It's ugly –</strong> It takes a lot of typing to get even relatively simple mocks working. A lot of the rules that apply to how real business code should be written need not be followed when writing unit tests, that said looking at the code of a unit test shouldn't make your eyes bleed. Unit tests that cannot be easily maintained often become ignored when they break and broken unit test have no value (if ignored).</p>
<p><strong>It's not real – </strong>Mocks don't really care what you put into or take out of them. Real data sources are often not so forgiving. If I misspelled a column or table name in a query, a mock would not pick up on this (you can verify the sql statements run, but again that could be misspelled), where as a real database would. By actually connecting to the real data source you can be more confident that the application will perform its intended tasks.</p>
<h3>Why you should use your head</h3>
<p>Even within the same project there will be instances where mocking a connection to a data source is the right choice and instances when you should actually connect to a real data source. In the early stages of a project using mocks can be more practical as the structure of the data source is more abstract and subject to change. Rewriting a mock is often quicker and easier than restructuring a data source. However as a project matures and the unit tests become more complex, connecting to the real data source may be more practical as it is not only (more) well defined, but writing the mocks begins to require more time. As with all practices, you need decide which one is best to follow (or not) based upon your requirements and restrictions. Though I think it is worth noting standards are standards for a reason. Feel free to weigh in with your own thoughts on the subject.</p>
<p>Additional reading:<br />
<a href="http://www.javaranch.com/journal/2003/12/UnitTestingDatabaseCode.html" target="_blank">http://www.javaranch.com/journal/2003/12/UnitTestingDatabaseCode.html</a><br />
<a href="http://www.buunguyen.net/blog/unit-testing-the-data-access-layer.html" target="_blank">http://www.buunguyen.net/blog/unit-testing-the-data-access-layer.html</a><br />
<script type="text/javascript"><!--
google_ad_client = "pub-3063474103916505";
/* 468x60, created 9/14/09 */
google_ad_slot = "1115297999";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Best+practices' rel='tag' target='_blank'>Best practices</a>, <a class='technorati-link' href='http://technorati.com/tag/Mock' rel='tag' target='_blank'>Mock</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_blank'>Programming</a>, <a class='technorati-link' href='http://technorati.com/tag/Testing' rel='tag' target='_blank'>Testing</a>, <a class='technorati-link' href='http://technorati.com/tag/Unit+testing' rel='tag' target='_blank'>Unit testing</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.turnleafdesign.com/ramblings-should-unit-tests-talk-to-a-data-source/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Comments are a sign of bad code and I am not sorry for saying it</title>
		<link>http://www.turnleafdesign.com/comments-are-a-sign-of-bad-code-and-i-am-not-sorry-for-saying-it</link>
		<comments>http://www.turnleafdesign.com/comments-are-a-sign-of-bad-code-and-i-am-not-sorry-for-saying-it#comments</comments>
		<pubDate>Fri, 23 Oct 2009 05:25:36 +0000</pubDate>
		<dc:creator>Billy Korando</dc:creator>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[Best practices]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.turnleafdesign.com/?p=255</guid>
		<description><![CDATA[In my recent article, 8 signs your code sucks, one of my signs of bad code is: “You need to use comments to explain the code.” I have since taken a lot of flak for suggesting this and I want to clarify my point and why I am not backing down. Not javadoc - I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.turnleafdesign.com%2Fcomments-are-a-sign-of-bad-code-and-i-am-not-sorry-for-saying-it"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.turnleafdesign.com%2Fcomments-are-a-sign-of-bad-code-and-i-am-not-sorry-for-saying-it&amp;source=TurnleafDesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In my recent article, <a href="http://www.turnleafdesign.com/?p=246" target="_blank">8 signs your code sucks</a>, one of my signs of bad code is: “You need to use comments to explain the code.” I have since taken a lot of flak for suggesting this and I want to clarify my point and why I am not backing down.</p>
<p><strong>Not javadoc </strong>- I am NOT referring to <a href="http://en.wikipedia.org/wiki/Javadoc" target="_blank">Javadoc</a> or its equivalents in other languages. I absolutely do agree that a method or class should have accompanying documentation at its declaration stating its purpose and its inputs and/or outputs.<br />
<span id="more-255"></span><br />
<strong>Comments are not bad, the code is</strong> – I'm not suggesting to forgo the use of comments, but that they are only band-aids. When you don't have time to properly write a piece of code; do it the “messy” way, write a comment and give it a TODO as a reminder to go back and fix it later.</p>
<p><strong>Comments make code accessible </strong>- Code should not be written to the level of the dumbest developer, the dumbest developer should be brought to the level of the code (though I want to reiterate good code should be easily readable). If a developer is unwilling or unable to meet or at least understand the rest of the team's coding standards, then questions should be asked rather you want that developer to understand the code at all.</p>
<p><strong>They are more like guidelines</strong> – When it comes to design patterns there are no rules. From day one we are taught goto statements are evil and should never be used, but <a href="http://kerneltrap.org/node/553/2131" target="_blank">there is even a time and place for them</a>. There may be rare occasions when you have to write a comment to explain a piece of code, just like you may need to use a goto to simplify the code, but both occasions are rare and when encountered in code should be scrutinized.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3063474103916505";
/* 468x60, created 9/14/09 */
google_ad_slot = "1115297999";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Best+practices' rel='tag' target='_blank'>Best practices</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_blank'>Programming</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.turnleafdesign.com/comments-are-a-sign-of-bad-code-and-i-am-not-sorry-for-saying-it/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>8 Signs your code sucks</title>
		<link>http://www.turnleafdesign.com/8-signs-your-code-sucks</link>
		<comments>http://www.turnleafdesign.com/8-signs-your-code-sucks#comments</comments>
		<pubDate>Thu, 22 Oct 2009 03:58:57 +0000</pubDate>
		<dc:creator>Billy Korando</dc:creator>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[Best practices]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.turnleafdesign.com/?p=246</guid>
		<description><![CDATA[As a wide eyed junior developer when I first began working on large projects I simply accepted that it is difficult to fix bugs or find where an action is being executed. If only I knew then what I know now, I would had saved myself hours of frustration. The first step to writing good [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.turnleafdesign.com%2F8-signs-your-code-sucks"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.turnleafdesign.com%2F8-signs-your-code-sucks&amp;source=TurnleafDesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>As a wide eyed junior developer when I first began working on large projects I simply accepted that it is difficult to fix bugs or find where an action is being executed. If only I knew then what I know now, I would had saved myself hours of frustration. The first step to writing good code is accepting the code you write (or work on) is crap, but sometimes you need to know what to look for. Here are some signs that your code sucks.</p>
<p><strong>A method is larger than the screen </strong>– A method should only perform one specific task. A method should not contain the logic code to determine if the username field contains data, is valid, and that user exists. If a method is too large to fit within a single screen, that is a (very) good sign it is doing too much.<br />
<span id="more-246"></span><br />
<strong>You are reusing variables </strong>– Unless you are working on embedded devices, memory is cheap. Don't be a memory scrooge and knee cap code maintainability, which in nearly all instances trumps performance, by reusing the same variable for multiple uses.</p>
<p><strong>You are directly accessing the request/session </strong>– It not only makes writing unit tests (much) harder, but it is also difficult to know what data the application has access to. All data should be taken out of the session/request and stored in a bean. A bean, through its getters and setters, creates a “contract” of what data the application has access to, which greatly helps with code maintainability.</p>
<p><strong>You need to use comments to explain the code</strong> – Code should be able to explain itself and should be in a format that is easily readable. If you find yourself needing to explain what your code is doing then you may want to look into rewriting that code.<br />
<strong>EDIT:</strong> This is not referring to using comments (e.g. javadoc) to explain the purpose of a method/class and its inputs and outputs.</p>
<p><strong>An exception's stack trace doesn't return the original problem</strong> -  You should never “eat” an exception, that is catch an exception, but not print its stack trace. How can a bug be fixed if you don't even know where the bug is occurring?</p>
<p><strong>Your code is a mud ball</strong> – Just the name sounds ugly. A “mud ball” is when there is little separation between the layers or <a href="http://en.wikipedia.org/wiki/Concern_(computer_science)" target="_blank">concerns</a> of an application. Code should be modular allowing for ease of reusability and modifiability. Anything concerning the user interface happens in the view, program flow and usually data validation is the domain of the controller, handling business logic is the model's job, and only the model should be interacting with the data access layer.</p>
<p><strong>It is hard to write a unit test</strong> – If you find a bug or write a new piece of code and it takes you more than a few minutes to write a unit test then that portion of code is handling too complex of a task.</p>
<p><strong>The author is <a href="http://www.turnleafdesign.com/?page_id=2" target="_blank">Billy Korando</a></strong> – Wait what?!</p>
<p>Add your own experiences or signs for dealing with sucky code.</p>
<p><strong>UPDATE:</strong> There are differing opinions on my signs, since I am but a mere "grasshopper" I maybe wrong. Anyways <a href="http://www.reddit.com/r/learnprogramming/comments/9wp2a/8_signs_your_code_sucks/c0esu86" target="_blank">check it out and make up your own mind.</a><br />
<script type="text/javascript"><!--
google_ad_client = "pub-3063474103916505";
/* 468x15, created 9/22/09 */
google_ad_slot = "6237316105";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Best+practices' rel='tag' target='_blank'>Best practices</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_blank'>Programming</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.turnleafdesign.com/8-signs-your-code-sucks/feed</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>12 Tips to make you more productive using Eclipse</title>
		<link>http://www.turnleafdesign.com/12-tips-to-make-you-more-productive-using-eclipse</link>
		<comments>http://www.turnleafdesign.com/12-tips-to-make-you-more-productive-using-eclipse#comments</comments>
		<pubDate>Tue, 20 Oct 2009 04:28:16 +0000</pubDate>
		<dc:creator>Billy Korando</dc:creator>
				<category><![CDATA[Noob Corner]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.turnleafdesign.com/?p=240</guid>
		<description><![CDATA[Integrated development environments make developing application fair easier. They highlight syntax, let you know if you have a compilation error, and allow you to step through your code among so many other things. Like all IDEs Eclipse has a bunch of little shortcuts and tools that can make your life a lot easier, I've compiled [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.turnleafdesign.com%2F12-tips-to-make-you-more-productive-using-eclipse"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.turnleafdesign.com%2F12-tips-to-make-you-more-productive-using-eclipse&amp;source=TurnleafDesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Integrated development environments make developing application fair easier. They highlight syntax, let you know if you have a compilation error, and allow you to step through your code among so many other things. Like all IDEs Eclipse has a bunch of little shortcuts and tools that can make your life a lot easier, I've compiled a list of several that I use on a daily basis:</p>
<p><strong>1. Auto-complete</strong> – Eclipse has an auto-complete feature that can be accessed with ctrl + space. When clicked a small pop-up box is displayed with a list of context sensitive suggestions. If there is only one possibility then Eclipse completes it for you.<br />
<span id="more-240"></span><br />
<strong>2. Quickly format your code</strong> – Code that is being heavily modified can quickly become an ugly sight. Without proper indention it can become extremely difficult to determine what is happening in code. Code can be quickly formatted using the shortcut: Ctrl + shift + F. You can even setup your own style rules by going to: Project&gt;Preferences&gt;Java Code Style&gt;Formatter, check “enable project specific settings” edit the profile and then save it under a new name.</p>
<p><strong>3. Get rid of unnecessary code </strong>– Heavily worked on projects that aren't maintained well can quickly build up a bunch of unnecessary imports, casts, among other common easily detectable coding mistakes. Quickly remove these mistakes by running a code clean up. Right click on your project folder&gt;source&gt;clean up. Like the code formatter you can also customize your code clean up.</p>
<p><strong>4. Go to declaration</strong> – Want to know where that method, variable, or class is declared? This can easily be done by holding down ctrl and then clicking on the reference.</p>
<p><strong>5. Find all references</strong> – If you need to find all the references for a method, variable, or class highlight the desired reference right click&gt;reference and select the desired search scope.</p>
<p><strong>6. Quickly select groups of characters</strong> – Need to delete an entire string, or everything within a method's argument declaration? Select the enclosing character (e.g. the “ or "(" respectively), this will select everything within the enclosing characters. This even works with the bodies of classes and methods. You can also select an entire line by triple clicking.</p>
<p><strong>7. Rename all instances </strong>– If you need to rename a method, variable, or class you can rename ever instance by highlighting a reference and pressing alt + shift + r an box will highlight the reference and you can rename it. Upon pressing enter all instance will be renamed in your project.</p>
<p><strong>8. Change a method signature</strong> – If you need to change any part of a methods signature; a methods name, its arguments, or return type, you can quickly make a change to all references of the method in the project by highlighting the method and pressing alt + shift + c a pop-up box will appear giving you options to change the method's signature.</p>
<p><strong>9. Automatically generate getters and setters</strong> – Writing getters and setters is for suckers. After you write out all the members of a class right click anywhere in the code screen&gt;source&gt;generate getters and setters. Select the variables you want to have getters and setters made for.</p>
<p><strong>10. Javadoc is a cinch</strong> – Eclipse makes writing Javadoc easy, just type “/**” and press eneter above a declaration. Eclipse automatically creates context sensitive Javadoc annotations (i.e. a methods parameters, or the author of a class). After that you only have to write out what the method actually does.</p>
<p><strong>11. Run a unit test</strong> – To run a unit test highlight the unit test and press alt + shift + x followed by t. You can also run a unit test in the debugger by pressing alt + shift + <span style="text-decoration: line-through;"></span>d followed by t.</p>
<p><strong>12. Comment out code</strong> – If you need to quickly comment out a chunk of code, highlight the corresponding lines and press ctrl + /, you can uncomment code the say way.</p>
<p>Chime in with your own Eclipse shortcuts.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3063474103916505";
/* 468x60, created 9/14/09 */
google_ad_slot = "1115297999";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_blank'>Programming</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.turnleafdesign.com/12-tips-to-make-you-more-productive-using-eclipse/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Help support Turnleaf Design</title>
		<link>http://www.turnleafdesign.com/help-support-turnleaf-design</link>
		<comments>http://www.turnleafdesign.com/help-support-turnleaf-design#comments</comments>
		<pubDate>Tue, 13 Oct 2009 04:27:51 +0000</pubDate>
		<dc:creator>Billy Korando</dc:creator>
				<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://www.turnleafdesign.com/?p=220</guid>
		<description><![CDATA[If you like what I have to say, share it with others by using the "Share" button at the bottom of every post. This button includes links to all the popular social sites. Help get Turnleaf Design out the masses by submitting an article or up voting already submitted articles. Your help is much appreciated, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.turnleafdesign.com%2Fhelp-support-turnleaf-design"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.turnleafdesign.com%2Fhelp-support-turnleaf-design&amp;source=TurnleafDesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you like what I have to say, share it with others by using the "Share" button at the bottom of every post. This button includes links to all the popular social sites. Help get Turnleaf Design out the masses by submitting an article or up voting already submitted articles. Your help is much appreciated, thanks!</p>

<!-- start wp-tags-to-technorati 1.02 -->

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.turnleafdesign.com/help-support-turnleaf-design/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello from the future</title>
		<link>http://www.turnleafdesign.com/hello-from-the-future</link>
		<comments>http://www.turnleafdesign.com/hello-from-the-future#comments</comments>
		<pubDate>Tue, 13 Oct 2009 04:22:00 +0000</pubDate>
		<dc:creator>Billy Korando</dc:creator>
				<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://www.turnleafdesign.com/?p=214</guid>
		<description><![CDATA[With the publication of the first part of my SVN primer I will begin two major series on my site that will occasionally intermingled. My first series is what I like to refer as “The Promised Land.” This project will cover how to setup up an ideal development environment. Subjects will include version control, Ant [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.turnleafdesign.com%2Fhello-from-the-future"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.turnleafdesign.com%2Fhello-from-the-future&amp;source=TurnleafDesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>With the publication of the first part of my SVN primer I will begin two major series on my site that will occasionally intermingled. My first series is what I like to refer as “The Promised Land.” This project will cover how to setup up an ideal development environment. Subjects will include version control, Ant (build scripts), Ivy (dependency manager), software configuration management (SCM), automated unit testing, and bug tracking. I may add a few subjects as requested or if I find anything else I think might be relevant and interesting. The series is name “The Promised Land” because hopefully by following the advice in the articles a development team can focus only on developing and maintain its applications and not have to worry about any other hassles. I will put all the "Promised Land" articles under the "Promised Land" category. <span id="more-214"></span></p>
<p>The second series and one which I am becoming increasingly excited about is developing a project that will track the accuracy of weather forecasting (I mean it always seems like meteorologist are just guessing). Ok that alone may not sound interesting, but what I plan on doing is using this project as an example for many other important topics. Sometimes it is difficult to understand the usefulness of design principle or a tool without seeing it within the context of an actual project, I plan on addressing this short falling. I already have a huge subject plan lined up:</p>
<p><strong>Design methodology/Best practices</strong></p>
<p style="padding-left: 30px;">MVC<br />
Data access Layer<br />
Framework - Spring<br />
Separating layers; best practices<br />
Methodizing<br />
Usage of static<br />
Interface/implementation<br />
Generics - explanation<br />
Exception vs error handling<br />
where to validate</p>
<p><strong>Development environment</strong></p>
<p style="padding-left: 30px;">Hudson<br />
Ant<br />
Ivy</p>
<p><strong>Unit Testing</strong></p>
<p style="padding-left: 30px;">Test driven design &amp; more advanced JUnit tutorial<br />
DBUnit<br />
JMock<br />
Automated Unit testing</p>
<p><strong>Other</strong></p>
<p style="padding-left: 30px;">XML<br />
JSON<br />
JSPs<br />
Webservices<br />
How to consume Soap/WSDS<br />
How to create REST/WADL<br />
IDE tips</p>
<p>As I get closer to launching this project, which should be next week, I will give more details on how it will work.</p>
<p>I'm really excited about both of these projects and I think both will be very helpful to both new and more experienced developers alike. If you have any questions let me know in the comments section.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.turnleafdesign.com/hello-from-the-future/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What are Java beans?!</title>
		<link>http://www.turnleafdesign.com/52</link>
		<comments>http://www.turnleafdesign.com/52#comments</comments>
		<pubDate>Thu, 17 Sep 2009 01:21:53 +0000</pubDate>
		<dc:creator>Billy Korando</dc:creator>
				<category><![CDATA[Noob Corner]]></category>
		<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://www.turnleafdesign.com/?p=52</guid>
		<description><![CDATA[Sometimes developers use programming jargon that new developers have a hard time comprehending. One term I frequently hear is “bean.” All a JavaBean is, is a class used to define the attributes of a entity; examples of commonly used beans would be person, customer, and employee. A JavaBean typically only contain private attributes and the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.turnleafdesign.com%2F52"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.turnleafdesign.com%2F52&amp;source=TurnleafDesign&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Sometimes developers use programming jargon that new developers have a hard time comprehending. One term I frequently hear is “bean.” All a JavaBean is, is a class used to define the attributes of a entity; examples of commonly used beans would be person, customer, and employee. A JavaBean typically only contain private attributes and the getter and setter methods to access and set those attributes respectively. <span id="more-52"></span>Here is a simple example of what a Java bean looks like:</p>
<blockquote><p>public class Employee {<br />
private String firstName;<br />
private String lastName;<br />
private int yearsExp;<br />
private String title;<br />
private double salary;</p>
<p>public String getFirstName() {<br />
return firstName;<br />
}</p>
<p>public void setFirstName(String firstName) {<br />
this.firstName = firstName;<br />
}</p>
<p>public String getLastName() {<br />
return lastName;<br />
}</p>
<p>public void setLastName(String lastName) {<br />
this.lastName = lastName;<br />
}</p>
<p>public int getYearsExp() {<br />
return yearsExp;<br />
}</p>
<p>public void setYearsExp(int yearsExp) {<br />
this.yearsExp = yearsExp;<br />
}</p>
<p>public String getTitle() {<br />
return title;<br />
}</p>
<p>public void setTitle(String title) {<br />
this.title = title;<br />
}</p>
<p>public double getSalary() {<br />
return salary;<br />
}</p>
<p>public void setSalary(double salary) {<br />
this.salary = salary;<br />
}<br />
}</p></blockquote>
<p>JavaBeans are also commonly referred to as POJOs (Plain old Java objects). The terms are not entirely synonymous, <a href="http://en.wikipedia.org/wiki/Plain_Old_Java_Object">as a POJO refers to a specific type of class</a>, but is none the less often used interchangeably.</p>
<p>Tip: Most IDEs can automatically generate the getter and setter methods for a class' attributes, so don't waste your precious time doing it! In Eclipse just right click any where on the code screen select source&gt;generate getters and setters, and follow the instructions. Simple as pie!<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3063474103916505";
/* 468x60, created 9/14/09 */
google_ad_slot = "1115297999";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<!-- start wp-tags-to-technorati 1.02 -->

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.turnleafdesign.com/52/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

