<?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>Tue, 17 Aug 2010 22:32:12 +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>Don&#8217;t Judge an Integer by its Wrapper</title>
		<link>http://www.cmsimike.com/blog/2010/08/17/dont-judge-an-integer-by-its-wrapper/</link>
		<comments>http://www.cmsimike.com/blog/2010/08/17/dont-judge-an-integer-by-its-wrapper/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 20:35:41 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[autoboxing]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[primitives]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=213</guid>
		<description><![CDATA[I can&#8217;t take credit for that title. Dondi sent it to me in an email. Not sure if he got it from anywhere, though. If he did, I&#8217;m sorry to be using it, but it makes perfect sense in the context of this post.
Anyway, Jacob posed this question (explained through a class) in Java:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
public class [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t take credit for that title. Dondi sent it to me in an email. Not sure if he got it from anywhere, though. If he did, I&#8217;m sorry to be using it, but it makes perfect sense in the context of this post.</p>
<p>Anyway, <a href="http://jjcm.org" target="_blank">Jacob</a> posed this question (explained through a class) in Java:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> WTFInteger
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> args<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #003399;">Integer</span> foo <span style="color: #339933;">=</span> <span style="color: #cc66cc;">127</span><span style="color: #339933;">;</span>
    <span style="color: #003399;">Integer</span> bar <span style="color: #339933;">=</span> <span style="color: #cc66cc;">127</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>foo <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;,&quot;</span> <span style="color: #339933;">+</span> bar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//127,127</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>foo <span style="color: #339933;">&lt;=</span> bar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//true     </span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>foo <span style="color: #339933;">&gt;=</span> bar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//true</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>foo <span style="color: #339933;">==</span> bar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//true</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>foo.<span style="color: #006633;">intValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> bar.<span style="color: #006633;">intValue</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: #666666; font-style: italic;">//true</span>
&nbsp;
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    foo <span style="color: #339933;">=</span> <span style="color: #cc66cc;">128</span><span style="color: #339933;">;</span>
    bar <span style="color: #339933;">=</span> <span style="color: #cc66cc;">128</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>foo <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;,&quot;</span> <span style="color: #339933;">+</span> bar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//128,128</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>foo <span style="color: #339933;">&lt;=</span> bar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//true     </span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>foo <span style="color: #339933;">&gt;=</span> bar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//true</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>foo <span style="color: #339933;">==</span> bar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//false</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>foo.<span style="color: #006633;">intValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> bar.<span style="color: #006633;">intValue</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: #666666; font-style: italic;">//true</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>A little test class and in the comments, the output from each evaluation. So what&#8217;s going on here? Auto unboxing seems to be going on for the comparison operations, but then why does the equality test pass in one instance but fail in another?</p>
<p>After some research, turns out that the object representation of primitives have a cache that acts kind like a String.intern(), meaning if you assign an Integer a value between a range (default for Integers [-128,127]), you end up getting the same object back, which is why the first (foo == bar) succeeds (value is 127) and why the second (foo == bar) fails (values are 128).</p>
<p>From the comments of the Integer class:</p>
<blockquote><p>/**<br />
* Cache to support the object identity semantics of autoboxing for values between<br />
* -128 and 127 (inclusive) as required by JLS.<br />
*<br />
* The cache is initialized on first usage. During VM initialization the<br />
* getAndRemoveCacheProperties method may be used to get and remove any system<br />
* properites that configure the cache size. At this time, the size of the<br />
* cache may be controlled by the vm option -XX:AutoBoxCacheMax=&lt;size&gt;.<br />
*/</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2010/08/17/dont-judge-an-integer-by-its-wrapper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Python, Threading and the Global Interpreter Lock</title>
		<link>http://www.cmsimike.com/blog/2010/05/21/python-threading-and-the-global-interpreter-lock/</link>
		<comments>http://www.cmsimike.com/blog/2010/05/21/python-threading-and-the-global-interpreter-lock/#comments</comments>
		<pubDate>Sat, 22 May 2010 01:10:59 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gil]]></category>
		<category><![CDATA[global interpreter lock]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[threading]]></category>
		<category><![CDATA[threads]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=210</guid>
		<description><![CDATA[I am still heavy on my Python learning kick. One thing that&#8217;s always interested me is the Global Interpreter Lock and why Python doesn&#8217;t have &#8220;real&#8221; threading. I came across a talk given by David Beazley called &#8220;Mindblowing Python GIL&#8221; that was very informative. Pretty shocking really about how it works and very interesting. Obviously [...]]]></description>
			<content:encoded><![CDATA[<p>I am still heavy on my Python learning kick. One thing that&#8217;s always interested me is the Global Interpreter Lock and why Python doesn&#8217;t have &#8220;real&#8221; threading. I came across a talk given by <a href="david beazley" target="_blank">David Beazley</a> called <a href="http://blip.tv/file/2232410" target="_blank">&#8220;Mindblowing Python GIL&#8221;</a> that was very informative. Pretty shocking really about how it works and very interesting. Obviously only watching this video would leave a bad taste in your mouth regarding Python and threading, so now I need to find another talk about why the GIL is good. There is a link in the comments to a slide show that talks about why it is good, but slides without the talk are almost useless for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2010/05/21/python-threading-and-the-global-interpreter-lock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNS/Web server Workaround Shut Down By Sony</title>
		<link>http://www.cmsimike.com/blog/2010/04/14/dnsweb-server-workaround-shut-down-by-sony/</link>
		<comments>http://www.cmsimike.com/blog/2010/04/14/dnsweb-server-workaround-shut-down-by-sony/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 22:17:50 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[firmware upgrade]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[playstation]]></category>
		<category><![CDATA[playstation 3]]></category>
		<category><![CDATA[psn]]></category>
		<category><![CDATA[sony]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=207</guid>
		<description><![CDATA[An update to my previous post about setting up your own web server and using DNS to get your PS3 on the PSN with the old firmware: it seems as if Sony has &#8220;fixed&#8221; this little loophole that made our PS3s once again functional sometime yesterday (2010-04-14).
No word yet on re-enabling this feature without upgrading [...]]]></description>
			<content:encoded><![CDATA[<p>An update to my previous post about <a href="http://www.cmsimike.com/blog/2010/04/07/sonys-decicion-to-remove-install-other-os-what-a-mistake-dns-work-around-for-psn-access/" target="_blank">setting up your own web server and using DNS to get your PS3 on the PSN with the old firmware</a>: it seems as if Sony has &#8220;fixed&#8221; this little loophole that made our PS3s once again functional sometime yesterday (2010-04-14).</p>
<p>No word yet on re-enabling this feature without upgrading to the latest firmware.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2010/04/14/dnsweb-server-workaround-shut-down-by-sony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sony&#8217;s Decicion to Remove Install Other OS &#8211; What a Mistake, DNS Work Around for PSN Access</title>
		<link>http://www.cmsimike.com/blog/2010/04/07/sonys-decicion-to-remove-install-other-os-what-a-mistake-dns-work-around-for-psn-access/</link>
		<comments>http://www.cmsimike.com/blog/2010/04/07/sonys-decicion-to-remove-install-other-os-what-a-mistake-dns-work-around-for-psn-access/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 08:29:35 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[firmware upgrade]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[playstation]]></category>
		<category><![CDATA[playstation 3]]></category>
		<category><![CDATA[psn]]></category>
		<category><![CDATA[sony]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=202</guid>
		<description><![CDATA[Sony, let me tell you something: this is one fight you cannot possibly win. You saw what happened with the PSP. People started releasing firmware hacks for it and after that, it was over. Removing a very useful feature, a feature that I&#8217;ve already paid for, is not a very wise move on your part. [...]]]></description>
			<content:encoded><![CDATA[<p>Sony, let me tell you something: this is one fight you cannot possibly win. You saw what happened with the PSP. People started releasing firmware hacks for it and after that, it was over. Removing a very useful feature, a feature that I&#8217;ve already paid for, is not a very wise move on your part. You&#8217;ve angered the same gods that brought down hellfire upon the PSP. <a href="http://geohotps3.blogspot.com/2010/03/dont-update.html" target="_blank">Geohot has said not to upgrade because he is looking into a safe way of upgrading and not losing &#8220;Install Other OS.&#8221;</a> Let&#8217;s hope that works out.</p>
<p><span id="more-202"></span></p>
<p>Sony gave people who still want to use features they have paid for two options:</p>
<ol>
<li>Install 3.21 and forever lose the ability to install Linux as a guest operating system. <a href="http://www.haxnetwork.net/2010/03/otheros-will-not-be-removed-from-phat-ps3s/" target="_blank">This goes against what Sony had already promised just about a month ago.</a></li>
<li>Don&#8217;t install 3.21 and lose these features:
<ul>
<li>Ability to sign in to PlayStation Network and use network features  that require signing in to PlayStation Network, such as online features  of PS3 games and chat</li>
<li>Playback of PS3 software titles or Blu-ray Disc videos that require  PS3 system software version 3.21 or later</li>
<li>Playback of copyright-protected videos that are stored on a media  server (when DTCP-IP is enabled under Settings)</li>
<li>Use of new features and improvements that are available on PS3  system software 3.21 or later</li>
</ul>
</li>
</ol>
<p>As your can probably guess, none of these features play out too well. I either lose Linux or the ability to play games and connect to the PSN. Well given that I&#8217;ve already got the games that I want (God of War 3, Metal Gear Solid 4), I really don&#8217;t see a reason to continue purchasing PS3/PSN games especially since Sony has alluded to new games and movies requiring a firmware upgrade. That hurts Sony since they make the most money on video game purchases from what I know. Unfortunately, as it seems to have turned out as demonstrated by the PSN outage a month or so ago, a few of my downloaded games require an active PSN connection of some sort (Marvel vs Capcom 2 &#8211; I&#8217;m looking at you). More money I threw away to Sony? Well&#8230;</p>
<p>I came across <a href="http://www.mydigitallife.info/2010/04/05/how-to-access-psn-bypassing-ps3-firmware-3-21-upgrade-for-otheros/" target="_blank">this work around to get your PS3 logged back into the PSN</a>. I do not like the idea of using someone else&#8217;s DNS to do something I can do, so I sat down on this night that I cannot sleep and got to work setting this up locally. I run my own DNS on my router through the awesomeness that is <a href="http://openwrt.org/" target="_blank">OpenWRT</a> so all I needed to know was the starting off point. The DNS article talks about having a wild card dns entry for</p>
<blockquote><p>*.ps3.update.playstation.net</p></blockquote>
<p>but was unable to do so since *.example.com doesn&#8217;t seem to be a valid host entry. What I need to do now is figure out exactly what host the PS3 is trying to resolve. For that, I added &#8220;log-queries&#8221; to the OpenWRTs /etc/dnsmasq.conf, restarted dnsmasq and started the syslog  daemon. Using the command</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">logread</pre></div></div>

<p>I was able to determine that the host being requested was</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Jan  <span style="color: #000000;">8</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">47</span>:<span style="color: #000000;">38</span> openwrt daemon.debug dnsmasq<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">22608</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: query<span style="color: #7a0874; font-weight: bold;">&#91;</span>A<span style="color: #7a0874; font-weight: bold;">&#93;</span> fus01.ps3.update.playstation.net from 192.168.0.103</pre></div></div>

<p>where 192.168.0.103 is the IP of my PS3. Since I do have a server in the house, running Ubuntu/LAMP, I set the host entry on my OpenWRT to read:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">192.168.0.101  fus01.ps3.update.playstation.net</pre></div></div>

<p>where 192.168.0.101 is the IP of the machine running Apache. So far, so good. Since the article says that the PS3 makes a web request to a text file, next thing I need to know is what is the path and file the PS3 is asking for. This is simply done by tailing your webserver&#8217;s access.log file. Doing what, and trying to connect to the PSN gives me an entry in the log file from my PS3 looking like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">192.168.0.103 - - <span style="color: #7a0874; font-weight: bold;">&#91;</span>06<span style="color: #000000; font-weight: bold;">/</span>Apr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2010</span>:<span style="color: #000000;">23</span>:<span style="color: #000000;">57</span>:<span style="color: #000000;">50</span> -0700<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #ff0000;">&quot;GET /update/ps3/list/us/ps3-updatelist.txt HTTP/1.1&quot;</span> <span style="color: #000000;">404</span> <span style="color: #000000;">235</span> <span style="color: #ff0000;">&quot;-&quot;</span> <span style="color: #ff0000;">&quot;PS3Update-agent/1.0.0 libhttp/1.0.0&quot;</span></pre></div></div>

<p>as well as a message on the PS3 telling me I should upgrade my PS3. No, no.<br />
The 404 in that line means the PS3 (again with the IP 192.168.0.103) is asking for /update/ps3/list/us/ps3-updatelist.txt and it is not found. Simple enough: I go into my server&#8217;s webroot, create the needed directories, create an empty ps3-updatelist.txt file and try connecting to the PSN again. This gives me a different error message of &#8220;An error has occurred. you&#8217;ve been signed out from the Playstation Network&#8221; or whatever that most helpful of error messages said. Success! Something new, and I like when new things happen. The Playstation must not have liked the empty ps3-updatelist.txt file. A simple Google for &#8220;ps3-updatelist.txt&#8221; returns, for me anyway, a URL to what seems to be the exact file and it&#8217;s contents. The problem is that the url is:</p>
<blockquote><p>http://fus01.ps3.update.playstation.net/update/ps3/list/us/ps3-updatelist.txt</p></blockquote>
<p>and if you remember, we edited the DNS for this host to point to our local web server. Thankfully, Google has a cache option!</p>
<p>Using Google&#8217;s cache returned this text:</p>
<blockquote><p># US<br />
Dest=84;CompatibleSystemSoftwareVersion=3.2100-;<br />
Dest=84;ImageVersion=0000a20e;SystemSoftwareVersion=3.2100;CDN=http://dus01.ps3.update.playstation.net/update/ps3/image/us/2010_0401_3a08ef6164a7770ae3e7d5b9f366437a/PS3UPDAT.PUP;CDN_Timeout=30;</p></blockquote>
<p>The exact text we need to be in our ps3-updatelist.txt. A simple change of the key CompatibleSystemSoftwareVersion&#8217;s value from 3.2100 to 0.0000 gives us:</p>
<blockquote><p># US<br />
Dest=84;CompatibleSystemSoftwareVersion=0.0000-;<br />
Dest=84;ImageVersion=0000a20e;SystemSoftwareVersion=3.2100;CDN=http://dus01.ps3.update.playstation.net/update/ps3/image/us/2010_0401_3a08ef6164a7770ae3e7d5b9f366437a/PS3UPDAT.PUP;CDN_Timeout=30;</p></blockquote>
<p>Note that I did not change the second occurrence of 3.2100 but it seems to work fine for me. That is probably the version number that appears when you accept to go through the update process. Either way, pasting that into my file on the webserver grants us access to the PSN and my sweet sweet copy of Marvel vs Capcom 2.</p>
<p>The only drawback is that I&#8217;ve only put in one host entry for the PS3 to check. If it randomly goes through a list of other hosts to try to get the update list, I may have to add those too.</p>
<p>Note that this method does not get you around upgrading. Future Playstation 3 games and Blu-ray movies may force you to upgrade. I suggest not buying those anymore if you don&#8217;t want to be forced to upgrade. Or just wait for Geohot to come through. Also this method does not help with piracy. If you&#8217;re looking for that, I suggest you go elsewhere. This has never been about piracy. I don&#8217;t want it to come to that.</p>
<p>As for if I&#8217;m ever going to upgrade? I don&#8217;t know. Maybe one day if any other good games come out. God of War 4? Metal Gear Solid 5 or 6? A re-released Final Fantasy 7 <img src='http://www.cmsimike.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ! I love having all those cores available to me to play around with with Linux and the PS3 and I rarely have time for games as is. I do have a huge library of games that have not been touched yet so I can finally start going through those I guess. Or finally start using my Wii and 360 again? That many cores on the Playstation 3 something I can&#8217;t easily replace with another small form factor computer. Hell, even a regular computer doesn&#8217;t give me all that parallel processing ability. The Cell processor is awesome in that regard. I really don&#8217;t want to give that up due to Sony&#8217;s short sight.</p>
<p>Sony, let&#8217;s talk for a minute. I&#8217;ve always been a huge fan of yours. Everyone mocked but I persevered for reasons such as &#8220;Install Other OS.&#8221; I was a PS3 early adopter (which really is what earned me the mocking). I had a Playstation 1 and Playstation 2. I looked forward to the PS3 from the days of the rumors of a prototype new Playstation being rolled around that was 9 PS2s running in parallel. It has become, literally, the most used device in my room. All my media is played on it. I use it for games since I presume the 360 is going to red ring as soon as I turn it on. I use the PS3 for computing. It was the most awesome of devices. Removing &#8220;Install Other OS&#8221; as well as the PSN screw up that locked me out of Marvel vs Capcom 2 for a weekend has basically destroyed my faith in you. I get that I am the minority in your business plan. Not many people used the &#8220;Install Other OS&#8221; to install Linux. Hell I wonder how many people tried to install Windows. But in this case, the minorities are not the people you want to piss off. C&#8217;mon Sony, rethink this move. I want to believe again.</p>
<p>**UPDATE** Just found <a href="http://www.engadget.com/2010/04/06/ps3-firmware-3-21-locking-out-more-than-just-other-operating-sys/" target="_blank">this article about users who have upgraded to 3.21</a>. Sony, please realize that this is a mistake and revert!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2010/04/07/sonys-decicion-to-remove-install-other-os-what-a-mistake-dns-work-around-for-psn-access/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<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 its huge plug-in 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 its huge plug-in 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 plugi-ns 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>2</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>2</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>
	</channel>
</rss>
