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

<channel>
	<title>kill the radio</title>
	<atom:link href="http://blog.killtheradio.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.killtheradio.net</link>
	<description>or die trying</description>
	<lastBuildDate>Fri, 18 Jun 2010 04:56:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Why I love the cloud</title>
		<link>http://blog.killtheradio.net/technology/why-i-love-the-cloud/</link>
		<comments>http://blog.killtheradio.net/technology/why-i-love-the-cloud/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 04:29:14 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[poem]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=579</guid>
		<description><![CDATA[I like THE CLOUD because with the cloud, I don&#8217;t have to know about things like SANs, Load Balancers, failover, DNS, application layers, etc. All that stuff is bullshit anyway. With the cloud, everything is everything, and everything is nothing. It&#8217;s beautiful. So beautiful, I wrote a poem. Ahem: The cloud is fantastic, the cloud [...]]]></description>
			<content:encoded><![CDATA[<p>I like THE CLOUD because with the cloud, I don&#8217;t have to know about things like SANs, Load Balancers, failover, DNS, application layers, etc. All that stuff is bullshit anyway. With the cloud, everything is everything, and everything is nothing. It&#8217;s beautiful. So beautiful, I wrote a poem. Ahem:</p>
<pre>The cloud is fantastic,
the cloud is so great.
If it's not in the cloud,
it makes me irrate.

The nodes in the cloud,
be they big, be they small;
doesn't matter their power,
I love them all.

The cloud's all around us,
even in my phone's soul.
I can talk on the cloud
as I drive into a pole...

And if I do not wake
from my hospital bed,
I live free &mdash; in the cloud &mdash;
though my body is dead.

My essence be fetched,
from the cloud where it's stored,
to be put in a body
bought off Amazon (with rewards).

And when I grow senile,
from the cloud I will gain.
It will upload sane thoughts
through a chip in my brain.

So you see the clouds beauty,
spawned from words said so proud?
This poem will live on forever...
it's been sent to the cloud.</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/why-i-love-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monit, how did I ever live without you?</title>
		<link>http://blog.killtheradio.net/reviews/monit-how-did-i-ever-live-without-you/</link>
		<comments>http://blog.killtheradio.net/reviews/monit-how-did-i-ever-live-without-you/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 19:26:45 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=573</guid>
		<description><![CDATA[In my latest frenzy, which was focused on HA more than performance, I installed some new servers, new services on those servers, and the general complexity of the entire setup for beeets.com doubled. I was trying to remember a utility that I saw a while back that would restart services if they failed. I checked [...]]]></description>
			<content:encoded><![CDATA[<p>In my latest frenzy, which was focused on HA more than performance, I installed some new servers, new services on those servers, and the general complexity of the entire setup for beeets.com doubled. I was trying to remember a utility that I saw a while back that would restart services if they failed. I checked my delicious account, praying that I had thought of my future self when I originally saw it. Luckily, I had saved it under my &#8220;linux&#8221; tag. Thanks, Andrew from the past.</p>
<p>The tool is called <a href="http://mmonit.com/monit/">monit</a>, and I&#8217;m surprised I ever lived without it. Not only does it monitor your services and keep them running, it can restart them if they fail, use too much memory/cpu, stop responding on a certain port, etc. Not only that, but it will email you every time something happens.</p>
<p>While perusing monit&#8217;s site, I saw <a href="http://mmonit.com/">M/Monit</a> which allows you to monitor monit over web, essentially. The only thing I scratched my head about was that M/Monit uses port 8080 (which is fine) but NginX already uses port 8080, and I wasn&#8217;t about to change that, so I opened conf/server.xml and looked for 8080, replaced with 8082 (monit runs on 8081 =)). Then I reconfigured monit to communicate with M/Monit and vice versa, and now I have a kickass process monitor that alerts me when things go wrong, and also sends updates to a service that allows me to monitor the monitor.</p>
<p>I can&#8217;t look at things like queries/sec as I can with <a href="http://www.cacti.net/">Cacti</a> (which is awesome but a little clunky) but I can see which important services are running on each of my servers, and even restart them if I need to straight from M/Monit. The free download license allows to use M/Monit on one server, which is all I need anyway.</p>
<p>Great job monit team, you have gone above and beyond.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/reviews/monit-how-did-i-ever-live-without-you/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New MySQL cluster test setup</title>
		<link>http://blog.killtheradio.net/technology/new-mysql-cluster-test-setup/</link>
		<comments>http://blog.killtheradio.net/technology/new-mysql-cluster-test-setup/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 19:13:41 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=566</guid>
		<description><![CDATA[I decided this weekend I wanted to go down the road of trying out MySQL Cluster for beeets.com. The reason isn&#8217;t speed, it&#8217;s availability. After countless hours of research, I decided I&#8217;d rather have a plate of turds for breakfast than have to worry about Master-Master replication (or DRBD) w/heartbeat, not to mention what to do [...]]]></description>
			<content:encoded><![CDATA[<p>I decided this weekend I wanted to go down the road of trying out <a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html">MySQL Cluster</a> for beeets.com. The reason isn&#8217;t speed, it&#8217;s availability. After countless hours of research, I decided I&#8217;d rather have a plate of turds for breakfast than have to worry about Master-Master replication (or <a href="http://www.drbd.org/">DRBD</a>) w/heartbeat, not to mention what to do when things get out of sync. Not my cup of tea. MySQL Cluster may be a bit slower than a replicated setup (in almost all cases except for primary key lookup, I suspect), but to me it&#8217;s worth it to have a more set-it and forget-it approach. There are many benefits of cluster over replication:</p>
<ul>
<li>Any server can go down. Assuming you have more than one <a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-nodes-groups.html">replica</a> of your data, you can lose any server in your setup and still be up and running. This can be achieved with replication, but it&#8217;s not as easy. You have to have some form of Master-Master replication, perhaps with DRDB, and some form of failover (usually <a href="http://www.linux-ha.org/wiki/Main_Page">heartbeat</a>).</li>
<li>Your data  set scales. If you start running out of disk space with a cluster, just add a few more data nodes and your data will be spread out over them. With replication, each replicated server has to have enough storage to fit the entire database. That means if your dataset grows too large, you have to either partition (a hack, essentially) or upgrade your servers.</li>
<li>Your bandwidth scales. With a cluster, if you are running out of bandwidth, you can add more mysqld processes on your www servers or add more data nodes and your bandwidth scales almost linearly. With replication, you can only add so many slaves before your writes are the bottleneck. Then, once again, you have to look into things like circular replication (dangerous) or partitioning your data set (large updates to your app unless you have an insanely good ORM, big infrastructure change).</li>
</ul>
<p>These are the main points that helped me decide. Historically, with a clustered approach, the entire dataset would have to fit in the memory of all the data nodes, which is somewhat restrictive if the dataset gets too large. Nowadays, the cluster only needs to store indexes in memory, and can store all non-indexed data on disk. There is talk of having completely disk-based store as well.</p>
<p>All that being said, I set up cluster, which was surprisingly easy. I&#8217;m not going to go over how to set it up or anything, just read the manual. After some benchmarking with the web API for beeets.com, the cluster setup appeared to be running about the same speed as the InnoDB setup when testing various commands&#8230;a pleasant surprise. It also appeared to handle concurrency a bit better.</p>
<p>Obviously once the dataset grows past a few megs and the traffic bumps up, we&#8217;ll revisit the benchmarking, but my hope is that what cluster loses in speed from your everyday general query, it gains in speed by having ability for higher concurrency.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/new-mysql-cluster-test-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strange problems with hosts resolving in PHP (and some other linux weirdness)</title>
		<link>http://blog.killtheradio.net/technology/strange-problems-with-hosts-resolving-in-php-and-some-other-linux-weirdness/</link>
		<comments>http://blog.killtheradio.net/technology/strange-problems-with-hosts-resolving-in-php-and-some-other-linux-weirdness/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 18:51:31 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=565</guid>
		<description><![CDATA[This weekend I wen&#8217;t on a frenzy. I turned beeets.com from a single VPS enterprise to 4 VPSs: 2 web (haproxy, nginx, php-fpm, sphinx, memcached, ndb_mgmd) and 2 database servers (ndmtd). There&#8217;s still some work to do, but the entire setup seems to be functioning well. I had a few problems though. In PHP (just [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend I wen&#8217;t on a frenzy. I turned beeets.com from a single VPS enterprise to <a href="http://www.linode.com/?r=15d5d2323910d69794b93ed02cd7d43b2f68d8c5">4 VPSs</a>: 2 web (<a href="http://haproxy.1wt.eu/">haproxy</a>, <a href="http://nginx.org/">nginx</a>, <a href="http://php-fpm.org/">php-fpm</a>, <a href="http://www.sphinxsearch.com/">sphinx</a>, <a href="http://memcached.org/">memcached</a>, <a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html">ndb_mgmd</a>) and 2 database servers (<a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html">ndmtd</a>). There&#8217;s still some work to do, but the entire setup seems to be functioning well.</p>
<p>I had a few problems though. In PHP (just PHP, and nothing else) hosts were not resolving. The linux OS was resolving hosts just fine, but PHP couldn&#8217;t. It was frustrating. Also, I was unable to sudo. I kept checking permissions on all my files in /etc, rebooting, checking again, etc.</p>
<h2>The fix</h2>
<p>Then I looked again. /etc itself was owned by andrew:users. Huh? I changed permissions back root:root, chmod 755. <em>Everything works</em>. Now some background.</p>
<p>A while back, I wrote some software (bash + php) that makes it insanely easy to install software to several servers at once, and sync configurations for different sets of servers. It&#8217;s called &#8220;ssync.&#8221; It&#8217;s not ready for release yet, but I can say without it, I&#8217;d have about 10% of the work done that I&#8217;d finished already. Ssync is a command-line utility that lets you set up servers (host, internal ip, external ip) and create groups. Each group has a set of install scripts and configuration files that can be synced to /etc. The configuration files are PHP scriptable, so instead of, say, adding all my hosts by hand to the /etc/hosts file, I can just loop over all servers in the group and add them automatically. Same with my www group, I can add a server to the &#8220;www&#8221; group in ssync, and all of a sudden the HAproxy config knows about the server.</p>
<p>Here&#8217;s the problem. When ssync was sending configuration files to /etc on remote servers, it was also setting permissions on those files (and folders) by default. This was because I was using -vaz, which attempts to preserve ownership, groupship, and permissions from the source (not good). I added some new params (so now it&#8217;s &#8220;-vaz &#8211;no-p &#8211;no-g &#8211;no-o&#8221;). Completely fixed it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/strange-problems-with-hosts-resolving-in-php-and-some-other-linux-weirdness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HAProxy&#8217;s keep-alive functionality (and how it can speed up your site)</title>
		<link>http://blog.killtheradio.net/technology/haproxys-keep-alive-functionality-and-how-it-can-speed-up-your-site/</link>
		<comments>http://blog.killtheradio.net/technology/haproxys-keep-alive-functionality-and-how-it-can-speed-up-your-site/#comments</comments>
		<pubDate>Tue, 11 May 2010 02:32:30 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[front-end]]></category>
		<category><![CDATA[haproxy]]></category>
		<category><![CDATA[keep-alive]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[web servers]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=554</guid>
		<description><![CDATA[A while back I wrote a post about using NginX as a reverse-proxy cache for PHP (or whatever your backend is) and mentioned how I was using HAProxy to load balance. The main author of HAProxy wrote a comment about keep-alive support and how it would make things faster. At the time, I thought &#8220;What&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I wrote a post about using <a href="http://blog.killtheradio.net/technology/nginx-as-a-caching-reverse-proxy-for-php/">NginX as a reverse-proxy cache for PHP</a> (or whatever your backend is) and mentioned how I was using <a href="http://haproxy.1wt.eu/">HAProxy</a> to load balance. The main author of HAProxy wrote a comment about keep-alive support and how it would make things faster.</p>
<p>At the time, I thought &#8220;What&#8217;s the point of keep-alive for front-end? By the time the user navigates to the next page of your site, the timeout has expired, meaning a connection was left open for nothing.&#8221; This assumed that a user downloads the HTML for a site, and doesn&#8217;t download anything else until their next page request. I forgot about how some websites actually have things other than HTML, namely images, CSS, javascript, etc.</p>
<p>Well in a recent &#8220;omg I want everything 2x faster&#8221; frenzy, I decided for once to focus on the front-end. On beeets, we&#8217;re already using <a href="http://aws.amazon.com/s3/">S3</a> with <a title="ooooh! its &quot;THE CLOUD&quot; oooooh!!" href="http://aws.amazon.com/cloudfront/">CloudFront</a> (a CDN), aggressive HTTP caching, etc. I decided to try the latest HAProxy (1.4.4) with keep-alive.</p>
<p>I got it, compiled it, reconfigured:</p>
<pre>defaults
	...
	option httpclose

became:
defaults
	...
	timeout client  5000
	option http-server-close</pre>
<p>Easy enough&#8230;that tells HAProxy to close the server-side connection, but leave the client connection open for 5 seconds.</p>
<p>Well, a quick test and site load times were down by a little less than half&#8230;from about 1.1s client load time (empty cache) to 0.6s. An almost instant benefit. How does this work?</p>
<p>Normally, your browser hits the site. It requests /page.html, and the server says &#8220;here u go, lol&#8221; and closes the connection. Your browser reads page.html and says &#8220;hay wait, I need site.css too.&#8221; It opens a new connection and the web server hands the browser site.css and closes the connection. The browser then says &#8220;darn, I need omfg.js.&#8221; It opens another connection, and the server rolls its eyes, sighs, and hands it omfg.js.</p>
<p>That&#8217;s three connections, with high latency each, your browser made to the server. <a href="http://rescomp.stanford.edu/~cheshire/rants/Latency.html">Connection latency</a> is something that, no matter how hard you try, you cannot control&#8230;and there is a certain amount of latency for each of the connections your browser opens. Let&#8217;s say you have a connection latency of 200ms (not uncommon)&#8230;that&#8217;s 600ms you just waited to load a very minimal HTML page.</p>
<p>There is hope though&#8230;instead of trying to lower latency, you can open fewer connections. This is where keep-alive comes in.</p>
<p>With the new version of HAProxy, your browser says &#8220;hai, give me /page.html, but keep the connection open plz!&#8221; The web server hands over page.html and holds the connection open. The browser reads all the files it needs from page.html (site.css and omfg.js) and requests them over the connection that&#8217;s already open. The server keeps this connection open until the client closes it or until the timeout is reached (5 seconds, using the above config). In this case, the latency is a little over 200ms, the total time to load the page 200ms + the download time of the files (usually less than the latency).</p>
<p>So with keep-alive, you just turned a 650ms page-load time into a 250ms page-load time&#8230; a much larger margin than any sort of back-end tweaking you can do. Keep in mind most servers already support keep-alive&#8230;but I&#8217;m compelled to write about it because I use HAProxy and it&#8217;s now fully implemented.</p>
<p>Also keep in mind that the above scenario isn&#8217;t necessarily correct. Most browsers will open up to 6 concurrent connections to a single domain when loading a page, but you also have to factor in the fact that the browser blocks downloads when it encounters a javascript include, and then attempts to download and run the javascript before continuing the page load.</p>
<p>So although your connection latency with multiple requests goes down with keep-alive, you won&#8217;t get a 300% speed boost, more likely a 100% speed boost depending on how many scripts are loading in your page along with any other elements&#8230;100% is a LOT though.</p>
<p>So for most of us webmasters, keep-alive is a wonderful thing (assuming it has sane limits and timeouts). It can really save a lot of page load time on the front-end, which is where users spend the most of their time waiting. But if you happen to have a website that&#8217;s only HTML, keep-alive won&#8217;t do you much good =).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/haproxys-keep-alive-functionality-and-how-it-can-speed-up-your-site/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using gzip_static in nginx to cache gzip files</title>
		<link>http://blog.killtheradio.net/technology/using-gzip_static-in-nginx-to-cache-gzip-files/</link>
		<comments>http://blog.killtheradio.net/technology/using-gzip_static-in-nginx-to-cache-gzip-files/#comments</comments>
		<pubDate>Tue, 04 May 2010 03:54:12 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=542</guid>
		<description><![CDATA[Recently I&#8217;ve been working on speeding up the homepage of beeets.com. Most speed tests say it takes between 4-6 seconds. Obviously, all of them are somehow fatally flawed. I digress, though. Everyone (who&#8217;s anyone) knows that gzipping your content is a great way to reduce download time for your users. It can cut the size [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been working on speeding up the homepage of <a href="http://beeets.com/local-events/Santa+Cruz+CA">beeets.com</a>. Most speed tests say it takes between 4-6 seconds. Obviously, all of them are somehow fatally flawed. I digress, though.</p>
<p>Everyone (who&#8217;s anyone) knows that gzipping your content is a great way to reduce download time for your users. It can cut the size of html, css, and javascript by about 60-90%. Everyone also knows that gzipping can be very cpu intensive. <span style="text-decoration: underline;">Not anymore</span>.</p>
<p>I just installed <a href="http://wiki.nginx.org/NginxHttpGzipStaticModule">nginx&#8217;s Gzip Static Module</a> (compile nginx with &#8211;with-http_gzip_static_module) on beeets.com. It allows you to pre-cache your gzip files. What?</p>
<p>Let&#8217;s say you have the file /css/beeets.css. When a request for beeets.css comes through. the static gzip module will look for /css/beeets.css.gz. If it finds it, it will serve that file as gzipped content. This allows you to gzip your static files using the highest compression ratio (gzip -9) when deploying your site. Nginx then has absolutely no work to do besides serving the static gzip file (it&#8217;s very good at serving static content).</p>
<p>Wherever you have a gzip section in your nginx config, you can do:</p>
<pre>gzip_static on;</pre>
<p>That&#8217;s it. Note that you will have to create the .gz versions of the files yourself, and it&#8217;s mentioned in the docs that it&#8217;s better if the original and the .gz files have the same timestamp; so it may be a good idea to &#8220;touch&#8221; the files after both are created. It&#8217;s also a good idea to turn the gzip compression down (<a href="http://wiki.nginx.org/NginxHttpGzipModule#gzip_comp_level">gzip_comp_level 1..3</a>). This will minimally compress dynamic content without putting too much strain on the server.</p>
<p>This is a great way to get the best of both worlds: gzipping (faster downloads) <em>without</em> the extra load on the server. Once again, nginx pulls through as the best thing since multi-cellular life. Keep in mind that this only works on static content (css, javascript, etc etc). Dynamic pages can and should be gzipped, but with a lower compression ratio to keep load off the server.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/using-gzip_static-in-nginx-to-cache-gzip-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LiteSpeed &#8211; The upstanding Christian webserver</title>
		<link>http://blog.killtheradio.net/funny/litespeed-the-upstanding-christian-webserver/</link>
		<comments>http://blog.killtheradio.net/funny/litespeed-the-upstanding-christian-webserver/#comments</comments>
		<pubDate>Tue, 04 May 2010 03:33:21 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[web servers]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=534</guid>
		<description><![CDATA[I never thought I&#8217;d see the day where people who build web servers would care what other people use them to host. In section 1 of LiteSpeed&#8217;s licence agreement you will see &#8220;You cannot use the SOFTWARE PRODUCT for any illegal activity or to host pornographic content.&#8221; HA! That&#8217;s the stupidest thing I&#8217;ve ever seen. [...]]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="320" style="float: right; padding-left: 10px;"><param name="movie" value="http://www.youtube.com/v/hp4iiI5qTJk&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/hp4iiI5qTJk&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="320"></embed></object>I never thought I&#8217;d see the day where people who build web servers would care what other people use them to host. In section 1 of <a rel="nofollow" href="http://www.litespeedtech.com/trial/license">LiteSpeed&#8217;s licence agreement</a> you will see &#8220;You cannot use the SOFTWARE PRODUCT for any illegal activity or to host pornographic content.&#8221; HA!</p>
<p>That&#8217;s the stupidest thing I&#8217;ve ever seen. What kind of business limits the usage of its products to upstanding citizens only? Last I checked it was the government&#8217;s job to impose its views on businesses, not businesses imposing their views on their customers.</p>
<p>I have to say, it&#8217;s nice that someone is using their business to take a stand, I guess I&#8217;d just prefer it to be in defense of free speech and expression. Sure ALL porn is smutty and violent, but that&#8217;s expression in itself. Also, can you fight basic human nature? Perhaps, on a personal level. Repression of sexual tendencies is a lot different than acceptance and non-action though. My point is that pornography is the one place where sexual fantasies are <span style="text-decoration: underline;">allowed</span> to exist in any way shape and/or form, and Americans, being extremely sexually self-repressed, <em>need</em> that outlet, not more repression.</p>
<p>I also think it&#8217;s funny when someone tries to be exclusive because they&#8217;re SO awesome when <a href="http://nginx.org/">someone else is doing it way better</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/funny/litespeed-the-upstanding-christian-webserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript minification with JSMin and gzip</title>
		<link>http://blog.killtheradio.net/technology/javascript-minification-with-jsmin-and-gzip/</link>
		<comments>http://blog.killtheradio.net/technology/javascript-minification-with-jsmin-and-gzip/#comments</comments>
		<pubDate>Tue, 04 May 2010 00:32:54 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[deployments]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[minification]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=527</guid>
		<description><![CDATA[Here&#8217;s a good tip I just found. Note that this may not be for all cases. In fact, I may have stumbled on a freak coincidence. Here&#8217;s the story: I hate java. I hate having java on a server, but hate it even more if it&#8217;s only for running one small script. Forever, beeets.com has [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a good tip I just found. Note that this may not be for all cases. In fact, I may have stumbled on a freak coincidence. Here&#8217;s the story:</p>
<p>I hate java. I hate having java on a server, but hate it even more if it&#8217;s only for running one small script. Forever, <a href="http://beeets.com">beeets.com</a> has used the <a href="http://developer.yahoo.com/yui/compressor/">YUI compressor</a> to shrink its javascript before deployment. Well, YUI won&#8217;t run without java, so for the longest time, jre has been installed collecting dust, only to be brushed off and used once in a while during a deployment. This seems like a huge waste of space and resources.</p>
<p>Well, first I tried gcj. Compiling gcj was fairly straightforward, thankfully. After installing, I realized I needed to know a lot more about java in order to compile the YUI compressor with it. I needed knowledge I did not have the long-term need for, nor the will to learn in the first place. I, although revering myself as extremely tenacious, gave up.</p>
<p>I decided to try <a href="http://www.crockford.com/javascript/jsmin.html">JSMin</a>. This nifty program is simple, elegant, and it works well. It also has a much worse compression ratio then YUI. However, I trust any site that hosts C code and has no real layout whatsoever. Knowing the compression wasn&#8217;t as good, I still wanted to see what kind of difference gzipping the files would have.</p>
<p>I recorded the size of the GZipped JS files that used YUI. I then reconfigured the deployment script to use JSMin instead of YUI. I looked at the JS files with JSMin compression:</p>
<pre>YUI:
mootools.js     88.7K (29.6K gz)
beeets.js       61.5K (20.5K gz)

JSMin:
mootools.js    106.1K (29.5K gz)
beeets.js       71.0K (17.7K gz)</pre>
<p>Huh? GZip is actually more effective on the JS files using JSMin vs YUI! The end result is LESS download time for users.</p>
<p>I don&#8217;t know if this is a special case, but I was able to derive a somewhat complex formula:</p>
<pre>YUI &gt; JSMin
YUI + GZip &lt; JSMin + GZip</pre>
<p>Who would have thought. See you in hell, java.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/javascript-minification-with-jsmin-and-gzip/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Marijuana reform (or how I learned to stop worrying and love the revenue from taxing it)</title>
		<link>http://blog.killtheradio.net/social-issues/marijuana-reform-or-how-i-learned-to-stop-worrying-and-love-the-revenue-from-taxing-it/</link>
		<comments>http://blog.killtheradio.net/social-issues/marijuana-reform-or-how-i-learned-to-stop-worrying-and-love-the-revenue-from-taxing-it/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 23:52:19 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Social issues]]></category>
		<category><![CDATA[drug war]]></category>
		<category><![CDATA[drugs]]></category>
		<category><![CDATA[government]]></category>
		<category><![CDATA[marijuana]]></category>
		<category><![CDATA[reform]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=511</guid>
		<description><![CDATA[Being a heavy and casual marijuana user for almost 10 years, and knowing many others who also are/were, I think I have a pretty good understanding of its effects, both positive and negative. I&#8217;d like to dispel some myths. First off, you always hear that marijuana is a gateway drug. I respond: being a teenager [...]]]></description>
			<content:encoded><![CDATA[<p>Being a heavy and casual marijuana user for almost 10 years, and knowing many others who also are/were, I think I have a pretty good understanding of its effects, both positive and negative. I&#8217;d like to dispel some myths.</p>
<p>First off, you always hear that marijuana is a gateway drug. I respond: being a teenager is a gateway drug. The emotions, the hormones, the internal and external influences pulling you in a thousand directions every second of your life&#8230;it&#8217;s a wonder most of us make it through. That alone is enough to make most people want to try just about every drug out there. Also, another reason marijuana is a gateway drug is because kids are always taught how terrible it is and how addictive it is. So what&#8217;s the next thing they do? They try it. After finding that they were lied to and mislead, they learn to mistrust those telling them that &#8220;all drugs are bad.&#8221; So now heroin or cocaine doesn&#8217;t seem so bad either, even though they have much more far-reaching effects than marijuana. The point is, the only real cause of marijuana being a &#8220;gateway drug&#8221; is the fact that kids are constantly being told lies about it. The fix? Honesty.</p>
<p>Secondly, marijuana in moderation has no permanent effects. You can smoke till yer stupid for a few months, but take a week off and you bounce back completely. Its tar is more harmful than that of tobacco, but who aside from the most extreme users smokes a cigarette-pack&#8217;s worth of joints every day? The only way to get cancer from marijuana is to pump the smoke into a ventilator and breath it in 24/7. With cutting-edge advances in technology, there are now vaporizers, which remove the tar from smoking. It&#8217;s safer than ever.</p>
<p>Thirdly, smoking marijuana is a personal choice. Here we are, in the &#8220;land of the free,&#8221; restricted from doing things that even if they do have some negative effect, only affect us personally. It&#8217;s not illegal to saw off my arm. It&#8217;s not illegal to use a pogo stick next to the grand canyon. Why can&#8217;t I take a puff on a joint? Who am I harming?</p>
<p>Now to my main point. We&#8217;re in an economic crisis. We&#8217;re <a href="http://en.wikipedia.org/wiki/War_on_Drugs#Costs_to_Taxpayers">spending a lot of money on battling imports of drugs</a> (including marijuana), and also <a href="http://www.alternet.org/rights/47815/">spending a lot of money keeping potheads in prison</a> (thanks, prison lobby). That&#8217;s two very large drains on our economy to</p>
<ol>
<li><strong>Fund a losing battle.</strong> I can go anywhere in almost any town in the US and within an hour, even not knowing anyone, get an eighth of weed. Good job drug war, money well spent. It&#8217;s good to know that the taxes I just filed will go to &#8220;stopping&#8221; me from buying marijuana.</li>
<li><strong>Keep pot offenders in prison.</strong> Yeah, these people are really dangerous. They are on the edge of the law&#8230;sitting on the couch eating chips and giggling. The more money I can spend to keep them locked up, the better. Oh sure, most of them are dealers, but our culture is founded on the principals of capitalism: if a market exists, fill the void and capitalize. Makes sense to me. Nobody would sell pot if nobody wanted to smoke it. Yes it&#8217;s illegal, but once again let&#8217;s ask ourselves <em>why </em>instead of pointing to a law.</li>
</ol>
<p>Now imagine a world where the government grew, cultivated, sold &amp; taxed pot. That&#8217;s a lot of money we&#8217;d make back. Hell even if they raised the price on it, it&#8217;d be worth it to just be able to walk into a store and buy it. They could use the revenue from pot to plug the holes caused by battling all the other drugs.</p>
<p>Maybe it&#8217;s time to really start thinking about this. If you are against legalization of marijuana, ask yourself why. Anyone who wants to smoke it already does. Show me a person who wants to smoke pot but doesn&#8217;t because it&#8217;s illegal, and I&#8217;ll show you the portal that takes you out of Neverland and back to reality.</p>
<p>Conservative America: you want a smaller government with less services and less control on the population in general. Why not start with drug reform?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/social-issues/marijuana-reform-or-how-i-learned-to-stop-worrying-and-love-the-revenue-from-taxing-it/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to get the TOP2004 programmer running under Windows 7 64-bit</title>
		<link>http://blog.killtheradio.net/tricks-hacks/how-to-get-the-top2004-programmer-running-under-windows-7-64-bit/</link>
		<comments>http://blog.killtheradio.net/tricks-hacks/how-to-get-the-top2004-programmer-running-under-windows-7-64-bit/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 05:40:50 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Tricks/Hacks]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[eeprom]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[hobby]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=497</guid>
		<description><![CDATA[UPDATE &#8211; Apparently closing the VM, unplugging the programmer, unselecting the programmer from the USB device menu, or pausing the VM after the programmer has been loaded by the VM makes Windows 7 bluescreen. So far, I have not found a way around this, as such the TOP2004 is effectively useless again. At least it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE</strong> &#8211; Apparently closing the VM, unplugging the programmer, unselecting the programmer from the USB device menu, or pausing the VM after the programmer has been loaded by the VM makes Windows 7 bluescreen. So far, I have not found a way around this, as such the TOP2004 is effectively useless again. At least it&#8217;s able to program chips and stuff, but once loaded, the VM has to stay open and has to be running. Pretty lame. I&#8217;ll try to find a fix and update (BTW I&#8217;m using the latest VirtualBox as of this writing). Any ideas?</p>
<hr />
<p><a href="http://blog.killtheradio.net/wp-content/uploads/2010/03/top2004.jpg"><img class="alignright size-medium wp-image-498" title="My model didn't come with the gnarly blue racing stripe, but hopefully yours did" src="http://blog.killtheradio.net/wp-content/uploads/2010/03/top2004-300x217.jpg" alt="top2004" width="300" height="217" /></a>I love electronics. Building basic circuits, programming microcontrollers, making malicious self-replicating robots programmed to hate humans, and even so much as wiring up complete motherboards with old processors and LCDs. I had to find a USB flash/eeprom programmer that fit my hardcore lifestyle. On ebay a few years back, I bought the <a rel="nofollow" href="http://www.top2048.com/">TOP2004</a>. This wondrous piece of Chinese equipment is cheap, cheap, and USB. I needed USB because in the process of making my own flash programmer a while back, I destroyed half the pins on my parallel port. The programmer worked great, but only worked for one chip. I needed something a bit more versatile. The top2004 isn&#8217;t a bad piece of equipment. The manual was translated poorly from Chinese, as is the software that comes with it.</p>
<p>Well, for the longest time, I was a Windows XP guy. Nowadays it&#8217;s all about Windows 7. Don&#8217;t get me wrong, I&#8217;m <a href="http://www.slackware.org">Slackware</a> through and through, but I need my gaming. So I installed 64-bit Windows and love it, but my programmer no longer works.</p>
<p><strong>Requirements</strong>: a 64-bit OS that doesn&#8217;t let you use 32-bit drivers (namely Windows 7 x64), a 32-bit version of Windows laying around, virtualization software (check out <a href="http://www.virtualbox.org/">VirtualBox</a>) which is running your 32-bit version of Windows, a Top2004 programmer, <a href="http://www.ngohq.com/home.php?page=dseo">DSEO</a>, and the <a href="http://blog.killtheradio.net/wp-content/uploads/2010/03/libusb.7z">infwizard utility with libusb drivers</a> (virus free, I promise).</p>
<p>Here&#8217;s the fix:</p>
<ol>
<li>I remembered when jailbreaking my iPod a while back with <a href="http://quickfreedom.com/">Quickfreedom</a> that there was a utility used to sniff out USB devices called <a href="http://blog.killtheradio.net/wp-content/uploads/2010/03/libusb.7z">infwizard</a>, which I believe is part of the libusb package. I never liked libusb because I remember it royally messing up my computer, but the infwizard program was dandy. It can write very simple drivers for USB devices without any prior knowledge of what they are. I used this with the programmer plugged in to create a makeshift driver. Note: Make sure the libusb* files in that zip provided are in the same directory as the .INF file you create for the programmer.</li>
<li>64-bit Windows doesn&#8217;t like you to load unsigned drivers. In fact, it doesn&#8217;t allow it at all. You have to download a utility called <a href="http://www.ngohq.com/home.php?page=dseo">DSEO (Driver Signature Enforcement Override)</a> to convince Windows that it should let you load the driver you just created.</li>
<li>Once you turn driver enforcement off and load up the driver, you should now be able to see your TOP programmer in the device list. Boot your VM, which previously couldn&#8217;t use the programmer (because it had no driver), and install v2.52 of the <a rel="nofollow" href="http://www.top2048.com/gb/soft.htm">TopWin software</a>. Once installed, you should be able to select the TOP2004 from the USB device list, and voilá&#8230;your programmer works.</li>
</ol>
<p>Obviously running it in a VM is less than ideal, but it&#8217;s better than dropping $200 on a real programmer that might actually have 64-bit support. The great part about this version (2.52) of the TopWin software is that it supports the atmega168, which is almost exactly the same as the atmega328&#8230;meaning <a href="http://www.arduino.cc/">arduino</a> fans new and old can use it. I&#8217;m not an arduino guy and use the chip just by itself with avr-gcc, but you can do whatever the hell you want once you get the TOP programmer working.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/tricks-hacks/how-to-get-the-top2004-programmer-running-under-windows-7-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s the point of Object Relational Mapping (ORM)?</title>
		<link>http://blog.killtheradio.net/technology/whats-the-point-of-object-relational-mapping-orm/</link>
		<comments>http://blog.killtheradio.net/technology/whats-the-point-of-object-relational-mapping-orm/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 19:34:04 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[object-oriented]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[procedural]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=487</guid>
		<description><![CDATA[In my work as a web developer, I&#8217;ve come across many, many cases where projects, namely projects using PHP frameworks, have made use of an Object Relation Mapping tool. I&#8217;ve used them a bit myself, in apps that use CakePHP. I have to say, after going from writing plain queries to communicating with objects, I [...]]]></description>
			<content:encoded><![CDATA[<p>In my work as a web developer, I&#8217;ve come across many, many cases where projects, namely projects using PHP frameworks, have made use of an Object Relation Mapping tool. I&#8217;ve used them a bit myself, in apps that use <a rel="nofollow" href="http://cakephp.org/">CakePHP</a>. I have to say, after going from writing plain queries to communicating with objects, I prefer very much writing my own queries.</p>
<p>Let&#8217;s first talk about what an <a href="http://en.wikipedia.org/wiki/Object-relational_mapping">ORM</a> is. Basically, you have an app, and you have a database. As the case with most apps, it needs to actually communicate with the database, usually by using queries. Queries are a language the database understands. They allow the application to ask the database for very specific information. An ORM sits between the application and the database. Its role is to give the application an object to communicate to. This object pretends as if it is a piece of data in the database, and allows the app to do things like data.update() or data.delete(). The ORM will write the appropriate queries to the database, regardless of the type of database. A good ORM can also perform joins between pieces of data and perform somewhat complex queries on the database. The purpose is to give a standard interface to communicate with any database.</p>
<p>So here&#8217;s my question: on a simple application, an ORM may be a good idea. It provides a standard interface to communicate with, and also allows the database to be &#8220;easily&#8221; switched out without modifying the main application code at all. But on any app I&#8217;ve worked on, there are many, many queries written that an ORM wouldn&#8217;t be able to map or understand. So what is the point of an ORM if it can&#8217;t handle everything? It&#8217;s a standard interface that becomes non-standard the second you write your first non-ORM query.</p>
<p>There is no way anybody could ever write an ORM that handles every query that possibly needs to be written. And instead of defining relationships between data in your queries, you have to define the relationships through the code.  Also, the argument I hear over and over and over: &#8220;it allows you to switch out your database easily.&#8221; Who the hell switches out their database? Why not just pick a database that does what you want from the beginning&#8230;and for the most part, they all do the same damned thing. Also, SQL is kind-of standard, so even without an ORM it&#8217;s not like you&#8217;ll be rewriting every query from scratch&#8230;most likely you&#8217;ll have to rewrite a few database-specific functions (think SELECT last_insert_id()). Is it really so hard to do this, especially if you only do it once? If you are switching from Oracle to PGSql to MySQL to MSSQL every other day, then yes, an ORM would probably make sense, but otherwise I don&#8217;t see the point.</p>
<p>Data is data, it is not another object. Moving everything under the sun into the object-oriented model does not make anyone&#8217;s life easier. SQL is good. <a href="http://en.wikipedia.org/wiki/Procedural_programming">Procedural</a> is lightning fast. Learn how to use these, because OO will not solve all your problems.</p>
<p>I welcome use-cases besides those I have mentioned and arguments for/against ORMs in the comments. I&#8217;m speaking from personal experience and not married to my opinion&#8230;so I&#8217;m actually very curious if any of you successfully use an ORM that does everything you need it to.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/whats-the-point-of-object-relational-mapping-orm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some tips for a successful business while maintaining personal sanity</title>
		<link>http://blog.killtheradio.net/how-tos/some-tips-for-a-successful-business-while-maintaining-personal-sanity/</link>
		<comments>http://blog.killtheradio.net/how-tos/some-tips-for-a-successful-business-while-maintaining-personal-sanity/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 02:42:49 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[How to's]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[sanity]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=473</guid>
		<description><![CDATA[This will be a collection of things I&#8217;ve stumbled on during my time as a business owner (or just in the business world in general). First off, all of my experience is with small business and the service industry, and the only way I see that changing is if my business really takes off. So [...]]]></description>
			<content:encoded><![CDATA[<p>This will be a collection of things I&#8217;ve stumbled on during my time as a business owner (or just in the business world in general). First off, all of my experience is with small business and the service industry, and the only way I see that changing is if my business really takes off. So far, owning a business has been one of the most unstable, stressful, and aggravating occupations I&#8217;ve had&#8230;but it has by far been the most fun. There really is nothing better than working for yourself. It takes a lot of drive and you really have to love what you&#8217;re doing. If you don&#8217;t love it, you aren&#8217;t going to be able to do it day after day, week after week, year after year. I guess that&#8217;s the first tip:</p>
<ul>
<li><strong>Love what you do.</strong> If you don&#8217;t love what you do, what&#8217;s the point? You aren&#8217;t really getting anything out of working for yourself, and I can tell you now that for all the stress and work it takes to get a business going and keep it going, it&#8217;s just not worth it if you don&#8217;t get to do what you love for at least a small portion of the day. Find something you&#8217;re knowledgeable and passionate about, and the money and success will follow.</li>
<li><strong>Consider working with a partner.</strong> Owning a business is hard work. Sometimes more than one person can handle. In my experience, it&#8217;s been a lot easier having a partner than if I had to deal with everything on my own&#8230;someone who you trust and who shares your passion for what you do and for success. You can take a sick day and he/she will work in your stead, you can swap meetings with clients/customers, take vacations while the other one works, etc. You have to split the profits, but can make it up by doing almost twice the work anyway, and you get a lot more freedom.</li>
<li><strong>Be smart about your time.</strong> Since you&#8217;re just starting out and don&#8217;t have much (if any) capital, it makes sense to try and do everything (bookkeeping, equipment repairs, etc) yourself, right? Absolutely wrong&#8230;it almost always makes more sense to hire a professional. You make money by doing what you&#8217;re good at. You don&#8217;t make money doing time-consuming tasks that you aren&#8217;t trained for. Hiring a professional to help you out may seem like a waste of money, but you save money in the long run. They&#8217;re great at what they do, you&#8217;re great at what you do&#8230;so use the time you would have spent floundering with what they&#8217;re good at to do what you&#8217;re good at, and you can pay them and have leftovers. Need a contract? Hire a lawyer. Doing taxes? Hire an accountant. Being smart about your time is really important, especially when considering your personal sanity.</li>
<li><strong>&#8220;No&#8221; can be a great answer.</strong> Speaking of personal sanity, let&#8217;s talk about the most important word you can possibly have in your vocabulary. &#8220;No.&#8221; This word will save you. Trust me. You can&#8217;t really use this word when you work for someone else, so enjoy it. Try it now&#8230;say &#8220;no&#8221; out loud. Didn&#8217;t that feel great? What the hell am I talking about? You don&#8217;t have to do everything everyone needs (read: wants) all the time, and you certainly don&#8217;t have to do it when they need it. I&#8217;m not talking about when you and a client set a deadline and you decide you just don&#8217;t want to do it&#8230;that&#8217;s called laziness or poor planning. But if you find yourself inundated with work and a client out of the blue decides they need that huge project they&#8217;ve been mulling over in their head done THIS WEEK, &#8220;no&#8221; is a very appropriate response. &#8220;No&#8221; can also be used in other contexts.
<p>For instance, someone comes to you with a project that doesn&#8217;t make sense or it just sucks. Or the project is the best idea ever, but you get a strange vibe from the person pitching it. You don&#8217;t necessarily have to use the word &#8220;no&#8221; in this case, but the general concept is there: money != happiness. Just because a project seems great at first doesn&#8217;t mean it won&#8217;t drag you into a fiery pit of everlasting hell later on. Listen to your intuition, and know when to turn something or someone down.</p>
<p>On a side note, the more you exclusively work on better projects with better clients, the better projects and clients you&#8217;ll attract. This isn&#8217;t a business technique as much as it is the way of the universe.</li>
<li><strong>Communication is essential.</strong> Want to know a great way to piss someone off? Go way over budget on their project, then send them a bill at the end of the month. That&#8217;s a recipe for the swift end of a business relationship. Are you going to be 2 weeks late on a deadline? Tell your client ahead of time. Are you way over budget? Let your client know what happened and why! The sooner you tell them, the more appreciative they&#8217;ll be. Honesty, transparency, and proactive communication are the foundation of <em>any</em> relationship, but also translate well to business relationships.
<p>Also, be honest and verbose with your estimates. Sure, a prospective client may go with someone else with lower numbers on paper, but when they find out the other company more or less lied just to dupe them into getting their business, they won&#8217;t be happy. Also think of it this way: your numbers are the way they are for a good reason. If the client doesn&#8217;t want to pay your fair rate for a project, do you really need that penny-pinching tightwad arguing about every invoice with you anyway? Remember: the better the projects and clients you work with, the better the projects and clients you&#8217;ll get.</li>
</ul>
<p>Ok, that&#8217;s about all I have in me for now. Maybe I&#8217;ll do a followup later, but hopefully these tips can help anyone new to business, or maybe give someone who&#8217;s been doing it for a long time a little perspective. A lot of this stuff I apply not only to my business life, but life in general, with great success on both ends. Keep in mind this is mainly geared towards the service industry, and being only 23 I&#8217;m not the most knowledgeable person in the world, but hopefully the things I&#8217;ve found so far are universal.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/how-tos/some-tips-for-a-successful-business-while-maintaining-personal-sanity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Piwik vs Google Analytics</title>
		<link>http://blog.killtheradio.net/reviews/piwik-vs-google-analytics/</link>
		<comments>http://blog.killtheradio.net/reviews/piwik-vs-google-analytics/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 01:44:38 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=470</guid>
		<description><![CDATA[I&#8217;ve been using Google Analytics for quite some time. I do love it. It&#8217;s easy, it&#8217;s pretty, it&#8217;s addicting to look at the charts and graphs. Lately I&#8217;ve been trying out an alternative to Google Analytics, Piwik. I&#8217;m not going to list a bunch of bullet points with features of both compared. I am, however, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a rel="nofollow" href="http://www.google.com/analytics/">Google Analytics</a> for quite some time. I do love it. It&#8217;s easy, it&#8217;s pretty, it&#8217;s addicting to look at the charts and graphs. Lately I&#8217;ve been trying out an alternative to Google Analytics, <a href="http://piwik.org/">Piwik</a>.</p>
<p>I&#8217;m not going to list a bunch of bullet points with features of both compared. I am, however, going to tell you my experiences with both. I started with Google Analytics. The setup and install is so easy, a blind ape could do it. Once tracking, the graphs, maps, numbers are all easy to understand. You can compare your site to others like it, and you can set up different segments of visitors and display the graphs according to your segments.</p>
<p>Google Analytics has been fun and easy. I do have some hangups about it. Although there is no cost, Google owns your data. They are giving you a service, you are selling them your data in return. They know about your visitors and can track them based on their interest in various pages of yours. They can do whatever they want with this information. For some people, this is fine. I personally don&#8217;t give much of a rat&#8217;s ass what Google thinks they know about me. For others, this is a privacy issue.</p>
<p>I also ran into some limitations with Google Analytics. It doesn&#8217;t track downloads very easily, and getting any sort of report that it doesn&#8217;t already give you is impossible because you only get what you see.</p>
<p>I decided to try Piwik. It&#8217;s open source, they advertise themselves as an alternative to GA, and you own <span style="text-decoration: underline;">all</span> of your data. I threw up a new site on <a rel="nofollow" href="https://www.nearlyfreespeech.net/">NearlyFreeSpeech.net</a>, installed Piwik (literally a 5 min. install, just as they say), and started playing with it. A lot of the graphs are the same, the dashboard is completely customizable and is not jenky at all. After tracking some sites with it, I&#8217;m convinced it&#8217;s actually more accurate than Google. It picks up more visitors and keywords from search engines.</p>
<p>So I&#8217;ve been using Piwik regularly for about 3 or 4 months. There are some things I miss. Goals in Piwik do not have the awesome funnel that GA does. Not even close. The goals are pretty stupid, honestly, and all the ones I track are done manually through javascript. It&#8217;s nice to be able to track them, but it&#8217;s something I can get through any of my apps anyway. So from what I&#8217;ve noticed, Piwik is missing the funnel view (<a rel="nofollow" href="http://dev.piwik.org/trac/ticket/220">although they are working on it</a>), and it&#8217;s missing an IP filter: half the visits are from me sometimes, and it&#8217;d be nice to be able to browse my own apps without having to worry about messing up the analytics.</p>
<p>Aside from those two points, Piwik is the winner for me. I really never actually check Google Analytics anymore. Piwik really has stepped up and provided a service that&#8217;s comparable in features to GA, but free as free for me to use it without having to give away info about my awesome users. I would definitely urge anyone who likes Google Analytics to check out Piwik. The best part is, they&#8217;re actively developing it and there more and more features to look forward to as new releases come out.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/reviews/piwik-vs-google-analytics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>California Proposition 16 &#8211; &#8220;California Taxpayers Right to Vote Act&#8221;</title>
		<link>http://blog.killtheradio.net/politics/california-proposition-16-california-taxpayers-right-to-vote-act/</link>
		<comments>http://blog.killtheradio.net/politics/california-proposition-16-california-taxpayers-right-to-vote-act/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 21:24:11 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[politics]]></category>
		<category><![CDATA[california]]></category>
		<category><![CDATA[government]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=463</guid>
		<description><![CDATA[With a name like &#8220;California Taxpayers Right to Vote Act,&#8221; you know there is an ulterior motive. We already have the right to vote, right? In fact, we do. So what is Prop 16, really? Prop 16 is designed such that before a city or state entity buys a section of power grid and resells [...]]]></description>
			<content:encoded><![CDATA[<p>With a name like &#8220;<a rel="nofollow" href="http://ballotpedia.org/wiki/index.php/California_Proposition_16_(June_2010)">California Taxpayers Right to Vote Act</a>,&#8221; you know there is an ulterior motive. We already have the right to vote, right? In fact, we do. So what is Prop 16, <em>really?</em></p>
<p>Prop 16 is designed such that before a city or state entity buys a section of power grid and resells that power to its residents, it must hold an election and get a 2/3 majority vote. While it may seem nice to have the voters decide on whether or not a government entity should be spending their money, it actually doesn&#8217;t make sense. The reason is the expenses involved in NOT allowing the entities to do this.</p>
<p>Think of it this way. A government agency spends some of your tax dollars buying up sections of the power grid. Money lost, right? Not necessarily. After they own that part of the grid, they start charging you for the power they give you. Great, so they spend your money to charge you money&#8230;but wait, there&#8217;s more. Because the government entity is essentially a business at this point which provides a service and charges for that service, it&#8217;s making money back. On top of this, the residents now have a choice of who they get their power from. This is known as &#8220;competition&#8221; and is the leading force against monopolization in any industry. If a market segment is profitable, doesn&#8217;t it make sense for the government to capitalize on that market segment?</p>
<p>Now let&#8217;s look from another angle. You are a taxpayer (I&#8217;m assuming) and you want to make the final decision about whether or not a section of power grid is bought. This is great, but your local government spends a lot (I mean, a LOT) of money without your express permission because we as a city/state/country give our government that power. We elect people to handle this in our stead because we are busy and don&#8217;t have the time to make every decision collectively. That&#8217;s how a representative republic works (<a rel="nofollow" href="http://en.wikipedia.org/wiki/Republic#United_States">no, the U.S.A. is <span style="text-decoration: underline;">not</span> a democracy, sorry!!</a>)</p>
<p>So why bother holding an (expensive) election so the govt. entity can spend more money petitioning and explaining to you why it&#8217;s good that they actually make money? Especially when they&#8217;re spending your money on lots of other things, all the time. Holding an election to give a local government entity the right to <em>actually turn your tax dollars into profit</em> (or at least offer you lower prices on energy) seems like a waste of time, no?</p>
<p>So where did this bill come from? If you read the Wikipedia page, it&#8217;s obvious: PG&amp;E. Now, I have nothing against these guys. They do a great job, and obviously they&#8217;re just protecting their interests. They do not want the government competing with them, which is why thus far they have donated $6.5 million to the campaign, and have stated they plan to donate up to $35 million total. They obviously have a vested interest in forcing local governments to get 2/3 support in elections (which is very, <em>very</em> hard to do).</p>
<p>By voting &#8220;Yes!&#8221; on prop 16, <span style="text-decoration: underline;">you gain absolutely no more rights than you had before</span>, you only make it harder for local and state governments to turn your tax dollars into something useful: cheap power for you. The name &#8220;California Taxpayers Right to Vote Act&#8221; is a misleading name designed to dupe the voters (that&#8217;s you!) into voting for higher energy prices and less competition in the energy market.</p>
<p>It&#8217;s important that our local governments are accountable for the money they spend, but passing highly targeted, specific bills that force them to ask, nay, beg, the voters for approval on everything they spend money on slows (if not stops) progress and makes our government much less useful&#8230;after all, we&#8217;re already electing them and paying them to decide where our money goes. Doesn&#8217;t voting on every single issue defeat the purpose of appointing representation?</p>
<p>Also, if the residents of a city really do not want the government spending their money on buying areas of power grid, they can get a ballot intiative (which takes a handful of signatures) and vote on it themselves.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/politics/california-proposition-16-california-taxpayers-right-to-vote-act/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>NearlyFreeSpeech.net downtime</title>
		<link>http://blog.killtheradio.net/reviews/nearlyfreespeech-net-downtime/</link>
		<comments>http://blog.killtheradio.net/reviews/nearlyfreespeech-net-downtime/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 18:10:50 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[downtime]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[transparency]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=457</guid>
		<description><![CDATA[I&#8217;ve never formally written about NearlyFreeSpeech.net until now, even though I&#8217;ve always had good things to say. Even after some extended downtime I&#8217;m excited to say I&#8217;m still on the bandwagon. The reason is their transparency. I&#8217;ve worked with many hosts before, and none are as honest or transparent. Even the Rackspace Cloud gave glossed [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="nofollow" href="https://www.nearlyfreespeech.net/"><img class="alignright size-full wp-image-458" title="https://www.nearlyfreespeech.net/" src="http://blog.killtheradio.net/wp-content/uploads/2010/02/logo.gif" border="0" alt="https://www.nearlyfreespeech.net/" width="278" height="80" /></a>I&#8217;ve never formally written about <a rel="nofollow" href="https://www.nearlyfreespeech.net/">NearlyFreeSpeech.net</a> until now, even though I&#8217;ve always had good things to say. Even after some extended downtime I&#8217;m excited to say I&#8217;m still on the bandwagon. The reason is their transparency. I&#8217;ve worked with many hosts before, and none are as honest or transparent. Even the <a rel="nofollow" href="http://www.rackspacecloud.com">Rackspace Cloud</a> gave glossed over responses to their problems. A few of my NFS sites went down just about all of yesterday because of a server failure. I logged into the control panel (proprietary, but I actually prefer it over cPanel or hsphere) and looked at the sticky support note left for all customers.</p>
<p>I half-expected to see &#8220;teh service is dwn!! were trying to fix it! sry lol!&#8221; as with most hosts. Instead, there was page after page of updates with details and explanation. After this, I was able to rest easy, because I had a good idea of how long it would take to get everything back up. Whenever it didn&#8217;t go as planned, they&#8217;d post another update.</p>
<p>I cannot stress how awesome this was. Yes, they made my downtime awesome by treating me and the other customers as if we were techs in the server room. I didn&#8217;t really care about my sites being down, because I knew they were working really hard on it and probably wouldn&#8217;t go to bed until it was fixed.</p>
<p>This brings up another point though: transparency makes your customers wet. I know it&#8217;s been discussed time after time, but it really is true. People don&#8217;t like &#8220;Our apologies, our service went down,&#8221; as much as they like &#8220;Our service went down from 6:30-8:30 UTC today when lightning struck main Big-IP load-balancer, and our failover didn&#8217;t switch the backup on.&#8221;</p>
<p>What&#8217;s a Big-IP? What&#8217;s &#8220;failover?&#8221; It doesn&#8217;t matter&#8230;treating your customers as equals and letting <em>them</em> decide if information is relevant or not will make them wet.</p>
<p>In my three years experience with NFS, this is the first downtime I&#8217;ve experienced. Their support was amazing enough to update every customer with detailed information about the problems they were experiencing and how they were fixing it. I cannot recommend them more. For larger sites that require custom services running, you&#8217;re out of luck. For blogs, informational sites, paypal-driven shopping carts (no SSL, yet), etc this is the best shared host I&#8217;ve dealt with, ever. They&#8217;re dirt cheap, and the only host I know of who won&#8217;t disable your site without a court order or copyright violation.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/reviews/nearlyfreespeech-net-downtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kamikaze pilot leaves behind suicide note</title>
		<link>http://blog.killtheradio.net/social-issues/kamikaze-pilot-leaves-behind-suicide-note/</link>
		<comments>http://blog.killtheradio.net/social-issues/kamikaze-pilot-leaves-behind-suicide-note/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 21:14:18 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Social issues]]></category>
		<category><![CDATA[government]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[tax law]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=430</guid>
		<description><![CDATA[In case you haven&#8217;t heard, a man, Joe Stack, angry at the IRS crashed a plane into his local IRS chapter. I don&#8217;t have much to say about the issue itself. Obviously, I disagree with crashing airplanes, or other means of transportation, into buildings. I also disagree with violence in general. The man left behind [...]]]></description>
			<content:encoded><![CDATA[<p>In case you haven&#8217;t heard, <a rel="nofollow" href="http://www.cbsnews.com/stories/2010/02/19/national/main6223218.shtml">a man, Joe Stack, angry at the IRS crashed a plane into his local IRS chapter</a>. I don&#8217;t have much to say about the issue itself. Obviously, I disagree with crashing airplanes, or other means of transportation, into buildings. I also disagree with violence in general. The man left behind a suicide note on his site (which the FBI promptly removed) that detailed his hardships with the government during his life and why he did what he did. I don&#8217;t agree with what he did, but, save the last page, I do agree with most of what he said.</p>
<p>I&#8217;m posting <a rel="nofollow" href="http://www.thesmokinggun.com/archive/years/2010/0218102stack1.html">what&#8217;s left of the suicide note</a> on here in the form of images (all that was left of it).</p>
<div class="clear"><a href="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack1a.gif"><img class="alignleft size-medium wp-image-431" title="page 1" src="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack1a-230x300.gif" alt="0218102stack1a" width="200" height="260" /></a><a href="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack2a.gif"><img class="alignleft size-medium wp-image-432" title="page 2" src="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack2a-230x300.gif" alt="0218102stack2a" width="200" height="260" /></a><a href="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack3a.gif"><img class="alignleft size-medium wp-image-433" title="page 3" src="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack3a-230x300.gif" alt="0218102stack3a" width="200" height="260" /></a><a href="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack4a.gif"><img class="alignleft size-medium wp-image-434" title="page 4" src="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack4a-230x300.gif" alt="0218102stack4a" width="200" height="260" /></a><a href="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack5a.gif"><img class="alignleft size-medium wp-image-435" title="page 5" src="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack5a-230x300.gif" alt="0218102stack5a" width="200" height="260" /></a><a href="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack6a.gif"><img class="alignleft size-medium wp-image-436" title="page 6" src="http://blog.killtheradio.net/wp-content/uploads/2010/02/0218102stack6a-230x300.gif" alt="0218102stack6a" width="200" height="260" /></a></div>
<p>The part that struck me the most:</p>
<pre>The communist creed:
  From each according to his ability, to each according to his need.
The capitalist creed:
  From each according to his gullibility, to each according to his greed.</pre>
<p>I&#8217;m posting this because I agree with what was said. I believe that America is a wasteland of deceit where gains are privatized, and losses are socialized.</p>
<p>Like I&#8217;ve said and believe firmly, violence never solves anything&#8230; it continues cyclically and endlessly. It&#8217;s important, though, to <em>see</em> why violence happens and not just pass it off as &#8220;terrorism.&#8221; Yes, terrorism exists, but that doesn&#8217;t mean there isn&#8217;t a reason behind it, no matter how misguided.</p>
<p>My heart and thoughts go out to those who lost their lives as a result of this incident. Yes, they were part of this unjust, corrupt system, but isn&#8217;t everyone? They were obvious targets but we&#8217;re all in this together, and it&#8217;s not fair they should pay when everyone involved (everyone) is just as guilty as the politicians and corporations.</p>
<p>UPDATE &#8211; <a rel="nofollow" href="http://www.t35.com/embeddedart.txt">found the original text</a>, linked on what used to be <a href="http://embeddedart.com/" rel="nofollow">Joe Stack&#8217;s website</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/social-issues/kamikaze-pilot-leaves-behind-suicide-note/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Is Open Source too open?</title>
		<link>http://blog.killtheradio.net/technology/is-open-source-too-open/</link>
		<comments>http://blog.killtheradio.net/technology/is-open-source-too-open/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 23:53:28 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=421</guid>
		<description><![CDATA[I recently read a post on a web development firm&#8217;s blog (anonymous to protect them and myself). It was talking about how open-source web software is inferior to closed-source. The main reasoning was that open-source allows attackers to find vulnerabilities just by sifting through the code. The company touts their proprietary CMS as better than [...]]]></description>
			<content:encoded><![CDATA[<p>I recently read a post on a web development firm&#8217;s blog (anonymous to protect them and myself). It was talking about how open-source web software is inferior to closed-source. The main reasoning was that open-source allows attackers to find vulnerabilities just by sifting through the code. The company touts their proprietary CMS as better than <a rel="nofollow" href="http://drupal.org/" target="_blank">Drupal</a> or <a rel="nofollow" href="http://wordpress.org/" target="_blank">WordPress</a> because only they (and their customers, heh) see the source code. Therefore it&#8217;s rock solid.</p>
<p>I was kind of blown away by this. Obviously it&#8217;s a marketing ploy to scare unknowing customers into using them instead of doing a simple WordPress install, but it&#8217;s blatantly wrong and I feel the need to respond. Oddly enough, <em>their blog is in WordPress</em>. Hmm.</p>
<p>First off, all software has vulnerabilities. All servers have vulnerabilities. Yes, it&#8217;s easier to find them if you know the setup or know the code, but from what I&#8217;ve seen in my lifetime of computer work is this: if someone wants to hack your site, they will. If there is a vulnerability, they will find it. And as I just said, <span style="text-decoration: underline;">all</span> software has vulnerabilities. It&#8217;s stupid to assume that because the source is only readily available to people who pay you money and the people who work on their site after you that no vulnerabilities will ever be found. They will be found. Look at Google. <a rel="nofollow" href="http://googleblog.blogspot.com/2010/01/new-approach-to-china.html">They were just hacked by China</a>. Does Google open source their Gmail app? No, completely closed-source. But someone wanted to hack them, so they got hacked. That&#8217;s what happens. Also, if your proprietary CMS is written in PHP, Python, Ruby, Perl, etc etc&#8230;you&#8217;re still using open source. Someone could attack the site at the language level. Does it make sense to now develop your own closed-source programming language so nobody will ever be able to hack it?</p>
<p>Secondly, most well-known open-source software has been around a very long time and has had hundreds of thousands (if not millions) of people using it. This means that over time, it gets battle-hardened. The common and not-so-common vulnerabilities are found, leaving the users with the latest versions a rock-solid code base that has gone through thousands of revisions to be extremely secure. With open-source, you&#8217;ve got hundreds of eyes looking over everything that&#8217;s added/changed/removed at all times. With proprietary code, you get a few pairs of eyes at best, with much fewer installs, much fewer revisions to harden and secure.</p>
<p>Is open-source better than proprietary? If you&#8217;re poor, most likely, but otherwise they both have their good and bad points. The main point of this article isn&#8217;t to bash proprietary software at all, it&#8217;s to refute the claim that because the source is open the product is less secure. I believe the exact opposite, in fact. If your code is open for everyone to look at, you damn well better be good at seeing vulnerabilities before they even get deployed&#8230;and if you don&#8217;t catch it, someone else developing the project probably will.</p>
<p>Is open source too open? Hell no.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/is-open-source-too-open/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google does it (sucks balls) again</title>
		<link>http://blog.killtheradio.net/reviews/google-does-it-sucks-balls-again/</link>
		<comments>http://blog.killtheradio.net/reviews/google-does-it-sucks-balls-again/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 21:08:52 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=400</guid>
		<description><![CDATA[I don&#8217;t know about everyone else, but I&#8217;m starting to get insanely pissed off with Google. They keep changing their site. First their homepage with the ridiculous Google Fade. Now their search listings have updated. It appears Google is on a mission to alienate and anger their users. Mission accomplished. You know why I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.killtheradio.net/wp-content/uploads/2010/02/googlesearch_pc.jpg"><img class="alignright size-medium wp-image-413" style="margin-left: 12px;" title="googlesearch_pc" src="http://blog.killtheradio.net/wp-content/uploads/2010/02/googlesearch_pc-300x188.jpg" alt="googlesearch_pc" width="300" height="188" /></a>I don&#8217;t know about everyone else, but I&#8217;m starting to get insanely pissed off with Google. They keep changing their site. First their homepage with the ridiculous <a href="http://blog.killtheradio.net/technology/google-fade-hate-it-hate-it-hate-it/">Google Fade</a>. Now their search listings have updated.</p>
<p>It appears Google is on a mission to alienate and anger their users. Mission accomplished. You know why I don&#8217;t use other searches? Because there&#8217;s too much clutter in the results. Google is simple. You type something, it shows results. Thanks. End of transaction. No need to show me &#8220;OH! Because you typed &#8216;gonorrhea&#8217; you might like AIDS!!!&#8221; or &#8220;See news about &#8216;gonorrhea!&#8217;&#8221; No thanks. Just show me the listings. Or would you like to see images of gonorrhea?? If I did, I&#8217;d click the &#8220;Images&#8221; link you so graciously supply on top.</p>
<p>So now Google is on a quest to be more like Yahoo. Idiots. Google, why do you think <span style="text-decoration: underline;">nobody</span> uses Yahoo? Why do you think everyone uses Google? IT&#8217;S THE FUCKING INTERFACE, you dumb shits. Are you really too fucking stupid to realize this? The more you copy other search engines, the more your appeal slips into the ether.</p>
<p>I really want to not hate you Google, but you make it so hard lately. PLEASE STOP FUCKING WITH YOUR INTERFACE.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/reviews/google-does-it-sucks-balls-again/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NginX as a caching reverse proxy for PHP</title>
		<link>http://blog.killtheradio.net/technology/nginx-as-a-caching-reverse-proxy-for-php/</link>
		<comments>http://blog.killtheradio.net/technology/nginx-as-a-caching-reverse-proxy-for-php/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 08:15:19 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=394</guid>
		<description><![CDATA[So I got to thinking. There are some good caching reverse proxies out there, maybe it&#8217;s time to check one out for beeets. Not that we get a ton of traffic or we really need one, but hey what if we get digged or something? Anyway, the setup now is not really what I call [...]]]></description>
			<content:encoded><![CDATA[<p>So I got to thinking. There are some good caching reverse proxies out there, maybe it&#8217;s time to check one out for beeets. Not that we get a ton of traffic or we really need one, but hey what if we get digged or something? Anyway, the setup now is not really what I call simple. <a href="http://haproxy.1wt.eu/" target="_blank">HAproxy</a> sits in front of <a href="http://nginx.org/" target="_blank">NginX</a>, which serves static content and sends PHP requests back to <a href="http://php-fpm.org/" target="_blank">PHP-FPM</a>. That&#8217;s three steps to load a fucking page. Most sites use apache + mod_php (one step)! But I like to tinker, and I like to see requests/second double when I&#8217;m running ab on beeets.</p>
<p>So, I&#8217;d like to try something like <a href="http://varnish-cache.org/" target="_blank">Varnish</a> (sorry, <a href="http://www.squid-cache.org/" target="_blank">Squid</a>) but that&#8217;s adding one more step in between my requests and my content. Sure it would add a great speed boost, but it&#8217;s another layer of complexity. Plus it&#8217;s a whole nother service to ramp up on, which is fun but these days my time is limited. I did some research and found what I was looking for.</p>
<p>NginX has made me cream my pants every time I log onto the server since the day I installed it. It&#8217;s fast, stable, fast, and amazing. Wow, I love it. Now I read that NginX can cache FastCGI requests based on response caching headers. So I set it up, modified the beeets api to send back some <a href="http://www.mnot.net/cache_docs/" target="_blank">Cache-Control</a> junk, and voilà&#8230;a %2800 speed boost on some of the more complicated functions in the API.</p>
<p>Here&#8217;s the config I used:</p>
<pre># in http {}
fastcgi_cache_path /srv/tmp/cache/fastcgi_cache levels=1:2
                           keys_zone=php:16m
                           inactive=5m max_size=500m;</pre>
<pre># after our normal fastcgi_* stuff in server {}
fastcgi_cache php;
fastcgi_cache_key $request_uri$request_body;
fastcgi_cache_valid any 1s;
fastcgi_pass_header Set-Cookie;
fastcgi_buffers 64 4k;</pre>
<p>So we&#8217;re giving it a 500mb cache. It says that any valid cache is saved for 1 second, but this gets overriden with the Cache-Control headers sent by PHP. I&#8217;m using $request_body in the cache key because in our API, the actual request is sent through like:</p>
<pre>GET /events/tags/1 HTTP/1.1
Host: ...

{"page":1,"per_page":10}</pre>
<p>The params are sent through the HTTP body even in a GET. Why? I spent a good amount of time trying to get the API to accept the params through the query string, but decided that adding $request_body to one line in an NginX config was easier that re-working the structure of the API. So far so good.</p>
<p>That&#8217;s FastCGI acting as a reverse proxy cache. Ideally in our setup, HAproxy would be replaced by a reverse proxy cache like Varnish, and NginX would just stupidly forward requests to PHP like it was earlier today&#8230;but I like HAproxy. Having a health-checking load-balancer on every web server affords some interesting failover opportunities.</p>
<p>Anyway, hope this helps someone. NginX <span style="text-decoration: underline;">can</span> be a caching reverse proxy. Maybe not the best, but sometimes, just sometimes,  simple &gt; faster.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/nginx-as-a-caching-reverse-proxy-for-php/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mosso (The Rackspace Cloud)</title>
		<link>http://blog.killtheradio.net/reviews/mosso-the-rackspace-cloud/</link>
		<comments>http://blog.killtheradio.net/reviews/mosso-the-rackspace-cloud/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 00:16:20 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[support]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=388</guid>
		<description><![CDATA[After being a customer for the Rackspace Cloud (formerly Mosso) for quite some time, I&#8217;m happy to say that my business and anyone who listens to our advice will never be using this hosting service, ever again. Rackspace is an amazing company. They are know for having great servers, great support, great everything. You can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>After being a customer for the <a rel="nofollow" href="http://www.rackspacecloud.com/" target="_blank">Rackspace Cloud</a> (formerly Mosso) for quite some time, I&#8217;m happy to say that my business and anyone who listens to our advice will <em>never</em> be using this hosting service, ever again.</p>
<p>Rackspace is an amazing company. They are know for having great servers, great support, great everything. You can&#8217;t beat them. Mosso was a side project that was swallowed up by them which aims to run websites in a real, actual cloud. This is a valiant cause. To be able to upload a site to one server and have it scale infinitely over however many servers their datacenter has without ever having to touch it&#8230;that&#8217;s a miracle. It&#8217;s a great idea, that unfortunately just doesn&#8217;t work.</p>
<p>Mosso has repeatedly let us down, again and again. Their service is always going down. It&#8217;s hard to find a month where one of our sites hosted on the &#8220;cloud&#8221; hasn&#8217;t seen at least an hour of down time. I&#8217;d expect this from a shoddy &#8220;HOST 100 SITES FOR $2.99/mo!!&#8221; host, but not from someone charging <span style="text-decoration: underline;">a base rate</span> of $100/mo. Here&#8217;s what it boils down to: you&#8217;re paying Mosso a lot of money for the privilege of beta testing their cloud architecture. Great business model.</p>
<p>And while Rackspace is known for fanatical support, the Rackspace Cloud is known by us for support that is fanatical about ignoring or avoiding the issues plaguing them on a week-to-week basis. Questions go unanswered, support requests ignored, etc etc.</p>
<p>So all in all, it&#8217;s been a terrible experience. And yes, we have been using them for more than a month&#8230;a little over a year now. Yes, we stuck it out and payed outlandish hosting rates for horrible service. Why? Because I really do wish it worked. I wish I could put a site on it and have it be up 100% of the time. That&#8217;s the point of a cloud, no? To have &gt;= 99.999% uptime? I really wish I could put a site on there and let it scale with demand as it grew without ever having to touch it &#8211; and I <span style="text-decoration: underline;">can</span> do this &#8211; but the price is my site goes down for long periods of time at short intervals (oh, plus the $100/mo). We tried to give them the benefit of the doubt, and tried to believe them every time they told us that this was the last downtime they&#8217;d be having (yes, we heard it a lot). I just can&#8217;t lie to myself any more though. Mosso sucks.</p>
<p>So please save yourself some time and realize that it&#8217;s too good to be true. The Rackspace Cloud is the most real and cool cloud hosting you&#8217;ll ever see, but as far as I&#8217;m concerned they are still alpha-testing it, and your site WILL go down. Want hosting that scales automatically, is zero customer maintenance, always up, and has amazing support? You won&#8217;t find it anywhere.</p>
<p>Mosso comes close, but they just can&#8217;t get it right. Save your money and learn how to scale on a good <a rel="nofollow" href="http://www.linode.com/?r=15d5d2323910d69794b93ed02cd7d43b2f68d8c5" target="_blank">VPS provider</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/reviews/mosso-the-rackspace-cloud/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>iPad &#8211; it&#8217;s not a laptop and it&#8217;s too fucking big for my pocket!</title>
		<link>http://blog.killtheradio.net/technology/ipad-its-not-a-laptop-and-its-too-fucking-big-for-my-pocket/</link>
		<comments>http://blog.killtheradio.net/technology/ipad-its-not-a-laptop-and-its-too-fucking-big-for-my-pocket/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 04:20:43 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[hype]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[trash]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=383</guid>
		<description><![CDATA[Yeah, so this amazing new device will, like, revolutionize the way we all look at things and stuff. Because you can touch it, things will be way better. Our lives just got a ton better. This revolutionary device will revolutionize the way we look at news and movies. Oh, and it will also change the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-416" style="margin-left: 12px;" title="340x" src="http://blog.killtheradio.net/wp-content/uploads/2010/01/340x.jpg" alt="340x" width="330" height="435" />Yeah, so this amazing new device will, like, revolutionize the way we all look at things and stuff. Because you can touch it, things will be way better. Our lives just got a ton better. This revolutionary device will revolutionize the way we look at news and movies. Oh, and it will also change the way cities are structured.</p>
<p>So, in case you haven&#8217;t heard, Apple took their iPod touch, made it 5x bigger, and are now marketing it as the iPad (or &#8220;Tablet&#8221;). Where does that leave us? A portable device that&#8217;s not portable and really fucking difficult to use. The reason laptops have keyboards and pointing devices is because people don&#8217;t like on-screen keyboards. They suck. It&#8217;s necessary on small and mobile devices like the iPod touch, but on a bigger level it&#8217;s not&#8230;which why laptops exist.</p>
<p>So before you follow the marketing hype and buy your new $500 tablet, ask yourself &#8220;What the fuck am I thinking?! I already have an iPod, and I already have a laptop. Those swindling asslickers don&#8217;t need more of my money!&#8221;</p>
<p>That&#8217;s right, the iPad is a shitty in between piece of shit which is shitty and smells like shit. It&#8217;s not <em>quite </em>a laptop, and it doesn&#8217;t <em>quite</em> fit in your pocket. Stay away!! Don&#8217;t be a dweeb!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/ipad-its-not-a-laptop-and-its-too-fucking-big-for-my-pocket/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>beeets 2.0 launch</title>
		<link>http://blog.killtheradio.net/updates/beeets-2-0-launch/</link>
		<comments>http://blog.killtheradio.net/updates/beeets-2-0-launch/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 03:34:14 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Updates]]></category>
		<category><![CDATA[beeets]]></category>
		<category><![CDATA[launch]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=379</guid>
		<description><![CDATA[Hey, this will be short. Me and my brother just launched our event site, beeets.com, in the Santa Cruz area. Check it out, post events, give feedback. We&#8217;ve been slaving away and we&#8217;re really excited about it. Thanks!]]></description>
			<content:encoded><![CDATA[<p>Hey, this will be short. Me and my brother just launched our event site, beeets.com, in the <a href="http://beeets.com/local-events/Santa+Cruz+CA" target="_blank">Santa Cruz area</a>. Check it out, post events, give feedback. We&#8217;ve been slaving away and we&#8217;re really excited about it. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/updates/beeets-2-0-launch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MooTools forge &#8211; central plugin spot for MooTool framework</title>
		<link>http://blog.killtheradio.net/technology/mootools-forge-central-plugin-spot-for-mootool-framework/</link>
		<comments>http://blog.killtheradio.net/technology/mootools-forge-central-plugin-spot-for-mootool-framework/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 02:11:51 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=377</guid>
		<description><![CDATA[I just stumbled onto this tonight: The Mootools plugin forge. Pretty sweet. Tons of fan-based plugins for Mootools in one spot. Check it out!]]></description>
			<content:encoded><![CDATA[<p>I just stumbled onto this tonight: <a rel="nofollow" href="http://mootools.net/forge/" target="_blank">The Mootools plugin forge</a>. Pretty sweet. Tons of fan-based plugins for Mootools in one spot. Check it out!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/mootools-forge-central-plugin-spot-for-mootool-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google fade &#8211; hate it hate it hate it</title>
		<link>http://blog.killtheradio.net/technology/google-fade-hate-it-hate-it-hate-it/</link>
		<comments>http://blog.killtheradio.net/technology/google-fade-hate-it-hate-it-hate-it/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 23:02:07 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[vomit]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=374</guid>
		<description><![CDATA[Google recently made a change to their main search page. Everything besides logo, search box, and buttons is now hidden until the page is moused over. &#60;rant&#62; What the fuck? Your search page was so simple. So clean. There was nothing to fix, nothing to make simpler. There was minimalist navigation on the top, and [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="nofollow" href="http://googleblog.blogspot.com/2009/12/now-you-see-it-now-you-dont.html" target="_blank">Google recently made a change</a> to their main search page. Everything besides logo, search box, and buttons is now hidden until the page is moused over.</p>
<p>&lt;rant&gt;<br />
What the fuck? Your search page was so simple. So clean. There was nothing to fix, nothing to make simpler. There was minimalist navigation on the top, and a few links on the bottom. It worked very well and was very good design.</p>
<p>You took something very simple, and tried to make it simpler. You have not succeeded. You took what you view as a problem and swept it under the rug. Your homepage isn&#8217;t simpler at all&#8230;it just LOOKS simpler at first glance. Then with first mouseover, it fades in?! What the fuck are you thinking?</p>
<p>This is the kind of childish effect a high-schooler learning HTML 4 would hack into his first homepage with shitty javascript. It looks nifty the FIRST TIME but after that it&#8217;s completely obnoxious and frustrating. I don&#8217;t want to wait to click on Images or News. Even if it&#8217;s 1/2 second.</p>
<p>To use the words of a blog commenter: &#8220;Imagine being at your desk preparing to work, but the desk chair would not appear until you try to sit down.&#8221; This is exactly how I feel.</p>
<p>If you really want to keep your juvenile display of javascript skillz, please give people an option to disable it so we don&#8217;t have to keep a bucket nearby in case new the homepage induces violent bouts of vomiting. Until then, I (and several others from the sounds of it) will be using <a rel="nofollow" href="http://www.bing.com" target="_blank">Bing</a>.<br />
&lt;/rant&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/google-fade-hate-it-hate-it-hate-it/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tomato &#8211; router firmware</title>
		<link>http://blog.killtheradio.net/reviews/tomato-router-firmware/</link>
		<comments>http://blog.killtheradio.net/reviews/tomato-router-firmware/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 20:15:31 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[routers]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=371</guid>
		<description><![CDATA[I recently got a WRT54G v3 (an older version of a Linksys router) off of ebay. I specifically got a version 3 because it&#8217;s the best router known to man that&#8217;s under $300. If you can get one for less than $50, my advice is to take it. Up until a few days ago, it [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got a WRT54G v3 (an older version of a Linksys router) off of ebay. I specifically got a version 3 because it&#8217;s the best router known to man that&#8217;s under $300. If you can get one for less than $50, my advice is to take it. Up until a few days ago, it was running the stock Linksys firmware. It&#8217;s not <em>terrible</em> but it&#8217;s not very extravagant either. We had a power outage and after that, wireless stopped working. I tried many things, including slapping the unit with my balls to make sure this wasn&#8217;t some sort of misguided power struggle. Putting it back in its place should fix that. No luck.</p>
<p>I had heard many, many times about the <a rel="nofollow" href="http://www.dd-wrt.com/">dd-wrt</a> firmware. One of the good things about the WRT53Gv3 is that you can install just about any custom firmware you want onto it. I&#8217;d also heard in the past about a firmware called <a rel="nofollow" href="http://www.polarcloud.com/tomato">Tomato</a>. It&#8217;s supposedly light, lean, fast, and has great QoS (although I never even bother with QoS).</p>
<p>I decided to give it a shot. I&#8217;m in love. It gives you all the options you need for the things you&#8217;d want, but doesn&#8217;t bloat up the interface with extra junk. It&#8217;s simply amazing. I really think Linksys should just stop bothering to make their own shitty firmware and just install Tomato on their routers.</p>
<p>Unfortunately, Tomato didn&#8217;t fix the wireless problem, so I had to plug in an old nemesis Netgear router I had laying around. It starting, in memory of times past, dropping my connection every 5 minutes. Fine for browsing the interweb, but not for streaming music or &#8220;videos.&#8221; I decided to give the Linksys one more shot&#8230;and it worked! Thank god. The best router ever with the best firmware I&#8217;ve seen so far, NOW with wireless. It must have been some strange hardware issue that fixed itself.</p>
<p>To be fair, I&#8217;ve never used dd-wrt and therefor can&#8217;t give a good comparison between it and Tomato. If I had a few extra routers laying around, I&#8217;d try it out&#8230;but each firmware flash is a dance with the devil and I can&#8217;t afford to get / find another one.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/reviews/tomato-router-firmware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Agent on Cygwin</title>
		<link>http://blog.killtheradio.net/how-tos/ssh-agent-on-cygwin/</link>
		<comments>http://blog.killtheradio.net/how-tos/ssh-agent-on-cygwin/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 04:25:08 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[How to's]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=369</guid>
		<description><![CDATA[There are probably a billion guides for this already, but whatever. If you DON&#8217;T have a ~/.bash_profile (a file that gets executed every time you start cyg): touch ~/.bash_profile chmod a+x ~/.bash_profile Now that you have the file, add this to it: SSHAGENT=/usr/bin/ssh-agent SSHAGENTARGS="-s" if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then eval `$SSHAGENT [...]]]></description>
			<content:encoded><![CDATA[<p>There are probably a billion guides for this already, but whatever. If you DON&#8217;T have a ~/.bash_profile (a file that gets executed every time you start cyg):</p>
<pre>
touch ~/.bash_profile
chmod a+x ~/.bash_profile
</pre>
<p>Now that you have the file, add this to it:</p>
<pre>
SSHAGENT=/usr/bin/ssh-agent
SSHAGENTARGS="-s"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
	eval `$SSHAGENT $SSHAGENTARGS`
	trap "kill $SSH_AGENT_PID" 0
fi
</pre>
<p>This will start up ssh-agent for each Cygwin shell you have open. Close your Cygwin shell (if one is open) and open a new one. Now type:</p>
<pre>
ssh-add ~/.ssh/id_rsa
[enter your password]
</pre>
<p>Voila! No more typing your stupid password every time you need to ssh somewhere. Note that if you close the Cygwin window, you&#8217;ll have to ssh-add your key again! This is good security&#8230;you can close the window when you&#8217;re done and someone who happens on your computer sitting there won&#8217;t have password-less access to any of your secure logins.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/how-tos/ssh-agent-on-cygwin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple (but long-winded) guide to REST web services</title>
		<link>http://blog.killtheradio.net/how-tos/a-simple-but-long-winded-guide-to-rest-web-services/</link>
		<comments>http://blog.killtheradio.net/how-tos/a-simple-but-long-winded-guide-to-rest-web-services/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 10:15:39 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[How to's]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=343</guid>
		<description><![CDATA[After all my research on what it means for a service to be RESTful, I think I&#8217;ve finally got a very good understanding. Once you understand a critical mass of information on the subject, something clicks and the first thing that comes in to your head is &#8220;Oh yeah! That makes sense!&#8221; It&#8217;s important to [...]]]></description>
			<content:encoded><![CDATA[<p>After all my research on what it means for a service to be RESTful, I think I&#8217;ve finally got a very good understanding. Once you understand a critical mass of information on the subject, something clicks and the first thing that comes in to your head is &#8220;Oh yeah! That makes sense!&#8221;</p>
<p>It&#8217;s important to think of a REST web service as a web site. How does a website work?</p>
<ul>
<li>A website works using HTTP. If you need to fetch something on a website, you use the HTTP verb &#8220;GET.&#8221; If you need to change something, you use &#8220;POST.&#8221; A RESTful web service uses other HTTP verbs as well, namely <a rel="nofollow" href="http://jcalcote.wordpress.com/2008/10/16/put-or-post-the-rest-of-the-story/" target="_blank">PUT</a> and DELETE, and can also implement OPTIONS to show which methods are appropriate for a resource.</li>
<li>A website has resources. A resource can be information, images, flash, etc. These resources can have different representations: HTML, a jpeg, an embedded video. REST is the same way. It is resource-centric. Want a list of users? GET /users. Want an event? GET /events/5. Want to edit that event? PUT /events/5. <em> </em><em>Every resource has a unique URL to identify it!</em></li>
<li>Resources are not dealt with directly. Instead, representations of resources are used. This can be a bit hard to grasp. What is a user? It&#8217;s a nebulous object somewhere that I cannot interact with. It is an idea, an entity. A representation is a form of the user resource I <em>can</em> interact with. A representation can be a comma delimited list, JSON, XML&#8230;anything the client and server both understand. How do we know what we&#8217;re interacting with? Media types:</li>
<li>As a website will tell you what kind of image you&#8217;re requesting, a REST service tells you what kind of resource representation you are receiving. This is done using media types. For instance, if I do a GET /events/7, the Content-Type may be &#8220;application/vnd.beeets.event+json&#8221; which tells us this is a vendor specific media (the &#8220;vnd&#8221;) and it&#8217;s an event in JSON format. You can pass these media types in your Accept headers to specify what type of representation you would like. These media types are documented somewhere so that client will know exactly what to expect when consuming them.</li>
<li>If you request a page that doesn&#8217;t exist or you aren&#8217;t authorized to view, a website will tell you. This is done using headers. A good REST service will utilize HTTP status headers to do the same. 200 Ok, 404 Not Found, 500 Internal Server Error, etc. These have already been defined and refined over many, many years by people who have been doing this a lot longer than you (probably)&#8230;use them.</li>
<li>A website will have links from one page to another. This is one of the main points of a REST service, and is also widely forgotten or misunderstood (it took me a while to figure it out even doing intense research). Resources in a REST service link to eachother, letting a client know what resources can be found where, and how they relate to eachother. An HTML page has links to it. So does a REST resource. Links can be structured however you like, but some good things to include are the URI of the linked resource, the relationship it has with the current resource, and the media type. This creates what&#8217;s known as a &#8220;loose coupling&#8221; between client and server. A client can crawl the server and figure out, only knowing a pre-defined set of media types, what resources are where and how to find them. This principal is known as HATEOAS (or &#8220;Hypermedia as the Engine of Application State&#8221;).</li>
<li>REST is stateless. This means that the server does not track any sort of client state. There are no session tokens the client uses to identify itself. There are no cookies set. Every request to the REST service <em>must</em> contain all information needed to make that request. Need to access a restricted resource? Send your authentication info for each request. It&#8217;s that simple. Isn&#8217;t it easier to track session? Not really. Maybe it&#8217;s easier on a small level, but once you start needing to scale, you will wish you&#8217;d gone stateless. Using a combination of HTTP basic authentication and API/Secret request signing, you don&#8217;t have to send over plain text passwords at all. Hell, even throw in a timestamp with each request to minimize replay attacks. You can get as crazy as you&#8217;d like with security. Or for those who prefer security over performance, use SSL.</li>
</ul>
<p>Now for some examples. Because I&#8217;m currently working on an event application, we&#8217;ll use that for most of the examples.</p>
<p>Let&#8217;s get a list of events from our server:</p>
<pre>GET /events
Host: api.beeets.com
Accept: application/vnd.beeets.events+json

{"page":1,"per_page":10}
-----------------------------------------
HTTP/1.1 200 OK
Date: Tue, 01 Dec 2009 04:12:48 GMT
Content-Length: 1430
Content-Type: application/vnd.beeets.events+json

{
	"total":81,
	"events":
	[
		{
			"links":
			[
				{
					"uri":"/events/6",
					"rel":"/rel/event self edit",
					"type":"application/vnd.beeets.event"
				},
				{
					"uri":"/locations/121",
					"rel":"/rel/location",
					"type":"application/vnd.beeets.location"
				}
			],
			"id":6,
			"title":"Paris Hilton naked onstage",
			...
		},
		...
	]
}</pre>
<p>What do we have? A list of events, with links to the resource representations of those events. Notice we also have links to another resource: the location. We can leave that for now, but let&#8217;s pull up an event:</p>
<pre>GET /events/6
Host: api.beeets.com
Accept: application/vnd.beeets.event+json

-----------------------------------------
HTTP/1.1 200 OK
Date: Tue, 01 Dec 2009 04:12:48 GMT
Content-Length: 666
Content-Type: application/vnd.beeets.event+json

{
	"links":
	[
		{
			"uri":"/events/6",
			"rel":"/rel/event self edit",
			"type":"application/vnd.beeets.event"
		},
		{
			"uri":"/locations/121",
			"rel":"/rel/location",
			"type":"application/vnd.beeets.location"
		}
	],
	"id":6,
	"title":"Paris Hilton naked onstage",
	"date":"2009-12-05T04:00:00Z"
}</pre>
<p>Using the link provided in the event listing, we managed to pull up an individual event, which we know how to parse because we know the media type&#8230;but wait, what&#8217;s this? OMG, someone is trying to smear Paris!! She&#8217;s on at 8:30!!! NOT 8!!! Let&#8217;s edit&#8230;if we do a PUT with new information, we&#8217;ll be able to save Paris&#8217; good name:</p>
<pre>PUT /events/6
Host: api.beeets.com
Accept: application/vnd.beeets.event+json
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

{"title":"Paris Hilton naked onstage (yuck)","date":"2009-12-05T04:30:00Z"}
-----------------------------------------
HTTP/1.1 200 OK
Date: Tue, 01 Dec 2009 04:12:48 GMT
Content-Length: 666
Content-Type: application/vnd.beeets.event+json

{
	"links":
	[
		{
			"uri":"/events/6",
			"rel":"/rel/event self edit",
			"type":"application/vnd.beeets.event"
		},
		{
			"uri":"/locations/121",
			"rel":"/rel/location",
			"type":"application/vnd.beeets.location"
		}
	],
	"id":6,
	"title":"Paris Hilton naked onstage (yuck)",
	"date":"2009-12-05T04:30:00Z"
}</pre>
<p>Holy shit, that was close. Notice we had to pass in authorization info, but now Paris won&#8217;t sue us for spreading misinformation. Phew.</p>
<p>What have we learned? Given one URL (/events), we have discovered two more (/locations/[id] and /events/[id]). We&#8217;ve also seen the media types in the responses that allow the client to know what kind of resource it&#8217;s dealing with and how to consume it.</p>
<p>Hopefully this pounds two really important points in: media types and HATEOAS. Without them, it&#8217;s not REST. You can&#8217;t just pass application/xml or application/json for every response. Sure, maybe the client can decode it, but they don&#8217;t know <em>what it is</em>, and without linking to other resources, they don&#8217;t know how to find anything&#8230;unless you want to document everything and <em>never change your service</em>.</p>
<p>Some other tips/points:</p>
<ul>
<li>Give yourself a few initial entry points to your REST service. You should be able to discover all of the resources in it just by crawling. If you can&#8217;t, you haven&#8217;t done HATEOAS correctly. This is a lot harder than it sounds, but it&#8217;s more than useful later on. Think of your REST service like a website with <span style="text-decoration: underline;">good</span> navigation.</li>
<li>Remember to implement the OPTIONS verb for your resources. It will tell the client what verbs can be used on what resources. With some decent routing built into your application, this should be a cakewalk.</li>
<li>As mentioned, you can use HTTP basic authentication for your requests. If the client is anything but a web browser, you won&#8217;t have to serve up an ugly popup login box, you can just do all that shit transparently. If you don&#8217;t want to send a cleartext password (please don&#8217;t!) you can salt the password on the client side and send it over. Hash the password again with the client&#8217;s secret for added security. Crackers will be amazed at your 1337 computer hacking skillz. You can then verify the hashed salted value on the server side. Add client-secret request signing with a timestamp for uber security.</li>
<li>Read a lot more info on REST. It seems that SO many &#8220;RESTful&#8221; services out there are half-baked and made by people who researched the topic for half a day. Some good ones to take points from are the <a href="http://kenai.com/projects/suncloudapis/pages/Home" target="_blank">Sun Cloud API</a> and the <a href="http://developer.netflix.com/docs/REST_API_Conventions" target="_blank">Netflix API</a>. Notice the documentation of media types and LACK of documentation on every single URL you can request. This is that loose-coupling stuff I was talking about.</li>
</ul>
<p>That&#8217;s it for now! I wrote this as a culmination of knowledge for the last week or so of research I&#8217;ve done&#8230;please let me know if any information is missing or incorrect and I can make updates. Hope it was helpful!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/how-tos/a-simple-but-long-winded-guide-to-rest-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix capistrano multi-server deployments (sort of)</title>
		<link>http://blog.killtheradio.net/tricks-hacks/fix-capistrano-multi-server-deployments-sort-of/</link>
		<comments>http://blog.killtheradio.net/tricks-hacks/fix-capistrano-multi-server-deployments-sort-of/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 22:14:48 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Tricks/Hacks]]></category>
		<category><![CDATA[deployments]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=352</guid>
		<description><![CDATA[Capistrano is a sexy bitch. At least it was until I spent hours trying to figure out how to deploy to multiple servers. Updated Cap, Ruby, compiled Ruby from source twice, etc etc. Capistrano just kept hanging with pushing code to two or more servers at once. Note that I am in Cygwin, if that [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="nofollow" href="http://www.capify.org/index.php/Capistrano" target="_blank">Capistrano</a> is a <em>sexy bitch</em>. At least it was until I spent hours trying to figure out how to deploy to multiple servers. Updated Cap, Ruby, compiled Ruby from source twice, etc etc. Capistrano just kept hanging with pushing code to two or more servers at once. Note that I am in Cygwin, if that makes a difference. Also, when deploying with no password on my ssh key, it works&#8230;hmm.</p>
<p>Well I added this:</p>
<pre>default_run_options[:max_hosts] = 1</pre>
<p>To my deploy.rb, and although it now has to deploy to one server at a time, it works. Note that for two servers this is fine. For 200 it&#8217;s not so fine. I&#8217;ll worry about that when it comes though.</p>
<p>UPDATE!!!! Something I never thought about until now is that you can use ssh-agent to save your keys in memory pre-deploy. Then you have a password-protected key that works with Capistrano WITHOUT doing the max_hosts hack. This is tested (on cygwin) and working for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/tricks-hacks/fix-capistrano-multi-server-deployments-sort-of/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arrays: Some PHP tricks I never knew</title>
		<link>http://blog.killtheradio.net/tricks-hacks/arrays-some-php-tricks-i-never-knew/</link>
		<comments>http://blog.killtheradio.net/tricks-hacks/arrays-some-php-tricks-i-never-knew/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 22:56:02 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Tricks/Hacks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=337</guid>
		<description><![CDATA[This will be a short post, but pretty cool. You can add arrays together: $test1 = array('name' =&#62; 'andrew'); $test2 = array('status' =&#62; 'totally gnar, dude'); print_r($test1 + $test2); --------------------------- Array ( [name] =&#62; andrew [status] =&#62; totally gnar, dude ) Wow&#8230;who would have thought. And my most recent favorite, converting objects to events. It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>This will be a short post, but pretty cool.</p>
<p>You can add arrays together:</p>
<pre>	$test1	=	array('name' =&gt; 'andrew');
	$test2	=	array('status' =&gt; 'totally gnar, dude');

	print_r($test1 + $test2);
	---------------------------
	Array
	(
	    [name] =&gt; andrew
	    [status] =&gt; totally gnar, dude
	)</pre>
<p>Wow&#8230;who would have thought. And my most recent favorite, converting objects to events. It&#8217;s a simple foreach($object as $key =&gt; $val) and putting each element into a separate array right? WRONG:</p>
<pre>	$array	=	(array)$object;</pre>
<p>No fucking way. Casting actually works in this case. Why does nobody tell me anything?! This is great for parsing XML because any parser normally returns an object, and quite honestly, I hate dealing with objects. All database data is by default returned as an array usually,  and it&#8217;s a pain having some data sources being objects while others are arrays. Now it doesn&#8217;t matter&#8230;if you like objects, cast an associative array as an (object), if you like arrays cast with (array). I love PHP&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/tricks-hacks/arrays-some-php-tricks-i-never-knew/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST &#8211; a powerful architecture that is completely obscure</title>
		<link>http://blog.killtheradio.net/technology/rest-a-powerful-architecture-that-is-completely-obscure/</link>
		<comments>http://blog.killtheradio.net/technology/rest-a-powerful-architecture-that-is-completely-obscure/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 05:02:56 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=327</guid>
		<description><![CDATA[This is the third post (in a row) I&#8217;ve made about REST. I&#8217;ve now read multiple explanations of REST, many of which say the same thing. Then I see implementations of these explanations, and the people who coined REST turn up their noses. I know someone has implemented REST correctly. I mean, someone out there [...]]]></description>
			<content:encoded><![CDATA[<p>This is the third post (in a row) I&#8217;ve made about REST. I&#8217;ve now read multiple explanations of REST, many of which say the same thing. Then I see implementations of these explanations, and the people who coined REST turn up their noses. I know someone has implemented REST correctly. I mean, someone out there HAS to have done it right&#8230;right? Every criticism of why a service is <em>not </em>RESTful uses terabytes of nit-picking jargon but somehow lacks examples on how that service could be <em>made</em> RESTful.</p>
<p>&#8220;This service is NOT RESTful because in REST, payloads are self-describing and contain references to other resources, and servers should be able to change their namespace, and two points always make a line unless one is in hyperspace.&#8221; And xyz.com&#8217;s REST API wasn&#8217;t doing this? What could they have done to change this? What IS REST about their API?</p>
<p>Maybe I&#8217;m dumb. Actually, no I&#8217;m not. I just can&#8217;t look at a spec and say, &#8220;Oh, I get it.&#8221; I have to see real, live examples. Why can nobody do this? It seems every HTTP &#8220;REST&#8221; service is a false implementation yet nobody can give a concise explanation of why.</p>
<p>I get that using only GET and POST is not RESTful. I get that every resource is a noun, and has a URL associated with it. I get that verbs are defined by HTTP and should not be used in URLs. I get that HTTP status headers should be used in conjuction with responses. I sort of get what a media type is (application/vnd.ieatmcdonaldstoomuch.cheeseburger) but do <em>not</em> get where it is defined. Or is this arbitrary?</p>
<p>Some points I have taken from all the back-and-forth involved in trying to break into an extremely elitist (and rightfully so, REST is REST) architectural style:</p>
<ul>
<li><strong>REST is stateless.</strong> All information required to complete the request is sent with the request. Every time.</li>
<li><strong>REST re-uses existing specs. </strong>HTTP has defined some very useful verbs (GET/POST/PUT/DELETE) for us to use. It makes sense to use those instead of creating custom verbage. HTTP also has status headers for letting a client know WTF is happening. 200 OK, 506 Suck My Balls Client, etc.</li>
<li><strong>REST maps resources to locations.</strong> I can find events by doing GET /events. I can post an event by doing POST /events. I can delete an event by doing DELETE /events/123. These URLs (/events, /events/123) are resources&#8230;an event collection and a single event. They are abstract <em>things</em> and a <em>description</em> of that thing is what is interacted with (aka &#8220;representation&#8221;).</li>
<li><strong>REST uses media types to define resources</strong>. I&#8217;m assuming this is the &#8220;application/vnd.event+xml&#8221; content-type thing. This is very confusing for me. Where is this MIME type defined? How is it defined? How does a client consume it? WTF is going on here? Any ideas, anyone?</li>
<li><strong>A REST service is self-descriptive</strong>. Reading one of <a rel="nofollow" href="http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven" target="_blank">Roy Fielding&#8217;s annoyingly-complex criticisms of bad REST implementations</a> brings up the point that given an initial URL and a &#8220;set of standardized media types that are appropriate for the intended audience,&#8221; I should be able to completely discover all information on that service. So when I hit the homepage, I should get an XML/JSON/HTML response telling me that there are events under /events? How do I structure this response? What &#8220;media type&#8221; would this resource be? I get the point behind this, but would love to see a full implementation.</li>
</ul>
<p>So while I&#8217;m have a lot of trouble grasping the last two points, everything else seems to make good sense. So far, anyway. I&#8217;m sure in a few minutes I&#8217;ll read another guide telling me that everything I know about REST is WRONG and I&#8217;m going to hell for even <em>thinking</em> the word REST without knowing <em>exactly</em> what it means.</p>
<p>Perhaps a REST web service that describes how to implement REST over HTTP would be a fun and amusing project&#8230;</p>
<p>UPDATE &#8211; I suppose a website comprised of HTML that describes REST would be RESTful&#8230;no need to make a &#8220;service.&#8221; Maybe this should be taken under because there seems to be a vague disseration, a few authoritative &#8220;resources&#8221; who love to use useless jargon, and a collection of blog posts that individually are all wrong, but pieced together create a somewhat workable view of that REST over HTTP should be like. So, someone should definitely get on that. In fact, I just might.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/rest-a-powerful-architecture-that-is-completely-obscure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
