<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>./cmsimike</title>
	<atom:link href="http://www.cmsimike.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cmsimike.com/blog</link>
	<description>thoughts from a computer scientist</description>
	<lastBuildDate>Mon, 01 Mar 2010 21:03:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Facebook Chat XMPP Configuration</title>
		<link>http://www.cmsimike.com/blog/2010/03/01/facebook-chat-xmpp-configuration/</link>
		<comments>http://www.cmsimike.com/blog/2010/03/01/facebook-chat-xmpp-configuration/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 21:03:28 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook chat]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=194</guid>
		<description><![CDATA[Just a note: the Facebook Chat data in my post regarding configuration settings for Pidgin and Facebook Chat can be used in any chat client that can connect to XMPP. You just may have to play around with your settings to see what goes where.
]]></description>
			<content:encoded><![CDATA[<p>Just a note: the Facebook Chat data in <a href="http://www.cmsimike.com/blog/2010/02/11/facebook-chat-xmpp-settings-with-pidgin/" target="_blank">my post regarding configuration settings for Pidgin and Facebook Chat</a> can be used in any chat client that can connect to XMPP. You just may have to play around with your settings to see what goes where.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2010/03/01/facebook-chat-xmpp-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Chat XMPP Settings with Pidgin</title>
		<link>http://www.cmsimike.com/blog/2010/02/11/facebook-chat-xmpp-settings-with-pidgin/</link>
		<comments>http://www.cmsimike.com/blog/2010/02/11/facebook-chat-xmpp-settings-with-pidgin/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 00:05:02 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook chat]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=191</guid>
		<description><![CDATA[Facebook, earlier this week, released their new XMPP Facebook Chat which now allows any XMPP-enabled chat client to connect to Facebook chat. For whatever reason I thought this was already how things were done, but I guess not. I just set this up with Pidgin and figured I&#8217;d share the information.
1) Under the accounts menu, [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook, earlier this week, <a href="http://blog.facebook.com/blog.php?post=297991732130" target="_blank">released their new XMPP Facebook Chat</a> which now allows any XMPP-enabled chat client to connect to Facebook chat. For whatever reason I thought this was already how things were done, but I guess not. I just set this up with Pidgin and figured I&#8217;d share the information.</p>
<p><span id="more-191"></span>1) Under the accounts menu, select Manage Accounts.</p>
<p>2) Select &#8220;Add&#8221; and then select the &#8220;XMPP&#8221; protocol.</p>
<p>3) Username is whatever your Facebook username is. For instance, http://facebook.com/blah would mean your username is &#8220;blah&#8221;</p>
<p>4) Domain is chat.facebook.com</p>
<p>5) Under the Advanced tab, uncheck Require SSL/TLS (not sure how I feel about this TBQH)</p>
<p>There we go, you should be able to connect now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2010/02/11/facebook-chat-xmpp-settings-with-pidgin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Importing Color Schemes Cleanly into Eclipse</title>
		<link>http://www.cmsimike.com/blog/2009/12/27/importing-color-schemes-cleanly-into-eclipse/</link>
		<comments>http://www.cmsimike.com/blog/2009/12/27/importing-color-schemes-cleanly-into-eclipse/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 03:34:56 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[IDE]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=188</guid>
		<description><![CDATA[Eclipse, for any Java developer, is a tool that is almost as essential for developing Java application as the Java docs itself. The compiler even. With it&#8217;s huge plugin set and ability to do almost anything you want automatically, it is no surprise why you will probably find this IDE in where where Java is developed.
Then you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.eclipse.org/" target="_blank">Eclipse</a>, for any Java developer, is a tool that is almost as essential for developing Java application as the Java docs itself. The compiler even. With it&#8217;s huge plugin set and ability to do almost anything you want automatically, it is no surprise why you will probably find this IDE in where where Java is developed.</p>
<p>Then you start using it. One of my main complaints about Eclipse is that there is no way to export the color scheme in use without exporting with it other computer-specific settings. I don&#8217;t want to export which specific JRE location to use because it won&#8217;t be the same on a Mac and Windows. Nor do I want to export other settings, probably having to do with plugins installed. And I especially don&#8217;t want another user&#8217;s recently used workspace locations. So what do you do?</p>
<p><span id="more-188"></span>I spent some of my day today getting Eclipse set up to use a color scheme that I like, but every time I downloaded someone&#8217;s exported Eclipse preferences, which includes color scheme, importing it would not only import their color scheme but other settings that I don&#8217;t care for. After much googling, I came across two solutions:</p>
<p>1) <a href="http://srand2.blogspot.com/2009/08/eclipse-color-themes.html" target="_blank">Copying the specific files used for the color scheme.</a></p>
<p>This was a very good solution, however this depends on having access to either the person who has the color scheme installed that you like, or their computer. I did not want to email the guy and wait for a response so I continued looking. I came across the solution I&#8217;ve been looking for</p>
<p>2) <a href="http://eclipsecolorthemes.jottit.com/" target="_blank">Given any Eclipse preference export, sanitize the file before importing it into your instance of Eclipse.</a></p>
<p>This is the method I used to clean the Eclipse preference file. It ran without a hitch. Just copy/paste the &#8220;epf-to-colorscheme&#8221; script into a new file, chmod it executable, and run it like this, presuming you name the file sanitize.sh and you have an Eclipse preference export file named eclipse.epf:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>sanitize.sh eclipse.epf</pre></div></div>

<p>A new file will be created called eclipse_color.epf containing only the color scheme-specific lines.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2009/12/27/importing-color-schemes-cleanly-into-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Euler Problem 1</title>
		<link>http://www.cmsimike.com/blog/2009/12/23/project-euler-problem-1/</link>
		<comments>http://www.cmsimike.com/blog/2009/12/23/project-euler-problem-1/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 02:41:14 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[project euler]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=183</guid>
		<description><![CDATA[So, I&#8217;m starting this much sooner than I would have anticipated but I suddenly got the urge to start.
Problem 1 is pretty straight forward:
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;m starting this much sooner than I would have anticipated but I suddenly got the urge to start.</p>
<p>Problem 1 is pretty straight forward:</p>
<blockquote><p>If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.<br />
Find the sum of all the multiples of 3 or 5 below 1000.</p></blockquote>
<p><span id="more-183"></span><br />
I love me some straight forward questions. Here is what I threw together:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">total = <span style="color: #ff4500;">0</span>
<span style="color: #ff7700;font-weight:bold;">for</span> x <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1000</span><span style="color: black;">&#41;</span>:
  <span style="color: #ff7700;font-weight:bold;">if</span><span style="color: black;">&#40;</span>x <span style="color: #66cc66;">%</span> <span style="color: #ff4500;">5</span> == <span style="color: #ff4500;">0</span> <span style="color: #ff7700;font-weight:bold;">or</span> x <span style="color: #66cc66;">%</span> <span style="color: #ff4500;">3</span> == <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>:
    total += x
<span style="color: #ff7700;font-weight:bold;">print</span> total</pre></td></tr></table></div>

<p>Originally I was thinking about skipping it, but thankfully I didn&#8217;t. There were a few things I learned from doing this problem:</p>
<ol>
<li> Logical Operators in Python &#8211; instead of &amp;&amp;, || and !, they are and, or, and not as demonstrated on line 3</li>
<li> The range(n) function returns numbers from 0-(n-1), not 1-n. I don&#8217;t know why I thought the latter. I guess I am already in vacation mode.</li>
<li>It is hard to remember to put colons before the start of an indented block. I also continuously want to use curly braces and semicolons.</li>
</ol>
<p>I don&#8217;t know if I&#8217;m done working on this yet. There are a lot of ways to answer this problem. The few answers I read on the Project Euler Problem 1 forum were interesting but I stopped reading in case I do decide on working on this some more. I don&#8217;t want to be influenced.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2009/12/23/project-euler-problem-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Social Network Recursion</title>
		<link>http://www.cmsimike.com/blog/2009/12/20/social-network-recursion/</link>
		<comments>http://www.cmsimike.com/blog/2009/12/20/social-network-recursion/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 06:26:20 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[social networking]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=180</guid>
		<description><![CDATA[People who link to Facebook from Myspace and link to Myspace from Facebook.
]]></description>
			<content:encoded><![CDATA[<p>People who link to Facebook from Myspace and link to Myspace from Facebook.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2009/12/20/social-network-recursion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Project Euler &#8211; Coding For Fun and Knowledge</title>
		<link>http://www.cmsimike.com/blog/2009/12/17/project-euler-coding-for-fun-and-knowledge/</link>
		<comments>http://www.cmsimike.com/blog/2009/12/17/project-euler-coding-for-fun-and-knowledge/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 03:01:37 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[project euler]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=177</guid>
		<description><![CDATA[About a year or so ago, I was told of this site, Project Euler.  Unfortunately I didn&#8217;t get into it back then, but an email from a mailing list that I&#8217;m apart of re-sparked my interest in it. In case you haven&#8217;t heard of it before, here is the description of it from the site:

Project [...]]]></description>
			<content:encoded><![CDATA[<p>About a year or so ago, I was told of this site, <a href="http://projecteuler.net" target="_blank">Project Euler</a>.  Unfortunately I didn&#8217;t get into it back then, but an email from a mailing list that I&#8217;m apart of re-sparked my interest in it. In case you haven&#8217;t heard of it before, here is the description of it from the site:</p>
<p><span id="more-177"></span></p>
<blockquote><p>Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.</p>
<p>The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.</p></blockquote>
<p>Fantastic! It&#8217;s like being back in <a href="http://www.cs.lmu.edu/~pdorin/index.html" target="_blank">Dr. Dorin&#8217;s</a> Data Structures and Algorithms class back at Loyola Marymount. A problem is presented to you. You use math and software development to find an answer. Check your answer on the site. You can register and it keeps track of which problems you&#8217;ve finished and which you haven&#8217;t.</p>
<p>But that&#8217;s only half the fun. If you continue reading on <a href="http://projecteuler.net/index.php?section=about" target="_blank">Project Euler&#8217;s About Page</a>,which I highly recommend reading to get you more excited about this:</p>
<blockquote>
<h3>I&#8217;ve written my program but should it take days to get to the answer?</h3>
<p>Absolutely not! Each problem has been designed according to a &#8220;one-minute rule&#8221;, which means that although it may take several hours to design a successful algorithm with more difficult problems, an efficient implementation will allow a solution to be obtained on a modestly powered computer in less than one minute.</p></blockquote>
<p>Not only can you solve problems, but you can then optimize the solution! Yes, you could optimize in almost any situation, however in problems presented at Project Euler, you know the rough time frame that your answer should be found in.  You may write an algorithm that gets the right answer, but requires 6 hours to complete, but 6 hours is much greater than 1 minute. What do you do now? You can go to the next problem and start working on it, or you can go back into your code and see what can be fixed up and optimized. Try to hit that one minute mark. If you have, can you make it any faster? This would be a good way to learn how to gauge your code. See where it can bog down and how to avoid that situations. The learning potential here is grand.</p>
<p>So this seems to be exactly what I originally envisioned this blog being about: code posting, something I&#8217;ve really not done outside of a few situations. As I plow through these Project Euler problems, I hope to post the resulting code any any explanations to my blog. Hopefully that isn&#8217;t a problem from the people that run the site. If it is, please email me!</p>
<p>Once I start, I will try to post 1 solution a week until, well, they get too hard to post once a week given my free time. Unknown currently is whether I want to use a language that I&#8217;m comfortable in, like Java or C, or try to pick up a new language in this process, like Python. I&#8217;m learning more toward the Python route. Then, hopefully, all your Pythoneers (?) can tell me what I&#8217;m doing wrong.</p>
<p>I&#8217;m excited!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2009/12/17/project-euler-coding-for-fun-and-knowledge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter-Based Exception Logger</title>
		<link>http://www.cmsimike.com/blog/2009/11/20/twitter-based-exception-logger/</link>
		<comments>http://www.cmsimike.com/blog/2009/11/20/twitter-based-exception-logger/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 22:38:50 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[experiment]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=172</guid>
		<description><![CDATA[
1
2
3
4
5
6
7
8
try
&#123;
   //some code goes here
&#125;
catch &#40;Exception e&#41;
&#123;
   logToTwitter&#40;&#34;Application Name&#34;, e.getStackTrace&#40;&#41;&#41;;
&#125;


It started with one Tweet from me, followed up by and Retweet from Kelly Sutton to actually give it serious thought. Instead of having to view logs, why not have an exception stack trace appear in your Twitter time line? With services [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">try</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #666666; font-style: italic;">//some code goes here</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   logToTwitter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Application Name&quot;</span>, e.<span style="color: #006633;">getStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><span id="more-172"></span><br />
It started with one <a href="http://twitter.com/cmsimike/statuses/5900818051" target="_blank">Tweet from me</a>, followed up by and <a href="http://twitter.com/KellySutton/statuses/5900871031" target="_blank">Retweet</a> from <a href="http://michaelkellysutton.com/" target="_blank">Kelly Sutton</a> to actually give it serious thought. Instead of having to view logs, why not have an exception stack trace appear in your Twitter time line? With services like <a href="http://www.twitlonger.com" target="_blank">Twitlonger</a>, one can easily shove an entire stack trace into a Tweet. Privacy can be dealt with on Twitter&#8217;s side by setting the privacy of the Twitter Bot user. Except if you&#8217;re using Twitlonger.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">try</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #666666; font-style: italic;">//some code goes here</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   logToTwitter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Application name&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Date</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Instead of the entire stack trace, you can just get a one-liner of the type of exception it is along with a date/time stamp for references when digging through logs.</p>
<p>I guess the one limiting factor of this is the assumption that whatever app is using this logging method have an internet connection.</p>
<p>In any case, this has given me something to think about. I&#8217;d love to see this usefulness in actual applications. With Twitter Lists now enabled, developers can have a whole bunch of logging accounts in a separate list if they don&#8217;t want their time line polluted with exceptions. But if they are worried about that, don&#8217;t write code that will throw exceptions. <img src='http://www.cmsimike.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2009/11/20/twitter-based-exception-logger/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iPhone Development &#8211; Is It Really That Easy? (fin)</title>
		<link>http://www.cmsimike.com/blog/2009/08/17/iphone-development-is-it-really-that-easy-fin/</link>
		<comments>http://www.cmsimike.com/blog/2009/08/17/iphone-development-is-it-really-that-easy-fin/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 22:04:46 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[experiment]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development experiment]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[rapid development]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=166</guid>
		<description><![CDATA[I guess I&#8217;ve lagged on completing this blog entry series for long enough.
Indeed I was able to complete my application in the time frame I set out for. The application itself worked pretty well. I know I could have made it a lot better if I were actually able to get the application onto my [...]]]></description>
			<content:encoded><![CDATA[<p>I guess I&#8217;ve lagged on completing this blog entry series for long enough.</p>
<p>Indeed I was able to complete my application in the time frame I set out for. The application itself worked pretty well. I know I could have made it a lot better if I were actually able to get the application onto my iPhone during the development phase or have the simulator use the iTunes library as the basis for its library. I am now debating whether or not I want to put the application up on Apple&#8217;s App Store.</p>
<p><span id="more-166"></span></p>
<p>My final conclusion regarding the iPhone SDK and Objective-C shouldn&#8217;t be surprising &#8211; yes the SDK made development simple. Other than the weird memory management of Objective-C, it too was also fairly easy to learn. But at the end of the day, a language is just a language. The SDK has to be fairly robust in order to attract developers as well as help with the interaction of the phone. I&#8217;d almost say it was a pleasure to develop for the iPhone, but I won&#8217;t. I won&#8217;t because due to Apple&#8217;s policies on how the app gets onto a phone (even if you want to use a development phone), made developing for it pretty rough. Development would have been much better if I didn&#8217;t have a media player aspect to my application, however it did and since the simulator cannot simulate playing media off an iPhone&#8217;s library and since there were a thousand hoops that needed to be jumped through in order to get the app on the phone itself, it just made everything much rougher than it should have been. One can argue that you really only have to jump through the hoops once, but even in this case, once is far too much. Allow applications to be easily put on your own iPhone, Apple. Why do I have to pay you $100/year for the privilege of getting applications that I write onto my own phone?</p>
<p>I&#8217;m so glad that it is easy to jailbreak iPhones. Any developer that wants to develop applications for personal use for the iPhone should just jailbreak their iPhone and upload it that way. Don&#8217;t pay Apple money for something as asinine as this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2009/08/17/iphone-development-is-it-really-that-easy-fin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On iPhone and Android-Powered Phones and Security</title>
		<link>http://www.cmsimike.com/blog/2009/08/10/on-iphone-and-android-powered-phones-and-security/</link>
		<comments>http://www.cmsimike.com/blog/2009/08/10/on-iphone-and-android-powered-phones-and-security/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 18:11:01 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=164</guid>
		<description><![CDATA[I don&#8217;t mean for this to be a big entry, but I just wanted to point something out. I was reading the interview with Charlie Miller (of, recently, iPhone SMS vulnerability fame) and he said something that I never really thought about until now:
As an aside, Android implemented their SMS stack with Java. Therefore, it [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t mean for this to be a big entry, but I just wanted to point something out. I was reading the interview with <a href="http://www.tomshardware.com/reviews/hacking-iphone-security,2384.html" target="_blank">Charlie Miller (of, recently, iPhone SMS vulnerability fame)</a> and he said something that I never really thought about until now:</p>
<blockquote><p>As an aside, Android implemented their SMS stack with Java. Therefore, it was not possible to corrupt memory, instead, we just got unhandled exceptions. So our attacks were limited to denial of service.</p></blockquote>
<p>Since all of Android&#8217;s applications are actually written in Java rather than Objective C, this gives Android a bit more security when dealing with 3rd party code. Don&#8217;t get me wrong, as a developer I have to qualify that with though probably still possible, just harder to accomplish, there will probably be nothing as bad on Android phones as this iPhone SMS &#8220;threat&#8221; was. The best you can hope for is to crash Android&#8217;s JVM.</p>
<p>If Apple is so anal about trying to protect ATT&#8217;s cellular towers and thereby claiming jailbreaking an iPhone is bad, then why would they allow such a low level language to be the language of choice for developing on the iPhone? This is what happens when a company wants to push their language into even more of the mainstream.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2009/08/10/on-iphone-and-android-powered-phones-and-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On the Subjects of object == null and collection.size() == 0</title>
		<link>http://www.cmsimike.com/blog/2009/07/28/on-the-subject-of-object-is-null-and-collection-size-equals-0/</link>
		<comments>http://www.cmsimike.com/blog/2009/07/28/on-the-subject-of-object-is-null-and-collection-size-equals-0/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 20:38:12 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[mistake]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[software engineering]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=161</guid>
		<description><![CDATA[Let&#8217;s just get one thing straight here people, an object that is null does not mean the same thing as a collection/array of length zero. I&#8217;m sort of seeing this more and more as I continue my existence on this planet and I say we put a stop to this now. Take this example method [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s just get one thing straight here people, an object that is null does not mean the same thing as a collection/array of length zero. I&#8217;m sort of seeing this more and more as I continue my existence on this planet and I say we put a stop to this now. Take this example method declaration (written in Java):</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> Collection<span style="color: #339933;">&lt;</span>SearchResult<span style="color: #339933;">&gt;</span> getSearchResults<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> searchTerm<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Straight forward enough, I would hope. This method takes in a searchTerm String, magic happens (ah abstraction), and a Collection of type SearchResult is returned. Now here is the kicker: what happens if the search query resulted in no results? What should be returned? And why?</p>
<p><span id="more-161"></span></p>
<p>At this point, we essentially have two options if we want to successfully return from this method without using exceptions: return null or return a Collection of type SearchResult of size n | n >= 0;</p>
<p>When returning a Collection, the size indicates how many SearchResults there were. If someone were to search for &#8220;cows&#8221; and the Collection contained 23 SearchResult objects, then we should say that the search had 23 results. Contrary to that, if there are 0 SearchResult objects then we can say that the search had no results.</p>
<p>When null is returned instead of a Collection, that can only mean that something has gone wrong. For instance, the search could not be completed for any reason. This should be the only reason a null should be returned. </p>
<p>By returning a null if a search has been successfully completed, even if there are no results, tells the caller that there may have been an error, which is not what you want to communicate. Returning null should be the worst case scenario in a circumstance like this. It is the duty of the implementer of the getSearchResults method to fully communicate the actual status of things by returning what is the most correct in any situation. </p>
<p>Please do not return null lightly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2009/07/28/on-the-subject-of-object-is-null-and-collection-size-equals-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
