<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>about:code</title>
	<atom:link href="http://aboutcode.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://aboutcode.wordpress.com</link>
	<description>Just another blog about code!</description>
	<lastBuildDate>Fri, 16 Apr 2010 04:07:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='aboutcode.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>about:code</title>
		<link>http://aboutcode.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://aboutcode.wordpress.com/osd.xml" title="about:code" />
	<atom:link rel='hub' href='http://aboutcode.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Bitwise Operators and Precedence</title>
		<link>http://aboutcode.wordpress.com/2010/04/16/bitwise-operators-and-precedence/</link>
		<comments>http://aboutcode.wordpress.com/2010/04/16/bitwise-operators-and-precedence/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 04:07:39 +0000</pubDate>
		<dc:creator>Joseph Gordon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://aboutcode.wordpress.com/?p=26</guid>
		<description><![CDATA[I learn a lesson on operator precedence with respect to bitwise operators.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aboutcode.wordpress.com&amp;blog=4540680&amp;post=26&amp;subd=aboutcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I learned something today. I did not enjoy it, but I learned nonetheless. The lesson is on operator precedence with respect to bitwise operators. In C#, consider about the following:</p>
<pre>bool x = TestFlags(0x04); // What is x?

public bool TestFlags(uint flags)
{
    return flags &amp; 0x04 != 0;
}
</pre>
<p>Well, it&#8217;s a compile error, that&#8217;s what it is. This was completely surprising to me. Specifically, the error is:</p>
<pre>Error 3 Operator '&amp;' cannot be applied to operands of type 'uint' and 'bool'</pre>
<p>Dude! Wait! What? That means that on one side of the &#8216;&amp;&#8217; is a uint and on the other, a bool. The only way I could see that happing is if the operator &#8216;!=&#8217; has precedence over &#8216;&amp;&#8217;. Surely that isn&#8217;t right! But au contraire, after some googling (Ah teh Google, how I love thee) I discovered that indeed, &#8216;!=&#8217; has precedence over &#8216;&amp;&#8217;! This fact disagreed completely with my mental model.</p>
<p>After much griping to my coworkers, I started wondering why this was the antithesis of my mental model. I think it&#8217;s because of the difference between the precedence of the operators &#8216;+&#8217; and &#8216;&amp;&#8217; with respect to operator &#8216;!=&#8217; or &#8216;==&#8217;. To clarify:</p>
<pre>flags &amp; 0x04 != 0 ≡  flags &amp; (0x04  != 0)
flags + 0x04 != 0 ≡ (flags +  0x04) != 0)</pre>
<p>Right, wrong, or indifferent that dichotomy is why I was initially confused. I also wander, “How much C/C++ has a logical bug because of this subtlety?” Let&#8217;s take a look at that code again:</p>
<pre>bool x = TestFlags(0x04); // What is x?

public bool TestFlags(uint flags)
{
    return flags &amp; 0x04 != 0;
}
</pre>
<p>With C/C++, it compiles without the need for parenthesizes and x is 0. Of course, in the C++ world an int is automatically cast to a bool and in a C world there is no difference. Therefore, there would be no need to add the &#8216;!=&#8217; or &#8216;==&#8217; to the statement. However, will the likelihood of seeing this faux pas increase as younger generations of programmers hit the streets with only higher level language experiences?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aboutcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aboutcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aboutcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aboutcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aboutcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aboutcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aboutcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aboutcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aboutcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aboutcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aboutcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aboutcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aboutcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aboutcode.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aboutcode.wordpress.com&amp;blog=4540680&amp;post=26&amp;subd=aboutcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aboutcode.wordpress.com/2010/04/16/bitwise-operators-and-precedence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b1cc59c87d56c90e526ebd510f8c8bb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">crosvenir</media:title>
		</media:content>
	</item>
		<item>
		<title>Open Source Icon Woes</title>
		<link>http://aboutcode.wordpress.com/2010/03/01/open-source-icon-woes/</link>
		<comments>http://aboutcode.wordpress.com/2010/03/01/open-source-icon-woes/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 05:06:06 +0000</pubDate>
		<dc:creator>Joseph Gordon</dc:creator>
				<category><![CDATA[Programming Support]]></category>
		<category><![CDATA[Icons]]></category>
		<category><![CDATA[JUtils]]></category>
		<category><![CDATA[Licenses]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://aboutcode.wordpress.com/?p=16</guid>
		<description><![CDATA[Yay! I&#8217;ve finally taken all the necessary steps to start my own open source software. I&#8217;ve setup a &#8220;Space&#8221; for my project I call JUtils with a company called Assembla. So far I&#8217;ve been nothing but impressed. If I had known it would be this easy then I would&#8217;ve done it a long time ago. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aboutcode.wordpress.com&amp;blog=4540680&amp;post=16&amp;subd=aboutcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yay! I&#8217;ve finally taken all the necessary steps to start my own open source software. I&#8217;ve setup a &#8220;Space&#8221; for my project I call <a href="http://www.assembla.com/spaces/jtuils">JUtils</a> with a company called <a href="http://www.assembla.com/">Assembla</a>.</p>
<p>So far I&#8217;ve been nothing but impressed. If I had known it would be this easy then I would&#8217;ve done it a long time ago. Ok, so that&#8217;s not really true. The thing that&#8217;s held me back from releasing this for so long is really licensing. I&#8217;ve use the software libraries <a href="http://xstream.codehaus.org/">XStream</a> and <a href="http://www.jgoodies.com/">JGoodies</a> in the project. Both of which have straightforward licensing. My problem has been icons.</p>
<p>I have little experience creating them and so did what any good programmer would do when their stuck and needing some Intellectual Property (IP). I googled for it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . This garnered a great many icons. Some of which I really liked. So I started using them and continued coding. Then came the point at which I&#8217;m ready to upload. So I go the locations I&#8217;ve unpacked the icon libraries and there&#8217;s no license information to be found. A little file that is included with most sourcecode that I&#8217;ve ever download is rarely (in my experience) distributed with icon sets.</p>
<p>So I scrap what I have and start over. I&#8217;ve found several that I really like:</p>
<table>
<thead>
<tr>
<td><b>Name</b></td>
<td><b>License Type</b></td>
</tr>
</thead>
<tbody>
<tr>
<td><a href="http://openiconlibrary.sourceforge.net">CrystalClear</a></td>
<td><a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></td>
</tr>
<tr>
<td><a href="http://www.smashingmagazine.com/2009/05/20/flavour-extended-the-ultimate-icon-set-for-web-designers/">Flavour Extended</a></td>
<td>Public Domain</td>
</tr>
<tr>
<td><a href="http://www.fatcow.com/free-icons/">Farm-Fresh Web Icons</a></td>
<td><a href="http://creativecommons.org/licenses/by/3.0/">CC Attribution 3.0</a></td>
</tr>
<tr>
<td><a href="http://www.visualpharm.com/">Must Have Icon Set</a></td>
<td>Public Domain</td>
</tr>
<tr>
<td><a href="http://openiconlibrary.sourceforge.net">OpenIconLibrary</a></td>
<td><a href="http://creativecommons.org/licenses/by-sa/3.0/">CC Attribution-Share Alike 3.0</a></td>
</tr>
</tbody>
</table>
<p>I was able to pick and choose out of these, the 27 icons I needed. I gathered all the licenses and displayed them, with the appropriate urls, in an About dialog in the software. I have no idea if this fulfills the licenses well enough or not. I also don&#8217;t know what sort of license I&#8217;m allowed to use for my applications or code. Any help here would be appreciated.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aboutcode.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aboutcode.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aboutcode.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aboutcode.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aboutcode.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aboutcode.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aboutcode.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aboutcode.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aboutcode.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aboutcode.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aboutcode.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aboutcode.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aboutcode.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aboutcode.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aboutcode.wordpress.com&amp;blog=4540680&amp;post=16&amp;subd=aboutcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aboutcode.wordpress.com/2010/03/01/open-source-icon-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b1cc59c87d56c90e526ebd510f8c8bb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">crosvenir</media:title>
		</media:content>
	</item>
		<item>
		<title>That Stupid Old Windows Start Menu</title>
		<link>http://aboutcode.wordpress.com/2009/11/29/that-stupid-old-windows-start-menu/</link>
		<comments>http://aboutcode.wordpress.com/2009/11/29/that-stupid-old-windows-start-menu/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 06:28:31 +0000</pubDate>
		<dc:creator>Joseph Gordon</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Subjective]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://aboutcode.wordpress.com/?p=11</guid>
		<description><![CDATA[So after getting mad at my old computer for the last time, I thought we&#8217;d take advantage of the weekend sales and pick up a new system. So I&#8217;m finally am on the dual-core and 64-bit bandwagon. Yeah I hold on to old technology for way too long&#8230; But my Socket A Athlon 3000+ was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aboutcode.wordpress.com&amp;blog=4540680&amp;post=11&amp;subd=aboutcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So after getting mad at my old computer for the last time, I thought we&#8217;d take advantage of the weekend sales and pick up a new system. So I&#8217;m finally am on the dual-core <strong>and</strong>  64-bit bandwagon. Yeah I hold on to old technology for way too long&#8230; But my Socket A Athlon 3000+ was a champ. Oh well, on to new adventures.</p>
<p>Adventures like Windows 7. Yeah. Old system = Ubuntu 9.04, new Dell = Windows 7. Little bit of a change there. Overall, though, I kinda like it. Even though I don&#8217;t like the default 64&#215;64 icons on the desktop, it&#8217;s <a href="http://techie-buzz.com/tips-and-tricks/quickly-change-windows-vista-desktop-icon-size.html">super-easy</a> to change. (Because holding CTRL and scrolling while the desktop is selected is intuitive&#8230;)</p>
<p>One thing that I always did with XP systems (never have used Vista much) as soon as logged on for the first time was change the theme and the start menu to classic. I&#8217;ve decided to leave the theme in Windows 7, and it&#8217;s actually grown on me. After only 3 hours or so I actually like it. </p>
<p>The start menu however&#8230; Yeah&#8230; Truth is, I personally do not like the start menu now. Well, I didn&#8217;t like it in XP and the Windows 7 one isn&#8217;t too different. So after looking for a solution to my dilemma I stumbled across the incredibly helpful folks <a href="http://www.msfn.org/board/windows-7-classic-start-menu-t127177.html">here</a>. After spot-reading several posts through the thread, I&#8217;ve come to two conclusions:</p>
<ol>
<li>People are idiots (or at least try <strong>really</strong> hard to act like them).</li>
<li>Windows followers are now more rabid than their Mac analogs.</li>
</ol>
<p>So, rather than use the worst form of argument, <a href="http://www.paulgraham.com/disagree.html">dh0</a>, and say how stupid, blah, blah, and blah, the start menu now looks, I would like to enumerate the functions that I simply do not appeal to me:</p>
<ol>
<li>It primarily uses dynamic menu items</li>
<li>The menu-items that are static are now one level deeper than they were.</li>
<li>The user is more than encouraged to search for menu-items.</li>
</ol>
<p>What bothers me more that the horrid new menu, is the abysmal attitudes people have. I am beside myself to understand how folks can be so disparaging about someone simply because they hold an opinion contrary to their own. Look folks, it&#8217;s really quite simple:</p>
<ul>
<li>When someone asks a question, either answer the question or shut up and go away. Doing anything else is just trolling. Go write a blog about it if you feel so strongly. Trust me, you&#8217;ll feel better.</li>
<li>Allow a person the right to hold a negative opinion about something. I&#8217;m not saying you should never try to persuade someone to your way of thinking, just don&#8217;t berate or belittle them whilst doing so. It really solves nothing.</li>
</ul>
<p>Basically, just don&#8217;t use dh0 &#8211; dh2. If you haven&#8217;t read Paul Graham&#8217;s article, you should.</p>
<p>So now that I feel better, I can finally go to bed.<br />
<a href="http://xkcd.com/386/"><img alt="Duty Calls" src="http://imgs.xkcd.com/comics/duty_calls.png" title="What do you want me to do?  LEAVE?  Then they&#39;ll keep being wrong!" class="alignleft" width="300" height="330" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aboutcode.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aboutcode.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aboutcode.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aboutcode.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aboutcode.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aboutcode.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aboutcode.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aboutcode.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aboutcode.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aboutcode.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aboutcode.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aboutcode.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aboutcode.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aboutcode.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aboutcode.wordpress.com&amp;blog=4540680&amp;post=11&amp;subd=aboutcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aboutcode.wordpress.com/2009/11/29/that-stupid-old-windows-start-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b1cc59c87d56c90e526ebd510f8c8bb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">crosvenir</media:title>
		</media:content>

		<media:content url="http://imgs.xkcd.com/comics/duty_calls.png" medium="image">
			<media:title type="html">What do you want me to do?  LEAVE?  Then they&#39;ll keep being wrong!</media:title>
		</media:content>
	</item>
	</channel>
</rss>
