tag:blogger.com,1999:blog-1438296597376485712024-03-14T00:43:08.722-07:00Coding and Development PracticesThoughts on Code, Hardware, Methodology!Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-143829659737648571.post-703183107719946132014-07-21T18:03:00.001-07:002017-02-27T07:13:14.099-08:00The importance of creativity in a new candidateOver the years I have had the chance to interview a number of people for new positions. I have interviewed potential Business Analysts, Developers, Software Architects, and Product Managers. In all of these cases, one of the main things that I look for is creativity.<br />
<br />
Creativity, in my opinion, is what separates the wheat from the chaff. In the case of a developer, he or she may know the language that the position predominantly requires. He or she may also have experience with the stack and frameworks that you are using, but there is a huge difference between someone who has experience with these things, and someone who can get creative with them.<br />
<br />
There are plenty of people who get caught in the trap of finding a way of doing something and then never finding a better way to accomplish that feat. They never to think why they are doing a thing a certain way and they just always do it that way because "That's the way it's done".<br />
<br />
The thing is if I am working with someone I want them to be questioning the status quo. Asking why can't we change things, and challenging not only they're assumptions but causing me to constantly challenge mine as well. By doing this you fuel team creativity and innovation.<br />
<br />
So how do you find people that fit this criteria. Personally I've been using the following question: "What can you do with a brick" (or a derivative thereof) as a starting point for years. I saw <a href="https://www.linkedin.com/today/post/article/20140716140432-7661497-what-can-you-do-with-a-brick?trk=li_li_corp_sandramiller_creativity&sf3793905=1">this post</a> on LinkedIn about it that pretty much nails it. It's amusing to see how it can completely catch some candidates off guard, and believe it or not apparently it can be very difficult for some people to answer. From there it depends on the position. For developers there are some coding exercises that can give you some insight into the thought processes, and usually asking or challenging them about there answers will give you further insight.Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-17824523136159685852013-09-17T19:30:00.002-07:002017-02-27T07:13:14.068-08:00Using ReportViewer in ASP.NET MVCAbout three and a half years ago I was tasked with building a reporting portal. I elected to go with <a href="http://www.amazon.com/Programming-Microsoft-ASP-NET-Dino-Esposito/dp/0735627142?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">ASP.NET MVC</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0735627142" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> due to the fact that most of the rest of my department was a Ruby shop. I figured if anyone else would have to come in and work on it, at least they wouldn't have to struggle with the idea of ASP.NET WebForms.<br />
<br />
Now one challenge was that this was a publicly facing site, but the reports could only be seen by authenticated users with the right permissions. The main challenge however is the fact that ReportViewer requires that a page be able to store Session State. By definition MVC is Stateless.<br />
<br />
So how do we solve this problem? Luckily the folks at Microsoft allowed us to have WebForms and MVC applications side by side. So the simplest solution is to just include a new webform page as part of the Solution.<br />
<br />
The first thing we need to do is get our criteria. I'm assuming that you want to pass in some parameters to the ReportViewer, so lets grab those from our Form Collection and build our Action.<br />
<br />
[AcceptVerbs(HttpVerbs.Post)]<br />
public ActionResult BuildReport(FormCollection collection)<br />
{<br />
try<br />
{<br />
// Load Form Data into a report object<br />
DynamicReport report = new DynamicReport( collection["AccountName"], Convert.ToDateTime(collection["StartDate"]), Convert.ToDateTime(collection["EndDate"]));<br />
// Save Report to Session<br />
Session["Report"] = report;<br />
//Redirect to Reports WebForm Page<br />
Response.Redirect("../Report.aspx");<br />
}<br />
catch (Exception e)<br />
{<br />
return RedirectToAction("Error", new { id = (int)ErrorCode.Unknown });<br />
}<br />
}<br />
<br />
<div>
Its just that easy. Can't believe this has been sitting in draft status for that long....</div>
Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-34132964552259279962013-09-16T10:36:00.000-07:002013-09-16T10:36:52.840-07:00Software Development and Quality EngineeringI can't tell you how many times I have heard developers and managers pay lip service to quality and testing. I cringe every time I hear the words "quality is important to us, but we need this done ASAP!" from management. I likewise cringe every time I hear a developer say "I did a quick test on it, QA will catch anything I missed". Both of the previous statements are just wrong. More importantly they are idiotic and a total fucking cop out. If code quality is of any importance whatsoever, it is absolutely VITAL that you think about the quality of the final product before you even start coding.<br />
<br />
There are two huge hurdles that most organizations must overcome if they want to produce a quality product. These two hurdles are going to sound so idiotically simple, that you may stop reading, but please bare with me, as I explain. One hurdle is time, the second is terminology. I know those sound kind of silly but hear me out.<br />
<br />
<h2>
Time</h2>
<div>
We all know that there are deadlines that must be met. Sometimes we absolutely positively MUST get a deliverable out the door. The thing is, this does not happen in a vacuum. Working more hours, eating into testing time, sacrificing writing unit tests, throwing in hacks that will be "fixed later" all ends up sacrificing code quality. </div>
<div>
<br /></div>
<div>
I'm sure as developers we've all at least heard of the <a href="http://en.wikipedia.org/wiki/The_Mythical_Man-Month">mythical man month</a>. The idea that throwing more developers at a project actually makes the project last longer. Yet this same phenomenon seems to be completely ignored when it comes time to complete Quality or User Testing! You cannot compress testing time and throw more testers at a problem and expect a quality result! It doesn't work that way! Have you ever seen a large group of testers testing functionality? It's a logistical fucking nightmare to begin with. Duplicate bugs are regularly reported leading to multiple developers trying to fix the same code from multiple different spots, which either leads to wasted time and duplicate effort and frustrations by both developers and testers!</div>
<div>
<br /></div>
<div>
Yet it seems in many places when a testers say we need two weeks to test some critical part of the system, it's viewed as a nice to have. This is simply not the case! Good testers understand that what they are doing is making sure that user doesn't have a "what the fuck" moment. Ultimately I hope you realize what a user with too many "what the fuck" moments can also be a called an "ex-user".</div>
<div>
<br /></div>
<h2>
Terminology</h2>
<div>
This brings me to my next point which is terminology. I purposely used the word "tester" in my previous section, but you know what, that's the wrong word. In Software Engineering we are so fortunate to have a vocabulary that allows us to express abstract concepts to quickly convey meaning. Language, Object Oriented, Classes, Methods, Interfaces, Factories, Constructors, Compiler, Scripts all great words, and for the most part universal for developers. These words are important in their own ways, and yet it seems for some reason when it comes to code quality and testing we don't have quite the same vocabulary.</div>
<div>
<br /></div>
<div>
I absolutely abhor the word "Tester" to describe what these individuals do. Oh sure, they run tests, but that just makes it sound like something a monkey could do, and quite frankly that's just very, very wrong. Likewise I dislike the term Quality Assurance as that term seems to express the idea that quality is something that should be bolted on to the end of a project. Which in turn leads to the perception that you are "testing" the deliverable. This too is wrong.</div>
<div>
<br /></div>
<div>
Quality should be the focus throughout the process. Quality of the code written. Quality of the design and architecture. Quality of the final deliverable. This is not an process that can happen at the end, but a process that should happen THROUGHOUT the cycle! So since this is something that should happen throughout the process, the job description and name should change. I personally like the term that my friend and boss Pat Richards uses: Quality Engineering. After all that is what this process is aiming to do! </div>
<div>
<br /></div>
<div>
Most importantly though, by changing the name to Quality Engineering you change what it is you are actually trying to accomplish. You are engineering quality right into the process. It makes much more sense to have someone who is called a Quality Engineer being a part of the initial design and estimation sessions, and that is a huge part of why Terminology is so important! </div>
<div>
<br /></div>
<div>
Changing what you call something can totally revamp the way you look at its function. Equally important is making sure that everyone uses the SAME terminology. I have had a developer say to me "I am in the process of unit testing my code." That to me meant they were writing automated unit tests, since that's the terminology I use. What they meant was that they were doing developer testing on the module they had just wrote. They weren't wrong with how they phrased it, but because we weren't on the same page with terminology, I made some very wrong assumptions on the code base.</div>
<div>
<br /></div>
<div>
The same problems can arise on the transition from Development to Testing cycles. This too is why it is so important that Quality Engineers be involved in the whole process from beginning to end. By being embedded with the team that is developing a module, they come to use the same common terminology as the team, thereby decreasing communication problems and increasing understanding and thereby productivity. After all not having to circle back to make sure you think you understand whats going on is a huge time saver. </div>
<div>
<br /></div>
<div>
So bottom line is if you want to make sure you are delivering quality products, you have to be sure that you have a process in place that supports it. Robbing Peter to pay Paul by giving developers more time to write code and sacrificing final testing time is a quick way to failure. Likewise treating testing like it is something that CAN be sliced and sacrificed is a quick way to doom you deliverable to failure (or at least poor results). Never underestimate the importance of your choice in wording, and naming. Names have power that create preconceived notions in others. If you want to ensure quality, make sure the terminology that you use empowers that agenda. In addition make sure everyone is on the same page and speaking the same language. Anything short of that is a quick road to a bad result.</div>
Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-26075470644387491172013-09-13T09:07:00.001-07:002013-09-13T12:17:51.188-07:00Coding for readabilityI've read many books, sites and blog posts that explore the topic of what it means to write "good code". As a general rule they seem to mostly come down to "write the most efficient code possible". While as a rule of thumb I feel you should keep an eye on efficiency, I would argue that a more important point is writing code for readability. <div>
<br /></div>
<div>
The reality is that over time even the most inefficiently written code will run better on faster hardware. Horribly inefficient code written 10 years ago runs blazingly fast today. That's not to say that you should sacrifice efficiency because it doesn't matter, but if you sacrifice readability for efficiency you end up causing problems later on. Let me give you an example.</div>
<div>
<br /></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"></span><span style="color: #009695;"> public</span><span style="color: #444444;"> </span><span style="color: #009695;">class</span><span style="color: #444444;"> </span><span style="color: #444444;">HelperClass</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #444444;">HelperClass</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">)</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">All</span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">for</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">x</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"><=</span><span style="color: #444444;">y</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;">+</span><span style="color: #444444;">+</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">Console</span><span style="color: #444444;">.</span><span style="color: #444444;">WriteLine</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">Evens</span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">for</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">x</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"><=</span><span style="color: #444444;">y</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;">+</span><span style="color: #444444;">+</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span></span></span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">//</span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">if</span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;"> </span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">its modulus is 0 it must be even</span><span style="font-family: Menlo;"><span style="font-size: x-small;"><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">if</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">%</span><span style="color: #444444;"> </span><span style="color: #f57d00;">2</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #f57d00;">0</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">Console</span><span style="color: #444444;">.</span><span style="color: #444444;">WriteLine</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">Odds</span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">) </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">for</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">x</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"><=</span><span style="color: #444444;">y</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;">+</span><span style="color: #444444;">+</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span></span></span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">//</span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">if</span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;"> </span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">its modulus is not 0 it must be odd</span><span style="font-family: Menlo;"><span style="font-size: x-small;"><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">if</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">%</span><span style="color: #444444;"> </span><span style="color: #f57d00;">2</span><span style="color: #444444;"> </span><span style="color: #444444;">!</span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #f57d00;">0</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">Console</span><span style="color: #444444;">.</span><span style="color: #444444;">WriteLine</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">static</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">DoIt</span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span></span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">HelperClass</span><span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"> </span><span style="color: #444444;">hlpr</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #009695;">new</span><span style="color: #444444;"> </span><span style="color: #444444;">HelperClass</span><span style="color: #444444;">(</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">hlpr</span><span style="color: #444444;">.</span><span style="color: #444444;">All</span><span style="color: #444444;">(</span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">hlpr</span><span style="color: #444444;">.</span><span style="color: #444444;">Evens</span><span style="color: #444444;">(</span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">hlpr</span><span style="color: #444444;">.</span><span style="color: #444444;">Odds</span><span style="color: #444444;">(</span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span><br /><span style="color: #444444;"> </span><span style="color: #444444;">}</span></span><br />
</span></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"><br /></span></span></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">Look its a simple example, I know. I'm not trying to show off some elite coding skill, that's not the point. I want this to be useful to as many people as possible. So let me bring up a few things that could seriously increase readability.</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<h2>
<u><span style="color: #444444; font-family: Menlo;"><b>Naming Your Classes</b></span></u></h2>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;">public</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;">class</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">HelperClass</span></div>
<div>
<u><span style="color: #444444; font-family: Menlo;"><br /></span></u></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">The word helper is REALLY tempting to use. After all, if you are coding very quickly (and lets be honest with deadlines we all take shortcuts), it can be tempting to just say "I'm going to be using this code in more than one place, because I'm trying to write good DRY (Don't Repeat Yourself) code". This leads to two problems though. The first is that when you go to actually call your code you end up with calls like this:</span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> var</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">hlpr</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">=</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;">new</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">HelperClass</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">;</span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> hlpr</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">.</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">All</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">x</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">,</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">y</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">;</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">Ugly. Taken out of context, what the fuck is this actually doing? When you are trying to rip through this code in three weeks time trying to debug something, you are going to waste time circling back and reminding yourself what it is you were trying to write. The Second problem it brings up is that when you name something helper, it almost IMMEDIATELY becomes a dumping ground. It's amazing what ends up in those classes after a team of developers has had one of those around for a while. After a while they become a huge amorphous blob of crap and cruft that has to then has to be refactored thereby changing HUGE underpinnings of your application with it. It's not pretty I don't recommend it. So whats the easiest way to solve this? Call it what it is! In this case, </span><span style="font-size: x-small;"><span style="color: #009695; font-family: Menlo;">public</span><span style="color: #444444; font-family: Menlo;"> </span><span style="color: #009695; font-family: Menlo;">class</span><span style="color: #444444; font-family: Menlo;"> </span><span style="color: #444444; font-family: Menlo;">NumberPrinter!</span></span></div>
<div>
<span style="font-size: x-small;"><span style="color: #444444; font-family: Menlo;"><br /></span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"></span><span style="color: #009695;"> </span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">NumberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> </span><span style="color: #444444;">prtr</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #009695;">new</span><span style="color: #444444;"> </span><span style="color: #444444;">NumberPrinter</span><span style="color: #444444;">(</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;">prtr</span><span style="color: #444444;">.</span><span style="color: #444444;">All</span><span style="color: #444444;">(</span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span></span>
</div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"><br /></span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">That's better but I think this leads to my next point</span></span></div>
<div>
<br /></div>
<h2>
<span style="color: #444444; font-family: Menlo; font-size: large;"><u>Naming Your Variables</u></span></h2>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">NumberPrinter</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">prtr</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">=</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;">new</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">NumberPrinter</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">;</span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">prtr</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">.</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">All</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">x</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">,</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">y</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">;</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">Guys, you really aren't saving anything other than keystrokes if you don't give good descriptive variable names. The compiler doesn't care what you call your variable, but you know who will? The next developer who comes along. Changing this variable name to numberPrinter goes along way to making people happy.</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #009695;"> </span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">NumberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> </span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">numberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #009695;">new</span><span style="color: #444444;"> </span><span style="color: #444444;">NumberPrinter</span><span style="color: #444444;">(</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br /><span style="color: #444444;"> </span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">numberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">.</span><span style="color: #444444;">All</span><span style="color: #444444;">(</span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span></span></div>
</div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"><br /></span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">Well that's good, but now look at the line </span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">numberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">.</span><span style="color: #444444;">All</span><span style="color: #444444;">(</span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">). I mean that doesn't exactly read well. Plus going back to my previous point of dumping grounds, the word All in this case is a little generic...</span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"><br /></span></span></div>
<h3>
<span style="color: #444444; font-family: Menlo; font-size: large;"><u>Naming Your Methods</u></span></h3>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"></span><span style="color: #009695;"> public</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">All</span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">for</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">x</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"><</span><span style="color: #444444;">y</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;">+</span><span style="color: #444444;">+</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">Console</span><span style="color: #444444;">.</span><span style="color: #444444;">WriteLine</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span></span><br />
</span></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"><br /></span></span></span></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;">What is this method actually doing? All is not very descriptive. How about giving it a more accurate name, like PrintAllNumbersBetweenBeginningNumberAndEndNumber? Sure its a lot longer but lets look at it in use:</span></span></span></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"><br /></span></span></span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> public</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;">void</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">PrintAllNumbersBetweenBeginningNumberAndEndNumber</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #009695; font-family: Menlo; font-size: x-small;">int</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">x</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">,</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;">int</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">y</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">{</span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;">for</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #009695; font-family: Menlo; font-size: x-small;">int</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">i</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">=</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">x</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">;</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">i</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"><</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">y</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">;</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">i</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">+</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">+</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">Console</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">.</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">WriteLine</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">i</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">;</span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">}</span></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"><br /></span></span></span></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;">That parts not too bad.</span></span></span></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"><br /></span></span></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"> NumberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> </span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">numberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #009695;">new</span><span style="color: #444444;"> </span><span style="color: #444444;">NumberPrinter</span><span style="color: #444444;">(</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br /><span style="color: #444444;"> </span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">numberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">.</span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">PrintAllNumbersBetweenBeginningNumberAndEndNumber</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">(</span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span></span></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"><br /></span></span></span></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;">Holy crap! I now know what that is doing without looking at the code! YAY! But wait, which parameter is the beginning and which one is the end... I damn, guess that needs fixing too!</span></span></span></div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"><br /></span></span></span></div>
<h2>
<span style="color: #444444; font-family: Menlo; font-size: large;"><u>Naming Your Parameters</u></span></h2>
<div>
<span style="font-family: Menlo;">
<span style="color: #444444;"> <span style="font-size: x-small;"> </span></span><span style="font-size: x-small;"><span style="color: #444444;"> </span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">PrintAllOddBetweenBeginningNumberAndEndNumber</span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">x</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">for</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">x</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"><=</span><span style="color: #444444;">y</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;">+</span><span style="color: #444444;">+</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span></span></span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">//</span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">if</span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;"> </span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">its modulus is not 0 it must be odd</span><span style="font-family: Menlo;"><span style="font-size: x-small;"><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">if</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">%</span><span style="color: #444444;"> </span><span style="color: #f57d00;">2</span><span style="color: #444444;"> </span><span style="color: #444444;">!</span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #f57d00;">0</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">Console</span><span style="color: #444444;">.</span><span style="color: #444444;">WriteLine</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span></span></span>
</div>
<div>
<span style="font-family: Menlo;"><span style="font-size: x-small;"><span style="color: #444444;"><br /></span></span></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">Anyone want to guess what this method is doing? Oh wait, you don't have to guess! You can tell from the name! How awesome is that! Unfortunately we don't know which parameter is the beginning and which is the end. Naming a parameter follows the same idea as both variables methods and classes! Be descriptive! Lets label our parameters with what they actually are to the method! So x becomes beginningNumber, and y becomes endingNumber! Brilliant!</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> public</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;">void</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">PrintAllOddBetweenBeginningNumberAndEndNumber</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #009695; font-family: Menlo; font-size: x-small;">int</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">beginningNumber</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">,</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> int</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">endingNumber</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">{</span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;">for</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #009695; font-family: Menlo; font-size: x-small;">int</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">i</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">=</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> beginningNumber</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">;</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">i </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"><=</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> endingNumber</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">;</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">i</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">+</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">+</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">//</span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">if</span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;"> </span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">its modulus is not 0 it must be odd</span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;">if</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">i</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">%</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #f57d00; font-family: Menlo; font-size: x-small;">2</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">!</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">=</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #f57d00; font-family: Menlo; font-size: x-small;">0</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">Console</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">.</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">WriteLine</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">i</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">;</span><br style="font-family: Menlo; font-size: small;" /><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">}</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">Well that IS better. I mean look:</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">NumberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> </span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">numberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #009695;">new</span><span style="color: #444444;"> </span><span style="color: #444444;">NumberPrinter</span><span style="color: #444444;">(</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">numberPrinter</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">.</span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">PrintAllNumbersBetweenBeginningNumberAndEndNumber</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">(</span></span><span style="color: #444444; font-family: Menlo; font-size: x-small;">beginningNumber,</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> </span></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"> endingNumber</span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">)</span><span style="color: #444444;">;</span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"><br /></span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">But Alex, you are thinking what about the i variable in the for loop! That's not descriptive. There is so many ways you can describe the counter in a for loop. counter being one of them. If you want to get creative that's fine, but most people learn this structure using i, so generally this is a pretty safe use for a crappy variable name. But you know whats bothering me about the method code? Lack of curly braces...</span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"><br /></span></span></div>
<h2>
<span style="color: #444444; font-family: Menlo; font-size: large;"><u>Use White space, and available Lexemes!</u></span></h2>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">What to I mean by Lexeme? Well in this case I'm going to referring to Curly braces! We all know that in C languages you don't HAVE to use them all the time, there are exceptions. But in this case I think we may want to look and make sure we are making our code readable:</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;">
<span style="color: #444444;"></span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">PrintAllOddBetweenBeginningNumberAndEndNumber</span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #009695;"> int</span><span style="color: #444444;"> </span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">for</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"><</span><span style="color: #444444;">=</span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;">+</span><span style="color: #444444;">+</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span></span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">//</span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">if</span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;"> </span><span style="color: #999988; font-family: Menlo; font-size: x-small; font-style: italic;">its modulus is not 0 it must be odd</span><span style="font-family: Menlo; font-size: x-small;"><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">if</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">%</span><span style="color: #444444;"> </span><span style="color: #f57d00;">2</span><span style="color: #444444;"> </span><span style="color: #444444;">!</span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #f57d00;">0</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">Console</span><span style="color: #444444;">.</span><span style="color: #444444;">WriteLine</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span></span>
</div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"><br /></span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"><br /></span></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">Look Ma! I moved my white space and curly braces wherever I felt like! Guess what the computer can read that correctly! Other developers, will probably fuck up, and then get pissed off when can't figure out why there code isn't working. Just because you don't HAVE to use something, doesn't mean you shouldn't. I don't HAVE to use the turning signal on my car, but generally I feel its a pretty good idea. It makes it a bunch easier for other drivers on the road to know what it is I am actually trying to do... So lets fix this!</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">PrintAllOddBetweenBeginningNumberAndEndNumber</span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #009695;"> int</span><span style="color: #444444;"> </span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br /><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">for</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"><</span><span style="color: #444444;">=</span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;">+</span><span style="color: #444444;">+</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> {</span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #999988; font-style: italic;">//</span><span style="color: #999988; font-style: italic;">if</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">its modulus is not 0 it must be odd</span><br /><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">if</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">%</span><span style="color: #444444;"> </span><span style="color: #f57d00;">2</span><span style="color: #444444;"> </span><span style="color: #444444;">!</span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #f57d00;">0</span><span style="color: #444444;">)</span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> { </span><br /><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">Console</span><span style="color: #444444;">.</span><span style="color: #444444;">WriteLine</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> }</span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> }</span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span></span></div>
</div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"><br /></span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">Well that's better! But does anyone see an issue here? Were using two different styles for our curly braces! That's a recipe for future WTFs. </span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"><br /></span></span></div>
<h2>
<span style="color: #444444; font-family: Menlo; font-size: large;"><u>Be Consistent</u></span></h2>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">Use your lexemes in a consistent manner. If you want to put curly braces at the end of your if statement, use that for all statements! If you work with other developers make sure you ALL agree on a usage. Having differences in White spacing and statement terminators is a quick way to create a debugging nightmare.</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<h2>
<span style="color: #444444; font-family: Menlo; font-size: large;"><u>Code Comments</u></span></h2>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;">That's right I put a code comment in there! Generally I'm not a huge fan of code comments. I think to many people rely on them for really poorly written code. If you write more comments than code, then quite frankly, you are doing it wrong. Now I realize in this case I put a comment over a line with modulus. Honestly that was the simplest thing I could think of that people may not recognize. I've met a few developers who have never come across the modulus operator, it happens. So keeping it short, I am basically telling the next developer "If you don't know what the % symbol means, it means modulus, and if you don't know what that is, google it!"</span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"><br /></span></div>
<h2>
<span style="color: #444444; font-family: Menlo; font-size: large;"><u>So Where did we end up?</u></span></h2>
<div>
<span style="color: #444444; font-family: Menlo; font-size: large;"><u><br /></u></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;">
<span style="color: #444444;"></span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">class</span><span style="color: #444444;"> </span><span style="color: #444444;">NumberPrinter</span><br /><span style="color: #444444;">{</span><br /><span style="color: #444444;"> </span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #444444;">NumberPrinter</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">)</span><br /><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br /><span style="color: #444444;"> </span><span style="color: #444444;">}</span></span></div>
<div>
<span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"> </span></span><span style="color: #009695; font-family: Menlo; font-size: x-small;">public</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;">void</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">PrintAllNumbersBetweenBeginningNumberAndEndNumber</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">(</span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> int</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">beginningNumber</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">,</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> int</span><span style="color: #444444; font-family: Menlo; font-size: x-small;"> </span><span style="color: #444444; font-family: Menlo; font-size: x-small;">endingNumber</span><span style="color: #444444; font-family: Menlo; font-size: x-small;">)</span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;">
<span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">for</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"><</span><span style="color: #444444;">=</span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;">+</span><span style="color: #444444;">+</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">Console</span><span style="color: #444444;">.</span><span style="color: #444444;">WriteLine</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<br />
<span style="color: #444444;"> </span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">PrintAllEvenNumbersBetweenBeginningNumberAndEndNumber</span><span style="color: #444444;">(</span></span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span></span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">)</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">for</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"><</span><span style="color: #444444;">=</span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;">+</span><span style="color: #444444;">+</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #999988; font-style: italic;">//</span><span style="color: #999988; font-style: italic;">if</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">its</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">modulus</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">is</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">0</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">it</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">must</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">be</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">even</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">if</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">%</span><span style="color: #444444;"> </span><span style="color: #f57d00;">2</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #f57d00;">0</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">Console</span><span style="color: #444444;">.</span><span style="color: #444444;">WriteLine</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<br />
<span style="color: #444444;"> </span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">PrintAllOddBetweenBeginningNumberAndEndNumber</span><span style="color: #444444;">(</span></span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span></span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">)</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">for</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;"><</span><span style="color: #444444;">=</span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">;</span><span style="color: #444444;"> </span><span style="color: #444444;">i</span><span style="color: #444444;">+</span><span style="color: #444444;">+</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #999988; font-style: italic;">//</span><span style="color: #999988; font-style: italic;">if</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">its</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">modulus</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">is</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">not</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">0</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">it</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">must</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">be</span><span style="color: #999988; font-style: italic;"> </span><span style="color: #999988; font-style: italic;">odd</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #009695;">if</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;"> </span><span style="color: #444444;">%</span><span style="color: #444444;"> </span><span style="color: #f57d00;">2</span><span style="color: #444444;"> </span><span style="color: #444444;">!</span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #f57d00;">0</span><span style="color: #444444;">)</span><span style="color: #444444;"> </span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">Console</span><span style="color: #444444;">.</span><span style="color: #444444;">WriteLine</span><span style="color: #444444;"> </span><span style="color: #444444;">(</span><span style="color: #444444;">i</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;">}</span><br />
<br />
<span style="color: #444444;"> </span><span style="color: #009695;">public</span><span style="color: #444444;"> </span><span style="color: #009695;">static</span><span style="color: #444444;"> </span><span style="color: #009695;">void</span><span style="color: #444444;"> </span><span style="color: #444444;">PrintAllNumbersEvenNumbersAndOddNumbersBetweenBeginningNumberAndEndingNumber</span><span style="color: #444444;">(</span></span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span></span></div>
<div>
<span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="color: #009695; font-family: Menlo; font-size: x-small;"> </span><span style="font-family: Menlo; font-size: x-small;"><span style="color: #009695;">int</span><span style="color: #444444;"> </span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">)</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;">{</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">NumberPrinter</span><span style="color: #444444;"> </span><span style="color: #444444;">numberPrinter</span><span style="color: #444444;"> </span><span style="color: #444444;">=</span><span style="color: #444444;"> </span><span style="color: #009695;">new</span><span style="color: #444444;"> </span><span style="color: #444444;">NumberPrinter</span><span style="color: #444444;">(</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">numberPrinter</span><span style="color: #444444;">.</span><span style="color: #444444;">All</span><span style="color: #444444;">(</span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">numberPrinter</span><span style="color: #444444;">.</span><span style="color: #444444;">Evens</span><span style="color: #444444;">(</span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #444444;">y</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;"> </span><span style="color: #444444;">numberPrinter</span><span style="color: #444444;">.</span><span style="color: #444444;">Odds</span><span style="color: #444444;">(</span><span style="color: #444444;">beginningNumber</span><span style="color: #444444;">,</span><span style="color: #444444;"> </span><span style="color: #444444;">endingNumber</span><span style="color: #444444;">)</span><span style="color: #444444;">;</span><br />
<span style="color: #444444;"> </span><span style="color: #444444;">}</span><br /><span style="color: #444444;">}</span></span>
</div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;"><br /></span></span></div>
<div>
<span style="font-family: Menlo; font-size: x-small;"><span style="color: #444444;">Well that's certainly more human readable, and you know what we didn't do a damn thing to the efficiency! Win! It's as simple as this, if you use a compiler, then any code you write can be read by a computer. Honestly that's the easy part. Writing code that future developers can read, understand and extend? That's hard. So many times we get lost in the sea of efficiency of our code from the machines perspective, but we need to make sure we don't lose sight of the efficiency of bring a new hire up to speed. Or reading through code that hasn't been touched in a long time because we need to update or extend its functionality. Or god forbid even having to dig into the deep dark reaches of the code for a <a href="http://en.wikipedia.org/wiki/Heisenbug">heisenbug</a>! The bottom line is don't neglect the human aspect of efficiency. After all, humans don't get faster hardware every few years.</span></span></div>
Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com2tag:blogger.com,1999:blog-143829659737648571.post-16589378904809270682011-05-04T08:58:00.000-07:002017-02-27T07:13:14.065-08:00Best PracticesI had to write this out for work, but I felt it would probably be useful for others. While this was written mainly in reference to .NET development, most of these points translate to development in general.<br />
<ol><li>Reuse code as best as you can. If you know there is something that was used to fix a problem in another project make it generic and common. We want as few lines of code in the code base as is neccesary to get the job done.</li>
<li>ReSharper is probably one of your best friends when developing code in .NET (<a href="http://www.jetbrains.com/resharper/">Resharper is available here</a>)</li>
<li>Code Repositories should not be considered optional. Check in early, check in often.</li>
<li>Continuous Integration should be your religion, and if your code breaks the build, FIX IT BEFORE YOU LEAVE. Other people like to get work done too.</li>
<li>TDD is mandatory - write tests *before* you develop functionality</li>
<ul><li>Resharper is excellent for this and helps tremendously</li>
<li>If you have to temporarily disable a test use the Ignore attribute with a reason. This makes it easier to track, and allows us to see a print out on CI so we can make fun of you for not fixing the test later.</li>
<li>TDD will be your friend if you ever have to refactor the code. You will thank yourself later. (And you will refactor the code. OVER AND OVER AND OVER)</li>
</ul><li>When Resharper makes a suggestion for code clarity as a general rule follow the suggestion. The one exception to this is when a LINQ statement makes the code less legible.</li>
<li>Cyclomatic complexity is bad. Keep nested loops and if statements to a minumum unless ABSOLUTELY neccesary.</li>
<li>Optimal method length is 5 - 10 lines (This will also make it much easier to wrap tests around.)</li>
<li>Use guard statements to simplify methods.</li>
<li>SOLID is not optional (Definition is below)</li>
<ul><li><span class="Apple-style-span" style="color: red;">S</span>ingle Responsibility - object should have only a single responsibility</li>
<li><span class="Apple-style-span" style="color: red;">O</span>pen Closed Principle - classes should be open for extension, closed for modification</li>
<li><span class="Apple-style-span" style="color: red;">L</span>iskov Substitution Principle - Methods that use a base class should also be able to use classes derived from that base class</li>
<li><span class="Apple-style-span" style="color: red;">I</span>nterface Segregation Principle - many client specific interfaces are better than one general purpose interface (i.e. don't use huge-ass interfaces)</li>
<li><span class="Apple-style-span" style="color: red;">D</span>ependency Inversion Principle - Depend on Abstractions, not on Absolutes i.e. Use a base class in the parameter definition for a method rather than a derived class. (see Dependency Injection which is a great tool for TDD)</li>
</ul><li>DRY - Don't Repeat Yourself (EVER!)</li>
<li>Mocking is fun. Especially the coding kind for tests. ( I personally like <a href="http://code.google.com/p/moq/">MOQ</a>)</li>
<li>usewhitespacetoenhancereadability</li>
<li>Do not use regions. PERIOD. If you need to hide something, your method is too long.</li>
<li>If you have to write comments on every other line, your code probably isn't very readable.</li>
<ul><li>use descriptive variable names</li>
<li> use smaller private methods with descriptive names.</li>
<li>EXCEPTION: jokes in the code are ok.</li>
<li>use comments to explain "why" something is done that way, the code should explain "what" is being done.</li>
</ul></ol><div><div>For further reading:</div><div>* <a href="http://www.amazon.com/CLR-via-C-Jeffrey-Richter/dp/0735627045?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">CLR via C# revision 3</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0735627045" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> (Jeffrey Richter)</div><div>*<a href="http://www.amazon.com/Framework-Design-Guidelines-Conventions-ebook/dp/B0017SWPNO?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank"> Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=B0017SWPNO" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> (Krzysztof Cwalina and Brad Abrams)</div><div>*<a href="http://www.amazon.com/Test-Driven-Development-Microsoft-NET-Professional/dp/0735619484?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank"> Test-Driven Development in Microsoft .NET</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0735619484" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> (James W. Newkirk and Alexei A. Vorontsov)</div><div>* <a href="http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Working Effectively with Legacy Code</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0131177052" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> (Michael Feathers)</div></div><div>* <a href="http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Design Patterns: Elements of Reusable Object-Oriented Software</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0201633612" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> (Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides)</div><div><br />
</div>Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-69522780810455205582011-04-15T09:52:00.000-07:002017-02-27T07:13:14.096-08:00Things NOT to do during the hiring processYesterday I went on a twitter rant (<a href="http://twitter.com/alexrwallace">You can follow me on Twitter here</a>) about ways to piss off an interviewer and be sure that you are not invited back. I felt the need to summarize and hopefully help out others in the future. For clarification, I am a Software Engineer, so most of this advice will be tailored for Software Engineers.<br />
<br />
<b><span class="Apple-style-span" style="font-size: large;">Resume</span></b><br />
<b><br />
</b><br />
<b><u>1. Don't have a resume longer than two pages</u></b><br />
Even if you have done something as cool as writing the software that makes the Kinect work, moved Facebook operate on OpenStack, wrote part of EC2, or improved search times on Google by 1000%, I don't need to know every step that you took along the way. Give a brief two or three line synopsis of the project with some of the main technologies you used and let me ask questions about it.<br />
<br />
<u>How to lose double points:</u> Explaining that you used the basics of an API or Framework. For example: I used List<> in C# to create a collection, or used GET statuses/show/:id in the twitter API to get the single status by Id.<br />
<br />
<b><u>2. Don't have anything on you resume you aren't willing to talk about</u></b><br />
Anything on your resume is fair game. When you say I don't want to talk about that, or I don't remember much about that project, and it happened within the last couple of years I am going to immediately come to two conclusions:<br />
<br />
<ol><li>You are probably lying about working with the technology on that project and just put it on there to try and impress me. </li>
<li>You are desperate for work and put just about any buzzword on your resume that you could come up with to try and get your foot in the door</li>
</ol><br />
<br />
<b><u>3. Don't Copy and Paste</u></b><br />
Resumes are fairly tedious to read as it is. When you copy and paste the same line into multiple jobs it screams "I'm trying to fluff up my resume and make myself look way more awesome than I probably am"<br />
<br />
<b><span class="Apple-style-span" style="font-size: large;">In the Technical Screen</span></b><br />
<br />
<b><u>1. Don't try and make up an answer</u></b><br />
If I ask you a question, chances are I know the answer, and I probably know it very well. That means if it sounds like you are starting to make something up I will ask a follow up. If I'm feeling generous I will let you go just far enough to know that you have no clue what you are talking about before moving to a different subject.<br />
<br />
No one knows everything. Some questions that I ask are asked simply to see if a person will willingly say "I don't know the answer to that question", and will either:<br />
<br />
<ol><li>Ask more about it. </li>
<li>Write down the question with the intent of looking it up later.</li>
</ol><br />
<b><u>2. Answer the question that I am asking</u></b><br />
If you are unclear what I am asking, ask for clarification. Don't try and and change the answer towards something you know. I asked the question about a specific technology for a reason. \<br />
<br />
<b><u>3. "Like", "so" and "um" should be avoided at all costs</u></b><br />
If you use these words so often that an interviewer can't concentrate on what the rest of your answer is, chances are you are not going to get called back.<br />
<br />
<b><u>4. Don't argue with me.</u></b><br />
You will disagree with an interviewer from time to time, and if you decide that you won't be able to work with that person because of a philosophical difference, then by all means don't take the job. I may love Python you may love Ruby. If you want the job don't tell my Python sucks.<br />
<br />
<b><span class="Apple-style-span" style="font-size: large;">Questions to ask Interviewer</span></b><br />
<b><span class="Apple-style-span" style="font-size: large;"><br />
</span></b><br />
<b><u>1. Don't ask me when you can start</u></b><br />
You come off as arrogant, not self assured.<br />
<br />
<b><u>2. Don't ask if there is any reason you wont get this job</u></b><br />
That question alone in an interview is the reason why you won't get the job. It makes me uncomfortable and quite frankly there is always a reason to not give a person that job.<br />
<br />
<b><u>3. Don't have no questions</u></b><br />
It shows me you've done no research, and that you haven't gleaned any information about the way the company works from our conversation. It shows a lack of interest in the position.<br />
<br />
<span class="Apple-style-span" style="font-size: large;"><b>Things you should know</b></span><br />
<span class="Apple-style-span" style="font-size: large;"><b><br />
</b></span><br />
<br />
<ul><li>Know what <a href="http://www.amazon.com/Object-Oriented-Thought-Process-3rd/dp/0672330164?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Object Oriented Programming</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0672330164" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> is.</li>
<li>Learn <a href="http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Design Patterns</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0201633612" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />. Be able to explain at least one in detail and it better not be a damn singleton.</li>
<li>Make sure you know at least one scripting language/Dynamic Language (<a href="http://www.amazon.com/Learning-Perl-5th-Randal-Schwartz/dp/0596520107?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Perl</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0596520107" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />, <a href="http://www.amazon.com/Programming-Python-Mark-Lutz/dp/0596158106?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Python</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0596158106" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />, <a href="http://www.amazon.com/Practical-Common-Lisp-Peter-Seibel/dp/1590592395?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Lisp</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=1590592395" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />, <a href="http://www.amazon.com/Ruby-Programming-Language-David-Flanagan/dp/0596516177?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Ruby</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0596516177" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />, <a href="http://www.amazon.com/Professional-JavaScript-Developers-Wrox-Programmer/dp/047022780X?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">JavaScript</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=047022780X" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />, <a href="http://www.amazon.com/Windows-PowerShell-2-0-Don-Jones/dp/0982131429?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">PowerShell</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0982131429" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />)</li>
<li>Make sure you know at least one statically typed language (<a href="http://www.amazon.com/s/?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969&search-alias=aps&field-keywords=Programming%20C++" target="_blank">C++</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />, <a href="http://www.amazon.com/2010-NET-Platform-Andrew-Troelsen/dp/1430225491?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">C#</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=1430225491" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />, <a href="http://www.amazon.com/Sams-Teach-Yourself-Java-Hours/dp/0672330768?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Java</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0672330768" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />, <a href="http://www.amazon.com/Programming-Objective-C-2-0-Stephen-Kochan/dp/0321566157?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Objective-C</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0321566157" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />)</li>
<li>Be able to speak about an interesting problem you solved in detail</li>
</ul>Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-70468168126223908582010-11-28T19:54:00.000-08:002017-02-27T07:13:14.103-08:00Starting with Amazon Web ServicesAs a Software Engineer (and nerdy tinkerer), I have always been interested in trying out new technologies. Luckily I've had the chance at work to play with Amazon Web Services for a few things here and there. Played around a little with Windows EC2 instances (prior to them getting Windows 2008 which meant no ASP.NET MVC for me at the time). Did a little bit with S3. But the thing is as an Engineer who has spent an inordinate amount of time playing in the Windows realm I have been trying to diversify.<br />
<br />
I've spent my own time playing with Python, Ruby and Haskell. I even managed to convince work to buy me <a href="http://www.amazon.com/Apple-MacBook-MC371LL-15-4-Inch-Laptop/dp/B003G2ZJTG?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Macbook Pro</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=B003G2ZJTG" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />. The problem being that since I spend a lot of time living in the Web space, generally my ideas for coding involve the Web. I dont really have the extra income to have a Linux server at my beck and call when I want to try something out, so I've been pretty much not doing a whole heck of a lot. But Amazon has recently fixed that for me!<br />
<br />
For those of you looking to try out cloud computing, or for someone trying to get that startup off the ground for a very low price <a href="http://aws.amazon.com/free/">Amazon now has a Free Usage Tier</a>!<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_9K1c2vNSuao/TPMgwPBOXyI/AAAAAAAAADc/5iPHFYzwsG4/s1600/Screen+shot+2010-11-28+at+10.40.03+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="169" src="http://2.bp.blogspot.com/_9K1c2vNSuao/TPMgwPBOXyI/AAAAAAAAADc/5iPHFYzwsG4/s320/Screen+shot+2010-11-28+at+10.40.03+PM.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">Thats right! Now I get the chance to not only play in the Cloud (hooray! Resume buzzword! sigh.) I also get a Linux instance that is up all month! That means I can pretty much spin up an idea check it out, see if I like it and if I want to continue. For those entrepreneurial folks out there. It means you can have a free server to create your web application on, and you aren't out any money for things like data centers.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">Dig it!</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: left;"><br />
</div>Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-40878880558387285172010-11-22T20:06:00.000-08:002017-02-27T07:13:14.083-08:00Big Brother Facebook?So I will be the first to admit I was a little late signing up for the whole Social Networking, Blogging, sharing craze. I mean after all I'm not exactly a hugely outgoing person, and I'm not even a big fan of blowing my own horn. So when I heard about the whole concept of blogs and micro-blogs and sharing things with your "network of friends" I was a little sceptical. I had always been conditioned in the world of Google, that what goes on the web stays on the web and that if you wanted to keep something between you and your friends you either kept it off the web or you encrypted the crap out of it. Well then along comes this Zuckerburg guy touting ideas like:<br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span><br />
<span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">"openness, making things that help people connect and share what's important to them, revolutions, information flow, minimalism" </span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">and</span><br />
<span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">"I'm trying to make the world a more open place by helping people connect and share."</span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">-Mark Zuckerburg from his <a href="http://www.facebook.com/markzuckerberg?v=info&ref=ts">profile</a> on Facebook </span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_9K1c2vNSuao/TOsu72KpPlI/AAAAAAAAADU/qpgumIrtjGQ/s1600/Screen+shot+2010-11-22+at+9.57.11+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="316" src="http://2.bp.blogspot.com/_9K1c2vNSuao/TOsu72KpPlI/AAAAAAAAADU/qpgumIrtjGQ/s640/Screen+shot+2010-11-22+at+9.57.11+PM.png" width="640" /></a></div><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">I'd be lying if I said that the idea of connecting, sharing and openness on the web didn't kind of freak me out. I mean in the end how do I know how this information is being used? Who is going to see it? When will this come back and bite me in the ass. </span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Well one hundred and sixty million users later I began to think that maybe I was in the minority. Maybe people truly wanted to share. Maybe it wasn't quite so bad as all that. I mean hell when all was said and done, some of the things that were coming out of Facebook like the Facebook File System and the fact that the whole thing was built from the <a href="http://developers.facebook.com/opensource/">ground up using open source</a>.</span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Of course all that still didn't get me to sign up. What finally got me to sign up in the end were two factors: 1.) My Mom signed up. 2.) My teenage Son signed up. Damn it! Couldn't get behing my Son or my Mom on the technology curve! I mean I am a proud geek here! So grudgingly I signed up and began my path towards sharing and openness. </span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Well here we are a few years later and all of a sudden it seems that Facebook has got an army of lawyers and decided that they need to "protect" their intellectual property. So they sued <a href="http://teachbook.com/">teachbook.com</a> a professional community for teachers. Um. Wait. You are suing a resource for teachers? One of the most underappreciated jobs in the United States? Really? Why? Oh the lawsuit alledges that Teachbooks use of the word book in the url dilutes Facebook's brand name and makes it hard for the brand to remain unique. It also apparently created some kind of facade that there is a relationship between the two social networks. So let me get this straight: You are suing them because their companies name is like yours, and that may be confusing to people? I have two problems with this: 1.) I think people would figure out the two sites aren't in cahoots when it doesn't say anything about Facebook on it, and that your Facebook credentials wouldn't work on Teachbook and vice versa. Call me old fashioned but in general I try to assume people aren't total morons. 2.) And most importantly: YOU ARE FACEBOOK! I mean really? That brand can't remain unique with 500 million users? Seriously? The lawsuit goes on to say: </span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 19px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span><span class="Apple-style-span" style="line-height: 19px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="color: red;">“If others could freely use ‘generic plus BOOK’ marks for online networking services targeted to that particular generic category of individuals, the suffix BOOK could become a generic term for ‘online community/networking services’ or ’social networking services’.”</span></span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 19px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 19px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Hmm. So you are basically saying you should now effectively own any work + the name book which happens to be a social networking site. Sorry. Gonna call bullshit on this one. Suck it up build a better product that the rest of the competition which by the way, according to numbers, you already have. Don't take this one to court. (By the way if your bored, or a lawyer, or both, you can read the whole <a href="http://www.scribd.com/doc/36412202/Teachbook-Suit">Complaint Filing here</a>)</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 19px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 19px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Apparently thought Facebook has a long habit of pulling this crap. Although many don't actually go to court, they tend to send out a large number of Cease and Desist Letters.<a href="http://www.blogger.com/goog_781734590"> </a></span></span><span class="Apple-style-span" style="color: #414142; line-height: 17px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><a href="http://getsatisfaction.com/facebook/topics/facebook_lawyers_sent_me_a_cease_and_desist_letter_regarding_the_facebookeconomy_com_domain_name">FacebookEconomy.com, Mini-Feed.com, and Faceosphere.com all owned by one budding entrepreneur</a> got one which he put <a href="http://u.phoreo.com/zg.pdf">online</a>. A number of other people have complained about it in various forums across the web. </span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 19px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span><br />
<span class="Apple-style-span" style="color: #333333; font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="line-height: 19px;">So now along comes the lamebook DOT com lawsuit. Lamebook decided to be proactive in order to not get a Cease and Desist. So they sued Facebook invoking their First Amendment rights to parody since basically thats what the site is. Facebook of course turned around and sued them to force a name change. Now as stated above that seems to be normal standard operating procedure for Facebook. However in addition Facebook took the step of deactivating Lamebooks Facebook account. As if that weren't enough, notice that I'm not actually putting a link on this. Or actually even spelling out the URL. You know why? Because at some point this may actually get posted to Facebook. Do you know what happens if there is a link reference to lamebook?</span></span><br />
<span class="Apple-style-span" style="color: #333333; font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="line-height: 19px;"><br />
</span></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_9K1c2vNSuao/TOs7EVJA0jI/AAAAAAAAADY/ZE58NkGEWoU/s1600/msgfailed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="89" src="http://3.bp.blogspot.com/_9K1c2vNSuao/TOs7EVJA0jI/AAAAAAAAADY/ZE58NkGEWoU/s320/msgfailed.png" width="320" /></a></div><span class="Apple-style-span" style="color: #333333; font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="line-height: 19px;"><br />
</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 19px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Hmm. Wait a minute. So my blog could now all of a suddenly contain a link to something that is abusive or spammy. Wait. What? Abusive to whom exactly? They are suing Facebook not me. Spammy? I'd never even heard of the site until Facebook decided to sick their army of lawyers on anything with a URL that contained "face" or "book". So all of a sudden it would appear that content is being censored. This by the company who is run by a man who once said:</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 19px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span><br />
<span class="Apple-style-span" style="line-height: 19px;"><span class="Apple-style-span" style="line-height: 22px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="color: red;">"I find the mounting pressure on us to remove Holocaust-denying groups incredibly frustrating" - Mark Zuckerburg</span></span></span></span><br />
<span class="Apple-style-span" style="line-height: 19px;"><span class="Apple-style-span" style="line-height: 22px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="color: red;"><br />
</span></span></span></span><br />
<span class="Apple-style-span" style="line-height: 19px;"><span class="Apple-style-span" style="line-height: 22px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Apparently freedom of speech on Facebook is totally acceptable unless you have something to say against Facebook. So for all of you thinking about taking the deeper plunge into Facebook with their new Instant Messaging/SMS/Email application think about this: Your data is in a closed environment. Only you and Facebook have access to anything you put on Facebook. It seems that if Facebook has an issue with you, they can terminate your account. Meaning you no longer have access to that data. Any photos, emails, instant messages, posts, events or contacts that you wanted to keep would be gone. </span></span></span><br />
<span class="Apple-style-span" style="line-height: 19px;"><span class="Apple-style-span" style="line-height: 22px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span></span><br />
<span class="Apple-style-span" style="line-height: 19px;"><span class="Apple-style-span" style="line-height: 22px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Now I ask you, does that seem open place to connect and share to you?</span></span></span>Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-18259102406491517922010-11-19T12:27:00.000-08:002017-02-27T07:13:14.072-08:00Windows Phone 7I've spent the last week at the Microsoft Technology Center here in Atlanta. As you may have guessed I am surrounded by Microsoft Blue Badges*. As many of you may have heard Microsoft recently announced a program that would allow for full time employees to be reimbursed for the purchase of Windows Phone 7 device. One of the stipulations of this purchase was that it had to occur 10 days after the initial release of the phone.<br />
<br />
Well here we are a little over ten days later and I have had the chance to get my hands on a couple of these devices. I must say that I came away quite impressed. The OS is pretty snappy and responsive. Its quite intuitive and definitely appears to be quite polished. I definitely liked the user interface more than that of my Android, and I couldn't help but think to myself: If this had come out when windows mobile 6.5 came out we would have had one hell of a phone war!<br />
<br />
That being said Microsoft definitely has its work cut out for it as far as pushing this OS out to the public. The marketplace is obviously nowhere near iTunes or Android Market, but with it being built on the .NET platform it could probably have a fairly quick ramp up time. I found a free download of the <a href="http://www.amazon.com/Microsoft-Silverlight-Programming-Windows-Phone/dp/0735656673?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Programming Windows Phone 7</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0735656673" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> <a href="http://blogs.msdn.com/b/microsoft_press/archive/2010/10/28/free-ebook-programming-windows-phone-7-by-charles-petzold.aspx">ebook</a> from Microsoft Press. I figure I may as well take a look at it and see what all an be (re)created for it.<br />
<br />
*<span class="Apple-style-span" style="font-family: Arial; font-size: x-small;"><b>Blue Badge (or Blue Card)</b></span><span class="Apple-style-span" style="font-family: Arial; font-size: x-small;">: (sometimes, slightly derogatorily, blue badger, or just plain blue) Synonym for full-time Microsoft employees, the Brahmins of the deeply ingrained Microsoft caste system, whose card keys have a blue background rather than the orange used for contractors (see </span><span class="Apple-style-span" style="font-family: Arial; font-size: x-small;"><b>Orange Badge</b></span><span class="Apple-style-span" style="font-family: Arial; font-size: x-small;">) and green for vendors. Derivative terms include "turn blue," meaning to earn full-time status. [Thank you <a href="http://cinepad.com/mslex.htm">Microsoft Lexicon</a> ]</span>Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-8927604142893506232010-11-18T13:21:00.000-08:002017-02-27T07:13:14.107-08:00Microsoft CRM Performance Toolkit: Part 2And here we are hours later with not a whole lot to show for it. Seems like no one really wants to take ownership for the product. Can't say that I blame them. Not sure I would want to be the go to guy on this one.<br />
<br />
After all is said and done I'm going to have to find someway to get this to work, but when black magic and voodoo seem to be the way that these configurations actually get registered I'm not sure how much luck I'm really going to have.<br />
<br />
On the bright side I think I'm finally getting a grasp on how this thing is SUPPOSED to work. Not sure I would have done it the same way, but I always like to use the <a href="http://thoughtworks.com/">ThoughtWorks</a> retrospective prime directive: "Regardless of what we discover, we understand and truly believe that everyone did the best job they could, given what they knew at the time, their skills and abilities, the resources available, and the situation at hand."<br />
<br />
Now if I can only gather my skills, abilities and resources and get some performance testing going!Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-42065964568292608592010-11-18T09:43:00.000-08:002017-02-27T07:13:14.086-08:00Microsoft CRM Performance Toolkit: Part 1Our mantra around the company has recently become "Always Up, Always Fast and Never Fails." So for the last few days I have been asked to help perform some testing around the performance of our <a href="http://www.amazon.com/Microsoft-Dynamics-CRM-4-0-Unleashed/dp/0672329700?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Microsoft Dynamics CRM</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0672329700" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> system as we plan for a scaling up users over the next few years.<br />
<br />
To begin with you have to understand that my companies existing CRM installation is heavily customized and exceedingly complicated. The way that it is used is not only as a CRM tool, but also almost as a centralized location for information used by the multiple Web Applications. Consequently "Always Up, Always Fast and Never Fails." is even more important for this application. Needless to say I am all for testing the heck out of this thing to make sure that we can indeed do what the business needs us too. After all, I don't really like getting yelled at when the proverbial poop hits the fan.<br />
<br />
So since Monday I have been living at the Microsoft Technology Center here in Atlanta working with some folks in order to get our implementation up onto a virtual environment. That part actually wasn't so painful since I have had the experience of setting this thing up in so many different environment in many configurations and for the most part have run into every headache that comes along with that so far.<br />
<br />
Where things have become painful is actually using the Microsoft CRM Performance Toolkit. For those that don't know<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">, t<span class="Apple-style-span" style="color: #333333; font-size: 12px; line-height: 18px;"><span style="font-size: small;">he Microsoft Dynamics CRM 4.0 Performance Toolkit is a toolset used to test performance on Dynamics CRM.<span> </span>The toolkit is a free download available at </span></span><span class="Apple-style-span" style="color: #333333; font-size: 12px; line-height: 18px;"><a href="http://crmperftookit.codeplex.com/" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="color: blue; font-size: small;">http://crmperftookit.codeplex.com</span></a></span><span class="Apple-style-span" style="color: #333333; font-size: 12px; line-height: 18px;"><span style="font-size: small;">. </span></span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="color: #333333; font-size: 12px; line-height: 18px;"><span style="font-size: small;"><br />
</span></span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="color: #333333; font-size: 12px; line-height: 18px;"><span style="font-size: small;">Downloading is simple. Getting the thing to work is friggin nightmare. After playing around with the installer, reading the obviously out of date documentation and trying to get it to work, it has gotten to the point where I have downloaded the source code (Yay codeplex!), and I have begun to go through the code line by line. Two days later we've managed to get something resembling working, but its not really working. With a deadline fast approaching tomorrow this is going to prove to be an interesting day.</span></span></span>Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-44492121113021140402010-11-18T06:53:00.000-08:002017-02-27T07:13:14.093-08:00The CloudAhh the cloud. The latest buzzword out on our industry.<br />
<br />
I read this <a href="http://www.itworld.com/career/127908/it-hiring-stays-woefully-slow-except-network-and-virtual-specialists">article</a> today basically stating that if you wanted a job or a raise you just need to add the word cloud to your resume. In all honesty how ridiculous is that? It reminds me of so many fads that have come and gone. The HTML coding fad that could get you a six figure job like this article mentions. The Social Networking buzzwords that came along in the last few years.<br />
<br />
So lets take a breath and take a step back from the buzzwords.<br />
<br />
Don't get me wrong I think cloud computing is really cool. A buddy of mine is working on the NASA <a href="http://nebula.nasa.gov/">Nebula</a> project. Which is based on the <a href="http://openstack.org/">OpenStack</a> project. The great thing about the whole thing is the abstraction of the code and data from the hardware. The fact that a lot of it is built in Python and that my buddy talks in terms of petabytes just makes the whole thing that much cooler.<br />
<br />
Bottom line is that the idea of the cloud isn't coming, its here. Has been for a while. I've built <a href="http://crm.dynamics.com/en-us/Default.aspx">Microsoft Dynamics CRM 4</a> instances in the <a href="http://aws.amazon.com/">Amazon EC2</a>. I've also used EC2 for standing up staging and test environments for Web applications (Here are a couple of books that can help: <a href="http://www.amazon.com/Host-Your-Web-Site-Cloud/dp/0980576830?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Host Your Web Site In The Cloud: Amazon Web Services Made Easy: Amazon EC2 Made Easy</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0980576830" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />, <a href="http://www.amazon.com/Programming-Amazon-Web-Services-SimpleDB/dp/0596515812?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Programming Amazon Web Services: S3, EC2, SQS, FPS, and SimpleDB</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=0596515812" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />). Generally its not a particularly difficult process although there are definitely some gotchas.<br />
<br />
My current development rig is actually a huge beefy box with <a href="http://www.amazon.com/Windows-Server-2008-Hyper-V-Microsofts/dp/B0044KN1VC?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Windows Server 2008 Hyper-V</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=B0044KN1VC" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> because development requires having multiple servers communicating, and I would rather not have to go out and acquire new hardware every time I need to add a new server. Before my Hyper-V installation I used <a href="http://www.virtualbox.org/">VirtualBox</a> to set up a small mock production instance locally. Granted being able to push that stuff out to Amazon or <a href="http://rackspace.com/">Rackspace</a> makes things a whole lot easier, especially if budget isn't as much a concern.<br />
<br />
Speaking of budget I was recently talking to a Director of IT (not naming names or companies) and he said that if he had to build a company now, everything would be in the cloud. From a financial perspective it just makes sense. Housing your servers in a Data Center is expensive. Having your own Data Center is expensive. Hosting, Scaling and Load Balancing is time consuming and (you guessed it) expensive. I can spin up a scalable app in <a href="http://www.amazon.com/Programming-Google-App-Engine-Infrastructure/dp/059652272X?ie=UTF8&tag=testdr-20&link_code=btl&camp=213689&creative=392969" target="_blank">Python</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=testdr-20&l=btl&camp=213689&creative=392969&o=1&a=059652272X" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> using <a href="http://code.google.com/appengine/">Google AppEngine</a> in next to no time. More importantly its free to start with, and if the demand was there I can pay to scale up! Microsoft has a similar deal with <a href="http://www.microsoft.com/windowsazure/">Azure</a>. Granted its a little more pay up front but the power and versatility is there.<br />
<br />
In the end though, putting it in the Cloud is a tool not a panacea. If you have a crappy product and/or crappy code the cloud is not going to magically make it better. Don't fall for the buzzword hype. Don't fall for the latest fad. Understand what it is the cloud can do for you but don't try to pound a square peg into a round hole. After all remember the AJAX buzzword?Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0tag:blogger.com,1999:blog-143829659737648571.post-10656857469476566482010-11-17T20:00:00.000-08:002017-02-27T07:13:14.061-08:00Let the blogging beginI've recently been spending time working on customizing shrink wrapped applications and getting legacy apps into a test harness. As you can imagine both can be very unpleasant. I have been lucky to work with some extremely bright individuals, and consequently learned a few tricks and tools along the way.<br />
<br />
I realized that some of the things that I probably do on a daily basis either haven't been done often, or just not documented well on the Internet. I figure as I go along I may as well share what I can so that hopefully some day I can mitigate someone else's pain.Anonymoushttp://www.blogger.com/profile/00166863868451280471noreply@blogger.com0