<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><!--Generated by Squarespace Site Server v5.8.0 (http://www.squarespace.com/) on Tue, 03 Nov 2009 21:35:02 GMT--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Rants About Software</title><link>http://www.rantsaboutsoftware.com/blog/</link><description>Caffeine-fueled adventures through the world of software.</description><lastBuildDate>Tue, 03 Nov 2009 20:23:18 +0000</lastBuildDate><copyright>Copyright © 2008, 2009 Matt Flowers. All rights reserved.</copyright><language>en-US</language><generator>Squarespace Site Server v5.8.0 (http://www.squarespace.com/)</generator><itunes:author>Matt Flowers</itunes:author><itunes:keywords>Software,Programming,Code,Technology,Development,.NET,Web,Microsoft,Apple,iPhone</itunes:keywords><itunes:category text="Technology" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/RantsAboutSoftware" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>Petter Released for the iPhone!</title><category>Development</category><category>Projects</category><category>iPhone</category><dc:creator>Errornix</dc:creator><pubDate>Sat, 29 Aug 2009 16:55:08 +0000</pubDate><link>http://feedproxy.google.com/~r/RantsAboutSoftware/~3/xZepAkYN0Uc/petter-released-for-the-iphone.html</link><guid isPermaLink="false">280203:2838615:5034163</guid><description>&lt;p&gt;&lt;span class="full-image-float-left ssNonEditable"&gt;&lt;span&gt;&lt;img title="Petter" src="http://www.rantsaboutsoftware.com/storage/project-images/petter_icon.png?__SQUARESPACE_CACHEVERSION=1249161643663" alt="" /&gt;&lt;/span&gt;&lt;/span&gt;My first iPhone App, &lt;a title="Petter" href="../../Petter/"&gt;Petter,&lt;/a&gt; is now available on the &lt;a title="Petter - App Store" href="http://click.linksynergy.com/fs-bin/stat?id=lIWBTA6VvqU&amp;amp;offerid=146261&amp;amp;type=3&amp;amp;subid=0&amp;amp;tmpid=1826&amp;amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252FWebObjects%252FMZStore.woa%252Fwa%252FviewSoftware%253Fid%253D326179992%2526mt%253D8%2526uo%253D6%2526partnerId%253D30"&gt;App Store!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It took a bit longer to get out there than I had anticipated (about 2 months longer), but it's finally out and it's been quite a learning experience.&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Developing Petter&lt;/h3&gt;
&lt;p&gt;I built Petter for the learning experience more than anything. I currently have more exciting apps in the works (and even more exciting ones in my brain). But I wanted to really nail down the basics of iPhone development before getting into the bigger projects. So I picked up a copy of &lt;a class="offsite-link-inline" title="Beginning iPhone Development" href="http://www.amazon.com/exec/obidos/ASIN/B001TM92AW/errornixcom-20" target="_blank"&gt;Beginning iPhone Development&lt;/a&gt; and got to work!&lt;/p&gt;
&lt;p&gt;Although Petter is a fairly simple app, there are actually a lot of different aspects of iPhone development that went into it. To build Petter I had to learn/employ...&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Objective-C and the Xcode Environment&lt;/strong&gt; - Before starting iPhone development, I had never coded in Objective-C, nor had I ever used Xcode. Although Xcode was fairly intuitive, there were some aspects of Objective-C that just work differently from the other languages that I'm used to. (Tying my code in with the Interface Builder was particularly awkward.)&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;strong&gt;SQLite&lt;/strong&gt; - Petter uses SQLite to store your pet's information. Although I was already familiar with SQL syntax, I had never previously used SQLite and I certainly didn't know how to integrate it into my app.&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;strong&gt;File System&lt;/strong&gt; - Petter uses the file system to store your pet's images. This means that you can delete your pet's image from your photo library, and the image in Petter will be unaffected. Not being able to browse the iPhone's file system made this somewhat difficult to debug.&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;strong&gt;GUI&lt;/strong&gt; - Petter uses a combination of a TableView and multiple UIViews. The TableView also has custom designed cells. To pull this off, I had to design screens in the Interface Builder, tie the GUI controls in with my code, allow the screens to be able to pass data to each other, and override default functionality of the provided controls. Yeah, it was a lot more work than you would think.&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;strong&gt;Accelerometer and Touch Screen&lt;/strong&gt; -Although not used extensively, I had to learn how to capture touch events as well as retrieve accelerometer data in order to trigger the sound effects.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Future Apps&lt;/h3&gt;
&lt;p&gt;I realize Petter isn't the most exciting thing in the App Store, but like I said, I did it mainly for the learning experience. Now that I have a much better understanding of iPhone development, I'll hopefully be able to produce some much more exciting apps in the near future, so be sure to check back for that!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://click.linksynergy.com/fs-bin/stat?id=lIWBTA6VvqU&amp;amp;offerid=146261&amp;amp;type=3&amp;amp;subid=0&amp;amp;tmpid=1826&amp;amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252FWebObjects%252FMZStore.woa%252Fwa%252FviewSoftware%253Fid%253D326179992%2526mt%253D8%2526uo%253D6%2526partnerId%253D30"&gt;Check out Petter on iTunes! &lt;img src="http://ax.itunes.apple.com/images/badgeitunes61x15dark.gif" alt="Petter" width="61" height="15" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hfe1vY3kI6D-qv1qwRRCyCVeXmA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hfe1vY3kI6D-qv1qwRRCyCVeXmA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hfe1vY3kI6D-qv1qwRRCyCVeXmA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hfe1vY3kI6D-qv1qwRRCyCVeXmA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsAboutSoftware/~4/xZepAkYN0Uc" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rantsaboutsoftware.com/blog/rss-comments-entry-5034163.xml</wfw:commentRss><feedburner:origLink>http://www.rantsaboutsoftware.com/blog/petter-released-for-the-iphone.html</feedburner:origLink></item><item><title>Pass-By-Reference Error Handling?</title><category>Development</category><category>Programming</category><dc:creator>Errornix</dc:creator><pubDate>Sat, 08 Aug 2009 12:39:00 +0000</pubDate><link>http://feedproxy.google.com/~r/RantsAboutSoftware/~3/4ka560CUqow/pass-by-reference-error-handling.html</link><guid isPermaLink="false">280203:2838615:4903334</guid><description>&lt;p&gt;I'm going to try something new here. Normally when I write a post, I think through everything that I want to say before I start writing. But I think I'm going to just shoot from the hip on this one and see what happens. Since I'm just writing this as I'm thinking about it, the end result may be brilliant or it may be senseless drivel that will make you dumber by reading it - Proceed with caution.&lt;/p&gt;
&lt;p&gt;I was just reading &lt;a title="Joel on Software - 13" href="http://www.joelonsoftware.com/items/2003/10/13.html"&gt;Joel Spolsky's argument against programming with exceptions,&lt;/a&gt; and I'm inclined to agree with him.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A better alternative is to have your functions return error values when things go wrong, and to deal with these explicitly, no matter how verbose it might be. It is true that what should be a simple 3 line program often blossoms to 48 lines when you put in good error checking, but that's life, and papering it over with exceptions does not make your program more robust. I think the reason programmers in C/C++/Java style languages have been attracted to exceptions is simply because the syntax does not have a concise way to call a function that returns multiple values, so it's hard to write a function that either produces a return value &lt;em&gt;or&lt;/em&gt; returns an error.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;While I completely agree with this, I think one could argue that we do have a way of returning multiple values: &lt;strong&gt;Pass-By-Reference.&lt;/strong&gt;&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;The Idea&lt;/h3&gt;
&lt;p&gt;For every function that you define, add an extra parameter that will be passed by reference. Do NOT try to use the return value of the function to return any error values, only use it to return "real" values. Any error values should be assigned to the new parameter. Essentially, this will allow you to return any error values independent of the function's actual return value. This will make things somewhat easier when trying to handle any errors from within the calling procedure. For this to work, I believe it's imperative that the programmer follows these guidelines for EVERY function in the project.&amp;nbsp; If you only use this occasionally, your code will be a mess.&lt;/p&gt;
&lt;p&gt;(This is an example of Programming INTO a Language, as discussed in &lt;a class="offsite-link-inline" title="Code Complete" href="http://www.amazon.com/exec/obidos/ASIN/0735619670/errornixcom-20" target="_blank"&gt;Code Complete.&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Now we're still faced with the problem of having a bunch of error handling code mixed in with our logic. So what if we did this... Create an ErrorHandler class. This class could basically serve as a "bank" of error handling methods. Each method could correspond to a different error code. These error codes are what get assigned to our passed-by-reference parameters.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Is it getting complicated yet?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Every class within the project could contain a private instance of the ErrorHandler. After each function call, a private ErrorHandler "consumes" the variable that was passed in by reference and runs whatever local methods the error code is meant to trigger. This would add an extra line of code for every function call, but it will also allow you to keep your error handling code separate from your logic.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Yeah, it's definitely getting complicated.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I should probably cut this off before I get into creating a makeshift table of error codes and using function pointers for the error-handling methods.&lt;/p&gt;
&lt;p&gt;A methodology such as this would probably be a bad idea for large projects, as it can easily spiral out of control. However, for smaller projects, I think that it could be a viable alternative to exceptions. Of course that's just what I'm thinking at the moment. It's entirely possible that I'll sleep on it and ultimately come to the conclusion that this whole idea is asinine.&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/I8dQyvs7xJrpdyviRHM0RBUdwHI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I8dQyvs7xJrpdyviRHM0RBUdwHI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/I8dQyvs7xJrpdyviRHM0RBUdwHI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I8dQyvs7xJrpdyviRHM0RBUdwHI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsAboutSoftware/~4/4ka560CUqow" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rantsaboutsoftware.com/blog/rss-comments-entry-4903334.xml</wfw:commentRss><feedburner:origLink>http://www.rantsaboutsoftware.com/blog/pass-by-reference-error-handling.html</feedburner:origLink></item><item><title>Domain Name Change</title><category>Site News</category><category>Web</category><dc:creator>Errornix</dc:creator><pubDate>Fri, 17 Jul 2009 14:14:24 +0000</pubDate><link>http://feedproxy.google.com/~r/RantsAboutSoftware/~3/WDCH1_0XVl4/domain-name-change.html</link><guid isPermaLink="false">280203:2838615:4660337</guid><description>&lt;p&gt;A little bit of &lt;a title="Site News" href="http://www.rantsaboutsoftware.com/blog/tag/site-news"&gt;site news:&lt;/a&gt; I've decided to change the domain name of this site from errornix.com to rantsaboutsoftware.com. &lt;strong&gt;Rants About Software&lt;/strong&gt; has pretty much always been the title. I just finally decided to make the domain name match. As usual, I registered the domain through &lt;a class="offsite-link-inline" title="Bihira" href="http://www.bihira.com/whmcompletesolution/aff.php?aff=017" target="_blank"&gt;Bihira&lt;/a&gt; (&lt;a title="Bihira is the Greatest" href="http://www.rantsaboutsoftware.com/blog/bihira-is-the-greatest.html"&gt;They're the greatest!&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;This is mainly just a cosmetic change, the site itself isn't changing. Also, &lt;a title="Errornix.com" href="http://www.errornix.com/"&gt;errornix.com&lt;/a&gt; still works; it just redirects you to &lt;a title="Rants About Software" href="http://www.rantsaboutsoftware.com/"&gt;rantsaboutsoftware.com.&lt;/a&gt;&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/U3y1FyJZzZDbgIHz-6OAvM9bqT0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U3y1FyJZzZDbgIHz-6OAvM9bqT0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/U3y1FyJZzZDbgIHz-6OAvM9bqT0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U3y1FyJZzZDbgIHz-6OAvM9bqT0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsAboutSoftware/~4/WDCH1_0XVl4" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rantsaboutsoftware.com/blog/rss-comments-entry-4660337.xml</wfw:commentRss><feedburner:origLink>http://www.rantsaboutsoftware.com/blog/domain-name-change.html</feedburner:origLink></item><item><title>Highlight the Author's Comments in Squarespace</title><category>CSS</category><category>Development</category><category>Tutorial</category><category>Web</category><dc:creator>Errornix</dc:creator><pubDate>Wed, 01 Jul 2009 02:17:00 +0000</pubDate><link>http://feedproxy.google.com/~r/RantsAboutSoftware/~3/pixahtbenPk/highlight-the-authors-comments-in-squarespace.html</link><guid isPermaLink="false">280203:2838615:4479925</guid><description>&lt;p&gt;Here's another &lt;strong&gt;&lt;a title="Squarespace" href="http://www.squarespace.com/?associateTag=errornix"&gt;Squarespace&lt;/a&gt;&lt;/strong&gt; tutorial for you. This one's a bit shorter than &lt;strong&gt;&lt;a title="Add a Custom Twitter Widget to Your Squarespace Site" href="http://www.rantsaboutsoftware.com/blog/add-a-custom-twitter-widget-to-your-squarespace-site.html"&gt;the last one.&lt;/a&gt;&lt;/strong&gt; In this tutorial, I'll show you how to highlight comments that are written by the author, so that they stand out amongst regular user comments. This image should give you an idea of what I mean.&lt;/p&gt;
&lt;p&gt;&lt;span class="full-image-block ssNonEditable"&gt;&lt;span&gt;&lt;img src="http://www.rantsaboutsoftware.com/storage/blog-images/user_comments.png?__SQUARESPACE_CACHEVERSION=1248810574051" title="This is a title attribute from the author." alt="" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;This is a short and simple little trick, but I'm sure you can easily see how effective it can be. By default, Squarespace doesn't really provide much of an indicator that a comment has been left by the author (other than the username, but nobody pays much attention to that anyway).&lt;/p&gt;
&lt;p&gt;To do this, start off by setting the style of the regular user comments. Just do this using the &lt;strong&gt;Font, Colors &amp;amp; Sizes&lt;/strong&gt; tool when in &lt;strong&gt;Style Editing&lt;/strong&gt; mode. Chances are, you already have this style set the way you want it. Once you've done that, go to &lt;strong&gt;Custom CSS&lt;/strong&gt; and add the following&lt;/p&gt;
&lt;p&gt;&lt;code&gt;.authored-by-yournamehere .comment&lt;br /&gt;{ /* style here */ }&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Obviously you need to replace "yournamehere" with your actual username. Then just apply whatever style/colors you want. To give you an example, here's what I did...&lt;/p&gt;
&lt;p&gt;&lt;code&gt;.authored-by-errornix .comment&lt;br /&gt;{background-color: #BFFFF0; border-color: #E6E6E6;}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you want, you could easily change other things, such as font settings, or add images. But im my opinion, this would just look weird. By only adjusting the color settings, you'll inherit all of your other style settings, and your comments will just appear to be highlighted rather than appearing to be a completely different style.&lt;/p&gt;
&lt;p&gt;Like I said, this was a short and simple one. But if you have any questions, let me know!&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RPbcZDm_YIcZbVY9nfZfMxHiXEo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RPbcZDm_YIcZbVY9nfZfMxHiXEo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RPbcZDm_YIcZbVY9nfZfMxHiXEo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RPbcZDm_YIcZbVY9nfZfMxHiXEo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsAboutSoftware/~4/pixahtbenPk" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rantsaboutsoftware.com/blog/rss-comments-entry-4479925.xml</wfw:commentRss><feedburner:origLink>http://www.rantsaboutsoftware.com/blog/highlight-the-authors-comments-in-squarespace.html</feedburner:origLink></item><item><title>Status Update</title><category>Memories of Hyrule</category><category>Projects</category><category>Site News</category><dc:creator>Errornix</dc:creator><pubDate>Sat, 13 Jun 2009 13:23:00 +0000</pubDate><link>http://feedproxy.google.com/~r/RantsAboutSoftware/~3/OCjR34atIww/status-update.html</link><guid isPermaLink="false">280203:2838615:4121420</guid><description>&lt;p&gt;I figured I'd just take a minute to update everyone on what's been going on with &lt;a title="My Current Projects" href="http://www.rantsaboutsoftware.com/projects/"&gt;my current projects.&lt;/a&gt;&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Projects&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a title="Memories of Hyrule" href="http://www.rantsaboutsoftware.com/memories-of-hyrule/"&gt;Memories of Hyrule&lt;/a&gt;&lt;/strong&gt; - The majority of the MoH engine has been finished for quite a while, but there's one important piece that I've yet to finish. I've never implemented a system that will allow the game world to maintain it's state. What I mean is that when you defeat the enemies on a screen, then leave and come back, the enemies will already be back. Naturally, I would want them to eventually return, but not immediately after leaving and entering the same screen!&lt;/p&gt;
&lt;p&gt;I've been unsure of how to solve this problem for a while now, but I think it suddenly dawned on me. I'll probably have a full post on it in the future, but I have an idea for an ADT that will be able to maintain the current state of the world in the player's immediate surroundings.&lt;/p&gt;
&lt;p&gt;So it's still a ways off, but &lt;a title="Memories of Hyrule" href="http://www.rantsaboutsoftware.com/memories-of-hyrule/"&gt;Memories of Hyrule&lt;/a&gt; is still moving forward, and will be released once it's been "perfected".&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a title="Project X" href="http://www.rantsaboutsoftware.com/project-x/"&gt;Project X&lt;/a&gt;&lt;/strong&gt; - I know I've been pretty tight-lipped about this one. I'm still not really going to reveal any details, but I figured I'd at least give you a small idea of what it is... It's a game portal - mostly Flash, but there will be some other stuff in there too.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;iPhone&lt;/strong&gt; - I should be ready to roll out my first couple of iPhone apps soon. Just to warn you, the first app isn't too exciting, but I've got a couple of other things coming down the pipe. So check back for more updates on that soon!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; In case you're wondering, I put "perfected" in quotes when referring to software, because software can only be theoretically perfected. We can't even prove that a piece of code is bug-free, let alone perfectly crafted... but we still try to get as close as we can.&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cm-_ztVILW7kIZreGWZsU1p7418/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cm-_ztVILW7kIZreGWZsU1p7418/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cm-_ztVILW7kIZreGWZsU1p7418/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cm-_ztVILW7kIZreGWZsU1p7418/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsAboutSoftware/~4/OCjR34atIww" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rantsaboutsoftware.com/blog/rss-comments-entry-4121420.xml</wfw:commentRss><feedburner:origLink>http://www.rantsaboutsoftware.com/blog/status-update.html</feedburner:origLink></item><item><title>Google FAIL!</title><category>Fail</category><category>Google</category><dc:creator>Errornix</dc:creator><pubDate>Sat, 02 May 2009 13:53:00 +0000</pubDate><link>http://feedproxy.google.com/~r/RantsAboutSoftware/~3/eGHDJOl1ZLc/google-fail.html</link><guid isPermaLink="false">280203:2838615:4493576</guid><description>&lt;p&gt;&lt;span class="thumbnail-image-float-left ssNonEditable"&gt;&lt;span&gt;&lt;a href="javascript:showFullImage('/display/ShowImage?imageUrl=%2Fstorage%2Fblog-images%2Fgoogle_fail.png%3F__SQUARESPACE_CACHEVERSION%3D1246478273147',731,852);"&gt;&lt;img title="FAIL!" src="http://www.rantsaboutsoftware.com/storage/thumbnails/2838614-3485182-thumbnail.jpg?__SQUARESPACE_CACHEVERSION=1246478273149" alt="" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;Wow, I never would have thought that I would write a title like THAT on this site.&amp;nbsp; But low and behold, I did experience a brief Google FAIL.&lt;/p&gt;
&lt;p&gt;I was checking my Gmail from within my iGoogle page, and for some reason the search bar/header appeared both at the top and where my inbox should have been. At first, I thought maybe this was some kind of refresh problem, but both search boxes were fully-functional. Weird. I'm not sure what happened, but a simple refresh fixed it - end of fail.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; In case you're wondering, I'm using the &lt;strong&gt;PHP Coder&lt;/strong&gt; iGoogle theme.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YubQlFKIFOzUBOYuQevqdfIdIck/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YubQlFKIFOzUBOYuQevqdfIdIck/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YubQlFKIFOzUBOYuQevqdfIdIck/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YubQlFKIFOzUBOYuQevqdfIdIck/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsAboutSoftware/~4/eGHDJOl1ZLc" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rantsaboutsoftware.com/blog/rss-comments-entry-4493576.xml</wfw:commentRss><feedburner:origLink>http://www.rantsaboutsoftware.com/blog/google-fail.html</feedburner:origLink></item><item><title>The Default Case Dilemma</title><category>C++</category><category>Code</category><category>Memories of Hyrule</category><category>Programming</category><dc:creator>Errornix</dc:creator><pubDate>Mon, 20 Apr 2009 23:14:00 +0000</pubDate><link>http://feedproxy.google.com/~r/RantsAboutSoftware/~3/oJ5s7h0Js5c/the-default-case-dilemma.html</link><guid isPermaLink="false">280203:2838615:3930924</guid><description>&lt;p&gt;I have to confess something. In &lt;a title="A Passion for Programming" href="http://www.rantsaboutsoftware.com/blog/a-passion-for-programming.html"&gt;my last post,&lt;/a&gt; I talked a lot about good coding practices. Well, it seems I have a tendency to break one of my own rules. I was looking through some of my &lt;a title="Zelda: Memories of Hyrule" href="http://www.rantsaboutsoftware.com/memories-of-hyrule/"&gt;Memories of Hyrule&lt;/a&gt; code and I realized that I have a tendency to leave the &lt;code&gt;default&lt;/code&gt; cases, in my &lt;code&gt;switch&lt;/code&gt; statements, blank.&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;Here is an example of what I'm talking about.&lt;/p&gt;
&lt;p&gt;&lt;code&gt; case BLUE_POTION:&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imgBluePotion-&amp;gt;draw(3, 2);&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt; &lt;br /&gt; case RED_POTION:&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imgRedPotion-&amp;gt;draw(3, 2);&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt; &lt;br /&gt; case MAGIC_WAND:&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imgMagicWand-&amp;gt;draw(4, 2);&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt; &lt;br /&gt; default:&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Something terrible has happened.&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break; &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This is the tail-end of a method that draws the player's current inventory items on the screen. There is a different case for each item that is available in the game. So in the end, I'm left with a blank default case. I want to say that this isn't a big deal because I'm sure that the default case with never be reached. But can I really be 100% certain of that? No, of course not. So what can I do to fix this?&lt;/p&gt;
&lt;p&gt;I've seen other programmers simply use their last case as their default case. I can see the logic in doing this, but I really don't like it. I think that if I'm going to draw something on the screen, it's going to be because it absolutely belongs there, not because nothing else belongs there.&lt;/p&gt;
&lt;p&gt;My next thought was to handle this like any other error or exception. But I don't want to do that, because getting into that default case isn't necessarily something that would be fatal to the application or even something that would disturb the player. So I don't want to turn it into something that will.&lt;/p&gt;
&lt;p&gt;I'll be honest. I'm a little stumped with this one. For the time being, it's still just a comment (although it's a little better than the one displayed above), but I still feel like it should be doing &lt;em&gt;something&lt;/em&gt;. Perhaps this is a scenario where an empty control block really is the best way to go?&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7CUPCZcN3Un0bv0m8C6B7DDed8U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7CUPCZcN3Un0bv0m8C6B7DDed8U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7CUPCZcN3Un0bv0m8C6B7DDed8U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7CUPCZcN3Un0bv0m8C6B7DDed8U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsAboutSoftware/~4/oJ5s7h0Js5c" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rantsaboutsoftware.com/blog/rss-comments-entry-3930924.xml</wfw:commentRss><feedburner:origLink>http://www.rantsaboutsoftware.com/blog/the-default-case-dilemma.html</feedburner:origLink></item><item><title>A Passion for Programming</title><category>Programming</category><dc:creator>Errornix</dc:creator><pubDate>Sat, 11 Apr 2009 12:09:00 +0000</pubDate><link>http://feedproxy.google.com/~r/RantsAboutSoftware/~3/RUptjQnQFgM/a-passion-for-programming.html</link><guid isPermaLink="false">280203:2838615:3930920</guid><description>&lt;p&gt;&lt;span class="full-image-float-left ssNonEditable"&gt;&lt;span&gt;&lt;img title="I know it's lame to buy yourself a Valentine. But if I actually find these, I don't care, I'm doing it." src="http://www.rantsaboutsoftware.com/storage/blog-images/i_love_code.png?__SQUARESPACE_CACHEVERSION=1243990567106" alt="I Love Code" /&gt;&lt;/span&gt;&lt;/span&gt;There exists programmers who do not love what they do... I know, I can't believe it either.&lt;/p&gt;
&lt;p&gt;To many, software development is just an everyday 9-5 job. But to others (such as myself), programming is practically a way of life! But I suppose not everyone can have the same love for code that I do. Not everyone can really admire the elegance of a well-formed recursive function. Not everyone can read a piece of code and appreciate it in the same way that others might appreciate a song, film, or book. But the problem is not that there are people who don't love software. The problem is that there are people who don't love software despite the fact that they CHOSE a career in which they write it every day.&lt;/p&gt;
&lt;p&gt;But how do I know? How do I know that the people writing software don't love it the same way that I do? How do I know that people chose to go all the way through school in order to start a career in a field that they don't love?&lt;/p&gt;
&lt;p&gt;I know because I read their code.&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Aesthetics Matter!&lt;br /&gt;&lt;/h3&gt;
&lt;p&gt;I look at ugly code ALL the time! I look at code with incorrectly indented code blocks. I see code with inconsistent variable naming conventions - that's if they even have conventions. I see poorly designed class interfaces, inefficient nested for-loops, execution paths that are never reached, vague documentation, the list goes on.&lt;/p&gt;
&lt;p&gt;If you love what you do, then you should WANT to write clean code. It's not enough to just get the program working. Aesthetics matter!&lt;/p&gt;
&lt;p&gt;You should always follow some form of coding guidelines - not because your boss says you have to, but because you WANT to. You should care about the readability and integrity of your code. Here are some sample coding guidelines from the &lt;a class="offsite-link-inline" title="C# Coding Standard" href="http://www.tiobe.com/content/paperinfo/gemrcsharpcs.pdf" target="_blank"&gt;C# Coding Standard&lt;/a&gt; that should help.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Methods with return values should have a name describing the value returned, such as &lt;code&gt;GetObjectState()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Prefix private member variables with &lt;code&gt;m_&lt;/code&gt;. Use Pascal casing for the rest of a member variable name following the &lt;code&gt;m_&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Avoid putting a &lt;code&gt;using&lt;/code&gt; statement inside a namespace.&lt;/li&gt;
&lt;li&gt;Always check a delegate for &lt;code&gt;null&lt;/code&gt; before invoking it.&lt;/li&gt;
&lt;li&gt;Avoid putting multiple classes in a single file.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Again, I'm not telling anyone to follow these exact coding guidelines. I'm just saying that you should HAVE guidelines, and more importantly, you should WANT to follow them!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Refactor Your Code!&lt;br /&gt;&lt;/h3&gt;
&lt;p&gt;All too often, programmers will get a piece of code working and then they'll abandon it and move on to the next task. Like I said before, it's not enough to just get your code working. You need to go back and refactor your code!&lt;/p&gt;
&lt;p&gt;How often do you create temporary variables while debugging? Go back and get rid of them! Make sure there aren't any control paths that can't be reached. Improve the efficiency of your implementation by removing redundant code.&lt;/p&gt;
&lt;p&gt;The end result should be a tight, concise, and clean implementation of your solution.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Make Your Code Communicate&lt;/h3&gt;
&lt;p&gt;This one can be a little tricky. For the sake of future programmers, who may someday be maintaining what you've written, you need to try to communicate your thought process to them through your code. So just how exactly do you do that?&lt;/p&gt;
&lt;p&gt;Well the first, and most obvious, answer is comments. But having well-commented code is no reason to write bad code. First, you should program as if comments don't even exist. Use descriptive names, refactor your code, and get rid of the bloat. Make your code straightforward and easy to understand, and THEN comment it.&lt;/p&gt;
&lt;p&gt;Of course comments can be used to communicate to other programmers, but how do you make your actual CODE communicate? Show them that you've thought of "everything"...&lt;/p&gt;
&lt;p&gt;When creating a C++ class, you should always overload the assignment operator. However, this is not always necessary for the functionality of the program at hand. I don't care. Write it anyway. This will show them that you've at least &lt;em&gt;thought &lt;/em&gt;about it. The same goes for default constructors and destructors.&lt;/p&gt;
&lt;p&gt;When checking for user input, assume anything and everything may be entered, and handle it accordingly. Don't leave it up to the maintenance programmer to think of every scenario. He has enough on his mind with just trying to figure out your code and implement his change.&lt;/p&gt;
&lt;p&gt;Consider all control paths. Are there any obscure/unlikely paths that you may not be handling very well. Perhaps these should actually be exceptions. If so, catch them accordingly, rather than having someone else spend hours tracing through your code with a debugger.&lt;/p&gt;
&lt;p&gt;Improving our code shouldn't be a chore! It should just be a part of what we all do. We do it because we love it - because we care about the product, both inside and out.&lt;/p&gt;
&lt;p&gt;Side Note:&amp;nbsp;I hope Jeff doesn't mind, but I stole the above image from &lt;a class="offsite-link-inline" title="Coding Horror" href="http://www.codinghorror.com/" target="_blank"&gt;codinghorror.com.&lt;/a&gt;&lt;/p&gt;
&lt;div align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1206100439386847";
/* ErrornixTextAds */
google_ad_slot = "6842790488";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Hu-Y0h9ABO-9GwLsCOs78BV4DO4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Hu-Y0h9ABO-9GwLsCOs78BV4DO4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Hu-Y0h9ABO-9GwLsCOs78BV4DO4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Hu-Y0h9ABO-9GwLsCOs78BV4DO4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsAboutSoftware/~4/RUptjQnQFgM" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rantsaboutsoftware.com/blog/rss-comments-entry-3930920.xml</wfw:commentRss><feedburner:origLink>http://www.rantsaboutsoftware.com/blog/a-passion-for-programming.html</feedburner:origLink></item></channel></rss>
