<?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>oscarbonilla.com &#187; Uncategorized</title>
	<atom:link href="http://oscarbonilla.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://oscarbonilla.com</link>
	<description></description>
	<lastBuildDate>Thu, 15 Dec 2011 18:43:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Distrust</title>
		<link>http://oscarbonilla.com/2011/03/distrust/</link>
		<comments>http://oscarbonilla.com/2011/03/distrust/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 17:54:55 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=851</guid>
		<description><![CDATA[In light of recent news: The hacker, whose March 15 attack was traced to an IP address in Iran, compromised a partner account at the respected certificate authority Comodo Group, which he used to request eight SSL certificates for six domains: mail.google.com, www.google.com, login.yahoo.com, login.skype.com, addons.mozilla.org and login.live.com. The certificates would have allowed the attacker [...]]]></description>
			<content:encoded><![CDATA[<p>In light of <a href="http://www.wired.com/threatlevel/2011/03/comodo-compromise/">recent news</a>:</p>
<blockquote><p>The hacker, whose March 15 attack was traced to an IP address in Iran, compromised a partner account at the respected certificate authority Comodo Group, which he used to request eight SSL certificates for six domains: mail.google.com, www.google.com, login.yahoo.com, login.skype.com, addons.mozilla.org and login.live.com.</p>
<p>The certificates would have allowed the attacker to craft fake pages that would have been accepted by browsers as the legitimate websites. The certificates would have been most useful as part of an attack that redirected traffic intended for Skype, Google and Yahoo to a machine under the attacker's control. Such an attack can range from small-scale Wi-Fi spoofing at a coffee shop all the way to <a href="http://www.wired.com/threatlevel/2008/08/revealed-the-in/" target="_blank">global hijacking of internet routes</a>.</p>
<p>At a minimum, the attacker would then be able to steal login credentials from anyone who entered a username and password into the fake page, or perform a "man in the middle" attack to eavesdrop on the user's session.</p></blockquote>
<p>And because it is not the first time COMODO has screwed up, I've decided to turn off their root certificate from my browser (Safari). Here's how you do that.</p>
<ol>
<li>Open Keychain Preferences (in /Applications/Utilities).</li>
<li>Click on "System Roots" on the left pane.</li>
<li>Seach for "COMODO".</li>
<li>Rigth-click on the certificat and select "Get Info".</li>
<li>Select "Never Trust".</li>
</ol>
<p style="text-align: center;"><a href="http://oscarbonilla.com/wp-content/uploads/2011/03/Screen-shot-2011-03-31-at-10.48.05-AM.png" class="lightview" data-lightview-group="group-851" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="Screen shot 2011-03-31 at 10.48.05 AM"><img class="alignnone size-medium wp-image-852" title="Screen shot 2011-03-31 at 10.48.05 AM" src="http://oscarbonilla.com/wp-content/uploads/2011/03/Screen-shot-2011-03-31-at-10.48.05-AM-300x259.png" alt="" width="300" height="259" /></a></p>
<p>I've just done this so we'll see if it has any effect on my general surfing experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2011/03/distrust/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Think, don&#8217;t Blink!</title>
		<link>http://oscarbonilla.com/2010/06/think-dont-blink/</link>
		<comments>http://oscarbonilla.com/2010/06/think-dont-blink/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 16:45:45 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=760</guid>
		<description><![CDATA[I'm a big fan of Malcolm Gladwell, but I classify his books more as fiction than science. My problem with Gladwell as a science writer is that he always seems to be very selective on the research he presents to his readers. Thus he presents half the issue and makes it up to be "proven" [...]]]></description>
			<content:encoded><![CDATA[<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/2pK0BQ9CUHk'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/2pK0BQ9CUHk' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span></p>
<p>I'm a big fan of <a href="http://en.wikipedia.org/wiki/Malcolm_Gladwell">Malcolm Gladwell</a>, but I classify his books more as fiction than science. My problem with Gladwell as a science writer is that he always seems to be very selective on the research he presents to his readers. Thus he presents half the issue and makes it up to be "proven" by science. I've meant to write some thoughts on <a href="http://www.amazon.com/Blink-Power-Thinking-Without/dp/0316172324">Blink!</a>, which I read a while ago, but never finished writing them. Now Daniel J. Simons and Christopher F. Chabris have beaten me to it with "<a href="http://chronicle.com/article/The-Trouble-With-Intuition/65674/">The Trouble With Intuition</a>"[<a href="http://oscarbonilla.com/2010/06/think-dont-blink/#footnote_0_760" id="identifier_0_760" class="footnote-link footnote-identifier-link" title="Which proves once again my maxim that if you wait long enough to do something, either somebody else does it or it becomes irrelevant.">1</a>]. Here are some good parts:</p>
<blockquote><p>The most troublesome aspect of intuition may be the misleading role it plays in how we perceive patterns and identify causal relationships. When two events occur in close temporal proximity, and the first one plausibly could have caused the second one, we tend to infer that this is what must have happened.</p></blockquote>
<p>I have found that even after constantly repeating "correlation does not imply causation", I still botch it all the time unless I'm actively reminding myself to NOT jump to conclusions before analyzing. The sweet temptation to go with intuition is just too, uh, sweet... and... tempting? Hmm.. okay, let's move along.</p>
<blockquote><p>Take the case of the perceived link between childhood vaccinations and autism. Nowadays children receive several vaccines before age 2, and autism is often diagnosed in 2- and 3-year-olds. When a child is diagnosed with autism, parents naturally and understandably seek possible causes. Vaccination involves the introduction of unusual foreign substances (dead viruses, attenuated live viruses, and preservative chemicals) into the body, so it's easy to imagine that those things could profoundly affect a child's behavior. But more than a dozen large-scale epidemiological studies, involving hundreds of thousands of subjects, have shown that children who were vaccinated are no more likely to be diagnosed with autism than are children who were not vaccinated. In other words, there is no association between vaccination and autism. And in the absence of an association, there cannot be a causal link.</p></blockquote>
<p>I've always been baffled at that "vaccination causes autism" debate. In the scientific community there seems to be no debate. And even if "correlation does not imply causation", correlation is a necessary condition for causation. And later on, we find this gem:</p>
<blockquote><p>In a way, intuition and statistics are like oil and water: They can easily coexist in our minds without ever interacting.</p></blockquote>
<p>This is a fantastic analogy, and I have many times been seduced by intuition only to find myself on wild goose chases. The whole piece is worth reading.</p>
<ol class="footnotes"><li id="footnote_0_760" class="footnote">Which proves once again my maxim that if you wait long enough to do something, either somebody else does it or it becomes irrelevant.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/06/think-dont-blink/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unleash the power of the atom&#8230; to boil water?</title>
		<link>http://oscarbonilla.com/2010/02/unleash-the-power-of-the-atom-to-boil-water/</link>
		<comments>http://oscarbonilla.com/2010/02/unleash-the-power-of-the-atom-to-boil-water/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 05:14:45 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Stuff I Know Nothing About]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=446</guid>
		<description><![CDATA[I'm going to go off on a limb and blog about something I know absolutely nothing about. Power generation. So I'm reading the news recently and I read that the U.S. is going to invest in building a couple of nuclear power plants. Now, I don't know much about nuclear power plants or power generation [...]]]></description>
			<content:encoded><![CDATA[<p>I'm going to go off on a limb and blog about something I know absolutely nothing about. Power generation.</p>
<p>So I'm reading the news recently and I read that the U.S. is going to invest in building a couple of nuclear power plants. Now, I don't know much about nuclear power plants or power generation in general. But I know how to use the googles for finding out about stuff I don't know much about. So I hit wikipedia and all those other websites and I find about all of these wonderful methods of generating power.</p>
<p><strong>Fossil Fuels:</strong> Coal for instance. Oil and natural gas too. The main idea is to burn these fossil fuels in order to boil water so that the steam can make a turbine spin and generate electricity using a big electromagnet.</p>
<p><strong>Nuclear Fission:</strong> Create a controlled nuclear reaction so that we can heat up water and produce steam to spin a turbine hooked up to a huge electromagnet.</p>
<p><strong>Geothermal Power:</strong> Drill a very, very deep hole to reach the hot granite that underlies the earth's crust. This granite is so hot we can use it to... boil water... steam... turbine... electromagnet.</p>
<p><strong>Hydroelectric:</strong> Just avoid the whole boiling water bit and spin the turbine directly from a river.</p>
<p><strong>Tidal Power:</strong> Make a dam in the ocean and put the turbine there.</p>
<p><strong>Wind Power:</strong> Instead of boiling water and using steam, use wind to spin the turbine.</p>
<p><strong>Solar power: </strong>At this point, if I had read that we were using solar to boil water I would've just given up hope for humanity. But no, at least with solar we actually just use the energy... no turbine involved.</p>
<p>So my question for more informed readers is: uh, how about <strong>not</strong> needing the turbine and using some other method of gathering the released energy? Especially in the case of Nuclear Fission. It seems somewhat wasteful to fire up an atomic bomb just to boil some water...</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/02/unleash-the-power-of-the-atom-to-boil-water/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The case against snippets</title>
		<link>http://oscarbonilla.com/2008/08/the-case-against-snippets/</link>
		<comments>http://oscarbonilla.com/2008/08/the-case-against-snippets/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 07:09:17 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=59</guid>
		<description><![CDATA[Back when TextMate was relatively new and that famous video of ruby on rails was making the rounds. I watched in amazement with the rest of the nerds as code flew around the screen. I had caught Snippet Fever. After using TextMate for a while I became addicted to snippets. The basic idea of a [...]]]></description>
			<content:encoded><![CDATA[<p>Back when <a href="http://macromates.com/">TextMate</a> was relatively new and<a href="http://media.rubyonrails.org/video/rails_take2_with_sound.mov"> that famous video</a> of ruby on rails was making the rounds. I watched in amazement with the rest of the nerds as code flew around the screen. I had caught Snippet Fever.</p>
<p>After using TextMate for a while I became addicted to snippets. The basic idea of a snippet is that you can write a few characters and they expand to whatever you want. For example, you can type: 'fl', hit Tab and TextMate will write:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">  <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> ... <span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    ...		     
  <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Where <code>...</code> is where the insertion point will be each time you hit tab. You can do the same with Emacs in many different ways: Emacs skeletons, the snippet.el plugging, hand-coded elisp, etc. The point of this post, however, is not to show all the different ways that you can get snippets. The point is to ask whether it's worth using snippets at all.</p>
<p>Snippets eliminate the need to type recurrent idioms. If you have to write accessors, it's very pleasant to type 'set', hit tab and watch the screen fill with 20 lines of code that just wrap a field in a class with a setter function. But this is fixing the problem in the wrong place.</p>
<p>The fundamental problem is that the language <emph>is too damn verbose</emph>. </p>
<p>Imagine English had no pronouns so if I wanted to tell you a story about my friend Tim and me, I had to write:</p>
<blockquote><p>
  Tim had called Oscar to ask Oscar if Oscar could lend Tim the book that Oscar had bought the day before. Oscar told Tim that Oscar was still reading it, but that Oscar would be happy to lend Tim Oscar's book when Oscar was done with the book so that Tim could read it.
</p></blockquote>
<p>The above paragraph is too verbose. It's hard to write. Snippets would help me write it by automatically filling all the appropriate places with  "Tim" and "Oscar".</p>
<p>If the language you are using is so verbose that you need snippets, how about fixing the language?</p>
<p>Even on languages that don't allow fixing the syntax you can still do something.</p>
<p>For example, in C, if you find yourself typing a <code>for</code> loop to access a list over and over again:</p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">  <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> length<span style="color: #009900;">&#40;</span>list<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Make a small pre-processor macro that abstracts that:</p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">  <span style="color: #339933;">#define EACH(list) for (int i = 0; i &lt; length(list); i++)</span></pre></div></div>

<p>And now you can write:</p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">  EACH<span style="color: #009900;">&#40;</span>list<span style="color: #009900;">&#41;</span> <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> list<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And since code is usually read many more times than it is written, you have helped make the source base a little better.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2008/08/the-case-against-snippets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://media.rubyonrails.org/video/rails_take2_with_sound.mov" length="54364199" type="video/quicktime" />
		</item>
		<item>
		<title>Hidden Gems in C99 (1)</title>
		<link>http://oscarbonilla.com/2008/04/hidden-gems-in-c99-1/</link>
		<comments>http://oscarbonilla.com/2008/04/hidden-gems-in-c99-1/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 06:57:26 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Languages]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=63</guid>
		<description><![CDATA[After some late night reading of the C99 spec, I've found quite a few hidden gems. I'm going to start posting some of these. Since it's late, I'll just post a teaser. On page 64 of the C99 standard it says: In all aspects of the language, the six tokens %: %:%: behave,respectively,the same as [...]]]></description>
			<content:encoded><![CDATA[<p>After some late night reading of the C99 spec, I've found quite a few hidden gems. I'm going to start posting some of these. Since it's late, I'll just post a teaser.</p>
<p>On page 64 of <a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf">the C99 standard</a> it says:</p>
<blockquote><p>
In all aspects of the language, the six tokens</p>
<pre>
<: :> <% %> %: %:%:
</pre>
<p>behave,respectively,the same as the six tokens </p>
<pre>
[ ] { } # ##
</pre>
<p>except for their spelling.
</p></blockquote>
<p>Really? Then let's try this program:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">%:</span>include <span style="color: #339933;">&lt;</span>stdio .<span style="color: #202020;">h</span><span style="color: #339933;">&gt;</span>
<span style="color: #993333;">int</span>
main<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span>argv<span style="color: #339933;">&lt;::&gt;</span><span style="color: #009900;">&#41;</span>
<span style="color: #339933;">&lt;%</span>
	<span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;hello world<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">%&gt;</span></pre></div></div>

<p>Compile it an run it:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">dirac src $ gcc main.c
dirac src $ ./a.out
hello world</pre></div></div>

<p>Whaddaya know... I know, I know... useless. Wait for the next post then.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2008/04/hidden-gems-in-c99-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Haskell</title>
		<link>http://oscarbonilla.com/2008/04/haskell/</link>
		<comments>http://oscarbonilla.com/2008/04/haskell/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 00:47:53 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Languages]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=60</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href='http://blog.oscarbonilla.com/wp-content/uploads/2008/04/haskell.png' class="lightview" data-lightview-group="group-60" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="Haskell and VS.Net"><img src="http://blog.oscarbonilla.com/wp-content/uploads/2008/04/haskell.png" alt="At the intersection between Haskell Programmers and VS.NET Users" title="Haskell and VS.Net" width="499" height="483" class="alignnone size-full wp-image-61" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2008/04/haskell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lazy-loading emacs functionality</title>
		<link>http://oscarbonilla.com/2008/01/lazy-loading-emacs-functionality/</link>
		<comments>http://oscarbonilla.com/2008/01/lazy-loading-emacs-functionality/#comments</comments>
		<pubDate>Thu, 03 Jan 2008 05:05:20 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/2008/01/02/lazy-loading-emacs-functionality/</guid>
		<description><![CDATA[Quick, how big is your .emacs file? How long does it take emacs to load? A few days ago I found that my .emacs file had slowly grown to the point where it was taking emacs a significant amount of time to load. Something needed to be done. A quick glance at the file told [...]]]></description>
			<content:encoded><![CDATA[<p>Quick, how big is your <code>.emacs</code> file? How long does it take emacs to load? A few days ago I found that my <code>.emacs</code> file had slowly grown to the point where it was taking emacs a significant amount of time to load. Something needed to be done.</p>
<p>A quick glance at the file told me I was loading a lot of modules that I seldom use. For instance, I occasionally write some code in Common Lisp or Haskell, so naturally I was loading <a href="http://common-lisp.net/project/slime/">slime</a> and the <a href="http://www.haskell.org/haskell-mode/">haskell</a> environment. I commented those out.</p>
<p>However, after commenting them out, I quickly realized that not loading them was problematic. When I wanted to use them, I had to open my <code>.emacs</code> file, uncomment the relevant portion,  and <code>M-x eval-region</code> the code.</p>
<p>Then it occurred to me that I had a clear entry point for some of these modules. When I write Common Lisp, I usually start by loading SLIME's REPL by running <code>M-x slime</code>. I came up with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> slime <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span>interactive<span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span>add-to-<span style="color: #b1b100;">list</span> 'load-path <span style="color: #ff0000;">&quot;~/emacs/slime&quot;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> inferior-lisp-program <span style="color: #ff0000;">&quot;/usr/local/bin/sbcl&quot;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span>require 'slime<span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span>slime-setup<span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span>slime<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Which basically sets up my slime environment and then loads slime. Note that the <code>slime</code> function itself is redefined as part of the evaluation of <code>(require 'slime)</code>, so although this looks like a recursive call, it's not.</p>
<p>I've used this trick in several other cases and I think it's kind of neat. It helps me keep Emacs loading fast, but I still have all the bells and whistles available.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2008/01/lazy-loading-emacs-functionality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leave a door open (for Peace)</title>
		<link>http://oscarbonilla.com/2007/12/leave-a-door-open-for-peace/</link>
		<comments>http://oscarbonilla.com/2007/12/leave-a-door-open-for-peace/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 15:52:24 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=38</guid>
		<description><![CDATA[Today is John Lennon's death anniversary. He was shot to death on December 8th, 1980. I always commemorate this day by listening to John Lennon's music, smoking unfiltered Gitanes, playing guitar, and letting my hair grow long... for a day... ok, not really, but I do try to listen to Imagine, at least once. At [...]]]></description>
			<content:encoded><![CDATA[<p><img align="left" border="1" vspace="8" hspace="8" src='http://blog.oscarbonilla.com/wp-content/uploads/2007/12/340x.thumbnail.jpg' alt='John Lennon' /></p>
<p>Today is <a href="http://en.wikipedia.org/wiki/John_Lennon">John Lennon's</a> death anniversary. He was shot to death on December 8th, 1980. I always commemorate this day by listening to John Lennon's music, smoking unfiltered Gitanes, playing guitar, and letting my hair grow long... for a day... ok, not really, but I do try to listen to <a href="http://www.youtube.com/watch?v=jEOkxRLzBf0">Imagine</a>, at least once. </p>
<p>At any rate, <a href="http://www.imaginepeace.com/">there is a website</a> now to commemorate John. It has a letter from Yoko Ono and a video from John Lennon.</p>
<p>The goal of an artist is to elicit some kind of emotion from the audience through his art. You cannot see the video and feel nothing. I left it running in the background while doing other things as I've seen Lennon interviews thousands of times and can usually remember how they go, but the imagery at the end, after John stops talking, pulled my eyes and engaged me like nothing has for a long while. I literally couldn't stop watching.</p>
<p>At any rate, here's to you John Lennon. You were the Walrus.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2007/12/leave-a-door-open-for-peace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Norton Fighter</title>
		<link>http://oscarbonilla.com/2007/12/norton-fighter/</link>
		<comments>http://oscarbonilla.com/2007/12/norton-fighter/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 01:27:56 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=28</guid>
		<description><![CDATA[And on a lighter note... I found this clip hilarious. Part 1: and part 2: If I used Windows, I'd buy norton antivirus just because of this ad.]]></description>
			<content:encoded><![CDATA[<p>And on a lighter note... I found this clip hilarious. </p>
<p>Part 1:</p>
<p><a href="http://www.youtube.com/v/6XLPZSHkFjA" ><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/6XLPZSHkFjA&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/6XLPZSHkFjA&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></a></p>
<p>and part 2:</p>
<p><a href="http://www.youtube.com/v/qXWGDS3hoNM"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/qXWGDS3hoNM&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/qXWGDS3hoNM&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></a></p>
<p>If I used Windows, I'd buy norton antivirus just because of this ad.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2007/12/norton-fighter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timeo Facebook et dona ferentes</title>
		<link>http://oscarbonilla.com/2007/12/timeo-facebook-et-dona-ferentes/</link>
		<comments>http://oscarbonilla.com/2007/12/timeo-facebook-et-dona-ferentes/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 01:17:42 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=27</guid>
		<description><![CDATA[Which can be loosely translated as "I fear Facebook even if it brings gifts". My friends have noticed that for quite some time I've stopped updating my Facebook status, or even interacting with the site altogether. The reason is simple. I don't trust them. A short time ago, Facebook introduced a new feature called "Beacon" [...]]]></description>
			<content:encoded><![CDATA[<p>Which can be loosely translated as "I fear Facebook even if it brings gifts". My friends have noticed that for quite some time I've stopped updating my Facebook status, or even interacting with the site altogether. The reason is simple. I don't trust them.</p>
<p>A short time ago, Facebook introduced a new feature called "<a href="http://www.facebook.com/business/?beacon">Beacon</a>" that lets websites send status to your mini-feed. It immediately <a href="http://gigaom.com/2007/11/06/facebook-beacon-privacy-issues/">drew a lot of criticism</a> because of its invasion to privacy, to the point that many people figured out <a href="http://www.ideashower.com/blog/block-facebook-beacon/">ways to block it</a>. Facebook's CEO <a href="http://blog.facebook.com/blog.php?post=7584397130">apologized</a> for it today and made beacon opt-out.</p>
<p>Now, I was going to write a detailed article about why this bothers me and how insincere the apology sounded, but our good old friend <a href="http://fakesteve.blogspot.com">Fake Steve Jobs</a> did a much better job <a href="http://fakesteve.blogspot.com/2007/12/faceberg-were-sorry-really-okay-not.html">in this blog post</a>. Money quote:</p>
<blockquote><p>These guys are like Google, only their slogan isn't "Don't be evil" -- it's "Don't get caught."</p></blockquote>
<p>And later:</p>
<blockquote><p>The smarmy fake apology is not at all reassuring and seems to have been written by PR people who were trying to imitate a 23-year-old kid who's speaking from the heart and trying to sound all sheepish and aw-shucks -- except the flacks can't do it because they're as insincere and stage-managed as as the Facebook guys. Plus, let's face it, the flacks are getting paid in Facebook equity, right?</p></blockquote>
<p>I couldn't have said it better myself. You should go read the whole post.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2007/12/timeo-facebook-et-dona-ferentes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Apple Experience</title>
		<link>http://oscarbonilla.com/2007/10/the-apple-experience/</link>
		<comments>http://oscarbonilla.com/2007/10/the-apple-experience/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 04:20:38 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=25</guid>
		<description><![CDATA[Last week I was once again sucked into the argument of whether Apple is a hardware company or a software company. My take on it: it's neither. Apple is an "experience" company. They do hardware because it's the only way to have the software under control. They do software because without good software, the hardware [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I was once again sucked into the argument of whether Apple is a hardware company or a software company. My take on it: it's neither.</p>
<p>Apple is an "experience" company. They do hardware because it's the only way to have the software under control. They do software because without good software, the hardware is useless. What they ultimately worry about is the user experience.</p>
<p>They partnered with AT&#038;T because they needed to add the cellular network to the experience and they couldn't build their own (they would have loved to). If they look like control freaks from the outside it's because, well, they are.</p>
<p>On that note, in <a href="http://bits.blogs.nytimes.com/2007/10/01/att-welcomes-programmers-for-all-phones-except-the-iphone/">this piece</a>, Saul Hansell argues that AT&#038;T allows applications on other phones, <em>except</em> the iPhone. Saul claims that Mark Bercow, senior vice president of business development for Palm, encourages developers to do pretty much as they please with the Palm Treo:</p>
<blockquote><p> Indeed, some developers have made video streaming applications, a particularly big bandwidth hog. (Of course, the cellular companies are free to charge whatever they wish for bandwidth use.)</p></blockquote>
<p>Now go to the AT&#038;T website and try to find their data rates. I could find a $24.99 data rate that was limited to 10MB, and an unlimited plan (with some fine print about per-kilobyte charges) for $69.99. That is in addition to the cost of the plan. The iPhone unlimited data plan is $20 per month. So while developers can create apps for any other AT&#038;T phone, customers get charged <strong>per kilobyte</strong>. Now consider again what Steve Jobs said about third-party apps:</p>
<blockquote><p>You need it to work when you need it to work. Cingular doesn’t want to see their West Coast network go down because some application messed up.</p></blockquote>
<p>My take on that is that AT&#038;T doesn't want to see their network swamped with data transfers <em>without being able to charge for them</em>. However, a per-kilobyte service plan would have totally ruined the iPhone experience for the users. Apple wanted users to experience having a device that is <em>always</em> connected to the Internet. That experience is ruined if you're worrying about how much you're accessing the net because your service provider charges you per-kilobyte. </p>
<p>The reason Apple is so successful is because using their products is a pleasurable experience. That's their trick, they think about the "experience".</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2007/10/the-apple-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meet the new Blog, same as the old Blog</title>
		<link>http://oscarbonilla.com/2007/07/meet-the-new-blog-same-as-the-old-blog/</link>
		<comments>http://oscarbonilla.com/2007/07/meet-the-new-blog-same-as-the-old-blog/#comments</comments>
		<pubDate>Fri, 27 Jul 2007 07:42:11 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=22</guid>
		<description><![CDATA[As you can see, I finally bit the bullet and moved my blog to my own domain. I plan to do the same with the website (it's still being hosted at Galileo University). The website needs a lot of work. It' still so... twentieth century! The blog is now running on WordPress and I have [...]]]></description>
			<content:encoded><![CDATA[<p>As you can see, I finally bit the bullet and moved my blog to my own domain. I plan to do the same with the website (it's still being hosted at <a href="http://www.galileo.edu/">Galileo University</a>). The website needs <strong>a lot</strong> of work. It' still so... twentieth century!</p>
<p>The blog is now running on <a href="http://wordpress.com">WordPress</a> and I have to admit it was trivial to install. The admin interface is also pretty decent. </p>
<p>My one complaint is that the WYSIWYG editor that they ship seems to mangle my HTML pretty bad, to the point that I have to use <a href="http://homepage.mac.com/zenitani/emacs-e.html">Emacs</a> to fix it, so I won't use it.</p>
<p>One big improvement is that the code snippets now have syntax highlighting. Awww, look at those beautiful colors. I'll be posting more code snippets now that looking at them doesn't hurt my eyes.</p>
<p>Well, that's all for today. Don't forget to subscribe to the new <a href="http://blog.oscarbonilla.com/?feed=rss2">RSS Feed</a> and to cancel the old one. I won't be posting to blogger anymore.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2007/07/meet-the-new-blog-same-as-the-old-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Tells You How  Revision History Tells You Why</title>
		<link>http://oscarbonilla.com/2006/12/code-tells-you-how-revision-history-tells-you-why/</link>
		<comments>http://oscarbonilla.com/2006/12/code-tells-you-how-revision-history-tells-you-why/#comments</comments>
		<pubDate>Wed, 20 Dec 2006 19:02:00 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=19</guid>
		<description><![CDATA[I had a little rant on commenting style and it seems that Jeff Atwood has beat me to it. Well, here's my rant anyway. There are three different components I care about when reading code: "The How", "The Why", and "The What". "The How" is the code. The very essence of code is to tell [...]]]></description>
			<content:encoded><![CDATA[<p>I had a little rant on commenting style and it seems that Jeff Atwood has <a href="http://www.codinghorror.com/blog/archives/000749.html" title="Code Tells You How, Comments Tell You Why">beat me to it</a>. Well, here's my rant anyway.</p>
<p>There are three different components I care about when reading code: "The How", "The Why", and "The What".</p>
<p>"The How" is the code. The very essence of code is to tell the computer how to do something. It's not 'what' to do, because that is open to interpretation, you might be trying to do something (what) and telling the computer to do something else (how). I don't need comments for the how, I can read the code. An example of a bad "how" comment is:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* assign 0 to all flags */</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> length<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> things<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span>flag <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span></pre></div></div>

<p>I can see you're setting all flags to zero. Thanks for the non-information.</p>
<p>"The What". This is the interpretation of "The How". Basically, it's what that code is trying to accomplish. For instance:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* clear all flags */</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> length<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> things<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span>flags <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span></pre></div></div>

<p>At least now I know what zero means. But it still doesn't tell me a lot. As a matter of fact, it's rare when I need to know "The What". If I need comments to know "The What", the code is probably poorly written. I should be able to infer "The What" from "The How".</p>
<p>"The Why". This is what I really care about. Why is this piece of code like this? Why not some other way? What was in the programmer's mind when he wrote that piece of code? What alternatives were considered and discarded? Why were they discarded?</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* We're on a deadline and I don't understand why the flags
 * array is getting corrupted. Clearing all flags seems to
 * fix it, but there is a deeper issue here that needs
 * investigating
 */</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> length<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> things<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span>flags <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ah, much better now. I've gained some insight into the programmer's mind, so later when I'm working on the code I can make sense of this line. Basically, I can answer the question: "Why was this added?"</p>
<p>But wait, there are problems with this approach.</p>
<p>First of all, you're using up 5 lines of comments for 1 line of code. That's verbose, but not the worst of the problems.</p>
<p>What's worse is that if I'm just skimming the code because I'm trying to solve some other problem for which I don't really care about this particular line, you're going to make me stumble. I'm going to read that comment, remember that I once knew of a way in which the flags could get corrupted and spend the next 1/2 day chasing an issue that has a workaround. Your nice comments are on my face when I don't need them.</p>
<p>Even worse, this style also leads to comments needing maintenance. The code will change, and the comment won't be updated with the change. You'll get</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* We're on a deadline and I don't understand why the flags
 * array is getting corrupted. Clearing all flags seems to
 * fix it, but there is a deeper issue here that needs
 * investigating
 */</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> length<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>things<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span>flags <span style="color: #339933;">&amp;</span> FLAG_INIT<span style="color: #009900;">&#41;</span> things<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span>flags <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Whoa there buddy! You're saying that flags were getting corrupted and now you're using them? How can you trust them? Either the comment is wrong or the code is wrong.</p>
<p>What probably happened was that some programmer didn't read the comment (or read it but forgot to change it) and found a convenient place for putting his change. Now understanding this piece of code has been made harder than it should be.</p>
<p>And all of this is just looking at code statically. Code is organic, it grows, it changes, it evolves.</p>
<p>There aren't a lot of comments in the BitKeeper source base because we rely heavily on the Source Control system to answer the "Why" questions. So you'll see the above code as:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> length<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> things<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span>flags <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span></pre></div></div>

<p>No comments whatsoever. However, if you need to understand what was going on, you can get the annotated version:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">ob 1.123.21<span style="color: #339933;">:</span> <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> length<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> things<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span>flags <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span></pre></div></div>

<p>and see the comments for the ChangeSet 1.123.21:</p>

<div class="wp_syntax"><div class="code"><pre class="none" style="font-family:monospace;">ChangeSet@1.123.21, 2006-07-21 10:45:34, ob +1 -0
  Fix bug 2004-10-21: app crashes when restarting
  src/main.c@1.23, 2006-06-29 19:40:46, ob +1 -0
    We're on a deadline and I don't understand why the flags
    array is getting corrupted. Clearing all flags seems to
    fix it, but there is a deeper issue here that needs
    investigating</pre></div></div>

<p>Now the information is there, but it's not in my face unless I need it.</p>
<p>Note that when looking at code this way, the question "What changed?" is trivially answered by the diffs and therefore doesn't need to be answered by the comments. E.g. the following are really bad comments:</p>

<div class="wp_syntax"><div class="code"><pre class="none" style="font-family:monospace;">src/main.c@1.23, 2006-06-29 19:40:46, ob +1 -0
  Add code to clear the flags</pre></div></div>

<p>Well, duh! I can see that from the diffs!</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;"><span style="color: #440088;">@@ -274,6 +278,7 @@</span>
   things = getThings<span style="">&#40;</span>x, y, z<span style="">&#41;</span>;
   length = getLenght<span style="">&#40;</span>things<span style="">&#41;</span>;
<span style="color: #00b000;">+  for <span style="">&#40;</span>i = <span style="">0</span>; i &lt; length; i++<span style="">&#41;</span> things<span style="">&#91;</span>i<span style="">&#93;</span>-&gt;flags = <span style="">0</span>;</span>
   doStuff<span style="">&#40;</span>things<span style="">&#41;</span>;
   <span style="">&#125;</span></pre></div></div>

<p>I can see that you added code to clear the flags, why did you do it? That's the interesting bit.</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/BitKeeper" rel="tag">BitKeeper</a>, <a href="http://www.technorati.com/tag/Programming" rel="tag">Programming</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2006/12/code-tells-you-how-revision-history-tells-you-why/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Spotlight (part deux)</title>
		<link>http://oscarbonilla.com/2006/06/spotlight-part-deux/</link>
		<comments>http://oscarbonilla.com/2006/06/spotlight-part-deux/#comments</comments>
		<pubDate>Tue, 13 Jun 2006 17:27:00 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=18</guid>
		<description><![CDATA[After reading some comments about how Spotlight just works for other people, and talking with some friends that have Spotlight turned on, I started doubting that it was so bad. It turns out that when I got the MacBook Pro, I transfered about 40 GB of stuff from my old laptop, and apparently it also [...]]]></description>
			<content:encoded><![CDATA[<p>After reading some comments about how Spotlight just works for other people, and talking with some friends that have Spotlight turned on, I started doubting that it was so bad. It turns out that when I got the MacBook Pro, I transfered about 40 GB of stuff from my old laptop, and apparently it also transfered a corrupt Spotlight Index.</p>
<p>So after running:</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family:monospace;"># mdutil -E /</pre></div></div>

<p>and turning Spotlight back on, I'm no longer seeing the performance problems I had. All thanks to the comments. And I didn't think anybody read this blog :)</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2006/06/spotlight-part-deux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spotlight must die (or get its act straight)</title>
		<link>http://oscarbonilla.com/2006/06/spotlight-must-die-or-get-its-act-straight/</link>
		<comments>http://oscarbonilla.com/2006/06/spotlight-must-die-or-get-its-act-straight/#comments</comments>
		<pubDate>Thu, 01 Jun 2006 20:50:00 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=17</guid>
		<description><![CDATA[I just got a new MacBook Pro, and had it for about a week. What I discovered was that the machine wasn't as snappy as I thought it would be. It's a CORE DUO for Christ's sake, it has not one, but TWO cores, it has 2 GB of freaking RAM! It should be the [...]]]></description>
			<content:encoded><![CDATA[<p>I just got a new <a href="http://www.apple.com/macbookpro/">MacBook Pro</a>, and had it for about a week. What I discovered was that the machine wasn't as snappy as I thought it would be. It's a CORE DUO for Christ's sake, it has not one, but TWO cores, it has 2 GB of freaking RAM! It should be the fastest box around! But no, it's slow and every once in a while it just locks up for about 5 seconds.</p>
<p>After some fun with fs_usage trying to figure out what was going on, I found the culprit: Spotlight. See, spotlight interacts VERY VERY badly with the file system cache, and since Mac OS X has a unified cache, with the VM cache. This means that while the OS is trying really hard to keep your working set in memory, spotlight (a.k.a. <a href="http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/mdimport.1.html">mdimport</a>) is indexing stuff and therefore causing unnecessary flushes of the cache.</p>
<p>The solution? Turn it off. Just run 'mdutil -i off /' and edit /etc/hostconfig to set "SPOTLIGHT=-NO-" and be done with it. Or if you don't want to even type that, get <a href="http://www.apple.com/downloads/macosx/system_disk_utilities/spotless.html">Spotless</a> and click away. Go ahead, I'll wait.</p>
<p>The problems? Mail no longer searches, and no easy and quick way to launch applications. I installed <a href="http://quicksilver.blacktree.com/">QuickSilver</a> for the application launching part, and will figure out if I can find an alternative for searching mail. But it's worth it.</p>
<p>My machine is SUPER FAST now, and the disk is quiet all the time. Processors are mostly idle if I'm not doing anything, ah the sound of a high performance machine...</p>
<p>How badly does Google Desktop Search hinder performance under Windows?</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/macos x" rel="tag">macos x</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2006/06/spotlight-must-die-or-get-its-act-straight/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

