<?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>interfacelab &#187; Uncategorized</title>
	<atom:link href="http://interfacelab.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://interfacelab.com</link>
	<description></description>
	<lastBuildDate>Thu, 09 Dec 2010 05:14:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Introducing makejs</title>
		<link>http://interfacelab.com/introducing-makejs/</link>
		<comments>http://interfacelab.com/introducing-makejs/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 19:17:28 +0000</pubDate>
		<dc:creator>Jon Gilkison</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://interfacelab.com/?p=141</guid>
		<description><![CDATA[I have recently been working on the mobile UI for a site I built called Sessions+.  Sessions+ is a poker bankroll tracker that has a companion iPhone application for live tracking during live poker games, and now a mobile UI for Android and other HTML5 capable mobile browsers which replicates the most of the important [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently been working on the mobile UI for a site I built called <a href="http://sessionsplus.com" target="_blank">Sessions+</a>.  <a href="http://sessionsplus.com/" target="_blank">Sessions+</a> is a poker bankroll tracker that has a companion iPhone application for live tracking during live poker games, and now a mobile UI for Android and other HTML5 capable mobile browsers which replicates the most of the important functionality of the iPhone app.</p>
<p>The framework I used to build the app uses a lot of separate javascript and css files, though the entire app is housed in a single html file.  So I end up with a &lt;head&gt; element jam packed with stuff.  While this is perfect for development, it&#8217;s no good for deployment or QA.</p>
<p><span id="more-141"></span></p>
<p>For an example of what the &lt;head&gt; element looks like during development:</p>
<script src="http://gist.github.com/647344.js"></script>
<p>That&#8217;s a lot of stuff.  To optimize for mobile, I&#8217;m going to need to smash these files together and run them through <a href="http://developer.yahoo.com/yui/compressor/" target="_blank">yui-compressor</a> to make it as small as possible (and then serve it up with GZip to make it even smaller).</p>
<p>Now after some googling, I ran into <a href="http://cjohansen.no/en/ruby/juicer_a_css_and_javascript_packaging_tool" target="_blank">Juicer</a>.  Juicer is a great tool, but it still didn&#8217;t do everything I wanted, and specifying the dependencies within the javascript and CSS files was not as explicit as I desire.  It just seemed to prone to error.  Finally, after merging everything with Juicer, I&#8217;d have to manually update the html files by hand to replace all those script and link tags with the new ones.</p>
<p>Next up on the google list was <a href="http://ant.apache.org/" target="_blank">Apache Ant</a>.  I haven&#8217;t used Ant since doing a random Flex project a few years ago, and I was afraid it was simply too complicated to setup for my small little project.  But in my quest to avoid NIH syndrome, I gave it a spin anyhow.</p>
<p>I gave up after an hour or two as it was just too much.  Maybe I&#8217;m getting lazy in my older years, maybe I am suffering insufferable NIH syndrome, I&#8217;m not sure.  Also, I hate XML.</p>
<h3>Tick Tock</h3>
<p>So the clock is ticking down on my self-imposed deadline to get a system setup that &#8220;builds&#8221; my little HTML5 app into a production ready thing.  There were a couple of other options presented to me by google, but again, they either used the dependency thing of Juicer, or were horribly complicated.</p>
<p>So I did what any self-respecting developer would do: fired up TextMate and started hammering.</p>
<h3>Meet makejs</h3>
<p>When I set about building it, I had a few simple goals in mind:</p>
<ul>
<li>YAML based configuration files.  I love me some YAML.  I love being explicit.</li>
<li>Ability to modify HTML files to replace &lt;script&gt; and &lt;link&gt; tags</li>
<li>Generate an HTML5 cache manifest</li>
<li>Run in continuous integration mode where changes to files would trigger a re-build.</li>
</ul>
<p>So five hours later I had a working system.</p>
<h3>Using makejs</h3>
<p>makejs uses a YAML based configuration file to direct the build process.  Here is an example:</p>
<script src="http://gist.github.com/647465.js"></script>
<p>Now that&#8217;s a lot to process, but it&#8217;s pretty simple once you break it down.  The general layout for the build configuration is thus:</p>
<ul>
<li>Build Target
<ul>
<li>Version (Major.Minor.Build)</li>
<li>Pre-Requisite Build Targets</li>
<li>Build
<ul>
<li>Build Phase
<ul>
<li>Settings</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>And that&#8217;s essentially it.  But let&#8217;s look at it in more detail.</p>
<p>In the configuration above, you&#8217;ll notice I have two distinct build targets: &#8220;glamrock&#8221; and &#8220;example&#8221;.  GlamRock is the mobile framework I built, Example is a sample project that uses GlamRock.  For the GlamRock build target, you&#8217;ll see that I have 3 build phases: copy, compress and manifest.</p>
<p>The copy build phase does exactly as it sounds, it copies files to a destination in the build directory.  Nothing more, nothing less.  In this case, I like to keep jQuery and jQuery&#8217;s template stuff separate and not mashed into all of the other files.</p>
<p>The compress build phase takes a list of files, joins them together and then runs them through yui-compressor.  Let&#8217;s take a look at that build phase again:</p>
<script src="http://gist.github.com/647481.js"></script>
<p>If you look at the <strong>files</strong> element, you&#8217;ll see a filename (in this case, <strong>js/glam.rock.min.{VERSION}.js</strong>) with a list of files associated with it.  These files are the ones that are joined together and compressed to generate <strong>js/glam.rock.min.{VERSION}.js</strong>.  So what&#8217;s the deal with the {VERSION} thing?  That tells makejs to replace {VERSION} with the newest build version, which makejs takes care of automatically for you.  For example, if you&#8217;re configuration says version: 0.0.81 &#8211; the next time you build, makejs will auto-increment the build #, re-save the conf file, and then when it generates the compressed files, you&#8217;ll end up with a file name <strong>js/glam.rock.min.0.0.82.js</strong>.</p>
<p>The manifest phase is what builds the HTML5 cache manifest, a definite must for mobile HTML5 apps.  For GlamRock, it won&#8217;t actually build a manifest (see below for why), but it is important to list what files that this build produces which can be included in the cache manifest.</p>
<p>Now, let&#8217;s turn our attention to the example build target.  This build target has a copy, compress, alter and manifest build phase.  But before we dive into those, you&#8217;ll see that this build phase has a pre-requisite for GlamRock.  When this build target is built, GlamRock will be built first and the output of that build will be put into whatever the build directory for example is.  This is nice because we treat each build target as independent projects and get some nice dependency functionality out of it.  Keeps things clean and relatively simple.</p>
<p>Back to the build phases for the example build target.  I won&#8217;t go over copy and compress because there is nothing different happening here then there was in the GlamRock target.  So let&#8217;s look at the alter build phase:</p>
<p>The alter build phase takes any input file and replaces any denoted blocks with the proper &lt;script&gt; and &lt;link&gt; tags that have been generated during the entire build process.  If you look at the &lt;head&gt; example at the top of this post, you&#8217;ll see that there are actually two blocks surrounded by <strong>&lt;!&#8211; BEGIN {target} &#8211;&gt;</strong> and<strong> &lt;!&#8211; END {target} &#8211;&gt; </strong>comments.  During the alter phase, makejs will replace these blocks with the output of the specified build target.  For example, after building, this is what our new &lt;head&gt; looks like:</p>
<script src="http://gist.github.com/647498.js"></script>
<p>Pretty nice, right?  Note, that this never alters the original, it simply transforms the input into the destination in the build output directory.</p>
<p>The example build phase has a manifest phase, like GlamRock, but with one important difference: it has a name setting.  When building a manifest phase, if there is a name specified, than a physical cache manifest is generated.  So running this phase on the example build target yields a cache manifest saved to example.manifest in the output directory.  The example.manifest looks like this:</p>
<script src="http://gist.github.com/647508.js"></script>
<p>Perfect-o.</p>
<h3>Getting It</h3>
<p>Head on over to GitHub and check out the project: <a href="http://github.com/jawngee/makejs" target="_blank">http://github.com/jawngee/makejs</a></p>
<p>Hope someone finds this useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://interfacelab.com/introducing-makejs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Nobody on Hacker News Masturbates</title>
		<link>http://interfacelab.com/nobody-on-hacker-news-masturbates/</link>
		<comments>http://interfacelab.com/nobody-on-hacker-news-masturbates/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 19:50:48 +0000</pubDate>
		<dc:creator>Jon Gilkison</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://interfacelab.com/?p=138</guid>
		<description><![CDATA[Well, actually, I&#8217;m guessing they do.  A lot. The other day, oldmanstan posted an &#8220;Ask HN&#8221; article to Hacker News asking people what they did to relax.  I wrote a very honest reply: Play poker, masturbate, play with my cat. Not at the same time. Now, I was being relatively serious, though slightly tongue in [...]]]></description>
			<content:encoded><![CDATA[<p>Well, actually, I&#8217;m guessing they do.  A lot.</p>
<p>The other day, <a href="http://news.ycombinator.com/user?id=oldmanstan">oldmanstan</a> posted an &#8220;Ask HN&#8221; article to <a href="http://news.ycombinator.com/item?id=1741770">Hacker News</a> asking people what they did to relax.  I wrote a very honest <a href="http://news.ycombinator.com/item?id=1741989">reply</a>:</p>
<blockquote><p><span style="color: #000000;"><em>Play poker, masturbate, play with my cat.</em></span></p></blockquote>
<blockquote><p><em>Not at the same time.</em></p></blockquote>
<p>Now, I was being relatively serious, though slightly tongue in cheek.  I mean, what male under the age of 40 doesn&#8217;t flog the bishop on the regular to unwind?  Most scientists, psychologists, doctors consider it a very healthy habit.  It helps prevent prostate cancer, floods your brain with endorphins and dopamine and is an indicator of healthy self-esteem.  I think the only person in the universe who doesn&#8217;t throttle the speed stick is Christine O&#8217; Donell, but I don&#8217;t even believe that.</p>
<p>But the point of this blog post is not to talk about <strong><em>masturbating</em></strong>, it&#8217;s to talk about how Hacker News has lost any sense of personality.  Any sense of humor.  I&#8217;ve noticed this becoming increasingly true over the last year, and I find it worrisome.  Let&#8217;s look at some of the replies I received:</p>
<p><span id="more-138"></span></p>
<p><a href="http://news.ycombinator.com/user?id=RiderOfGiraffes">RiderOfGiraffes</a> wrote:</p>
<blockquote><p><span style="color: #000000;"><em>I can&#8217;t believe people on HackerNews are upvoting that comment. Does it really add that much to the conversation?</em><em>In the time I&#8217;ve been here on HN I&#8217;ve come to this position. When I reply or submit, I like to consider a hypothetical someone in a year&#8217;s time, mining HN comments for insight and information. I&#8217;d like to think that what I write has some use to the in context, and at the same time accurately reflects who I am now.</em></p>
<p><em>And yes, the reply fits in that mould. In a year&#8217;s time if someone came across that comment, I&#8217;d like them to know that I thought it peurile and unfunny, and I flagged it.</em></p>
<p></span><span style="color: #000000;"><em>Maybe I am just an old fart, but get off my lawn!</em></span></p></blockquote>
<p><span style="color: #000000;">Well, RiderOfGiraffes, I simply don&#8217;t believe you don&#8217;t choke the chicken.  But, that&#8217;s not even important.  What is important is this line in your response:</span></p>
<blockquote><p><span style="color: #000000;"><em>When I reply or submit, I like to consider a hypothetical someone in a year&#8217;s time, mining HN comments for insight and information. I&#8217;d like to think that what I write has some use to the in context, and at the same time accurately reflects who I am now.</em></span></p></blockquote>
<p><span style="color: #000000;">Well good for you, I&#8217;m glad you are so thoughtful.  I, however, simply don&#8217;t give a shit.  Someone asks a question, and I reply with my thoughts at the time that I have them.  I could give two shakes of a tail feather if someone in the future finds my comment insightful or informative.  I am simply responding to a question with an honest answer.  So shame on me for that, I guess.</span></p>
<p><span style="color: #000000;">But, I also have to tell you, I don&#8217;t really believe this is why he is so upset.  The guy responded to the thread three times, which tells me that I&#8217;ve upset his prudish sensibilities instead of insulted his intellectual integrity.  I think he is afraid of <strong><em>masturbating</em></strong>.  Such a shame, because it&#8217;s such a fantastic activity.</span></p>
<p><span style="color: #000000;">Further down the thread chain, he writes something else I find curious:</span></p>
<blockquote><p><span style="color: #000000;"><em>I used to think there was a HackerNews community, I used to think that I was a member of it, and I used to be proud to be such.</em></span><span style="color: #000000;"><em>Seeing this comment get downvoted and its parent upvoted with what I can only view as teenaged boys giggling over some smut, I see that there is no single, coherent community with a shared core of beliefs and standards. And maturity. It&#8217;s a painful lesson.</em></span></p></blockquote>
<p><span style="color: #000000;">And the Oscar goes to &#8230; </span></p>
<p><span style="color: #000000;">Listen, if I remove the word <strong><em>masturbate</em></strong> from my original response, would we be here discussing this?  Of course not.  So a single word, <strong><em>masturbate</em></strong>, now has RiderOfGiraffes ready to write off the HackerNews community and his weird ideals of what that is.  Ideals that may or may not be shared with everyone else.  In his attempts to put me down, and those that voted my original comment up, as a teenage boy laughing over smut (<strong><em>masturbating</em></strong> is smut?) &#8211; he&#8217;s actually gone against the very grain of what he claims he&#8217;s a member of.</span></p>
<p><span style="color: #000000;">The only person who has a legitimate gripe is <a href="http://news.ycombinator.com/user?id=dime">dime</a> who says:</span></p>
<blockquote><p><span style="color: #000000;"><em>Perhaps the real fear is the community degrading the way of Digg or Reddit? Personally, I chuckled at the comment. However the thought of HN being overrun by hordes of interwebz meme spitting, boob picture posting trolls did cross my mind. One thing that holds true for any community&#8230;don&#8217;t feed the trolls.</em></span></p></blockquote>
<p><span style="color: #000000;">Right on the money, buddy.  I, too, fear HackerNews turning into Reddit or Digg, but I also feel we mustn&#8217;t sacrifice a sense of humor in the transaction.  Humor is a very real binding agent for communities, it is a very social (sometimes anti-social) behavior.  Unfortunately, the way HackerNews has been progressing, it&#8217;s become very apparent it&#8217;s not tolerated or appreciated, no matter how small the dose of it.  Which is a shame and it&#8217;s not the way it used to be.</span></p>
<p><span style="color: #000000;">Anyways, I would like to apologize to RidersOfGiraffes for offending him by using the word <strong><em>masturbate</em><span style="font-weight: normal;">, however weird that is to say.  I do belive, in my heart of hearts, if you find </span><em>masturbating</em><span style="font-weight: normal;"> an offensive sport, I would urge you to really consider the reasons why you think that way.  I fundamentally believe that is a harmful belief system to maintain for such a mundane activity.</span></strong></span></p>
]]></content:encoded>
			<wfw:commentRss>http://interfacelab.com/nobody-on-hacker-news-masturbates/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Is This Really The Future of Magazines or Why Didn&#8217;t They Just Use HTML 5?</title>
		<link>http://interfacelab.com/is-this-really-the-future-of-magazines-or-why-didnt-they-just-use-html-5/</link>
		<comments>http://interfacelab.com/is-this-really-the-future-of-magazines-or-why-didnt-they-just-use-html-5/#comments</comments>
		<pubDate>Thu, 27 May 2010 17:55:27 +0000</pubDate>
		<dc:creator>Jon Gilkison</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://interfacelab.com/?p=95</guid>
		<description><![CDATA[I just downloaded the Wired iPad application, and like most iPad applications (and most magazines for that matter), I found myself bored with it within the first 20 minutes. I&#8217;m sure the content is engaging, I&#8217;m sure the articles are worth reading &#8211; but I am stumped as to why I would chose this over [...]]]></description>
			<content:encoded><![CDATA[<p>I just downloaded the Wired iPad application, and like most iPad applications (and most magazines for that matter), I found myself bored with it within the first 20 minutes.  I&#8217;m sure the content is engaging, I&#8217;m sure the articles are worth reading &#8211; but I am stumped as to why I would chose this over the physical magazine itself, or their website for that matter.  In fact, for reasons I&#8217;ll get into below, I&#8217;m starting to believe that the physical magazine&#8217;s &#8220;interface&#8221; is vastly superior to it&#8217;s iPad cousin.</p>
<p>However, what strikes me most about the Wired app is how amazingly similar it is to a multimedia CD-ROM from the 1990&#8242;s.   This is not a compliment and actually turns out to be a fairly large problem&#8230;</p>
<p><span id="more-95"></span></p>
<h3>1990&#8242;s Here We Come &#8230; Again</h3>
<p>The only real differentiation between the Wired application and a multimedia CD-ROM is the delivery mechanism: you download it via the App Store versus buying a CD-ROM at the now defunct Egg Head store at your local strip mall.  And I really mean that comparison.  For all of the interactivity that was touted in the Flash prototype, what we&#8217;ve really ended up with is a glorified slide show.  Instead of the &#8220;Next&#8221; and &#8220;Previous&#8221; buttons you might have been used to on those old CD-ROMs of yore, you instead swipe left and right to change pages (well *cough* images of pages).</p>
<p>There are certain interactive elements to the articles, but &#8211; and I apologize to all of the people who put in a lot of back breaking work into this &#8211; they&#8217;re pretty lame.  Tapping on a button-looking element switches out part of the page with another image.  You can drag your finger across certain images to make them sort of animate like a flipbook (and in truth, that&#8217;s what it is &#8211;  a series of PNG or JPEG images).  There are videos you can tap on to view fullscreen.  There are audio clips that you can play.  The interactivity in the Wired application is very 1990&#8242;s.  I am not trying to be insulting either, it&#8217;s simply the truth.  The Wired application has pretty much brought back image rollovers.</p>
<p>And that&#8217;s about the extent of the interactivity.  Which makes me wonder if that should be the extent of it or should we be wanting more?  I don&#8217;t have an answer to that, though my gut feeling is that there is a massive opportunity to reinvent the concept of a magazine &#8211; yet we end up with something akin to what the web was like in the mid to late 90&#8242;s.  This basically boils down to a print designer&#8217;s vision of what the web should be like &#8211; but in this case it&#8217;s a print magazine person&#8217;s vision of what an interactive magazine should be like.</p>
<p>If you can think back that far, and you were doing web development during that time, you will glumly remember the frustration of web development driven by print design, where pages were essentially huge images cut and sliced and then reconstituted back into insane table structures for pixel perfect layouts.  That&#8217;s what we&#8217;ve essentially gotten with the Wired app: a giant step backwards and a complete dismissal of the lessons we learned from that dark period of interaction design and development.</p>
<h3>Holy Shit, That&#8217;s Big</h3>
<p>With the Wired app weighing in at a whopping 500 megabytes &#8211; just 100 shy of a full CD-ROM &#8211; how do they intend to maintain new editions of the magazine?  500 MB is too large for a 3G download (no help from AT&amp;T&#8217;s less than spectacular network performance) and for those with iPad&#8217;s with the smaller storage, each issue will take a significant chunk of space on the device.  With no apparent means for managing which issues you keep on your device, this will become huge issue for a lot of people.  Obviously they will fix this with updates to the application, but I&#8217;m still wondering what they were thinking to begin with.  I&#8217;m hoping there were voices of dissent that pointed out the end product was not worth it&#8217;s weight in megabytes.  A PDF version would have been a tenth of the size, though without the interactivity.  But is the interactivity worth the 500MB price?  I personally don&#8217;t think so.</p>
<p>Why is the magazine so large?  Being the intrepid hacker that I am (*wink*) I mounted my jail broken iPad via AppleTalk and quickly tore into the app itself to see how it was constructed.  Similar to the PopSci+ magazine application, each Wired issue is actually a bunch of XML files that lay out a bunch of images.  And by &#8220;a bunch of images&#8221; I mean 4,109 images weighing in at 397MB.</p>
<p>Each full page is a giant image &#8211; there are actually two images for each page: one for landscape and one for portrait mode.  Yes, I&#8217;m laughing on the inside too.  There is no text or HTML, just one gigantic image. The &#8220;interactive&#8221; pieces where you can slide your finger to animate it are just a series of JPG files.  When you press play on the audio file and see the progress meter animate?  A series of PNG files.</p>
<p>Something is wrong with this picture.  Something wrong and something very lazy and/or desperate.</p>
<h3>Over Architect Much? (or How Desperation Ruins Good Ideas)</h3>
<p>I have no inside knowledge on how the Wired app was produced, so the following is all conjecture on my part.  That said, my guess is that Adobe sold Conde Nast on doing the thing in Flash.  Or if Adobe didn&#8217;t do the selling, some Flash loving technologist at Conde Nast sold them on it.  Either way, since Flash CS5 was going to be able to target the iPhone/iPad, they&#8217;d be able to publish the thing as it had been shown to the press.  But then Steve Jobs came along and threw section 3.1.3 into the iPhone licensing terms and &#8230; well &#8230; Adobe and Conde Nast were pretty much fucked.  So fast forward to this moment in time and the best short term solution they could come up with was some jury rigged XML based layout framework and an epic shit ton of images.</p>
<p>The Wired app isn&#8217;t alone in this weird architectural choice either.  The PopSci+ magazine is based on a very similar architecture.  There are also other magazines that work along the same lines, or simply go the route of PDFs with a customized PDF viewer application.</p>
<p>The problem with these XML + images architectures is that they are essentially reinventing HTML with no added benefit.  When I showed the Wired app to a colleague of mine, someone I consider to be one of the top HTML/Javascript developers in NYC, his assessment was the same: Why the heck didn&#8217;t they use HTML5?  We stepped through each &#8220;page&#8221; of the Wired application, looked at each interactive piece &#8211; but failed to find anything that ruled out the use of HTML and JavaScript.</p>
<p>The argument might be that it needs to be cross platform &#8211; the very thing Adobe and Conde Nast were banking on by going with Flash &#8211; but guess what?  For all of the tablets about to fall on the heads of consumers in the coming years, each one of them uses WebKit.  If anything was built for this type of application, it most certainly is WebKit.  And even for harder interactivity puzzles &#8211; in terms of how do we do X and Y &#8211; one can easily hook into WebKit  to enable that stuff that might otherwise be more difficult to do in straight  HTML + CSS + JavaScript.  I have yet to see anything in any magazine application on the iPad that would really require this though.</p>
<p>So why didn&#8217;t they choose HTML5 and build a custom viewer application around WebKit?  It comes down to either a sense of desperation, a sense of Adobe overselling a bad idea or simply a dumb technology decision.  Possibly all three.  It certainly isn&#8217;t a development challenge and it certainly isn&#8217;t because WebKit isn&#8217;t capable.  I had a thought that perhaps memory management was an issue, but by going with HTML5/WebKit, you wouldn&#8217;t be showing pages and pages of huge images &#8211; you&#8217;d actually be able to build those pages the right way.  And doing it this way, in my professional opinion, the magazine itself would be slashed dramatically in size, as well as acting and reacting in ways familiar to people who&#8217;ve been browsing the web for the last 15+ years.  Furthermore, the cost savings from a production standpoint would be drastically lower as Wired already maintains a staff of web developers.   There wouldn&#8217;t be an impetus for Adobe to create some &#8220;solution&#8221; at Conde Nast&#8217;s expense and a lot of the great interactivity you saw in the YouTube videos of their prototype could very easily come to life.</p>
<p>But as it stands now, the Wired iPad app is even far behind their own website.  That&#8217;s embarrassing.  Did anyone at Conde Nast look at this and wonder why someone would choose to use this over their very own website?  That iPad &#8211; unless you are in a subway &#8211; is constantly connected to the intertubehighway. That fact alone makes one wonder what the point of the whole thing is. Specifically since they&#8217;ve not done any sort of interactivity or visual presentation that I think anyone can say is amazing.  Sure, it&#8217;s a print designers wet dream &#8211; but it really should be a consumer&#8217;s wet dream.  And it most certainly is not that.</p>
<p>So, from a technical perspective, I think what we are looking at is the result of equal parts desperation and ignorance.  Desperation on the part of Adobe to carry forward their relationship with Conde Nast in this new publishing market and ignorance on the part of their development team for ignoring the best solution to their &#8220;No Flash Allowed&#8221; problem: HTML5.</p>
<h3>Is This The Future For Magazine Publishing?</h3>
<p>I hope not.</p>
<p>I actually think it&#8217;s a huge step backwards and I think the wrong people are working on the problem &#8211; just like the wrong people were working on the web problem back in the day.   Sure, we corrected course and we&#8217;re seeing the web done correctly more and more these days &#8211; but can the magazine publishing industry afford to get this wrong for any amount of time?  Once could argue that the internet is quickly making their industry irrelevant.  By the time an article is published in Time, I&#8217;ve read six or seven different takes on the same story on the web well before it hits the newsstands.  I don&#8217;t think that&#8217;s a unique or new insight.  But now you want me to download 500MB a month just so some print designer can have pixel perfect layouts with custom fonts?</p>
<p>Unfortunately, as long as Conde Nast allows Adobe to dupe them into believing Adobe has a solution, it&#8217;s going to fail.  They need to go outside the box to get this right, and all the technology to do it is sitting right there in front of them.  And they&#8217;ve been using it very well &#8230; until now when they&#8217;ve chosen not to even use it all.</p>
<h3><span style="color: #ff0000;">Update</span></h3>
<p>People have been mentioning that you can&#8217;t do application specific fonts with the WebKit browser.  Not sure why.</p>
<p>Here is a simple iPad app that loads up a custom open type font, and then displays an html file in a UIWebView with that custom font:  <a href="http://github.com/jawngee/iPadFontExample" target="_blank">http://github.com/jawngee/iPadFontExample</a></p>
<p>So it can be done.  Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://interfacelab.com/is-this-really-the-future-of-magazines-or-why-didnt-they-just-use-html-5/feed/</wfw:commentRss>
		<slash:comments>292</slash:comments>
		</item>
		<item>
		<title>Blippy Clone in 2 Seconds and 3 Lines of PHP</title>
		<link>http://interfacelab.com/blippy-clone-in-2-seconds-and-4-lines-of-php/</link>
		<comments>http://interfacelab.com/blippy-clone-in-2-seconds-and-4-lines-of-php/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 23:45:08 +0000</pubDate>
		<dc:creator>Jon Gilkison</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://interfacelab.com/?p=87</guid>
		<description><![CDATA[Since LoC wanking seems to be the rage this week, I decided to take a stab at cloning the hottest new thing to hit the internets since twitter: Blippy! Yes, believe it! You can now twitter your soul crushing acts of consumerism to your uninterested friends so that they too can be involved in the [...]]]></description>
			<content:encoded><![CDATA[<p>Since LoC wanking seems to be the rage this week, I decided to take a stab at cloning the hottest new thing to hit the internets since twitter: <a href="http://blippy.com/">Blippy!</a></p>
<p>Yes, believe it!  You can now twitter your soul crushing acts of consumerism to your uninterested friends so that they too can be involved in the banal minutiae of your life!  The IRS is going to love this one.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?
// what a stupid f'ing idea
?&gt;
</pre>
<p>And there you have it.  All the functionality in way less code.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Finterfacelab.com%2Fblippy-clone-in-2-seconds-and-4-lines-of-php%2F&amp;title=Blippy+Clone+in+2+Seconds+and+3+Lines+of+PHP" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Finterfacelab.com%2Fblippy-clone-in-2-seconds-and-4-lines-of-php%2F&amp;title=Blippy+Clone+in+2+Seconds+and+3+Lines+of+PHP" title="Digg This Story"><img src="http://cdn1.diggstatic.com/img/favicon.a015f25c.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Finterfacelab.com%2Fblippy-clone-in-2-seconds-and-4-lines-of-php%2F&amp;title=Blippy+Clone+in+2+Seconds+and+3+Lines+of+PHP" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Finterfacelab.com%2Fblippy-clone-in-2-seconds-and-4-lines-of-php%2F&amp;title=Blippy+Clone+in+2+Seconds+and+3+Lines+of+PHP" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Finterfacelab.com%2Fblippy-clone-in-2-seconds-and-4-lines-of-php%2F&amp;title=Blippy+Clone+in+2+Seconds+and+3+Lines+of+PHP', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Finterfacelab.com%2Fblippy-clone-in-2-seconds-and-4-lines-of-php%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Finterfacelab.com%2Fblippy-clone-in-2-seconds-and-4-lines-of-php%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Finterfacelab.com%2Fblippy-clone-in-2-seconds-and-4-lines-of-php%2F&amp;title=Blippy+Clone+in+2+Seconds+and+3+Lines+of+PHP" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Finterfacelab.com%2Fblippy-clone-in-2-seconds-and-4-lines-of-php%2F&amp;title=Blippy+Clone+in+2+Seconds+and+3+Lines+of+PHP" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://interfacelab.com/blippy-clone-in-2-seconds-and-4-lines-of-php/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>My Mom is Going to Love the iPad</title>
		<link>http://interfacelab.com/my-mom-is-going-to-love-the-ipad/</link>
		<comments>http://interfacelab.com/my-mom-is-going-to-love-the-ipad/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 08:24:18 +0000</pubDate>
		<dc:creator>Jon Gilkison</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://interfacelab.com/?p=83</guid>
		<description><![CDATA[My mom is totally going to love the shit out of this thing.  Off the top of my head: She can read her books in the dark. She can use it in the kitchen to look up recipes and watch cooking videos. She can use the GPS to help my dad drive their RV around [...]]]></description>
			<content:encoded><![CDATA[<p>My mom is totally going to love the shit out of this thing.  Off the top of my head:</p>
<ul>
<li>She can read her books in the dark.</li>
<li>She can use it in the kitchen to look up recipes and watch cooking videos.</li>
<li>She can use the GPS to help my dad drive their RV around the country.</li>
<li>She can be better connected to her iPhone wielding grandchildren.</li>
<li>She can play Words with Friends on a bigger screen.</li>
<li>She can  browse the web on a readable screen.  While in the RV.</li>
<li>Watch all of her NFL games while sitting on the porch.</li>
</ul>
<p>And that&#8217;s just to start.  Later down the road, maybe after revision 2, she&#8217;ll also be able to:</p>
<ul>
<li>Draw her knitting patterns and sync it with her knitting machine via Bonjour over WiFi.</li>
<li>Have video chats with the kids.</li>
<li>Augmented reality tour guides for the new places they travel to.</li>
<li>Telemedical (god forbid) monitoring to save trips to the doctor.</li>
<li>Control surface for manipulating certain controls of the RV.</li>
</ul>
<p>The best part?  I won&#8217;t have to show her how to do those things, not most of them anyway.  So to do 80% of what she uses her laptop for, she can do all of those things without having to lug the thing out, plug it in, hook up the mouse, etc.  She&#8217;ll be able to take the information she is looking for to the place where she needs it to be: the kitchen, the sewing room, the co-pilot&#8217;s seat.</p>
<p>So thinking about my mother using it, and loving it, I started to think how I would use it.  My list is almost equally as long.</p>
<ul>
<li>Control Boxee.</li>
<li>Use it as a control surface for Final Cut or Ableton Live or Traktor via Bluetooth or WiFi.</li>
<li>Home automation.</li>
<li>The ultimate universal remote (extra hardware required)</li>
<li>Pornography</li>
<li>Better in-flight DVD viewing experience</li>
</ul>
<p>There are so many more integration points the iPad can make with day to day living and day to day information needs.  The key aspect of it all is mobility and portability, having the information you need not only when you need it, but <strong>where </strong>you need it.</p>
<p>I understand the let down from the perspective of people who were wishing for a multi-touch Mac Book.  But I think they are thinking about it wrong.  People are thinking about it as if it&#8217;s a computer, but it isn&#8217;t just a computer, it&#8217;s a whole new category of device, a whole new definition of what a computer is.</p>
<p>I also agree with most that the lock down to the App Store is a let down, though you don&#8217;t have to think too hard about it to understand it&#8217;s a necessary evil.  It reduces any potential confusion on how to make the thing do something new.  My Mom and I were playing Words with Friends without me having to walk her through how to install it and get it running.  Now compare that with what it was like to show her how to do something similar on her Windows laptop &#8230; yeah no thanks, I&#8217;ll take the App Store.  Not to mention not having to run that crappy antivirus and anti-spyware junk &#8211; the stuff that sucks the performance out of her laptop and yields endless complaints about how slow everything is.  Perhaps it&#8217;s a false sense of security, but I can live with that.</p>
<p>Some of the complaints about usability and related things are complete nonsense and even defy logic.  I&#8217;m pretty sure Apple did some usability testing on this thing &#8230; but maybe that&#8217;s just wild speculation on my part.</p>
<p>I think Apple is definitely onto something, maybe it&#8217;s not quite there yet, but they&#8217;ve definitely accomplished more than bringing an oversized iPhone to market.  But only time will tell.</p>
<p>And, yes, she does kick my ass in Words with Friends.  She hit me with two 70+ pointers yesterday.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Finterfacelab.com%2Fmy-mom-is-going-to-love-the-ipad%2F&amp;title=My+Mom+is+Going+to+Love+the+iPad" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Finterfacelab.com%2Fmy-mom-is-going-to-love-the-ipad%2F&amp;title=My+Mom+is+Going+to+Love+the+iPad" title="Digg This Story"><img src="http://cdn1.diggstatic.com/img/favicon.a015f25c.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Finterfacelab.com%2Fmy-mom-is-going-to-love-the-ipad%2F&amp;title=My+Mom+is+Going+to+Love+the+iPad" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Finterfacelab.com%2Fmy-mom-is-going-to-love-the-ipad%2F&amp;title=My+Mom+is+Going+to+Love+the+iPad" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Finterfacelab.com%2Fmy-mom-is-going-to-love-the-ipad%2F&amp;title=My+Mom+is+Going+to+Love+the+iPad', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Finterfacelab.com%2Fmy-mom-is-going-to-love-the-ipad%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Finterfacelab.com%2Fmy-mom-is-going-to-love-the-ipad%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Finterfacelab.com%2Fmy-mom-is-going-to-love-the-ipad%2F&amp;title=My+Mom+is+Going+to+Love+the+iPad" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Finterfacelab.com%2Fmy-mom-is-going-to-love-the-ipad%2F&amp;title=My+Mom+is+Going+to+Love+the+iPad" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://interfacelab.com/my-mom-is-going-to-love-the-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slicehost API Notes for the Non-Rails Posse</title>
		<link>http://interfacelab.com/slicehost-api-notes-for-the-non-rails-posse/</link>
		<comments>http://interfacelab.com/slicehost-api-notes-for-the-non-rails-posse/#comments</comments>
		<pubDate>Sat, 09 May 2009 06:38:23 +0000</pubDate>
		<dc:creator>Jon Gilkison</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://interfacelab.com/?p=66</guid>
		<description><![CDATA[I just want to start out by stating that I, in fact, am a big fan of Slicehost and constantly recommend them to friends setting up anything more serious than blogs. They have a truly great offering and their customer service has only been rivaled, in my experience, by the support team from DataPipe &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>I just want to start out by stating that I, in fact, am a big fan of <a href="http://slicehost.com" target="_blank">Slicehost</a> and constantly recommend them to friends setting up anything more serious than blogs.  They have a truly great offering and their customer service has only been rivaled, in my experience, by the support team from <a href="http://datapipe.net">DataPipe</a> &#8211; whom I whole heartedly recommend for any colo or managed hosting.</p>
<p>One thing that is truly great about Slicehost is that they offer an awesome API that allows you to do most everything you can do in their management console, but instead through web services.  You can create new slices, reboot them, change and add DNS, as well as rebuild or destroy slices.</p>
<p>The only problem is that the API follows a “standard ActiveResource pattern” that comes straight from the bowels of Rails and is way too convoluted for something this simple.  </p>
<p><span id="more-66"></span></p>
<p>My biggest complaint is that instead of POSTing standard post variables, you POST XML, but none of the data being posted approaches any kind of structural complexity that warrants it’s usage.  It just a layer of crap that doesn’t need to be there.  Every modern language has some sort of HTTP request mechanism that handles all this stuff without some arbitrary object model forced on top of it.</p>
<p>Curiously, there appears to be another way where you can POST regular form data, but the variable names are in the form “resource[field]” which, again, seems completely unnecessary.  I also couldn’t get it to work reliably.</p>
<p>As a point of reference, I was able to implement S3, EC2 and SQS API’s from amazon in just under 6 hours.  It took me two days to figure out the Slicehost API.  The ActiveResource pattern is a failure in my estimation.</p>
<p>The following are my notes on implementing the slicehost API.  Hope you find it useful.</p>
<p>NOTE:  This post doesn’t cover their DNS API as I don’t have a particular need for it.  I will be posting the PHP library I wrote for the Slicehost API to github over the weekend.  Perhaps someone can build on top of that&#8230;</p>
<h3>Authentication</h3>
<p>I actually had a bit of a bitch with this.  The docs and ruby samples specify that you put your API key in the url, like this:</p>
<p><a href="https://APIKEY@api.slicehost.com">https://APIKEY@api.slicehost.com</a></p>
<p>Problem is that I just could not get it to work.  Even the ruby samples in their docs didn’t run without authentication errors.  Copying and pasting the URLs into Safari didn’t work either (simply pasting your API key into the user input when the Basic Authentication popup shows does work though).</p>
<p>So, make sure you always set the USER part of Basic Auth with your API key.  In PHP it looks like this (using PEAR’s HTTP_Request object):</p>
<pre class="precode">$request-&gt;basic_auth(YOUR_API_KEY,’’);</pre>
<p>&nbsp;</p>
<h2>Dealing With Slices</h2>
<p>This is the part that drove me nuts.  I ended up having to debug their ruby examples through Charles, after patching activeresource.rb to support proxies.  And even then, their examples didn’t work due to a typo and another error I couldn’t sort out.</p>
<h3>Listing Slices</h3>
<p>This is easy as pie.  Simply make a GET request to:</p>
<p><a href="https://api.slicehost.com/slices">https://api.slicehost.com/slices.xml</a></p>
<p>You will get back an XML document as a response:</p>
<pre class="precode">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;slices type="array"&gt;
	&lt;slice&gt;
		&lt;name&gt;slicename&lt;/name&gt;
		&lt;status&gt;active&lt;/status&gt;
		&lt;addresses type="array"&gt;
			&lt;address&gt;XXX.XXX.XXX.XXX&lt;/address&gt;
			&lt;address&gt;XXX.XXX.XXX.XXX&lt;/address&gt;
		&lt;/addresses&gt;
		&lt;id type="integer"&gt;666&lt;/id&gt;
		&lt;progress type="integer"&gt;100&lt;/progress&gt;
		&lt;bw-out type="float"&gt;0.0&lt;/bw-out&gt;
		&lt;bw-in type="float"&gt;0.0&lt;/bw-in&gt;
		&lt;image-id type="integer"&gt;10&lt;/image-id&gt;
		&lt;ip-address&gt;XXX.XXX.XXX.XXX&lt;/ip-address&gt;
		&lt;flavor-id type="integer"&gt;2&lt;/flavor-id&gt;
	&lt;/slice&gt;
&lt;/slices&gt;
</pre>
<p>The one issue I have with this is that the &lt;address&gt; element doesn’t specify if the address is internal or external.  Right now, you can only make the assumption that the first address is external and the second one is internal.  Not a big deal though.</p>
<p>Also, note the .xml extension.  I believe this is arbitrary, but it would be dope if you could specify .json or .yaml or some other format.  Again, not a big deal.</p>
<h3>Getting Slice Info</h3>
<p>This is equally as simple:</p>
<p><a href="https://api.slicehost.com/slices/666.xml">https://api.slicehost.com/slices/666.xml</a></p>
<p>Where 666 is the ID of the slice you want to get info about.  You get another XML document in return containing a &lt;slice&gt; element as above.</p>
<h3>Creating a Slice From an Image</h3>
<p>This is relatively simple, but there are a couple of steps to it.</p>
<p>First you need a list of the images that Slicehost offers.  Easy enough.  GET request to :</p>
<p><a href="https://api.slicehost.com/images">https://api.slicehost.com/images</a></p>
<p>Will return an XML document that looks like this:</p>
<pre class="precode">
&lt;images type="array"&gt;
	&lt;image&gt;
		&lt;name&gt;CentOS 5.2&lt;/name&gt;
		&lt;id type="integer"&gt;2&lt;/id&gt;
	&lt;/image&gt;
	&lt;image&gt;
		&lt;name&gt;Gentoo 2008.0&lt;/name&gt;
		&lt;id type="integer"&gt;3&lt;/id&gt;
	&lt;/image&gt;
	&lt;image&gt;
		&lt;name&gt;Debian 5.0 (lenny)&lt;/name&gt;
		&lt;id type="integer"&gt;4&lt;/id&gt;
	&lt;/image&gt;
	{ .. and so on .. }
&lt;/images&gt;
</pre>
<p>Once you have this list, you’ll have need to figure out what flavors of slices you can create.  Do this by sending another GET request to:</p>
<p><a href="https://api.slicehost.com/flavors">https://api.slicehost.com/flavors</a></p>
<p>Again, you’ll get another list that looks like this:</p>
<pre class="precode">
&lt;flavors type="array"&gt;
	&lt;flavor&gt;
		&lt;id type="integer"&gt;1&lt;/id&gt;
		&lt;name&gt;256 slice&lt;/name&gt;
		&lt;price type="integer"&gt;2000&lt;/price&gt;
		&lt;ram type="integer"&gt;256&lt;/ram&gt;
	&lt;/flavor&gt;
	&lt;flavor&gt;
		&lt;id type="integer"&gt;2&lt;/id&gt;
		&lt;name&gt;512 slice&lt;/name&gt;
		&lt;price type="integer"&gt;3800&lt;/price&gt;
		&lt;ram type="integer"&gt;512&lt;/ram&gt;
	&lt;/flavor&gt;
	&lt;flavor&gt;
		&lt;id type="integer"&gt;3&lt;/id&gt;
		&lt;name&gt;1GB slice&lt;/name&gt;
		&lt;price type="integer"&gt;7000&lt;/price&gt;
		&lt;ram type="integer"&gt;1024&lt;/ram&gt;
	&lt;/flavor&gt;
	{ ... and so on ... }
&lt;/flavors&gt;
</pre>
<p>So now we know the ID for the image and the ID for flavor of slice.  Let’s keep going!</p>
<p>This next bit took me awhile to get going.  When I tried to go through the method of posting good old post data, I would get back really obscure errors.  So debugging the HTTP traffic of the ruby examples, I unearthed the secret sauce.</p>
<p>To create the slice with the image of your choosing, POST an XML document to:</p>
<p><a href="https://api.slicehost.com/slices/">https://api.slicehost.com/slices/</a></p>
<p>But, make absolutely sure that you have set the “Content-Type” of your request to “text/xml” otherwise it no worky.  Your XML document will look like:</p>
<pre class="precode">
&lt;slice&gt;
	&lt;name&gt;NAME OF YOUR SLICE&lt;/name&gt;
	&lt;flavor-id type="integer"&gt;1&lt;/flavor-id&gt;
	&lt;image-id type="integer"&gt;2&lt;/image-id&gt;
&lt;/slice&gt;
</pre>
<p>The &lt;image-id&gt; must be a valid ID from the list above, of course.    Their API docs have a typo where the sample code to create a slice uses an ID of 1, which doesn’t exist.  A little hair pulling on that one, even though the bug was so obvious.  The same thing goes for the &lt;flavor-id&gt;.</p>
<p>The response you receive will be information about you slice, including the root password.  You only get this root password once, so make sure you take note of it.  The response looks like:</p>
<pre class="precode">
&lt;slice&gt;
	&lt;status&gt;build&lt;/status&gt;
	&lt;name&gt;SLICE NAME&lt;/name&gt;
	&lt;addresses type="array"&gt;
		&lt;address&gt;XXX.XXX.XXX.XXX&lt;/address&gt;
		&lt;address&gt;XXX.XXX.XXX.XXX&lt;/address&gt;
	&lt;/addresses&gt;
	&lt;id type="integer"&gt;666&lt;/id&gt;
	&lt;root-password&gt;ROOT PASSWORD&lt;/root-password&gt;
	&lt;progress type="integer"&gt;0&lt;/progress&gt;
	&lt;bw-out type="float"&gt;0.0&lt;/bw-out&gt;
	&lt;bw-in type="float"&gt;0.0&lt;/bw-in&gt;
	&lt;image-id type="integer"&gt;2&lt;/image-id&gt;
	&lt;ip-address&gt;XXX.XXX.XXX.XXX&lt;/ip-address&gt;
	&lt;flavor-id type="integer"&gt;1&lt;/flavor-id&gt;
&lt;/slice&gt;
</pre>
<p>And that’s it, you’ve created your slice!</p>
<h3>Creating a Slice From a Backup</h3>
<p>This is nearly the same as creating from an image, but this time we’ll need a list of available backups.  Backups are things you create through the Slicehost management interface.  What I like to do is build a base system and then take a snapshot.  With that snapshot I can create new slices based on it.</p>
<p>To grab a list of backups, send a GET request to:</p>
<p><a href="https://api.slicehost.com/backups">https://api.slicehost.com/backups</a></p>
<p>You will receive a list (if you have any backups):</p>
<pre class="precode">
&lt;backups type="array"&gt;
	&lt;backup&gt;
		&lt;id&gt;3-666&lt;/id&gt;
		&lt;slice_id&gt;666&lt;/slice_id&gt;
		&lt;name&gt;daily&lt;/name&gt;
		&lt;date&gt;Sat May 09 04:15:05 UTC 2009&lt;/date&gt;
	&lt;/backup&gt;
	&lt;backup&gt;
		&lt;id&gt;3-667&lt;/id&gt;
		&lt;slice_id&gt;666&lt;/slice_id&gt;
		&lt;name&gt;webserver_snapshot&lt;/name&gt;
		&lt;date&gt;Sat May 09 04:15:05 UTC 2009&lt;/date&gt;
	&lt;/backup&gt;
&lt;/backups&gt;
</pre>
<p>And, then, in the XML document you POST:</p>
<pre class="precode">
&lt;slice&gt;
	&lt;name&gt;NAME OF YOUR SLICE&lt;/name&gt;
	&lt;flavor-id type="integer"&gt;1&lt;/flavor-id&gt;
	&lt;backup-id type="integer"&gt;3-666&lt;/backup-id&gt;
&lt;/slice&gt;
</pre>
<p>Everything else is the same as creating a slice from an image.</p>
<h3>Updating a Slice</h3>
<p>The only thing you can update with your slice is it’s name.  This is accomplished by PUTing an XML document to:</p>
<p><a href="https://api.slicehost.com/slices">https://api.slicehost.com/slices</a></p>
<p>The XML doc looks like:</p>
<pre class="precode">
&lt;slice&gt;
	&lt;id type="integer"&gt;666&lt;/id&gt;
	&lt;name&gt;NAME OF YOUR SLICE&lt;/name&gt;
&lt;/slice&gt;
</pre>
<p>All you need is the ID of the slice and it’s new name.  The response will be an XML document with a &lt;slice&gt; node.</p>
<h3>Deleting a Slice</h3>
<p>Delete a slice by sending an XML document using the DELETE HTTP verb:</p>
<pre class="precode">
&lt;slice&gt;
	&lt;id type="integer"&gt;666&lt;/id&gt;
&lt;/slice&gt;
</pre>
<p>NOTE: You will have to have this option enabled in the API settings on your account.  You can edit those settings at:  <a href="https://manage.slicehost.com/api/">https://manage.slicehost.com/api/</a></p>
<h3>Rebooting Your Slices</h3>
<p>To reboot your slice with a hard reset, send a PUT request to:</p>
<p><a href="https://api.slicehost.com/slices/666/hard_reboot.xml">https://api.slicehost.com/slices/YOUR SLICE ID/hard_reboot.xml</a></p>
<p>To do a soft reboot, a PUT request to:</p>
<p><a href="https://api.slicehost.com/slices/666/reboot.xml">https://api.slicehost.com/slices/YOUR SLICE ID/reboot.xml</a></p>
<h3>Rebuilding Your Slices</h3>
<p>To rebuild your slice, you’ll need to use an image ID or a backup ID.  Once you’ve picked one, send a PUT request to:</p>
<p><a href="https://api.slicehost.com/slices/666/rebuild.xml?image_id=X">https://api.slicehost.com/slices/YOUR SLICE ID/rebuild.xml?image_id=X</a></p>
<p>or:</p>
<p><a href="https://api.slicehost.com/slices/666/rebuild.xml?backup_id=X">https://api.slicehost.com/slices/YOUR SLICE ID/rebuild.xml?backup_id=X</a></p>
<h2>Conclusion</h2>
<p>So that’s all I know.  As you can see the API is pretty simple, but not as simple as it could be, nor are the documents even remotely near as useful as they should be.  But, it’s awesome they have this API in the first place so I’ll stop bitching now!</p>
<p>Again, thanks to Slicehost for making awesome.  The world sure does need it.</p>
]]></content:encoded>
			<wfw:commentRss>http://interfacelab.com/slicehost-api-notes-for-the-non-rails-posse/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Wordle</title>
		<link>http://interfacelab.com/wordle/</link>
		<comments>http://interfacelab.com/wordle/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 17:31:19 +0000</pubDate>
		<dc:creator>Jon Gilkison</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://interfacelab.com/?p=26</guid>
		<description><![CDATA[Found this awesome toy today.]]></description>
			<content:encoded><![CDATA[<p>Found this awesome toy today.</p>
<p><a title="Wordle: Awesome" href="http://wordle.net/gallery/wrdl/13019/Awesome"><img style="padding:4px;border:1px solid #ddd" src="http://wordle.net/thumb/wrdl/13019/Awesome" alt="" /></a></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Finterfacelab.com%2Fwordle%2F&amp;title=Wordle" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Finterfacelab.com%2Fwordle%2F&amp;title=Wordle" title="Digg This Story"><img src="http://cdn1.diggstatic.com/img/favicon.a015f25c.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Finterfacelab.com%2Fwordle%2F&amp;title=Wordle" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Finterfacelab.com%2Fwordle%2F&amp;title=Wordle" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Finterfacelab.com%2Fwordle%2F&amp;title=Wordle', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Finterfacelab.com%2Fwordle%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Finterfacelab.com%2Fwordle%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Finterfacelab.com%2Fwordle%2F&amp;title=Wordle" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Finterfacelab.com%2Fwordle%2F&amp;title=Wordle" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://interfacelab.com/wordle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Variables in CSS via PHP</title>
		<link>http://interfacelab.com/variables-in-css-via-php/</link>
		<comments>http://interfacelab.com/variables-in-css-via-php/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 03:19:10 +0000</pubDate>
		<dc:creator>Jon Gilkison</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://interfacelab.com/?p=22</guid>
		<description><![CDATA[UPDATED: Added support for expressions with variables so that you can add, multiply, divide, etc. variables when using them in the CSS. See below for more info. Back in April of 2008, I came across a proposal by Daniel Glazman and David Hyatt for using variables in CSS stylesheets.  I thought the proposal was absolutely [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATED:</strong> Added support for expressions with variables so that you can add, multiply, divide, etc. variables when using them in the CSS.  See below for more info.</p>
<p>Back in April of 2008, I came across a <a href="http://disruptive-innovations.com/zoo/cssvariables/">proposal</a> by Daniel Glazman and David Hyatt for using variables in CSS stylesheets.  I thought the proposal was absolutely brilliant, filling a much needed void for sites using complicated stylesheets across a variety of different pages.  Another part of their proposal was being able to include/import other stylesheets.  I don&#8217;t know anyone that couldn&#8217;t find this useful.</p>
<p>I put together a quick class for implementing most of their proposal using PHP.  Nothing fancy going on here, most of it is some simple regexes.</p>
<p><a href="http://interfacelab.com/code/css_compiler.zip">Download the code here</a>.</p>
<p><span id="more-22"></span></p>
<p><strong>Using the CSS Compiler</strong></p>
<p>Let&#8217;s first talk about how to setup your CSS stylesheets to use variables and imports.</p>
<p><strong>Important:</strong> Any stylesheet that uses variables or includes stylesheets that use variables <strong>must</strong> end with the extension &#8216;<strong>.cssp</strong>&#8216;.</p>
<p>To declare variables, you place them within an @variables at-rule like so:</p>
<pre class="brush: css; title: ; notranslate">

@variables
{
    titleFont:bold 18px &quot;Verdana, Arial&quot;;
    titleBG: #FF0000;
}
</pre>
<p>To use the variables:</p>
<pre class="brush: css; title: ; notranslate">

div.title { font: var(titleFont); background: var(titleBG); }
</pre>
<p>Couldn&#8217;t get much simpler.</p>
<p><strong>Importing CSS and Variables</strong></p>
<p>You can also import/include css and variables from an external stylesheet using @import:</p>
<pre class="brush: css; title: ; notranslate">

@import &quot;vars.cssp&quot;;

div.title { font: var(defaultFont); };
</pre>
<p>Alternately:</p>
<pre class="brush: css; title: ; notranslate">

@import url(&quot;vars.cssp&quot;);

div.title { font: var(defaultFont); };
</pre>
<p><strong>Evaluating Expressions</strong></p>
<p>You can also perform math operations with measurement units.  For instance, you could do something like:</p>
<pre class="brush: css; title: ; notranslate">
@variables {
    lc_width: 240px;
    rc_width: 180px;
    all_padding: 20px;
}

#some_div {
    width: eval((lc_width+rc_width)-(all_padding*2));
    padding: eval(all_padding/2);
}
</pre>
<p>You can only do this with px/em/% measurement units and the units must match.  For instance you can&#8217;t add a variable that is 2em with another that is 120px.  Doing so will throw an exception.  Also, if you use a variable reference that doesn&#8217;t exist, it will also throw an Exception.</p>
<p><strong>Using in HTML Pages</strong></p>
<p>To use these stylesheets, you&#8217;re going to have to write a little PHP, but not too much:</p>
<pre class="brush: php; title: ; notranslate">

&lt;?
    // include the compiler
    include 'css_compiler.php';

    // set the compile environment variable
    // otherwise it will spit out a static file
    // in a production environment comment this out:
    define('COMPILE_CSS',true);
?&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;? style(dirname(__FILE__),'testing'); ?&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div class=&quot;nice&quot;&gt;Hello World&lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>At the top of this file, we&#8217;re including the css compiler and then defining a global variable <strong>COMPILE_CSS</strong>.  <strong>COMPILE_CSS</strong> tells the compiler to do the compilation and save the resulting .css files.  You will not want to do this in a production environment, so comment out the define when deploying to the masses.</p>
<p>In the head tags, the style() function is a helper function that compiles the css.  The first argument is the full path to where the css is.  The second argument is the css file to use without it&#8217;s extension.  Note: if your css files have a relative path of /css/whatever.css on your webserver, the relative path should be part of the second argument and not the first.</p>
<p>For example, let&#8217;s say our PHP application is located at /var/www/.  Our css files are located at /var/www/css/.  Our style function is going to look like:</p>
<pre class="brush: php; title: ; notranslate">

style('/var/www/','/css/testing');
</pre>
<p>Our actual usage of this code at <a href="http://massify.com/">massify</a> is way different.  I&#8217;ve added the style() function so that people reading this blog can use it, but you should definitely do your own legwork to blend it into whatever framework you are using.  This should be enough to get started however.</p>
<p>Also, make sure that your css directory is writable by your webserver or the whole thing won&#8217;t work at all.</p>
<p>Leave a comment or <a href="mailto:jon.gilkison@gmail.com">drop me a line</a> if you find this useful/find bugs/have suggestions.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://interfacelab.com/variables-in-css-via-php/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Metadata/Attributes in PHP</title>
		<link>http://interfacelab.com/metadataattributes-in-php/</link>
		<comments>http://interfacelab.com/metadataattributes-in-php/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 07:56:09 +0000</pubDate>
		<dc:creator>Jon Gilkison</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://interfacelab.com/metadataattributes-in-php/</guid>
		<description><![CDATA[There&#8217;s a ton of stuff I miss from C#, having moved to PHP. Did I say a ton? I meant a megaton. One of the things I miss the most (besides the sanity) are attributes (annotations for Java peeps). To be able to ascribe metadata to class, method and property definitions opens up a whole [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a ton of stuff I miss from C#, having moved to PHP. Did I say a ton? I meant a megaton.</p>
<p>One of the things I miss the most (besides the sanity) are attributes (<a href="http://en.wikipedia.org/wiki/Java_annotations" target="_blank">annotations</a> for Java peeps). To be able to ascribe metadata to class, method and property definitions opens up a whole new world of introspection which enables you to do some pretty wicked hacks.</p>
<p>In this post, I present a PHP class that allows you to do metadata/attribute programming with PHP.  You can download the class <a href="http://interfacelab.com/code/attribute.zip">here</a>.  But before we dig in, we must understand what attributes are and how they are useful&#8230;</p>
<p><span id="more-21"></span></p>
<p><strong>Introduction to Attributes</strong></p>
<p>For those that don&#8217;t know about attribute based programming, let me quote an excerpt from <a href="http://www.ondotnet.com/pub/a/dotnet/excerpt/prog_csharp_ch18/index.html" target="_blank">OnDotnet</a>:</p>
<blockquote><p>Attributes are a mechanism for adding metadata, such as compiler instructions and other data about your data, methods, and classes, to the program itself. Attributes are inserted into the metadata and are visible through ILDasm and other metadata-reading tools.</p>
<p>Reflection is the process by which a program can read its own metadata. A program is said to reflect on itself, extracting metadata from its assembly and using that metadata either to inform the user or to modify its own behavior.</p></blockquote>
<p>One of the last things I wrote in C# before switching over was a simplistic REST-esque framework for web services for C#. I used attributes on classes to mark which ones were exposed to the outside world and then used attributes on the methods to specify such things as the URI, description, etc. This allowed the services to be discoverable versus declared and to be self documenting. For example:</p>
<p>namespace SimpleWebService {<br />
    [RestService(baseURI='/simple/',Name='Simple', Description='Simple service', Persistent=false)]<br />
    class Service<br />
    {<br />
        [RestMethod(URI='something',Name='Do Something',Description='Does something.')]<br />
        public void DoSomething()<br />
        {<br />
            // &#8230;<br />
        }<br />
    }<br />
}</p>
<p>In the above example, the attributes are declared in the brackets.  On our <strong>Service</strong> class, we give the service a name, define it&#8217;s base URI, give it a description and declare if the service is persistant between requests (meaning that the class is only instantiated once, or is instantiated every time).  On the <strong>DoSomething</strong> method it&#8217;s a similar deal: we declare the URI endpoint for the method, the name of the method and it&#8217;s description.</p>
<p>By going to <strong><em>http://example.com/simple/something</em></strong> would eventually invoke the <strong>DoSomething</strong> method on our <strong>Service</strong> class.  The beautiful thing here is that my classes needn&#8217;t implement any interfaces or descend from any parent classes to be exposed as a web service.  I could drop the attributes on the class, recompile and they would then be instantly available.  When the application loaded, it scanned all of the classes in the loaded assemblies, did some reflection on them and created a cache of exposed services.  An <a href="http://www.developerfusion.co.uk/show/4643/" target="_blank">HTTPHandler</a> would dispatch the incoming requests to the corresponding service, map any POST/GET or URI fragments to the parameters of the method being called and then returned the results of the method call as serialized XML.</p>
<p>Nice and easy.</p>
<p><strong>Attributes and PHP</strong></p>
<p>PHP has no built-in mechanism for declaring attributes, but it does have a primitive retrospection capability.  For any class or function in PHP, there are a set of functions that you can call that will provide information about the class.  For instance, with methods, you can get it&#8217;s parameters and any associated block of comments:</p>
<pre class="brush: php; title: ; notranslate">
class DumbClass
{
    /**
     * Comment block
     */
    public function thing($parameter,$another)
    {
        return false;
    }
}

$method=new ReflectionMethod('DumbClass','thing');
echo $method-&gt;getDocComment();
</pre>
<p>In the above example, we create an instance of the ReflectionMethod class and echo the comment block.  If we run this script, the output would look like:</p>
<pre class="brush: php; title: ; notranslate">
    /**
     * Comment block
     */
</pre>
<p>Now if we put 2 and 2 together, you&#8217;ll see that we could use the comment block to insert our class metadata.  Now all we need &#8230;</p>
<p><strong>Introducting AttributeReader</strong></p>
<p>The AttributeReader class is a simple class that extracts <a href="http://devzone.zend.com/article/2585-Using-YAML-With-PHP-and-PECL">YAML</a> from the comment block on a class, it&#8217;s methods or properties.  You can download the class <a href="http://interfacelab.com/code/attribute.zip">here</a>.  Note:  You must have the pecl syck package installed, details are <a href="http://pecl.php.net/package/syck">here</a>.</p>
<p>Since we have access to the comment block, it&#8217;s the most obvious place to express our metadata.  Obviously, the 100% correct solution would be to patch PHP to support attributes out of the box, but that&#8217;s a much bigger effort that would require some serious coding.  The performance of this method is fast enough for most use cases.</p>
<p>So how do we use this?  At <a href="http://massify.com">massify</a>, we use metadata for our ORM layer.  All of our models have metadata attached to them that define what database table to use, the column name, etc.  Here&#8217;s an example:</p>
<pre class="brush: php; title: ; notranslate">
/**
 * Sample model
 *
 * [[
 * table: sample.item
 * database: default
 * read_only: false
 * ]]
 *
 */
class Item extends Model
{
    //@ fields

    /**
     * [[
     * label: Title
     * type: string
     * length: 32
     * description: Title of the item
     * validate:
     *   required: true
     *   length: 8-32
     *   unique: true
     * ]]
     */
    public $title;

    /**
     * [[
     * label: URI
     * type: string
     * length: 32
     * description: URI of the item
     * validate:
     *   required: true
     *   length: 4-32
     *   unique: true
     *   format: alpha_numeric
     * ]]
     */
    public $uri;

    /**
     * [[
     * label: Description
     * type: text
     * description: Description of the item
     * ]]
     */
    public $description;

    //@ end fields
}
</pre>
<p>In the above example, our metadata is nestled between double brackets [[]].  Inside the double brackets is YAML expressing the metadata.  The cool thing here is that we can nest attributes of the metadata.  Let&#8217;s look at what we&#8217;ve done:</p>
<p>On the declaration for the Item class, we&#8217;ve described metadata that tells us which database table this model represents, which database it resides in and if it&#8217;s read_only (a view, in database parlance).  On the properties of the model, the metadata describes the label to use for forms, what the database type is (simplified), the length (for string types), a description and a list of validators.  For instance, on the $uri property, we&#8217;ve declared validators that make sure the property has a value before saving (required), is of a specified length (4-32 characters), is unique in the database (unique) and matches a specific format (alpha_numeric).</p>
<p>Since the class extends from Model, the model knows to use the metadata to build the correct SQL statements for insert, updates, etc.  It also knows how to validate itself when saved to the database, returning the correct errors to the user if any of the validations fail.  Finally, we are able to automatically build forms to edit the models by using the metadata as a guide when constructing the form in code.</p>
<p>All of this is completely possible to do without using metadata, but would require a lot of redundant code with a predetermined set of use cases.  Metadata frees us from this because we can write use cases that work with a known quantity, rather than the other way around.</p>
<p><strong>Using the AttributeReader</strong></p>
<p>Using the class is straight forward.  Here&#8217;s an example.  Let&#8217;s assume we have the Item model from the previous example loaded and want to extract metadata for it and it&#8217;s URI property:</p>
<pre class="brush: php; title: ; notranslate">
$item=new Item();

$class=AttributeReader::ClassAttributes($item);

echo $class-&gt;database;
echo $class-&gt;table;

$method=AttributeReader::PropertyAttributes($item,'uri');

echo $method-&gt;label;
if ($method-&gt;validate-&gt;required)
    echo &quot;Required field&quot;;
else
    echo &quot;Not required.&quot;;
</pre>
<p>It&#8217;s that simple.</p>
<p><strong>Caveats</strong></p>
<p>Make sure you are familiar with the rules of YAML.</p>
<p>Performance is acceptable, but always make sure you measure performance for yourself.  We use a caching strategy via APC at <a href="http://massify.com">massify</a> for caching model metadata.  This requires that you restart apache if your models change (you can disable APC on your development/staging to get around this).  With the APC caching strategy, it&#8217;s super fast.  Find out what works best for you.</p>
<p>I hope people find this useful, I think it opens a whole new world for serious PHP development.  Feel free to drop me an <a href="mailto:jon.gilkison@gmail.com">email</a> if you have questions or successes.</p>
]]></content:encoded>
			<wfw:commentRss>http://interfacelab.com/metadataattributes-in-php/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Flying Solo</title>
		<link>http://interfacelab.com/quintuple-up/</link>
		<comments>http://interfacelab.com/quintuple-up/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 08:13:57 +0000</pubDate>
		<dc:creator>Jon Gilkison</dc:creator>
				<category><![CDATA[Poker]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://interfacelab.com/?p=20</guid>
		<description><![CDATA[Dave had to head back to San Francisco, leaving me to fend for myself. I was initially hesitant, playing with a buddy is really the best way to go. You can protect each other in multi-way action, you can do some sick post game analysis and just sounding ideas on betting, constructing table image and what not always push the game to that next level.

Like a true degenerate, he tried to change his flight so we could cram in another 2/5 session, but the airlines weren't having it and he had to be back to San Fran at a time that made it unfeasible. There is a blurry line between a degenerate and a great player, and I think had he pushed the flight we'd have landed on the wrong side of that line.

I wish he had been there to see some of the sickness though.]]></description>
			<content:encoded><![CDATA[<p>Dave had to head back to San Francisco, leaving me to fend for myself.  I was initially hesitant, playing with a buddy is really the best way to go.  You can protect each other in multi-way action, you can do some sick post game analysis and just sounding ideas on betting, constructing table image and what not always push the game to that next level.</p>
<p><span id="more-20"></span></p>
<p>Like a true degenerate, he tried to change his flight so we could cram in another 2/5 session, but the airlines weren&#8217;t having it and he had to be back to San Fran at a time that made it unfeasible.  There is a blurry line between a degenerate and a great player, and I think had he pushed the flight we&#8217;d have landed on the wrong side of that line.</p>
<p>I wish he had been there to see some of the sickness though.</p>
<p><strong>Settling in By Myself</strong></p>
<p>Honestly, I wasn&#8217;t feeling up to another session of poker.  Dave and I had stumbled into an early morning game that same day and Dave had run a bad session while I landed up $800.  Truth be told we were both exhausted and off our games, but I honestly believe our half-game is two steps ahead of most people&#8217;s best games.  I know that sounds egotistical, and it is, but ego is an essential ingredient when playing poker.  If you can spike up your ego and have faith that you are a great player, that comes across the table in a confidence level that instantly sets up a favorable table image.  It carries through in your bluffs and your body language in general, making it that much harder for people to put you on hands and hesitant to call your pot spiking raises.</p>
<p>So I took some time to have a meal, write some notes on the early morning degenerate session and plan out a few scenarios for the next session.  I decided during dinner that I was going to hold off on the bluffing and practice a more trapping game using some betting strategy that Dave and I had talked about while waiting for his flight.  I also committed myself to an 8 hour session and I think this is important to highlight.  Telling yourself that you are going to play 8 hours or 10 hours frees you from the novice mistake of thinking you need to be involved in every monster pot or you have to play semi-strong hands when the correct play is to fold.  When you fold QJ, KJ, A10 or some other flopping/drawing hand, I always look at my watch and tell myself I have plenty more time for a more perfect setup.  When you rush you make mistakes.  Slow, deliberate play wins in the long run, so give yourself time and be lenient with yourself in making solid folds when things feel fishy.</p>
<p>I head to the 2/5 game at MGM and land on a table of monster stacks.  I was slightly intimidated until a little voice in my head told me &#8220;Those stacks belong to you.&#8221;</p>
<p>It&#8217;s all my brain had to do throw me into the game.  I did my standard start off of fold, watch and listen.  I think this is critical to my play.  I need to understand the table before I can start moving on it.  Additionally, by playing tight, or not at all, the pro&#8217;s will pick up that you are studying the action and throw a little respect your way when you do start showing up in some pots.</p>
<p><strong>Sick Ducks</strong></p>
<p>My first action pot had me with 22 in the small blind.  I have about $400 and some change, $100 over my $300 buy-in.  Button raises 35 bucks and I instantly put him on AK.</p>
<p>2/5 is real predictable in this way.</p>
<p>Any large pre-flop raise is almost certainly AA, AK, AQ or big pocket pair.  Unfortunately for the raiser, I had him down as a super weak stack and knew it was coin flip going into the flop so I call without hesitation.  Calling speed is critical, I&#8217;ve found.  When small blind calls without hesitation, weaker players start the sweat, specifically if he doesn&#8217;t have a made hand.  I personally feel that AK is a crap hand post-flop so calling here is a no brainer.  For 2/5 the best you can hope for is 2 pair or trips, but the flop rarely goes that way with AK.  Since I&#8217;m only 35 in with a made hand that he can&#8217;t put me on, it&#8217;s no sweat to fold to a flop favorable to his AK.</p>
<p>Flop falls down 2-4-J.  Mister AK has me on J-10 or JQ which is as perfect as perfect can be.  First to act, I spike the pot for $100 which I knew he would call with his two overs and two cards to come.  To my chagrin, he pushes all in which I call instantly since he&#8217;s drawing dead.  Two pair can&#8217;t save him.  Two running kings or aces gives me a full house.  If his AK is suited, he&#8217;ll need runner runner to catch a flush which I&#8217;ll gladly play off as a reward for letting me trap him in a sick hand.</p>
<p>I insta-call and make a mind fuck play of proudly flipping my 2&#8242;s and declaring his &#8220;AK suited&#8221; dead before he even shows.  I&#8217;ll eat my crow if the turn and river go his way.</p>
<p>But it doesn&#8217;t.  Another 4 comes on the turn, giving me a boat and his hand is dead as dead can be.</p>
<p>Double up puts me at $800 and I&#8217;m right in my comfort zone with my chip stack to start making moves.  My little show when I flip has broadcasted to the rest of the table that I have cahones the size of boulders which I take advantage of later to steal some pots with a few semi-bluffs.</p>
<p><strong>Mind Fuck Part Deux</strong></p>
<p>This was a picture perfect psychology play.</p>
<p>I&#8217;m dealt AA in 4th position.  I limp in for $5, which I honestly feel is the best play in early position holding AA because so many people have yet to act and I want a read on hands before I spike it.  3 callers and a bunch of folds follow.  The guy in the small blind raises 35 bucks.  Hello AJ!</p>
<p>Action comes back to me, with button calling Mister AJ&#8217;s raise.  I do a fairly obvious re-checking of my hand, sprinkling the top with some feigned running of the math, so that Mister AJ puts me on QQ or KK.  Dude on the button is of no concern to me.  He&#8217;s calling with small pair or 9-10 hoping to hit a flop.  I re-raise $100 on top, honestly hoping to take it down right here, but knowing that Mister AJ is likely to call because he&#8217;s a total fish.</p>
<p>He hems and haws but finally calls.  He acts like he can&#8217;t put me on a hand, but I know he has me on QQ or KK.  Someone holding AA would have spiked from 4th seat and not had to re-check their cards or spend some time thinking about his raise.  I know that post-flop I&#8217;m going to play a very dirty trick and I think I would only allow myself to do this once per session because it&#8217;s such a filthy move.</p>
<p>Before I tell you what I did, I want to tell you why I did it.  There is a chance I have misread, but misreading with AA in the pocket is acceptable.  If he has KK or QQ, then he has me on AJ or AQ.  To illicit a call if he does have KK or QQ, I&#8217;m going to have to induce him into doing it.  Honestly, I don&#8217;t really think this guy can put me on any hand at all, he just doesn&#8217;t seem that good of a player.  If he&#8217;s holding KK or QQ, hell even AQ/AJ/AK, he&#8217;s going to replay some move he saw on television and walk right into my trap.</p>
<p>The flop comes down junk.  There is a pause right after the dealer flips the flop and I jump in declaring &#8220;All In&#8221; acting out of position.</p>
<p>Told you this was a filthy dirty move.</p>
<p>A savvy player might see my trap right there, but I&#8217;ve consciously broadcasted to the guy that I&#8217;m very eager to play my KK or QQ with this kind of flop by declaring my intentions out of turn.  Since he was suppose to be first to act, the dealer tells me to cool my jets and turns to the guy to have him act.  The guy checks to me and I instantly redeclare my All In.  Thanks for helping me with my play Mr. Dealer!</p>
<p>Before I tell you what happened, I want to point out that I&#8217;m perfectly happy at this point to take the pot down if Mister AJ folds to my All In.  David is big on maximizing value for a hand, which is awesome playing, but I put a little less importance on it because too many times you can get caught in some weird crossfire that junks your winning hand when you could have walked off with the pot on post-flop action.  Here is where setting an amount of time for play is important because you can thrive on picking up $100-$200 pots here and there to slowly build up your stack.  Patience pays in spades.</p>
<p>At first, I think the guy is going to fold.  I have around $900 in front of me, with about $300 in the pot.  He has around $700 in front of him (most of which he picked up on a bullshit gutshot draw that got him a lot of heat from the table for sucking out).  He calls, flipping over AQ so my read was pretty damn close.  A solid player would have folded, and I honestly think this guy would have folded too had I not acted so dirty.  By coming out as an eager beaver and/or a bully, he wants to &#8220;teach me a lesson&#8221; or pull out a &#8220;Degree All-In Moment&#8221;.  Wrong move.</p>
<p>Needless to say the rest of the board came out junk and I took it down.  You wouldn&#8217;t believe the incredulous table banter that exploded from the solid players as I raked in chips.  One guy that I had been paying a shitload of respect to calls me out for limping in 4th position with pocket AA&#8217;s telling me what a dumb move that was.  If there is one thing that can easily drop me on tilt, it&#8217;s when a respected player does post play analysis on the way I&#8217;ve played.  As I&#8217;m raking in the reds, I turn to the guy and say:</p>
<p>&#8220;Dude, this table is so soft it&#8217;s like butter.  The guy over here (pointing to the guy whom I had just busted) is going to call with any sizable pocket pair and his raise told me he was on AJ/KK/QQ.  I limp and the flop comes down as the perfect trap.  I&#8217;m not afraid of getting my aces cracked at all.  I can throw that shit away all day and not cry about it.  And, shit, it&#8217;s not like I didn&#8217;t broadcast what I had with my re-raise and my all-in.  It&#8217;s his fault he let me put him in that trap.  Furthermore, how the hell is anyone going to put me on a hand for the next hour?  I respect your plays man, but after this not even you are going to be able to put me on a hand and trust me I&#8217;m going to play that to the tilt.&#8221;</p>
<p>I know I gave up way too much information here, but I did it on purpose.  I wanted the table to know that I played that hand hard and it wasn&#8217;t random luck.  I wanted them to know that I was observing and had people&#8217;s plays pegged.  While it gave me the asshole image at the table, it also gives me the semi-pro/pro image and that&#8217;s going to have people back off when I start pulling out my semi-bluffs and bluffs.</p>
<p><strong>Cracking Rocks</strong></p>
<p>The guy in seat 9 I had played in a couple of other sessions and knew him to be a bit of an ATM machine.  Definitely not good at reading other players, but I will give him credit for otherwise being a very tight player willing to grind it out until he hits a good hand.</p>
<p>I&#8217;m in the small blind with pocket 6&#8242;s.  I raise 35 hoping for a single caller and everyone folds except for The Rock.  He calls and I&#8217;m assuming AJ/AQ.  Did I mention 2/5 was predicatable in this way?</p>
<p>The flop comes down perfect.  A-J-6, rags.  I check to him and he raises 50.  I smooth call and the turn comes junk so I know I&#8217;m good.  I&#8217;ll pay JJ off, but I don&#8217;t put The Rock on JJ with his call on my pre-flop raise.  I lead out with $75 and he insta-calls and I have to put him on AJ because he&#8217;s going to protect his set of jacks with a re-raise or an All-In which I can&#8217;t call.  He could be laying a trap with AA, but he&#8217;s not that good and at this point he&#8217;s afraid of me, but &#8211; like the other dude &#8211; wants to snap a piece off the bully.</p>
<p>River comes more junk, the only possible hands in play are set over set, but I have him on 2 pair.  I check to him and he bets $75 which I promptly reraise to $200.  Pow, right in the kisser.</p>
<p>He runs the math and realizes that he&#8217;s priced into the pot.  I&#8217;m hoping for an all-in move, but he simply calls the $200 and I flip the set.  He shows AJ and storms from the table.  There is deathly silence as I pull in the pot and stack it up.  When he returns to the table, obviously steaming at his bad play, I can overhear him and another guy running post-play analysis.  The end result is that he should have pushed me on the turn with an all-in raise which I would have had to fold because he&#8217;d be representing JJ and his set would have been larger.  His mistake was putting me on AK, but honestly I don&#8217;t expect that anyone could have put me on sixes with an out of position raise like that.</p>
<p><strong>Rack Em Up</strong></p>
<p>This is probably the best move I made during that session.  I racked up my chips when I had quintupled up.  I could have stayed and grinded longer, but the math showed me I was making $300 an hour for 5 hours of play.  I had just lost about $150 in a bluff gone bad, so I made the right choice to close that session out.  I know I had planned to play for 8 hours, but it struck me as a better idea to rack up, take a break for a few hours and write about the session so that I could make notes on my plays.  I&#8217;ll be heading back for another session soon with the assumption that I&#8217;ll play for another 10 hours.</p>
<p>After the degenerate analysis with David, I&#8217;ve decided I have a strict single $300-$400 buy-in policy for 2/5.  If I lose that buy-in I leave the table and take a walk/nap/meal.  It hasn&#8217;t happened yet, but the biggest mistake I&#8217;ve seen repeatedly is people buying and rebuying over and over.  When your tilted, and you will be when you lose your buy-in, just walk away from the goddamn table.  It&#8217;ll be there when you get back.  Do something to knock out the bad energy and once you feel the power again, go hit the session and show it who&#8217;s boss.</p>
<p><a href="http://flickr.com/photos/misterfingers/2567367482/in/photostream/"><img src="http://farm4.static.flickr.com/3011/2567367482_12904b54e4.jpg" alt="" width="500" height="375" /></a></p>
<p><strong>Racked Up</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://interfacelab.com/quintuple-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

