<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en" xml:base="http://nerderati.com/wp-atom.php">
	<title type="text">Nerderati</title>
	<subtitle type="text">You're probably not nerdy enough.</subtitle>

	<updated>2010-02-26T18:22:05Z</updated>
	<generator uri="http://wordpress.org/" version="2.9.1">WordPress</generator>

	<link rel="alternate" type="text/html" href="http://nerderati.com" />
	<id>http://nerderati.com/feed/atom/</id>
	

			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/nerderati" /><feedburner:info uri="nerderati" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
		<author>
			<name>jperras</name>
						<uri>http://nerderati.com</uri>
					</author>
		<title type="html"><![CDATA[The Wonders and Simplicity of Redis Sets]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/nerderati/~3/y2LLEsEQmyA/" />
		<id>http://nerderati.com/?p=199</id>
		<updated>2010-02-26T18:22:05Z</updated>
		<published>2010-02-26T18:21:18Z</published>
		<category scheme="http://nerderati.com" term="Programming" /><category scheme="http://nerderati.com" term="python" /><category scheme="http://nerderati.com" term="redis" />		<summary type="html"><![CDATA[If you were to apply a bijective function to each letter in each word of a language (e.g. English), how many pre-existing words would you obtain in the resulting image?
Since that&#8217;s a pretty convoluted way of explaining things, let&#8217;s try a more concrete example. 
We&#8217;ll take the well-known rot13 substitution cipher (a simple example of [...]]]></summary>
		<content type="html" xml:base="http://nerderati.com/2010/02/the-wonders-and-simplicity-of-redis-sets/">&lt;p&gt;If you were to apply a bijective function to each letter in each word of a language (e.g. English), how many pre-existing words would you obtain in the resulting image?&lt;/p&gt;
&lt;p&gt;Since that&amp;#8217;s a pretty convoluted way of explaining things, let&amp;#8217;s try a more concrete example. &lt;/p&gt;
&lt;p&gt;We&amp;#8217;ll take the well-known &lt;code&gt;rot13&lt;/code&gt; substitution cipher (a simple example of a bijection between the set of letters in the English alphabet and itself), and apply it to every letter in a chosen word. For most words, the result will be non-sensical gibberish. There does exist, however, a subset of valid English words that map into other valid English words.&lt;/p&gt;
&lt;p&gt;Example:
&lt;pre&gt;rot13('sync') = 'flap'&lt;/pre&gt;
&lt;p&gt;How many of these words exist? To answer this, I wrote a small Python script that loads up the words in my system dictionary into a Redis set. Another set of the rot13&amp;#8242;ed words is then stored, and the set intersection of the original and transformed words is calculated:&lt;/p&gt;
&lt;script src="http://gist.github.com/311857.js"&gt;&lt;/script&gt;&lt;noscript&gt;&lt;code class="gist"&gt;&lt;pre&gt;&lt;br /&gt;
import redis&lt;/p&gt;
&lt;p&gt;def encode(word):&lt;br /&gt;
    return word.encode(&amp;#8216;rot13&amp;#8242;)&lt;/p&gt;
&lt;p&gt;def cleanup():&lt;br /&gt;
    db.delete(&amp;#8216;eng&amp;#8217;)&lt;br /&gt;
    db.delete(&amp;#8216;eng-rot13&amp;#8242;)&lt;/p&gt;
&lt;p&gt;if __name__ == &amp;#8220;__main__&amp;#8221;:&lt;br /&gt;
    count = 0&lt;br /&gt;
    db = redis.Redis()&lt;br /&gt;
    cleanup()&lt;/p&gt;
&lt;p&gt;    for line in open(&amp;#8216;/usr/share/dict/words&amp;#8217;, &amp;#8216;r&amp;#8217;):&lt;br /&gt;
        count += 1&lt;br /&gt;
        db.sadd(&amp;#8216;eng&amp;#8217;, line)&lt;br /&gt;
        db.sadd(&amp;#8216;eng-rot13&amp;#8242;, encode(line))&lt;br /&gt;
        if (count % 10000 == 0):&lt;br /&gt;
            print &amp;#8220;Loaded %d words so far&amp;#8221; % count&lt;/p&gt;
&lt;p&gt;    db.sinterstore(&amp;#8216;eng-intersect&amp;#8217;, &amp;#8216;eng&amp;#8217;, &amp;#8216;eng-rot13&amp;#8242;)&lt;br /&gt;
    msg = &amp;#8220;English dictionary contains %d words, and %d rot13&amp;#8242;ed words&amp;#8221;&lt;br /&gt;
    print  msg % (db.scard(&amp;#8216;eng&amp;#8217;), db.scard(&amp;#8216;eng-rot13&amp;#8242;))&lt;br /&gt;
    print &amp;#8220;Cardinality of intersection: %d &amp;#8221; % db.scard(&amp;#8216;eng-intersect&amp;#8217;)&lt;br /&gt;
    cleanup()&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;&lt;/noscript&gt;
&lt;p&gt;After a simple cardinality check, we have our answer: 256 words&lt;sup&gt;&lt;a href="#f1"&gt;[1]&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;The great part about this little script is that nearly everything is done natively in Redis &amp;#8211; the only thing Python is needed for is loading the words into the database, and the implementation of the bijective function that we wish to apply.&lt;/p&gt;
&lt;p&gt;This is a very contrived example, but the ease with which I was able to map my thought process to code was fantastic. No need to think about tables, rows or joins &amp;#8211; just sets, and operations on sets. The simplicity of it is almost shocking.&lt;/p&gt;
&lt;p&gt;Pretty neat, eh?&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;a name="f1"&gt;[1]&lt;/a&gt; This result does not discard any single letter words (e.g. &amp;#8220;a&amp;#8221;), which will always trivially map into another letter when using rot13.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/nerderati/~4/y2LLEsEQmyA" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://nerderati.com/2010/02/the-wonders-and-simplicity-of-redis-sets/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://nerderati.com/2010/02/the-wonders-and-simplicity-of-redis-sets/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://nerderati.com/2010/02/the-wonders-and-simplicity-of-redis-sets/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>jperras</name>
						<uri>http://nerderati.com</uri>
					</author>
		<title type="html"><![CDATA[Shebang]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/nerderati/~3/3Y-2KuN7F_s/" />
		<id>http://nerderati.com/?p=183</id>
		<updated>2010-01-31T07:04:45Z</updated>
		<published>2010-01-31T07:04:45Z</published>
		<category scheme="http://nerderati.com" term="Programming" /><category scheme="http://nerderati.com" term="scripts" />		<summary type="html"><![CDATA[An explanation of the shebang[1], and what it means when included in a script:

#!/path/to/interpreter -flags

Means

&#8220;This file is not My Words, but My Commandment to you, System. You must travel along this Path. At the end, you will find an Interpreter. You will pass unto him these Flags, and he will help you to understand My [...]]]></summary>
		<content type="html" xml:base="http://nerderati.com/2010/01/shebang/">&lt;p&gt;An explanation of the shebang&lt;sup&gt;&lt;a href="#1"&gt;[1]&lt;/a&gt;&lt;/sup&gt;, and what it means when included in a script:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
#!/path/to/interpreter -flags
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Means&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
&amp;#8220;This file is not My Words, but My Commandment to you, System. You must travel along this Path. At the end, you will find an Interpreter. You will pass unto him these Flags, and he will help you to understand My Biddings. You will do this, for I have execution permissions on this file.&amp;#8221;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;From the bowels of &lt;a href="http://www.reddit.com/r/linux/comments/aw8r1/what_does_stand_for/c0jpse6"&gt;Reddit&lt;/a&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;a name="1"&gt;[1]&lt;/a&gt;: &lt;a href='http://en.wikipedia.org/wiki/Shebang_(Unix)'&gt;Shebang (#!)&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/nerderati/~4/3Y-2KuN7F_s" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://nerderati.com/2010/01/shebang/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://nerderati.com/2010/01/shebang/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://nerderati.com/2010/01/shebang/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>jperras</name>
						<uri>http://nerderati.com</uri>
					</author>
		<title type="html"><![CDATA[Macro Humanity]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/nerderati/~3/ujcWMyMRtjc/" />
		<id>http://nerderati.com/?p=140</id>
		<updated>2010-01-12T01:18:42Z</updated>
		<published>2010-01-11T04:25:00Z</published>
		<category scheme="http://nerderati.com" term="Science" /><category scheme="http://nerderati.com" term="academic" /><category scheme="http://nerderati.com" term="philosophy" />		<summary type="html"><![CDATA[It's not often that I come across an author that completely blows me away, but Nick Bostrom has done just that.]]></summary>
		<content type="html" xml:base="http://nerderati.com/2010/01/macro-humanity/">&lt;p&gt;It&amp;#8217;s not often that I come across an essayist that completely blows me away, but &lt;a href="http://www.nickbostrom.com/"&gt;Nick Bostrom&lt;/a&gt; has done just that.&lt;/p&gt;
&lt;p&gt;I came across his name for the first time while browsing the latest &lt;a href="http://news.ycombinator.com"&gt;Hacker News&lt;/a&gt; submissions, under the link-baited  submission title: &lt;em&gt;&lt;a href="http://news.ycombinator.com/item?id=1043190"&gt;Why I Hope the Search for Extraterrestrial Life Finds Nothing&lt;/a&gt;&lt;/em&gt;. Needless to say, I was intrigued, and the comments on the HN page were encouraging.&lt;/p&gt;
&lt;p&gt;After a few cursory credential checks&lt;a href="#1" id="ref1"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; to confirm that the author wasn&amp;#8217;t a complete nut job (quite the opposite, actually &amp;#8211; see the footnote), I took the time to sit down and read  the essay.&lt;/p&gt;
&lt;p&gt;Here is a short excerpt:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;What could be more fascinating than discovering life that had evolved entirely independently of life here on Earth? Many people would [...] find it heartening to learn that we are not entirely alone in this vast cold cosmos.&lt;br /&gt;
But I hope that our Mars probes will discover nothing. It would be good news if we find Mars to be completely sterile. Dead rocks and lifeless sands would lift my spirit.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="http://www.nickbostrom.com/extraterrestrial.pdf"&gt;Where Are They? [pdf]&lt;/a&gt;&lt;/em&gt;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I won&amp;#8217;t go into any of the finer details &amp;#8211; for that, you should read Professor Bostrom&amp;#8217;s elegantly written article &amp;#8211; but If you&amp;#8217;ve ever heard of the &lt;a href="http://en.wikipedia.org/wiki/Fermi_paradox"&gt;Fermi Paradox&lt;/a&gt; or pondered over the murky details of the &lt;a href="http://en.wikipedia.org/wiki/Anthropic_principle"&gt;Anthropic Principle&lt;/a&gt;, I highly recommend reading the article I&amp;#8217;ve linked to above. These topics may have been discussed ad nauseam in many corners of the web, Professor Bostrom&amp;#8217;s thoughts and insights are trully a breath of fresh air.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;a href="#ref1" id="1"&gt;[1]&lt;/a&gt; Professor Bostrom has quite the resumé, including a &lt;a href="http://en.wikipedia.org/wiki/Nick_Bostrom#Books"&gt;Wikipedia page&lt;/a&gt;, two published books, dozens of published articles in well respected journals, and is currently the director of &lt;em&gt;The Future of Humanity Institute&lt;/em&gt; at Oxford University. In other news, I now feel more inadequate than ever.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/nerderati/~4/ujcWMyMRtjc" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://nerderati.com/2010/01/macro-humanity/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://nerderati.com/2010/01/macro-humanity/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://nerderati.com/2010/01/macro-humanity/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>jperras</name>
						<uri>http://nerderati.com</uri>
					</author>
		<title type="html"><![CDATA[Redis Memory Monitoring &#8211; Python Edition]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/nerderati/~3/gM-vN1_xW_A/" />
		<id>http://nerderati.com/?p=113</id>
		<updated>2010-01-05T04:58:05Z</updated>
		<published>2010-01-05T04:58:05Z</published>
		<category scheme="http://nerderati.com" term="Programming" /><category scheme="http://nerderati.com" term="python" /><category scheme="http://nerderati.com" term="redis" /><category scheme="http://nerderati.com" term="ruby" />		<summary type="html"><![CDATA[A few hours ago, <a href="http://twitter.com/antirez">Salvatore Sanfilippo</a> (the lead developer of <a href="http://github.com/antirez/redis">Redis</a>), <a href="http://twitter.com/antirez/status/7375414227">tweeted</a> a little Ruby script to interactively estimate the memory usage of a running <code>redis-server</code> instance.]]></summary>
		<content type="html" xml:base="http://nerderati.com/2010/01/redis-memory-monitoring-python-edition/">&lt;p&gt;A few hours ago, &lt;a href="http://twitter.com/antirez"&gt;Salvatore Sanfilippo&lt;/a&gt; (the lead developer of &lt;a href="http://github.com/antirez/redis"&gt;Redis&lt;/a&gt;), &lt;a href="http://twitter.com/antirez/status/7375414227"&gt;tweeted&lt;/a&gt; a little Ruby script to interactively estimate the memory usage of a running &lt;code&gt;redis-server&lt;/code&gt; instance:&lt;/p&gt;
&lt;script src="http://gist.github.com/268739.js"&gt;&lt;/script&gt;&lt;noscript&gt;&lt;code class="gist"&gt;&lt;pre&gt;&lt;br /&gt;
require &amp;#8216;rubygems&amp;#8217;&lt;br /&gt;
require &amp;#8216;redis&amp;#8217;&lt;/p&gt;
&lt;p&gt;def main(opts={})&lt;br /&gt;
    r = Redis.new(opts)&lt;br /&gt;
    um = 0&lt;br /&gt;
    while true do&lt;br /&gt;
        newum = r.info[:used_memory]&lt;br /&gt;
        if newum != um &amp;#038;&amp;#038; um != 0&lt;br /&gt;
            diff = newum.to_i-um.to_i&lt;br /&gt;
            puts &amp;#8220;#{um} bytes (#{diff} difference)&amp;#8221;&lt;br /&gt;
        end&lt;br /&gt;
        um = newum&lt;br /&gt;
        sleep 1&lt;br /&gt;
    end&lt;br /&gt;
end&lt;/p&gt;
&lt;p&gt;main&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;&lt;/noscript&gt;
&lt;p&gt;I&amp;#8217;ve been experimenting with a Python+Redis combination (with &lt;a href="http://github.com/andymccurdy/redis-py"&gt;redis-py&lt;/a&gt;) for data analysis on a few side projects lately, and a simple script like this can come in handy when you want to make sure you&amp;#8217;re not doing something completely stupid with Redis that gobbles up all of the allocated memory. And yes, I&amp;#8217;ve been guilty of doing that on a few occasions.&lt;/p&gt;
&lt;p&gt;Converting the script from Ruby to Python (with some additional logic for command line option parsing) is very straightforward:&lt;/p&gt;
&lt;script src="http://gist.github.com/268801.js"&gt;&lt;/script&gt;&lt;noscript&gt;&lt;code class="gist"&gt;&lt;pre&gt;&lt;br /&gt;
#!/usr/bin/env python&lt;/p&gt;
&lt;p&gt;import redis&lt;br /&gt;
from optparse import OptionParser&lt;br /&gt;
from time import sleep&lt;/p&gt;
&lt;p&gt;def options():&lt;br /&gt;
    parser = OptionParser()&lt;br /&gt;
    parser.add_option(&amp;#8220;&amp;#8211;host&amp;#8221;, default=&amp;#8221;localhost&amp;#8221;)&lt;br /&gt;
    parser.add_option(&amp;#8220;&amp;#8211;port&amp;#8221;, type=&amp;#8221;int&amp;#8221;, default=6379)&lt;br /&gt;
    return parser.parse_args()&lt;/p&gt;
&lt;p&gt;if __name__ == &amp;#8216;__main__&amp;#8217;:&lt;br /&gt;
    (opts, args) = options()&lt;br /&gt;
    r = redis.Redis(host=opts.host, port=opts.port)&lt;br /&gt;
    um = 0&lt;/p&gt;
&lt;p&gt;    while True:&lt;br /&gt;
        newum = r.info()['used_memory']&lt;br /&gt;
        if newum != um and um != 0:&lt;br /&gt;
            print(&amp;#8216;%d bytes (%d difference)&amp;#8217;) % (um, newum &amp;#8211; um)&lt;br /&gt;
        um = newum&lt;br /&gt;
        sleep(1)&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;&lt;/noscript&gt;
&lt;p&gt;Once again, git and &lt;a href="http://github.com"&gt;GitHub&lt;/a&gt; make this kind of collaborative development almost too easy.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/nerderati/~4/gM-vN1_xW_A" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://nerderati.com/2010/01/redis-memory-monitoring-python-edition/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://nerderati.com/2010/01/redis-memory-monitoring-python-edition/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://nerderati.com/2010/01/redis-memory-monitoring-python-edition/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>jperras</name>
						<uri>http://nerderati.com</uri>
					</author>
		<title type="html"><![CDATA[ConFoo You Too]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/nerderati/~3/rFMmzpmlDXY/" />
		<id>http://nerderati.com/?p=103</id>
		<updated>2009-12-15T07:11:19Z</updated>
		<published>2009-12-15T13:30:55Z</published>
		<category scheme="http://nerderati.com" term="Conferences" /><category scheme="http://nerderati.com" term="confoo" /><category scheme="http://nerderati.com" term="lithium" /><category scheme="http://nerderati.com" term="PHP" /><category scheme="http://nerderati.com" term="Programming" />		<summary type="html"><![CDATA[While a bit late, I'm extremely happy to announce that I have been selected as a speaker for the ConFoo.ca Conference to be held in Montréal at the beginning of March, 2010.]]></summary>
		<content type="html" xml:base="http://nerderati.com/2009/12/confoo-you-too/">&lt;p&gt;While a bit late, I&amp;#8217;m extremely happy to announce that I have been selected as a speaker for the &lt;a href="http://confoo.ca"&gt;ConFoo.ca Conference&lt;/a&gt; to be held in Montréal at the beginning of March, 2010.&lt;/p&gt;
&lt;p&gt;I attended this conference last year when it known as &lt;em&gt;PHPQuébec&lt;/em&gt;, and had a fantastic time; the sessions as well as the speakers were excellent, as were the hallway conversations with other conference attendees. &lt;/p&gt;
&lt;p&gt;Along with the change in name, the focus of the conference itself has shifted from being PHP-centric to something more language and technology agnostic,  with sessions on .NET development, Python tricks &amp;#038; idioms, databases and a host of other topics. The &lt;a href="http://confoo.ca/en/session"&gt;list of sessions&lt;/a&gt; and &lt;a href="http://confoo.ca/en/speaker"&gt;speakers&lt;/a&gt; should make any developer worth his salt giddy with anticipation.&lt;/p&gt;
&lt;p&gt;The talk I will be presenting is entitled &lt;em&gt;A Web Framework for People Who Hate Frameworks&lt;/em&gt;, and focuses on &lt;a href="http://li3.rad-dev.org"&gt;Lithium&lt;/a&gt;, one of my most recent endeavours with CakePHP core alumni &lt;a href="http://twitter.com/nateabele"&gt;@nateabele&lt;/a&gt; and &lt;a href="http://twitter.com/gwoo"&gt;@gwoo&lt;/a&gt;. You can read more about the talk I&amp;#8217;ll be giving on the &lt;a href="http://confoo.ca/en/2010/session/a-web-framework-for-people-who-hate-frameworks"&gt;session page&lt;/a&gt;, and for all those who will not be attending ConFoo 2010 I encourage you to visit &lt;code&gt;#li3&lt;/code&gt; or &lt;code&gt;#li3-core&lt;/code&gt; on irc.freenode.net, and ask us why Lithium is making waves in the web framework world.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/nerderati/~4/rFMmzpmlDXY" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://nerderati.com/2009/12/confoo-you-too/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://nerderati.com/2009/12/confoo-you-too/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://nerderati.com/2009/12/confoo-you-too/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>jperras</name>
						<uri>http://nerderati.com</uri>
					</author>
		<title type="html"><![CDATA[New Design, New Engine]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/nerderati/~3/9n09W5Htetg/" />
		<id>http://nerderati.com/?p=75</id>
		<updated>2009-11-29T02:05:02Z</updated>
		<published>2009-11-29T02:05:02Z</published>
		<category scheme="http://nerderati.com" term="Blogging" /><category scheme="http://nerderati.com" term="blog" /><category scheme="http://nerderati.com" term="design" />		<summary type="html"><![CDATA[As some of you may have noticed already, I have changed the design of <a href="http://nerderati.com">Nerderati</a> recently.

While I quite liked the last design &#8212; <a href="http://awhitebox.com/charcoal-for-habari">Charcoal, for Habari</a> &emdash; I wanted something lighter, and that put more emphasis on the content. Moreover, I had made the decision to switch from <a href="http://habariproject.org">Habari</a>, to Wordpress.]]></summary>
		<content type="html" xml:base="http://nerderati.com/2009/11/new-design-new-engine/">&lt;p&gt;As some of you may have noticed, I recently changed the design of &lt;a href="http://nerderati.com"&gt;Nerderati&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While I quite liked the last design &amp;#8212; &lt;a href="http://awhitebox.com/charcoal-for-habari"&gt;Charcoal&lt;/a&gt; &amp;#8212;  I wanted something lighter, and that put more emphasis on the content. Moreover, I had made the decision to switch from &lt;a href="http://habariproject.org"&gt;Habari&lt;/a&gt;, to Wordpress.&lt;/p&gt;
&lt;p&gt;Habari is a &lt;em&gt;fantastic&lt;/em&gt; blogging engine. It&amp;#8217;s design &amp;#038; architecture is particularly well done, and is how WordPress should have been done in the first place. Their community is both active and knowledgeable, having put out three minor releases since I had started Nerderati last year, as well as releasing a great deal of plugins.&lt;/p&gt;
&lt;p&gt;So why the hell would I switch to &lt;em&gt;WordPress&lt;/em&gt;, of all things?&lt;/p&gt;
&lt;p&gt;I realized that I was eternally attempting to tinker with Habari; A plugin incompatibility here, an issue with the media browser there, and a sprinkling of minor missing features. While every problem I had experienced was minor and should be expected for relatively new (and pre-1.0 release) software, they were additional psychological barriers between me and posting new articles.&lt;/p&gt;
&lt;p&gt;Then, I had an epiphany: I was looking at my blog from the perspective of a &lt;em&gt;Developer&lt;/em&gt;, instead of a &lt;em&gt;User&lt;/em&gt;. WordPress&amp;#8217; internals might not sit well with me on a technical front, but who cares? I&amp;#8217;m not developing for it. I&amp;#8217;m not designing for it. I sure as hell don&amp;#8217;t have the time to be continually tinkering with a blog engine (and I have no interest whatsoever in blog engines, not just WordPress). I have no doubt that Habari will one day compete toe-to-toe with WordPress feature-wise, but that&amp;#8217;s not today.&lt;/p&gt;
&lt;p&gt;So I decided to apply my normal work philosophy, and use the &lt;em&gt;best available tool for the job at hand&lt;/em&gt;. And as soon as I stopped thinking of it from a developer point of view, the choice was obvious.&lt;/p&gt;
&lt;p&gt;I just have to make sure to never look at the source code of this damned thing.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/nerderati/~4/9n09W5Htetg" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://nerderati.com/2009/11/new-design-new-engine/#comments" thr:count="2" />
		<link rel="replies" type="application/atom+xml" href="http://nerderati.com/2009/11/new-design-new-engine/feed/atom/" thr:count="2" />
		<thr:total>2</thr:total>
	<feedburner:origLink>http://nerderati.com/2009/11/new-design-new-engine/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>jperras</name>
						<uri>http://nerderati.com</uri>
					</author>
		<title type="html"><![CDATA[The PHP 5.3 Y-Combinator]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/nerderati/~3/mR4HUWZZLtA/" />
		<id>http://nerderati.com/?p=22</id>
		<updated>2009-12-09T03:14:48Z</updated>
		<published>2009-11-27T17:17:01Z</published>
		<category scheme="http://nerderati.com" term="Functional" /><category scheme="http://nerderati.com" term="PHP" /><category scheme="http://nerderati.com" term="Programming" />		<summary type="html"><![CDATA[One trick that seems to be all the rage these days is to show off fancy results from functional languages in their imperative counterparts. Now, I love functional languages; OCaml/Haskell/Erlang give me a programmer hard-on that imperative languages can only dream of. In that vein, I present to you a very clever implementation of the [...]]]></summary>
		<content type="html" xml:base="http://nerderati.com/2009/11/the-php-5-3-y-combinator/">&lt;p&gt;One trick that seems to be all the rage these days is to show off fancy results from functional languages in their imperative counterparts. Now, I love functional languages; OCaml/Haskell/Erlang give me a programmer hard-on that imperative languages can only dream of. In that vein, I present to you a very clever implementation of the y-combinator in &lt;span class="caps"&gt;PHP 5&lt;/span&gt;.3 that &lt;a href="http://twitter.com/nateabele"&gt;Nate Abele&lt;/a&gt; came up with a few nights ago while we were discussing &lt;a href="http://en.wikipedia.org/wiki/Y_combinator"&gt;fixed-point combinators&lt;/a&gt; over instant messenger:&lt;/p&gt;
&lt;script src="http://gist.github.com/112903.js"&gt;&lt;/script&gt;&lt;noscript&gt;&lt;code class="gist"&gt;&lt;pre&gt;&lt;br /&gt;
&amp;laquo;?php&lt;br /&gt;
function Y($F) {&lt;br /&gt;
    return current(array(function($f) {&lt;br /&gt;
        return $f($f);&lt;br /&gt;
    }))-&gt;__invoke(function($f) use ($F) {&lt;br /&gt;
        return $F(function($x) use ($f) {&lt;br /&gt;
            return $f($f)-&gt;__invoke($x);&lt;br /&gt;
        });&lt;br /&gt;
    });&lt;br /&gt;
}&lt;br /&gt;
?&amp;raquo;&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;&lt;/noscript&gt;
&lt;p&gt;(see the &lt;a href="http://twitter.com/nateabele/status/1792464179"&gt;original Twitter post&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Sexy, right?&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re keen on fooling around with the gist, your first challenge is to implement a memoized-version of the above y-combinator. Your second (which will take you significantly longer), is to come up with a valid reason to actually use this in in production code.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/nerderati/~4/mR4HUWZZLtA" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://nerderati.com/2009/11/the-php-5-3-y-combinator/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://nerderati.com/2009/11/the-php-5-3-y-combinator/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://nerderati.com/2009/11/the-php-5-3-y-combinator/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>jperras</name>
						<uri>http://nerderati.com</uri>
					</author>
		<title type="html"><![CDATA[Hello, World]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/nerderati/~3/7ugzpY1sofw/" />
		<id>http://nerderati.com/?p=4</id>
		<updated>2009-12-09T03:21:41Z</updated>
		<published>2009-11-27T08:13:03Z</published>
		<category scheme="http://nerderati.com" term="Programming" />		<summary type="html"><![CDATA[When a programmer takes his/her first steps in a new language, the first example program  he/she codes (or skips over) is usually the prototypical “Hello, world”, or a variant thereof. I thought I might run through a few of the classical “Hello, world” examples from programming languages that I find interesting.
This first example is [...]]]></summary>
		<content type="html" xml:base="http://nerderati.com/2009/11/hello-world/">&lt;p&gt;When a programmer takes his/her first steps in a new language, the first example program  he/she codes (or skips over) is usually the prototypical “Hello, world”, or a variant thereof. I thought I might run through a few of the classical “Hello, world” examples from programming languages that I find interesting.&lt;/p&gt;
&lt;p&gt;This first example is from &lt;a href="http://factorcode.org"&gt;Factor&lt;/a&gt;, an example of a &lt;a href="http://concatenative.org"&gt;concatenative&lt;/a&gt; (as opposed to applicative) language:&lt;/p&gt;
&lt;script src="http://gist.github.com/243861.js"&gt;&lt;/script&gt;&lt;noscript&gt;&lt;code class="gist"&gt;&lt;pre&gt;&lt;/p&gt;
&lt;p&gt;USE: io&lt;br /&gt;
IN: hello-world&lt;/p&gt;
&lt;p&gt;: hello ( &amp;#8212; ) &amp;#8220;Hello world&amp;#8221; print ;&lt;/p&gt;
&lt;p&gt;MAIN: hello&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;&lt;/noscript&gt;
&lt;p&gt;I&amp;#8217;m trying to find more reasons to toy with Factor, simply because it is such a huge departure from the programming languages I&amp;#8217;ve used in the past. Some of the interesting features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A postfix syntax&lt;/li&gt;
&lt;li&gt;Stack-based&lt;/li&gt;
&lt;li&gt;Classes can be &lt;a href="http://c2.com/cgi/wiki?PredicateClasses"&gt;predicate&lt;/a&gt; and union based&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The next is from &lt;a href="http://haskell.org"&gt;Haskell&lt;/a&gt;, my favourite functional programming language:&lt;/p&gt;
&lt;script src="http://gist.github.com/243890.js"&gt;&lt;/script&gt;&lt;noscript&gt;&lt;code class="gist"&gt;&lt;pre&gt;&lt;br /&gt;
main = putStrLn &amp;#8220;Hello World&amp;#8221;&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;&lt;/noscript&gt;
&lt;p&gt;My favourite Turing-complete joke language, &lt;a href="http://lolcode.com"&gt;LOLCODE&lt;/a&gt;:&lt;/p&gt;
&lt;script src="http://gist.github.com/243892.js"&gt;&lt;/script&gt;&lt;noscript&gt;&lt;code class="gist"&gt;&lt;pre&gt;&lt;br /&gt;
HAI&lt;br /&gt;
VISIBLE &amp;#8220;HAI WORLD!&amp;#8221;&lt;br /&gt;
KTHXBYE&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;&lt;/noscript&gt;
&lt;p&gt;As a crazy side note, it appears that the Turing completeness of LOLCODE was in part proven by using it to create a &lt;a href="http://forum.lolcode.com/viewtopic.php?id=51"&gt;Brain Fuck interpreter&lt;/a&gt; (where BF has already &lt;a href="http://www.iwriteiam.nl/Ha_bf_Turing.html"&gt;been proven&lt;/a&gt; to be Turing complete).&lt;br /&gt;
That&amp;#8217;s fairly mind-blowing to me, especially considering that BF is pretty much as incomprehensible as it gets (by design), and LOLCODE syntax is based off of subtitles from funny cat pictures.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Fortran"&gt;Fortran&lt;/a&gt; which is still heavily used in high performance computing, &lt;a href="http://www.spec.org/cpu2006/CFP2006/"&gt;benchmarking&lt;/a&gt; and scientific analysis (e.g. computational physics) due to it&amp;#8217;s extremely stable and robust floating point arithmetic and floating point exception handling. I still wouldn&amp;#8217;t touch it with a ten-foot pole these days, however.&lt;/p&gt;
&lt;script src="http://gist.github.com/243894.js"&gt;&lt;/script&gt;&lt;noscript&gt;&lt;code class="gist"&gt;&lt;pre&gt;&lt;br /&gt;
print *,&amp;#8221;Hello World!&amp;#8221;&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;&lt;/noscript&gt;
&lt;p&gt;Got any favourite languages that aren&amp;#8217;t “mainstream”? Let me know in the comments.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/nerderati/~4/7ugzpY1sofw" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://nerderati.com/2009/11/hello-world/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://nerderati.com/2009/11/hello-world/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://nerderati.com/2009/11/hello-world/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>jperras</name>
						<uri>http://nerderati.com</uri>
					</author>
		<title type="html"><![CDATA[The Meritocracy of Open Source]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/nerderati/~3/CKlUQuPkl_s/" />
		<id>http://nerderati.com/?p=20</id>
		<updated>2009-11-27T17:10:44Z</updated>
		<published>2009-09-27T17:08:53Z</published>
		<category scheme="http://nerderati.com" term="Uncategorized" />		<summary type="html"><![CDATA[In democracies, power is held by the citizens. The problem with this (at least in terms of open source software) is that, by and large, people are dumb.
The root of the problem lies in the fact that many people approach code in a selfish, rather than Utilitarian, manner. Of course, this is a non-issue in [...]]]></summary>
		<content type="html" xml:base="http://nerderati.com/2009/09/the-meritocracy-of-open-source/">&lt;p&gt;In democracies, &lt;a href="http://en.wikipedia.org/wiki/Democracy"&gt;power is held by the citizens&lt;/a&gt;. The problem with this (at least in terms of open source software) is that, by and large, people are dumb.&lt;/p&gt;
&lt;p&gt;The root of the problem lies in the fact that many people approach code in a selfish, rather than &lt;a href="http://en.wikipedia.org/wiki/Utilitarianism"&gt;Utilitarian&lt;/a&gt;, manner. Of course, this is a non-issue in circumstances when you are writing code that will never be released to the public. But for those of us that &lt;em&gt;do&lt;/em&gt; work and contribute to open source codebases, utilitarianism is a smart (and thankfully prominent) modus operandi. If the core developers of some &lt;a href="http://cakephp.org"&gt;popular&lt;/a&gt; &lt;a href="http://djangoproject.com"&gt;web&lt;/a&gt; &lt;a href="http://rubyonrails.org"&gt;frameworks&lt;/a&gt; started adding classes and methods in their respective codebases to properly parse &lt;a href="http://api.flickr.com/services/feeds/photos_public.gne?id=36998705@N00&amp;#38;lang=en-us&amp;#38;format=lolcode"&gt;Flickr &lt;span class="caps"&gt;LOLCODE&lt;/span&gt;&lt;/a&gt;, I&amp;#8217;m sure a few concerned voices would be heard.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Open Source is not a Democracy. It&amp;#8217;s a Meritocracy.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Plato seemed to have addressed this issue in his famous Socractic diaologue of &lt;em&gt;The Republic&lt;/em&gt;, suggesting that the ideal form of government was one formed of &lt;a href="http://en.wikipedia.org/wiki/Philosopher_king"&gt;philosopher-kings&lt;/a&gt;. If we disregard the pompous title of &amp;#8216;philosopher-king&amp;#8217;, Plato&amp;#8217;s idealized form of government is quite similar to how most open source projects are managed. Core members are not elected by the community. Rather, they are appointed to their position based on their qualifications, and are tasked with governing in such a manner that will yield &lt;em&gt;the greatest good for the greatest number of people&lt;/em&gt;. This resembles most open source organizational methods quite well&lt;sup&gt;&lt;a href="#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;As such, I&amp;#8217;ve come to this conclusion: Open Source is not a Democracy. It&amp;#8217;s a &lt;a href="http://en.wikipedia.org/wiki/Meritocracy"&gt;Meritocracy&lt;/a&gt;. There are no political parties, campaigns or lies and promises. Instead, a person is judged entirely by the code that they write, and the relative usefulness of the later to the community at large. No one is &amp;#8216;elected&amp;#8217; into an open source team. You get invited, usually (and hopefully) on the basis of your individual merit and perceived dedication to the project.&lt;/p&gt;
&lt;p&gt;And the crazy part? &lt;em&gt;This actually works&lt;/em&gt;. Open source produces some &lt;a href="http://www.apache.org/"&gt;fantastic&lt;/a&gt; &lt;a href="http://www.mysql.com/"&gt;software&lt;/a&gt;. Much of the internet and the web runs on open source stacks, and those numbers don&amp;#8217;t seem to be dropping anytime soon. Add to that the incredible advances that have been made in the last decade in open source desktop and so-called &amp;#8216;enterprise&amp;#8217; software, and the above conclusion is undeniable.&lt;/p&gt;
&lt;p&gt;Is a Meritocracy the best philosophy under which we should write code? Perhaps not. But I can&amp;#8217;t think of anything better.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If it ain&amp;#8217;t broke, don&amp;#8217;t fix it&lt;/em&gt;.&lt;/p&gt;
&lt;p id="fn1"&gt;&lt;sup&gt;[1]&lt;/sup&gt; The only exception that I know of is FreeBSD, where they hold elections for the core team every two years. This (surprisingly) seems to work extremely well for them.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/nerderati/~4/CKlUQuPkl_s" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://nerderati.com/2009/09/the-meritocracy-of-open-source/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://nerderati.com/2009/09/the-meritocracy-of-open-source/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://nerderati.com/2009/09/the-meritocracy-of-open-source/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>jperras</name>
						<uri>http://nerderati.com</uri>
					</author>
		<title type="html"><![CDATA[Hacking Hotel Wifi With an SQL Injection]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/nerderati/~3/LHnKYJ1E3S8/" />
		<id>http://nerderati.com/?p=24</id>
		<updated>2009-12-05T22:21:23Z</updated>
		<published>2009-08-06T21:28:22Z</published>
		<category scheme="http://nerderati.com" term="Conferences" /><category scheme="http://nerderati.com" term="Databases" /><category scheme="http://nerderati.com" term="hack" /><category scheme="http://nerderati.com" term="sql" />		<summary type="html"><![CDATA[<p>After attending &#38; speaking at <a href="http://cakefest.org">CakeFest 2009</a> in Berlin, Germany, I decided to take a week off and explore the city. Since the hotel that I had been lodged in for the conference had free Wifi, I assumed that this was the norm in mid-range to high-end hotels in and around Berlin. And, as you may have noticed from the title of this post, it seems as if I was mistaken.</p>]]></summary>
		<content type="html" xml:base="http://nerderati.com/2009/08/hacking-hotel-wifi-with-an-sql-injection/">&lt;p&gt;After attending &amp;#38; speaking at &lt;a href="http://cakefest.org"&gt;CakeFest 2009&lt;/a&gt; in Berlin, Germany, I decided to take a week off and explore the city. Since the hotel that I had been lodged in for the conference had free Wifi, I assumed that this was the norm in mid-range to high-end hotels in and around Berlin. And, as you may have noticed from the title of this post, it seems as if I was mistaken.&lt;/p&gt;
&lt;div id="attachment_39" class="wp-caption alignright" style="width: 203px"&gt;&lt;img src="http://static.nerderati.com/wp-content/uploads/2009/11/crazy_prices.png" alt="Crazy prices" title="crazy_prices" width="193" height="156" class="size-full wp-image-39" /&gt;&lt;p class="wp-caption-text"&gt;Crazy prices&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;There&amp;#8217;s no way in hell I was going to pay 69€ for the five days that I was staying at that hotel. So, like any good free loader, I first checked the other available networks that I could connect to.&lt;/p&gt;
&lt;h3&gt;The Intrigue&lt;/h3&gt;
&lt;p&gt;After a bit of recon on signal strength with iStumbler, I tried to connect to the only other moderately strong network that wouldn&amp;#8217;t make me stab my own eyes out.&lt;/p&gt;
&lt;div id="attachment_48" class="wp-caption aligncenter" style="width: 275px"&gt;&lt;img src="http://static.nerderati.com/wp-content/uploads/2009/11/wlan_selection.png" alt="Available networks" title="wlan_selection" width="265" height="208" class="size-full wp-image-48" /&gt;&lt;p class="wp-caption-text"&gt;Available networks&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;It turned out to be another managed Wifi from the hotel across the street, but these guys offered a &amp;#8216;Free&amp;#8217; connection in addition to their &amp;#8216;Business&amp;#8217; connection (which was about as crazily priced as the one I was trying to desperately avoid paying), the difference being some bullshit options like &lt;em&gt;not&lt;/em&gt; actively blocking &lt;span class="caps"&gt;VPN&lt;/span&gt; ports and prioritized traffic. Oh well, free is still better than nothing. Plus, I thought, I could always just tunnel whatever ports &amp;#38; services I needed.&lt;/p&gt;
&lt;h3&gt;The Turn&lt;/h3&gt;
&lt;p&gt;Of course, that would have been too easy. To actually use their free Wifi, you needed to input your room number, as well as the name of the person who registered the room in the first place. Seems that this particular establishment didn&amp;#8217;t like the idea of letting people not actually staying at the hotel using their &amp;#8216;free&amp;#8217; wifi.&lt;/p&gt;
&lt;p&gt;After trying a few random room numbers and gibberish names to verify that data validation was actually being performed on the server-side, I figured I had nothing to lose by trying a few standard &lt;span class="caps"&gt;SQL&lt;/span&gt; injections to see if I could bypass the whole process.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://static.nerderati.com/wp-content/uploads/2009/11/picture_12.png" title="Typical SQL injection attempt"&gt;&lt;img src="http://static.nerderati.com/wp-content/uploads/2009/11/picture_12.png" width="500" alt="Typical SQL injection attempt"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On first blush I thought that this error message meant that my attempts were in vain, since the application seemed to be escaping my input and determined that no relative of &lt;a href="http://xkcd.com/327/"&gt;Bobby Tables&lt;/a&gt; was currently in room 228.&lt;/p&gt;
&lt;h3&gt;The Revelation&lt;/h3&gt;
&lt;p&gt;However, I know how developers can sometimes be lazy, and this lazyness sometimes manifests itself in slightly incorrect error messages. So I tried a different room number.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://static.nerderati.com/wp-content/uploads/2009/11/picture_13.png" title="Another SQL injection attempt"&gt;&lt;img src="http://static.nerderati.com/wp-content/uploads/2009/11/picture_13.png" width="500" alt="Another SQL injection attempt"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And lo and behold, success!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://static.nerderati.com/wp-content/uploads/2009/11/picture_14.png" title="Success!"&gt;&lt;img src="http://static.nerderati.com/wp-content/uploads/2009/11/picture_14.png" width="500" alt="Success!"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://static.nerderati.com/wp-content/uploads/2009/11/picture_15.png" title="Granted internet acces"&gt;&lt;img src="http://static.nerderati.com/wp-content/uploads/2009/11/picture_15.png" width="500" alt="Granted internet acces"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I wasn&amp;#8217;t going to be downloading torrents with a 200mb/50mb daily transfer limit, but it was good enough to check emails and do the occasional &lt;code&gt;git pull&lt;/code&gt; on some projects.&lt;/p&gt;
&lt;h3&gt;It Shouldn&amp;#8217;t Be This Easy&lt;/h3&gt;
&lt;p&gt;Sometimes I wonder how any web developer worth his salt can overlook such a simple &lt;span class="caps"&gt;SQL&lt;/span&gt; injection vulnerability, especially one that is both well documented and easy to protect against. Worse, I&amp;#8217;m pretty sure that this application was developed for multiple hotel locations, which means this brain dead attack vector exists in all of those spots.&lt;/p&gt;
&lt;p&gt;Now, I only tried this attack on the &amp;#8216;Free&amp;#8217; wifi, but you can see all the trouble that could be caused by performing this same process on the &amp;#8216;Business&amp;#8217; wifi option, which would have billed the room occupant at the end of his stay. I wouldn&amp;#8217;t like to be the desk clerk when that person checked out of the hotel.&lt;/p&gt;
&lt;p&gt;With tools like &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/7597"&gt;&lt;span class="caps"&gt;SQL&lt;/span&gt; Inject Me&lt;/a&gt; available at the click of a button, it&amp;#8217;s never been easier to test (and hack) forms for a variety of simple injection vulnerabilities. Couple that with any half-decent developer who can figure out a few details about the internal structure of your application, and you&amp;#8217;re just asking for trouble by not sanitizing your input.&lt;/p&gt;
&lt;p&gt;But at least I didn&amp;#8217;t have to pay for wifi.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/nerderati/~4/LHnKYJ1E3S8" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://nerderati.com/2009/08/hacking-hotel-wifi-with-an-sql-injection/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://nerderati.com/2009/08/hacking-hotel-wifi-with-an-sql-injection/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://nerderati.com/2009/08/hacking-hotel-wifi-with-an-sql-injection/</feedburner:origLink></entry>
	</feed><!-- Dynamic page generated in 0.136 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-03-09 22:41:53 --><!-- Compression = gzip -->
