<?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>NinjaCipher</title>
	<atom:link href="http://www.ninjacipher.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ninjacipher.com</link>
	<description>kungpow programming</description>
	<lastBuildDate>Thu, 25 Mar 2010 14:39:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='www.ninjacipher.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>An intro to MongoDB for MySql Developers</title>
		<link>http://www.ninjacipher.com/2010/03/25/an-intro-to-mongodb-for-mysql-developers/</link>
		<comments>http://www.ninjacipher.com/2010/03/25/an-intro-to-mongodb-for-mysql-developers/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 14:39:12 +0000</pubDate>
		<dc:creator>mattd</dc:creator>
				<category><![CDATA[random thoughts]]></category>

		<guid isPermaLink="false">http://www.ninjacipher.com/?p=206</guid>
		<description><![CDATA[Throughout my many years hacking away on countless different web projects in many different languages (php, python, perl, java etc) there has always been one constant&#8230; MySQL. I have always been a dyed in the wool MySQL fan. It&#8217;s a good relational database with a ton of features, easy to get setup (at least for [...]]]></description>
			<content:encoded><![CDATA[<p>Throughout my many years hacking away on countless different web projects in many different languages (php, python, perl, java etc) there has always been one constant&#8230; MySQL. I have always been a dyed in the wool MySQL fan. It&#8217;s a good relational database with a ton of features, easy to get setup (at least for simple deployments) and we all know the price is right.</p>
<p>All that being said, we have had some real issues with MySQL on some of our bigger projects lately. Once you move outside of the simple one server setup to working with replication and millions of rows of data MySQL quickly becomes something you really need an expert to manage effectively. That&#8217;s all well and good if you have a team with a kick ass MySQL db admin or the budget to go out and hire one as needed but that&#8217;s simply not always the case. So we have started exploring other options lately. Namely <a href="http://www.mongodb.org" target="mongo">MongoDb</a>. </p>
<p>For those of you that aren&#8217;t familiar with MongoDB it&#8217;s an open source non relational database created by 10Gen. Here is how they describe themselves&#8230;</p>
<blockquote>
<h3>Combining the best features of JSON databases, key-value stores, and RDBMSes.</h3>
<p>
MongoDB (from &#8220;humongous&#8221;) is a scalable, high-performance, open source, schema-free, document-oriented database. Written in C++
</p>
<p>
MongoDB bridges the gap between key-value stores (which are fast and highly scalable) and traditional RDBMS systems.
</p>
</blockquote>
<p>MongoDB is simple to setup, has drivers for most popular programming languages (php, python, java etc), scales really well and is fast&#8230; <i>REALLY FAST</i>. For those of you that are like me and come from a MySQL background, the no schema approach can be a bit of a mental hurdle to get over. You have to abandon some fundamental beliefs of how databases &#8220;should&#8221; work. For instance you don&#8217;t define tables. Everything is a collection and the collection is created automatically when you insert into it. And there is no enforced structure to the data (Mongo calls them Documents &#8211; which would be the equiv to a table row in MySQL) that you store in the collection. To me that was a big change and it took me a while to get used to it. </p>
<p>Now there are ways to add a schema layer on top of everything. We use the pymongo python driver and there is a nice add on module called <a href="http://bitbucket.org/namlook/mongokit/wiki/Home" target="mongokit">MongoKit</a> that allows you to enforce a schema (with or without validation) on top of the Mongo documents. Basically meaning that when you retrieve a Document from a Collection you get a Model object back instead of a python dict. This can be really helpful and also personally gave me back a bit of my comfort zone. </p>
<p>Now don&#8217;t get me wrong MongoDB isn&#8217;t the necessarily the right back end for all projects. One glaringly obvious drawback is the lack of transactions. This can be a big issue depending on your app logic. There are ways to program around this but it takes much more code to do so. Bottom line, there are still some things MySQL will be much better suited to. </p>
<p>Don&#8217;t take my word for it, <a href="http://www.mongodb.org/display/DOCS/Downloads" target="mongodownload">give it a shot yourself</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjacipher.com/2010/03/25/an-intro-to-mongodb-for-mysql-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Mako with Tornado Web Server</title>
		<link>http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/</link>
		<comments>http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 19:42:54 +0000</pubDate>
		<dc:creator>mattd</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[real time]]></category>
		<category><![CDATA[tornado]]></category>

		<guid isPermaLink="false">http://www.ninjacipher.com/?p=191</guid>
		<description><![CDATA[So at work we have been focusing on real time web services a lot lately. Due to this I&#8217;ve been getting a chance to play with some awesome new technologies that really lend themselves to the real time web. One of these new technologies is the Tornado Web Server.
&#8220;Tornado is an open source version of [...]]]></description>
			<content:encoded><![CDATA[<p>So <a href="http://wiredset.com" target="wiredset">at work</a> we have been focusing on real time web services a lot lately. Due to this I&#8217;ve been getting a chance to play with some awesome new technologies that really lend themselves to the real time web. One of these new technologies is the <a href="http://www.tornadoweb.org/" target="tornado">Tornado Web Server</a>.</p>
<blockquote><p>&#8220;Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed&#8221;</p></blockquote>
<p>We&#8217;re using <a href="http://www.makotemplates.org/" target="mako">Mako</a> to handle our templates (vs the template module that comes with Tornado). It&#8217;s super fast and feature rich and has good documentation. Bellow is a base class I wrote that illustrates how to render Mako templates from a Tornado RequestHandler class. It takes care of setting your template directory, template cache directory and your output encoding (utf-8). </p>
<p><strong>Note: This example assumes that you have your template settings defined as tornado options but they could be very easily just hard coded in. </strong></p>
<pre name="code" class="python">from tornado.web import RequestHandler
from mako.template import Template
from mako.lookup import TemplateLookup
from tornado.options import options

class BaseRequest(RequestHandler):
    def __init__(self, application, request, transforms=None):
        RequestHandler.__init__(self, application, request, transforms)
        self.lookup = TemplateLookup(directories=[options.template_dir], module_directory=options.mako_modules_dir, output_encoding='utf-8', encoding_errors='replace')

    def render_template(self,template_name, **kwargs):
        new_template = self.lookup.get_template(template_name)
        self.write(new_template.render(**kwargs))</pre>
<p>Basically you would just derive your handlers from BaseRequest vs from RequestHandler and you will then be able to render your Mako templates via the render_template method.</p>
<p>Here is an example:</p>
<pre name="code" class="python">class ExampleHandler(BaseRequest):
    def get(self):
        self.render_template('example.html')</pre>
<p>Shoot me a comment and let me know if you have any questions. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>No new release found &#8211; ubuntu upgrade from LTS version</title>
		<link>http://www.ninjacipher.com/2009/12/24/no-new-release-found-ubuntu-upgrade-from-lts-version/</link>
		<comments>http://www.ninjacipher.com/2009/12/24/no-new-release-found-ubuntu-upgrade-from-lts-version/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 20:23:38 +0000</pubDate>
		<dc:creator>mattd</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ninjacipher.com/?p=188</guid>
		<description><![CDATA[Ever tried to upgrade ubuntu from a LTS version to a non LTS version and gotten the message &#8220;No new release found&#8221; even though you know there is? SOOOOOO ANNOYING! 
Since I always forget this and have to go searching for it, I&#8217;m going to post it here. And if it saves someone else out [...]]]></description>
			<content:encoded><![CDATA[<p>Ever tried to upgrade ubuntu from a LTS version to a non LTS version and gotten the message &#8220;No new release found&#8221; even though you know there is? SOOOOOO ANNOYING! </p>
<p>Since I always forget this and have to go searching for it, I&#8217;m going to post it here. And if it saves someone else out there from wasting time looking for the same thing all the better. </p>
<pre>
  1. Install update-manager-core if it is not already installed:

      sudo apt-get install update-manager-core

   2. Edit /etc/update-manager/release-upgrades and set:

      Prompt=normal

   3. Launch the upgrade tool:

      sudo do-release-upgrade

   4. Follow the on-screen instructions.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjacipher.com/2009/12/24/no-new-release-found-ubuntu-upgrade-from-lts-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>google wave invite or nomination?</title>
		<link>http://www.ninjacipher.com/2009/10/02/google-wave-invite-or-nomination/</link>
		<comments>http://www.ninjacipher.com/2009/10/02/google-wave-invite-or-nomination/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 14:42:02 +0000</pubDate>
		<dc:creator>mattd</dc:creator>
				<category><![CDATA[random thoughts]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.ninjacipher.com/?p=178</guid>
		<description><![CDATA[So I woke up yesterday to a bright shiny invite to Google wave in my gmail account. This was a complete shock to me as I&#8217;ve basically lumped Google wave into the same category as leprechauns, unicorns and fairy godparents. I signed up for their beta program so long ago at this point I had [...]]]></description>
			<content:encoded><![CDATA[<p>So I woke up yesterday to a bright shiny invite to Google wave in my gmail account. This was a complete shock to me as I&#8217;ve basically lumped Google wave into the same category as leprechauns, unicorns and fairy godparents. I signed up for their beta program so long ago at this point I had written it off. That being said I&#8217;m not quite sure why I got one and other people that I know that signed up about the same time as me didn&#8217;t. I&#8217;ve read that you had to sign up in the first few days of the beta site being live and be sure to check all the boxes and write something to the team about why you should get one (all of which i did). Who knows&#8230;</p>
<p>Anyway me being the generous person that I am (lol) I sent out the bulk of my personal invites to fiends and coworkers. Lets face it waving with yourself is a bit of a bore.  Sadly though 24 hours + later and none of the invites I&#8217;ve sent out yet have been delivered. According to the invite others wave &#8220;Invitations will not be sent immediately. We have a lot of stamps to lick.&#8221; The weird thing is that when you send out what they are calling invites the user shows up in the invite window as &#8220;nominated&#8221;. Exactly what does that mean? Sorry if I&#8217;m being dense here but those two terms don&#8217;t really go hand in hand. </p>
<p>So suffice it to say I&#8217;m a little frustrated with the whole process. It&#8217;s like having a shiny new bike and not being able to ride it. Sure I would wave with strangers for the sake of waving but that&#8217;s a tad anticlimactic to be honest. </p>
<p>As for wave itself it seems pretty cool. Still definitely some bugs to work out but it def looks very promising. Took a sec before I figured out about the extensions setup which really is whats interesting about wave. I mean the email meets IM setup of wave is cool unto itself but it really gets fun when you start embedding more dynamic components into the conversation. Last night I played with the google maps extension which was pretty cool and started looking into the <a href="http://www.6rounds.com" target="6rounds">6 rounds</a> extension (a multiuser video chat service). </p>
<p>This would all be allot more compelling if I had more people to test it out with. Hopefully they get the invites sent out sooner then later. Fingers crossed. Has anyone out there gotten invites sent from friends yet? Leave me a comment and let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjacipher.com/2009/10/02/google-wave-invite-or-nomination/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>notes from the metro north</title>
		<link>http://www.ninjacipher.com/2009/07/17/notes-from-the-metro-north/</link>
		<comments>http://www.ninjacipher.com/2009/07/17/notes-from-the-metro-north/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 12:44:26 +0000</pubDate>
		<dc:creator>mattd</dc:creator>
				<category><![CDATA[random thoughts]]></category>

		<guid isPermaLink="false">http://www.ninjacipher.com/2009/07/17/notes-from-the-metro-north/</guid>
		<description><![CDATA[With the new house in CT comes a much extended commute on the metro north. The upside being that you can drink on the trains, so the trip home isn&#8217;t really that bad. The morning however is a bore. So I found the blackberry wordpress client and now I can update my blog from my [...]]]></description>
			<content:encoded><![CDATA[<p>With the new house in CT comes a much extended commute on the metro north. The upside being that you can drink on the trains, so the trip home isn&#8217;t really that bad. The morning however is a bore. So I found the blackberry wordpress client and now I can update my blog from my phone. Yes its slow going, and I feel a slight cramping in my thumbs but hell at least I&#8217;m posting for a change!</p>
<p>Todays topic is actionscript 3 (as3).<br />
I&#8217;ve been doing a ton of flash stuff at work lately so I&#8217;ve had a chance to dive deap into the mirky pool of as3 and oddly enough I&#8217;m starting to really enjoy it. To provide a bit of back story I have worked with flash here or there since the 90s but never found it to be that fullfilling. It always felt very design/animation centric which is cool but not really my bag. That being said as3 is a total game changer for me. Assigning classes to symbols and having a central document class makes me happy. There is something profoundly pleasing about opening up a fla full of flashy goodness and not haveing anything on the timeline. Not to mention it confuses the fuck out of designers lol. Annnnyway&#8230; Stay tuned as I will be posting a series of tips for as3 over the next few months. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjacipher.com/2009/07/17/notes-from-the-metro-north/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome back cipher</title>
		<link>http://www.ninjacipher.com/2009/07/15/welcome-back-cipher/</link>
		<comments>http://www.ninjacipher.com/2009/07/15/welcome-back-cipher/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 22:43:28 +0000</pubDate>
		<dc:creator>mattd</dc:creator>
				<category><![CDATA[random thoughts]]></category>

		<guid isPermaLink="false">http://www.ninjacipher.com/?p=156</guid>
		<description><![CDATA[Its been a hectic few months. The wife and I just bought our first house and we have been up to our eyeballs trying to get all the details worked out (not to mention the move&#8230; UGH).
At this point I think its about time I started blogging again so over the next few weeks check [...]]]></description>
			<content:encoded><![CDATA[<p>Its been a hectic few months. The wife and I just bought our first house and we have been up to our eyeballs trying to get all the details worked out (not to mention the move&#8230; UGH).</p>
<p>At this point I think its about time I started blogging again so over the next few weeks check back for some new posts. Work has been heavy on the flash lately so I plan on doing some posts about as3 and perhaps even some Adobe AIR stuff.</p>
<p>Stay tuned <img src='http://www.ninjacipher.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjacipher.com/2009/07/15/welcome-back-cipher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
