<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>tip.top.blog</title><generator>Tumblr (3.0; @rathboma)</generator><link>http://blog.matthewrathbone.com/</link><item><title>Android Game Reviews</title><description>&lt;p&gt;When I had an iphone there were at least 10 game review sites that I could hit up on a daily basis to find a good game to buy, but that’s not true for android. There are a couple, but two good websites is not enough for me to form an opinion on what to buy next.&lt;/p&gt;
&lt;p&gt;So instead of waiting for someone to launch their own version, I’ve made one myself.&lt;/p&gt;
&lt;p&gt;Say hello to &lt;a href="http://droidblimp.com/" target="_blank"&gt;Droid Blimp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lwobzyABEy1qar0o4.png"/&gt;&lt;/p&gt;
&lt;p&gt;I’ll be updating the site about once per week to start with, so stay tuned!&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/14684487487</link><guid>http://blog.matthewrathbone.com/post/14684487487</guid><pubDate>Fri, 23 Dec 2011 15:39:19 -0500</pubDate><category>games</category><category>android</category><category>blog</category></item><item><title>Slicer - Now the best window manager for the Mac.</title><description>&lt;p&gt;&lt;img height="75" src="http://a4.mzstatic.com/us/r1000/066/Purple/7d/05/b1/mzi.fmlrbwla.175x175-75.png" width="75"/&gt;&lt;/p&gt;
&lt;p&gt;I was always a big fan of the shift-it and size-up window managers for the mac, but they were never quite flexible enough.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://itunes.apple.com/us/app/slicer/id487999732?mt=12" target="_blank"&gt;Enter Slicer&lt;/a&gt;. It’s seriously awesome. You should buy it now because it’s only $3.99 and it’s better than competition costing $15.&lt;/p&gt;
&lt;p&gt;Here is a screenshot of my desktop organized by slicer, notice the top two windows are 1/3 and 2/3 width. Awesome:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lwm7zoUmRN1qar0o4.png"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://itunes.apple.com/us/app/slicer/id487999732?mt=12"&gt;BUY IT NOW&lt;/a&gt; (&lt;a href="http://allsystemsgrow.com/slicer/" target="_blank"&gt;or use the free trial if you’re not convinced&lt;/a&gt;)&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/14622155147</link><guid>http://blog.matthewrathbone.com/post/14622155147</guid><pubDate>Thu, 22 Dec 2011 12:19:00 -0500</pubDate></item><item><title>How to have page numbers start on page 3 using MS Word 2011 for Mac</title><description>&lt;p&gt;This works if you want your page numbers to start anywhere after page 1. In my example I want to start numbering on page 3, but this would work even if you wanted page numbering to start on page 57 (for example).&lt;/p&gt;
&lt;p&gt;We do this by breaking the document into sections. In this example I am using the following structure:&lt;/p&gt;
&lt;p&gt;Page 1 - title page&lt;/p&gt;
&lt;p&gt;Page 2 - contents page&lt;/p&gt;
&lt;p&gt;Page 3 - real document starts &lt;strong&gt;&lt;= I want this to be labelled page 1&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Insert a section break at the end of the title page, and the end of the contents page.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Put your cursor at the END of your title page, then click Insert =&gt; Break =&gt; Section Break (next page)&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lwbdy7Z6uy1qar0o4.png"/&gt;&lt;/p&gt;
&lt;p&gt;Do the same thing for the contents page. Now your document has 3 sections and when we insert page numbering it will only number that section.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Insert the Page Numbers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Navigate to the first page you want numbered (page 3 in my example).&lt;/p&gt;
&lt;p&gt;Click Insert =&gt; Page Numbers&lt;/p&gt;
&lt;p&gt;Ensure ‘show number on first page’ is checked&lt;/p&gt;
&lt;p&gt;Click Format…&lt;/p&gt;
&lt;p&gt;Under ‘page numbering’, select Start At and enter “1”&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lwbe9opXnO1qar0o4.png"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;That’s it!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can now update your contents page and it will refer to your shiny new page number format.&lt;/p&gt;
&lt;p&gt;This took me a long time to work out. I’m writing this primarily for my awesome wife who writes way more essays than I do. :-)&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/14321006569</link><guid>http://blog.matthewrathbone.com/post/14321006569</guid><pubDate>Fri, 16 Dec 2011 16:02:00 -0500</pubDate></item><item><title>Android game download stats for GeoPop, 7 days after launch</title><description>&lt;p&gt;I’ve always found download statistics articles by other app developers extremely interesting and useful when trying to get insight into download and revenue rates for mobile applications. I thought I’d share the love with some stats on my &lt;a href="https://market.android.com/details?id=com.rathboma.geopop" target="_blank"&gt;very first android game GeoPop&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;GeoPop&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The game is very simple: tap shapes in the order specified as fast as you can within the time limit. The more shapes you match, the higher your score will be. The challenge comes from beating your own high-score and placing top of the leader-board.&lt;/p&gt;
&lt;p&gt;The simplicity of the game mechanic was ideal for learning android development, and the mechanics of game development in general. Being a server-side developer by trade, it was a big leap having to work with UI vs game threads and handling time based animation, rendering and object movement in a frame rate independent way.&lt;/p&gt;
&lt;p&gt;Equally, because the mechanic is fairly simple, and the game has only a single game mode, my expectations as to download numbers are very conservative.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Stats&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I released the game on November 26th.&lt;/p&gt;
&lt;p&gt;Today (December 4th). I have a total of &lt;span&gt;183 installs.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here is my google analytics chart for the number of app launches per day:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lvp2q3H2do1qar0o4.png"/&gt;&lt;/p&gt;
&lt;p&gt;This represents a total of 108 absolute unique users.&lt;/p&gt;
&lt;p&gt;My total revenue from admob so far is $0.06, so any dreams of a &lt;a href="http://1.bp.blogspot.com/-t9oBaOX5ZA8/TaIhMq0GXYI/AAAAAAAAVc8/6RHY05hfAvg/s1600/scrooge_mcduck.jpg" target="_blank"&gt;giant money vault&lt;/a&gt; are still a long way from fruition.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Take Away&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I’m happy at my 180 downloads so far, its more than I expected (0) from my first android project.&lt;/p&gt;
&lt;p&gt;Interestingly, I released a bug-fix on December 3rd along with a new application icon, and this increased both downloads and active sessions drastically (about 70 downloads happened on that day). The same was not true for a bug fix released 2 days after launch.&lt;/p&gt;
&lt;p&gt;Hope this is interesting to the internetz in the same way other posts were useful to me.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Shout Out&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I’ve found the following blogs very interesting in this regard:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.ziggysgames.com/" target="_blank"&gt;Ziggy’s Games&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mikamobile.blogspot.com/"&gt;Mika Mobile&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://droid-blog.net/"&gt;Droid-blog&lt;/a&gt;&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/13740634070</link><guid>http://blog.matthewrathbone.com/post/13740634070</guid><pubDate>Sun, 04 Dec 2011 14:54:44 -0500</pubDate><category>android</category><category>revenue</category><category>geopop</category><category>games</category><category>admob</category><category>analytics</category></item><item><title>Santa Says? An xmas game that doesn't suck</title><description>&lt;p&gt;&lt;a href="https://market.android.com/details?id=com.rathboma.santafree"&gt;&lt;img src="http://media.tumblr.com/tumblr_lvl3pavtjQ1qar0o4.png"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Last weekend I found myself drawing Christmas characters, so to capitalize on the idea I built a game:&lt;/p&gt;
&lt;p&gt;Santa Says? is a simon-says style memory game where the goal is to repeat the pattern shown to you on screen. It gets really hard (my highscore is 19), and it’s really fun.&lt;/p&gt;
&lt;p&gt;To go along with the hand-drawn graphics I also added funny voices to each of the characters (it’s more fun than a *beep* noise!).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://market.android.com/details?id=com.rathboma.santafree" title="Santa Says"&gt;Check it out on the market&lt;/a&gt;&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/13636686968</link><guid>http://blog.matthewrathbone.com/post/13636686968</guid><pubDate>Fri, 02 Dec 2011 11:13:00 -0500</pubDate><category>game</category><category>android</category><category>santa</category><category>christmas</category><category>xmax</category><category>free</category></item><item><title>GeoPop - My First Android Game</title><description>&lt;p&gt;I just clicked publish on ‘GeoPop’, my first Android project.&lt;/p&gt;
&lt;p&gt;GeoPop is a puzzle game where you have to pop geometric shapes as fast as possible before the timer runs out. It gets pretty frantic pretty quickly, so you need to have quick fingers to reach that elusive high-score :-).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://market.android.com/details?id=com.rathboma.geopop"&gt;Click here to download it from the android market&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://market.android.com/details?id=com.rathboma.geopop"&gt;&lt;img src="http://media.tumblr.com/tumblr_lvaedzqCgr1qar0o4.png"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PS - I would really appreciate any feedback, so please &lt;a href="http://twitter.com/rathboma"&gt;tweet me&lt;/a&gt; with anything at all, even to just tell me why it sucks!&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/13364834917</link><guid>http://blog.matthewrathbone.com/post/13364834917</guid><pubDate>Sat, 26 Nov 2011 16:33:20 -0500</pubDate><category>game</category><category>android</category><category>GeoPop</category><category>software</category></item><item><title>[link] Beginning Android Game Development Book</title><description>&lt;a href="http://www.amazon.com/Beginning-Android-Games-Mario-Zechner/dp/1430230428/ref=sr_1_1?ie=UTF8&amp;qid=1319730012&amp;sr=8-1"&gt;[link] Beginning Android Game Development Book&lt;/a&gt;: &lt;p&gt;I totally recommend this book, which I read over the weekend. I went from fumbling around without being able to accomplish anything, to approaching game development in a totally new way (which is much better).&lt;/p&gt;
&lt;p&gt;Kudos to &lt;a title="Mario" target="_blank" href="https://twitter.com/#!/badlogicgames"&gt;@badlogicgames&lt;/a&gt;&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/11992897332</link><guid>http://blog.matthewrathbone.com/post/11992897332</guid><pubDate>Thu, 27 Oct 2011 11:42:00 -0400</pubDate></item><item><title>Adding JARS to hive without using ADD JAR</title><description>&lt;p&gt;Say you’ve built some library you want to use in Hive, or even in Hadoop. If this library is a UDF for use in hive queries you can load it like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ADD JAR ‘s3n://matthewsbucket/superudf.jar’;&lt;/p&gt;
&lt;p&gt;CREATE TEMPORARY FUNCTION super as ‘com.matthewrathbone.SuperFunction’;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you’re creating a bunch of these you don’t want to have to ‘ADD JAR’ _every_single_time_ you want the function, you want it to be in the library already.&lt;/p&gt;
&lt;p&gt;To do that either put it in hive/lib, or hadoop/lib on all the nodes. If you’re using &lt;a title="emr" target="_blank" href="http://aws.amazon.com/elasticmapreduce/"&gt;Elastic Mapreduce&lt;/a&gt; you can do this in a bootstrap script:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sudo apt-get install wget&lt;/p&gt;
&lt;p&gt;wget -o /home/hadoop/lib/super.jar &lt;a href="http://somewhere.com/superudf.jar"&gt;http://somewhere.com/superudf.jar&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now you can skip the ADD JAR step in function creation (which is much faster by the way):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;CREATE TEMPORARY FUNCTION super as ‘com.matthewrathbone.SuperFunction’;&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://blog.matthewrathbone.com/post/11699206873</link><guid>http://blog.matthewrathbone.com/post/11699206873</guid><pubDate>Thu, 20 Oct 2011 14:19:15 -0400</pubDate></item><item><title>The start of an online puzzle community?</title><description>&lt;p&gt;&lt;a href="http://themastertheorem.com"&gt;&lt;img src="http://media.tumblr.com/tumblr_lsjty2Hgnz1qar0o4.png"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I’m a long-time fan of &lt;a title="puzzles" target="_blank" href="http://themastertheorem.com"&gt;The Master Theorem&lt;/a&gt;. The puzzle-master (M) posts pretty difficult to solve puzzles on a weekly basis, but lately something interesting has happened, user submitted puzzles have started being posted.&lt;/p&gt;
&lt;p&gt;Is it just me, or does this look like the start of a really interesting (and self-regulating) community for puzzle fanatics (makers AND solvers)?&lt;/p&gt;
&lt;p&gt;I hope so!&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/11023088897</link><guid>http://blog.matthewrathbone.com/post/11023088897</guid><pubDate>Tue, 04 Oct 2011 12:06:00 -0400</pubDate></item><item><title>Some fun Hadoop and Hive Bugs</title><description>&lt;p&gt;If you’re running Hadoop 0.20 with Hive 0.7 here are a couple of bugs that it’s useful to know about:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NullPointerException&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you have an external partitioned table, this could mean you forgot to recover the partitions before running the query:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ALTER TABLE sample RECOVER PARTITIONS;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;MR jobs hanging on 0/0 completed map tasks&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Creating an external table that points to an empty location will cause hive to generate mapreduce jobs that hang *forever*. It’s because the map tasks stay at 0% complete (0/0 completed).&lt;/p&gt;
&lt;p&gt;There is a &lt;a href="https://issues.apache.org/jira/browse/HADOOP-5850"&gt;Hadoop patch for this&lt;/a&gt; (so long as you have the ability to patch your cluster), and it should already be integrated into hadoop version 0.21.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you have some sort of delimited data (eg, tab delimited) in a Hive external table, and you want to find all records where a particular string field is non-existent,  you need to test for empty string and not NULL:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;select * from events where venue IS NULL &lt;= Won’t work&lt;/p&gt;
&lt;p&gt;select * from events where venue = “” &lt;= Will work&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://blog.matthewrathbone.com/post/10456525488</link><guid>http://blog.matthewrathbone.com/post/10456525488</guid><pubDate>Tue, 20 Sep 2011 18:23:00 -0400</pubDate></item><item><title>"regular expressions are “WYSIWYG” - the language described is the language that gets matched—whereas..."</title><description>“regular expressions are “WYSIWYG” - the language described is the language that gets matched—whereas parser-generators are WYSIWYGIYULR(k) - “what you see is what you get if you understand LR(k).””&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a title='Matthew Might and David Darais : "Yacc Is Dead"' href="http://arxiv.org/PS_cache/arxiv/pdf/1010/1010.5023v1.pdf"&gt;Matthew Might and David Darais : “Yacc Is Dead”&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(I know it’s a very dorky quote, but it really is awesome)&lt;/p&gt;&lt;/em&gt;</description><link>http://blog.matthewrathbone.com/post/5348660756</link><guid>http://blog.matthewrathbone.com/post/5348660756</guid><pubDate>Mon, 09 May 2011 21:49:00 -0400</pubDate><category>quote</category><category>compilers</category></item><item><title>Google should buy this website</title><description>&lt;a href="http://workflowy.com"&gt;Google should buy this website&lt;/a&gt;: &lt;p&gt;This is the missing tool in google-docs, I use it everyday. Its the sweet spot between a full on document and a piece of paper.&lt;/p&gt;
&lt;p&gt;If they added their collaboration features it would be an amazing product that I would happily pay for.&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/4780752872</link><guid>http://blog.matthewrathbone.com/post/4780752872</guid><pubDate>Wed, 20 Apr 2011 13:46:07 -0400</pubDate></item><item><title>A Warning About Apache Thrift's Asynchronous Clients</title><description>&lt;p&gt;By default if you use the asynchronous client for &lt;a href="https://github.com/apache/thrift"&gt;thrift&lt;/a&gt; it will be using a FRAMED transport layer, even though there is no mention of this in the code / docs.&lt;/p&gt;
&lt;p&gt;You’ll know this is happening because your server will give you the following error message when it receives an rpc:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you have no control over the server code (eg, if you’re using &lt;a href="https://github.com/cloudera/flume"&gt;flume&lt;/a&gt;), then you’ll have to fall back to the synchronous client, sorry.&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/4754638713</link><guid>http://blog.matthewrathbone.com/post/4754638713</guid><pubDate>Tue, 19 Apr 2011 16:16:36 -0400</pubDate><category>flume</category><category>thrift</category><category>java</category></item><item><title>It has been a good week</title><description>&lt;p&gt;So over the last week I’ve been doing some pretty awesome things.&lt;/p&gt;
&lt;p&gt;I went to the &lt;a href="http://foursquare.com/venue/22762"&gt;Wollman Rink&lt;/a&gt; in Central Park to skate with NYR players &lt;/p&gt;
&lt;p&gt;I went to the &lt;a href="http://foursquare.com/venue/41046"&gt;Metropolitan Opera&lt;/a&gt; to watch &lt;a href="http://en.wikipedia.org/wiki/Armida_(Rossini)"&gt;Armida&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Then on Saturday I was at &lt;a href="http://foursquare.com/venue/41378"&gt;BAM&lt;/a&gt; to see Diary of a MadMan (with Geoffrey Rush) &lt;/p&gt;
&lt;p&gt;Finally yesterday (Sunday) I went to see the &lt;a href="http://foursquare.com/venue/217085"&gt;Rangers play at Madison Square Garden&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;And tonight I’m going to the &lt;a href="http://www.universityclubny.org/"&gt;University club&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;All in all a very good week, although I’m sure you can guess how much NYU work has been completed.&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/3565164789</link><guid>http://blog.matthewrathbone.com/post/3565164789</guid><pubDate>Mon, 28 Feb 2011 11:56:21 -0500</pubDate></item><item><title>Kindle store prices</title><description>&lt;p&gt;Am I the only one who thinks the kindle store ui (on the kindle) should have the book prices next to the books when you search? How else do I know what snap purchases to make?&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/3495030993</link><guid>http://blog.matthewrathbone.com/post/3495030993</guid><pubDate>Fri, 25 Feb 2011 01:55:33 -0500</pubDate></item><item><title>NullPointerException when performing a join with Hadoop Hive 0.50</title><description>&lt;p&gt;If you get this NullPointer exception when joining two tables in hadoop hive, the problem may be that in one of the two tables the join key value is “” (blank string).&lt;/p&gt;
&lt;p&gt;For example, if you’re running this query:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;select users.id, locations.address from users left outer join locations on users.location_id = locations.id;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and users.location_id happens to be “” somewhere, then you will get this error.&lt;/p&gt;
&lt;p&gt;(sometimes I’ve even had it happen because another, non-join column was “”)&lt;/p&gt;
&lt;p&gt;To get around this an easy workaround is to create a temporary table holding users with location_id’s that aren’t “”, and with only the columns absolutely needed to process the job.&lt;/p&gt;
&lt;p&gt;This drove me crazy for hours today, so hopefully it won’t happen again&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/2518328563</link><guid>http://blog.matthewrathbone.com/post/2518328563</guid><pubDate>Wed, 29 Dec 2010 18:25:00 -0500</pubDate><category>hadoop</category><category>hive</category><category>mapreduce</category></item><item><title>Remember stuff easier</title><description>&lt;a href="http://remember.matthewrathbone.com/"&gt;Remember stuff easier&lt;/a&gt;: &lt;p&gt;I have trouble remembering a lot of things like birthdays, so I built this tool to help me.&lt;/p&gt;

&lt;p&gt;Check it out.&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/1507574910</link><guid>http://blog.matthewrathbone.com/post/1507574910</guid><pubDate>Sun, 07 Nov 2010 12:33:40 -0500</pubDate></item><item><title>Mini Squadron - my favorite android game of the moment</title><description>&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_la1mcgMuCu1qar0o4.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;I’ve been hunting for some good android games recently and this is one of my favorites. Put simply you have to kill all the other planes using your one weapon. It sounds simple, but you can get a range of different weapons, about 100 planes, and lots of different levels (which get quite challenging). In addition, the animation and artwork is lovely and really makes it fun to play.&lt;/p&gt;

&lt;p&gt;&lt;a title="mini-squadron" href="http://www.appbrain.com/app/minisquadron/grayfinstudios.android.minisquadron"&gt;Check it out&lt;/a&gt;&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/1278682475</link><guid>http://blog.matthewrathbone.com/post/1278682475</guid><pubDate>Sat, 09 Oct 2010 18:01:13 -0400</pubDate></item><item><title>Samsung Vibrant as a Modem for my mac!!</title><description>&lt;p&gt;I actually got my phone working as a 3g modem for my mac, first time ever that I’ve had internet on the train. Love it.&lt;/p&gt;</description><link>http://blog.matthewrathbone.com/post/1225246556</link><guid>http://blog.matthewrathbone.com/post/1225246556</guid><pubDate>Fri, 01 Oct 2010 22:11:03 -0400</pubDate></item><item><title>Ruby JSON Serialization sucks for Time objects</title><description>&lt;p&gt;This is something to be very careful of if you need to transfer data between two ruby-based systems using JSON. If you serialize a Time object it will serialize as a string, this means on deserialization it stays as a string&lt;/p&gt;
&lt;p&gt;Let me demonstrate:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;test_data = {“time” =&gt; Time.now}&lt;/p&gt;
&lt;p&gt;json = test_data.to_json&lt;/p&gt;
&lt;p&gt;# the timestamp looks like this in json “Tue Sep 28 14:37:37 -0400 2010”&lt;/p&gt;
&lt;p&gt;results = JSON.parse(json)&lt;/p&gt;
&lt;p&gt;results[“time”].is_a?(Time) #false!!! its still a string!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This can cause real problems if used in a real system when timestamps are critical to application logic.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Solutions&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. require ‘json/add/core’&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;if you use the json-ruby gem, it comes with a set of object extensions, these extensions serialize Time objects in a different way allowing them to be re-cast back to proper time objects during deserialization.&lt;/p&gt;
&lt;p&gt;The negative to this is that you are producing very ruby-specific JSON, and you need to make sure you explicitly require these extensions whenever you want to serialize/deserialize which can be tricky.&lt;/p&gt;
&lt;p&gt;Here is what a time object would look like using this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;”{"n":364019000,"json_class":"Time","s":1285689344}”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Not pretty.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Make time objects integers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is the easiest and best solution for all involved. Just make them into unix timestamps by calling time.to_i. JSON deserializers in every language know how to parse integers, and unix timestamps are very easy to convert into a time object&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Time.at(unix_timestamp)&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://blog.matthewrathbone.com/post/1205338918</link><guid>http://blog.matthewrathbone.com/post/1205338918</guid><pubDate>Tue, 28 Sep 2010 14:34:00 -0400</pubDate><category>ruby</category><category>programming</category><category>json</category></item></channel></rss>

