<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>Styled Bits &#187; hacking</title>
	<link>http://v1.styledbits.com</link>
	<description>This is a Garden, and I'm Trying Not to Trample It</description>
	<pubDate>Wed, 19 Mar 2008 06:26:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>Two Bad Mothers That You Don&#8217;t Wanna Mess With</title>
		<link>http://v1.styledbits.com/2008/03/two-bad-mothers-that-you-dont-wanna-mess-with/</link>
		<comments>http://v1.styledbits.com/2008/03/two-bad-mothers-that-you-dont-wanna-mess-with/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 01:11:48 +0000</pubDate>
		<dc:creator>Michael Gorsuch</dc:creator>
		
		<category><![CDATA[hacking]]></category>

		<category><![CDATA[gamedev]]></category>

		<category><![CDATA[inspiration]]></category>

		<category><![CDATA[pixel art]]></category>

		<guid isPermaLink="false">http://www.styledbits.com/2008/03/two-bad-mothers-that-you-dont-wanna-mess-with/</guid>
		<description><![CDATA[As previously mentioned, I am going to learn how to create pixel art.  I set my limits, and have decided that I need to build some sort of basic shooter before tackling something more appealing.  
This first picture details one of the scariest monsters in the known pixelverse:

But no worries!  The Earth [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://www.styledbits.com/2008/03/growing-through-self-imposed-constraints/">previously mentioned</a>, I am going to learn how to create pixel art.  I set my limits, and have decided that I need to build some sort of basic shooter before tackling something more appealing.  </p>
<p>This first picture details one of the scariest monsters in the known pixelverse:</p>
<p><img src='http://www.styledbits.com/wp-content/uploads/2008/03/invader.jpg' alt='The Invader' /></p>
<p>But no worries!  The Earth may be saved yet!  Our hero is the captain of this rockin&#8217; space tank:</p>
<p><img src='http://www.styledbits.com/wp-content/uploads/2008/03/hero.jpg' alt='Our Hero' /></p>
<p>Both of these are 16&#215;16 pixels, but expanded for this post&#8217;s purposes.  I have some of the basic game mechanics worked out, but have done some Something Bad <sup>TM</sup> with malloc <em>somewhere</em>&#8230; but have yet to find it.  I will be firing up GDB shortly to investigate.</p>
]]></content:encoded>
			<wfw:commentRss>http://v1.styledbits.com/2008/03/two-bad-mothers-that-you-dont-wanna-mess-with/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Easy Mecurial Repository Sync</title>
		<link>http://v1.styledbits.com/2008/03/easy-mecurial-repository-sync/</link>
		<comments>http://v1.styledbits.com/2008/03/easy-mecurial-repository-sync/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 14:02:26 +0000</pubDate>
		<dc:creator>Michael Gorsuch</dc:creator>
		
		<category><![CDATA[hacking]]></category>

		<category><![CDATA[bash]]></category>

		<category><![CDATA[mercurial]]></category>

		<guid isPermaLink="false">http://www.styledbits.com/2008/03/easy-mecurial-repository-sync/</guid>
		<description><![CDATA[I&#8217;ve been using Mercurial for a little while now to manage my own small projects, and have always treated the copies on my server as centralized.  I would build a repository on the server, do my work from whatever system I was on at the time, and push my changes back over ssh when [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://www.selenic.com/mercurial/wiki/">Mercurial</a> for a little while now to manage my own small projects, and have always treated the copies on my server as centralized.  I would build a repository on the server, do my work from whatever system I was on at the time, and push my changes back over ssh when satisfied.  </p>
<p>This started to be a hassle for me as I began to add repositories.  I&#8217;d forget the names, have to ssh in, find the names, and then run a clone from my machine.  It takes too much time, so I wrote a little shell script to do all of that for me.      </p>
<p>It is not magical.  It checks the source server for new repositories, and clones them to you if it finds any.  After that, it cycles through all of your repos and performs an &#8216;hg pull&#8217; followed by an &#8216;hg up&#8217;.  </p>
<p>It makes the assumption that you are hosting all of your repositories in a single directory on both ends.  I also recommend that you use keys for authentication and have a key agent running on your local box to avoid having to type your password during each transaction.</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span style="color: #808080; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">SRC_USER=</span>michael
<span style="color: #007800;">SRC_SERV=</span>styledbits.com
<span style="color: #007800;">SRC_DIR=</span>code
<span style="color: #007800;">DEST_DIR=</span><span style="color: #007800;">$HOME</span>/code
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> -p <span style="color: #007800;">$DEST_DIR</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> x <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #007800;">$SRC_USER</span>@<span style="color: #007800;">$SRC_SERV</span> <span style="color: #ff0000;">&quot;ls $SRC_DIR&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> ! -d <span style="color: #007800;">$DEST_DIR</span>/<span style="color: #007800;">$x</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
  <span style="color: #000000; font-weight: bold;">then</span>
    hg clone <span style="color: #c20cb9; font-weight: bold;">ssh</span>://<span style="color: #007800;">$SRC_USER</span>@<span style="color: #007800;">$SRC_SERV</span>/<span style="color: #007800;">$SRC_DIR</span>/<span style="color: #007800;">$x</span> <span style="color: #007800;">$DEST_DIR</span>/<span style="color: #007800;">$x</span>
  <span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$DEST_DIR</span>/<span style="color: #007800;">$x</span> &amp;&amp; hg pull &amp;&amp; hg up
  <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://v1.styledbits.com/2008/03/easy-mecurial-repository-sync/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Some Quick Observations of WordPress.com</title>
		<link>http://v1.styledbits.com/2008/02/some-quick-observations-of-wordpresscom/</link>
		<comments>http://v1.styledbits.com/2008/02/some-quick-observations-of-wordpresscom/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 12:47:44 +0000</pubDate>
		<dc:creator>Michael Gorsuch</dc:creator>
		
		<category><![CDATA[hacking]]></category>

		<category><![CDATA[drupal]]></category>

		<category><![CDATA[wordpress]]></category>

		<category><![CDATA[wordpress.com]]></category>

		<guid isPermaLink="false">http://www.styledbits.com/2008/02/some-quick-observations-of-wordpresscom/</guid>
		<description><![CDATA[I moved MichaelOnSecurity to WordPress.com nearly a month ago, wanting to see how the WordPress.com community affects one&#8217;s blog.  It looks like I&#8217;m going to have to move things back to my own server soon.  Unfortunately, my site has all but dropped off of the search engines, which is far more worrisome than not having [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://www.styledbits.com/2008/02/moving-michaelonsecuritycom-to-wordpresscom/">moved</a> <a href="http://michaelonsecurity.com">MichaelOnSecurity</a> to <a href="http://www.wordpress.com">WordPress.com</a> nearly a month ago, wanting to see how the WordPress.com community affects one&#8217;s blog.  It looks like I&#8217;m going to have to move things back to my own server soon.  Unfortunately, my site has all but dropped off of the search engines, which is far more worrisome than not having a built-in community.</p>
<p>I will also need to reconsider my approach: my goal is to build a simple operational handbook that is easily updated.  I&#8217;m not so sure that weekly weblog posts will get me there&#8230; perhaps I need to revisit <a href="http://www.drupal.org">Drupal</a>, and use their book system to write the handbook and their stock article system to write about updates and other news&#8230;</p>
<p>Perhaps, perhaps.  I make mistakes so you don&#8217;t have to.  ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://v1.styledbits.com/2008/02/some-quick-observations-of-wordpresscom/feed/</wfw:commentRss>
		</item>
		<item>
		<title>And Back to C?</title>
		<link>http://v1.styledbits.com/2008/02/and-back-to-c/</link>
		<comments>http://v1.styledbits.com/2008/02/and-back-to-c/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 22:52:46 +0000</pubDate>
		<dc:creator>Michael Gorsuch</dc:creator>
		
		<category><![CDATA[hacking]]></category>

		<category><![CDATA[allegro]]></category>

		<category><![CDATA[c]]></category>

		<category><![CDATA[game programming]]></category>

		<category><![CDATA[gamedev]]></category>

		<guid isPermaLink="false">http://www.styledbits.com/2008/02/and-back-to-c/</guid>
		<description><![CDATA[I&#8217;ve spent a portion of the day trying to pump out some decent music for our RPM2008 contribution with little results.  It happens sometimes, so I went out for a walk and tried again.  Still nothing.  I am however, finally getting my rsync repo setup so Paul and I can share the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent a portion of the day trying to pump out some decent music for our <a href="http://rpm2008.styledbits.com">RPM2008</a> contribution with little results.  It happens sometimes, so I went out for a walk and tried again.  Still nothing.  I am however, finally getting my rsync repo setup so Paul and I can share the raw GarageBand tracks.  I said I&#8217;d do this a week ago, but I obviously lied.  The files are copying now, so that&#8217;ll be done soon.</p>
<p>In the meantime, trying to do <em>something</em> creative, I thought I&#8217;d toy with <a href="http://www.pygame.org/news.html">Pygame</a> - an open source multimedia framework written in Python.  It looks intuitive, and is a wrapper for the SDL libraries.  Unfortunately, it doesn&#8217;t play well with OS X.  I originally had the idea that I could hack it so it would run on my box, but quickly realized that I&#8217;m missing the point.  If I ever wanted to distribute my project to others, I&#8217;d have to provide crazy instructions to those that wanted to run it on OS X.  I need to be closer to click-and-run.</p>
<p>So, I started looking for an alternative framework.  It doesn&#8217;t look there are any real solutions in Python or Ruby, but I <em>can</em> go the pure <a href="http://www.libsdl.org/">SDL</a> route or use <a href="http://alleg.sourceforge.net/">Allegro</a> if I&#8217;d like to (or have the guts to) use C.  Both are robust and proven, and I had written a few small games (more like demos) in SDL back in college.  I wish I had the brains to use revision control then, because it&#8217;d sure be nice to look over what I had done.  Oh well.</p>
<p>It&#8217;s been a while since I&#8217;ve done anything serious in C, so I&#8217;ll probably make some ugly mistakes.  The first time I ever worked with C was in 1996, and I was 16.  I was trying to get my Slackware linux distro to use my network card, and the device driver wouldn&#8217;t compile.  I had more balls than brains then, and decided that the best way to solve the problem was to comment out the offending line.  And it worked.  The driver compiled and my card freakin&#8217; got out on the local net.  Wow.  I felt like I had been initiated into some sort of secretive occult group.  It is now more than obvious that it was all dumb luck, but hey, it was encouraging.</p>
<p>Most of my college CS courses were rooted in C, and I did pretty well in them.  Towards the end of my course work, the staff decided to move the department to C++.  I got the basics without much trouble, but never felt that I mastered it.  For example, if you ask me what a template is, I&#8217;ll just give you a blank stare.</p>
<p>Now I&#8217;m working with it again.  I just wrote a simple app that uses the Allegro libraries, and I have a little guy that walks around my screen at the command of my keyboard.  Not too shabby for very little work.  Even better, this code can be compiled on the three platforms I care about - Linux, Windows, and OS X.</p>
<p>We&#8217;ll see if I&#8217;m still smiling when I get my first segfault ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://v1.styledbits.com/2008/02/and-back-to-c/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I Like Python</title>
		<link>http://v1.styledbits.com/2008/02/i-like-python/</link>
		<comments>http://v1.styledbits.com/2008/02/i-like-python/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 03:13:04 +0000</pubDate>
		<dc:creator>Michael Gorsuch</dc:creator>
		
		<category><![CDATA[hacking]]></category>

		<category><![CDATA[perl]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.styledbits.com/2008/02/i-like-python/</guid>
		<description><![CDATA[I&#8217;ve been working with Python more and more at work and in personal experiments.  It&#8217;s nice!  I&#8217;d toyed with it in the past while exploring Django, but never really dug into it.  Being a Ruby fan, I do miss block support - but, the namespace features and excellent readability certainly make it  attractive enough.
I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with <a href="http://www.python.org">Python</a> more and more at work and in personal experiments.  It&#8217;s nice!  I&#8217;d toyed with it in the past while exploring <a href="http://www.djangoproject.com">Django</a>, but never <em>really</em> dug into it.  Being a <a href="http://www.ruby-lang.org">Ruby</a> fan, I do miss block support - but, the namespace features and excellent readability certainly make it  attractive enough.</p>
<p>I think that I can build better utilities with Python than I currently can in Perl or Ruby, although that can only be proven through trial.</p>
]]></content:encoded>
			<wfw:commentRss>http://v1.styledbits.com/2008/02/i-like-python/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Fair Quote</title>
		<link>http://v1.styledbits.com/2008/02/a-fair-quote/</link>
		<comments>http://v1.styledbits.com/2008/02/a-fair-quote/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 23:36:42 +0000</pubDate>
		<dc:creator>Michael Gorsuch</dc:creator>
		
		<category><![CDATA[hacking]]></category>

		<category><![CDATA[humor]]></category>

		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.styledbits.com/2008/02/a-fair-quote/</guid>
		<description><![CDATA[Over at PerlBuzz:
Sure, PHP 6 may have a shorter release cycle than Perl 6 has, but at the end of it all, we&#8217;ll have Perl 6, and you&#8217;ll still have PHP.
]]></description>
			<content:encoded><![CDATA[<p>Over at <a href="http://feeds.feedburner.com/~r/PerlBuzz/~3/233814236/tell-us-how-to-do-it-andi.html">PerlBuzz</a>:</p>
<blockquote><p>Sure, PHP 6 may have a shorter release cycle than Perl 6 has, but at the end of it all, we&#8217;ll have Perl 6, and you&#8217;ll still have PHP.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://v1.styledbits.com/2008/02/a-fair-quote/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Two New Sites</title>
		<link>http://v1.styledbits.com/2008/01/two-new-sites/</link>
		<comments>http://v1.styledbits.com/2008/01/two-new-sites/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 04:09:51 +0000</pubDate>
		<dc:creator>Michael Gorsuch</dc:creator>
		
		<category><![CDATA[hacking]]></category>

		<category><![CDATA[drupal]]></category>

		<category><![CDATA[web design]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.styledbits.com/2008/01/two-new-sites/</guid>
		<description><![CDATA[Brooke and I finished up two personal projects today.  First, we launched the redesign of her site, Mean Green Lunchbox.   It&#8217;s now powered by Wordpress, and she&#8217;s very happy with it.
I also launched a security-centric blog today titled &#8216;Michael on Security&#8216;.  If you&#8217;re going to focus, you might as well get your name as specific [...]]]></description>
			<content:encoded><![CDATA[<p>Brooke and I finished up two personal projects today.  First, we launched the redesign of her site, <a href="http://www.meangreenlunchbox.com">Mean Green Lunchbox</a>.   It&#8217;s now powered by Wordpress, and she&#8217;s very happy with it.</p>
<p>I also launched a security-centric blog today titled &#8216;<a href="http://www.michaelonsecurity.com">Michael on Security</a>&#8216;.  If you&#8217;re going to focus, you might as well get your name as specific as possible, right?  I don&#8217;t see how I can deviate from the planned topic, unless I want to talk about home alarm systems.  I doubt I will.  The site is powered by Drupal, as it has the community features that I need built in.  It still has some rough edges, but the same can be stated about the author.  I look forward to working on it this year and learning even more.</p>
]]></content:encoded>
			<wfw:commentRss>http://v1.styledbits.com/2008/01/two-new-sites/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ouch</title>
		<link>http://v1.styledbits.com/2008/01/ouch/</link>
		<comments>http://v1.styledbits.com/2008/01/ouch/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 01:31:00 +0000</pubDate>
		<dc:creator>Michael Gorsuch</dc:creator>
		
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.styledbits.com/2008/01/ouch/</guid>
		<description><![CDATA[All I can say is that I feel for the Joyent sysadmins right now.
]]></description>
			<content:encoded><![CDATA[<p>All I can say is that <a href="http://www.joyeur.com/2008/01/16/strongspace-and-bingodisk-update">I feel for the Joyent sysadmins right now</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://v1.styledbits.com/2008/01/ouch/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SysAdmins: Thou Shalt Write Standard Documents!</title>
		<link>http://v1.styledbits.com/2008/01/sysadmins-thou-shalt-write-standard-documents/</link>
		<comments>http://v1.styledbits.com/2008/01/sysadmins-thou-shalt-write-standard-documents/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 21:04:01 +0000</pubDate>
		<dc:creator>Michael Gorsuch</dc:creator>
		
		<category><![CDATA[hacking]]></category>

		<category><![CDATA[life]]></category>

		<category><![CDATA[lessons]]></category>

		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.styledbits.com/2008/01/sysadmins-thou-shalt-write-standard-documents/</guid>
		<description><![CDATA[I got bit today.  A switch at one of our data centers ran into some problems due to an ethernet speed / duplex mismatch.  I&#8217;ve run into this a million times in the past, and always make sure that I don&#8217;t have auto negotiate enabled on ports other than gigabit.  Well, almost always.  I forgot [...]]]></description>
			<content:encoded><![CDATA[<p>I got bit today.  A switch at one of our data centers ran into some problems due to an ethernet speed / duplex mismatch.  I&#8217;ve run into this a million times in the past, and always make sure that I don&#8217;t have auto negotiate enabled on ports other than gigabit.  Well, almost always.  I forgot this one, and it not only cost me some sleep, it got in the way of our customers.</p>
<p>This is easily to avoid.  All one has to do is write up a document describing how a production switch must be configured in their environment, do the work, and then audit the switch to make sure that they complied with everything.  It just has to be a basic checklist.  Yes, it adds work, but it will certainly improve the quality.</p>
<p>It&#8217;s all too easy to forget these things and to just focus on solving the obvious problems of the day, but we must temper ourselves.</p>
]]></content:encoded>
			<wfw:commentRss>http://v1.styledbits.com/2008/01/sysadmins-thou-shalt-write-standard-documents/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More Reasons Why SimpleDB is Not the Death of Big Iron</title>
		<link>http://v1.styledbits.com/2007/12/more-reasons-why-simpledb-is-not-the-death-of-big-iron/</link>
		<comments>http://v1.styledbits.com/2007/12/more-reasons-why-simpledb-is-not-the-death-of-big-iron/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 21:55:02 +0000</pubDate>
		<dc:creator>Michael Gorsuch</dc:creator>
		
		<category><![CDATA[hacking]]></category>

		<category><![CDATA[amazon]]></category>

		<category><![CDATA[dba]]></category>

		<category><![CDATA[pundits]]></category>

		<category><![CDATA[simpledb]]></category>

		<category><![CDATA[sysadmin]]></category>

		<category><![CDATA[techcrunch]]></category>

		<guid isPermaLink="false">http://www.styledbits.com/2007/12/more-reasons-why-simpledb-is-not-the-death-of-big-iron/</guid>
		<description><![CDATA[A few more notes on why SimpleDB should not be considered the end of traditional database methodology:

it&#8217;s non-relational and you can&#8217;t run queries against multiple &#8216;domains&#8217;
attributes are limited to 1024 characters
you must zero-pad your numbers
no built in full-text search
your are not guaranteed immediate access to updated data

The more and more that I look at this, [...]]]></description>
			<content:encoded><![CDATA[<p>A few more notes on why <a href="http://www.amazon.com/gp/browse.html?node=342335011">SimpleDB</a> should not be considered the end of traditional database methodology:</p>
<ul>
<li>it&#8217;s non-relational and you can&#8217;t run queries against multiple &#8216;domains&#8217;</li>
<li>attributes are limited to 1024 characters</li>
<li>you must zero-pad your numbers</li>
<li>no built in full-text search</li>
<li>your are not guaranteed immediate access to updated data</li>
</ul>
<p>The more and more that I look at this, I think of SimpleDB as an awesome way to add metadata to S3 objects.  Use the SimpleDB domain to describe the S3 object (think of a photo or video site), and have a field container a URL to the object.</p>
<p>Just remember that no matter what anyone tells you, it is certainly not the traditional database killer.  As it stands, the field limitations wouldn&#8217;t even be able to hold a moderate sized Wordpress entry.  The point of all this is not to knock Amazon&#8217;s SimpleDB&#8230; I just wish the pundits would think things over before making themselves look silly.  SimpleDB will be useful to solve some problems, but certainly won&#8217;t be knocking down any <a href="http://www.techcrunch.com/2007/12/14/amazon-takes-on-oracle-and-ibm-with-simple-db-beta/">Oracle databases</a> anytime soon ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://v1.styledbits.com/2007/12/more-reasons-why-simpledb-is-not-the-death-of-big-iron/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
