<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
  <title>BadPopcorn</title>
  <subtitle type="text">Solutions for anything... except popcorn.</subtitle>
  <link rel="alternate" href="http://badpopcorn.com/"/>
  <link type="application/atom+xml" rel="self" href="http://badpopcorn.com/atom.xml"/>
  <updated>2012-02-02T12:34:39-08:00</updated>
  <id>http://badpopcorn.com/</id>

  
  <entry>
    <id>http://badpopcorn.com/blog/2012/02/02/engine-yard-rrdtool-error</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2012/02/02/engine-yard-rrdtool-error/"/>
    <title>Engine Yard rrdtool Error</title>
    <updated>2012-02-02T00:00:00-08:00</updated>
    <author>
      <name>corey</name>
    </author>
    <content type="html">&lt;p&gt;If you are trying to use &lt;a href='http://oss.oetiker.ch/rrdtool/'&gt;rrdtool&lt;/a&gt; on an &lt;a href='http://engineyard.com'&gt;Engine Yard&lt;/a&gt; instance and your Ruby version is 1.8.7, you might get this error:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='irb'&gt;&lt;span class='gp'&gt;irb(main):001:0&amp;gt; &lt;/span&gt;&lt;span class='nb'&gt;require&lt;/span&gt; &lt;span class='s1'&gt;&amp;#39;RRD&amp;#39;&lt;/span&gt;
&lt;span class='go'&gt;LoadError: librrd.so.2: cannot open shared object file: No such file or directory - /usr/lib/ruby/site_ruby/1.8/i686-linux/RRD.so&lt;/span&gt;
&lt;span class='go'&gt;from /usr/lib/ruby/site_ruby/1.8/i686-linux/RRD.so&lt;/span&gt;
&lt;span class='go'&gt;from (irb):1&lt;/span&gt;
&lt;span class='go'&gt;from :0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;It&amp;#8217;s sort of confusing because it looks like RRD.so doesn&amp;#8217;t exist, but it does:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;~ &lt;span class='nv'&gt;$ &lt;/span&gt;ls /usr/lib/ruby/site_ruby/1.8/i686-linux/RRD.so
/usr/lib/ruby/site_ruby/1.8/i686-linux/RRD.so
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;What is happening is that RRD.so is linked to a missing shared library:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;/usr/lib/ruby/site_ruby/1.8/i686-linux &lt;span class='nv'&gt;$ &lt;/span&gt;ldd -v RRD.so
linux-gate.so.1 &lt;span class='o'&gt;=&lt;/span&gt;&amp;gt; &lt;span class='o'&gt;(&lt;/span&gt;0xb7f23000&lt;span class='o'&gt;)&lt;/span&gt;
libruby18.so.1.8 &lt;span class='o'&gt;=&lt;/span&gt;&amp;gt; /usr/lib/libruby18.so.1.8 &lt;span class='o'&gt;(&lt;/span&gt;0xb7e3f000&lt;span class='o'&gt;)&lt;/span&gt;
librrd.so.2 &lt;span class='o'&gt;=&lt;/span&gt;&amp;gt; not found
libdl.so.2 &lt;span class='o'&gt;=&lt;/span&gt;&amp;gt; /lib/libdl.so.2 &lt;span class='o'&gt;(&lt;/span&gt;0xb7e34000&lt;span class='o'&gt;)&lt;/span&gt;
libcrypt.so.1 &lt;span class='o'&gt;=&lt;/span&gt;&amp;gt; /lib/libcrypt.so.1 &lt;span class='o'&gt;(&lt;/span&gt;0xb7e05000&lt;span class='o'&gt;)&lt;/span&gt;
libm.so.6 &lt;span class='o'&gt;=&lt;/span&gt;&amp;gt; /lib/libm.so.6 &lt;span class='o'&gt;(&lt;/span&gt;0xb7ddf000&lt;span class='o'&gt;)&lt;/span&gt;
libc.so.6 &lt;span class='o'&gt;=&lt;/span&gt;&amp;gt; /lib/libc.so.6 &lt;span class='o'&gt;(&lt;/span&gt;0xb7cab000&lt;span class='o'&gt;)&lt;/span&gt;
librt.so.1 &lt;span class='o'&gt;=&lt;/span&gt;&amp;gt; /lib/librt.so.1 &lt;span class='o'&gt;(&lt;/span&gt;0xb7ca2000&lt;span class='o'&gt;)&lt;/span&gt;
/lib/ld-linux.so.2 &lt;span class='o'&gt;(&lt;/span&gt;0x80000000&lt;span class='o'&gt;)&lt;/span&gt;
libpthread.so.0 &lt;span class='o'&gt;=&lt;/span&gt;&amp;gt; /lib/libpthread.so.0 &lt;span class='o'&gt;(&lt;/span&gt;0xb7c8a000&lt;span class='o'&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Which brings up the question where does RRD.so come from?&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;~ &lt;span class='nv'&gt;$ &lt;/span&gt;equery belongs RRD.so
&lt;span class='o'&gt;[&lt;/span&gt; Searching &lt;span class='k'&gt;for &lt;/span&gt;file&lt;span class='o'&gt;(&lt;/span&gt;s&lt;span class='o'&gt;)&lt;/span&gt; RRD.so in *... &lt;span class='o'&gt;]&lt;/span&gt;
net-analyzer/rrdtool-1.4.5 &lt;span class='o'&gt;(&lt;/span&gt;/usr/lib/ruby/site_ruby/1.8/i686-linux/RRD.so&lt;span class='o'&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;However the package net-analyzer/rrdtool only provides librrd.so.4 not librrd.so.2:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;~ &lt;span class='nv'&gt;$ &lt;/span&gt;equery belongs librrd.so
&lt;span class='o'&gt;[&lt;/span&gt; Searching &lt;span class='k'&gt;for &lt;/span&gt;file&lt;span class='o'&gt;(&lt;/span&gt;s&lt;span class='o'&gt;)&lt;/span&gt; librrd.so in *... &lt;span class='o'&gt;]&lt;/span&gt;
net-analyzer/rrdtool-1.4.5 &lt;span class='o'&gt;(&lt;/span&gt;/usr/lib/librrd.so -&amp;gt; librrd.so.4.1.4&lt;span class='o'&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;That seems mean that Engine Yard is pre-building the packages they provide and the current rrdtool package was built incorrectly.&lt;/p&gt;

&lt;p&gt;I opened a support issue with Engine Yard about this and have been going back and forth with them about it. Finally I got this from them:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;It looks like there was an issue with compilation when we upgraded RRDTool to 1.4.5 on Ruby 1.8.7. If you need to use it, you shouldn&amp;#8217;t have a problem with 1.9.2 or 1.9.3. As of right now, we&amp;#8217;ll have to look into adding support on 1.8.7 but there&amp;#8217;s no timeframe.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A few days later that was followed up with:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;Moving forward, our developers are going to focus on more pressing issues right now than edge cases.&amp;#8221;&lt;/p&gt;

&lt;p&gt;&amp;#8220;I will make sure that we Roadmap this since we are still supporting 1.8.7 but no idea on a time frame.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So the rrdtool package they provide is broken for Ruby 1.8.7 and they probably won&amp;#8217;t fix it any time soon.&lt;/p&gt;

&lt;p&gt;The only workaround I could think of was to have a chef recipe to remove the offending RRD.so file and then install the librrd gem which will build a RRD.so file that is useable. I tested this on a staging environment and everything worked as expected.&lt;/p&gt;

&lt;p&gt;However, rather than deploying this workaround we decided to go in a different direction to capture and report the metrics we where interested in for our application.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2011/12/18/y-a-w-m</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2011/12/18/y-a-w-m/"/>
    <title>Y.A.W.M.</title>
    <updated>2011-12-18T00:00:00-08:00</updated>
    <author>
      <name>corey</name>
    </author>
    <content type="html">&lt;h1 id='yet_another_website_migration'&gt;Yet Another Website Migration&lt;/h1&gt;

&lt;p&gt;By my count this is the sixth incarnation of the BadPopcorn website. And it&amp;#8217;s sort of like Doctor Who, he&amp;#8217;s pretty much always The Doctor, but looks a little different, and that how this website is today.&lt;/p&gt;

&lt;p&gt;&lt;img src='http://upload.wikimedia.org/wikipedia/en/thumb/8/80/Versions_of_the_Doctor.jpg/251px-Versions_of_the_Doctor.jpg' alt='Doctor Whos' /&gt;&lt;/p&gt;

&lt;h2 id='the_fifth_website'&gt;The Fifth Website&lt;/h2&gt;

&lt;p&gt;The last website version had two parts to it a Wordpress blog (from the &lt;a href='/blog/2005/10/05/yay-to-laziness/'&gt;forth incarnation&lt;/a&gt;) and a Rails app. There where some big plans for the Rails app, but we got distracted with trying to get our company running and it turned out to only generate four static pages.&lt;/p&gt;

&lt;p&gt;Then our main project &lt;a href='http://beyondthewhiteboard.com/'&gt;beyond the whiteboard&lt;/a&gt; started taking off and we shifted from posting blogs here to &lt;a href='http://blog.beyondthewhiteboard.com/'&gt;there&lt;/a&gt;. The total number of posts for 2010 was only three!&lt;/p&gt;

&lt;h2 id='the_sixth_website'&gt;The Sixth Website&lt;/h2&gt;

&lt;p&gt;A while back I read about &lt;a href='http://pages.github.com/'&gt;GitHub Pages&lt;/a&gt; and it became clear that this would be a good alternative to our custom Rails app. Thus this weekend I set out to convert and transform our website yet again.&lt;/p&gt;

&lt;p&gt;We already had a &lt;a href='https://github.com/badpopcorn/'&gt;BadPopcorn&lt;/a&gt; organization on GitHub, so it wasn&amp;#8217;t too difficult to start a repo under that for the website. And as a bonus I got to learn a new tool/project named &lt;a href='http://github.com/mojombo/jekyll/'&gt;Jekyll&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;At first I thought that we would just replace the Rails app and leave the Wordpress install alone, but as I learned more about &lt;a href='http://github.com/mojombo/jekyll/'&gt;Jekyll&lt;/a&gt; it seemed easier to &lt;a href='https://github.com/mojombo/jekyll/wiki/Blog-Migrations'&gt;migrate&lt;/a&gt; the posts over as well. And that&amp;#8217;s what I did.&lt;/p&gt;

&lt;p&gt;I had to fix up a couple of things with the posts, namely some text encodings and image locations, but overall it was pretty easy conversion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With the new website going hopefully we&amp;#8217;ll have a bit more posts in 2012 than 2011!&lt;/strong&gt;&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2010/04/12/send-your-emails-using-postmark</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2010/04/12/send-your-emails-using-postmark/"/>
    <title>Send your emails using Postmark</title>
    <updated>2010-04-12T00:00:00-07:00</updated>
    <author>
      <name>corey</name>
    </author>
    <content type="html">&lt;img src=&quot;http://postmarkapp.com/images/landing/logo.png&quot; style=&quot;margin-top:10px;&quot;/&gt;
&lt;br /&gt;
&lt;a href=&quot;http://wildbit.com/&quot; target=&quot;_blank&quot;&gt;Wildbit&lt;/a&gt; recently launched a great new email delivery service named &lt;a href=&quot;http://postmarkapp.com&quot; target=&quot;_blank&quot;&gt;Postmark&lt;/a&gt;. Once I read what it was about I knew that we had to integrate in to &lt;a title=&quot;CrossFit stats logger&quot; href=&quot;http://beyondthewhiteboard.com&quot; target=&quot;_blank&quot;&gt;beyond the whiteboard&lt;/a&gt;.

&lt;h3&gt;First a little background.&lt;/h3&gt;

&lt;p&gt;Sending emails from your web application is one of those things that all the programming guides show you how to set up and get going in a few easy steps. However, they never point out the problems that you might come across while trying to send out emails.&lt;/p&gt;

&lt;p&gt;When launched the beta version of beyond the whiteboard we setup Gmail to be our smarthost for sending emails. That was pretty easy to get going and worked out pretty well, there where copies of the sent emails in that Gmail account and emails where sent out. However, there where a couple of things which I didn't really like. First off Gmail, replaces the from field with the user you are sending email through. For example, if your Gmail user is 'mycoolapp', that's what the from will be, even if you in your application set the from to be something else like 'support'. A minor little issue, but we wanted some emails to be from the application and others be from individuals which just wasn't possible. Lastly, Gmail limits the number of emails that you can send through it in a given period. This was the big killer for us, we hit limit and didn't know it right away. That cause us some headaches because there really wasn't a good way to know if we where close to the limit or what.&lt;/p&gt;

&lt;p&gt;After the few Gmail incidents I finally broke down and decided to set up an SMTP server to send out our application emails. I really didn't want to because, well email is kind of scary to me. The server configurations are very complex and they have warnings everywhere that if you make a mistake every spammer in the world will use your server. Then if that happens every ISP will hate you and little kids will point and laugh when you go to the mall. Despite all that I did manage to get a configuration going and we didn't let any evil spammers or anything bad like that. Everything appeared to be going well, or so I thought.&lt;/p&gt;

&lt;p&gt;You see, I setup our SMTP to only send out emails, the receiving part was still handled by Gmail. I hadn't keeping tabs on the Gmail inbox of the address we where sending from in some time. When I did happen to remember to look in that account, several months later, I discovered that EarthLink and AT&amp;amp;T had decided that we where spammers and blocked all emails from our server. What a drag that was, I had no clue how long that had been going on, and it wasn't a very good feeling to be labeled a spammer, even if it was from an automated system. They have methods to get you removed from list and I filled out their forms, but it happened at least one other time. That's when I decided that there had to be something better out there and that's when I found &lt;a href=&quot;http://postmarkapp.com&quot; target=&quot;_blank&quot;&gt;Postmark&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Why Postmark is good.&lt;/h3&gt;

&lt;p&gt;Right when I read the description of the Postmark service I signed up, it was an easy decision for me. Here's how it works, you post your email to Postmark through their HTTP API and then they send your email to it's destination. See super simple, but wait there's more, they have a nice overview with a graph of how many emails you've sent, how many bounced, and how many where marked as spam. You can then dig deeper and see which emails bounced, why they bounce, and there a way to reactivate those emails if you think there was a mistake.&lt;/p&gt;

&lt;p&gt;The integration was also pretty easy, they have published a Ruby gem that hooks right in to ActionMailer. After a couple lines of configuration you can just use ActionMailer just like before and instead of sending emails via SMTP, they are sent to Postmark for delivery. I also really liked the way the set it up by changing ActionMailer's delivery method. Why is that good?  Well, different ActionMailer subclasses can have different delivery methods, which is completely different from the SMTP settings which are shared across all instances. That makes it possible to have emails sent to users got through Postmark, while system emails, like error reports can go through SMTP. Which is exactly how we have it set up today.&lt;/p&gt;

&lt;p&gt;I'm really happy with the service, now I know exactly how many emails to users we are sending out each day and how many are bouncing back. Even though Postmark just launched a few weeks ago I know that the folks at Wildbit are going to continue to make it better because &lt;a href=&quot;http://wildbit.com/blog/2010/02/03/using-postmark-to-reveal-trends/&quot; target=&quot;_blank&quot;&gt;they use it&lt;/a&gt; with their other web applications. Personally I'm really looking forward to when they get some sort of webhooks going for bounced emails. I would like to inform our users that we couldn't send them an email at the address they have given us.&lt;/p&gt;

&lt;p&gt;All of that totally justifies the cost of the Postmark service, which is currently $1.50 for 1,000 emails. If you are building a web application and are sending out transactional emails to your users, I would really encourage you to investigate a service like &lt;a href=&quot;http://postmarkapp.com&quot; target=&quot;_blank&quot;&gt;Postmark&lt;/a&gt;. Why worry about emails when you should be worrying about your application's main features.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2010/04/01/user-tags-from-hulu-com-for-the-tonight-show-page</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2010/04/01/user-tags-from-hulu-com-for-the-tonight-show-page/"/>
    <title>User tags from Hulu.com for the Tonight Show Page</title>
    <updated>2010-04-01T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;You have to love tagging and user generated content.&lt;/p&gt;

&lt;div style=&quot;border:1px solid #CCCCCC;&quot;&gt;
&lt;a href=&quot;http://s3.amazonaws.com/badpopcorn.com/images/2010-04-leno_hulu.png&quot;&gt;
&lt;img src=&quot;http://s3.amazonaws.com/badpopcorn.com/images/2010-04-leno_hulu.png&quot; alt=&quot;leno_hulu&quot; title=&quot;leno_hulu&quot; width=&quot;800&quot; height=&quot;411&quot; class=&quot;alignnone size-full wp-image-1008&quot; /&gt;
&lt;/a&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2010/01/27/how-an-ad-can-ruin-design</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2010/01/27/how-an-ad-can-ruin-design/"/>
    <title>How an AD can ruin design</title>
    <updated>2010-01-27T00:00:00-08:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">Should design and good user interface be sacrificed for optimal ad viewing? Not in my opinion. CNN, compared to other big news media, has a pretty good site design. However, their new &lt;a href=&quot;http://newspulse.cnn.com/&quot;&gt;pulse page&lt;/a&gt; is ruined by horrible ad placement. In a way the design was successful, because I noticed the ad. However, I noticed it like a teenager notices a pimple on their face. I was disgusted, confused and worried it may leave a scar. I'm seeing this more and more online, and it's getting more and more annoying.  Insert &lt;a href=&quot;http://sethgodin.typepad.com/&quot;&gt;Seth Godin&lt;/a&gt; quotes here.

&lt;div style=&quot;width:400px;margin: 10px auto&quot;&gt;
&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2010-01-cnn_ad_ruined_design.png&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2010-01-cnn_ad_ruined_design.png&quot; width=&quot;150&quot; height=&quot;125&quot; style=&quot;margin-right:50px&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2010-01-cnn_ad_ruined_design_2.png&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2010-01-cnn_ad_ruined_design_2.png&quot; width=&quot;150&quot; height=&quot;125&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2009/11/08/adding-memory-to-your-mac</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2009/11/08/adding-memory-to-your-mac/"/>
    <title>Adding Memory To Your Mac</title>
    <updated>2009-11-08T00:00:00-08:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2009-11-mac_memory.jpg&quot;&gt;
&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2009-11-mac_memory.jpg&quot; alt=&quot;mac_memory&quot; title=&quot;mac_memory&quot; width=&quot;448&quot; height=&quot;336&quot; class=&quot;aligncenter size-full wp-image-993&quot; /&gt;&lt;/a&gt;

&lt;p&gt;You need a small screwdriver.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2009/10/17/affion-crockett-onlie-branding-marketing</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2009/10/17/affion-crockett-onlie-branding-marketing/"/>
    <title>Affion Crockett, Great Example of Online Branding/Marketing</title>
    <updated>2009-10-17T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;div style=&quot;margin-bottom:10px;&quot;&gt;
&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/MTw5wZXunyU&amp;hl=en&amp;fs=1&amp;&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/MTw5wZXunyU&amp;hl=en&amp;fs=1&amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/div&gt;

&lt;h1&gt;Who is Affion Crockett?&lt;/h1&gt;
&lt;p&gt;Before this video I thought he was just a funny guy on Wild'n Out. I now know he is also a musician, oskamill, and was recently in the movie Dance Flick. Affion is using the internet to show off his versatility as an entertainer. Best of all, he is slowly eliminating the middle man (studios).  He has over 47,000 subscribers on youtube (his latest video has about a million views as of now), over 7000 friends on myspace, about 7000 followers on twitter, and has 5000 friends on facebook ( i couldn't find a real fan page).  He has a, almost instant, connection to about 70,000 fans. Fans who will most likely share, retweet and email anything he puts in his feeds. &lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2009/09/24/using-yaml-to-stream-lots-of-data</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2009/09/24/using-yaml-to-stream-lots-of-data/"/>
    <title>Using Yaml to stream lots of data</title>
    <updated>2009-09-24T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">Most people just use &lt;a href=&quot;http://www.yaml.org/&quot;&gt;Yaml&lt;/a&gt; for configuration. The prime example is the database.yml file found in almost every single &lt;a href=&quot;http://www.rubyonrails.org/&quot;&gt;Rails&lt;/a&gt; app. But here's a way to take advantage of Yaml in Ruby as a way to serialize and transfer lots of  separate records from one place to another.

The standard yaml library found in &lt;a href=&quot;http://www.ruby-lang.org/&quot;&gt;Ruby&lt;/a&gt; is all you need. First, to serialize the target set of records. For our example, we're just going to stream to a file, but one can use any IO stream. And instead of streaming an indeterminate number of records, we're going to bound this process with a fixed number of records.

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;yaml&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;test.yml&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;w&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;hash&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;id&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;field1&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;somedata&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;field2&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;someother data&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;option&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;write&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;hash&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_yaml&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;close&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


Notice that all we needed to do is call the #to_yaml method to do the serialization. It also handles adds the Yaml document start character sequence automatically (i.e. &quot;---&quot;, three dashes alone on a new line).

To read that stream of data:

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;test.yml&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;r&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;io&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;YAML&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each_document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;io&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;record&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;# Do something here&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;record&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;inspect&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


Question: What's the advantage here?

Answer: Constant memory footprint. We only read in as much as we need to handle the next Yaml document (object, hash). So if you're processing a 2 Gig file, the process won't try to load the entire file into memory at once. Or you may not actually know how many records will come over the wire.

Some Uses:
&lt;ul&gt;
	&lt;li&gt;Mass dumping data from one system to another where the source system lacks write permissions, or even network access, to the target system. &lt;/li&gt;
	&lt;li&gt;Data Archival in a common format. Yaml is accessible by tools without the need for a SQL database... if one archived everything in SQL dumps. And this lets you keep rows clustered in manageable sized files.&lt;/li&gt;
	&lt;li&gt;Stream real-time updates from one system to another. Either HTTP post a batch document stream to a Webhook, or just read and write on raw TCP sockets.&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2009/05/21/can-facebook-predict-if-your-girlfriend-will-break-up-with-you</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2009/05/21/can-facebook-predict-if-your-girlfriend-will-break-up-with-you/"/>
    <title>Can facebook predict if your girlfriend will break up with you?</title>
    <updated>2009-05-21T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;div&gt;
&lt;img src=&quot;http://lh4.ggpht.com/_5rqlD4jJZnY/ShVcTwEvX2I/AAAAAAAACmE/jPI_PSbU0rU/facebook_social_predict.png&quot; style=&quot;float:right;&quot;/&gt;
&lt;/div&gt;
&lt;p&gt;The Wall Street journal has an &lt;a href=&quot;http://online.wsj.com/article/SB124269038041932531.html&quot;&gt;interesting article&lt;/a&gt; on yet another innovative algorithm Google is working on. Venture beat summed up the article well; &quot;In the wake of recent brain drain, the search giant has devised an algorithm that combines employee reviews, promotion histories, pay and other factors to predict which employees are most likely to leave.&quot; Right after I read this article I found myself on the facebook &quot;Suggestions&quot; page, or as I like to call it, &quot;The People I Don't Know&quot; page. I came up with ideas and decided to post my notes.&lt;/p&gt;

&lt;ul&gt;
&lt;strong&gt;Location&lt;/strong&gt;
&lt;li&gt;Where you should live. Based on the amount of people you interact with the most and their current locations.&lt;/li&gt;
&lt;li&gt;Places you should avoid. Do the exact opposite of the logic above.&lt;/li&gt;
&lt;li style=&quot;padding-top:5px;list-style-type:none;&quot;&gt;&lt;strong&gt;Music, Television, Hobbies etc&lt;/strong&gt; 
&lt;/li&gt;&lt;li&gt;Display the top among your friends, and sort by the friends you interact with the most.&lt;/li&gt;
&lt;li style=&quot;padding-top:5px;list-style-type:none;&quot;&gt;&lt;strong&gt;Friendships&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Facebook needs to clarify why you should be friends with the people they suggest. Breaking the list into categories of; people who share the same type of information as you do, people who join and discuss the same type of topics you do, People who attend the same type of events as you do, and people that have things in common (profile details) as you do.&lt;/li&gt;   
&lt;li style=&quot;padding-top:5px;list-style-type:none;&quot;&gt;&lt;strong&gt;Relationships (for fun)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Your girlfriend/boyfriend will most likely break-up-with/cheat on you with &quot;insert name here&quot; in the next three to four weeks.&lt;/li&gt;
&lt;li&gt;A &quot;you could probably hit it&quot; section.&lt;/li&gt;
&lt;li&gt;A he's just not that into you list.&lt;/li&gt;
&lt;li&gt;
  The variables I would use to figure out the feelings/attitude person A has towards person B.
&lt;ul style=&quot;margin-top:0px;&quot;&gt;
&lt;li&gt;1. The difference between the the average number of wall posts(per friend) person A has posted, and the number of wall posts person A has posted on person B's wall.&lt;/li&gt;
&lt;li&gt;2. The difference between the the average time it takes person A to respond to a wall post and the average time it takes person A to post on person B's wall.&lt;/li&gt;
&lt;li&gt;3. The average time person A spends on person B's profile compared to person A's average among their friends.&lt;/li&gt;
&lt;li&gt;4. Use 1 and 2 but for messages instead of wall posts.&lt;/li&gt;
&lt;li&gt;5. Use 1 and 2 but for photos tagged.&lt;/li&gt;
&lt;li&gt;6. Use 1 and 2 but compare the results, if possible, to person's A last's relationship during the time the relationship was active.&lt;/li&gt;
&lt;li&gt;7. Compare wall posts, messages, other activity of current couples, prerelationship, with the current posts, messages and other activity of person A and B.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2009/04/17/mysql-gem-for-ruby-enterprise-edition-on-mac-osx</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2009/04/17/mysql-gem-for-ruby-enterprise-edition-on-mac-osx/"/>
    <title>Mysql Gem for Ruby Enterprise Edition on Mac OSX</title>
    <updated>2009-04-17T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">I just recently installed &lt;a href=&quot;http://www.rubyenterpriseedition.com/&quot;&gt;Ruby Enterprise Edition&lt;/a&gt; on my Mac, but found the following errors:

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;ERROR: Error installing mysql:
ERROR: Failed to build gem native extension
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The reason was that the Mysql files are installed under version specific directories and files when installing from Macports. For example, &lt;code&gt;mysql5&lt;/code&gt; or &lt;code&gt;/opt/local/lib/mysql5&lt;/code&gt;. This messes up the mysql gem installation because it looks elsewhere by default. The solution is to specify the exact mysql config location in the installation process:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;bash-3.2# /opt/ruby-enterprise-1.8.6-20090201/bin/ruby &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  /opt/ruby-enterprise-1.8.6-20090201/bin/gem install mysql &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  --  --with-mysql-config&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/opt/local/bin/mysql_config5
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;That last line is two dashes (-) followed by the &lt;code&gt;--with-mysql-config&lt;/code&gt; option.&lt;/p&gt;

&lt;p&gt;Easy as pie.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2009/04/10/google-voice-first-impression</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2009/04/10/google-voice-first-impression/"/>
    <title>Google Voice, First Impression</title>
    <updated>2009-04-10T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;a href='http://badpopcorn.com.s3.amazonaws.com/images/2009-04-google_voice1.png'&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2009-04-google_voice1.png&quot; alt=&quot;&quot; title=&quot;google_voice&quot; width=&quot;300&quot; height=&quot;102&quot; class=&quot;aligncenter size-medium wp-image-957&quot; /&gt;&lt;/a&gt;

&lt;p&gt;Our Grand Central account magically turned into our Google Voice account the other day, and I couldn't be more pleased. Google took the robust look of Grand Central and made it look as simple as Gmail. I can easily browse call history, send a &lt;a href=&quot;http://www.google.com/support/voice/bin/answer.py?hl=en&amp;answer=117108&quot;&gt;sms&lt;/a&gt; or update our voicemail. I'm really excited to see how well the voicemail transcript will work also, and if it will be offered with &lt;a href=&quot;http://www.google.com/support/voice/bin/answer.py?hl=en&amp;answer=115037&quot;&gt;recorded calls&lt;/a&gt;. The most popular feature might just end up being the &lt;a href=&quot;http://www.google.com/support/voice/bin/answer.py?hl=en&amp;answer=115128&quot;&gt;call widget&lt;/a&gt;; &lt;em&gt;&quot;You can allow others to call you from your website or blog by adding a call widget to it. Visitors to the website can click the widget, enter their phone number, and Google Voice will call them and connect the call to your Google number.&quot; &lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can also call out of the country with competitive VOIP rates. Wait a minute...Google might generate a large revenue source other then ads!?&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/11/02/how-to-quickstart-merb-slice-development</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/11/02/how-to-quickstart-merb-slice-development/"/>
    <title>How to Quickstart Merb Slice Development</title>
    <updated>2008-11-02T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;What are Merb Slices?&lt;/p&gt;

&lt;p&gt;Merb Slices are a kind of mini Merb Application that can be packaged up as gems and used as is (or with customizations) within actual Merb Applications. They are full Model-View-Controller stacks to support a large feature within a larger application. Examples could be a full blogging system, user management system or a file upload system.&lt;/p&gt;

&lt;p&gt;Where else can I find good overview information about Merb Slices?&lt;/p&gt;

&lt;p&gt;There are a few places, but you should start with the &lt;a href=&quot;http://merbcamp.com/video/neighman1.mp4&quot;&gt;MerbCamp 2008 MerbSlices talk&lt;/a&gt; by Daniel Neighman aka &lt;a href=&quot;http://github.com/hassox&quot;&gt;hassox&lt;/a&gt;. His slides are found &lt;a href=&quot;http://github.com/hassox/merb-camp-talks/tree/master&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://www.slideshare.net/hassox/merb-slices-presentation&quot;&gt;here&lt;/a&gt;. Watch the other &lt;a href=&quot;http://merbcamp.com/video&quot;&gt;MerbCamp videos&lt;/a&gt; for more Merb info.&lt;/p&gt;

&lt;p&gt;So what does this article cover?&lt;/p&gt;

&lt;p&gt;This just provides some missing details for a developer to immediately get a slice working. The above material gives a great overview of slices in general and the why/how to use/install them in main Merb applications.&lt;/p&gt;

&lt;p&gt;Let's start by creating our slice.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;merb-gen slice myslice
Generating with slice generator:
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/controllers/application.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/controllers/main.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/helpers/application_helper.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/views/layout/myslice.html.erb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/views/main/index.html.erb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  config/init.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  config/router.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  lib/myslice.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  Rakefile
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  README
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  spec/myslice_spec.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  spec/controllers/main_spec.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  spec/spec_helper.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  stubs/app/controllers/application.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  stubs/app/controllers/main.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  TODO
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  public/javascripts/master.js
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  public/stylesheets/master.css
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  LICENSE
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  lib/myslice/merbtasks.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  lib/myslice/slicetasks.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  lib/myslice/spectasks.rb
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;myslice
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Our goal here is to set up our slice so we can actually do development without needing to install it within a Merb application, and to give an example run through of creating a resource.&lt;/p&gt;

&lt;p&gt;Let's start by editing the slice's &lt;code&gt;init.rb&lt;/code&gt; file. This file is solely used in your slice development cycle; it is omitted from the final packaged gem; it is NOT used in production. If you look at the slice's &lt;code&gt;Rakefile&lt;/code&gt;, you will see that NO file in the &lt;code&gt;config/&lt;/code&gt; directory is included in the gem.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;vi config/init.rb
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Add the following to the top of the slice&amp;#39;s config/init.rb file.&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# USE THE CORRECT GEM VERSIONS.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;merb_gems_version&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;0.9.12&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;dm_gems_version&lt;/span&gt;   &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;0.9.6&amp;quot;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Uncomment the following two lines to develop with haml instead of erb.&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# dependency &amp;quot;merb-haml&amp;quot;, merb_gems_version&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# use_template_engine :haml&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;dependency&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;dm-core&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dm_gems_version&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;dependency&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;dm-aggregates&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dm_gems_version&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;dependency&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;dm-migrations&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dm_gems_version&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;dependency&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;dm-timestamps&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dm_gems_version&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;dependency&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;dm-types&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dm_gems_version&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;dependency&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;dm-validations&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dm_gems_version&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;use_orm&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:datamapper&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;What we did above is to declare a dependency on the DataMapper ORM. You can use whatever ORM you wish, but I'll be using DataMapper as the example in this article.&lt;/p&gt;

&lt;p&gt;Also, I have included commented lines to show how one would use Haml instead of Erb as the templating engine. I highly suggest that developers write views for BOTH Erb and Haml when developing slices. This gives the users of such slices a choice.&lt;/p&gt;

&lt;p&gt;Since we're editing files in the &lt;code&gt;config/&lt;/code&gt; directory, we'll go ahead and create the &lt;code&gt;database.yml&lt;/code&gt; file we'll need.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;vi config/database.yml
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# This is a sample database file for the DataMapper ORM&lt;/span&gt;
&lt;span class=&quot;l-Scalar-Plain&quot;&gt;development&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;&amp;amp;defaults&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# These are the settings for repository :default&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;adapter&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;sqlite3&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;sample_development.db&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Next, we go ahead and try creating a resource as most developers will be doing. It's just the same &lt;kbd&gt;merb-gen&lt;/kbd&gt; command as one would do for any regular Merb application.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;merb-gen resource article
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  spec/models/article_spec.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/models/article.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  spec/requests/articles_spec.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/controllers/articles.rb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/views/articles/index.html.erb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/views/articles/show.html.erb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/views/articles/edit.html.erb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/views/articles/new.html.erb
     &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ADDED&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  app/helpers/articles_helper.rb
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;When we edit the articles controller, we'll see that it looks exactly like a generated resource that one would get in a Merb application. In fact that's probably the whole point since we want our slices to be full MVC stacks to implement our subsystem features. But if we tried to use this resource right now, we'll find that our slice just won't work. The main reason is how we define a slice's controller versus a controller in a full Merb application. The whole issue is about namespacing.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;vi app/controllers/articles.rb
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;We need to change the following class declaration:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Articles&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Application&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;to&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Myslice&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Articles&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Myslice&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Application&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This article class needs to inherit from the slice's application class instead of whatever Merb app it is installed in. And the Articles class needs to be in the Myslice namespace so the slice router rules will actually be able to find the class.&lt;/p&gt;

&lt;p&gt;The rest of the controller looks good. It's got all the default DataMapper access code for its methods. &lt;b&gt;NOTE&lt;/b&gt;: If one did not call &lt;code&gt;use_orm :datamapper&lt;/code&gt; in the slice's &lt;code&gt;init.rb&lt;/code&gt; file, then all this ORM access code will be omitted; one would have a plain class whose methods just called `render`.&lt;/p&gt;

&lt;p&gt;As a next step, one would generally verify that merb-gen would have updated the &lt;code&gt;config/router.rb&lt;/code&gt; file with this new resource. &lt;b&gt;WARNING!&lt;/b&gt; The &lt;code&gt;config/router.rb&lt;/code&gt; file is NOT where routes are configured for slices. Everything is done in &lt;code&gt;lib/myslice.rb&lt;/code&gt;, or whatever it is named in your real slice. In fact, this is also where we'll find other configuration options.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;vi lib/myslice.rb
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Let's go ahead and update our slice meta data. Replace the following code with your own stuff.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;  &lt;span class=&quot;c1&quot;&gt;# All Slice code is expected to be namespaced inside a module&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;module&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Myslice&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;# Slice metadata&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;description&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Myslice is a chunky Merb slice!&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;version&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;0.0.1&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;author&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Engine Yard&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;I won't cover the other slice hooks in this file except for the &lt;code&gt;def self.setup_router(scope)&lt;/code&gt; method. This is where you SHOULD to add your resource. Although the &lt;code&gt;scope.default_routes&lt;/code&gt; line will correctly route to your resource, I find it cleaner to explicitly declare the slice's routes. Watch the video mentioned above to understand why we setup routes in this hook instead of a slice's &lt;code&gt;router.rb&lt;/code&gt; file.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setup_router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scope&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;# Add the following resource line&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;scope&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resources&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:articles&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;# The lines that follow are the pre-generated ones.&lt;/span&gt;

      &lt;span class=&quot;n&quot;&gt;scope&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;/index(.:format)&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;main&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;index&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;# the slice is mounted at /myslice - note that it comes before default_routes&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;scope&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;/&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;main&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;index&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:home&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;# enable slice-level default routes by default&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;scope&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;default_routes&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;I personally would delete the &lt;code&gt;scope.default_routes&lt;/code&gt; line because I'm all about explicitly specifying routes.&lt;/p&gt;

&lt;p&gt;At this point, we've got routes and a fixed up controller.&lt;/p&gt;

&lt;p&gt;Now we look at the Article model. This model contains the code required to define it as a DataMapper resource.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;cat app/models/article.rb
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Article&lt;/span&gt;
  &lt;span class=&quot;kp&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;DataMapper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Resource&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;property&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Serial&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Again, as with controllers, the DataMapper code would have been omitted without the &lt;code&gt;use_orm :datamapper&lt;/code&gt; in the slice's &lt;code&gt;config/init.rb&lt;/code&gt; file. We would have had an empty class.&lt;/p&gt;

&lt;p&gt;I will skip over how we develop Models for Datamapper in Merb. One should watch the other &lt;a href=&quot;http://merbcamp.com/video&quot;&gt;MerbCamp videos&lt;/a&gt; for that. Let's just assume that you've added a few other properties to the Article model class.&lt;/p&gt;

&lt;p&gt;Let's create the model's sqlite3 tables.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rake db:automigrate
Don&lt;span class=&quot;s1&quot;&gt;&amp;#39;t know how to build task &amp;#39;&lt;/span&gt;db:automigrate&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Oops. We don't have that kind of default support in our slice's rake tasks. But no fear, we'll just invoke the auto_migrate! directly:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;DataMapper.auto_migrate!&amp;#39;&lt;/span&gt; | slice -i
Loading init file from /Users/notroot/projects/myslice/config/init.rb
 ~ Connecting to database...
 ~ Loaded slice &lt;span class=&quot;s1&quot;&gt;&amp;#39;Myslice&amp;#39;&lt;/span&gt; ...
 ~ Parent pid: 9145
 ~ Activating slice &lt;span class=&quot;s1&quot;&gt;&amp;#39;Myslice&amp;#39;&lt;/span&gt; ...
DataMapper.auto_migrate!
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Merb::DataMapperSessionStore, Article&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Be sure to use single quotes since the '!' character is special in bash. But if you want to do it interactively, just start up the slice irb console.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;slice -i
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The only other thing to note is how slice sql tables are named. Our &quot;articles&quot; table in the slice's development database becomes &quot;myslice_articles&quot; in a Merb application's database.&lt;/p&gt;

&lt;p&gt;And to finally get it all together, we need to start mogrel to serve up the slice... but NOT using the &lt;code&gt;merb&lt;/code&gt; command. We use the &lt;kbd&gt;slice&lt;/kbd&gt; binary.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;slice
Loading init file from /Users/notroot/projects/myslice/config/init.rb
 ~ Connecting to database...
 ~ Loaded slice &lt;span class=&quot;s1&quot;&gt;&amp;#39;Myslice&amp;#39;&lt;/span&gt; ...
 ~ Parent pid: 9147
 ~ Activating slice &lt;span class=&quot;s1&quot;&gt;&amp;#39;Myslice&amp;#39;&lt;/span&gt; ...
merb : worker &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;port 4000&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; ~ Starting Mongrel at port 4000
merb : worker &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;port 4000&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; ~ Successfully bound to port 4000
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;And off to the browser you go; and off to developing your slice.
Example) &lt;code&gt;http://localhost:4000/articles&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So what's next once I finish developing my slice?&lt;/p&gt;

&lt;p&gt;Install your slice directly into your gem repository.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;sudo rake install
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Add your slice to the application's list of dependencies.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/projects/myapp
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;vi config/dependencies.rb
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Add your slice dependency to the bottom of the file.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;dependency&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;myslice&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;0.0.1&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Install the Slice into your Merb Application.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rake -T slices
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rake slices:myslice:install
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;And go ahead and add your slice to your application's &lt;code&gt;router.rb&lt;/code&gt; file.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;vi config/router.rb
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Find the following method call and add your slice.&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;Merb&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;prepare&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# This mounts your slice to the default http://example.com/myslice/&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# &amp;quot;namespace&amp;quot;. See Merb&amp;#39;s rubydocs for more info about options.&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;slice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:myslice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;# other stuff omitted.&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Now, you can run &lt;kbd&gt;merb&lt;/kbd&gt; to start up mongrel for your application and
hit away under the &lt;code&gt;/myslice&lt;/code&gt; url path namespace.&lt;/p&gt;

&lt;p&gt;Example) &lt;code&gt;http://localhost:4000/myslice/articles&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Go forth and slice!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/09/19/installing-mysql-with-macports-for-rails-on-leopard</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/09/19/installing-mysql-with-macports-for-rails-on-leopard/"/>
    <title>Installing Mysql with MacPorts for Rails on Leopard</title>
    <updated>2008-09-19T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;I just spent a hour going through this so you won't have to. I thought I installed mysql using mac ports but I kept getting this error.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Errno::ENOENT &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;No such file or directory - /tmp/mysql.sock&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;:
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

 
&lt;p&gt;Below are the three steps you need to get Mysql running on Leopard for MacPorts.&lt;/p&gt; 

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sudo port install mysql5 +server
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/09/16/authentication-and-authorization-in-rails</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/09/16/authentication-and-authorization-in-rails/"/>
    <title>Authentication and Authorization in Rails</title>
    <updated>2008-09-16T00:00:00-07:00</updated>
    <author>
      <name>bill</name>
    </author>
    <content type="html">&lt;p&gt;Some say &lt;a href=&quot;http://www.rubyonrails.com&quot;&gt;Rails&lt;/a&gt; is &quot;missing&quot; a lot of things you might expect to find in full-featured web development framework, but it doesn't matter - what's it's NOT missing is a plugin system which allows you to add any functionality you need by pulling a few bits of code from other authors into your site. What I'll be using in this example are the &lt;a href=&quot;http://github.com/technoweenie/restful-authentication/tree/master&quot;&gt;restful-authentication&lt;/a&gt; plugin for authentication and the &lt;a href=&quot;http://github.com/timcharper/role_requirement/tree/master&quot;&gt;role_requirement&lt;/a&gt; plugin for authorization. Both of these are hosted on &lt;a href=&quot;http://github.com/&quot;&gt;github&lt;/a&gt;, which hosts loads of Rails plugins along with other open projects. As the name implies, they use git for their repositories, so you should install git to grab these plugins.&lt;/p&gt;

&lt;p&gt;&lt;h1&gt;Setting up authentication&lt;/h1&gt;&lt;/p&gt;

&lt;p&gt;First, you'll need to set up authentication. In the vendor/plugins folder of your project, run:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;git clone git://github.com/technoweenie/restful-authentication.git restful_authentication
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This will grab a copy of the restful_authentication plugin; you don't need to mess with any of the code in the plugin itself. go back to your project's root and run:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;script/generate authenticated user sessions
rake db:migrate
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This will set up the user model for you and insert the users table in your database. You can add arguments to the generate script such as --include-activation --aasm to enable activation emails but we're not going to cover all of that right now.&lt;/p&gt;

&lt;p&gt;Now, you'll have two new controllers in your application, sessions_controller.rb and users_controller.rb. Go to each of these files and remove or comment out the line that says 'include AuthenticatedSystem', and copy this line to the top of the application controller instead, right at the beginning of the class definition:

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ApplicationController&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ActionController&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt;
  &lt;span class=&quot;kp&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;AuthenticatedSystem&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;and so on. The generate script should have also added these lines to routes.rb:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;  &lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logout&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;/logout&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;sessions&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;destroy&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;login&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;/login&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;sessions&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;new&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;register&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;/register&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;users&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;create&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;signup&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;/signup&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;users&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;new&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resources&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:users&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resource&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:session&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;These give you some prettier URLs rather than, for example, /users/new to sign up and /sessions/new to login. Generally you want the first thing a user sees to be the login page, so if you want to you can make that the default by adding&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;root&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;sessions&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;new&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;to your routes. You'll also need to remove or rename index.html in the public folder. &lt;/p&gt;

&lt;p&gt;At this point you have a basic authentication system, which is great considering how easy it is to set up, but alone it's pretty useless. You'll notice, no matter if you're logged in or not, you still have full access to your app. So why did we even bother? Because now, you can add authorization to lock down actions based on roles you set up.&lt;/p&gt;

&lt;p&gt;&lt;h1&gt;Setting up authorization&lt;/h1&gt;&lt;/p&gt;

&lt;p&gt;There are a few different ways to do this; if you want a very, &lt;b&gt;very&lt;/b&gt; granular authorization system you can install &lt;a href=&quot;http://github.com/bilson/padlock_authorization/tree/master&quot;&gt;padlock authorization&lt;/a&gt; which allows you to set roles per each object in your application. We decided this was probably overkill for our latest project, but I may touch on it in a later blog if we decide to use it after all. We'll be using the aforementioned role_requirement plugin.&lt;/p&gt;

&lt;p&gt;Back to github with us! Head back to your &lt;code&gt;vendor/plugins&lt;/code&gt; folder and run:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;git clone git://github.com/timcharper/role_requirement.git role_requirement
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Go back up to your application's root, and run:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;script/generate roles Role User
rake db:migrate
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Now, you'll have to make some manual database changes. You need to add one or more roles to the roles table, and if you have any users, assign them initial roles, if you want them to have roles, in the roles_users table. You can, of course, just add a new controller and view to make all this changeable from your application, but you'll probably still be setting up one admin user by hand to start things off when you go live.&lt;/p&gt;

&lt;p&gt;Now you can go about editing your controllers to make each one accept and reject your roles. For example, say I have a simple model with with a TV show, which can have one starting date. To allow only administrators to make changes, you can set up your Shows controllers like so:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ShowsController&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ApplicationController&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;require_role&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;ADMIN&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:for_all_except&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:show&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;index&lt;/span&gt;
    &lt;span class=&quot;vi&quot;&gt;@shows&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Show&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;(The rest is standard Rails boilerplate)&lt;/p&gt;

&lt;p&gt;A later post will probably deal with setting/changing roles within your application.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/09/11/rails-observer-field</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/09/11/rails-observer-field/"/>
    <title>Rails Observer Field</title>
    <updated>2008-09-11T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;The &lt;a href =&quot;http://rubyonrails.org&quot;&gt;Rails&lt;/a&gt; observer field is an easy way to add an ajax select menu to your site. Below is an example to get you going.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's say you have a list of users on your site and want to filter them by a group. In the example we will be using gym members.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;View&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;erb&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gym&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:gym_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Gym&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;collect&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:selected&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:gym&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;observe_field&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gym_gym_id&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:members_by_gym&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
                                          &lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:members&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
                                          &lt;span class=&quot;ss&quot;&gt;:update&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;member_list&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
                                          &lt;span class=&quot;ss&quot;&gt;:with&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;#39;gym=&amp;#39;+ escape($(&amp;#39;gym_gym_id&amp;#39;).value)&amp;quot;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;x&quot;&gt;&amp;lt;div id=&amp;quot;member_list&amp;quot;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;member&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@members&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;x&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;link_to&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;member&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;member&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&amp;lt;br/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;x&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The first thing we do is build the select form by using the &lt;a href=&quot;/blog/2008/09/02/rails-select-helper/&quot;&gt;Rails Select Helper.&lt;/a&gt; The id of the select tag is generated by rails, &quot;gym_gym_id&quot;. We need to pass the id name as the first parameter to the observe field. The url parameter is pretty straightforward. The update parameter of the observer field designates which element will be updated. The &quot;:with&quot; parameter adds a parameter to the form named &quot;gym&quot;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Post&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Parameters: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;contoller&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;members&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;action&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;members_by_gym&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;gym&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;controller&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;members&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;gym&lt;/code&gt; parameter posted here is from the observer_field tag.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Controller&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;members_by_gym&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@members&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Member&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find_all_by_gym_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:gym&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:layout&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;It's important that you add the render &lt;code&gt;:layout =&gt; false&lt;/code&gt; or bad things will happen. We still have one more thing to do. We have our controller being hit via ajax when the select menu changes but we need to make the html that will be updated on the page. In the view/members folder we need to make a new page called &lt;code&gt;members_by_gym.html.erb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;members_by_gym.html.erb&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;erb&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;member&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@members&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;link_to&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;member&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;member&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&amp;lt;br/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;&amp;lt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This code will be interpreted and update the &lt;code&gt;member_list&lt;/code&gt; element on the page. That's it. Rails Ajax magic.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/09/08/rails-google-charts-gchartrb</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/09/08/rails-google-charts-gchartrb/"/>
    <title>Google Charts in Rails, gchartrb</title>
    <updated>2008-09-08T00:00:00-07:00</updated>
    <author>
      <name>brian</name>
    </author>
    <content type="html">&lt;p&gt;This week I was playing around with &lt;a href=&quot;http://code.google.com/apis/chart/&quot;&gt;Google Charts&lt;/a&gt;, a wonderful API for creating charts via a URL. While I developed a helper class to create charts more easily in Rails, I did a little research and realized the RubyGem &lt;a href=&quot;http://code.google.com/p/gchartrb/&quot;&gt;gchartrb&lt;/a&gt; has a great API for creating these charts. Here's a quick tutorial on using gchartrb from the ground up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installing gchartrb&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To install gchartrb, simply use the command &lt;code&gt;gem install gchartrb&lt;/code&gt; from your command prompt. Check out these &lt;a href=&quot;http://code.google.com/p/gchartrb/&quot;&gt;instructions&lt;/a&gt; for additional help and to access the gchartrb packages (Downloadable &lt;a href=&quot;http://code.google.com/p/gchartrb/downloads/list&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick Examples&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that we have our gem installed, we can create graphs right away. First, remember to require the gem at the top of your code. Notice how the gchartrb gem is actually called &quot;google_chart&quot;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;rubygems&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;google_chart&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;There are a couple ways that you can create a chart. You can instantiate the graph and then add attributes to it:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;GoogleChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;LineChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;400x200&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;My Results&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Alternatively, you can create the graph and add the attributes within a block:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;GoogleChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;LineChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;400x200&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;My Results&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# Put lc data here&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# ...&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_url&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;I personally prefer the latter method, as the creation of the graph and its attributes are kept together in a modular fashion.&lt;/p&gt;

&lt;p&gt;Here are some examples of line, bar, and pie charts:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line Chart&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;GoogleChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;LineChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;400x200&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;My Results&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Line green&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;00ff00&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Line red&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;ff0000&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;axis&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:range&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:font_size&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:alignment&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:center&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show_legend&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;shape_marker&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:circle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:color&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;0000ff&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:data_set_index&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:data_point_index&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:pixel_size&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_url&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;img src=&quot;http://chart.apis.google.com/chart?chxt=y&amp;cht=lc&amp;chd=s:UhG9AN,NbAo9U&amp;chs=400x200&amp;chxr=0,0,10&amp;chco=00ff00,ff0000&amp;chtt=My+Results&amp;chxs=0,10,0&amp;chm=o,0000ff,0,-1,10&quot; /&gt;

&lt;p&gt;Notice that each lc.data call will create a new data line for you. The second parameter accepts a integer or float array, which can be anything you like. Lets say you have a &lt;code&gt;WeighIn&lt;/code&gt; model that has &lt;code&gt;weight&lt;/code&gt; as an attribute and belongs to some &lt;code&gt;Person&lt;/code&gt;. If a person weighs himself/herself once a month for a year, then we can collect that data and show your trend via a line graph. Collecting that data and using it would look like this:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# In the controller Person&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;show&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@person&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Person&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;weigh_ins&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@person&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;weigh_ins&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;collect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:weight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;GoogleChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;LineChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;x200&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;My Results&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Weigh ins&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weigh_ins&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;green&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;# etc, etc...&lt;/span&gt;

  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_url&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# Or @line_graph = lc.to_url&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Another useful function, &lt;code&gt;lc.axis&lt;/code&gt;, can be used to specify your own data range labels, but it is not required to create a chart (default ranges and labels will be used). The last function, &lt;code&gt;lc.to_url&lt;/code&gt;, takes the information specified for the line chart and puts it into the Google charts url.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bar Chart&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;bar_1_data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;350&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;110&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;700&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;bar_2_data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;800&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;color_1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;c53711&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;color_2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;0000ff&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;names_array&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Bob&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Stella&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Foo&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;GoogleChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;BarChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;600x300&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Horizontal Bar Graph&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:horizontal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;bc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;FirstResultBar&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;bar_1_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color_1&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;bc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;SecondResultBar&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;bar_2_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color_2&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;bc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;axis&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:labels&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;names_array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:font_size&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;bc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;axis&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:range&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;bc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show_legend&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;bc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stacked&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;bc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data_encoding&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:extended&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;bc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;shape_marker&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:circle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:color&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;00ff00&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:data_set_index&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:data_point_index&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:pixel_size&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;bc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_url&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;img src = &quot;http://chart.apis.google.com/chart?chxt=y,x&amp;chxl=0:|Bob|Stella|Foo&amp;cht=bhg&amp;chd=e:b.Iz3.,P...D.&amp;chs=450x220&amp;chxr=1,0,1000&amp;chco=c53711,0000ff&amp;chtt=Horizontal+Bar+Graph&amp;chxs=0,10&amp;chm=o,00ff00,0,-1,10&quot;/&gt;

&lt;p&gt;An interesting attribute to pay attention to is &lt;code&gt;bc.stacked&lt;/code&gt;, which gives you the ability to stack bar data, or to create separate bars together. When &lt;code&gt;bc.stacked = false&lt;/code&gt;, the chart above is what is shown.&lt;/p&gt;

&lt;p&gt;If &lt;code&gt;bc.stacked = true&lt;/code&gt;, the same data will look like this:&lt;/p&gt;

&lt;img src = &quot;http://chart.apis.google.com/chart?chxt=y,x&amp;chxl=0:|Bob|Stella|Foo&amp;cht=bhs&amp;chd=e:YnHvxO,OE4QDh&amp;chs=450x130&amp;chxr=1,0,1000&amp;chco=c53711,0000ff&amp;chtt=Horizontal+Bar+Graph&amp;chxs=0,10&amp;chm=o,00ff00,0,-1,10&quot;/&gt;

&lt;p&gt;Also, if you wanted to use this code in one of your controllers, and then display the graph in a template (view) file, you would set the graph's url in the controller: &lt;code&gt;@graph = bc.to_url&lt;/code&gt; Then within the view, you can simple show the graph as an image like this: &lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;erb&quot;&gt;&lt;span class=&quot;x&quot;&gt;&amp;lt;!-- From within the view file --&amp;gt; &lt;/span&gt;
&lt;span class=&quot;x&quot;&gt;&amp;lt;img src=&amp;quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@graph&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&amp;quot;/&amp;gt; &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Pie Chart&lt;/strong&gt;&lt;/p&gt;
 
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;GoogleChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;PieChart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;320x200&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Pie Chart&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; 
  &lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Apples&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;40&lt;/span&gt; 
  &lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Banana&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt; 
  &lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Peach&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt; 
  &lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Orange&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;60&lt;/span&gt; 
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Pie Chart&amp;quot;&lt;/span&gt; 
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_url&lt;/span&gt; 
  &lt;span class=&quot;c1&quot;&gt;# Pie Chart with no labels &lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show_labels&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt; 
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Pie Chart (with no labels)&amp;quot;&lt;/span&gt; 
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_url&lt;/span&gt; 
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;img src = &quot;http://chart.apis.google.com/chart?chl=Apples|Banana|Peach|Orange&amp;cht=p&amp;chd=s:oUe9&amp;chs=320x200&amp;chtt=Pie+Chart&quot;/&gt;

&lt;img src = &quot;http://chart.apis.google.com/chart?cht=p&amp;chd=s:oUe9&amp;chs=320x200&amp;chtt=Pie+Chart&quot;/&gt;

&lt;p&gt;This last example was taken from &lt;a href=&quot;http://gchartrb.rubyforge.org/files/README_txt.html&quot;&gt; gchartrb's readme&lt;/a&gt; file, which has an example for each kind of chart you can create (including Venn diagrams, Scatter charts, XY Line charts, etc). Notice that the data does not need to be within 0 to 100 (like percents on the pie chart) - the data will be added together and scaled appropriately by gchartrb. If you want to make the chart 3d, either set the 3rd parameter on &lt;code&gt;PieChart.new&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;, or you can set the attribute manually: &lt;code&gt;pc.is_3d = true&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Useful parameters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Google charts, by default, works with the data range between 0 and 100. Most of the time, your values will not work with this same scale. Instead of converting your data to the default scale, you can specify the data range with the &lt;code&gt;:range&lt;/code&gt; parameter in &lt;a href=&quot;http://gchartrb.rubyforge.org/classes/GoogleChart/Base.html#M000017&quot;&gt;&lt;code&gt;bc.axis&lt;/code&gt;&lt;/a&gt;. So if you data was between 1 and 12 on the x_axis (like months in a year), then you could specify that range like so:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;lc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;axis&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:range&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:labels&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;month_names_array&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;If you're working with large data sets/numbers, then you may have chart data that is slightly off the mark. The default encoding that gchartrb uses is called &lt;a href=&quot;http://code.google.com/apis/chart/#simple&quot;&gt;Simple Encoding&lt;/a&gt;, which only has 62 points of resolution. We can easily expand this resolution (to 4096 points of resolution) by using &lt;a href=&quot;http://code.google.com/apis/chart/#extended&quot;&gt;Extended encoding&lt;/a&gt;, which a chart can select by changing the &lt;code&gt;data_encoding&lt;/code&gt; attribute with &lt;code&gt;:extended&lt;/code&gt;. For a line graph &lt;code&gt;lc&lt;/code&gt;, it would look like this: &lt;code&gt; lc.data_encoding = :extended &lt;/code&gt;. See &lt;a href=&quot;http://code.google.com/apis/chart/#chart_data&quot;&gt;Chart data&lt;/a&gt; for an explanation for all the encodings Google charts uses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;gchartrb subtlities&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While gchartrb provides a great API for create charts in Rails, there are some subtle details about gcharts that you should be aware of. First of all, all charts derive from the base class &lt;a href=&quot;http://gchartrb.rubyforge.org/classes/GoogleChart/Base.html&quot;&gt;GoogleChart::Base&lt;/a&gt; - check it out to see all the methods and attributes that apply to all charts. Secondly, gchartrb encodes all of the data values in &lt;code&gt;some_chart.data&lt;/code&gt; from numeric form into a string representation of the data. This conversion doesn't effect the final output of your chart, and helps make the chart url shorter in length. Again, if your working with large values, make sure the use the extended coding by using &lt;code&gt;lc.data_encoding :extended&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Other Resources&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that you have a taste of Google Charts with gchartrb, check out the API documentation &lt;a href=&quot;http://gchartrb.rubyforge.org/&quot;&gt;here&lt;/a&gt;. If gchartrb doesn't suit your tastes, you can go directly to the &lt;a href=&quot;http://code.google.com/apis/chart/&quot;&gt;Google Charts API&lt;/a&gt; - it is thorough and self-explanatory. Ajaxian shows a number of quick examples of Google Charts &lt;a href=&quot;http://ajaxian.com/archives/use-the-google-chart-api-to-create-charts-for-your-web-applications&quot;&gt;here&lt;/a&gt;, and Matthew Bass gives a solid introduction to Google Charts and a few examples with gchartrb &lt;a href=&quot;http://www.infoq.com/articles/bass-google-charts-gchartrb&quot;&gt;here&lt;/a&gt;. Lastly, here is a great link for &lt;a href=&quot;http://www.collegeathome.com/blog/2008/06/05/50-cool-things-you-can-do-with-google-charts-api/&quot;&gt;50 Cool Things You Can Do with Google Charts&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/09/08/game-corner</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/09/08/game-corner/"/>
    <title>Game Corner?</title>
    <updated>2008-09-08T00:00:00-07:00</updated>
    <author>
      <name>aaron</name>
    </author>
    <content type="html">&lt;p&gt;Moe asked me if I'd like to post here on the BadPopcorn blog, to talk about random game industry stuff. Maybe I should have said no.&lt;/p&gt;

&lt;p&gt;Well it's too late now, I said &quot;I'd love to&quot; or something similar and now I will have to live with the repercussions of my reckless words. I'm starting small though.&lt;/p&gt;

&lt;p&gt;There is this odd thing that can happen when participating in team activities, where one person on the team is more burden than benefit, like an obsolete laptop computer, they're heavy, slow, loud and only rarely useful (and even then only for short periods of time). When we play Halo3 at the BadPopcorn office that laptop is me.&lt;/p&gt;

&lt;p&gt;So really, what can the guy with the most deaths and least kills say to the rest of the team? &quot;Uh Sorry I suck guys&quot;? Even if it is sincere, it isn't going to make the sucking stop, the sucking will continue. I do not have an &quot;A-Game&quot; that I have been not bringing, that can be brought now that I have realized my suck-ocity. To paraphrase Descartes, I suck therefore I am.&lt;/p&gt;

&lt;p&gt;So what can the guy that drags the team down do?&lt;/p&gt;

&lt;p&gt;Well I could stop playing, but screw that, the game is fun even when I come in last...unerringly, completely, utterly last.  As discussed earlier an apology just doesn't seem right unless I intend to do something to lessen the chances of similar wronging in the future. I'm afraid I cannot promise that.&lt;/p&gt;

&lt;p&gt;Leaving only one option, a simple and heartfelt admission of wrongdoing and regret...&lt;/p&gt;

&lt;p&gt;So yeah, Moe. That rocket in your back when you were trying to splatter Ben on the Mongoose?&lt;/p&gt;

&lt;b&gt;My Bad&lt;/b&gt;&lt;br /&gt;

&lt;a href=&quot;http://s3.amazonaws.com/badpopcorn.com/images/2008-09-full.jpg&quot;&gt;&lt;img src =&quot;http://s3.amazonaws.com/badpopcorn.com/images/2008-09-full.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/09/02/rails-select-helper</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/09/02/rails-select-helper/"/>
    <title>Rails Select Helper</title>
    <updated>2008-09-02T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;One of the major benefits of &lt;a href=&quot;http://rubyonrails.org&quot;&gt;Ruby on Rails&lt;/a&gt; is &lt;a href=&quot;http://en.wikipedia.org/wiki/Rapid_application_development&quot;&gt;rapid development&lt;/a&gt;. Something that we love at BadPopcorn. Rails has great helper methods to minimize code and bugs. One of my favorites is the select helper. There are several different ways to make a &lt;a href=&quot;http://shiningthrough.co.uk/blog/show/6&quot;&gt;select tag&lt;/a&gt;, but I am going to demonstrate the one I like best. Let's say you are creating a new &quot;gym member&quot;. He will have a name and belong to a gym.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;View&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;erb&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;form_for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;vi&quot;&gt;@member&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text_field&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:name&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:member&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:gym_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Gym&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;collect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;submit&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Create&amp;quot;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;&amp;lt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


Line 1 builds the &lt;a href=&quot;http://api.rubyonrails.org/v2.3.8/classes/ActionView/Helpers/FormHelper.html&quot;&gt;form&lt;/a&gt;. Rails uses the &lt;code&gt;@member&lt;/code&gt; variable to generate the action, id, and name of the form.

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;form&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;new_member&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;new_member&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;action=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;/members&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;method=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;post&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


Notice the &lt;code&gt;do | f |&lt;/code&gt; code in the form deceleration (line 1). You can now use the local variable &lt;code&gt;f&lt;/code&gt; to bind attributes of member to input variables. Line 2 of the code generates the below html. The name of the input variable is a Rails convention.

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;input&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;member_name&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;member[name]&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;size=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;30&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


Line 3 is the Rails select tag helper. The select tag generates the html select tag cleanly. The &lt;code&gt;name&lt;/code&gt; of the select is dynamically created by using the first two parameters of the helper function &lt;code&gt;:member&lt;/code&gt; and &lt;code&gt;:name&lt;/code&gt;. The options are generated by the third parameter.

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;select&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;member_gym_id&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;member[gym_id]&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;&amp;lt;option&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Get Ripped Here&lt;span class=&quot;nt&quot;&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;&amp;lt;option&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Hot Girls Welcome&lt;span class=&quot;nt&quot;&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


Line 4 creates the html submit button.

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;input&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;member_submit&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;commit&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;submit&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Create&amp;quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Also, Rails will throw an exception if you attempt to bind to a member attribute that does not exist.&lt;/p&gt;

For example,
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;erb&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text_field&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:height&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;will throw the exception: &lt;code&gt;undefined method `height' for #&lt;/code&gt;.  Changing the &quot;gym_id&quot; parameter in the select helper will cause the same type of exception. This will save you from making dumb mistakes time and time again.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So what's posted?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is where the rails form helper tags come in useful. An organized list of Member was passed as a post parameter to the controller.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Parameters: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;commit&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Create&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;member&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;moe&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;gym_id&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
&lt;span class=&quot;s2&quot;&gt;&amp;quot;authenticity_token&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;52646c5a18d11c6009b5597af3bf798942a59c0a&amp;quot;&lt;/span&gt;,
&lt;span class=&quot;s2&quot;&gt;&amp;quot;action&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;create&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;controller&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;members&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Controller&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When the form is posted it will hit the &quot;create&quot; function in the members controller by default. You can &lt;a href=&quot;http://api.rubyonrails.org/v2.3.8/classes/ActionView/Helpers/FormHelper.html&quot;&gt;change&lt;/a&gt; where it will post to if necessary.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt;   &lt;span class=&quot;vi&quot;&gt;@member&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Member&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:member&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;3&lt;/span&gt;   &lt;span class=&quot;n&quot;&gt;respond_to&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;4&lt;/span&gt;     &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@member&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;save&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;5&lt;/span&gt;       &lt;span class=&quot;n&quot;&gt;flash&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:notice&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Member was successfully created.&amp;#39;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;6&lt;/span&gt;       &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redirect_to&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;vi&quot;&gt;@member&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;7&lt;/span&gt;     &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;8&lt;/span&gt;   &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;9&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Line 2 makes a new instance of Member and passes the post parameter member list in the constructor. This returns a member object with the name and gym_id set properly. Line 4 saves the new member in the database.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Member Create &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0.000386&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;   INSERT INTO members &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;updated_at&amp;quot;&lt;/span&gt;,
&lt;span class=&quot;s2&quot;&gt;&amp;quot;gym_id&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;created_at&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; VALUES&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;moe&amp;#39;&lt;/span&gt;, &lt;span class=&quot;s1&quot;&gt;&amp;#39;2008-09-02 02:00:35&amp;#39;&lt;/span&gt;, 1,
&lt;span class=&quot;s1&quot;&gt;&amp;#39;2008-09-02 02:00:35&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The same type exception(s), discussed earlier, will occur here. For example, an exception will be thrown if there is a &quot;height&quot; attribute in the members post parameter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How we saved time (the short list)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt; Initially we didn't have to pass much to the view. Just an instance of Member.&lt;/li&gt;
	&lt;li&gt;We were able to use the Rails html helper to build the correct form quickly.&lt;/li&gt;
	&lt;li&gt;Rails conventions made it easy to know where the post would be directed to within the controller.&lt;/li&gt;
	&lt;li&gt;In two lines we created a new Member instance, updated the values with the posted parameters and updated the database.&lt;/li&gt;
	&lt;li&gt;It's also worth noting that the Rails error checking, when using the helper tags, saves us a lot of debugging time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;What's Next?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Input validation. Making sure the user isn't inputting dumb data. For example, in the above code the user could use undesirable characters in their name. Yup, that's super simple too.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/05/20/google-health</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/05/20/google-health/"/>
    <title>Google Health</title>
    <updated>2008-05-20T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Google health launched today and could be really big. The new Google product will let you store and manage all of your health information in one central place. I think this is a great step forward for the online medical community. Sites like &lt;a href=&quot;http://www.webmd.com&quot;&gt;webmd&lt;/a&gt; are very informative but not personal. I can only imagine the amount of data Google will be able to index now. But hey, it's free.&lt;/p&gt;

&lt;p&gt;I hope Google doesn't drop the ball on the social side, because it could be really helpful to a lot of people. Let users rate and comment on doctors and perhaps even view your friend's doctors. Let users exchange medical treatments they tried out and give first hand accounts of medications. I'm tired of going to sites that pretend to be informative when, in actuality, are trying to push a certain new medication or treatment process on you.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start tracking a medical history and learn about your conditions&lt;/li&gt;
&lt;li&gt;Import your medical records&lt;/li&gt;
&lt;li&gt;View your medical history&lt;/li&gt;
&lt;li&gt;Find out how medications might interact&lt;/li&gt;
&lt;li&gt;Make your health information work for you&lt;/li&gt;
&lt;li&gt;Search for doctors and hospitals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Find out more information &lt;a href=&quot;https://www.google.com/health/html/tour/index.html&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/04/07/google-charts-api-examples</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/04/07/google-charts-api-examples/"/>
    <title>Google Charts API, examples.</title>
    <updated>2008-04-07T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I was finally playing with the Google Charts API so I could learn it... I will forgo the hurdles and issues I have with it... I just wanted to dump out the examples I made while learning it-- for future reference.&lt;/p&gt;

&lt;p&gt;A simple line chart.&lt;/p&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?cht=lc&amp;chs=300x300&amp;chd=t:-10,5,0,5,10,80&amp;chds=-10,80&amp;chg=5,5&quot; /&gt;

&lt;p&gt;Line XY chart with two lines. The first line has Circle markers at each point.&lt;/p&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?cht=lxy&amp;chs=300x300&amp;chd=t:0,5,15,80|0,5,10,0|5,10|10,5&amp;chg=5,5&amp;chm=o,FF0000,0,-1,10&quot; /&gt;

&lt;p&gt;A Sparkline, which uses Line Chart parameters&lt;/p&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?cht=ls&amp;chs=30x30&amp;chd=t:0,5,15,80&amp;chm=o,FF0000,0,-1,10&quot; /&gt;

&lt;p&gt;Horizontal Bar Chart&lt;/p&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?cht=bhs&amp;chs=300x300&amp;chd=t:0,5,15,80&amp;chm=o,FF0000,0,-1,10&quot; /&gt;

&lt;p&gt;Vertical Bar Chart&lt;/p&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?cht=bvs&amp;chs=300x300&amp;chd=t:0,5,15,80&amp;chm=o,FF0000,0,-1,10&quot; /&gt;

&lt;p&gt;Vertical Bar Chart with TWO sets of data.&lt;/p&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?cht=bvs&amp;chs=300x300&amp;chd=t:0,5,15,80|5,10,20,100&amp;chm=o,FF0000,0,-1,10&amp;chco=4d89f9,c6d9fd&quot; /&gt;

&lt;p&gt;A pie chart.&lt;/p&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?cht=p&amp;chs=300x300&amp;chd=t:10,5,15,80&amp;chm=o,FF0000,0,-1,10&amp;chco=4d89f9,c6d9fd&quot; /&gt;

&lt;p&gt;Scatter chart&lt;/p&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?cht=s&amp;chs=300x300&amp;chd=t:10,5,15,80|10,20,30,40&amp;chm=o,FF0000,0,-1,10&amp;chco=4d89f9,c6d9fd&quot; /&gt;

&lt;p&gt;LineXy chart with 2 colored lines... colored points. and with legend&lt;/p&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?cht=lxy&amp;chs=300x300&amp;chd=t:10,5,15,80|1,20,30,40|10,20,30|10,20,30&amp;chm=o,FF0000,0,-1,10|o,00FF00,1,-1,10&amp;chdl=hi|bye&amp;chco=4d89f9,c6d9fd&quot; /&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/04/06/linked-data</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/04/06/linked-data/"/>
    <title>Linked Data</title>
    <updated>2008-04-06T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.w3.org/DesignIssues/LinkedData.html&quot;&gt;Linked Data&lt;/a&gt; has been defined for almost two years now:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Use URIs as names for things&lt;/li&gt;
	&lt;li&gt;Use HTTP URIs so that people can look up those names.&lt;/li&gt;
	&lt;li&gt;When someone looks up a URI, provide useful information.&lt;/li&gt;
	&lt;li&gt;Include links to other URIs. so that they can discover more things.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But I think it's just only now that people are starting to do it... about time.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2008/03/22/the-evolution-of-communication-we-made-email-social</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2008/03/22/the-evolution-of-communication-we-made-email-social/"/>
    <title>The evolution of communication, we made email social.</title>
    <updated>2008-03-22T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;I hate yahoo mail. I hate hotmail even more. In fact, I used to hate email in general. I began hating it less when I switched over to gmail a year or two ago. I thought by now everyone would have joined the &lt;em&gt;hate hotmail&lt;/em&gt;revolution, but I was mistaken. I was sadly mistaken. In fact, the number of gmail users are dwarfed by yahoo and hotmail users by millions. Why? &lt;span style=&quot;text-decoration: underline&quot;&gt;Identity&lt;/span&gt;.&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;People are tied to their email address like an insulin pump is to a 150 pound eight year old.&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;But everyone has this email address&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;I have all my contacts stored there and emails that I still need.&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;How else will my cousin in South Africa, who has actually inherited a bunch of money and needs my help to get it out of a US account, notify me about all natural penis cream.&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;Ok, maybe not the last one as much. Fact is, people want to move on to better email services but feel they can.&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;&lt;span style=&quot;font-weight: bold&quot; class=&quot;Apple-style-span&quot;&gt;Will the same happen with social sites?&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;The debate regarding the future of social sites is two fold. One, a new social site will emerge that all the facebook and myspace users will switch to. Two, users won't move onto a new social sites because they have made all their friends on one of the major social sites and it would be cumbersome to switch over. Hmmm, sounds familiar.&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;Personally, I agree with the second train of thought. Unless a new social site does something unique , by unique I actually mean unique features and not design, it will never be successful. I'm tired of reading about a new unique social network that turns out to be bad version of facebook with more AJAX. Would a new email service would be good idea? Of course not.&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;A social site is just email on steroids (which it probably got from Clemens former trainer). The basis of both services is communication. Social sites just makes your email address book viewable by the contacts in it.&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold&quot;&gt;Is email getting outdated?&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;Yes it is. Kids don't send emails to each other. They write on each other's walls, poke or send messages. Remember when you used to email pictures? Now you throw them up on picassa, flikr or facebook. In my opinion social sites will lead to the end of email. However, this won't happen until two things occur.&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;1. &lt;em&gt;A small culture change towards social messaging&lt;/em&gt;. Users perceive sending an email and sending a message on a social site as professional an non professional interfaces. Sites like LinkedIn are tackling this culture problem.&lt;/p&gt;

&lt;p style=&quot;margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-indent: 28px; font: normal normal normal 13px/normal Optima&quot;&gt;2. &lt;em&gt;Social sites upgrades their current messaging system. &lt;/em&gt;This is probably Facebook and Myspace weakest feature. Although Facebook has some great features, their messaging feature isn't all that great. The input textarea box is way too small for me to send a 1000 word message to someone. No form of organization. I can't search, tag or archive messages. I can't send a message to more then 12 recipients or attach a file off my computer.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/12/21/ruby-and-amazon-simpledb</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/12/21/ruby-and-amazon-simpledb/"/>
    <title>Ruby and Amazon SimpleDb</title>
    <updated>2007-12-21T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I am a lazy person. I am also a lazy person that loves the idea of leveraging lots of computing power (as a hobby) on demand for cheap. Wow Amazon, you're really helping me out here... especially now with your &lt;a href=&quot;http://www.amazon.com/b/?node=342335011&quot;&gt;SimpleDb&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Of course we've all read everyone's take on the product. Why should I add to the noise... but we've got projects registered at ruby forge without any files released... dammit...&lt;/p&gt;

&lt;p&gt;Show me the code!&lt;/p&gt;

&lt;p&gt;Well, the NY Times peeps have &lt;a href=&quot;http://open.blogs.nytimes.com/2007/12/21/a-first-look-at-amazon-simpledb/&quot;&gt;posted about their SimpleDb project&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Links:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://rubyforge.org/projects/nytimes&quot;&gt;SimpleDb Ruby Forge Project Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://code.nytimes.com/svn/ruby&quot;&gt;NY Times SimpleDb SVN Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So will this project be the winner of the ruby bindings mind share? I think first to market gives Jacob Harris (NY Times) a very strong position in my book.&lt;/p&gt;

&lt;p&gt;As for mind share... I am fond of two other rubyforge projects (above the rest) for Amazon.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://amazon.rubyforge.org/&quot;&gt;For Ruby S3: http://amazon.rubyforge.org/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://amazon-ec2.rubyforge.org/&quot;&gt;For Ruby EC2: http://amazon-ec2.rubyforge.org/&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/10/30/social-adwords-vs-regular-adwords</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/10/30/social-adwords-vs-regular-adwords/"/>
    <title>Social Adwords vs Regular Adwords</title>
    <updated>2007-10-30T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Remember when you only saw Google content after a web search? You know, before they basically took over the internet. Google introduced or rather made popular the concept of adwords but it seems facebook might be throwing their hat.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adwords Crash Course&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Google is really good at indexing websites and labeling them with certain keywords. Let's say you have a blog about Ronaldihno. Google might tag your website with keywords such as &quot;soccer&quot;, &quot;sports&quot;, &quot;ronaldinho&quot; and so forth.  How they do it doesn't matter, the fact is that they can do it.  Then they thought, &quot;hmmm since we know what the page is about, we could show the best ad on it.&quot;  By &quot;best ad&quot; I mean an advertisement that has a high chance of getting clicked on. For example, ads selling a poster of Ronaldihno would probably do better on your blog then the limited edition Jane Austin novel. That's ad words is in a nutshell. People purchase ad words and Google shows them on various pages across the internet.&lt;/p&gt;

&lt;p&gt;The key here is page content. It has little or nothing to do with the actual user. What if you were on the blog and happened to be looking for new soccer cleats? The best ad would probably be for cleats. What if the ad module knew that you were a huge fan with the popular soccer game Fifa by EA? Here is where social adwords becomes really interesting. Facebook has data and collects data all the time. If they launch a social adwords service it could be amazing. They could show an ad based on the content of the site but also by the user.  As of right now facebook has 50 million users and counting and I doubt anyone thinks it is going to slow down anytime soon. They'll dominate Tom's social site soon enough. Probably by the time he is 30. Or is it 40? I forget how old he is saying he is this week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't think they can do it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The newsfeed module can be seen as the building blocks for the ad module. It basically shows you content of what you should be interested in. Facebook could use these same algorithms and just run with them to display ads.  Read this great article for more about &lt;a href=&quot;http://www.insidefacebook.com/2007/10/29/facebook%e2%80%99s-news-feed-knows-what-you-did-last-summer/&quot;&gt;new feeds&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There are two important things to realize. First, facebook is thinking far far ahead then anyone gives them credit for. Second, data is great but organized data is the key.&lt;/p&gt;

&lt;p&gt;I'm sure you are wondering how much facebook could know about you?  The first seven are from the great article I mentioned above.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Whose profile pages you visit - and how frequently, how recently, and how often&lt;/li&gt;
  &lt;li&gt;Who you message, and who messages you&lt;/li&gt;
  &lt;li&gt;Whose walls you write on, and who writes on yours&lt;/li&gt;
  &lt;li&gt;Who/what you search for&lt;/li&gt;
  &lt;li&gt;Who you invite to events and groups, who accepts, and who invites you&lt;/li&gt;
  &lt;li&gt;Who you tag in photos, and who tags you&lt;/li&gt;
  &lt;li&gt;Which News Feed items you've clicked on before.&lt;/li&gt;
  &lt;li&gt;What you are trying to get rid of or looking to buy (Marketplace).&lt;/li&gt;
  &lt;li&gt;What types of links you are sharing.&lt;/li&gt;
  &lt;li&gt;What type of videos you watch and how often.&lt;/li&gt;
  &lt;li&gt;What groups you are in and what discussions you take part in.&lt;/li&gt;
  &lt;li&gt;What type of people do you befriend and how often do you make new friends.&lt;/li&gt;
  &lt;li&gt;What you are blogging about (Notes).&lt;/li&gt;
  &lt;li&gt;Which events have you attended and plan to attend.&lt;/li&gt;
  &lt;li&gt;Possibly know where you tavel to often based on your picture locations and names. For example, if you are tagged in a lot albums with &quot;Las Vegas&quot; then it's safe to assume you travel to Vegas a lot.&lt;/li&gt;
  &lt;li&gt;What locations you usually use the internet from and what times are you most active.&lt;/li&gt;
  &lt;li&gt;More data can be pulled from the Polling application.&lt;/li&gt;
  &lt;li&gt;Which applications you use the most (they are categorized).&lt;/li&gt;
  &lt;li&gt;Profile
&lt;ul&gt;
  &lt;li&gt;Activities&lt;/li&gt;
  &lt;li&gt;Affiliations  (Networks)&lt;/li&gt;
  &lt;li&gt;Age&lt;/li&gt;
  &lt;li&gt;Books&lt;/li&gt;
  &lt;li&gt;Current Location&lt;/li&gt;
  &lt;li&gt;Education History&lt;/li&gt;
  &lt;li&gt;Interests&lt;/li&gt;
  &lt;li&gt;Desired Relationship or status&lt;/li&gt;
  &lt;li&gt;Movies&lt;/li&gt;
  &lt;li&gt;Music&lt;/li&gt;
  &lt;li&gt;Poltical Status&lt;/li&gt;
  &lt;li&gt;Religion&lt;/li&gt;
  &lt;li&gt;Sex&lt;/li&gt;
  &lt;li&gt;Television Shows&lt;/li&gt;
  &lt;li&gt;Work History&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Privacy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Privacy as we used to know it disappeared a long time ago. Probably some time after credit cards and a little before Google Earth. I don't think facebook is doing anything wrong from a business standpoint. They aren't selling the data they collect rather using it build another technology. It is a bit scary when I imagine the ads could but I would rather see relevant ads on sites I visit rather then have my email address sold to the highest bidder.&lt;/p&gt;

&lt;p&gt;If you want to read more about the facebook ad-words rumors, check out &lt;a href=&quot;http://www.allfacebook.com/2007/10/breaking-facebook-launching-the-google-adwords-killer/&quot;&gt;facebook launching the google adwords killer&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/09/30/facebook-or-any-other-site-isnt-responsible-for-raising-your-child</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/09/30/facebook-or-any-other-site-isnt-responsible-for-raising-your-child/"/>
    <title>facebook, or any other site, isn't responsible for raising your child</title>
    <updated>2007-09-30T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;I was having a great day today. Back from a birthday weekend in Vegas and ready to spend countless hours in front of my laptop. I hop on &lt;a href=&quot;http://www.google.com/reader&quot;&gt;google reader&lt;/a&gt; and begin to catch up on tech news. Apple bricked the Iphone for customers who are smarter then Apple would like, youTube launched adsense (so I guess they make money now) and facebook might face  consumer fraud charges. Huh? Consumer fraud. For what?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Internet social networking site Facebook Inc. that promotes its safety for young teens from sexual predators and promises prompt responses to concerns has been warned by the New York attorney general that it may face a consumer fraud charge for failing to do either, a Cuomo official confirmed Sunday.....&lt;/p&gt;

&lt;p&gt;But it's now a much larger and growing social networking site and the safeguards and apparently the response times for complaints aren't what they were a year ago, Lerner said. Cuomo is calling on the site to revise its claims.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;http://www.newsday.com/news/local/wire/newyork/ny-bc-ny--cuomo-facebook0930sep30,0,3857577.story&quot;&gt;http://www.newsday.com/news/local/wire/newyork/ny-bc-ny--cuomo-facebook0930sep30,0,3857577.story&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Wow. Revise their claims?  Have these people been on My(Slut/Space)  or any of other social networks? Facebook has great privacy policies that restrict people's profiles to a point where you can't even see a person's picture. Which sucks sometimes cause you want to see if a chick is hot. She adds you as a friend and turns out to be a whale. However, that's another topic all together.   Maybe facebook should roll out a &quot;pee in a cup to make friends&quot; option or something.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad Parents&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;People need to stop expecting the internet to raise their children.  Get your kid's password and log on their account from time to time. Stop handing off the responsibility of raising your kid to other people. I bet these are the same people that send their kids to school and complain that they sweet little billy is ill mannered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Come on Cuomo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I knew facebook was getting big but I didn't know it got to the &quot;If I can get my name in the same headline as facebook it will help my political career&quot; status. Come on Cuomo...there are a lot better ways for the Attorney General of New York to get his name in the paper then riding the facebook wave. You tried to run for governor and had your ass handed to you, since then have made insane claims to get your name out there with some avail. You're like a D-list celebrity that does stupid things to get into the tabloids. Just release a sex tape, it worked for other spoiled kids.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;...Criticism was much more heated, however, in a series of lawsuits and investigations surrounding a Florida based S&amp;amp;L institution in which he was accused of illegal, hostile take-over maneuvers among other things. This problem tapered off after Attorney General Janet Reno declined to initiate a full investigation.&lt;sup class=&quot;noprint Template-Fact&quot;&gt;&lt;span title=&quot;This claim needs references to reliable sources since July 2007&quot; style=&quot;white-space: nowrap&quot;&gt; &lt;/span&gt;&lt;/sup&gt;A spectrum of excuses and accusations were offered to explain this situation.&lt;p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;In tandem with this last situation is the extremely sharp and heavily documented criticism coming from Catherine Fitts, former HUD Assistant Secretary and FHA Administrator under &lt;a href=&quot;http://en.wikipedia.org/wiki/Jack_Kemp&quot; title=&quot;Jack Kemp&quot;&gt;Jack Kemp&lt;/a&gt; and HUD independent contractor under Henry Cisneros and Andrew Cuomo. She, basically, accuses him of fraud and links his name to HUD vendors who also provided him with lucrative benefits of various types.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Andrew_Cuomo&quot;&gt;http://en.wikipedia.org/wiki/Andrew_Cuomo&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/09/23/notes-on-git</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/09/23/notes-on-git/"/>
    <title>Notes on Git</title>
    <updated>2007-09-23T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;So, it's been a while since Linus gave a &lt;a href=&quot;http://youtube.com/watch?v=4XpnKHJAok8&quot;&gt;Git talk at Google&lt;/a&gt;. Since then, I've been playing around with it. In truth, it's still a bit rough around the edges, but it is so much smoother running than darcs.&lt;/p&gt;

&lt;p&gt;Why? Because, it supports a distributed workflow such as:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Create N number of branches to work off of in your local repository.&lt;/li&gt;
	&lt;li&gt;Make N number of commits to those branches, only merging the polished patches into your own main line branch.&lt;/li&gt;
	&lt;li&gt;The expose your own main line branch to other developers via an exposed repository on some webserver somewhere.&lt;/li&gt;
	&lt;li&gt;Other developers will pull down your changes into their own repository, from which they work one the code (creating their own branches and commits).&lt;/li&gt;
	&lt;li&gt;Other developers expose their own main line branches in their own public repositories, from which you can pull down their changes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So, here are my notes about getting setting up one's own Git repositories. Note that you will generally have at least two repositories: Personal development one, and one exposed for your own published commits. In Git, the public directory is generally a &quot;bare&quot; repository sans a working directory. Whereas your private repository has a working directory... for your work.&lt;/p&gt;

&lt;p&gt;Here are steps (rough notes) for creating the public and private repository for a project:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# -- Create your area to store the public repositories&lt;/span&gt;
mkdir -p ~/repo

&lt;span class=&quot;c&quot;&gt;# -- CREATE THE PROJECT&lt;/span&gt;
mkdir -p ~/projects/myprojectname
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/projects/myprojectname
git init-db

&lt;span class=&quot;c&quot;&gt;# -- Commit something first, like a README.txt&lt;/span&gt;
touch README.txt
git add README.txt
git commit -a

&lt;span class=&quot;c&quot;&gt;# -- CREATE PROJECT&amp;#39;S PUBLIC REPOSITORY&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# NOTE: Git bombs out if there are Zero commits in the project you are&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   making public. Make sure there&amp;#39;s at least one commit in that repository.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   The reason I committed an empty README.txt. But also, one could have&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   created a bare Git repository without the clone.&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/repo/

&lt;span class=&quot;c&quot;&gt;# copy the repository in bare form-- sans working directory.&lt;/span&gt;
git clone --bare ~/projects/myprojectname myprojectname.git

&lt;span class=&quot;c&quot;&gt;# make the repository available for reading.&lt;/span&gt;
touch myprojectname.git/git-daemon-export-ok
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;myprojectname.git

&lt;span class=&quot;c&quot;&gt;# update the server info for remote clients, tracking branches.&lt;/span&gt;
git --bare update-server-info

&lt;span class=&quot;c&quot;&gt;# post-update executes everytime there is a push to this public repository;&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# it executes an update-server-info by default.&lt;/span&gt;
chmod a+x hooks/post-update

&lt;span class=&quot;c&quot;&gt;# -- MAKE THE REPOSITORIES VISIBLE&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# NOTE: Put it on a dumb (read only) webserver of your choice.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   I rsync it to my dreamhost account; this command is a cron job.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# The following makes the assumption that the public_html directory&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# is the web root for the exposed ~username/ directory for the&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# webhost.example.com webhost.&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~
rsync -av -e ssh ~/repo username@webhost.example.com:public_html/

&lt;span class=&quot;c&quot;&gt;# -- UPDATE THE PUBLIC REPOSITORY&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# NOTE: This updates your local copy of the project&amp;#39;s public repository;&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   where the next run of the rsync cron job will update the public&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   webserver.&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/projects/myprojectname
git push ~/repo/myprojectname.git master:master

&lt;span class=&quot;c&quot;&gt;# -- OTHERS DEVELOPERS CLONE PROJECT&amp;#39;S EXPOSED REPOSITORY&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# NOTE: On another machine, another developer.&lt;/span&gt;
mkdir ~/projects
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/projects
git clone http://webhost.example.com/~username/repo/myprojectname.git

&lt;span class=&quot;c&quot;&gt;# This developer now has his own copy at ~/projects/myprojectname;&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# this developer will then work and create patches to send to you.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# If you have pushed updates to your public repository, this other&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# developer may pull down your changes using:&lt;/span&gt;
git pull
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Now, only if I could better figure out how I'd like to work on managing my own branches, and tracking remote branches.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/08/29/privacy-policy-or-the-lack-of-it</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/08/29/privacy-policy-or-the-lack-of-it/"/>
    <title>privacy policy or the lack of it</title>
    <updated>2007-08-29T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;A few months ago I signed up for a &lt;a href=&quot;http://www.sharedreviews.com&quot;&gt;SharedReviews &lt;/a&gt;beta account. The idea behind the site is to get solid reviews of products and pay the community 50/50 on certain revenue.  Sounds pretty cool huh?  Well it may be but as I was signing up I came across the privacy policy.  Usually I just breeze through it but I decided to read this one.&lt;/p&gt;

&lt;blockquote&gt;&quot;We protect your privacy with a passion!&quot;&lt;/blockquote&gt;

&lt;p&gt;First, I want to say that I think ShareReviews is a cool site and I hope their business model works out. However, the privacy policy was kind of weird.  It was actually amusing.  Why do sites even have privacy policies?  They should just come out and say &quot;Yea, we'll use your information for whatever we damn well please.&quot; Below are some lines right of the policy.&lt;/p&gt;

&lt;blockquote&gt;&lt;span class=&quot;profile-force-link&quot;&gt;&quot;For the purposes of this policy, &quot;Personal Information&quot; means any information about you except your business title, address, e-mail address, telephone number or facsimile number. It also does not include your home address and telephone number if these are published in a telephone or other directory, and does not include any Review, content or other materials that you post or submit to use for possible publication.&lt;/span&gt; &quot;&lt;/blockquote&gt;

&lt;p&gt;Umm....so what else is there?  What exactly is private then?&lt;/p&gt;

&lt;blockquote&gt;&quot;&lt;span class=&quot;profile-force-link&quot;&gt;We do not sell your Personal Information to third parties. We may share some or all of your Personal Information with our third party business partners&quot;&lt;/span&gt;&lt;/blockquote&gt;

&lt;p&gt;Hmmm ok.  I shouldn't be surprised. It's a &quot;review&quot; site and to make money they are probably selling data. For that data to be worth anything they have to include user data with it.  So why throw in the line about &quot;we protect your privacy with a passion.&quot;  Half the business model is actually based upon doing the exact opposite.&lt;/p&gt;

&lt;p&gt;Most users caring less is the worst part.  We'll go crazy if a telemarketer calls our house but we don't blink while registering for a new site. Personally, I'm not against a website data mining to show relevant ads. Let's take facebook for example.  They will look at your profile and use that to display an advertisement. An advertiser will pay more to know that their ad is getting to their target demographic. I'm fine with that.  I'm going to see an ad anyway, might as well see one that I might actually like. That's how Google makes all their money.&lt;/p&gt;

&lt;p&gt;What I don't like is when companies sell information they collect. To me thats like selling hot pictures your ex girlfriend took for you. The ones she would dress up like a tiger and act like she is...ok getting off topic. The pictures were meant for you not the public or your favorite &quot;rate this chick&quot; website. Just because you don't care about her anymore doesn't mean you should go and sell something she wouldn't want sold. However, let's say you analyze the pictures. After hours of analyzing, and frequent naps, you say to yourself &quot;hey i bet she would really like this lingerie site.&quot;  You contact her the usual way you two communicate and let her know that you are an affiliate for an animal lingerie site.  Nothing wrong with that, right?&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/08/25/libxml-default-namespace</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/08/25/libxml-default-namespace/"/>
    <title>libxml default namespace</title>
    <updated>2007-08-25T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Can't find your nodes?  Neither could we.  So it turns out that Xpath doesn't behave well with default namespaces.  This is what Corey and I figured out...hope it helps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example XML&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;Response&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;http://www.badpopcorn.com/solutions&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;solutions&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;solution&amp;gt;&lt;/span&gt;Don&amp;#39;t got any&lt;span class=&quot;nt&quot;&gt;&amp;lt;/solution&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/solutions&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/Response&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Although you can load it into a document, you can't find any nodes without a little hack (using the word little loosely). Ruby example.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;doc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;XML&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Document&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;http://badpopcorn.com/file.xml&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;dn&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;dn:http://www.badpopcorn.com/solutions&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;doc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;//dn:solutions&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;dn:solution&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Yea, we know how you feel. Way to go Corey.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/07/26/use-appaccept-screw-the-atom-categories</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/07/26/use-appaccept-screw-the-atom-categories/"/>
    <title>Use app:accept, screw the Atom Categories</title>
    <updated>2007-07-26T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;It's been a while since I've revisited the Atom Publishing Protocol, so I just had to review (briefly) the latest APP Draft (17) since it's probably going to be the one that becomes an RFC standard. I noticed something that I must have overlooked before: the app:accept element. Without even looking through the past drafts, I have a gut feeling that it's been in the APP for quite some time; and I have the feeling that I had a &lt;a href=&quot;http://badpopcorn.com/2006/09/21/atom-categories-its-potential/&quot;&gt;misguided pursuit of using Atom Categories&lt;/a&gt; as service type descriptions.&lt;/p&gt;

&lt;p&gt;On the surface, one may think that the app:accept is just for giving the mime-type of whatever resource one wants to create in an APP Collection: jpeg, gif, some xml. Let's look at the &quot;application/xml&quot; mime-type. It describes many many XML documents that represent many resources. One may be a shopping cart order, or it may represent a classified ad. And this is why I may have overlooked the accept element before: a generic mime-type is generally too broad for describing the semantic meaning of the Resource represented using said mime-type.&lt;/p&gt;

&lt;p&gt;But, one can aptly describe the what &quot;Service&quot; a server will provide as a side effect after one POSTs a new Resource to a collection (for creation) by using the Accept Extensions as described in the APP app:accept section-- note that app:accept refers to Accept Header section (14.1) in &lt;a href=&quot;http://www.faqs.org/rfcs/rfc2616.html&quot;&gt;RFC2616&lt;/a&gt;. Examples of such side effects are the creation of other Resources in other Collections by the server.&lt;/p&gt;

&lt;p&gt;So, in the app:accept example in the new APP Draft (17), it is implicitly suggested to use the &quot;type&quot; extension to describe, semantically, what a Collection will accept and process server side. Example: `application/atom+xml;type=entry` for normal atom entries. In my services now, I can add some extra domain specific restrictions on POSTed Resources with an app:accept like `application/xml;type=&quot;http://example.com/online_orders/flower_basket_order.dtd&quot;`. But don't use DTDs, it's just an example. :) Or try `application/xml;type=com.example.some.resource.type`. Note that one has to be careful about quoting (&quot;) values. In the first case, I had the separators (as defined in RFC26162) slash (/) and colon (:) in my URI; where as the second case had no separators. And also note that what one (as a good APP citizen) POSTs Resources, not RPC requests.&lt;/p&gt;

&lt;p&gt;So what are Categories good for? I haven't had much time to reflect on that, so maybe it's good to use Categories if I had a generic &quot;http://example.com/online_order.dtd&quot; resource type that is used for all types of orders: flower baskets, bicycles, or electronics. Have a Collection for bike orders whose category may be &quot;http://example.com/bikes&quot;, and another for Flowers...&lt;/p&gt;

&lt;p&gt;And all this makes sense to me because we want to be Resource Oriented, and mime-types are the preferred route in describing Resources. I say this is good stuff.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/06/26/i-eyed-the-iphone-up</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/06/26/i-eyed-the-iphone-up/"/>
    <title>I eyed the iphone up</title>
    <updated>2007-06-26T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Will the Iphone be a huge seller. &lt;strong&gt;Yes&lt;/strong&gt;. Is it worth getting now. &lt;strong&gt;Nope&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why will it sell?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It looks nice and it's Apple.  Apple has a devoted following. Some follow so blindly it makes successful suicide bomber recruiters give props.  Apple makes great products but the iphone is riding the Apple branding like Turtle rides Vinnie Chase's fame.  People are now convinced that anything Apple releases will be good.  I remember reading a TechCrunch article on this. I would give you the link but I don't enjoy searching the TechCrunch site.  Anyway, the article showed a poll where an overwhelming amount of people felt the iphone was the best cell phone. This was crazy then because most peopled polled most likely never held or even seen the product. This is very similar to the Lebron James NBA draft.  People were convinced that this kid was going to be the greatest thing since sliced bread without knowing much about him.  They just knew that he was on ESPN every hour.&lt;/p&gt;

&lt;p&gt;Simply put. It's too hyped not to sell but that doesn't mean its going to change the world. Well, not right away.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is it not worth buying yet?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Was Lebron James amazing his rookie year? Yes, but he wasn't the best player in the league. Will the iphone be a good product when it comes out? Yes, but it won't be the best cell phone available.  It is the first version of a product chain that Apple has never released.  There will be problems in the first version, probably big problems. I want one but I would rather wait for the second version after real user bugs have been found.  Let the sixteen year old kid with sticky fingers text every five minutes for about six months.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is it over priced?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Depends on how you look at it.  Apple somehow convinced a large amount of people to spend three hundred dollars to get a video ipod that they don't watch that much video on. Think of all your non geeky friends that have a video ipod.  I am willing to bet that more then half of them don't really watch videos on it and probably don't use up all the disk space. So why do they have it?&lt;/p&gt;

&lt;p&gt;It looks nice and other people want/have it. Yea, thats it.  Apple made sure that the iphone looked amazing. It's just like the hot chick your friends all want to hook up with.  At first its all about the looks and the reputation you get when you have her.  It's only after a few months you realize her touch screen interface has major drawbacks  and you might have been better off waiting a year for her sister to be legal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt; Upate (June 26th 6:04 pm)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CrunchGears has some reviews up. My favorite has been &lt;a href=&quot;http://link.brightcove.com/services/link/bcpid452319854/bctid1077968178&quot;&gt;Mossberg's&lt;/a&gt; and &lt;a href=&quot;http://link.brightcove.com/services/link/bcpid452319854/bctid1077968178&quot;&gt;Pogue's&lt;/a&gt; videos.&lt;/p&gt;

&lt;p&gt;Pros I didn't expect&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;You get used typing on it and it becomes easy&lt;/li&gt;
	&lt;li&gt;The wifi feature seems amazingly cool&lt;/li&gt;
	&lt;li&gt;Internet browsing might actually work on a phone now&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The battery is sealed inside so if it gets messed up you have to send it back to apple.&lt;/li&gt;
	&lt;li&gt;The regular data connection uses AT&amp;amp;T edge which supposedly sucks.&lt;/li&gt;
	&lt;li&gt;No Flash or Javascript&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The internet feature looks remarkable.  I shall write a comment to this blog about it later.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/06/24/angels-game-2</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/06/24/angels-game-2/"/>
    <title>Angels Game 2</title>
    <updated>2007-06-24T00:00:00-07:00</updated>
    <author>
      <name></name>
    </author>
    <content type="html">&lt;strong&gt;Posted by mobile phone:&lt;/strong&gt;&lt;br /&gt;

&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-06-IMG00060.jpg&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-06-IMG00060.jpg&quot; height=&quot;320&quot; width=&quot;400&quot; alt=&quot;Angels Game 2&quot; /&gt;&lt;/a&gt;&lt;br /&gt;

Where's Moe?&lt;br /&gt;&lt;br /&gt;

&lt;strong&gt;File info:&lt;/strong&gt;&lt;br /&gt;Type: image jpg&lt;br /&gt;Size: 246.86 kb&lt;br /&gt;
&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-06-IMG00060.jpg&quot;&gt;Angels Game 2&lt;/a&gt;&lt;br /&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/06/24/angels-game-1</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/06/24/angels-game-1/"/>
    <title>Angels Game 1</title>
    <updated>2007-06-24T00:00:00-07:00</updated>
    <author>
      <name></name>
    </author>
    <content type="html">&lt;strong&gt;Posted by mobile phone:&lt;/strong&gt;&lt;br /&gt;

&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-06-IMG00059.jpg&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-06-IMG00059.jpg&quot; height=&quot;320&quot; width=&quot;400&quot; alt=&quot;Angels Game 1&quot; /&gt;&lt;/a&gt;

&lt;br /&gt;Where's Moe?&lt;br /&gt;&lt;br /&gt;

&lt;strong&gt;File info:&lt;/strong&gt;&lt;br /&gt;Type: image jpg&lt;br /&gt;Size: 262.66 kb&lt;br /&gt;

&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-06-IMG00059.jpg&quot;&gt;Angels Game 1&lt;/a&gt;&lt;br /&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/06/22/ugly-mugs</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/06/22/ugly-mugs/"/>
    <title>Ugly Mugs</title>
    <updated>2007-06-22T00:00:00-07:00</updated>
    <author>
      <name></name>
    </author>
    <content type="html">&lt;strong&gt;Posted by mobile phone:&lt;/strong&gt;&lt;br /&gt;

&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-06-IMG00057.jpg&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-06-IMG00057.jpg&quot; height=&quot;320&quot; width=&quot;400&quot; alt=&quot;Ugly Mugs&quot; /&gt;&lt;/a&gt;&lt;br /&gt;

These ugly mugs are hanging out in Orange at the Ugly Mug Cafe. &lt;br /&gt;&lt;br /&gt;

&lt;strong&gt;File info:&lt;/strong&gt;&lt;br /&gt;Type: image jpg&lt;br /&gt;Size: 299.54 kb&lt;br /&gt;

&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-06-IMG00057.jpg&quot;&gt;Ugly Mugs&lt;/a&gt;&lt;br /&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/06/13/launching-xulrunner-1813-on-a-mac</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/06/13/launching-xulrunner-1813-on-a-mac/"/>
    <title>Launching XULRunner 1.8.1.3 on a Mac</title>
    <updated>2007-06-13T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Ok. I started playing with &lt;a href=&quot;http://developer.mozilla.org/en/docs/XULRunner&quot;&gt;XULRunner&lt;/a&gt; again, but this time on my Mac. I downloaded a Mac build; I went through the &lt;a href=&quot;http://developer.mozilla.org/en/docs/Getting_started_with_XULRunner&quot;&gt;getting started page&lt;/a&gt; and reviewed the &lt;a href=&quot;http://blogs.acceleration.net/ryan/archive/2005/05/06/1073.aspx&quot;&gt;tutorial&lt;/a&gt;; I had my XUL application ready, and then started it up:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;/Library/Frameworks/XUL.framework/xulrunner-bin application.ini
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;IT FAILED, ARG!!!&lt;/strong&gt; The xulrunner-bin process launched and promptly exited, and I couldn't find any debug information about why. I checked and double checked, but I didn't find any problems with my super simple XUL application. I even purposely broke my sample XUL application to try to get an error message-- but nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SOLUTION&lt;/strong&gt;: Out of a hunch, I followed the &lt;a href=&quot;http://developer.mozilla.org/en/docs/XULRunner:Deploying_XULRunner_1.8&quot;&gt;deployment instructions&lt;/a&gt; and packaged up a &quot;MyApp.app&quot; Mac application. I launched it from Finder-- `open MyApp.app` also would've worked from the Terminal-- and it worked like a charm. It's kinda hackish to develop in MyApp.app/ subdirectories, but it works...&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/06/12/termite-gambit-c-wish</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/06/12/termite-gambit-c-wish/"/>
    <title>Termite, Gambit-C Wish</title>
    <updated>2007-06-12T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I wish to find a better way for &lt;a href=&quot;http://toute.ca/&quot;&gt;Termite&lt;/a&gt; to be installed without &lt;a href=&quot;http://toute.ca/termite/INSTALL&quot;&gt;recompiling&lt;/a&gt; Gambit-C; all because-- you know-- I use the &lt;a href=&quot;/blog/2007/05/22/macports-and-gambit-c/&quot;&gt;Gambit-C MacPort&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/05/24/blackberry-pearl-and-mac</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/05/24/blackberry-pearl-and-mac/"/>
    <title>BlackBerry Pearl and Mac</title>
    <updated>2007-05-24T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;It's called tethering, and the two websites you should look at:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;http://www.taniwha.org.uk/&lt;/li&gt;
	&lt;li&gt;http://www.fibble.org/archives/000508.html&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The BlackBerry Modem Scripts found on both sites are essentially the same (diff). I won't bore you with the details, but just follow those instructions... and you'll like getting internet wherever you go. I just have two things to iron out: I get disconnected after a few minutes of inactivity, and I get a &quot;Bluetooth Model Resource Busy&quot; error after I've uploaded pictures from my phone to the Mac. For the former, I just reconnect; To get around latter, I have to go through the stupid process of repairing my device and setting it all up again. :(&lt;/p&gt;

&lt;p&gt;In fact, I wrote this post over the thether. :)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/05/22/macports-and-gambit-c</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/05/22/macports-and-gambit-c/"/>
    <title>MacPorts and Gambit-C</title>
    <updated>2007-05-22T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;The &lt;a href=&quot;http://trac.macports.org/projects/macports/ticket/11688&quot;&gt;Gambit-C MacPorts Portfile&lt;/a&gt; was finally committed a couple days ago, and I just got around to trying it out. Just do a `sudo port -d selfupdate`, and `port install gambit-c`. Worked like a charm! Great Job Arto! :)&lt;/p&gt;

&lt;p&gt;Just a few notes about the installation for those that are trying out the examples from the Gambit-C user manual:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;gsc needs &quot;-l /opt/local/lib/gambit-c/_gambc&quot; when generating link files.&lt;/li&gt;
	&lt;li&gt;Pass the following to gcc for gambit.h: -I/opt/local/include&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using an example taken from the users manual:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Here is for example how a program with three modules (one in C and two in Scheme) can be built.  The content of the three source files (`m1.c', `m2.scm' and `m3.scm') is:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;c&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/* File: &amp;quot;m1.c&amp;quot; */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;power_of_2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;scheme&quot;&gt;&lt;span class=&quot;c1&quot;&gt;; File: &amp;quot;m2.scm&amp;quot;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;c-declare&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;extern int power_of_2 ();&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;define &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;pow2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;c-lambda&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;power_of_2&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;define &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;twice&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cons &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;scheme&quot;&gt;&lt;span class=&quot;c1&quot;&gt;; File: &amp;quot;m3.scm&amp;quot;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;write &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;map &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;twice&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;map &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;pow2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;newline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;blockquote&gt;
   &lt;p&gt;The compilation of the two Scheme source files can be done with three invocations of `gsc':&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;     &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gsc -c m2.scm        &lt;span class=&quot;c&quot;&gt;# create m2.c (note: .scm is optional)&lt;/span&gt;
     &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gsc -c m3.scm        &lt;span class=&quot;c&quot;&gt;# create m3.c (note: .scm is optional)&lt;/span&gt;
     &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gsc -link m2.c m3.c  &lt;span class=&quot;c&quot;&gt;# create the incremental link file m3_.c&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;We, instead, use the following command lines:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# optional compile into C files.&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gsc -c m2.scm        &lt;span class=&quot;c&quot;&gt;# create m2.c (note: .scm is optional)&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gsc -c m3.scm        &lt;span class=&quot;c&quot;&gt;# create m3.c (note: .scm is optional)&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# creates the link file (m3_.c) and creates m1.c m2.c if they don&amp;#39;t exist.&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gsc -link -l /opt/local/lib/gambit-c/_gambc m2 m3
&lt;span class=&quot;c&quot;&gt;# Compiles the code into a.out&lt;/span&gt;
gcc -I/opt/local/include m1.c m2.c m3.c m3_.c -L/opt/local/lib/gambit-c -lgambc
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/05/05/not-being-evil</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/05/05/not-being-evil/"/>
    <title>Not Being Evil</title>
    <updated>2007-05-05T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Just a note to everyone: I've started a job where I'm not supposed to be Evil-- as the motto goes. Anyways, I just finished my first week of orientation up in the Bay Area and am set to head back to their satelite office in Santa Monica. I'm spending my last moments hanging with friends in San Francsisco playing foosball... Yes... Foosball. Don't laugh, I like playing this game while drinking with friends.&lt;/p&gt;

&lt;p&gt;So, I won't be blogging as much about the tech I work on. I'll, instead, blog about random life stuff that doesn't conflict with NDAs.&lt;/p&gt;

&lt;p&gt;Peace!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/04/25/securing-lua-openlibs-oddity</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/04/25/securing-lua-openlibs-oddity/"/>
    <title>Securing Lua, Openlibs Oddity</title>
    <updated>2007-04-25T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.lua.org/&quot;&gt;Lua&lt;/a&gt; is a very nifty scripting language embedded into many applications: World of Warcraft being my favorite. And a common way to embed Lua into a program is to open it up, load all of Lua's standard libraries and then execute the intended script:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;lua&quot;&gt;&lt;span class=&quot;n&quot;&gt;lua_State&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lua_open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaL_openlibs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaL_dofile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;SOME_LUA_SCRIPT&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;lua_close&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;However, opening all the standard libraries exposes dangerous methods that can be maliciously used by a script. For example, A World of Warcraft plugin could be written to trash your entire harddrive if all of Lua's standard libraries were loaded. Instead, Lua has the ability to load its libraries individually, thus being able to exclude libraries that leave holes to the operating system:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;lua&quot;&gt;&lt;span class=&quot;n&quot;&gt;lua_State&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lua_open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaopen_table&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaopen_string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaopen_math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaL_dofile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;SOME_LUA_SCRIPT&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;lua_close&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The above code works nicely, but I lose the Lua module functionality in the 'package' package. I wanted to allow packages to be loaded so I added a line (code for sandboxing package directories omitted):&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;lua&quot;&gt;&lt;span class=&quot;n&quot;&gt;lua_State&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lua_open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaopen_package&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaopen_table&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaopen_string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaopen_math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;luaL_dofile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;SOME_LUA_SCRIPT&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;lua_close&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;After compiling and running, I find my code no longer works (Lua circa 5.1.2)! What's the deal? No idea, but I was able to get the 'package' package to load by creating my own clone of Lua's luaL_openlibs code. For example, the following only loads the 'package' package:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;lua&quot;&gt;&lt;span class=&quot;n&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;luaL_Reg&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;my_lualibs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;luaopen_base&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LUA_LOADLIBNAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;luaopen_package&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LUA_TABLIBNAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;luaopen_table&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LUA_IOLIBNAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;luaopen_io&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LUA_OSLIBNAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;luaopen_os&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LUA_STRLIBNAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;luaopen_string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LUA_MATHLIBNAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;luaopen_math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LUA_DBLIBNAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;luaopen_debug&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;LUALIB_API&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;open_my_lualibs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lua_State&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;L&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;luaL_Reg&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lib&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;my_lualibs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;lua_pushcfunction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;L&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;lua_pushstring&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;L&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;lua_call&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;L&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Calling open_my_lualibs instead of the usual openlibs works like a charm.&lt;/p&gt;

&lt;p&gt;Can anyone else reproduce this effect? Is it just me?&lt;/p&gt;

&lt;p&gt;P.S. - Another way to secure Lua from functions such as 'dofile'  or 'loadfile' is to nil out these unsafe functions (dofile=nil) before running a user script; but I find it a tedious task that seems to be a fragile fix.&lt;/p&gt;

&lt;p&gt;P.P.S. - I skipped over the lua_register(l, &quot;function_name_in_lua&quot;, function_pointer_in_c) bits for exposing code and data to Lua scripts. A truly paranoid person would abandon the use of Lua's standard libraries and would register their own set of secured functions.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/03/30/ruby-uri-percent-encoding</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/03/30/ruby-uri-percent-encoding/"/>
    <title>Ruby URI Percent Encoding</title>
    <updated>2007-03-30T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;CGI.escape and URI.escape are both available in the standard Ruby libraries for URL encoding. But which one should you use?&lt;/p&gt;

&lt;p&gt;Here's a quick note about the differences:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;irb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;&lt;span class=&quot;mo&quot;&gt;001&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;cgi&amp;#39;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;irb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;&lt;span class=&quot;mo&quot;&gt;002&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;uri&amp;#39;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;irb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;&lt;span class=&quot;mo&quot;&gt;003&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;URI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;Test Hi&amp;lt;&amp;gt;?/&amp;amp;;=:&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Test%20Hi%3C%3E?/&amp;amp;;=:&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;irb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;&lt;span class=&quot;mo&quot;&gt;004&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;URI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;Test Hi&amp;lt;&amp;gt;?/&amp;amp;;=:&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;&amp;amp;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Test Hi&amp;lt;&amp;gt;?/%26;=:&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;irb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;&lt;span class=&quot;mo&quot;&gt;005&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;CGI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;Test Hi&amp;lt;&amp;gt;?/&amp;amp;;=:&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Test+Hi%3C%3E%3F%2F%26%3B%3D%3A&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Note that URI.escape fails to encode the ampersand... So definitely use CGI.escape if you want to safely encode a query parameter for net/http calls.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/03/24/here-at-badpopcorn-inc-hq</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/03/24/here-at-badpopcorn-inc-hq/"/>
    <title>Here at BadPopcorn, Inc. H.Q.</title>
    <updated>2007-03-24T00:00:00-07:00</updated>
    <author>
      <name>aaron</name>
    </author>
    <content type="html">&lt;p&gt;Welcome to the inagural post from BadPopcorn H.Q.&lt;/p&gt;

&lt;p&gt;Located in the relaxed heart of Old Town Orange California. BadPopcorn now has a home.&lt;/p&gt;

&lt;p&gt;Here is our lovely view of...a relatively generic street.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-03-dscn0877.jpg&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-03-dscn0877.jpg&quot; title=&quot;dscn0877.jpg&quot; alt=&quot;dscn0877.jpg&quot; width=&quot;128&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That thing to Ben's left is still hanging there...I don't believe any of us like it...but there were theories floated the it might be there for luck...and who are we to risk bad luck.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-03-dscn0867.jpg&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-03-dscn0867.jpg&quot; title=&quot;dscn0867.jpg&quot; alt=&quot;dscn0867.jpg&quot; width=&quot;128&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First day of work at the new office.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-03-dscn0880.jpg&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-03-dscn0880.jpg&quot; title=&quot;dscn0880.jpg&quot; alt=&quot;dscn0880.jpg&quot; width=&quot;128&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First meeting in the new office.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-03-dscn0871.jpg&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-03-dscn0871.jpg&quot; title=&quot;dscn0871.jpg&quot; alt=&quot;dscn0871.jpg&quot; width=&quot;128&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The weeks, and months ahead will be chock-full of planning, collaborating, and lots of other things, most of which will involve looking longingly into a screen and typing away on keyboards like the feet of a shirtless Irish folk dancer...from the nineties. Except we'll all be wearing our shirts...and it's not the nineties...and it's fingers on keyboards...look there's going to be lots of fast typing.&lt;/p&gt;

&lt;p&gt;More Updates to Come...&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/03/18/rdfa-complexities</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/03/18/rdfa-complexities/"/>
    <title>RDFa Complexities</title>
    <updated>2007-03-18T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;So I briefly read over the new draft of the &lt;a href=&quot;http://www.w3.org/TR/xhtml-rdfa-primer/&quot;&gt;RDFa Primer&lt;/a&gt;. It's good overall, but Section 5 introduces unnecessary interpretation complexities.&lt;/p&gt;

&lt;p&gt;I say &lt;strong&gt;BLEAH&lt;/strong&gt; to the Section 5. I want &quot;Keep It Simple, Stupid.&quot; parsing. The nested layers make it harder for the parser to parse; it makes it harder for the lay person to understand RDFa (and to adopt, and to use).&lt;/p&gt;

&lt;p&gt;I also &lt;strong&gt;REALLY&lt;/strong&gt; don't like the idea of intermixing the id and about attributes for use in defining the subjects &amp;amp; objects. Although the primer makes a case for it, I counter with this example:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;body&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;about=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;http://example.com/mydoc#section&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;popup&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    The document was written by &lt;span class=&quot;nt&quot;&gt;&amp;lt;span&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;rel=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;dc:author&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Tim&lt;span class=&quot;nt&quot;&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;onClick=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;...&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Show PopUp&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The 'popup' id is overloaded. It's the identifier for which the Javascript code looks up, and it's also become the subject of the dc:author statement. The above fragment is also non-intuitive. I would expect &amp;lt;http://example.com/mydoc#section&amp;gt; dc:author 'Tim'. Instead, I get &amp;lt;#popup&amp;gt; dc:author 'Tim'.&lt;/p&gt;

</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/03/13/rdfa-in-ruby-a-first-stab</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/03/13/rdfa-in-ruby-a-first-stab/"/>
    <title>RDFa in Ruby, a First Stab</title>
    <updated>2007-03-13T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;A new draft of &lt;a href=&quot;http://www.w3.org/2006/07/SWD/RDFa/syntax/&quot;&gt;RDFa&lt;/a&gt; &lt;a href=&quot;http://www.w3.org/TR/xhtml-rdfa-primer/&quot;&gt;[1]&lt;/a&gt; has been out for about a month now, and it got me to thinking about RDF again. This time, the geek in me saw the opportunity to use easily use RDF in my Atom based applications. Instead of using embedded micro formats in Atom Entries, I can create semantic relationship using preexisting ontologies (e.g. - DublinCore) in an easy to read format.&lt;/p&gt;

&lt;p&gt;The XML generation side had near zero work thanks to Ruby On Rails' rxml format. But I was lacking a parser to read in the RDF statements even though there were a &lt;a href=&quot;http://www.google.com/search?q=ruby+rdf+store&quot;&gt;few Ruby RDF Stores available&lt;/a&gt;. The only RDFa parser I found was written in Python-- &lt;a href=&quot;http://wiki.creativecommons.org/RdfaDict&quot;&gt;rdfadict&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So, I just set aside parts of the last two days and came up with my own super simple Ruby RDFa parser; I read and reread the RDFa Syntax draft document, which is still far from complete; I skipped implementation of parts of the spec: xml:base, reification, and nested CURIEs; and got something to just work. (Note: rdfadict uses XPath for its implementation. Instead, I used an iterative approach to traverse XML documents).&lt;/p&gt;

&lt;p&gt;Basic parsing works; I also made it flexible enough for custom integration; I just need to spend time to write up the documentation and write up more test cases. I'll move forward with it as the RDFa spec develops and when I get feedback from anyone that uses this library.&lt;/p&gt;

&lt;p&gt;But for now, the code is hosted here: &lt;a href=&quot;http://code.google.com/p/ruby-rdfa/&quot;&gt;http://code.google.com/p/ruby-rdfa/&lt;/a&gt;.&lt;/p&gt;

</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/03/05/friday-nightthey-dine-in-hell</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/03/05/friday-nightthey-dine-in-hell/"/>
    <title>Friday Night...They Dine In Hell!</title>
    <updated>2007-03-05T00:00:00-08:00</updated>
    <author>
      <name>aaron</name>
    </author>
    <content type="html">&lt;p&gt;&lt;img src='http://badpopcorn.com.s3.amazonaws.com/images/2007-03-th-fcjg3000098.jpg' alt='th-fcjg3000098.jpg' /&gt;&lt;/p&gt;

&lt;p&gt;Anyone want to meet up to go see &lt;a href=&quot;http://300themovie.warnerbros.com/&quot;&gt;&quot;&lt;strong&gt;300&lt;/strong&gt;&quot; &lt;/a&gt;on Firday?&lt;/p&gt;

&lt;p&gt;That's really all I got&lt;/p&gt;

&lt;p&gt;I'm indescribably psyched for the movie.&lt;/p&gt;

&lt;p&gt;Ben, Corey...I can already see you smiling and nodding...through the internets I see it. (What the Fuck am I? Yoda?! Mmm through the internets I see it yeeesss Rock Ass it will!)&lt;/p&gt;

&lt;p&gt;I am thinking of seeing it in the O.C. of course...I would be willing to brave the spectrum for this but as I said I am super-excited.&lt;/p&gt;

&lt;p&gt;Who's in?&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/01/29/call-with-current-continuation</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/01/29/call-with-current-continuation/"/>
    <title>call-with-current-continuation</title>
    <updated>2007-01-29T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Closures get a lot of the press; so here's something that many everyday programmers don't know about.&lt;/p&gt;

&lt;p&gt;First off, definitions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A &lt;em&gt;Continuation&lt;/em&gt; is the computational state of a program (i.e. - function stack, not heap) saved into a data structure for later user.&lt;/li&gt;
	&lt;li&gt;A &lt;em&gt;higher order function&lt;/em&gt; is a function that takes another function as a parameter; or it is a function that returns a function as its output; or it is both.&lt;/li&gt;
	&lt;li&gt;A &lt;em&gt;non-local return&lt;/em&gt; is a way to immediately exit a function and transfer control to some point in function stack; similar to &lt;em&gt;goto&lt;/em&gt;, but not quite.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;call-with-current-continuation&lt;/strong&gt; is a Scheme higher order function that saves the current computational state, and then executes an &lt;em&gt;abortable procedure&lt;/em&gt; (a higher order function passed in as the call-with-current-continuation's sole parameter); the called abortable procedure, which has only one parameter, is given an &lt;em&gt;escape procedure&lt;/em&gt;; calling the escape procedure from within the abortable procedure will execute a non-local return back to its respective call-with-current-continuation; the return value of the call-with-current-continuation is either the natural return value of the abortable procedure or a single value passed to the escape procedure; and call-with-current-continuation is also known by its shorter alias: call/cc.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;scheme&quot;&gt;&lt;span class=&quot;c1&quot;&gt;; Define some procedure I want to escape from.&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;define &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;my_abortable_procedure&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;lambda &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;escape_procedure&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;; Do stuff&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;+ &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;;nonlocal return&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;escape_procedure&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&amp;#39;SOMEVALUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;display &lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;&amp;#39;NEVERREACHED_WHEN_ESCAPE_IS_CALLED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;

  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;display &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;call/cc &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;my_abortable_procedure&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;; displays: SOMEVALUE&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;; The return value of call/cc is the value either returned by my_abortable_procedure or&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;; the value passed to escape_procedure&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;



&lt;p&gt;Here's an &lt;a href=&quot;http://community.schemewiki.org/?call-with-current-continuation&quot;&gt;example&lt;/a&gt; I found showing how one can jump back into a function call instead of escaping it.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;scheme&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;define &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;#f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; 
  
 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;+ &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;call/cc &lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;lambda &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;cont&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; 
          &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;set! &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;cont&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; 
          &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt; 
&lt;span class=&quot;c1&quot;&gt;; The above returns 2&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;; The above returns 23&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;So what's it all good for? Well, examples of use include Exceptions (e.g. - catch, throw, raise, and rescue), Co-routines, Backtracking, and Cooperative Multitasking.&lt;/p&gt;

&lt;p&gt;&quot;But I don't use Scheme (or Lisp).&quot;&lt;/p&gt;

&lt;p&gt;Ruby has it too &lt;a href=&quot;http://www.rubygarden.org:3000/Ruby/page/show/Continuations&quot;&gt;[1]&lt;/a&gt; &lt;a href=&quot;http://www.ruby-doc.org/core/classes/Kernel.html#M005743&quot;&gt;[2]&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;[UPDATE:12JUNE2007] - I just watched the &lt;a href=&quot;http://http://www.iro.umontreal.ca/~boucherd/mslug/meetings/20041020/minutes-en.html&quot;&gt;The 90 Minute Scheme to C compiler&lt;/a&gt; talk given by Marc Feeley in 2004; part one takes an incredible 10 minute tangent into talking about call/cc (while talking about continuations in general). Definitely watch it for a great explanation.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/01/24/error-while-trying-to-run-project-unable-to-start-debugging-on-the-web-server</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/01/24/error-while-trying-to-run-project-unable-to-start-debugging-on-the-web-server/"/>
    <title>Error while trying to run project: unable to start debugging on the web server</title>
    <updated>2007-01-24T00:00:00-08:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;So im at work, you know working. I checkout a project I need to fix a bug in and make it the default web site in IIS.  I set a breakpoint and try to run the debugger.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Error &lt;span class=&quot;k&quot;&gt;while &lt;/span&gt;trying to run project: unable to start debugging on the web server
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The fix wasn't too hard but it was kind of annoying.  I have two versions of .Net installed on my work computer; 2.0 and 1.1.4blah.  The default website was set as 2.0 when the project is actually 1.1.4 project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do?&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Open up ISS and and right click on the website folder that host your site, in my case it was &quot;deafult website&quot;.&lt;/li&gt;
	&lt;li&gt;Choose the ASP.Net tab.&lt;/li&gt;
	&lt;li&gt;One of the options is ASP.NET version.  Change it to the correct version.&lt;/li&gt;
	&lt;li&gt;Hit OK&lt;/li&gt;
	&lt;li&gt;It should work now.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-01-aspnet.jpg&quot; title=&quot;Asp.net tab in ISS&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2007-01-aspnet.jpg&quot; alt=&quot;Asp.net tab in ISS&quot; width=&quot;130&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2007/01/17/this-not-that</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2007/01/17/this-not-that/"/>
    <title>This not That</title>
    <updated>2007-01-17T00:00:00-08:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Reflection is a task best practiced delicately. The bubble gum and duck tape that holds our lives together can be torn apart over a simple deliberation between dreams and reality. Thus, I took great precaution before sitting down and writing this, whatever &quot;this&quot; is.  I did't want this to turn into that. Or become one of those that are usually written by them. How I hate them and their ways. I wanted this to be one of these that are written by those who don't get along with them. How I hate them and their ways. So anyway, I enjoy reading quotes. With good timing and proper regurgitation I can appear intelligent through the expressions of those much smarter and original then I am.&lt;/p&gt;

&lt;blockquote&gt;
  The only true wisdom is in knowing you know nothing.

  &lt;br /&gt;-Socrates
&lt;/blockquote&gt;

&lt;p&gt;My life isn't a book but I wish it were. I wish I could put it down when it got boring or took a plot twist I didn't agree with.  I want my dad to write his memoirs but he keeps shooting the idea down. He feels it is a waste of time. &quot;I already know what happened, why waste the time I got left proving it to you.&quot; Although I don't agree with his logic I can't knock his style. It would be hilarious if a fifteen year old guy wrote an autobiography. It would be a 500 page book split into 20 chapters.  The first two chapters would cover toys, video games and ice cream.  The next eighteen would give detailed accounts of how to masturbate. Honestly, the youth these days are spoiled with streaming video.  I remember when an obvious faked picture of Kelly Kapowski, loading a little over a minute, would do the trick. Usually a guy could unload before the picture finished loading. Honestly, I can't remember if Kelly Kapowski had knees. But I can tell you that she is not a natural blonde.&lt;/p&gt;

&lt;p&gt;I'm sure you would find it pleasing if I stopped discussing masturbation. So, to please you and not me I will move on to another topic. This is random just as life is. More importantly, this is not that and was certainly not written by them.  Don't waste your time thinking about what you haven't done or telling stories of things you did a long time ago. Don't imitate. Don't let your life be a quote out of the social norm. Say something, break rules and piss someone off.&lt;/p&gt;

&lt;p&gt;Or continue to play with yourself from nine to five so you can fall asleep and wake up tired.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/12/04/ciao-bella</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/12/04/ciao-bella/"/>
    <title>Ciao, Bella</title>
    <updated>2006-12-04T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;My sister is off on vacation-- an outdoor-adventure trip somewhere in Central America. I must say that I am jealous of that trip because I want to do one, myself, one day. But while she's away, I am charged with doggy-sitting services for a super hyper-active cute friendly puppy beagle. Our BadPopcorn mascot, Bella:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-12-IMG_1529_med.jpg&quot; title=&quot;IMG_1529_med.jpg&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-12-IMG_1529_med.jpg&quot; alt=&quot;IMG_1529_med.jpg&quot; width=&quot;130&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;This dog is nuts. She stole my shoe and i chased her for a good 10 minutes to get it back. Hyper doesn't really describe her crazyness enough.&lt;/p&gt;
  &lt;p&gt;&lt;em&gt;Comment by moe&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/11/21/jones-my-favorite-soda</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/11/21/jones-my-favorite-soda/"/>
    <title>Jones, my favorite, soda</title>
    <updated>2006-11-21T00:00:00-08:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;I like Jones Soda, ok fine...I love Jones Soda. Why? Because their strawberry soda is freaking delicious. This holiday package might be freaking disgusting but I still want it!&lt;/p&gt;

&lt;blockquote&gt;After introducing the world to new soda flavors like fish taco and salmon, Seattle specialty beverage maker Jones Soda Co. is offering a new flavor: Green pea.Green pea, along with other unusual sodas such as turkey and gravy, dinner roll, sweet potato and antacid flavor, will be part of the company's $10 to $15 &quot;holiday pack&quot; of bottled drinks available nationwide.
&lt;br/&gt;
-some yahoo article&lt;/blockquote&gt;

&lt;p&gt;&lt;a title=&quot;2006_11_21t101218_450x279_us_sodas.jpg&quot; class=&quot;imagelink&quot; href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-11-jones_sodas.jpg&quot;&gt;&lt;img alt=&quot;2006_11_21t101218_450x279_us_sodas.jpg&quot; id=&quot;image874&quot; src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-11-jones_sodas.jpg&quot; width=&quot;130&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The company is even based off customer suggestions.  From the label on the front to even the name of the drink.  Since 1997 Jones Soda has been taking suggestions off their site and actually putting them to use.  I was wondering why they had a drink named &quot;Whoop Ass&quot;.  I love the fact that every label of the soda has some picture a random person sent in, or the name is a dumb name that a random person one day came up with, but best of all...they make really good drinks.  Sodas, Natural, Organic, even Energy drinks.&lt;/p&gt;

&lt;blockquote&gt;Jones Soda Co. founder and CEO Peter van Stolk has his own secret ingredient. It has created buzz, produced 30% yearly revenue growth in a flat beverage market, drawn major distribution partners such as Starbucks and Target, and brought in $30 million in annual revenue. That ingredient: you. Virtually everything about a Jones Soda, from labels to flavors, comes from customers. That's important because &quot;the reality is that consumers don't need our s -- -,&quot; van Stolk says unapologetically.
&lt;br/&gt;-FastCompany.com&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/11/13/openid-and-http-authentication-wish</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/11/13/openid-and-http-authentication-wish/"/>
    <title>OpenID and Http Authentication Wish</title>
    <updated>2006-11-13T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I wish for an HTTP authentication scheme that allows me to use my OpenID identifier and my OpenID identity provider.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/11/13/django-and-dreamhost-take-2</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/11/13/django-and-dreamhost-take-2/"/>
    <title>Django and Dreamhost, Take 2</title>
    <updated>2006-11-13T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;After &lt;a href=&quot;/blog/2006/10/29/python-eggs-and-dreamhost/&quot;&gt;installing my own custom Python build&lt;/a&gt;, I went back and tweaked how Django ran on my Dreamhost account. My &lt;a href=&quot;/blog/2005/11/30/django-is-rails/&quot;&gt;previous Django installation experience&lt;/a&gt; is still mostly valid. I just figured I could &quot;upgrade&quot; the installation to take advantage of Python 2.5 and eggs.&lt;/p&gt;

&lt;p&gt;I installed three eggs to get Django running&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# For Django&lt;/span&gt;
python ez_setup.py MySQL-python
python ez_setup.py http://www.saddi.com/software/flup/dist/flup-r2030.tar.gz
python ez_setup.py http://www.djangoproject.com/download/0.95/tarball/
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The first was mySQL support; second was for Django's built-in &lt;a href=&quot;http://www.djangoproject.com/documentation/fastcgi/&quot;&gt;fcgi support&lt;/a&gt;; and finally Django itself.&lt;/p&gt;

&lt;p&gt;I had a second goal in this upgrade. I wanted to partition off the &quot;/-/&quot; subtree (For example, http://example.com/-/admin/) for Django, instead of using the full subdomain. I had to make a couple of changes to the project's urls.py file (to handle the '-') and to the .htaccess file:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;&lt;span class=&quot;c&quot;&gt;# urls.py change example for the admin application.&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;r&amp;#39;^-/admin/&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;include&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;django.contrib.admin.urls&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The .htaccess file:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;apache&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;IfModule&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;mod_rewrite.c&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;RewriteEngine&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;On&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;RewriteBase&lt;/span&gt; /
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{REQUEST_FILENAME} !-f
&lt;span class=&quot;nb&quot;&gt;RewriteRule&lt;/span&gt; ^-$ /-/ [R]
&lt;span class=&quot;nb&quot;&gt;RewriteRule&lt;/span&gt; ^-/(.*)$ /_/mysite.fcgi/-/$1 [QSA,L]
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/IfModule&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;mod_rewrite.c&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;And finally, a new mysite.fcgi script found in the /_/ directory (notice that it's an underscore, not a dash):&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;&lt;span class=&quot;c&quot;&gt;#!/home/user/bin/python/bin/python&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;os&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Switch to the directory of your project. (Optional.)&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# os.chdir(&amp;quot;/home/user/myproject&amp;quot;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Set the DJANGO_SETTINGS_MODULE environment variable.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;environ&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;DJANGO_SETTINGS_MODULE&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;myproject.settings&amp;quot;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;django.core.servers.fastcgi&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;runfastcgi&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;runfastcgi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;method=threaded&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;daemonize=false&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/11/07/facebook-news-feed-ad</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/11/07/facebook-news-feed-ad/"/>
    <title>Facebook, News Feed Ad</title>
    <updated>2006-11-07T00:00:00-08:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;I read about this last week, but personally noticed it earlier today.  Facebook has thought up a clever advertising technique, imprints in news feeds. I say it's clever because you don't really notice it, but it could get kind of annoying with more ads. But I'm not going to bitch and complain, well not just yet. I got a couple questions.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Are the ads at random or are they relevant to my profile. Facebook tags everything in our profiles so technically they could shoe us relevant ads.  If I remember correctly, Facebook struck a deal with Microsoft on some kind of advertisement engine/module/other smart word here.&lt;/li&gt;
	&lt;li&gt;Are the ads going to show up on walls, profiles, groups as well or just news feeds?  If you anyone sees them someplace other then news feed do let me know.&lt;/li&gt;
	&lt;li&gt;Facebook is big on privacy, so are they going to give members privacy rights on seeing ads in their news feeds.&lt;/li&gt;
&lt;/ol&gt;

&lt;a title=&quot;fbNewsFeedAd.JPG&quot; href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-11-fbNewsFeedAd.jpg&quot;&gt;&lt;img alt=&quot;fbNewsFeedAd.JPG&quot; id=&quot;image866&quot; src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-11-fbNewsFeedAd.jpg&quot; width=&quot;130&quot; /&gt;&lt;/a&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/10/29/python-eggs-and-dreamhost</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/10/29/python-eggs-and-dreamhost/"/>
    <title>Python, Eggs and Dreamhost</title>
    <updated>2006-10-29T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Dreamhost, my web host, does not yet support Python2.5, and one can't install Python &lt;a href=&quot;http://peak.telecommunity.com/DevCenter/PythonEggs&quot;&gt;eggs&lt;/a&gt; into Dreamhost's own Python installations. The solution? I just installed a custom build of Python2.5 into my $HOME/opt directory. The following is the script I created to automate that process:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# Obtain Python2.5 and unpack&lt;/span&gt;
mkdir &lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/downloads/
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/downloads/
wget http://www.python.org/ftp/python/2.5/Python-2.5.tgz
tar -zxvf Python-2.5.tgz

&lt;span class=&quot;c&quot;&gt;# Creating the location under which python (and other apps) are to be installed.&lt;/span&gt;
mkdir &lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/opt

&lt;span class=&quot;c&quot;&gt;# Go into the Python2.5 directory, make &amp;amp;&amp;amp; make install the thing&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;Python-2.5
./configure --prefix&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/opt --enable-unicode&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;ucs4
make &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; make install

&lt;span class=&quot;c&quot;&gt;# Create a bin directory for Python, and link the bin to the real executable&lt;/span&gt;
mkdir -p &lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/bin/python/bin
ln -s &lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/opt/bin/python &lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/bin/python/bin/python
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;After the installation, I edited the bash_profile file to add the bin path:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/bin/python/bin:&lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/opt/bin:&lt;span class=&quot;nv&quot;&gt;$PATH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Now with a custom installation of Python, I can use eggs to manage my Django projects' library dependencies. :)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/10/23/retrevocom</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/10/23/retrevocom/"/>
    <title>retrevo.com</title>
    <updated>2006-10-23T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;A link that was brought up during a metting at work, its pretty cool. Check it out. Find the doc to your 2 year old camera that you still haven't figured out how to use...&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.retrevo.com/&quot;&gt;&lt;img src=&quot;http://www.retrevo.com/images/logo-250.gif&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/10/20/you-gotta-start-somewhere</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/10/20/you-gotta-start-somewhere/"/>
    <title>You Gotta Start Somewhere</title>
    <updated>2006-10-20T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;What's life like around BadPopcorn? Well, it's geeky to say the least. But &quot;normally odd, oddly normal&quot; feels like an apt description of us. And while writing is one way we communicate about our life, our work, and our thoughts, I don't always think it's the best way to relate. Another way? Well, let's try it with &lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-10-otb00001.mp3&quot;&gt;Our Talky-Bits: Episode 1&lt;/a&gt;-- Hey, you gotta start somewhere with this new audio-thingy-a-ma-bopper-medium.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/10/20/a-funny-thing-happened-to-me-on-the-way-to-post-the-podcast</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/10/20/a-funny-thing-happened-to-me-on-the-way-to-post-the-podcast/"/>
    <title>A funny thing happened to me on the way to post the Podcast</title>
    <updated>2006-10-20T00:00:00-07:00</updated>
    <author>
      <name>aaron</name>
    </author>
    <content type="html">&lt;p&gt;So, there's gonna be a podcast. Our podcasts are called &lt;strong&gt;Our Talky-Bits&lt;/strong&gt;...or at least they were called that when I was writing the post about them.&lt;/p&gt;

&lt;p&gt;Most of said post was written with Bennie looking over my shoulder...I'm not saying he was telling me to write the post diferent, but he was. Buttmunch made me take out the part where I acknowledge that we might simply lose interest.&lt;em&gt; Which is fair, because we have yet to abandon a project due to disinterest&lt;/em&gt;. (italics mean sarcasm:) ). &lt;strong&gt;Silver lining, I originally had a typo when I called him a buttmunch, and he fixed it.&lt;/strong&gt; Words fall short of describing the feeling that gives one, though &quot;/giggles&quot; comes close.&lt;/p&gt;

&lt;p&gt;Long story short, my post died, Bennie described it as Wishy-Washy and not self-confident. As with everything I enjoy, it was absolutely dripping with self deprication. Which is not, in and of itself, lacking in confidence. I was quite confident of the deleterius comments I had written, one could even say supremely confident.&lt;/p&gt;

&lt;p&gt;So, yeah. The &lt;strong&gt;OTB&lt;/strong&gt; is either currently up, or going up soon. It is short, and at least moderately comical, like my Man Parts ( No way in Hell I'm letting that line die, Ben). I assure you, gentle reader, that short does not mean un-funny, Shakespeare once said &quot;Brevity is the soul of wit&quot; at about one minute our wit has soul...and is Super-Bad.&lt;/p&gt;

&lt;p&gt;&lt;img title=&quot;Don't Call it A Podcast!&quot; alt=&quot;Don't Call it A Podcast!&quot; src=&quot;http://images.google.com/images?q=tbn:FT1GUF_HzATDrM:http://countrylegends971.com/images/rodeo2003/ll-cool-j(1).jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That was vengence against Benny for killing my LL Cool J reference in the original post...he&lt;/strong&gt;&lt;strong&gt; just don't know 'cuz he not from 'da streets. &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Both this post, and the deleted post that inspired it were written on a Devil Machine which was apparently named for the archfiend that first envisioned it the Dark Lord Mc Intosh. Trust me no fouler beast has ever been borne, I mean the machine, not the demon. Demons get a bad rap, they can all &lt;strong&gt;Cut and Paste with the proper button combinations&lt;/strong&gt;, you know the ones.&lt;/p&gt;

&lt;p&gt;So...The point? Listen to &lt;strong&gt;OTB Webisode one: You Gotta Start Somewhere&lt;/strong&gt;. As long as we don't get Deth Threats there will be more to follow...maybe with midgets, and a dash of Cayenne.&lt;/p&gt;

&lt;p&gt;Just one last thing.&lt;/p&gt;

&lt;p&gt;You Down with OTB?!&lt;/p&gt;

&lt;p&gt;-Aaron &quot;Yeah You Know Me&quot; Adams&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/10/12/keypress-autocomplete-in-firefox</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/10/12/keypress-autocomplete-in-firefox/"/>
    <title>Keypress &amp; AutoComplete in Firefox</title>
    <updated>2006-10-12T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;If you have a javascript console open while using the firefox browser you'll notice this error from time to time.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Error: &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Exception... &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;#39;Permission denied to get property XULElement...&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;It doesn't cause any problems with the site other then the error popping up and guess what...it works fine in IE. Why? So i searched around and I think it might be an autocomplete/keypress bug in firefox. Just add the attribute &quot;autocomplete=off&quot; to any input that you catch keypress event on.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;input&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;autocomplete=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;off&amp;quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;BadPopcornIsBetterThenYou&amp;quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The only reason I fixed the error was because I really like using the JavaScirpt Console in firefox. It is quite annoying when this error pops up every keypress...so like a million times. So yea, fyi for you.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/10/11/i-guess-its-not-that-bad</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/10/11/i-guess-its-not-that-bad/"/>
    <title>I guess it's not that bad</title>
    <updated>2006-10-11T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Over the years, I had developed an absolute hatred in my heart when it came to Javascript and DOM programming. No one big specific reason, just all the little annoyances: browser incompatibilities, debugging sucked (was tedious), never found any javascript library helpful or easy to use (this includes prototype, MochiKit, and Dojo), etc. Let's just say that I would have rather gotten teeth pulled using rusty pliers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But&lt;/strong&gt; I've come to rethink my position... I can now stand, even &lt;em&gt;enjoy&lt;/em&gt;, Javascript programming. Wow, what could have possibly happened to me (a once huge Javascript hater) to actually like it now? I give you the three reasons why:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;I started to work the Javascript language as it were actually &lt;a href=&quot;http://en.wikipedia.org/wiki/Scheme_programming_language&quot;&gt;Scheme&lt;/a&gt; (or similar functional language), closures and all.&lt;/li&gt;
	&lt;li&gt;I found the &lt;a href=&quot;https://addons.mozilla.org/firefox/1843/&quot;&gt;Firebug&lt;/a&gt; debugging plugin for Firefox. I will never have to use an alert() call ever again :).&lt;/li&gt;
	&lt;li&gt;And the &lt;strong&gt;biggest reason&lt;/strong&gt; why I changed my mind: I found &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt;. This libary removed all the little pains I listed above, and released me in a way that I could focus on doing #1 above.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Take those three, and mix it up with with a &lt;a href=&quot;http://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt; powered backend... I am thoroughly confident that Javascript does not suck.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/10/04/fbbook</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/10/04/fbbook/"/>
    <title>FBbook</title>
    <updated>2006-10-04T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;I just finished reading &lt;a href=&quot;http://www.fbbook.com&quot;&gt;FBbook&lt;/a&gt; by Karel M Baloun and loved it.  You can buy and download it off his site for only ten dollars.  It is well worth ten dollars and kudos for Baloun for keeping it cheap. By the contents Im confident he could have sold it for more.&lt;/p&gt;

&lt;blockquote&gt;
As an early engineer, I reveal the inside of Facebook's explosive growth as it became the premiere online environment for US college students. Including, how and by whom products were made, how you can use them best, views on what makes social networks valuable, and where this industry trends are headed. You too can achieve startup success, and attain any dream; I will lead and inspire you towards your greatest potential.
&lt;/blockquote&gt;

&lt;p&gt;He takes you from Nan and Curry to the people and personalities behind facebook. If you are young and ambitious then its a must read. Seriously...ten dollars and you have a better prespective on the whole web 2.0 social networking buzz word that is taking over the world. Let me know what you think of it.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/09/26/fbquick-build-3</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/09/26/fbquick-build-3/"/>
    <title>fbQuick Build 3</title>
    <updated>2006-09-26T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;We just put up Build 3 of &lt;a href=&quot;http://www.fbquick.com/&quot;&gt;fbQuick&lt;/a&gt;-- the best Facebook Notifier application-- on our website.&lt;/p&gt;

&lt;p&gt;It has a new feature that gives you the ability to startup in offline-mode; and to go into offline-mode when we detect two consecutive failures in connecting to Facebook's web interface. fbQuick will stay in offline-mode until you decide to connect (double-click the tray icon, or right-click menu option) back to Facebook, all very straight forward and simple.&lt;/p&gt;

&lt;p&gt;This release also fixes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Bug in comparing old wall counts with new wall counts.&lt;/li&gt;
	&lt;li&gt;Better error messages.&lt;/li&gt;
	&lt;li&gt;Misc internal code cleanup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;New release at &lt;a href=&quot;http://www.fbquick.com/&quot;&gt;fbQuick.com&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/09/26/collaborative-tagging</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/09/26/collaborative-tagging/"/>
    <title>Collaborative Tagging</title>
    <updated>2006-09-26T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;delicious, flickr and just about everyone is into collaborative tagging.  I personally think it is a great way for a site to stay current with new trends.  I found this paper on collabarative tagging that is worth a read.&lt;/p&gt;

&lt;p&gt;There is a problem. Users will often &quot;tag&quot; incorrectly. I'll write up a better post on this later, but thought I would throw up the link for anyone that wants to read it.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.hpl.hp.com/research/idl/papers/tags/tags.pdf&quot;&gt;http://www.hpl.hp.com/research/idl/papers/tags/tags.pdf&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/09/25/badly-mirrored-fbquick-fixed</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/09/25/badly-mirrored-fbquick-fixed/"/>
    <title>Badly Mirrored fbQuick, Fixed!</title>
    <updated>2006-09-25T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Arg! You would think Google would do uploads correctly, but it turns out that we would sometimes get a bad download from the Google Page Creator hosted file. And that's what happened with the exe downloads from this weekend!&lt;/p&gt;

&lt;p&gt;So people that downloaded fbQuick from sometime last weekend until this morning had an installer that would fail. I fixed all that now, so please &lt;a href=&quot;http://fbquick.com/&quot;&gt;redownload&lt;/a&gt; if it was you. Sorry about that. :(  Correct MD5 for the current version i 233fa9acd3aa3c6adbe51e0ea30b2e5d.&lt;/p&gt;

&lt;p&gt;(If you want to verify the md5 sum, then try one of these windows utilities: &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.fourmilab.ch/md5/&quot;&gt;http://www.fourmilab.ch/md5/&lt;/a&gt; (Command line)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.pc-tools.net/win32/md5sums/&quot;&gt;http://www.pc-tools.net/win32/md5sums/&lt;/a&gt; (Command line)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.md5summer.org/&quot;&gt;http://www.md5summer.org/&lt;/a&gt; (Windows GUI)
&lt;/p&gt;

&lt;p&gt;Thank you to the person that reported this issue. :)&lt;/p&gt;

&lt;p&gt;I think the logs say that there were 100 downloads this weekend, and I completely appologize to every one that was affected.&lt;/p&gt;

&lt;p&gt;-Ben&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/09/22/lifehacker-writes-about-fbquick</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/09/22/lifehacker-writes-about-fbquick/"/>
    <title>LifeHacker Writes About fbQuick</title>
    <updated>2006-09-22T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Woo hoo, our &lt;a href=&quot;http://www.fbquick.com/&quot;&gt;fbQuick Facebook Notifier&lt;/a&gt; application got &lt;a href=&quot;http://www.lifehacker.com/software/facebook/download-of-the-day-fbquick-windows-202645.php&quot;&gt;linked to&lt;/a&gt; by Lifehacker.&lt;/p&gt;

&lt;p&gt;So funny story... I read a Lifehacker article about Facebook extensions earlier this week, but these extensions were only Greasemonkey scripts... Not really usable unless you run Firefox and Greasemonkey.&lt;/p&gt;

&lt;p&gt;So I shot the Lifehacker editors an email about fbQuick (seeing as we just made it available to the public). And wow, I got a response today; and that they would be writing about fbQuick. Cool, I jumped over to LifeHacker.com and I saw the post!&lt;/p&gt;

&lt;p&gt;Then I went straight to the fbQuick website, and it was down! &lt;strong&gt;Oh crap&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;I started with the assumption that the linking brought in way more traffic than the host could handle. And I spent good deal of time trying to get get stuff into place to distribute the load to other mirrors. All with no luck. Both excitement and panic coursed through my veins.&lt;/p&gt;

&lt;p&gt;But about two hours after I encountered all this, the site seems to be back up and running... I'm still trying to track down why it's suddenly back up. So was the site really getting that much traffic, or was there something else in play? I know Dreamhost has been having issues of late, and they supposedly just resolved them recently... I have to do a bit more digging-- in the server logs-- to figure this out. But either way, the linking is very cool.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/09/21/atom-categories-its-potential</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/09/21/atom-categories-its-potential/"/>
    <title>Atom Categories, Its Potential</title>
    <updated>2006-09-21T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;&lt;em&gt;Categories&lt;/em&gt; were added to introspection documents in the &lt;a href=&quot;http://bitworking.org/projects/atom/draft-ietf-atompub-protocol-10.html&quot;&gt;Atom Publishing Protocol (Draft 10)&lt;/a&gt;. And I think this is way cool! But wait, the &lt;a href=&quot;http://www.ietf.org/rfc/rfc4287&quot;&gt;Atom Syntax&lt;/a&gt; already has categories, and bloggers already can tag (categorize) their posts with words such as &lt;em&gt;joke&lt;/em&gt; or &lt;em&gt;serious&lt;/em&gt;. This addition only looks like it's a way for bloggers to better organize their feeds... so what?&lt;/p&gt;

&lt;p&gt;Well, think about problem domains outside of blogging; let me just describe this new addition's potential with an example.&lt;/p&gt;

&lt;p&gt;Let's say I have an APP service for a genealogical database, called &lt;em&gt;PeopleSeeds&lt;/em&gt;. And PeopleSeeds outputs Atom Feeds with machine readable genealogical data in the entries' &lt;em&gt;atom:content&lt;/em&gt;. PeopleSeeds will also accept Atom entries containing the same genealogical markup for new or existing resources (Member URIs). Side note: what PeopleSeeds does afterwards with the data is up to the service-- it could do data mining, or related searching in Google for additional information.&lt;/p&gt;

&lt;p&gt;But the point is that PeopleSeeds can now advertise itself in introspection documents as a Genealogical Service conforming to XYZ rules; and, now, PeopleSeeds MAY formally reject entries that are not categorized as Genealogical Data-- it is implied that certain semantic rules (pieces of XML data in atom:content) are required for entries to be categorized as such. PeopleSeeds wants genealogical data, not a blog entry.&lt;/p&gt;

&lt;p&gt;This is a big helping hand for the world of loosely coupled auto discovered services. Various clients can now differentiate between genealogical services and blogs. One benefit could be in rich client GUIs, who can now provide customized experiences for its end users: writing blog entries, or adding ancestor data. Or it can search and use equivalent services as backup providers, or whatever.&lt;/p&gt;

&lt;p&gt;All this because end clients can now perform auto discovery in a uniform manner, vs haphazardly inspecting a service's feed data (or using different service discovery mechanisms) which may not reliably describe a service's capabilities.&lt;/p&gt;

&lt;p&gt;I say, &quot;Wow&quot;.&lt;/p&gt;

&lt;p&gt;Now the Atom Publishing Protocol really is &lt;strong&gt;the&lt;/strong&gt; platform for a world of loosely coupled services, not just blogs. Woot.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/09/19/python-conditional-expressions</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/09/19/python-conditional-expressions/"/>
    <title>Python Conditional Expressions</title>
    <updated>2006-09-19T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Python had lacked a C equivalent of the &quot;&lt;em&gt;condition ? true_value : false_value&lt;/em&gt;&quot; expression. So we used a work around until now... conditional expressions finally made it in to Python's 2.5 release.&lt;/p&gt;

&lt;p&gt;In Python2.4:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;condition&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;true_value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;false_value&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;In Python2.5:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;true_value&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;condition&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;false_value&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Yeah, the statement looks better in Python2.5.&lt;/p&gt;

</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/09/17/keep-updated-with-facebook-using-fbquick</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/09/17/keep-updated-with-facebook-using-fbquick/"/>
    <title>Keep Updated with Facebook using fbQuick</title>
    <updated>2006-09-17T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Moe came up with the &lt;a href=&quot;http://www.fbquick.com/&quot;&gt;fbQuick&lt;/a&gt; idea while I was still in Europe, a &lt;a href=&quot;http://www.facebook.com/&quot;&gt;Facebook&lt;/a&gt; Notifier...&lt;/p&gt;

&lt;p&gt;&quot;A what?&quot;, I asked.&lt;/p&gt;

&lt;p&gt;&quot;&lt;em&gt;Like the &lt;a href=&quot;http://mail.google.com/mail/help/notifier/notifier_windows.html&quot;&gt;GMail notifier&lt;/a&gt;, but for Facebook.&lt;/em&gt;&quot;&lt;/p&gt;

&lt;p&gt;&quot;I'm still not following.&quot;&lt;/p&gt;

&lt;p&gt;&quot;&lt;em&gt;You know Facebook? It's like &lt;a href=&quot;http://www.myspace.com/&quot;&gt;MySpace&lt;/a&gt;, but for colleges... It's gonna be a little application that sits in your desktop's system tray-- like AIM, or Skype-- and regularly checks Facebook for new messages, wall posts, comments, and stuff! When you get a new message, a little alert is displayed in the bottom corner of your screen.&lt;/em&gt;&quot;&lt;/p&gt;

&lt;p&gt;&quot;And stuff? You sound excited.&quot;&lt;/p&gt;

&lt;p&gt;&quot;&lt;em&gt;Dude, it's gonna be tight!&lt;/em&gt;&quot;&lt;/p&gt;

&lt;p&gt;&quot;Ok, let's do it.&quot;&lt;/p&gt;

&lt;p&gt;Sure enough Moe came over the morning after I returned from Europe. A few weeks worth of work with Corey, and we now have its public launch at:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.fbquick.com/&quot;&gt;http://www.fbQuick.com/&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/09/16/ipod-updates</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/09/16/ipod-updates/"/>
    <title>iPod Updates</title>
    <updated>2006-09-16T00:00:00-07:00</updated>
    <author>
      <name>corey</name>
    </author>
    <content type="html">&lt;p&gt;With the iPod software version 1.2, I can finally set the brightness of the backlight on my iPod.  This feature was the first, ok third, thing that I tried to change after I got my ten months ago.  I have always felt that the backlight was just too bright even in various lighting conditions.  This week when I updated and found this feature it was very exciting.&lt;/p&gt;

&lt;p&gt;There were two other updates that I found and made use of straight away.  First you can change the max volume output very nice for those concerned about their hearing (like me) and now when it is plugged into my computer the backlight is on (very dimly) so it is now easier to see if it has finished charging.&lt;/p&gt;

&lt;p&gt;It is pretty neat how these small changes have enhanced my overall iPod experience.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/09/05/a-new-way-to-look-at-networking</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/09/05/a-new-way-to-look-at-networking/"/>
    <title>A New Way to look at Networking</title>
    <updated>2006-09-05T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Van Jacobson has, in his &lt;a href=&quot;http://video.google.com/videoplay?docid=-6972678839686672840&quot;&gt;Google TechTalk&lt;/a&gt;, many good quotes... my two favorite:&lt;/p&gt;

&lt;blockquote&gt;&quot;Data's got a name, not a location.&quot; -- Van Jacobson&lt;/blockquote&gt;

&lt;blockquote&gt;&quot;Data doesn't live anywhere; where ever it is, it's great.&quot; -- Van Jacobson&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/08/30/firefly-and-serenity-documentary</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/08/30/firefly-and-serenity-documentary/"/>
    <title>Firefly and Serenity Documentary</title>
    <updated>2006-08-30T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.donetheimpossible.com/&quot;&gt;&lt;em&gt;Done the Impossible&lt;/em&gt;&lt;/a&gt; is the title of a documentary about how my favorite canceled show (Firefly) turned into a movie... Free download!&lt;/p&gt;

&lt;p&gt;BitTorrent Link: &lt;a href=&quot;http://www.legaltorrents.com/bit/done-the-impossible.torrent&quot;&gt;http://www.legaltorrents.com/bit/done-the-impossible.torrent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-08-donetheimpossible.jpg&quot; alt=&quot;donetheimpossible.jpg&quot; /&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/08/29/rest-quote-of-the-day</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/08/29/rest-quote-of-the-day/"/>
    <title>REST Quote of the Day</title>
    <updated>2006-08-29T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;A great &lt;a href=&quot;http://www.infoq.com/articles/mark-baker-REST&quot;&gt;quote&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;Web services build upon HTTP, but they don't build upon the Web. The Web uses HTTP as an application contract which enables the loosely coupled exchange of documents between applications, while Web services uses HTTP as a bit pipe - as a transport protocol. --Mark Baker&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/08/24/ben-returns-soon</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/08/24/ben-returns-soon/"/>
    <title>Ben Returns Soon</title>
    <updated>2006-08-24T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I have previously stated that I will return to Los Angeles on September 4th, 2006.&lt;/p&gt;

&lt;p&gt;That date has changed, I fly into &lt;strong&gt;LAX on August 28th, 2006&lt;/strong&gt;. Just a few days left before my European Adventure 2006 has ended... I have already started planning for my next trip. :)&lt;/p&gt;

&lt;p&gt;But, for now, I look forward to seeing all my friends and family in California soon.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/08/16/facebook-developer-api-the-suck</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/08/16/facebook-developer-api-the-suck/"/>
    <title>Facebook Developer API, the suck.</title>
    <updated>2006-08-16T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Moe just pointed me to &lt;a href=&quot;http://developers.facebook.com/&quot;&gt;Facebook's Developer API&lt;/a&gt;. Facebook claims that its HTTP based API is RESTful... but the use of XML and HTTP (and avoidance of SOAP) does not make an API RESTful. (I sigh and laugh).&lt;/p&gt;

&lt;p&gt;Whatever developer team designed the Facebook Developer REST API needs to go back and reread &lt;a href=&quot;http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm&quot;&gt;Roy Fielding's dissertation&lt;/a&gt; and W3C's &lt;a href=&quot;http://www.w3.org/TR/webarch/&quot;&gt;WebArch Document&lt;/a&gt;; they even should reread the documents they reference in their own FAQ:&lt;/p&gt;

&lt;blockquote&gt;What is REST?&lt;br/&gt;
REST stands for Representational State Transfer. The Facebook API currently supports a REST based protocol; to learn more refer to &lt;a href=&quot;http://en.wikipedia.org/wiki/Representational_State_Transfer&quot;&gt;Wikipedia's definition&lt;/a&gt;.&lt;/blockquote&gt;

&lt;p&gt;My Counter-claim, &lt;strong&gt;Facebook created an RPC server instead of a REST API&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fact&lt;/strong&gt;: All Facebook requests go to a single URL: http://api.facebook.com/restserver.php (except for login.php).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comment&lt;/strong&gt;: REST is about exposing Resources in a uniform syntax, on the web we have URIs. Meaning, we have URIs for each resource (many URIs), and can be seen with the example on the REST Wikipedia entry:&lt;/p&gt;

&lt;blockquote&gt;With REST, on the other hand, the emphasis is on the diversity of resources, or nouns; for example, a REST application might define the following resources&lt;br/&gt;

http://example.com/users/&lt;br/&gt;
http://example.com/users/{user} (one for each user)&lt;br/&gt;
http://example.com/findUserForm&lt;br/&gt;
http://example.com/locations/&lt;br/&gt;
http://example.com/locations/{location} (one for each location)&lt;br/&gt;
http://example.com/findLocationForm&lt;br/&gt;
&lt;/blockquote&gt;

&lt;p&gt;Working off a single URI breaks the universal syntax and resource ideas, and Facebook commits this sin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fact&lt;/strong&gt;: All Facebook actions are method based, method names are sent along to the single URI as POST parameters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comment&lt;/strong&gt;: If one implements REST via HTTP/XML, then GET/POST/PUT/DELETE are the verbs one uses on given URI represented Resources. Sending method names in the request body is RPC.&lt;/p&gt;

&lt;p&gt;That's it, that's all that is needed to critique the unRESTfulness of Facebook's REST API. Even Wikipedia's own REST entry, itself, states that &lt;em&gt;Facebook's REST API&lt;/em&gt; &lt;strong&gt;is not-REST&lt;/strong&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/08/15/india-and-pakistan</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/08/15/india-and-pakistan/"/>
    <title>India and Pakistan</title>
    <updated>2006-08-15T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;For those who wonder why Pakistan and India celebrate their independence on different days.&lt;/p&gt;

&lt;blockquote&gt;Two self-governing dominions within the British Commonwealth legally came into existence at the stroke of midnight on August 15, 1947. The ceremonies for the transfer of power were held a day earlier in Karachi, at the time the capital of the new state of Pakistan, to allow the last British Viceroy, Louis Mountbatten, to attend both the ceremony in Karachi and the ceremony in Delhi. Pakistan celebrates its Independence Day on August 14, while India celebrates it on August 15.-wikipedia&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/08/10/soap</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/08/10/soap/"/>
    <title>SOAP</title>
    <updated>2006-08-10T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Have you ever watched a movie that is so bad it is good?  The serious films that have such bad acting and story line that you can't help laughing.  Think of any scene in a Jean Calude Van Damme movie where he is not fighting.  This also works with Governor of California, Steven Segal, and Schindler's list.  Well Snakes On A Plane is going to be that good by being that bad.  I personally am quite excited that the movie comes out in less then two weeks.  I want to show up to the theaters hours early, wearing a t-shirt of Samuel L Jackson fighting a snake.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&quot;Yes hello I would like to buy a ticket for the first showing of SOAP&quot;&lt;/p&gt;
&lt;p&gt;&quot;SOAP?&quot;&lt;/p&gt;
&lt;p&gt;&quot;Um mm Snakes On A Plane, wow I can't believe you work here&quot;&lt;/p&gt;
&lt;p&gt;&quot;Wait, so you are saying SOAP like people say LOTR? First of all, you said the word soap and expected me to know.&quot;&lt;/p&gt;
&lt;p&gt;&quot;Why did you use the phrase 'first of all' when there wasn't a second?&lt;/p&gt;
&lt;p&gt;&quot;Just take your tickets&quot;&lt;/p&gt;
&lt;p&gt;&quot;Thank you. Where is the line?&quot;&lt;/p&gt;
&lt;p&gt;&quot;What line?&quot;&lt;/p&gt;
&lt;p&gt;&quot;for SOAP&quot;&lt;/p&gt;
&lt;p&gt;&quot;There isn't a line.&quot;&lt;/p&gt;
&lt;p&gt;&quot;Am I to understand that I will be beginning the line?&quot;&lt;/p&gt;
&lt;p&gt;&quot;No, you are to understand that there is not a line&quot;&lt;/p&gt;
&lt;p&gt;&quot;Where...is....the....fucking....line. I know what you are doing. You don't want me to see this movie or get bad seats because all the other fans. You bitch. Fine, you know what. I am going to go get a snake and throw it in that booth....then we'll see if you respect Sam the Man in SOAP&quot;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sorry I got a bit carried away with that. Yea, so the movie is going to be great.  At some point of the movie Samuel Jackson says, &quot;I'm tired of these fucking snakes on this fucking plane.&quot;  Please visit the official website for snakes on a plane at, snakesonaplane.com.  Yes, I couldn't believe that the URL was available either. It gets better.  There is actually a music video for SOAP.  Let me give you some of the lyrics.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Snakes on a Plane (BRING IT)&lt;/p&gt;
&lt;pre&gt;Times are strange
We got a free upgrade for
snakes on a plane.
Fuck em, I don't care.
Bought the cheap champagne,
we're going down in flames, hey.

Oh, I'm ready for it
Come on, bring it.
Oh, I'm ready for it
Come on, bring it.
Oh, I'm ready for it
Come on, bring it.
Oh, I'm ready for it
Come on, bring it.&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;Watching this movie will be the turning point of your life. Until now you were living, waiting for the moment that defines you. You did not expect it to be Samuel L Jackson on a plane with a bunch of snakes, but then again you didn't expect the new Star Wars movies to suck either..yes i said it!  This movie will be the pinnacle, paramount experience of your life.  We as a society need to get our priorities straight. Who cares that over 1000 civilians have died in Lebanon, the seemingly unending war in the Ivory coast...oh wait Americans don't care...  Ok....um how about. Instead of watching the &quot;the hills&quot; we go watch SOAP.  I heard that chick broke up with that Jason dude...fucking crazy.&lt;/p&gt;

&lt;p style=&quot;margin-bottom: 0in; font-style: normal&quot;&gt;&lt;img width=&quot;338&quot; height=&quot;252&quot; alt=&quot;Snakes on a Plane&quot; id=&quot;image678&quot; src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-08-snakesOnAplane.jpg&quot; /&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/07/31/what-has-ben-been-doing</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/07/31/what-has-ben-been-doing/"/>
    <title>What has Ben been doing?</title>
    <updated>2006-07-31T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Ben has been relatively quiet on BadPopcorn. So what have I been doing? Well, I have been writing news updates for the Eisenstadt CouchSurfing Collective... For those that have sent me emails, the following links (with LOTS of PICTURES) should shed some light on a week of travel:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/23/introducing-the-eisenstadt-collective/&quot;&gt;My first day at the Collective.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/23/a-collective-dinner/&quot;&gt;A Paella Cookout.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/24/violin-concert/&quot;&gt;Violin Concert.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/25/collective-experiments/&quot;&gt;Sunday in Eisenstadt.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/25/more-dinner-pictures-sunday/&quot;&gt;Going to Dinner.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/26/fully-productive/&quot;&gt;Some work, Some play.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/26/jamming-at-the-collective/&quot;&gt;Watching people play music.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/27/work-and-play-coordinated-chaos/&quot;&gt;Another day, another party.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/28/finalizing-work/&quot;&gt;People finishing their work.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/29/eisenstadt-moved-to-wien/&quot;&gt;We finished in Eisenstadt and moved to Vienna&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.couchsurfing-phoenix.com/blog/2006/07/30/danube-island-picnic/&quot;&gt;Final gathering for a picnic in Vienna's Danube Island.&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/07/31/e3-the-circus-that-no-one-knows-we-need</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/07/31/e3-the-circus-that-no-one-knows-we-need/"/>
    <title>E3 - The Circus That No-one Knows We Need</title>
    <updated>2006-07-31T00:00:00-07:00</updated>
    <author>
      <name>aaron</name>
    </author>
    <content type="html">&lt;p&gt;E 3 the &lt;a title=&quot;We have lost so much&quot; href=&quot;http://www.e3insider.com/portal/&quot;&gt;Electronic Entertainment Expo&lt;/a&gt;, the yearly video game expo is now officially &lt;a href=&quot;http://www.theesa.com/archives/2006/07/for_immediate_r.php&quot;&gt;all but dead&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I am not very good at telling stories, well not at making them interesting anyway, so I'll point you to &lt;a title=&quot;Where does this text go?&quot; href=&quot;http://www.kotaku.com/gaming/e3/&quot;&gt;Kotaku&lt;/a&gt; and &lt;a title=&quot;Wit, Wisdom, and Wang&quot; href=&quot;http://badpopcorn.com/wp-admin/www.penny-arcade.com&quot;&gt;Penny Arcade&lt;/a&gt; for the backstory...please return for my commentary when you are caught up on the events.&lt;/p&gt;

&lt;p&gt;I work in the video game industry and believe me when I tell you that working E3 is, more often than not, Hell. Not only is working the show like russian roulette without the courtesty of a reward, but preparations for the show are at least two months of planning meetings and blueprints and telecons &lt;strong&gt;and everything else that people got into the game industry to get away from. &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In addition let me assure you that everything you have heard about the costs of having a booth at E3 is wrong. It is more expensive than you have heard, I have an aquaintance who's first responsibility in the game industry was to handle aÂ Multi-million dollar check for simply the insurance for the booth at the show. And yes, game companies do give up on accomplishing &lt;strong&gt;anything&lt;/strong&gt; productive during theÂ days surrounding E3. So including the time lost to the show, and all of the time used preparing for the show, then the cost of the booth and attendants it is common for regular publishers to be putting in the neighborhood of 20 Million into their E3 showing. That's just 3 days.&lt;/p&gt;

&lt;p&gt;Here's the rub...I say it's worth it.&lt;/p&gt;

&lt;p&gt;Most of us in the industry look at E3 as a circus, it is craziness and chaos and other non-comforting &quot;C&quot;-words.&lt;/p&gt;

&lt;p&gt;E3 is also the only time of the year that the main-stream media looks at our industry/hobby and has something positive to say. Every year when E3 comes around the &quot;Real&quot; media turns it's all powerful eye on the indusrty we all give our time to, and they say how important and powerful the industry is...they will occasionally imply that games are &quot;cool&quot;.&lt;/p&gt;

&lt;p&gt;Without E3 the only time the evening news mentions video games is to tell you about how the most recent youth-related killing is tenuously connected to gaming.&lt;/p&gt;

&lt;p&gt;For three days a year games are cool and influential...I don't think any price is too high for that return. And I fear that once we've lost it, it will be too late to get it back.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/07/17/tunnel-to-gmail</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/07/17/tunnel-to-gmail/"/>
    <title>Tunnel to Gmail</title>
    <updated>2006-07-17T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I am in &lt;a href=&quot;http://en.wikipedia.org/wiki/Venice&quot;&gt;Venezia, Italia&lt;/a&gt; and my host has graciously let me use her computer to check email. There's only one problem... Google's services (email, reader, hosted, analytics, etc) have been unavailable to me for the past five hours. There's a problem upstream, somewhere, that prevents me from getting to GMail. A friend, in the Bay Area, tells me-- over IM chat-- that he has perfect access to GMail. All this tells me that it's just a regional access thing.&lt;/p&gt;

&lt;p&gt;Anyways, I really needed to check my email and couldn't wait for the problem to get resolved. So I just worked up a quick hack.&lt;/p&gt;

&lt;p&gt;First, I edited the laptop's hosts file (c:/windows/system32/drivers/etc/hosts) to add the following lines:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;127.0.0.1 google.com
127.0.0.1 www.google.com
127.0.0.1 mail.google.com
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Second, I launched the signed-jar copy of &lt;a href=&quot;http://www.appgate.com/products/80_MindTerm/&quot;&gt;Mindterm&lt;/a&gt; that I have sitting on my website; I logged in to my dreamhost shell account (in the States) and set up a couple of ssh tunnels that redirected web traffic from the local loopback address to google.com:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;127.0.0.1 port 80 -&amp;gt; google.com port 80
127.0.0.1 port 443 -&amp;gt; google.com port 443
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Finally, launched IE (she doesn't have Firefox installed) for immediate access to GMail. :)&lt;/p&gt;

&lt;p&gt;What did that really do?&lt;/p&gt;

&lt;p&gt;Normal Case: IE talks directly to GMail. IE -&gt; GMail.&lt;/p&gt;

&lt;p&gt;But the Normal Case is broken.&lt;/p&gt;

&lt;p&gt;My Workaround: IE talks to GMail through a third party. IE -&gt; Dreamhost Server -&gt; GMail.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/07/17/inaction</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/07/17/inaction/"/>
    <title>Inaction</title>
    <updated>2006-07-17T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Many people feel that inaction is worse then failure. I think most people don't realize just how bad or even what inaction is all together. Inaction isn't simply the lack or absence of action, but the false impression that one is &lt;em&gt;choosing &lt;/em&gt;not to make a choice. Let's clear something up right away. You always make a choice.  You either choose to act in a situation or let enough time pass by where you can no longer act, but either way you do make a choice to do one or the other. So really the word has little if any real meaning. You either act in one way or you act in a different way, but you act. There is an &quot;act of thinking&quot;, which by far is the easiest of all tasks. Thinking doesn't mean figuring something out either. It just means to look at something and say, &quot;what the fuck.&quot; if you are in a tight spot, remember that you are making a choice.  I guarantee you choose to use the act of thinking for a while and said something along the line of &quot;what the fuck.&quot; Basically, you still made a choice and you acted upon it.&lt;/p&gt;

&lt;p&gt;So why are most people under a false impression? I thought about this for a while and came up with guilt. Yes guilt. When you convince yourself you are powerless in the outcome of a situation, you in turn rid yourself the burden of consequences or at least the guilt of those who have to face them. The fact is, life is just a choice. You choose to do something or you don't.  If you want to get in shape then you either choose to go to the gym or you don't.  If you want to know more about a topic you either choose to pick up a book or you don't.  You would think that a person who lives in the United States would be the last to use excuses, but it is the exact opposite.  We are a nation of fat, stupid. ignorant, dumb asses who have had every advantage known to man.  But it would be too much of a burden to realize the truth, so what do we do?  We pretend like it is not our fault.  We point the finger at fast food chains, tobacco companies, public eduction and etc. Stop being a fucking dumb ass. Read a book and then go run a mile.&lt;/p&gt;

&lt;p&gt;Once you realize it is your fault, you also realize it is in your control.  You realize that if you worked out for 6 months then you would be in shape, that if you read a hand full of books on a topic you would dominate most people alive on the subject.  All you have to do is choose to do it, and actually believe you can.  The funny thing is, we don't. We do not choose to do it, because we don't think we can do it. I don't want to do that anymore, thats at least &lt;em&gt;just &lt;/em&gt; my choice.&lt;/p&gt;

&lt;blockquote&gt;
If you change the belief first, changing the &lt;strong&gt;action &lt;/strong&gt;is easier.
&lt;p&gt;-Peter McWilliams&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
If you want to know your past life, look into your present condition; if you want to know your future, look into your present &lt;strong&gt;action&lt;/strong&gt;.
&lt;p&gt;-Padmisambha&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
Once you've done the mental work, there comes a point you have to throw yourself into the &lt;strong&gt;action &lt;/strong&gt;and put your heart on the line. That means not only being brave, but being compassionate towards yourself, your teammates and your opponents.
&lt;p&gt;-Phil Jackson&lt;/p&gt;
&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/06/18/mallrats-in-the-mall-of-life</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/06/18/mallrats-in-the-mall-of-life/"/>
    <title>mallrats in the mall of life</title>
    <updated>2006-06-18T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Life is a strange journey that I wish I had a map to. Not just a regular map either.  I am talking about one of the mall maps. If you grew up in the 90s you know what I am talking about.  The map that clearly prints &quot;you are here&quot; to the exact spot in the mall you are at.  I need to know just where &quot;here&quot; is so I can get to where ever it is I am suppose to go.  I just need to know which way I need to walk or maybe I just need to take a moment to look at all my options.  Evaluate each store by how long it would take me to get to it from where I currently am located. It is what I like to call, the mall of life.&lt;/p&gt;

&lt;p&gt;You can spend all your time in the mall of life. I mean this literally. In the mall of life the currency is time. There are a variety of stores one can go to ranging from clothes to books. You only have so much time in your pocket to spend, and most of it is spent wandering around the mall &quot;window shopping&quot;.  Window shopping is wasting your time looking at something you damn well know you can not have at the present moment.  Rather then spending the time to get this item you spend the time day dreaming of how it would be to posses it. This ranges from a career, your body, the opposite sex, and so on.&lt;/p&gt;

&lt;p&gt;Just like the actual malls, few people actually stop and look at the map that lets you know just where you are. So maybe, just maybe, in this mall of life there is a map and I just got to find it. Until then, I am going to hang out/lounge somewhere between the food court and the bookstore.&lt;/p&gt;

&lt;p&gt;A bit weird I know but in my head it makes sense.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/06/08/future-google-appliances</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/06/08/future-google-appliances/"/>
    <title>Future Google Appliances</title>
    <updated>2006-06-08T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.blueskyonmars.com/2006/06/07/the-business-behind-google-spreadsheet/&quot;&gt;Kevin Dangoor suggests&lt;/a&gt; that we may eventually see Google provide an appliance for all our office needs.&lt;/p&gt;

&lt;p&gt;Then I remember Cringley's &lt;a href=&quot;http://www.pbs.org/cringely/pulpit/pulpit20060105.html&quot;&gt;article&lt;/a&gt; suggesting a Google home entertainment appliance.&lt;/p&gt;

&lt;p&gt;I would enjoy having nice simple, affordable, appliances to make my life easier. Heck, even though I love mucking with computer tech, I hate to spend all my time doing it. IT takes a lot of time to deal with, especially if one's plans involve maintaining other locations (eg other family member's homes). So if Google can come out with an appliance (all-in-one) that services all my office, entertainment and IT management needs, I would be all over it. But a message to Google: I just want something nice-- and would appeal to my geek aesthetics-- to just work, without it encumbering upon my freedoms (open integration, avoid lock-in).&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/05/19/javaone-day-three</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/05/19/javaone-day-three/"/>
    <title>JavaOne - Day Three</title>
    <updated>2006-05-19T00:00:00-07:00</updated>
    <author>
      <name>corey</name>
    </author>
    <content type="html">&lt;p&gt;Ok, so by now any session that has AJAX in the title has more people that you can shake a stick at trying to get in.  One line was down the hall, down stairs, out a door, and then around a corner.  That's right outside as in not indoors.   I decided I wasn't that interested in that one after all. Going to various session you start to pick up on the whole session process as it relates to the presenters and their slides.   Apparently Sun goes through each presenters slides and make sure that everything is nice an legal.  Thus they add in words like 'software', 'technology', and trademark simbols.  There were several occations when a presenter stop and pointed out how his slide was change.  One group noted that Sun made them remove the dash after 'JSR' on everone of their slides.&lt;/p&gt;

&lt;p&gt;The day ended with an 'After Dark Bash' that was pretty cool, except that there where about 10,000 people there as well.  Everyone was waiting in line for either food or drinks so basiclly it was just a big standing around party.  The highlight was that 'Fatal1ty' crushed everyone in Quake4.&lt;/p&gt;

&lt;p&gt;I also was able to go to a session involving 'Processing' that can help create really neat art but being a bit more artistic lot the presenters had a hard time presenting a focused presentation.  I personally thought it was a nice change of pace.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/05/18/javaone-day-two</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/05/18/javaone-day-two/"/>
    <title>JavaOne - Day Two</title>
    <updated>2006-05-18T00:00:00-07:00</updated>
    <author>
      <name>corey</name>
    </author>
    <content type="html">&lt;p&gt;Well the day started on a bit of a bad note.  See there's this new Java language feature named &lt;em&gt;Generics&lt;/em&gt; that I have been avoiding.  Well today Joshua Bloch shoved them in my face and sort of spread it all around.  Let's just say that Java Generics make the baby Jesus cry.  I think that a part of me died during Bloch's talk. Personally I don't really see why everybody thinks that super duper strong type checking helps write better software.  Do you really want the Java compiler to do your software testing for you?  For somethings (like is this class name the same as that class name) but others (like is this a collection of &lt;em&gt;coins&lt;/em&gt;) it is not so helpful.  At one point there was a method signature something like this:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;someMethod&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Collection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;collection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;&quot;? extends T&quot; are you kidding me?  I mean really what-the-fuck.&lt;/p&gt;

&lt;p&gt;Well today wasn't a complete loss, I was able to rebound with a nice Session all about Groovy.  There was a really neat demo using some behide the sences magic to dynamically interact with Excel and a simple Swing app.  And the presenter didn't declare any types while doing it.  To round out the day I sat in on two different sessions present by none other than Rod Johnson who has a really terrific accent and even better things to say with it.  I can't want unit Spring 2.0 is released  sometime next month.&lt;/p&gt;

&lt;p&gt;I've notice that when presented with rows of seating most people first sit on the aisle making people after then squeeze by them on there way to the middle.  For some reason this really bugs me, why don't they move to the middle to start with?  They are also the folks that stay until the last question has been answered.&lt;/p&gt;

&lt;p&gt;Almost forgot the most exciting part of JavaOne the game area.  My coworker and I dialed up some favorites (Mr. Do!, Joust, Guantlet) and I totally kicked in Rampart.  They also have something called Xbox 360 but I don't think that it has any real titles.&lt;/p&gt;

&lt;p&gt;So you might notice that today's post is really about yesterday hey all day conferences take a toll and I like sleeping.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/05/16/javaone-day-one</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/05/16/javaone-day-one/"/>
    <title>JavaOne - Day One</title>
    <updated>2006-05-16T00:00:00-07:00</updated>
    <author>
      <name>corey</name>
    </author>
    <content type="html">&lt;p&gt;That's right I'm at JaveOne this year and it is super duper.  No really it is.  Today I was in two different session that delt with REST.  One was all about the Atom Protocol and the other was how you can use all of the &lt;em&gt;new&lt;/em&gt; standard Java API's to implement both the client and server for a RESTful web service.  One item about REST that my coworker pointed out was how each presenter started out mapping HTTP methods GET, PUT, POST, and DELETE to the good old Create, Read, Update, and Delete operations.  He also noticed that each mapped PUT and POST differently.  Having recently read RFC 2616 I can see why that happened.&lt;/p&gt;

&lt;p&gt;I also sat in on a session highlighting a upcoming software product named &lt;a href=&quot;http://www.terracottatech.com/&quot;&gt;Terracotta for Spring&lt;/a&gt;.  Basiclly it sits between the JVM and Spring and provides for all your custering needs.  Seems super cool because it handles all the nasty stuff, leaving your Spring App just a Spring App.&lt;/p&gt;

&lt;p&gt;Ok enough of the boring stuff time for todays overservations/impressions.  First up, the event staff here at the Moscone Center know how to &lt;em&gt;heard&lt;/em&gt; people about. Before we where even inside there were people directly us JavaOne goers which entrance to go to for breakfast.  It continued throughout the day as lines for sessions formed with the aid of our friend event staff.  &quot;This is the line for 304&quot;.  Second the attendies have no fear about getting up and leaving in large numbers before the speaker has even gotten close to finishing his presentation.  By the time Q&amp;amp;A comes around most of the crowd has moved on to new lines.  Lastly, just about everyone has a laptop and a good number of those are Macs, makes me wish I had one.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/05/12/e3-the-lost-badge</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/05/12/e3-the-lost-badge/"/>
    <title>E3: The Lost Badge</title>
    <updated>2006-05-12T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Adam_West&quot;&gt;Adam West&lt;/a&gt; made an appearance at E3 this year to promote the Family Guy game. We, BadPopcorn attendees, got photos taken along with signed glossies and badges.&lt;/p&gt;

&lt;p&gt;Unfortunately, Nathan's badge was lost/stolen on the last day somewhere by the Webzen booth. :( Anyone find it? We'd like the memorabilia back.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-05-E3_2K6BADGE_ADAMWEST.jpg&quot; title=&quot;E3_2K6BADGE_ADAMWEST.jpg&quot;&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-05-E3_2K6BADGE_ADAMWEST.jpg&quot; alt=&quot;E3_2K6BADGE_ADAMWEST.jpg&quot; width=&quot;130&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS - Shout out to Paul of &lt;a href=&quot;http://www.ageia.com/&quot;&gt;Ageia&lt;/a&gt;, who's also a big fan of Mr. West. I hope your own Nathan likes his autographed picture.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/05/12/door-desks</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/05/12/door-desks/"/>
    <title>Door Desks</title>
    <updated>2006-05-12T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">This blogger's &lt;a href=&quot;http://glinden.blogspot.com/2006/01/early-amazon-door-desks.html&quot;&gt;experience with door desks&lt;/a&gt; brings back memories. :)
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/05/03/css-vertical-alignment</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/05/03/css-vertical-alignment/"/>
    <title>CSS Vertical Alignment</title>
    <updated>2006-05-03T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;I just came across something kind of dumb. If you are using a CSS stylesheet and want to change the valign of a data table you have to use &quot;vertical-alignment&quot; instead of &quot;valign&quot;. Even though valign is the correct syntax for html.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;nt&quot;&gt;td&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;vertical-align&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Im sure most people might know this, but I didn't and it confused me for a good 5 minutes.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/04/22/coral-cache-and-htaccess</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/04/22/coral-cache-and-htaccess/"/>
    <title>Coral Cache and htaccess</title>
    <updated>2006-04-22T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;A recent digg &lt;a href=&quot;http://digg.com/software/Digg_Defender_-_A_Plugin_for_Wordpress&quot;&gt;post&lt;/a&gt; showed off a WordPress plugin designed to help prevent a site's server meltdown due to traffic overload (i.e.- Digg or Slashdot effect). The plugin redirects all incoming traffic from heavy sites (e.g. - digg.com) to the protected site's equivalent &lt;a href=&quot;http://www.coralcdn.org/&quot;&gt;Coral Cache&lt;/a&gt; page.&lt;/p&gt;

&lt;p&gt;The cool part is that someone posted a sample Apache htaccess ruleset that does the same thing. Why is this better? It's going to be way faster than using WordPress' caching system in PHP.&lt;/p&gt;

&lt;p&gt;My own modifications to the ruleset now:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;allows Googlebot direct access (no redirect);&lt;/li&gt;
&lt;li&gt;allows redirects from any subdomain of the high traffic sites, not just www;&lt;/li&gt;
&lt;li&gt;redirects the main page (&quot;/&quot;) too. The ^(.*)$ seemed to not redirect the &quot;/&quot; pages on some apache installations. I changed it to ^(.*)?$&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Just copy &amp;amp; configure the following ruleset to the top of your WordPress' .htaccess file (or the .htaccess file of any other site):&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;apache&quot;&gt;&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Heavy Site Redirect to Coral Cache&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  Links incoming from heavy sites are redirected to the Coral Cache&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  Exception: Coral Cache Proxy Servers&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  Exception: Googlebot crawler&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  CONFIG: Replace &amp;quot;example.com&amp;quot; with your target domain name.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  CONFIG: Follow the HTTP_REFERER RewriteCond examples to add or remove&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#           domains to the list of redirected sites.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;ifmodule&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;mod_rewrite.c&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;RewriteEngine&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;On&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_USER_AGENT} !^Googlebot
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_USER_AGENT} !^CoralWebPrx
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{QUERY_STRING} !(^|&amp;amp;)coral-no-serve$
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_REFERER} ^http://([^/]+\.)?digg\.com [OR]
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_REFERER} ^http://([^/]+\.)?slashdot\.org [OR]
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_REFERER} ^http://([^/]+\.)?slashdot\.com [OR]
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_REFERER} ^http://([^/]+\.)?fark\.com [OR]
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_REFERER} ^http://([^/]+\.)?somethingawful\.com [OR]
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_REFERER} ^http://([^/]+\.)?kuro5hin\.org [OR]
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_REFERER} ^http://([^/]+\.)?engadget\.com [OR]
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_REFERER} ^http://([^/]+\.)?boingboing\.net [OR]
&lt;span class=&quot;nb&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_REFERER} ^http://([^/]+\.)?del\.icio\.us
&lt;span class=&quot;nb&quot;&gt;RewriteRule&lt;/span&gt; ^(.*)?$ http://example.com.nyud.net:8080/$1 [R,L]
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/ifmodule&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/04/20/google-reader-tag-delete</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/04/20/google-reader-tag-delete/"/>
    <title>Google Reader Tag Delete</title>
    <updated>2006-04-20T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I guess I was asleep when the Google Reader team pushed out better management changes. I can easily delete labels now :) .&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-04-google-reader-edit.jpg&quot; alt=&quot;google-reader-edit.jpg&quot; /&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/04/20/atom-publish-protocol-and-gdata</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/04/20/atom-publish-protocol-and-gdata/"/>
    <title>Atom Publish Protocol and GData</title>
    <updated>2006-04-20T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;The &lt;a href=&quot;http://code.google.com/&quot;&gt;GData&lt;/a&gt; protocol introduced an optimistic locking convention, for resource editing, to the &lt;a href=&quot;http://ietfreport.isoc.org/idref/draft-ietf-atompub-protocol/&quot;&gt;Atom Publish Protocol&lt;/a&gt;. The introduced method is quite simple: An Atom Entry's edit URL is unique by version of the resource. Although the Google team's method just added a version number to the end of the URL, the URL itself can be random and is opaque of semantic meaning. This versioned URL method allows the server to know if a client is trying to update a resource based on stale information.&lt;/p&gt;

&lt;p&gt;After some pause, I had a question: Would it be better to have such versioned URLs or would it be better to add meta information in the Atom entry?&lt;/p&gt;

&lt;p&gt;The APP draft spec states:&lt;/p&gt;

&lt;blockquote&gt;8.2.1  Editing entries with foreign markup
   To avoid unintentional loss of data when editing entry collection
   members, Atom Protocol clients SHOULD preserve all metadata,
   including unknown foreign markup, that has not been intentionally
   modified.&lt;/blockquote&gt;

&lt;p&gt;This means that an APP client will send back the version information even if it doesn't know anything about versioning, which would allow for the server to detect version conflicts.&lt;/p&gt;

&lt;p&gt;However, the metadata method's one weakness is in that it only works with Atom Entries and will not work for other Media. Besides this, I have not found any compelling evidence to support one method or another when ignoring the metadata weakness. And I can't see either method breaking the REST model, so maybe it's up to the APP Service API designer.&lt;/p&gt;

&lt;p&gt;Then my brain took a tangent:&lt;/p&gt;

&lt;p&gt;Doesn't having version based edit URLs (http://example.com/pic.jpg/1/ and http://example.com/pic.jpg/2/) imply that there are two separate resources as opposed to a single resource? In general, should different versions of a resource be modeled as separated resources? Yet aren't we talking about editing a resource published at a single URL: http://example.com/pic.jpg ? If we have two separate resources, then shouldn't the published (linked to in a blog entry) URL be the latest versioned URL (http://example.com/pic.jpg/2/)? Or can we say that http://example.com/pic.jpg represents the lastest version in the 'trunk'? Or am I splitting hairs since they may just be two sides of the same coin?&lt;/p&gt;

&lt;p&gt;Ah that's it for thinking out loud...&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/04/12/tank-man-tribute</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/04/12/tank-man-tribute/"/>
    <title>Tank Man Tribute</title>
    <updated>2006-04-12T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;The ads for the Frontline &lt;a href=&quot;http://www.pbs.org/wgbh/pages/frontline/tankman/&quot;&gt;episode&lt;/a&gt; on the Tank Man were a bit misleading. The show never revealed the &lt;a href=&quot;http://en.wikipedia.org/wiki/Tank_Man&quot;&gt;Tank Man&lt;/a&gt;'s identity. Oh well. We may never know, and we may not need to know, yet we already know who he was-- the spirit of every student, mother and father of those &lt;a href=&quot;http://en.wikipedia.org/wiki/Tiananmen_Square_protests_of_1989&quot;&gt;demonstrations&lt;/a&gt;. This is for them:
&lt;/p&gt;

&lt;p&gt;&lt;img id=&quot;image151&quot; src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-04-TankMan.gif&quot; alt=&quot;Tank Man&quot; /&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/04/05/he-is-the-tank-man</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/04/05/he-is-the-tank-man/"/>
    <title>He is the Tank Man...</title>
    <updated>2006-04-05T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I had high hopes for China for a few brief days in 1989. The Berlin wall had just collapsed and it &lt;a href=&quot;http://en.wikipedia.org/wiki/Tiananmen_Square_protests_of_1989&quot;&gt;looked like&lt;/a&gt; the PRC was about to go the same way. But the central government decided to send in troops to crack down on the protests. And from that, the world saw an incredible &lt;a href=&quot;http://en.wikipedia.org/wiki/Image:Tianasquare.jpg&quot;&gt;act of defiance&lt;/a&gt; (he stood there for half and hour), which summed every demonstrator's hope for a reformed China. Who was he? I don't know, but maybe I'll find out after watching Frontline:&lt;/p&gt;

&lt;blockquote&gt;On June 5, 1989, one day after Chinese troops expelled thousands of demonstrators from Tiananmen Square in Beijing, a solitary, unarmed protester stood his ground before a column of tanks advancing down the Avenue of Eternal Peace. Captured by Western photographers watching nearby, this extraordinary confrontation became an icon of the fight for freedom around the world. On April 11, veteran filmmaker Antony Thomas investigates the mystery of the tank man -- his identity, his fate, and his significance for the Chinese leadership.&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/03/30/facebook-for-sale</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/03/30/facebook-for-sale/"/>
    <title>Facebook for Sale</title>
    <updated>2006-03-30T00:00:00-08:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Business week recently posted an article saying that Facebook turned down a 750 million dollar offer.&lt;/p&gt;

&lt;blockquote&gt;Facebook, the Web site where students around the world socialize and swap information, has put itself on the block, BusinessWeek Online has learned. The owners of the privately held company have turned down a $750 million offer and hope to fetch as much as $2 billion in a sale, senior industry executives familiar with the matter say.
&lt;br/&gt;
-&lt;a title=&quot;http://www.businessweek.com/technology/content/mar2006/tc20060327_215976.htm&quot; href=&quot;http://www.businessweek.com/technology/content/mar2006/tc20060327_215976.htm&quot;&gt;Facebook's On The Block&lt;/a&gt;&lt;/blockquote&gt;

&lt;p&gt;Is it worth 2 billion, probably not.  However, if mySpace sold for 500 then facebook should sell for atleast a billion.  Although mySpace might have more members facebook is growing  quite fast and seems to be implemented better. If you notice they tag everything in your profile, and they even tag pictures.  Their advertising business model is great too.  A person or company can submit an ad per day per school.  This lets big companies advertise or any college students that wants an ad up for a couple days at just his or her college.&lt;/p&gt;

&lt;p&gt;I am happy that the facebook guys are going to get rich, because mySpace is dumb and those guys got rich.  I just hope facebook doesn't change due to a buy out by a large corporation.Â  If a company like Viacom buys them out then who knows what will happen.  Viacom already fucked me over with Chappelle show..now this!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/03/26/on-programming</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/03/26/on-programming/"/>
    <title>On Programming</title>
    <updated>2006-03-26T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;blockquote&gt;Learning to design programs is like learning to play soccer. A player must learn to trap a ball, to dribble with a ball, to pass, and to shoot a ball. Once the player knows those basic skills, the next goals are to learn to play a position, to play certain strategies, to choose among feasible strategies, and, on occasion, to create variations of a strategy because none of the existing strategies fits.&lt;br/&gt;
    - Felleisen, Findler, Flatt, and Krishnamurthi, &lt;i&gt;How to Design Programs: An Introduction to Computing and Programming&lt;/i&gt;
&lt;/blockquote&gt;

&lt;p&gt;One cannot truly be a master until one perfects its basic fundamentals; only then does one attain enlightenment.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/03/23/video-games-are-turning-the-nations-young-people-intovoters</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/03/23/video-games-are-turning-the-nations-young-people-intovoters/"/>
    <title>Video Games are Turning the Nation's Young People into...Voters?</title>
    <updated>2006-03-23T00:00:00-08:00</updated>
    <author>
      <name>aaron</name>
    </author>
    <content type="html">&lt;p&gt;Of course, when speaking of Political matters, &quot;Young People&quot; can range anywhere from 18 to 40, but that doesn't mean that the lawmakers are out of touch...does it?&lt;/p&gt;

&lt;p&gt;&lt;a title=&quot;Theesa, sounds like a Conan villain&quot; href=&quot;http://www.theesa.com/&quot; target=&quot;_blank&quot;&gt;The Entertainment Software Association&lt;/a&gt;, has created the &lt;a title=&quot;They could use a cooler acronym&quot; href=&quot;http://www.videogamevoters.org/&quot;&gt;Video Game Voters Network&lt;/a&gt;. The point of the V.G.V.N. is, of course to inspire legislators to think twice before backing legislation that has-at least so far-been &lt;strong&gt;unfailingly stricken down as unconstitutional&lt;/strong&gt;. The plan is that the threat of gamers that are mobilized, motivated, and prepared to vote in defense of their past-time will convince legislators that the &lt;strong&gt;easy &quot;Family Values&quot; votes&lt;/strong&gt; they get for being Anti-Gamers Rights, might not seem so easy when they realize that Gamers Rights might actually be some of the values of the modern family.&lt;/p&gt;

&lt;p&gt;In my opinion it is a beautiful dream. That's whay I'm linking, to do my part. If you enjoy video games...or &lt;a title=&quot;Click it&quot; href=&quot;http://www.billofrights.org/&quot;&gt;your first amendment rights&lt;/a&gt; it might be worth heading over and signing up.&lt;/p&gt;

&lt;p&gt;Sorry for getting up on that Soap Box like that but sometimes the only way to keep from being stepped on, is to stand up.&lt;/p&gt;

&lt;p&gt;Did you know that the Government does not regulate access to or the sale of movies, books or cable TV?&lt;/p&gt;

&lt;p&gt;Neither did I. Apparently those systems are totally voluntary too...must be due to that pesky Constitution.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/03/16/map-filter-and-reduce-over-python-dictionaries</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/03/16/map-filter-and-reduce-over-python-dictionaries/"/>
    <title>Map, Filter, and Reduce over Python Dictionaries</title>
    <updated>2006-03-16T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I wanted to apply some Functional Programming ideas to solve a problem in some Python code I had, which involved manipulation of data found in a couple dictionaries. Unfortunately, the built in map, filter, reduce, and list composition methods can only be used over iterable lists.&lt;/p&gt;

&lt;p&gt;Luckily, I remembered that equivalent dictionaries in LISP are all represented as a list-of-lists: ( (key1, val1), (key2, val2) ); python map &amp; filter functions can then be used over this converted datastructure.&lt;/p&gt;

&lt;p&gt;After a little digging, I found that it's really easy to do this conversion in Python:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;&lt;span class=&quot;c&quot;&gt;# Uses the list composition to make the key value pairs over a dictionary.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;dict2list&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dic&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dic&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iteritems&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()]&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Use the built in dictionary constructor to convert the list.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;list2dict&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;dict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Example Usage follows:&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;dict1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;c&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;d&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Filter function&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;is_even&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Map functions&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;add_two&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;add_sss&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; SSS&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Reduce function&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;add_all&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Make sure you have the [] around the reduce call.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;list2dict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;reduce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_two&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_sss&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;is_even&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dict2list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dict1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;)))))])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/03/02/acupunture</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/03/02/acupunture/"/>
    <title>Acupunture</title>
    <updated>2006-03-02T00:00:00-08:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;A friend of mine at work used to get crazy headaches.  One day he told me that he was doing acupunture.  I wasn't surprised at all, because I had heard about football players that use acupunture to relieve pain.  Since then I have read a couple articles about how it helps the brain deal with pain.  I found some of the articles, a good read.&lt;/p&gt;

&lt;p&gt;&lt;a title=&quot;Acupuncture 'like migraine pill'&quot; href=&quot;http://news.bbc.co.uk/2/hi/health/4764354.stm&quot;&gt;Acupuncture 'like migraine pill'&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;German researchers treated almost 900 patients with either standard drugs, traditional Chinese acupuncture or &quot;fake&quot; acupuncture. Virtually the same proportion of people in each group found the number of days affected by migraine was halved.&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://news.bbc.co.uk/2/hi/health/4493011.stm&quot;&gt;Acupuncture 'more than a placebo'&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;Sceptics have said that any benefits gained from acupuncture are merely down to a person's expectation that the treatment will work.&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://news.bbc.co.uk/2/hi/health/4390755.stm&quot;&gt;Acupuncture 'cuts blood pressure' &lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;Acupuncture combined with electronic stimulation can lower high blood pressure, US researchers say.&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/02/23/web-host-migration</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/02/23/web-host-migration/"/>
    <title>Web Host Migration</title>
    <updated>2006-02-23T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Just some cryptic notes (Post-mortem) on migrating badpopcorn.com from one web host to another web host:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Wordpress Backup and Restore procedures are simple and well documented. Took 5 minutes to do.&lt;/li&gt;
&lt;li&gt;Wordpress database configuration was easy to change in wp-config.php.&lt;/li&gt;
&lt;li&gt;rsyncing from one host to another made the file copying easy. Complementary to my regular backup procedures.&lt;/li&gt;&lt;li&gt;Testing the new host was easy by changing my local /etc/hosts file to temporarily use the new host's servers.&lt;/li&gt;
&lt;li&gt;I was stupid to forget to test the email forwarding before changing the name servers. Failed to catch bouncing emails.&lt;/li&gt;&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/02/08/politics-and-science-followup</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/02/08/politics-and-science-followup/"/>
    <title>Politics and Science Followup</title>
    <updated>2006-02-08T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.nytimes.com/2006/02/08/politics/08nasa.html?_r=1&amp;oref=slogin&quot;&gt;NYTimes article&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;George C. Deutsch, the young presidential appointee at NASA who told public affairs workers to limit reporters' access to a top climate scientist and told a Web designer to add the word &quot;theory&quot; at every mention of the Big Bang, resigned yesterday, agency officials said.&lt;/blockquote&gt;

&lt;p&gt;Good riddance, but it's only a small victory against those Intelligent Design propagandists; and it won't be a lasting one unless NASA can get its review policy straightened out.&lt;/p&gt;

&lt;p&gt;PS- The NY Times article also confirms this appointee's lack of a degree in case you didn't think that my &lt;a href=&quot;/blog/2006/02/07/war-on-science/&quot;&gt;prior post&lt;/a&gt;'s source was good enough.&lt;/p.

&lt;blockquote&gt;Mr. Deutsch's resignation came on the same day that officials at Texas A&amp;amp;M University confirmed that he did not graduate from there, as his resume on file at the agency asserted.&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/02/07/war-on-science</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/02/07/war-on-science/"/>
    <title>War on Science?</title>
    <updated>2006-02-07T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I dislike how Creationists are going about attacking Science. They're spreading propaganda about how the Big Bang is &quot;an unproven theory&quot;-- totally misleading. Yes there are unproven aspects of the theory, but there is a lot of evidence that proves the idea of an ever-expanding Universe that once was a small hot ball of gas; what is unproven is what exactly happened in those very early moments while it was a hot ball of gas. Those Creationists are just confusing the issue with propagandist rhetoric.&lt;/p&gt;

&lt;p&gt;These Creationists are attacking the Big Bang idea because it gets in their way of their Intelligent Design. They are even portraying Intelligent Design as Science; it is not.&lt;/p&gt;

&lt;p&gt;Repeat after me, &quot;Intelligent Design is not science because you cannot apply the Scientific Method [&lt;a href=&quot;http://en.wikipedia.org/wiki/Scientific_method&quot;&gt;1&lt;/a&gt;] [&lt;a href=&quot;http://www.answers.com/scientific%20method&quot;&gt;2&lt;/a&gt;] to this idea.&quot;&lt;/p&gt;

&lt;p&gt;And related to that, you've got a very conservative administration whose lackeys are &lt;a href=&quot;http://scientificactivist.blogspot.com/2006/01/speak-no-evil.html&quot;&gt;censoring NASA scientific papers&lt;/a&gt;; the censoring PR administrator &lt;a href=&quot;http://scientificactivist.blogspot.com/2006/02/breaking-news-george-deutsch-did-not.html&quot;&gt;didn't even graduate&lt;/a&gt; with his claimed journalism degree.&lt;/p&gt;

&lt;p&gt;Why are we allowing scientifically-untrained persons, whose political agenda may go directly against pure science, take jobs for which they are completely unqualified?&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/02/03/world-cup-tickets-update</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/02/03/world-cup-tickets-update/"/>
    <title>World Cup Tickets Update</title>
    <updated>2006-02-03T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Moe and I had put in applications to purchase tickets to the World Cup in Germany; of which, my results came back:&lt;/p&gt;

&lt;blockquote&gt;Due to the high demand for tickets for the 2006 FIFA World Cup Germany (TM), the ticket applications correctly processed and accepted had to be entered into a draw. Unfortunately, you have not been allocated any tickets for the 2006 FIFA World Cup Germany (TM).&lt;/blockquote&gt;

&lt;p&gt;The message is annoying. Was the application not selected in the draw, or was it not even in the draw? Thanks to FIFA for the informative message *sarcasm*.&lt;/p&gt;

&lt;p&gt;Maybe we'll still get a couple of tickets from Moe's application.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/02/01/kcrw-fundraising</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/02/01/kcrw-fundraising/"/>
    <title>KCRW Fundraising</title>
    <updated>2006-02-01T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I would have agreed to Doc Searl's &lt;a href=&quot;http://doc.weblogs.com/2006/02/01#pityOurPerfectWeather&quot;&gt;statement&lt;/a&gt; at one point:&lt;/p&gt;

&lt;blockquote&gt;(Our main regional public station, &lt;a href=&quot;http://kcrw.org/&quot;&gt;KCRW&lt;/a&gt; out of Santa Monica, is having an annoying fundraising marathon, which I hate. I give them money, but not during fund drives. It only encourages them.)&lt;/blockquote&gt;

&lt;p&gt;I'm not so sure now. I think that the marathon is a great opportunity to raise the visibilty of the station's membership program for those that wouldn't have known otherwise; and it gives us the opportunity to support the station while getting some shwag in the process; and I'd rather have them get it all out in a week instead of hearing it year round.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/01/12/gentleman-of-leisure</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/01/12/gentleman-of-leisure/"/>
    <title>Gentleman of Leisure</title>
    <updated>2006-01-12T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;My friends and family seem to view my latest career related move as my &lt;em&gt;&quot;Retirement&quot;&lt;/em&gt;. I can see how my transition could be viewed in such a way, yet I will refrain from delving into examples to the contrary. I will, however, confirm the fact that I have been spending a great deal of time reading at the Bookstore, and at a local Coffee House, introduced to me by Adam and Wendy. My main driving desire is to keep my mind active, whilst I contemplate the possible long-term plans available to me; this is done by reading books, new or old (procrastinated till now):&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Some random book about the Arab-Israeli conflict (Completed)&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;Lolita&lt;/em&gt; by Nabokov (Half completed)&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;The Intelligent Investor&lt;/em&gt; by Benjamin Graham (Barely Started)&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;The Elements of Style&lt;/em&gt; by Strunk &amp; White (Barely Started)&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;Rick Steves' Europe 101 (Just Purchased)&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;Rick Steves' Best of Europe 2006 (Just Purchased)&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;A Feast for Crows&lt;/em&gt; by Martin (Completed)&lt;/li&gt;
	&lt;li&gt;&lt;em&gt; Fifty Degrees Below&lt;/em&gt; by Kim Stanley Robinson (Half completed)&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;Active Liberty&lt;/em&gt; by Justice Stephen Breyer [Edit: added to list]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The backyard of the coffee house is a nice English garden. It is a comfortable setting, with nooks and crannies, in which one can spend a good long time, undisturbed, reading. Although I find the beverage prices almost outrageous, I find that the environment more than makes up for this affront.&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;backyard garden of coffee house&quot; src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-01-011206_1600.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The front is off a major street in Fullerton, so you'll hear a lot of traffic near the front of the establishment.&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;Front sign of coffee house&quot; src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2006-01-011206_1708.jpg&quot; /&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2006/01/06/geronimo</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2006/01/06/geronimo/"/>
    <title>Geronimo!!!</title>
    <updated>2006-01-06T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">The &lt;a href=&quot;http://geronimo.apache.org/&quot;&gt;Apache Geronimo&lt;/a&gt; project has hit the 1.0 Milestone! Yay, congrats, etc etc. I'll have to now evaluate it to see if it's usable for my Java projects. This is very cool stuff.
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/12/23/lifes-work</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/12/23/lifes-work/"/>
    <title>Life's Work</title>
    <updated>2005-12-23T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;A certain idea has lately been stuck in my mind. It was sparked after reading a Paul Graham essay of a many months back, &lt;a href=&quot;http://paulgraham.com/opensource.html&quot;&gt;What Business Can Learn From Open Source&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;That is one of the key tenets of professionalism. Work and life are supposed to be separate. But that part, I'm convinced, is a mistake.&lt;/blockquote&gt;

&lt;p&gt;The more I think about it, the more I am won over by Paul's idea. I think about work when I'm at home, and I think about life when I'm at work. This may sound a bit chaotic and unproductive, but it has worked well for me. The Work-Life duality has a strong hold in my mind. From which I have been able to attain creative expression and accomplishment working as a salaried software developer. Life has been both good and bad because of this ability (Good mostly, I think); work and life (all the things I do and am) become a singular &lt;em&gt;Life&lt;/em&gt;.&lt;/p&gt;
 
&lt;p&gt;However, my current situation is a bit &quot;deadening&quot;. That is, I am not doing the work I want to be doing, nor is it giving me the avenues in the life I want to be living. Paul's idea is just the beginning for me.&lt;/p&gt;

&lt;p&gt;I am one of the many people now seeking to live life more freely, not to be chained by corporate slavery. I have a high desire for a certain freedom and richness. The freedom to pursue desires and a richness in the luxary to do these things. Will I be fulfilled in such a way while working at a job for others? I have reflected on this question for quite some time.&lt;/p&gt;

&lt;p&gt;So I have just made the choice to leave my current job and to pursue &lt;em&gt;life&lt;/em&gt; on my own terms. Success or failure, I will have set out for a Life Less Ordinary; a life where I have taken the chance; a life without regret; a life in which I can pursue my ideals; a life that I can live for myself.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/12/21/google-talk-and-aim</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/12/21/google-talk-and-aim/"/>
    <title>Google Talk and AIM</title>
    <updated>2005-12-21T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;A &lt;a href=&quot;http://www.google.com/intl/en/press/pressrel/twaol_expanded.html&quot;&gt;press release&lt;/a&gt; announced the following:&lt;/p&gt;

&lt;blockquote&gt;Enabling Google Talk and AIM instant messaging users to communicate with each other, provided certain conditions are met&lt;/blockquote&gt;

&lt;p&gt;A nice first step. Let's just hope that we can get AIM to use the open &lt;a href=&quot;http://en.wikipedia.org/wiki/XMPP&quot;&gt;Jabber/XMPP protocol&lt;/a&gt; that Google uses. But I doubt that will happen anytime soon, if at all.&lt;/p&gt;

&lt;p&gt;At the very least, I think I'll be able to stop using my AIM account and just use &lt;a href=&quot;http://talk.google.com/&quot;&gt;Google Talk&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/12/14/be-the-clutter</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/12/14/be-the-clutter/"/>
    <title>Be the Clutter</title>
    <updated>2005-12-14T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I watched Frontline's episode entitled &lt;a href=&quot;http://www.pbs.org/wgbh/pages/frontline/shows/persuaders/&quot;&gt;The Persuaders&lt;/a&gt; last night. Its &lt;a href=&quot;http://www.pbs.org/wgbh/pages/frontline/shows/persuaders/etc/synopsis.html&quot;&gt;synopsis&lt;/a&gt; explains the documentary more than I ever could.&lt;/p&gt;

&lt;p&gt;But the big point I wanted to mention is that the program had suggested that &quot;we become the persuaders&quot; in order to get rid of the clutter of advertising. It is an interesting thought that we empower ourselves to talk about only the things we care about-- to take charge about our culture and life. However, this is a message that advertisers have been bombarding us with already-- &quot;individuals (YOU) feel empowered (and fulfilled) when buying the advertiser's product&quot;. So if we were to actually empower ourselves by becoming the persuaders, then wouldn't we become the clutter itself? Isn't there a better way, like not persuading at all? And isn't this a bit ironic since my blog is, itself, a tool of (self-empowering) persuation?&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/12/12/bomba-to-the-mother-fucking-juice</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/12/12/bomba-to-the-mother-fucking-juice/"/>
    <title>Bomba to the Mother Fucking Juice</title>
    <updated>2005-12-12T00:00:00-08:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Ok the title. I don't curse that often but feel it is a great way to do stress emphasis when needed. One of the best occasions is in a good joke. Let's not get into that. The fact is I said, &quot;Mother fucking&quot; to catch your attention and if you are reading this then it worked. No, don't get mad. Just continue reading.&lt;/p&gt;

&lt;p&gt;So there is this slice of heaven near work called Bomba Juice. Ben, Corey and I go there often and get some of the greatest smoothies my tongue has ever been blessed to taste. Mango Strawberry or Pineapple Mango. Your imagination can run wild. Sometimes I feel like Charlie in the Chocolate Factory. Except I am a 23 old Pakistani guy and Wonka is a suspicious looking Asian kid. Seriously that guy asks to put &quot;boba&quot; in my drink at least 3 times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What makes the drink good?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;They cut up real fruit and blend it up&lt;/li&gt;
  &lt;li&gt;It comes packaged nicely in a cool glass&lt;/li&gt;
  &lt;li&gt;They throw in some syrup that is delicious (speaking of which i guess yahoo bought them out)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ben and I also have a nagging suspicion that there is an extra ingredient in the drinks. Usually, there is one employee at the store. However, on certain occasions I have seen an over weight Asian man in the back. He has never come out but I have always felt his presence in the store. Takes me back to Junior High and reading To Kill a Mocking Bird. This Boo Radley bitch scares me sometimes. Ben and I have agreed that he could only serve one purpose, man juice. The secret ingredient in the drinks is his man juice. I know what you are thinking.&lt;/p&gt;

&lt;blockquote&gt;&quot;Oh my god, this man has to be stopped&quot;&lt;/blockquote&gt;

&lt;p&gt;Before you jump to this conclusion. I only ask you sip the man juice first. You combine the man juice what the sweet flavor of mango and strawberry.&lt;/p&gt;

&lt;p&gt;All jokes aside, the place is great and is the best smoothie I have ever had. Hands down better then Juice it Up, Baskin Robbin, and those other entire bitch as places.&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;Bomba Juice&quot; src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2005-12-120905_1646.jpg&quot; /&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/12/11/wordpress-spam-handling</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/12/11/wordpress-spam-handling/"/>
    <title>WordPress Spam Handling</title>
    <updated>2005-12-11T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;One of the older BadPopcorn posts has started getting comment spam, so I decided to check out what spam protection I could install with &lt;a href=&quot;http://www.wordpress.org/&quot;&gt;WordPress&lt;/a&gt; (software that runs the site). I installed the &lt;a href=&quot;http://www.akismet.com&quot;&gt;Akismet&lt;/a&gt; plugin. It's already caught a few more spams, but let one pass. It's better than nothing, but it will take time to see if it really works.&lt;/p&gt;

&lt;p&gt;A side note: I had to create another username/password pair to use Akismet, aarrg.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/12/07/too-many-usernames</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/12/07/too-many-usernames/"/>
    <title>Too Many Usernames!</title>
    <updated>2005-12-07T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I am generally tolerant of dumb tech hurdles because I'm a techie, but I don't like having different usernames and passwords for every site I visit-- Yahoo, Google, MSN, etc. Some big companies are trying to solve this problem-- MSN Passport and the Liberty Alliance. But those solutions require huge budgets (and not K.I.S.S), and I personally don't think that they can realistically solve the problem.&lt;/p&gt;

&lt;p&gt;So, if I barely can handle this user account problem, how does a non-techie stand a chance?.&lt;/p&gt;

&lt;p&gt;What can be done? For my part, I'll be using &lt;a href=&quot;http://www.openid.net/&quot;&gt;OpenId&lt;/a&gt; (Authentication Scheme) and &lt;a href=&quot;http://www.yadis.org/&quot;&gt;YADIS&lt;/a&gt; (Scheme/Service Discovery) in my &lt;a href=&quot;http://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt; projects. Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They can give my users (and me) a single identity across the web.&lt;/li&gt;
&lt;li&gt;They already have good support (LiveJournal, Moveable Type, etc).&lt;/li&gt;
&lt;li&gt;They are Simple in design.&lt;/li&gt;
&lt;li&gt;They are Open.&lt;/li&gt;
&lt;li&gt;They are Federated. Power to the people, not any one mega-corp.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To do so, I wrote up a simple pluggable OpenId Authentication Django App that I can use in my projects. The app uses the OpenId Python library put out by the &lt;a href=&quot;http://www.openidenabled.com/&quot;&gt;OpenId Enabled&lt;/a&gt; guys. I shot them email about contributing my code back to their project. This is in progress. If not, I'll just release and host it myself.&lt;/p&gt;

&lt;p&gt;Next step is to connect my OpenId App, YADIS and Django.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/12/03/21</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/12/03/21/"/>
    <title>The Family Entertainment Protection Act</title>
    <updated>2005-12-03T00:00:00-08:00</updated>
    <author>
      <name>aaron</name>
    </author>
    <content type="html">&lt;p&gt;So you might not know what exactly is dangerous about &lt;a href=&quot;http://clinton.senate.gov/news/statements/details.cfm?id=249368&amp;&amp;&quot;&gt;this proposed act&lt;/a&gt;...you might not even have heard that it exists, luckily, I am here to help you out.&lt;/p&gt;

&lt;p&gt;The first warning sign is that it was proposed by politicians...these are the jokes. &lt;/p&gt;

&lt;p&gt;Let's start simply with the name of the act &lt;strong&gt;&quot;Family Entertainment Protection Act&quot;&lt;/strong&gt; . Now in this post Patriot Act America we know that the only way the government is likely to &quot;Protect&quot; us is by taking away someone's rights. The only way to protect family entertainment is to take away the rights of those who seek enterteinment in a &quot;Family Unfriendly&quot; way, this time it's not porn...it's video games...well &lt;a href=&quot;http://esrb.org/esrbratings_guide.asp#symbols&quot;&gt;Mature rated&lt;/a&gt; video games...so the porn adjacent (Actual pornographic games are rated AO and are never mentioned because they sell like crap and so do not garner attention).&lt;/p&gt;

&lt;p&gt;But I digress. You can find the majority of the info on the bill over at &lt;a href=&quot;http://gamepolitics.com/&quot;&gt;Gamepolitics&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The most disturbing part? These politicians must know these laws will be defeated and &lt;a href=&quot;http://www.livejournal.com/users/gamepolitics/148962.html#cutid1&quot;&gt;declared unconstitutional&lt;/a&gt;.  &lt;a href=&quot;http://www.theesa.com/&quot;&gt;The Entertainment Software Associaction&lt;/a&gt;, which has been fighting these Anti-Game laws has even come to describe these laws as &quot;feel good legislation&quot;.&lt;/p&gt;

&lt;p&gt;Apparently politicians get a warm fuzzy feelin' from the &quot;Family Values&quot; votes they think they will get by attacking the video game industry.&lt;/p&gt;

&lt;p&gt;Won't they be in trouble when gamers finally start voting...I hear it will be one of the features for the new &quot;Windows Vista&quot;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/12/01/django-and-turbogears-excitement</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/12/01/django-and-turbogears-excitement/"/>
    <title>Django and TurboGears, Excitement</title>
    <updated>2005-12-01T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;My &lt;a href=&quot;/blog/2005/11/30/django-is-rails/&quot;&gt;last post&lt;/a&gt; made the claim that &lt;a href=&quot;http://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt; hands down beats &lt;a href=&quot;http://www.turbogears.org/&quot;&gt;TurboGears&lt;/a&gt;. I know I may have sounded like a &quot;fanboy&quot; (I'm not), but I couldn't contain the enthusiasm of what I saw. :)&lt;/p&gt;

&lt;p&gt;I want to add the following: [edited: Not only do I currently think that Django is better, but also:] I am &lt;b&gt;really really excited&lt;/b&gt; by the active development found in &lt;b&gt;both&lt;/b&gt; projects.&lt;/p&gt;

&lt;p&gt;Case in point:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.holovaty.com/&quot;&gt;Adrian Holovaty&lt;/a&gt; commented (Comment section of my last post) that my pet peeves have been or are currently being addressed. Excellent!&lt;/li&gt;
&lt;li&gt;Thanks to Cliff Wells for pointing out that &lt;a href=&quot;http://checkandshare.com/catwalk/&quot;&gt;Catwalk&lt;/a&gt; is being added to the next version of TurboGears, correcting my statement about TurboGears lacking an admin interface. I will have to check it out!&lt;/li&gt;
&lt;li&gt;Both Projects have active mailing lists and blogging communities.&lt;/li&gt;
&lt;li&gt;Coding is active, and new releases are forthcoming.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I think this case of &quot;sibling rivalry&quot;, if they can be considered siblings, will be helpful in fostering the development of the python-web world. I'm currently seeing a growth in the perception that this area is really coming into its own with these really cool projects.&lt;/p&gt;

&lt;p&gt;And finally, my opinion here isn't fixed, so I'm looking forward to seeing what develops in the future (Let's see if Cliff's prediction about the TurboGears momentum will come true). I'll definitely be making suggestions to both projects when they pop into my mind. And I will submit patches if I run across a bug or a feature idea as I work on my own projects. The future is chock-full of potential on all fronts.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/11/30/django-is-rails</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/11/30/django-is-rails/"/>
    <title>Django is Rails</title>
    <updated>2005-11-30T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;The &lt;a href=&quot;http://www.djangoproject.com/&quot;&gt;Django Project&lt;/a&gt; kicks the living crap out of &lt;a href=&quot;http://www.turbogears.org&quot;&gt;Turbo Gears&lt;/a&gt; for python web application development. I went through the tutorials and documentation from both projects; messed around with writing up some toy applications. I have to say that I'd choose Django for my work.&lt;/p&gt;

&lt;p&gt;What does Django Project have on Turbo Gears?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Django has a more cohesive and streamlined feel.&lt;/li&gt;
&lt;li&gt;I can use Django on the Dreamhost servers with less hassle. (&lt;a href=&quot;http://wiki.dreamhost.com/index.php/Django&quot;&gt;Installation instructions&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Django comes with admin interface to manage data in the database.&lt;/li&gt;
&lt;li&gt;Django comes with a prebuilt RSS and Atom feed generation application.&lt;/li&gt;
&lt;li&gt;Django provides ready to go methods for handling 80% of what you need to do (I'm talking about Generic Views).&lt;/li&gt;
&lt;li&gt;The URL composition and decoupling allows one to make applications really RESTful.&lt;/li&gt;
&lt;li&gt;Much of the work only involves wiring up the URLs and the generic views to access the data. No coding.&lt;/li&gt;
&lt;li&gt;I'm writing less code than Turbo Gears, which is almost nothing at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But I have a few pet peeves about Django:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The App's url.py file isn't truely decoupled from the project. You have to specify a view's full package and name, which the project's name is part of. But I got around that by declaring a &lt;b&gt;BASE_APPS_PACKAGE&lt;/b&gt; settings.py string. Now, I can just copy apps around anywhere.&lt;/li&gt;
&lt;li&gt;I'm not sure if I like putting the URL generation logic in with the model (get_absolute_url). This can tie an app to the project. I added a &lt;b&gt;BASE_URLS&lt;/b&gt; settings.py dictionary to map an application to its base url.&lt;/li&gt;
&lt;li&gt;The options on generic views don't mesh up well. I needed to write up a custom archive_index view, so it wouldn't return a 404 when no data is found. I wouldn't have needed to if the original view implemented the allow_empty parameter as found on other views.&lt;/li&gt;
&lt;li&gt;The generic views only can take custom SQL parameters if they are predefined. I had to extend my custom archive_index view to handle extra parameters taken from a URL path.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm finding that I'm spending less time on the guts of glue work; I'm focusing on delivering the business solution; I can spend more time on the user interface.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/11/24/simpsons-neologisms</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/11/24/simpsons-neologisms/"/>
    <title>Simpsons Neologisms</title>
    <updated>2005-11-24T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">Apparently someone created a Wikipedia page that lists &lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_neologisms_on_The_Simpsons&quot;&gt;made-up words&lt;/a&gt; found in &lt;em&gt;The Simpsons&lt;/em&gt;. Cool.
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/11/23/safari-javascript-debugging</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/11/23/safari-javascript-debugging/"/>
    <title>Safari Javascript Debugging</title>
    <updated>2005-11-23T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;I really really hate Javascript. And out of all the things that I can whine on about, the fact that it's hard to debug nearly tops them all. &lt;/p&gt;

&lt;p&gt;So, it makes me happy to have discovered that Safari has a hidden Javascript debug console. Just type the following in a terminal and restart Safari:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;defaults write com.apple.Safari IncludeDebugMenu 1
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;(&lt;em&gt;I am running Safari 2.0.2 (416.12) on OS X 10.4.&lt;/em&gt;)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/11/19/googles-internet</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/11/19/googles-internet/"/>
    <title>Google's Internet</title>
    <updated>2005-11-19T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Cringley's latest &lt;a href=&quot;http://www.pbs.org/cringely/pulpit/pulpit20051117.html&quot;&gt;post&lt;/a&gt; about Google focuses on a mystery shipping container found in a Google garage:&lt;/p&gt;

&lt;blockquote&gt;This shipping container is a prototype data center. Google hired a pair of very bright industrial designers to figure out how to cram the greatest number of CPUs, the most storage, memory and power support into a 20- or 40-foot box. We're talking about 5000 Opteron processors and 3.5 petabytes of disk storage that can be dropped-off overnight by a tractor-trailer rig. The idea is to plant one of these puppies anywhere Google owns access to fiber, basically turning the entire Internet into a giant processing and storage grid.
&lt;/blockquote&gt;

&lt;p&gt;He then explores what (and how) Google might make use of this grid (World Internet Domination). I'm still digesting what he has said for my own take, but my own gut reactions are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's not only a Data Center itself, but can be &lt;b&gt;the key future&lt;/b&gt; building block for even larger Data Centers.&lt;/li&gt;
&lt;li&gt;Google may truely bring &lt;a href=&quot;http://en.wikipedia.org/wiki/Grid_computing&quot;&gt;grid computing&lt;/a&gt; capabilities to the masses, something I don't see Sun or IBM doing well.&lt;/li&gt;
&lt;li&gt;This is one big fun geek toy that I want to get my hands on. :)&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/11/16/mega-close</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/11/16/mega-close/"/>
    <title>Mega Close</title>
    <updated>2005-11-16T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">The winning Mega Millions lotto ticket (worth $315 million) was purchased at a store about &lt;a href=&quot;http://local.google.com/maps?q=1682+West+Katella+Avenue,+in+Anaheim,+CA&quot;&gt; two blocks away from work&lt;/a&gt;. My coworkers and I joke that we walked the wrong direction to buy our tickets. :)
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/11/11/feedmesh-python-solution</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/11/11/feedmesh-python-solution/"/>
    <title>FeedMesh Python Solution</title>
    <updated>2005-11-11T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Ralph Meijer's blog has a &lt;a href=&quot;http://ralphm.net/blog/2005/10/08/twisted_sprint&quot;&gt;nice entry&lt;/a&gt; about connecting to the FeedMesh network, even with sample code.&lt;/p&gt;

&lt;p&gt;This solution was exactly what I was looking for. The &lt;a href=&quot;http://www.twistedmatrix.com/&quot;&gt;Twisted Framework&lt;/a&gt; is used for handling both the network connection and the XML streaming (&lt;a href=&quot;http://twistedmatrix.com/projects/xish/&quot;&gt;Xish package&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;However, I ran into a little problem when testing the code out. I found was that the XmlStreamFactory failed to instantiate. It required another parameter in its constructor. WTF?&lt;/p&gt;

&lt;p&gt;Simple reason. Ralph has been making changes to remove all the Jabber specific stuff out of Xish. That parameter was for Jabber and Ralph's changes haven't made it out into a new release.&lt;/p&gt;

&lt;p&gt;So, for those that already have Xish 0.1.0 installed, here are the following code changes:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;auth&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xmlstream&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Authenticator&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xmlstream&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;XmlStreamFactory&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;auth&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Original Sample Code:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;twisted.xish&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xmlstream&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;twisted.internet&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;reactor&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onPing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Ping for &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;rss&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;connected&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Connected!&amp;#39;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;xs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;addObserver&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;/weblog&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;onPing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xmlstream&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;XmlStreamFactory&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;addBootstrap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xmlstream&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;STREAM_START_EVENT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;connected&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;reactor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;connectTCP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;sandbox.pubsub.com&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;reactor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/11/08/waiting-at-the-apple-store</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/11/08/waiting-at-the-apple-store/"/>
    <title>Waiting at the Apple Store</title>
    <updated>2005-11-08T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Getting service at the Apple Genius bar is gawd awfully slow even when you've made an appointment ahead of time. My cousin (Elliot) and I had spent an hour  in the Pasadena Apple Store waiting in line to get help on Camellia's iBook. (The iBook had a bad LCD). This pre-dinner stopover was not especially enjoyable on an empty stomach.&lt;/p&gt;

&lt;p&gt;I am making a simple plea for those &lt;em&gt;&quot;Apple Geniuses&quot;&lt;/em&gt; to actually use their genius brains and help customers in a timely manner.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/11/06/bunnies-and-geeks</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/11/06/bunnies-and-geeks/"/>
    <title>Bunnies and Geeks</title>
    <updated>2005-11-06T00:00:00-08:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Playboy wasn't even on a list of organizations that I would've pegged to support Open Source projects:&lt;/p&gt;

&lt;a href=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2005-11-playboymirrorsapachedownloads.png&quot;&gt;&lt;img alt=&quot;Playboy\&amp;#39;s Apache Mirror&quot; src=&quot;http://badpopcorn.com.s3.amazonaws.com/images/2005-11-playboymirrorsapachedownloads.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/11/03/2-words-jack-thompson</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/11/03/2-words-jack-thompson/"/>
    <title>2 Words... Jack Thompson</title>
    <updated>2005-11-03T00:00:00-08:00</updated>
    <author>
      <name>aaron</name>
    </author>
    <content type="html">&lt;p&gt;So, 
As many of you know, I work in the video game industry. Many who do not closely follow the industry have missed out on some rather interesting drama and just plain good entertainment brought about by one &lt;a href=&quot;http://www.jackthompson.org/&quot;&gt;Jack Thompson&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Now, this man is on a crusade against violence and sexuality in video games. &lt;strong&gt;This is his right.&lt;/strong&gt; I have nothing against the cause of protecting children, and I too believe that children should not be playing &lt;a href=&quot;http://www.rockstargames.com/sanandreas/&quot;&gt;Grand Theft Auto&lt;/a&gt; or similar games. My problem with Mr. Thompson is that I believe the actual parenting of children should be done by...well...&lt;strong&gt;their parents.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is not actually what this post is about. You see Mr. Thompson has been seeming less and less rational each time I hear of him and...well he said this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.next-gen.biz/index.php?option=com_content&amp;task=view&amp;id=1496&amp;Itemid=2&quot;&gt;&quot;
Certain regional governments in Japan have banned the sale of the Grand Theft Auto games to minors, but Japan's Sony has no problem whatsoever dumping this garbage into American kids' brains. Looks like Pearl Harbor 2 by Sony/Take-Two...
&quot;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now statements can often be taken out of context for sheer shock value so the responsible people at &lt;a href=&quot;http://www.gamepolitics.com/&quot;&gt;Game Politics&lt;/a&gt; did their best to make sure this was really his intent, mentioning that his comment could appear insensitive, and he said this:&lt;/p&gt;

&lt;blockquote&gt;
&quot;
Insensitive? What the Japanese are doing to our kids is insensitive and racist. The Japanese have for a very long time dumped pornography into this country in a fashion they would not tolerate in their own country. It is another version of Pearl Harbor.
&quot;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;I could not make stuff like this up. &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;He reportedly went so far as to &lt;a href=&quot;http://www.livejournal.com/users/gamepolitics/122526.html?thread=4599454#t4599454&quot;&gt;email the Japanese Ambassador&lt;/a&gt;, with a strongly worded letter that starts as a request for assistance, and however ends up nearly accusing the entire country of abusing America's youth. I am not Japanese, nor am I an Ambassador, let alone the Japanese Ambassador...yet I am baffled and mildly offended. Can one expect help from someone while making this sort of attack on them at the same time? Does Mr. Thompson believe that the nation of Japan is responsible for Sony's actions in America? And more importantly, does Mr. Thompson think Sony is as much to blame for this as Rockstar games...&lt;strong&gt;the company that actually created the questionable content?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I believe this man to be a &lt;strong&gt;true and undeniable Zealot&lt;/strong&gt;, and usually there is nothing more frightening to me than a zealot... &lt;strong&gt;But, Damn. He sure puts on a good show...&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/28/name-squatting-still-big-money</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/28/name-squatting-still-big-money/"/>
    <title>Name Squatting... Still Big Money?</title>
    <updated>2005-10-28T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Well, not the point of the &lt;a href=&quot;http://www.manageability.org/blog/stuff/artificial-scarcity&quot;&gt;post&lt;/a&gt;, but here's a choice fact:&lt;/p&gt;

&lt;blockquote&gt;a company called Ultsearch that made money gobbling up expired domains. Ultsearch would scan the registries for expiring domains, snatching those domains with a descent level of search engine traffic and then turning the domain into advertiser sponsored links. This garbage collection activity netted the owner a mind boggling $164.2 million when it was acquired late last year. &lt;/blockquote&gt;

&lt;p&gt;Wow.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/26/iam-microsofts-beyatch</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/26/iam-microsofts-beyatch/"/>
    <title>I...am Microsoft's Beyatch</title>
    <updated>2005-10-26T00:00:00-07:00</updated>
    <author>
      <name>aaron</name>
    </author>
    <content type="html">&lt;p&gt;Really, I am currently just in love with M$ and I can't explain why.&lt;/p&gt;

&lt;p&gt;I work in the gaming industry so of course a good percentage of my adulation for the company comes from their interaction with, and my perception of their intentions in the gaming industry. &lt;/p&gt;

&lt;p&gt;I started off as a PC gamer, so when I heard about Microsoft making a console I was ecstatic. They would of course release what is arguably a PC to plug into your TV. I feel that is mostly what the original XBOX was, it even felt large and heavy like a PC.&lt;/p&gt;

&lt;p&gt;Now, from the moment they announced they were entering the console market I, in my fanboy-ness, imagined that they were only joining the console market in attempt to eventually destroy said market. &lt;/p&gt;

&lt;p&gt;I believe Microsoft has proven me right. Xbox 360's controllers are USB and will be plug and play compatible with Windows Vista, Microsoft's upcoming OS. Not only that but M$ is currently claiming that Vista will be able to connect to XBOX Live, their online service for the Xbox. Microsoft spokespeople have also been pushing the idea of streaming instalation of games for Vista, meaning that PC games could be played just like console games, just pop in the disc and start playing, no pesky instsallation times. So...am  I crazy? Or does it look as if my masters at Microsoft are trying to break people of their pesky console gaming habit?&lt;/p&gt;

&lt;p&gt;As someone who was playing Wolfenstein and Mechwarrior when the rest of the world was performing fatalities with Mortal Kombat, or grabbing gold ring in the original Sonic, I say, good Luck and God Bless you Microsoft...&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/26/a-stateful-subtlety</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/26/a-stateful-subtlety/"/>
    <title>A Stateful Subtlety</title>
    <updated>2005-10-26T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;A &lt;a href=&quot;http://www.redmountainsw.com/wordpress/archives/stateful-web-services&quot;&gt;post&lt;/a&gt; over at the counterpoint blog brings up Stateful Web Services.&lt;/p&gt;

&lt;p&gt;After reading it over a few times, I believe the post asserts that:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;SOA and Web Services lend themselves towards a course-grained API. (Which I think it means WS-*).&lt;/li&gt;
&lt;li&gt;But user interactions require repetitive low-latency fine-grained interactions.
&lt;i&gt;I believe that the post suggests that the client will interact over the network to a server (Web Service) with a fine-grained API(maybe a proxy that sits in front of a course-grained Web Service).&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;And finally its example of, the &quot;Attaching documents to a webmail requires a temporary creation of a resource on the server.&quot; that can be used to achieve fine-grained access. This is used to claim: &quot;statefulness is a necessary evil, but it is mitigated by the service providing a fool-proof interaction sequence.&quot;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I am not opposed to the creation of temporary resources, nor do I have a position on fine-grained vs course-grained.&lt;/p&gt;

&lt;p&gt;But, let me suggest that &lt;b&gt;state&lt;/b&gt; isn't something that needs to be stored and managed by the service. Rather, state is just a snapshot of the resources found on the server. A very subtle distinction. And yes, I am suggesting REST.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/25/truveocom</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/25/truveocom/"/>
    <title>truveo.com</title>
    <updated>2005-10-25T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;About a month or two ago Ben(a fellow badpocorn blogger) told me about Robert X. Cringely weekly article on pbs.org.  I have read most of his articles since and enjoyed every one.  In his article &lt;a href=&quot;http://www.pbs.org/cringely/pulpit/pulpit20050929.html&quot;&gt; Acts of Omission&lt;/a&gt; he mentions a cool search engine called Truveo.  I know what you are thinking, &quot;I use Google&quot;.  Well I use Google too, but I don't use Google to find videos online.  Why? Well mostly because Google isn't very good at indexing videos. Mainly because Google is good at indexing static text while videos are dynamic. Here is the link, try it out yourself &lt;a href=&quot;http://www.truveo.com/&quot;&gt; Truveo.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An Excerpt from Cringely's article&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;em&gt;&quot;Back to Truveo, which, rather than parsing and analyzing the html of a page for clues, actually &quot;uses&quot; the page. There is a huge difference between analyzing html and actually creating a synthetic user who exercises the code itself looking for results, as Truveo does. Most search engines don't do this, frankly, because it takes a lot of computing power, but Truveo mysteriously claims to have solved that problem. Whatever they do, the upshot is they've found and indexed a lot more video on the Internet than Google or Yahoo even knows exist.&quot;&lt;/em&gt;

&lt;p&gt;-&lt;a href=&quot;http://www.pbs.org/cringely/pulpit/pulpit20050929.html&quot;&gt; Acts of Omission&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;About Us Section From Truveo.com&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;em&gt;&quot;With our unique approach to crawling, not only can we find the videos that the other crawlers miss, but we can also collect rich and relevant metadata for each video. As a result, when you search for video with Truveo, you can always find high-quality, relevant search results. The next time you are looking for a web video to watch, we invite you to try our search engine and see for yourself.&quot;&lt;/em&gt;
&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/25/google-pwns-you</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/25/google-pwns-you/"/>
    <title>Google Pwns You!</title>
    <updated>2005-10-25T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;Google has a new &lt;a href=&quot;http://base.google.com/&quot;&gt;database&lt;/a&gt;... which isn't quite live at this time. But out of those that have seen it while it was still up: John Battelle says, &lt;a href=&quot;http://battellemedia.com/archives/001960.php&quot;&gt;&quot;All Your Base Belongs To Google&quot;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The gist: Users will be able to add any type &lt;em&gt;Item&lt;/em&gt; to the database.&lt;/p&gt;

&lt;p&gt;A whole lot of speculation is involved in what it is intended for, or how people will use it, or who it's going to crush (eBay, craigslist, backpack). Just think about this and Google's Froogle combined.&lt;/p&gt;

&lt;p&gt;I'm going to withhold my thoughts and feelings about how this possible juggernaut will affect &lt;a href=&quot;http://www.google.com/search?q=the+long+tail&quot;&gt;The Long Tail&lt;/a&gt; of niche information services.&lt;/p&gt;

&lt;p&gt;The only thing I want to know is, &lt;strong&gt;where's the API&lt;/strong&gt;? And will it be RESTful? And will it lend itself easily for AJAX style apps.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://battellemedia.com/images/55908013_c00f7a76b9-tm.jpg&quot; alt=&quot;John Battelle's Screenshot&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/dirson/55908013/&quot;&gt;Image on Flickr&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://telendro.com.es/imagenes/base.gif&quot;&gt;Another Image&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.seweso.com/blog/google-base2.png&quot;&gt;Image of adding a housing Item&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/25/a-feed-for-the-world</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/25/a-feed-for-the-world/"/>
    <title>&quot;...A feed for the world&quot;</title>
    <updated>2005-10-25T00:00:00-07:00</updated>
    <author>
      <name>aaron</name>
    </author>
    <content type="html">&lt;p&gt;So Bennie and I had this conversation via IM recently, discussing this exact site recently and Ben said what is currently my most favourite quote from him. Please read the conversation and enjoy:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;
(10:42:38) &lt;strong&gt;Ben&lt;/strong&gt;: Ok. here's what i was thinking
(10:43:01) &lt;strong&gt;Ben:&lt;/strong&gt; picture &quot;The Web&quot;
(10:43:35) &lt;strong&gt;Ben:&lt;/strong&gt; not &quot;The Internet&quot;... for the most part, think &quot;The Web&quot;. and when I say &quot;The Web&quot;,
  i mean how people normally use it
(10:43:49) &lt;strong&gt;Ben:&lt;/strong&gt; through the browser.. everything through the browser..

(10:44:02) &lt;strong&gt;Aaron:&lt;/strong&gt; um...okay?

(10:44:16) &lt;strong&gt;Ben:&lt;/strong&gt; Think not about the actual technology. think about what people do with the progams
(10:44:41) &lt;strong&gt;Ben:&lt;/strong&gt; what do you have? You have IM, email, (now voice chat), webpages, wiki
(10:44:52) &lt;strong&gt;Ben:&lt;/strong&gt; you've got blogs and social networks.
(10:45:15) &lt;strong&gt;Ben:&lt;/strong&gt; and you tie in everything together with a sort of aggregation and syndication...
(10:46:17) &lt;strong&gt;Ben:&lt;/strong&gt; through all my social interactions... it's a sort of a river of information that comes to me.
(10:46:51) &lt;strong&gt;Ben:&lt;/strong&gt; and as I talk, it's water emanating from me.
(10:47:09) &lt;strong&gt;Ben:&lt;/strong&gt; ok. here's an example. go to httpp://www.foofiles.com/u/byu/myfeeds/
(10:47:30) &lt;strong&gt;Ben:&lt;/strong&gt; erk. added extra p in the http

(10:48:01) &lt;strong&gt;Aaron:&lt;/strong&gt; okay, got it

(10:48:39) &lt;strong&gt;Ben:&lt;/strong&gt; ok. more and more people don't have to go to many different websites.
(10:48:54) &lt;strong&gt;Ben:&lt;/strong&gt; everything that they're interested in &quot;comes to them&quot;.
(10:49:48) &lt;strong&gt;Ben:&lt;/strong&gt; there's some fancy stuff that can be done... like having someone like
google filter and search for things. but right now most people are
just subscribing to feeds that they want

(10:49:49) &lt;strong&gt;Aaron:&lt;/strong&gt; okay, that is cool. I get ehat part

(10:50:24) &lt;strong&gt;Ben:&lt;/strong&gt; what i feel that we should do is to be a feed to the world.
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Let's examine that bit, &quot;...A feed for the world&quot;. Now you may not know this but Ben is, at least externally, a truly jaded individual. So how does this jaded, arguably manic depressive, techie end up delivering this line...not only without any sarcasm, but with the wide eyed innocence of a child saying they want to be an astronaut?&lt;/p&gt;

&lt;p&gt;And so I'm here...typing away on my laptop, knowing that when morning comes I'll wish I had been asleep, but I'm going on because, in the 10 + years I've known him, it's the most beautiful thing he's ever said...and I've got to do my part to make it happen. Because as I told Ben:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;
(11:15:18) &lt;strong&gt;Ben:&lt;/strong&gt; what do you think?

(11:15:36) &lt;strong&gt;Aaron&lt;/strong&gt; You had me at &lt;strong&gt;(10:50:24) Ben: what i feel that we should do is to be a feed to the world.&lt;/strong&gt;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;By The Way, If I get any say in it what-so-ever, that will be the site's slogan. &lt;strong&gt;&quot;A feed for the World.&quot;&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/24/an-odd-racing-addiction</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/24/an-odd-racing-addiction/"/>
    <title>An Odd Racing Addiction</title>
    <updated>2005-10-24T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;We have an X-Box at work. And at lunch, my coworkers and I play games. It's a rather nice luxary to have.&lt;/p&gt;

&lt;p&gt;Lately, a few of us have been attempting to &quot;Perfect&quot; the &quot;Burnout Revenge&quot; game. What does this mean?&lt;/p&gt;

&lt;p&gt;We acheive the &quot;Awesome&quot; rating and &quot;Gold&quot; medal (at the same time) for each map in the game.&lt;/p&gt;

&lt;p&gt;I don't know why I'm talking about this, but it probably has to deal with spending two hours after work trying to &quot;Perfect&quot; the very last we have left to do. And I came 1 takedown away from doing it...&lt;/p&gt;

&lt;p&gt;And why is this special? I hate racing games. I hate &quot;Need for Speed&quot;. I hate the &quot;Grand Turismo&quot; series. But I love this game. And we've spent weeks of lunches playing the game to get where we are... so close, yet so far.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/23/blockbusting-dvds</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/23/blockbusting-dvds/"/>
    <title>Blockbusting DVDs</title>
    <updated>2005-10-23T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;My sister and I just recently subscribed our dad to the Blockbuster online movie rental program. Let me just say that he absolutely loves it. That is, he goes home everyday from work and just pops in a DVD. On weekdays, he's the biggest couch potato you'll ever see.&lt;/p&gt;

&lt;p&gt;That isn't a big problem. The problem is that he wants to &lt;a href=&quot;http://www.dvdshrink.org/&quot;&gt;DVD Shrink&lt;/a&gt; each and every one of them. Why is that the problem? Is it the &quot;pirating&quot; aspect? No. Is it that he'll never watch said DVDs ever again? Not really.&lt;/p&gt;

&lt;p&gt;The problem I see is that DVDs are just like those nasty VHS tapes. They linger on, without ever really dying off. My parents still have a cabinet full of VHS tapes. Their neighbors have stacks of the same VHS copies. Soon, it'll be a cabinet of DVDs. Just you wait. HD-DVD and Blueray are just around the corner.&lt;/p&gt;

&lt;p&gt;Physical media, yes necessary and generally great at storing information stuff, is just a big old plain nightmare of clutter when it comes to movies and music that is already replicated hundrends of thousands of times over. I want my on-demand streaming over a super fast network!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/11/message-vs-testimonial</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/11/message-vs-testimonial/"/>
    <title>Message vs Testimonial</title>
    <updated>2005-10-11T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;Testimonial:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A statement in support of a particular truth, fact, or claim.&lt;/li&gt;
&lt;li&gt;A written affirmation of another's character or worth; a personal recommendation.&lt;/li&gt;
&lt;li&gt;Something given in appreciation of a person's service or achievement; a tribute.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Message:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A usually short communication transmitted by words, signals, or other means from one person, station, or group to another.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Has anyone ever gone through this scenario.&lt;/p&gt;

&lt;p&gt;You sign on to friendster, and notice that one of your &quot;friends&quot; has new testimonial(s). Intereseted in what other people have to say about your &quot;friend&quot; you click on their profile.  You wait and wait because friendster likes to take its time to load.  Finally when it is finished you scroll to the bottom to view the new testimonial. It reads...&lt;/p&gt;

&lt;blockquote&gt;
&quot;Hey stupid, thought i would say hi&quot;
&lt;/blockquote&gt;

&lt;p&gt;What the fuck is that?  That is clearly not a fucking testimonail.  What part of this statment affirms a character trait for your &quot;friend&quot;. It is message.   I would understand if someone posted a message because friendster didn't have a means to  allow  messages  between users.  However, the feature is cearly present.  So why would someone do something so stupid. I thought about it and I figured it out.&lt;/p&gt;

&lt;p&gt;What is the difference between a message and a testimonial on friendster.  Well a message is sent to an individual person and not seen by anyone, when a testimonial is on the person's profile for all to view.  There in lies the reason why somone would post such a restarded testimonial, marketing.  They want a spot on the person's profile, am advertisment spot.  They want someone to look at that person's profile, and be like &quot;ohhh who is this person&quot;.  It is selfish, rude, but most of all really retarted. However, the person who said ok the testimonail is just as much at fault.  Please as a networking community lets stop doing this.  Go through your testimonials, and if they are retarted delete them.  If you are one of those people, its ok...you can beat this thing.  I'll be honest, I have some like that.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/09/76</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/09/76/"/>
    <title>7.6</title>
    <updated>2005-10-09T00:00:00-07:00</updated>
    <author>
      <name>moe</name>
    </author>
    <content type="html">&lt;p&gt;As most of us know, or should know, a 7.6 magnitude earthquake hit Pakistan in the recent past.  From the last article I read the death toll was up to 30,000 (most of those in Pakistani Kashmir).  Here is a map of the earthquake if anyone is interested.  If you can please donate.&lt;/p&gt;

&lt;p&gt;Although I read about death around the world everyday, this event effected me more...the question is why?  I moved from Pakistan to the United States when I was a little kid and don't remember much if anything from the country.  Everything I have learned I have read in articles or books. Speaking of which, if you want to read about a soap opera of a political history do pick up any book on the history of Pakistani leaders. From exiles to vengfull daughters, its all there. Anyway, back to my point.&lt;/p&gt;

&lt;p&gt;30,000 people died and I believe it was on the news for a few seconds or so.  Well seconds compared to the Katrina coverage which had a death toll of a few thousand.  At first this got me really mad.  I sat there and thought to myself, &quot;So many more people died in Pakistan, and it is like no one gives a shit.&quot;  I am sure some of you felt the same way.  But if you reflect a bit, it is just of human nature.  Before any Pakistani person begins to bitch about the fact that everyone forgot about the earthquake (which they will, it's quick news) remind yourself of Dec. 26, 2004. No bitch, not the made up Jesus day (yes it is made up, just face it...its winter solstice). That was actually the date of 9.0 earthquake that hit Indonesia, which killed somehwere around 170,000 people.  Be honest, you found out about it, felt bad...but couldn't make a connection. So don't get mad at people in America for caring more about the Katrian victims and situation more then the Pakistan earthquake.&lt;/p&gt;

&lt;p&gt;Think about it.  If you had to pick between someone in your family dying or a 100 people in Cuba who would you pick? How about your whole family, including cousins...or a 1000 people in Equador?  Don't lie, you know what decision you would make.  It is the flaw inside all people, we pretend that the world revolves around us.  Everyone is just characters in the story of our life.  It is sad but it is true. Sorry to burst your bubble.  However, if it makes you feel better...I would glady choose anyone's life over yours.&lt;/p&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;We all have money that we can send.  So please, for some reason care about people you have never met, who will most likely never meet you.  But don't only do it now, do it next time also.  When it is a group of people in Africa, Australia, India, Mexico, where ever. How about for one weekend...instead of paying the 20 dollars ahead to go a club...we help build someone's house back up.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://newsimg.bbc.co.uk/media/images/40950000/jpg/_40950200_cap203.jpg&quot; alt=&quot;From BBC&quot; /&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>http://badpopcorn.com/blog/2005/10/05/yay-to-laziness</id>
    <link type="text/html" rel="alternate" href="http://badpopcorn.com/blog/2005/10/05/yay-to-laziness/"/>
    <title>Yay to Laziness!</title>
    <updated>2005-10-05T00:00:00-07:00</updated>
    <author>
      <name>byu</name>
    </author>
    <content type="html">&lt;p&gt;My friends and I are lazy. And I'm one to just experiment with things. I have a generally short attention span to my &quot;hobbies&quot;. Thus, it's been a while since I visited my badpopcorn site. Not to mention the different incarnations BadPopcorn has gone through. First, it came up as a &quot;review&quot; site for really bad movies. That used the Xoops CMS. Then I got rid of that. And moved to an empty page. And then to using Etomite, which sat for a while with no content. I just like playing with these different pieces of software. Now, I've settled on Wordpress.&lt;/p&gt;

&lt;p&gt;We'll see how this blog goes. The intent is still generally the same. Put up stuff. maybe review. Actually work on a webcomic started by my friends. You know. the usual participation of people on the web... Web 2.0 that is...&lt;/p&gt;
</content>
  </entry>
  
</feed>
