<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
  <title type="text">Rob Conerys Blog</title>
  <generator uri="http://effectif.com/nesta">Nesta</generator>
  <id>tag:wekeroad.com,2009:/</id>
  
  <link rel="alternate" href="http://wekeroad.com" />
  <subtitle type="text">Ruby on Rails, ASP.NET MVC Web Development</subtitle>
  <updated>2012-05-11T10:00:00-05:00</updated>
  <author>
    <name>Rob Conery</name>
    <uri>http://wekeroad.com</uri>
  </author>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/wekeroad/EeKc" /><feedburner:info uri="wekeroad/eekc" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>wekeroad/EeKc</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry>
    <title>Men In Tech</title>
    <author>
      <name>Rob Conery</name>
      <uri>http://wekeroad.com</uri>
    </author>
    <link type="text/html" rel="alternate" href="http://feedproxy.google.com/~r/wekeroad/EeKc/~3/xWttC882DUk/men-in-tech" />
    <id>tag:wekeroad.com,2012-05-11:/2012/05/11/men-in-tech</id>
    <content type="html">&lt;p&gt;The tech industry, like many, is rife with sexual discrimination and muted policies towards equality in the workplace. I used to let it ride. No longer - this is my story.&lt;/p&gt;&lt;p&gt;&lt;img src='http://wekeroad.com/images/PJ_Harvey.jpeg'/&gt;&lt;/p&gt;&lt;p&gt;&lt;h2&gt;The Boner&lt;/h2&gt;

&lt;p&gt;This all started, as most stories do, on a regular day. The sun was shining, I was in a good mood all things considered. I drove to work in light traffic in my new car that I could afford because I have this job in the technical industry. I&amp;#39;m a programmer - which is usually quite shocking to people when I tell them.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;quot;You don&amp;#39;t look like a programmer! When did you get into computers? That&amp;#39;s kinda hot...&amp;quot; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I&amp;#39;m used to it. For some reason being a guy means I&amp;#39;m supposed to be digging ditches or playing football for a living where tight outfits and showing off my body - you know: no shirt, sun glistening on ripped pecs. That kind of thing.&lt;/p&gt;

&lt;p&gt;Yet I&amp;#39;m not that guy - even though I&amp;#39;m 6&amp;#39;3 and workout a lot (and some say I look the part) - I&amp;#39;m a programmer and I work in an industry dominated by women who can&amp;#39;t get passed the idea that I&amp;#39;m a programmer and I&amp;#39;m hot (I&amp;#39;ve overheard many of the moms at our playground call me a FILF). &lt;/p&gt;

&lt;p&gt;Not everyone has a hard time with the idea that I&amp;#39;m a programmer - it&amp;#39;s young women mostly - the kind that just graduated and want to get rich while drinking with their friends while wearing the latest in geek fashion accessories. Dark skirts, thick-healed shoes with their hair pulled back into that &amp;quot;Girl With the Dragon Tattoo&amp;quot; kind of thing.&lt;/p&gt;

&lt;p&gt;It&amp;#39;s the world I work in - every day. My boss (the senior dev) is a Dragon Girl - you&amp;#39;d swear she buys her clothes from the Stieg Larsson catalog for the wannabe-techie-who&amp;#39;s-never-coded-before. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sigh&lt;/strong&gt;. So anyway - today we&amp;#39;re doing our morning Intentions (for those not familiar with Agile - that&amp;#39;s where we all stand together and describe our Work Intentions for the day) and my annoying coworker is, &lt;strong&gt;once again, staring at my crotch&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I&amp;#39;m used to it. I try and dress nice for work and sometimes that means wearing things that accentuate &amp;quot;the male form&amp;quot;. Normally I&amp;#39;m happy in a pair of baggy 501s but I&amp;#39;m trying to dress &amp;quot;professionally&amp;quot; and move up in life - and my dad told me I need to &lt;strong&gt;use what God Gave Me&lt;/strong&gt;. Whatever that means.&lt;/p&gt;

&lt;p&gt;That was his generation where men ran around in fear of their wives - pushing the strollers and wearing the Bjorn while the wife barks commands in her pony tail, vest-jacket and yoga pants. Thank God I don&amp;#39;t live in that generation....&lt;/p&gt;

&lt;p&gt;I shift my stance a bit and give this lame girl a look as if to say &amp;quot;grow up scumbag&amp;quot; - and she just laughs. &lt;strong&gt;Women can be so annoying...&lt;/strong&gt; &lt;em&gt;and then I hear my name called&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;I freeze. Shit! This numb-tits was just staring at my junk and got me so wound up I forgot what I was thinking about! All of a sudden I feel like everyone&amp;#39;s eyes are on me and my pants...&lt;/p&gt;

&lt;p&gt;In my mind I try to get the image of that chick out of my mind - and I can&amp;#39;t. I feel like they&amp;#39;re all looking at the bulge in my pants and I wonder why I wore this thing to work then get mad at myself for even questioning myself and my wardrobe and why can&amp;#39;t these fucking women GROW UP and understand that YES I&amp;#39;M A MAN SO FUCKING WHAT.&lt;/p&gt;

&lt;p&gt;For the life of me I can&amp;#39;t remember what I was going to say.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;He must have a boner or something.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Light giggles. I&amp;#39;m completely embarrassed. Yes this really happened. I&amp;#39;m so completely astounded that one of these idiot girls said that to me... I can&amp;#39;t believe I work here, with these people. I love my job and I love to program - but dealing with these fucking morons is taking its toll. &lt;/p&gt;

&lt;p&gt;I look over to my boss who&amp;#39;s just giggling slightly. &amp;quot;Should we move on then Rob?&amp;quot; she says. I look over to the corner office where the founders - all women - are sitting around a table tensely discussing company strategy... I feel trapped - in a Good Old Girl network where &amp;quot;just another boner comment&amp;quot; will get me a nice, matronizing look from someone who has no idea what it&amp;#39;s like to be a man in this hell hole.&lt;/p&gt;

&lt;p&gt;&amp;quot;Whatever&amp;quot; is what I manage to say. What else can I say? And I begin to remember my parents and their advice...&lt;/p&gt;

&lt;h2&gt;Women Want Only One Thing&lt;/h2&gt;

&lt;p&gt;I grew up in Los Angeles. Meat-fest and the place where men get crotch implants for their 16th birthday. I never cared about the size of my privates and my parents, when I was in junior high and hight school kept insisting that men grow differently and to be proud of my body.&lt;/p&gt;

&lt;p&gt;Yet every day there were billboards, magazine articles, storefront windows, music videos - literally wherever you turned: &lt;strong&gt;men in tight pants with their bulge right in your face&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I was 12 and started to believe that men with a big bulge seemed to have everything they wanted. My dad used to lecture me constantly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Keep those pants buttoned up and believe that all women want in. That will keep you safe.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I remember thinking &lt;strong&gt;my dad was just another prude male&lt;/strong&gt; - his thinking straight out of the Victorian Era where men wore those ridiculous, fluffy outfits that managed to hide most of their body except for their bulge.&lt;/p&gt;

&lt;p&gt;Fast-forward to high school. I was a junior and took part in a typical story of following friends into a room at a party, talking to this girl that seemed to be nice, my friends leaving the room at some point, being drunk, and ultimately being pressured to do something I wasn&amp;#39;t prepared to do.&lt;/p&gt;

&lt;p&gt;A familiar story for many men - I know. Just stick with me for a second because &lt;em&gt;I was one of those statistics&lt;/em&gt;. Many men are - and most women don&amp;#39;t seem to understand that. Say stupid shit first, apologize for hurt feelings later.&lt;/p&gt;

&lt;p&gt;It was 3am when I made it home. My crotch hurt. I didn&amp;#39;t know it would hurt like that and I remember feeling shamed and numb. I tried to sneak in and not tell my parents - they would be furious with me. My mom... God knows what she would do to this girl if she ever found out who it was.&lt;/p&gt;

&lt;p&gt;I told myself not to regret it - it just a physical act that I was going to do someday anyway - and now it&amp;#39;s done. Big Deal. I wanted to be in love the first time, I wanted to have it be something special - not something induced by alcohol and clever conversation...&lt;/p&gt;

&lt;p&gt;But we can&amp;#39;t all get what we want can we?&lt;/p&gt;

&lt;h2&gt;Sororities&lt;/h2&gt;

&lt;p&gt;I had a few more experiences in college but I was a bit more on my guard. I didn&amp;#39;t put myself in situations where women were drinking and there were dark rooms. I came to realize that we all want the same thing in the end - and that not all women were scumbags waiting to get into my pants.&lt;/p&gt;

&lt;p&gt;But working at my job these days - I&amp;#39;m taken right back to my high school days. The so-called &amp;quot;Sisgrammer&amp;quot; thing is in full effect with these young women coming out of school thinking everything is a sorority party.&lt;/p&gt;

&lt;p&gt;Drinking at work, long stares at my crotch, quips about boners in my pants.&lt;/p&gt;

&lt;p&gt;The other day we were out at a user group meeting (my first one) and I showed up - and one of the women there asked me&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Are you here to take our drink order?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I was speechless. I left this shit behind me in college - yet here it is in front of me. I couldn&amp;#39;t think of a retort so I just smiled wryly and muttered something non-confrontational. She cocked her head a bit as she looked me up and down - noting my bulge - and said&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Sorry - but you don&amp;#39;t look like a programmer - no offense&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yes. I&amp;#39;m a man. My junk doesn&amp;#39;t look like yours.&lt;/p&gt;

&lt;p&gt;I look up at the TV that&amp;#39;s there next to the bar and coincidently there&amp;#39;s a commercial for GoDaddy with Michael Phelps in his speedo, gyrating in front of the camera with his gold medals dangling around his bulge...&lt;/p&gt;

&lt;p&gt;I recall a Nokia video that I watched the other day on Vimeo where these Sis-grammers strut around in their Dragon Girl outfits while these men, dressed in leather pants with a huge bulge and these shoes, glasses and shirts that made them look like Men With a Dragon Tattoo - gyrating in front of the camera...&lt;/p&gt;

&lt;p&gt;All to sell Nokia/Windows Phone 7&amp;#39;s. The scene reminded me of that party - my First Time Party - surrounded by women that &amp;quot;wanted to get some&amp;quot;. The sexual pressure coming at me from everywhere... finally relenting.&lt;/p&gt;

&lt;p&gt;Let&amp;#39;s just say that Nokia phone isn&amp;#39;t high on my list.&lt;/p&gt;

&lt;p&gt;My resentment grows as I stare back at the clueless bitch who&amp;#39;s still staring at me with that sorority sister smile... I don&amp;#39;t want to resent her, I want to move on with my life an my career...&lt;/p&gt;

&lt;p&gt;Another GoDaddy commercial comes on the TV. &lt;/p&gt;

&lt;p&gt;I turn and leave.&lt;/p&gt;

&lt;h2&gt;This Too Shall Change&lt;/h2&gt;

&lt;p&gt;I know what you&amp;#39;re thinking: &amp;quot;So what - another victim story where a person who can&amp;#39;t hang blames women in tech for all his problems&amp;quot;. I hear this a lot when I speak up.&lt;/p&gt;

&lt;p&gt;It would be easy to believe that - to accept the boner comments, the stares, the imagery on TV. But I don&amp;#39;t think I&amp;#39;ll do that.&lt;/p&gt;

&lt;p&gt;Inequality, segregation, prejudice and bigotry have been common in human history - but they aren&amp;#39;t permanent. I choose to be patient, to work hard and eventually... someday... possibly... rise to a position where - hey look! I&amp;#39;m your boss!&lt;/p&gt;

&lt;p&gt;Sorry what was that? Oh right - &lt;em&gt;that comment&lt;/em&gt; - well yeah actually I do remember that. Hard feelings? No - I realize that people say weird things sometimes... speaking of...&lt;/p&gt;

&lt;p&gt;I called you into my office today to have a chat with you about a comment you made in the office - or was it on Twitter? Or maybe at a conference? Either way you seem to have offended someone from the opposite sex (again! Imagine that!). &lt;/p&gt;

&lt;p&gt;Unfortunately for you we&amp;#39;re not at a bar, and I&amp;#39;m not taking your drink order...&lt;/p&gt;

&lt;p&gt;I&amp;#39;ll take my time explaining what professionalism is, and what it means in the workplace. I&amp;#39;ll take care not to offend you as I explain the roles of men and women in &lt;em&gt;any&lt;/em&gt; industry. I&amp;#39;ll listen to your excuses, and I&amp;#39;ll listen to you politely explain that &lt;strong&gt;I should lighten up&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then I&amp;#39;ll fire your fucking ass.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No offense.&lt;/p&gt;
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=xWttC882DUk:gL_NJOUmHZ0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=xWttC882DUk:gL_NJOUmHZ0:Q8R26LmAkSY"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=xWttC882DUk:gL_NJOUmHZ0:Q8R26LmAkSY" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=xWttC882DUk:gL_NJOUmHZ0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=xWttC882DUk:gL_NJOUmHZ0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=xWttC882DUk:gL_NJOUmHZ0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=xWttC882DUk:gL_NJOUmHZ0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/wekeroad/EeKc/~4/xWttC882DUk" height="1" width="1"/&gt;</content>
    <published>2012-05-11T10:00:00-05:00</published>
    <updated>2012-05-11T10:00:00-05:00</updated>
  <feedburner:origLink>http://wekeroad.com/2012/05/11/men-in-tech</feedburner:origLink></entry>
  <entry>
    <title>The Weekend With NodeJS</title>
    <author>
      <name>Rob Conery</name>
      <uri>http://wekeroad.com</uri>
    </author>
    <link type="text/html" rel="alternate" href="http://feedproxy.google.com/~r/wekeroad/EeKc/~3/N5x5QQfcFeo/the-weekend-with-nodejs" />
    <id>tag:wekeroad.com,2012-04-18:/2012/04/18/the-weekend-with-nodejs</id>
    <content type="html">&lt;p&gt;I try not to work on the weekends and instead spend the time learning something new and, hopefully, different. To that end: Tekpub jas just released &lt;a href="http://tekpub.com/productions/node"&gt;Hello NodeJS&lt;/a&gt;. What are you doing this weekend?&lt;/p&gt;&lt;p&gt;&lt;img src='http://wekeroad.com/images/node_title.png'/&gt;&lt;/p&gt;&lt;p&gt;&lt;h2&gt;All Roads Lead to Node&lt;/h2&gt;

&lt;p&gt;You ever head to the local user group meeting or conference - or maybe just casually drop by a colleague&amp;#39;s office - and they&amp;#39;re discussing some new technical concept? One that you may, or may not, know much about? &lt;/p&gt;

&lt;p&gt;This happens to me just about every day - whether on Twitter, reading a blog post, or just talking on Skype with a friend. The odd thing is that these conversations - the idle musings on the New and Shiny - always seem to fall back on The Keystone: the Shiney New Hotness that, if you don&amp;#39;t know about it, means you&amp;#39;re a trog.&lt;/p&gt;

&lt;p&gt;For me, that&amp;#39;s been &lt;a href="http://nodejs.org"&gt;NodeJS&lt;/a&gt; this last year and some. At conferences, or in an IRC chat - someone, somewhere would drop a reference to &amp;quot;Well I really like the way Node does that... &amp;quot; and I would find myself staring blankly off a cliff.&lt;/p&gt;

&lt;p&gt;I always wished there was some type of &amp;quot;What The F*** Is NODE!!!!&amp;quot; reference for people that might care. If only to avoid falling off the face of a geek conversation.&lt;/p&gt;

&lt;p&gt;Alas - nothing like that has come along. &lt;a href="http://tekpub.com/productions/node"&gt;So I went ahead and made one&lt;/a&gt; that you could watch over the weekend easily, with a beer or a glass of wine, and go back to work on Monday feeling like you know more.&lt;/p&gt;

&lt;h2&gt;Part Reference, Part Exploration, Part Musing&lt;/h2&gt;

&lt;p&gt;This production isn&amp;#39;t a reference and it&amp;#39;s not anywhere near a &amp;quot;Mastering NodeJS&amp;quot; kind of deal. Node&amp;#39;s moving much too quickly for such a thing. Instead I wanted to aim this at the curious who want to not only take part in the Arm-Wavey New Hotness conversations - but also contribute.&lt;/p&gt;

&lt;p&gt;So, to that end I made sure to include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What the Hell Is Node and Why Should I Care?&lt;/strong&gt; This is the first episode and I do your basic breakdown in a straightforward way showing you what people are talking about, why they&amp;#39;re talking about it, and where the general excitement is coming from.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Events, Blocking, and Buzzwords&lt;/strong&gt; You would be surprised at the amount of misinformation out there about Node&amp;#39;s ability to be &amp;quot;non-blocking&amp;quot; - and what that means for you as a developer. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data&lt;/strong&gt; To my mind, this is vastly underserved when discussing Node. So I peeled back the lid and dove into data access with Node. I wanted to show what Redis is and does, why MongoDB is such a natural fit, and also that using a relational system with Node is rather easy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sockets&lt;/strong&gt; If you&amp;#39;ve ever seen a Node demo, you&amp;#39;ve seen a socket.io demo. This is where one browser triggers an event on the server which broadcasts a response to other browsers. It&amp;#39;s incredibly simple and will likely short circuit your brain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Frameworks&lt;/strong&gt; There is a robust, emerging dirth of app frameworks for building apps with Node. I drill into 3 of the most popular: ExpressJS, Tower, and Geddy. Each has its strengths and corresponding weaknesses.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the end of the production you&amp;#39;ll hopefully have a good, solid understanding of what makes Node tick, what &amp;quot;Evented I/O&amp;quot; means, and why people are very excited about what Node can do.&lt;/p&gt;

&lt;p&gt;I do hope you enjoy it.&lt;/p&gt;
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=N5x5QQfcFeo:pF66VvilA1o:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=N5x5QQfcFeo:pF66VvilA1o:Q8R26LmAkSY"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=N5x5QQfcFeo:pF66VvilA1o:Q8R26LmAkSY" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=N5x5QQfcFeo:pF66VvilA1o:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=N5x5QQfcFeo:pF66VvilA1o:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=N5x5QQfcFeo:pF66VvilA1o:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=N5x5QQfcFeo:pF66VvilA1o:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/wekeroad/EeKc/~4/N5x5QQfcFeo" height="1" width="1"/&gt;</content>
    <published>2012-04-18T10:00:00-05:00</published>
    <updated>2012-04-18T10:00:00-05:00</updated>
  <feedburner:origLink>http://wekeroad.com/2012/04/18/the-weekend-with-nodejs</feedburner:origLink></entry>
  <entry>
    <title>Leaving Your Mark</title>
    <author>
      <name>Rob Conery</name>
      <uri>http://wekeroad.com</uri>
    </author>
    <link type="text/html" rel="alternate" href="http://feedproxy.google.com/~r/wekeroad/EeKc/~3/NhGmhqlywvM/17-leaving-your-mark" />
    <id>tag:wekeroad.com,2012-04-17:/2012/04/17-leaving-your-mark</id>
    <content type="html">&lt;p&gt;Don Syme makes a very interesting postulation &lt;a href="http://blogs.msdn.com/b/dsyme/archive/2012/04/12/is-javascript-code-always-so-full-of-bugs.aspx" target = "_blank"&gt;over on his blog&lt;/a&gt;: "Is Javascript code always so full of bugs?" His post goes on to show what happens when you turn on script errors in IE - which is striking. But is it really that easy?&lt;/p&gt;&lt;p&gt;&lt;img src='http://wekeroad.com/images/makersmark.png'/&gt;&lt;/p&gt;&lt;p&gt;&lt;h2&gt;Slop&lt;/h2&gt;

&lt;p&gt;The rampant amount of errors you run across (if you use IE with script error notification enabled) will make you sad for the internet. It lead my friend Miguel deIcaza to postulate:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://twitter.com/migueldeicaza/status/192364208007036928"&gt;Guess a sloppy language encourages sloppy practices&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A broad stroke, but you can&amp;#39;t deny that Javascript has a number of pain points. Inexperience writing in a painful language on top of shifting platforms (browsers) with changing standards... it&amp;#39;s easy to agree with Miguel&amp;#39;s sentence.&lt;/p&gt;

&lt;p&gt;But it made me wonder: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do we get mad at Javascript so much because we can see the problems so readily? &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It&amp;#39;s right in front of our noses (especially if you have script errors on) - and the source is there for everyone to read and run through JSLint (Javascript validator).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Side note&lt;/strong&gt;: for fun I ran Don&amp;#39;s blog through JSLint and it was red red and more red. This isn&amp;#39;t a critique of Don, more of a &lt;strong&gt;wow dude might be more right than he knows&lt;/strong&gt; kind of thing.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Your Slop&lt;/h2&gt;

&lt;p&gt;What if you could lift the lid on every site out there and peer inside at the source code? &lt;strong&gt;What if you could flip a switch that says ignore every try/catch, every begin/rescue and let the errors flow freely&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;I think the internet would stop working.&lt;/p&gt;

&lt;p&gt;I think blaming a language for being sloppy is probably a bit off base - &lt;a href="https://twitter.com/haacked/status/192364637461811201"&gt;as Phil put it:&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;sloppy developers promote sloppy code. It&amp;#39;s just most sloppy code is hidden from us more than JavaScript is. ;)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I think Phil&amp;#39;s right. But it brings up a question: &lt;em&gt;when you write code, how many errors do you write per hour?&lt;/em&gt; And, more importantly, how do you know they&amp;#39;re there and then fix them?&lt;/p&gt;

&lt;h2&gt;Forged From The Fiery Pits of Exception Hell&lt;/h2&gt;

&lt;p&gt;Think of all the code you&amp;#39;ve written over the years - Javascript, Ruby, PHP, C# - whatever. Where is it now? How many bugs, logic errors and overall madness have you given birth to?&lt;/p&gt;

&lt;p&gt;About 1 time out of 9 I can write a routine that works the first time. And when that happens I usually let out a &amp;quot;YIP!&amp;quot; - and then immediately distrust whatever it was that I wrote.&lt;/p&gt;

&lt;p&gt;There&amp;#39;s no way I can get it right the first time - Odds are that I can&amp;#39;t. I know that so I test my stuff as much as I possibly can. Even then I know I&amp;#39;m letting crap out the door. It&amp;#39;s human nature.&lt;/p&gt;

&lt;p&gt;Our brains are wired to improve upon millions of years of pain and suffering (if you believe in evolution). Why shouldn&amp;#39;t our code be the same way? What do we know of any other way to create... anything?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you have kids and were present at their birth, you very much know what I&amp;#39;m talking about&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;The Mark of the Maker&lt;/h2&gt;

&lt;p&gt;Our code is forged from the pain of misunderstandings, miscommunications, hubris, bullheaded ego and a smidge of inspiration and love. After a period of slow-torture and water boarding, our applications take shape.&lt;/p&gt;

&lt;p&gt;The true question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do you forge your code carefully, fold it gently, and pound the finest edge found anywhere in the land? Does your code bear the marks of its maker?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The steel of the sword is only valuable as a measure of vanity - a tree limb can take a man&amp;#39;s head if it&amp;#39;s properly swung. It&amp;#39;s the Mark of the Maker the tells the true tale of the weapon.&lt;/p&gt;

&lt;p&gt;What does your Mark look like?&lt;/p&gt;
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=NhGmhqlywvM:janQLsR4PCQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=NhGmhqlywvM:janQLsR4PCQ:Q8R26LmAkSY"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=NhGmhqlywvM:janQLsR4PCQ:Q8R26LmAkSY" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=NhGmhqlywvM:janQLsR4PCQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=NhGmhqlywvM:janQLsR4PCQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=NhGmhqlywvM:janQLsR4PCQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=NhGmhqlywvM:janQLsR4PCQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/wekeroad/EeKc/~4/NhGmhqlywvM" height="1" width="1"/&gt;</content>
    <published>2012-04-17T10:00:00-05:00</published>
    <updated>2012-04-17T10:00:00-05:00</updated>
  <feedburner:origLink>http://wekeroad.com/2012/04/17-leaving-your-mark</feedburner:origLink></entry>
  <entry>
    <title>Cleaning Up Deep Callback Nesting With Node's EventEmitter</title>
    <author>
      <name>Rob Conery</name>
      <uri>http://wekeroad.com</uri>
    </author>
    <link type="text/html" rel="alternate" href="http://feedproxy.google.com/~r/wekeroad/EeKc/~3/JjbBSxmNIzg/cleaning-up-deep-callback-nesting-with-nodes-eventemitter" />
    <id>tag:wekeroad.com,2012-04-05:/2012/04/05/cleaning-up-deep-callback-nesting-with-nodes-eventemitter</id>
    <content type="html">&lt;p&gt;One problem people face when starting out with Node (and Javascript in general) is handling the asynchronous, deep callback nesting issue. EventEmitters help fix that.&lt;/p&gt;&lt;p&gt;&lt;img src='http://wekeroad.com/wp-content/uploads/2012/04/ChristmasTree.png'/&gt;&lt;/p&gt;&lt;p&gt;&lt;h2&gt;The Registration Problem&lt;/h2&gt;

&lt;p&gt;Consider this: you want customers to register with your site. When they do, a number of things need to happen:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The information needs to be validated&lt;/li&gt;
&lt;li&gt;The customer record inserted&lt;/li&gt;
&lt;li&gt;An email sent to say &amp;quot;thank you&amp;quot;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In a typical scenario, there&amp;#39;s probably more - but let&amp;#39;s use this for now.&lt;/p&gt;

&lt;p&gt;You might know straight away how to do this in Ruby or C# - but how would you handle this with Node and Javascript?## O Christmas Tree&lt;/p&gt;

&lt;p&gt;This is some code that you might see in a Customers module:&lt;/p&gt;

&lt;p&gt;&lt;img src="/wp-content/uploads/2012/04/Screen-Shot-2012-04-05-at-11.22.43-AM.png" alt=""&gt;&lt;/p&gt;

&lt;p&gt;Yuck. &lt;/p&gt;

&lt;p&gt;This code is not only hideous-looking, it&amp;#39;s also synchronous and a nightmare to maintain.
Node allows you to do this much better with EventEmitters. Let&amp;#39;s see how to use Events to clean this code up.&lt;/p&gt;

&lt;h2&gt;Emit It&lt;/h2&gt;

&lt;p&gt;There are two ways to do this: encapsulate the eventing, or make your entire object an EventEmitter through inheritance. I&amp;#39;ll do the latter.&lt;/p&gt;

&lt;p&gt;The first thing to do is reference Node&amp;#39;s event module and the util module as well - it has some helpers we&amp;#39;ll need. Then we rewire the module to handle the events - I&amp;#39;ll explain in a second, but here&amp;#39;s the final code:&lt;/p&gt;

&lt;p&gt;&lt;img src="/wp-content/uploads/2012/04/Screen-Shot-2012-04-05-at-11.28.17-AM.png" alt=""&gt;&lt;/p&gt;

&lt;p&gt;So what&amp;#39;s going on here? Well first - there are no more callbacks - we don&amp;#39;t need them! We have events to listen to.&lt;/p&gt;

&lt;p&gt;I&amp;#39;m using Node&amp;#39;s built-in EventEmitter object to &amp;quot;graft&amp;quot; on some functionality to my Customer object. Javascript doesn&amp;#39;t have inheritance, per se, but you can take the prototype of one function and pop it on another.&lt;/p&gt;

&lt;p&gt;Node helps you with this using the &amp;quot;util&amp;quot; library. On line 42 we&amp;#39;re telling the util to push the prototype from events.EventEmitter onto our Customer function. Notice that this is a function, not an instance of a function as I had in the first example above.&lt;/p&gt;

&lt;p&gt;Next, on line 7, I had to invoke the &amp;quot;base&amp;quot; constructor to be sure that I don&amp;#39;t miss any internal instancing or setting of values. Turns out for EventEmitters you don&amp;#39;t need to do that and you can omit this line - but it&amp;#39;s safe to just do it, no matter what.&lt;/p&gt;

&lt;p&gt;In the body of each method I&amp;#39;m simply &amp;quot;emitting&amp;quot; an event to all listeners (there&amp;#39;s obviously some code missing here - pretend that I have an insert routine and so on). I can emit an event for whatever happens along the way - a successful validation fires &amp;quot;validated&amp;quot;, a failure might fire &amp;quot;validationFailed&amp;quot;. This frees up our code to do what it needs to do and no more, making it much cleaner and clearer.&lt;/p&gt;

&lt;p&gt;On line 29 I&amp;#39;ve added a final event trigger if everything works out: &amp;quot;successfulRegistration&amp;quot;. This is what calling code will really be interested in the most - either that or &amp;quot;failedRegistration&amp;quot; - and we pass along the customer record (more on that in a second).&lt;/p&gt;

&lt;p&gt;On lines 35 through 38 we&amp;#39;ve implemented a bit of workflow. This doesn&amp;#39;t need to be inside the Customer function - you can arrange these events wherever and however you like. The calling code can remove every event listener and replace it with its own if it wanted to reorganize the flow here.Speaking of calling code, here&amp;#39;s what it might look like:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/04/Screen-Shot-2012-04-05-at-11.40.12-AM.png" alt=""&gt;&lt;/p&gt;

&lt;p&gt;You hook into the events, then run register() and respond as needed.&lt;/p&gt;

&lt;h2&gt;All Over The Place&lt;/h2&gt;

&lt;p&gt;Node is built on top of EventEmitters - you&amp;#39;ll find them everywhere. Understanding them is key to writing cleaner code that&amp;#39;s more functional and maintainable - and it also helps keep things asynchronous.&lt;/p&gt;

&lt;p&gt;n the first example, we had a synchronous drop all the way down - even though we were using callbacks. Our code above isn&amp;#39;t synchronous at all - we&amp;#39;ve hooked into an event and when Node is ready, it will process the emitted event callback.&lt;/p&gt;

&lt;p&gt;Neat stuff!&lt;/p&gt;
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=JjbBSxmNIzg:lCwUzYDavMk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=JjbBSxmNIzg:lCwUzYDavMk:Q8R26LmAkSY"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=JjbBSxmNIzg:lCwUzYDavMk:Q8R26LmAkSY" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=JjbBSxmNIzg:lCwUzYDavMk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=JjbBSxmNIzg:lCwUzYDavMk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=JjbBSxmNIzg:lCwUzYDavMk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=JjbBSxmNIzg:lCwUzYDavMk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/wekeroad/EeKc/~4/JjbBSxmNIzg" height="1" width="1"/&gt;</content>
    <published>2012-04-05T10:00:00-05:00</published>
    <updated>2012-04-05T10:00:00-05:00</updated>
  <feedburner:origLink>http://wekeroad.com/2012/04/05/cleaning-up-deep-callback-nesting-with-nodes-eventemitter</feedburner:origLink></entry>
  <entry>
    <title>This</title>
    <author>
      <name>Rob Conery</name>
      <uri>http://wekeroad.com</uri>
    </author>
    <link type="text/html" rel="alternate" href="http://feedproxy.google.com/~r/wekeroad/EeKc/~3/pgKHmUEAA0Y/this" />
    <id>tag:wekeroad.com,2012-04-03:/2012/04/03/this</id>
    <content type="html">&lt;p&gt;Someday, this war's gonna end&lt;/p&gt;&lt;p&gt;&lt;img src='http://wekeroad.com/images/'/&gt;&lt;/p&gt;&lt;p&gt;&lt;p&gt;&lt;img src="http://images.onlinecriminaljusticedegree.com.s3.amazonaws.com/tsa-waste.gif" alt="TSA Waste"&gt;&lt;/p&gt;

&lt;p&gt;Created by: &lt;a href="http://www.onlinecriminaljusticedegree.com/"&gt;OnlineCriminalJusticeDegree.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;via &lt;a href="http://www.apenotmonkey.com/2012/04/03/the-tsa-perception-and-reality/"&gt;Ape, Not Monkey &lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=pgKHmUEAA0Y:BG8IjmkLFJo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=pgKHmUEAA0Y:BG8IjmkLFJo:Q8R26LmAkSY"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=pgKHmUEAA0Y:BG8IjmkLFJo:Q8R26LmAkSY" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=pgKHmUEAA0Y:BG8IjmkLFJo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=pgKHmUEAA0Y:BG8IjmkLFJo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=pgKHmUEAA0Y:BG8IjmkLFJo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=pgKHmUEAA0Y:BG8IjmkLFJo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/wekeroad/EeKc/~4/pgKHmUEAA0Y" height="1" width="1"/&gt;</content>
    <published>2012-04-03T10:00:00-05:00</published>
    <updated>2012-04-03T10:00:00-05:00</updated>
  <feedburner:origLink>http://wekeroad.com/2012/04/03/this</feedburner:origLink></entry>
  <entry>
    <title>Inversion Of Control: An Architect's Version of Global Variables</title>
    <author>
      <name>Rob Conery</name>
      <uri>http://wekeroad.com</uri>
    </author>
    <link type="text/html" rel="alternate" href="http://feedproxy.google.com/~r/wekeroad/EeKc/~3/bt7M71Cj9vE/inversion-of-control-an-architects-version-of-global-variables" />
    <id>tag:wekeroad.com,2012-04-01:/2012/04/01/inversion-of-control-an-architects-version-of-global-variables</id>
    <content type="html">&lt;p&gt;One of the tomes we live by: "Global Variables are EVIL!!!!!!" - so we abstract our stuff into patterns and build up highly ceremonial and ornate bits of dramaware called "IoC Containers". For what? To use Global Variables - That's Why.&lt;/p&gt;&lt;p&gt;&lt;img src='http://wekeroad.com/wp-content/uploads/2012/03/shoot_in_foot01.png'/&gt;&lt;/p&gt;&lt;p&gt;&lt;h2&gt;You Love Globals&lt;/h2&gt;

&lt;p&gt;No really. You do. Let&amp;#39;s just embrace that this very second. Tell me what this difference isbetween this code sample:
&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/ninject.png" alt="" title="ninject"&gt;&lt;/p&gt;

&lt;p&gt;I&amp;#39;ll tell you the difference: &lt;strong&gt;in one sample the coder admits they have a problem&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In the other they pretend the problem&amp;#39;s not there by wrapping it in ceremony, abstraction, configuration files, and Gang of Four nonsense. Can you guess which one is which?&lt;/p&gt;

&lt;p&gt;After all is said and done I think it&amp;#39;s fairly clear: we&amp;#39;re addicted to globalization.&lt;br&gt;
Possibly you disagree with me. In fact I have a feeling that you&lt;br&gt;
really disagree with me. And that&amp;#39;s OK - it takes a while to admit it.&lt;br&gt;
It took me forever to realize that I&amp;#39;ve been globalizing everything since my VB Days.&lt;br&gt;
Look at this way: at least you&amp;#39;re aware of it now.&lt;/p&gt;

&lt;h2&gt;Free The Global Love&lt;/h2&gt;

&lt;p&gt;One thing we&amp;#39;ve always been told: &amp;quot;Globals are bad&amp;quot;. They&amp;#39;re bad because&lt;br&gt;
outside forces can change the state of a given global variable which would, in turn,&lt;br&gt;
leave your application in a somewhat random, difficult to debug state.&lt;br&gt;
Sounds horrible, no? If you think so, take a look at the first sample above. What&lt;br&gt;
silliness do you see there? &lt;strong&gt;Me changing a global setting of course!&lt;/strong&gt; Now I&lt;br&gt;
understand completely that this is a bad idea - but think about it a bit more. I&lt;br&gt;
changed the container setting by simply by using the Rebind() method on the&lt;br&gt;
kernel - why is this even possible?&lt;/p&gt;

&lt;p&gt;Every now and again I think it&amp;#39;s really a good idea to look at the code we&amp;#39;re writing&lt;br&gt;
really carefully... and ask if what we&amp;#39;re doing makes any sense at all.&lt;/p&gt;
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=bt7M71Cj9vE:EZr7ED2oBPY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=bt7M71Cj9vE:EZr7ED2oBPY:Q8R26LmAkSY"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=bt7M71Cj9vE:EZr7ED2oBPY:Q8R26LmAkSY" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=bt7M71Cj9vE:EZr7ED2oBPY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=bt7M71Cj9vE:EZr7ED2oBPY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=bt7M71Cj9vE:EZr7ED2oBPY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=bt7M71Cj9vE:EZr7ED2oBPY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/wekeroad/EeKc/~4/bt7M71Cj9vE" height="1" width="1"/&gt;</content>
    <published>2012-04-01T10:00:00-05:00</published>
    <updated>2012-04-01T10:00:00-05:00</updated>
  <feedburner:origLink>http://wekeroad.com/2012/04/01/inversion-of-control-an-architects-version-of-global-variables</feedburner:origLink></entry>
  <entry>
    <title>If I Were Creating Rails.app</title>
    <author>
      <name>Rob Conery</name>
      <uri>http://wekeroad.com</uri>
    </author>
    <link type="text/html" rel="alternate" href="http://feedproxy.google.com/~r/wekeroad/EeKc/~3/UxLq2zSnJ-U/if-i-were-creating-rails-app" />
    <id>tag:wekeroad.com,2012-03-29:/2012/03/29/if-i-were-creating-rails-app</id>
    <content type="html">&lt;p&gt;Nothing but respect for Yehuda, but I'm thinking the Kickstarter model for creating a tool might not fit terribly well in the OSS landscape. I could be wrong. Either way - I have an idea.&lt;/p&gt;&lt;p&gt;&lt;img src='http://wekeroad.com/wp-content/uploads/2012/03/16562_1_other_wallpapers_hal_9000.jpeg'/&gt;&lt;/p&gt;&lt;p&gt;&lt;h2&gt;Don&amp;#39;t Fund It, Sell It.&lt;/h2&gt;

&lt;p&gt;Here&amp;#39;s my premise: a lot of people have their Rails environment dialed in. The one&amp;#39;s that are having a bit of a harder time tend to be the folks just getting started or perhaps upgrading. These are the people that might very well plunk down $5 for a tool to help them.&lt;/p&gt;

&lt;p&gt;The premise of the Kickstsarter effort is to (basically) - well here I&amp;#39;ll let Yehuda explain:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;My plan is to deliver a &lt;code&gt;.app&lt;/code&gt; that can be downloaded and dragged to the user&amp;#39;s &lt;code&gt;/Applications&lt;/code&gt; folder. At first, the application will have two facilities:- Install Rails into the system: This will install a working copy of Ruby, Rubygems, Rails and all necessary gems into the user&amp;#39;s system, available from the Terminal. It may also install rvm and other common system tools, depending on the feedback I get from the community as I develop this project.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a Terminal with a working Rails environment: This will leave all necessary resources in the &lt;code&gt;.app&lt;/code&gt; file or &lt;code&gt;Application Support&lt;/code&gt;, but open a terminal window with the &lt;code&gt;$PATH&lt;/code&gt; and other variables set up.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;I think this sounds interesting. Hackers out there will probably say &amp;quot;I can do this with a Shell Script! So what!&amp;quot; and that may very well be true. But there are a number of devs out there who are very new to Rails and are getting frustrated at the choices involved.&lt;/p&gt;

&lt;p&gt;Choice is a good thing. Frustration is not. Frustration by choices means you don&amp;#39;t understand the choices (typically). To me, &lt;strong&gt;this is what Rails.app should focus on&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;Help When and Where Needed&lt;/h2&gt;

&lt;p&gt;For people who have been working with Rails daily - the choices might not seem so difficult:- RVM or rbenv?
- Haml or Erb? Or Liquid?
- CoffeeScript?
- SASS or LESS?
- Postgres or MySQL (well... this one shouldn&amp;#39;t be so hard really). Or MongoDB?
- ActiveRecord, DataMapper, or Sequel?
- Vim, Textmate, or Sublime Text 2?
- RSpec, Cucumber, or Test::Unit? Or all 3? Or just 2?&lt;/p&gt;

&lt;p&gt;I&amp;#39;ll stop here. If you&amp;#39;re new to Rails and/or Ruby you might think it&amp;#39;s a bit of a madhouse with so many options. To me, that&amp;#39;s the joy of it all.&lt;/p&gt;

&lt;p&gt;I also want to put a personal note here: some people are callously saying &amp;quot;the guy who screwed up Rails now wants to get paid to fix it&amp;quot; - the guy being Yehuda.&lt;/p&gt;

&lt;p&gt;The problem isn&amp;#39;t Rails itself (ActiveRecord discussions aside) really - it&amp;#39;s the toolsets and &amp;quot;peripheral knowledge&amp;quot; that goes into it. Yehuda didn&amp;#39;t create RVM, SASS, or any of the other choices here, so it&amp;#39;s not fair to crucify a guy who&amp;#39;s trying to fix something.&lt;/p&gt;

&lt;p&gt;So how do you know what to use?** Educate yourself. Quickly. That&amp;#39;s what Rails.app should do.**&lt;/p&gt;

&lt;h2&gt;Cheat Notes&lt;/h2&gt;

&lt;p&gt;The problem is frustration at getting started and setting up your app. If we focus completely on the problem it becomes obvious that the solution should primarily educate, secondarily create.&lt;/p&gt;

&lt;p&gt;Given this - I have some ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Suggest &amp;quot;templates&lt;/strong&gt;&amp;quot; for building a Rails app. &amp;quot;Traditional&amp;quot; with Rails/ActiveRecord/Test::Unit/Postgres with an explanation of what this setup is good for &lt;/li&gt;
&lt;li&gt;&amp;quot;Highrise was built with this toolset&amp;quot; or something. Another template could be &amp;quot;Mongified&amp;quot; with MongoMapper (or Mongoid) and MongoDB. Each template would explain the design goals and why they were made, plus some live references.&lt;/li&gt;
&lt;li&gt;Indexed reference to &lt;strong&gt;every Railscast ever created&lt;/strong&gt;. 90% of the time when I get stuck - this is what unstucks me. Build in a summary and allow some linking over to Ryan&amp;#39;s awesome site.&lt;/li&gt;
&lt;li&gt;A reasonable, concise &lt;strong&gt;explanation of the more popular tools&lt;/strong&gt; out there, what they&amp;#39;re good at, and where their github repo is.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration directly with Github&lt;/strong&gt; and perhaps some &amp;quot;git love&amp;quot; built in?&lt;/li&gt;
&lt;li&gt;Integration with the &lt;strong&gt;&lt;a href="http://cheat.errtheblog.com/s/gem/"&gt;Cheat Gem&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Simplified and condensed &lt;strong&gt;Rails guides, built right in.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;A StackOverflow search link that, by default, &lt;a href="http://stackoverflow.com/questions/tagged/ruby-on-rails-3"&gt;searches within the Rails tag.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That seems pretty good for now. Ideally the app could be used offline so it would be great to &amp;quot;scrape&amp;quot; the sources if the licensing permits. You could literally just hook in the Cheat Gem and go from there.&lt;/p&gt;

&lt;p&gt;Now, if User X wants to use MongoDB with Rails - enter &amp;quot;Mongo&amp;quot; in the search box. What pops out would be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Mongo Template&lt;/li&gt;
&lt;li&gt;MongoMapper, Mongoid (and whatever other gems) with explanations and github locations.&lt;/li&gt;
&lt;li&gt;The Cheat Gem &lt;a href="http://cheat.errtheblog.com/s/mongo/"&gt;results for MongoDB&lt;/a&gt;
The goal here is to give the user a &amp;quot;flavor&amp;quot; for what working with Mongo in Rails will be like - the gems involved, the issues people might have had, the love people are giving it. Which brings us to an interesting aspect of this application.Nothing is more compelling and useful then&amp;quot;love&amp;quot; from other users. There are a number of places to scrape &amp;quot;love&amp;quot; from (stop it) - but even if you just started with stats from Github (commit frequency, watchers, fork counts, open issues) &lt;/li&gt;
&lt;li&gt;there&amp;#39;s a lot of information to gather there.You could do an end user a tremendous service by gathering all of that and showing it next to each gem or toolset.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Get Going!&lt;/h2&gt;

&lt;p&gt;Ultimately the goal is to cut down the time &amp;quot;exploring&amp;quot; and &amp;quot;learning&amp;quot; by gathering the useful information, educating your user, and then getting them started. This is where Yehuda&amp;#39;s idea takes shape:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select a template or clone one, modifying it as you like (use Mongoid instead of MongoMapper). Share it on Github too (format TBD)!&lt;/li&gt;
&lt;li&gt;The app creates a gemset, a .gitignore, set&amp;#39;s up common configuration stuff, creates a deployment file using Cap (or whatever), installs your gems, initializes your DB and executes a core set of tests that act as guides to get you going.&lt;/li&gt;
&lt;li&gt;If you don&amp;#39;t like it, the app goes 100% backwards - erasing the DB, the files, the gemset and so on.&lt;/li&gt;
&lt;li&gt;If you do like it - you&amp;#39;re off and running!&lt;/li&gt;
&lt;li&gt;As you build your app, you can come back to Rails.app for help as needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think back to when you were getting started with Rails - it was one Google search after another, one blog post after another, trying to get up to speed (it&amp;#39;s still this way for me!). The one thing you can truly do to make developers stoked with a Rails.app is to help them understand.I dunno! Maybe I should build this :).&lt;/p&gt;
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=UxLq2zSnJ-U:-VonEnwD1M4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=UxLq2zSnJ-U:-VonEnwD1M4:Q8R26LmAkSY"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=UxLq2zSnJ-U:-VonEnwD1M4:Q8R26LmAkSY" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=UxLq2zSnJ-U:-VonEnwD1M4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=UxLq2zSnJ-U:-VonEnwD1M4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=UxLq2zSnJ-U:-VonEnwD1M4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=UxLq2zSnJ-U:-VonEnwD1M4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/wekeroad/EeKc/~4/UxLq2zSnJ-U" height="1" width="1"/&gt;</content>
    <published>2012-03-29T10:00:00-05:00</published>
    <updated>2012-03-29T10:00:00-05:00</updated>
  <feedburner:origLink>http://wekeroad.com/2012/03/29/if-i-were-creating-rails-app</feedburner:origLink></entry>
  <entry>
    <title>Loading Data From The API - How Much Is Too Much?</title>
    <author>
      <name>Rob Conery</name>
      <uri>http://wekeroad.com</uri>
    </author>
    <link type="text/html" rel="alternate" href="http://feedproxy.google.com/~r/wekeroad/EeKc/~3/-9zizzF5NAQ/loading-data-from-the-api-how-much-is-too-much" />
    <id>tag:wekeroad.com,2012-03-26:/2012/03/26/loading-data-from-the-api-how-much-is-too-much</id>
    <content type="html">&lt;p&gt;I'm really liking what's coming together with this Hypermedia-ish API. So many ideas and approaches are starting to come into focus. Like this one: how much structured data do I pass on the initial load of the API?&lt;/p&gt;&lt;p&gt;&lt;img src='http://wekeroad.com/wp-content/uploads/2012/03/startingline1-500x337.jpeg'/&gt;&lt;/p&gt;&lt;p&gt;&lt;h2&gt;Data Or Code?&lt;/h2&gt;

&lt;p&gt;Here&amp;#39;s the deal: the API i&amp;#39;m putting together for Alt.Tekpub is starting to &amp;quot;formalize&amp;quot; itself into an initial &amp;quot;burst&amp;quot; of data, with &amp;quot;auxiliary&amp;quot; stuff requested later on. At this point I need to reduce the chatter - so I&amp;#39;m handing down a structured JSON set from the get go:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-26-at-1.31.19-PM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-26-at-1.31.19-PM.png" alt="" title="Screen Shot 2012-03-26 at 1.31.19 PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You&amp;#39;ll notice the &amp;quot;productions&amp;quot; bit is an empty array - that gets set by a query call later on.The thing I&amp;#39;m facing right now is this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do I organize the productions into semantic groups, then send? Or do I just send that information down and let the client do what it will?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let&amp;#39;s review the options shall we?&lt;/p&gt;

&lt;h2&gt;Option 1: Structure This In MongoDB&lt;/h2&gt;

&lt;p&gt;The interesting thing that&amp;#39;s happening here... sort of... is that my API is starting to define a document structure that at some level I can just store and edit later on. If I went full tilt down this road, I&amp;#39;d end up with one document in my database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And that&amp;#39;s dumb&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The good news is that MongoDB helps you with this structuring and through a bit of Map/Reduce and some other means, I can whip out a nice API document and send that down. The bad part is that the API document would have lots of repeated data and basically be 100K bigger than it needs to be.&lt;/p&gt;

&lt;p&gt;The code on the server is ridiculously light, but the code in the DB grows a bit. It&amp;#39;s all javascript so... hmmm.&lt;/p&gt;

&lt;h2&gt;Option 2: Knit Up The API Using Node&lt;/h2&gt;

&lt;p&gt;That&amp;#39;s sort of what I&amp;#39;m doing now. I can see how I could peel off a single &amp;quot;Tekpub&amp;quot; document and then assemble it with Node. The categories would have productions embedded, features would again have embedded productions, and the productions array would have yet more productions.&lt;/p&gt;

&lt;p&gt;This is highly repetitive and again an extra 100K (which really isn&amp;#39;t all that much). The engineer in me hates this. The UI programmer digs it as it&amp;#39;s less client code I need to write...&lt;/p&gt;

&lt;h2&gt;Option 3: Roll It To The Client&lt;/h2&gt;

&lt;p&gt;Right now the productions have tags - so I can figure out rather easily how to pull out Microsoft, Ruby, Javascript stuff and so on:&lt;/p&gt;

&lt;figure class='code'&gt;&lt;figcaption&gt;&lt;span&gt;Filtering The Ruby Productions&lt;/span&gt;&lt;/figcaption&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
&lt;span class='line-number'&gt;2&lt;/span&gt;
&lt;span class='line-number'&gt;3&lt;/span&gt;
&lt;span class='line-number'&gt;4&lt;/span&gt;
&lt;span class='line-number'&gt;5&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class='javascript'&gt;&lt;span class='line'&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;_ruby&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;productions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;indexOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ruby&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;

&lt;p&gt;The upside here is that the client has a lot more freedom in how to display the information. The downside is that I&amp;#39;ve shifted some responsibility &amp;quot;down stream&amp;quot; and that doesn&amp;#39;t feel too good for some reason.&lt;/p&gt;

&lt;h2&gt;My Gut Feeling&lt;/h2&gt;

&lt;p&gt;It seems a good rule of thumb: &lt;strong&gt;less is more when you&amp;#39;re coding... anything&lt;/strong&gt;. Duplicating data just doesn&amp;#39;t seem like any kind of win. &lt;/p&gt;

&lt;p&gt;I talked to Derick about this today and his opinion was that &amp;quot;normalization isn&amp;#39;t really a concern when doing an API load&amp;quot; and I agree - this puts a burden on the client to structure the data and it defeats the purpose of a sweet chocalatey API.&lt;/p&gt;

&lt;p&gt;It&amp;#39;s just not clear! The API has a notion of &amp;quot;Channels&amp;quot; and the link is just not obvious - that the &amp;quot;tags&amp;quot; on each production denotes a relationship to a &amp;quot;Channel&amp;quot;.&lt;/p&gt;

&lt;p&gt;What do you think? If you&amp;#39;re a Hypermedia Cowboy... I&amp;#39;d really love to hear from you.&lt;/p&gt;
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=-9zizzF5NAQ:s8xyuxiY-Jc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=-9zizzF5NAQ:s8xyuxiY-Jc:Q8R26LmAkSY"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=-9zizzF5NAQ:s8xyuxiY-Jc:Q8R26LmAkSY" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=-9zizzF5NAQ:s8xyuxiY-Jc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=-9zizzF5NAQ:s8xyuxiY-Jc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=-9zizzF5NAQ:s8xyuxiY-Jc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=-9zizzF5NAQ:s8xyuxiY-Jc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/wekeroad/EeKc/~4/-9zizzF5NAQ" height="1" width="1"/&gt;</content>
    <published>2012-03-26T10:00:00-05:00</published>
    <updated>2012-03-26T10:00:00-05:00</updated>
  <feedburner:origLink>http://wekeroad.com/2012/03/26/loading-data-from-the-api-how-much-is-too-much</feedburner:origLink></entry>
  <entry>
    <title>Alt.Tekpub: Working More With The Hypermedia (style) API</title>
    <author>
      <name>Rob Conery</name>
      <uri>http://wekeroad.com</uri>
    </author>
    <link type="text/html" rel="alternate" href="http://feedproxy.google.com/~r/wekeroad/EeKc/~3/J13sJ3-ZkKE/alt-tekpub-working-more-with-the-hypermedia-style-api" />
    <id>tag:wekeroad.com,2012-03-22:/2012/03/22/alt-tekpub-working-more-with-the-hypermedia-style-api</id>
    <content type="html">&lt;p&gt;Continuing on with building out a NodeJS app with Express and other buzzwords  - I decided to build out a page using my API, while I build the API.&lt;/p&gt;&lt;p&gt;&lt;img src='http://wekeroad.com/wp-content/uploads/2012/03/Balancing-Act-001.jpeg'/&gt;&lt;/p&gt;&lt;p&gt;&lt;h2&gt;In Progress&lt;/h2&gt;

&lt;p&gt;I wanted to re-iterate, one more time, that &lt;strong&gt;this is a work in progress so some of the things you see me do won&amp;#39;t make sense in a grander scheme&lt;/strong&gt;. For instance - in production I probably wouldn&amp;#39;t have the entire home page content load with $().ready() and a GET call to my server. That&amp;#39;s kind of dumb.&lt;/p&gt;

&lt;p&gt;Yet it makes sense if you want to be sure that you&amp;#39;re giving your future clients what they need to build an app on top of your API. Let&amp;#39;s see what that looks like.Also, I wanted to mention again the code is up at &lt;a href="http://github.com/robconery/alt-tekpub"&gt;http://github.com/robconery/alt-tekpub&lt;/a&gt;. It&amp;#39;s a major work in progress and it&amp;#39;s there as reference, not for consumption.&lt;/p&gt;

&lt;h2&gt;Expanding The API&lt;/h2&gt;

&lt;p&gt;I&amp;#39;ve decided to build out a Single Page App and see what happens. I know this sounds stupid to quite a few people - but again this is a workout for the API mostly, helping it take shape. But what shape is that?&lt;/p&gt;

&lt;p&gt;Let&amp;#39;s put on our native (aka thick) client hats - pretend we&amp;#39;re building an Android/iPhone app. You scroll around and find the Tekpub icon and press it. What do you expect to see next? Me, personally, I would expect to see (in terms of data):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some sort of intelligent list of productions (intelligent meaning not just a data dump)&lt;/li&gt;
&lt;li&gt;A sense of &amp;quot;state&amp;quot; - whether I&amp;#39;m logged in, what I can watch, my profile stuff, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means, basically, that &lt;strong&gt;the API needs to &amp;quot;prime&amp;quot; the application&lt;/strong&gt; with a good amount of information from the start. Initially I provided a bunch of links (GETs) to pull production data as-needed, but this doesn&amp;#39;t make much sense - the client apps will need this data no matter what.&lt;/p&gt;

&lt;p&gt;In addition, I need to send down client information as well. If some type of token is passed in I can look the client up and populate the Customer stuff - I&amp;#39;m going to punt on that right now as it&amp;#39;s really involved, I just want to take small steps for now.&lt;/p&gt;

&lt;p&gt;Let&amp;#39;s switch over to the client now - see if what I&amp;#39;m musing makes sense. I&amp;#39;ll be using basic Javascript/CoffeeScript at this point - you&amp;#39;ll see both as &lt;a href="http://wekeroad.com/2012/03/21/coffeescript-or-straight-up-js-i-suck-either-way/"&gt;I haven&amp;#39;t really made up my mind&lt;/a&gt; as to which I&amp;#39;m going to use.&lt;/p&gt;

&lt;h2&gt;The Client&lt;/h2&gt;

&lt;p&gt;I&amp;#39;m going to build the client bits out in CoffeeScript as I don&amp;#39;t know Objective-C and I think I can approximate a decent Client/Server situation using Javascript. &lt;/p&gt;

&lt;p&gt;The first thing I need to do is make sure the API is exposed. I&amp;#39;ve already created an &lt;a href="http://wekeroad.com/2012/03/18/alt-tekpub-consuming-the-api/"&gt;API route and wrapper&lt;/a&gt; (which I&amp;#39;ll refactor later) - and if I go to localhost:3000/api I get a lovely splash of JSON:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.01.56-AM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.01.56-AM.png" alt="" title="Screen Shot 2012-03-22 at 11.01.56 AM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Previously I stated that I couldn&amp;#39;t bring myself to use a $.get() to pull this code down - favoring a preload instead. I&amp;#39;m going back on that for now as I want to see how responsive this API is.&lt;/p&gt;

&lt;p&gt;But how do we consume this?&lt;/p&gt;

&lt;p&gt;Looking over the JSON, it&amp;#39;s a nice description of Tekpub and what you can do with it. So let&amp;#39;s create a Tekpub object:&lt;/p&gt;

&lt;figure class='code'&gt;&lt;figcaption&gt;&lt;span&gt;The Basic Tekpub API Object&lt;/span&gt;&lt;/figcaption&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
&lt;span class='line-number'&gt;2&lt;/span&gt;
&lt;span class='line-number'&gt;3&lt;/span&gt;
&lt;span class='line-number'&gt;4&lt;/span&gt;
&lt;span class='line-number'&gt;5&lt;/span&gt;
&lt;span class='line-number'&gt;6&lt;/span&gt;
&lt;span class='line-number'&gt;7&lt;/span&gt;
&lt;span class='line-number'&gt;8&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class='coffeescript'&gt;&lt;span class='line'&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;Tekpub&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;  &lt;span class="nv"&gt;constructor: &lt;/span&gt;&lt;span class="nf"&gt;(preload) -&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;    &lt;span class="vi"&gt;@special = &lt;/span&gt;&lt;span class="nx"&gt;preload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;productions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;special&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;    &lt;span class="vi"&gt;@featured = &lt;/span&gt;&lt;span class="nx"&gt;preload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;productions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;featured&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;    &lt;span class="vi"&gt;@blurb = &lt;/span&gt;&lt;span class="nx"&gt;preload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;blurb&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;    &lt;span class="vi"&gt;@title = &lt;/span&gt;&lt;span class="nx"&gt;preload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;    &lt;span class="vi"&gt;@customer = &lt;/span&gt;&lt;span class="nx"&gt;preload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;customerwindow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;    &lt;span class="nv"&gt;Tekpub = &lt;/span&gt;&lt;span class="nx"&gt;Tekpub&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;

&lt;p&gt;In short, this function literal will take a preload of JSON data and set some literals internally. This means that my blob of JSON has to be organized to distinguish &amp;quot;special&amp;quot; and &amp;quot;featured&amp;quot; productions. I didn&amp;#39;t have this before - what I had was GET urls for loading this data.&lt;/p&gt;

&lt;p&gt;Let&amp;#39;s switch back to the API in Node and see how this can work. This is written in Javascript.&lt;/p&gt;

&lt;h2&gt;The API&lt;/h2&gt;

&lt;p&gt;The overall approach is starting to crystallize a bit in my mind. I&amp;#39;m going to preload an object on the client with JSON so it can operate as needed, right from the start. I don&amp;#39;t want to go too far, but here&amp;#39;s what I think is reasonable: Load all productions. &lt;/p&gt;

&lt;p&gt;I don&amp;#39;t know how the client will want to use them - just send them all down.Run the filters for the client - no need to make the client do the filtering. I could send the criteria down for the filtering, but that&amp;#39;s putting a bit too much in the hands of the client. Yes, I know it&amp;#39;s a bigger JSON load but it&amp;#39;s not that much, really.&lt;/p&gt;

&lt;p&gt;I need to send some stubbed Customer information. Sorry for the huge picture here - it&amp;#39;s a lot of code. I&amp;#39;m using a picture because this will change, I&amp;#39;m sure of it:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.14.04-AM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.14.04-AM.png" alt="" title="Screen Shot 2012-03-22 at 11.14.04 AM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing to notice: &amp;quot;productions.all&amp;quot; is stubbed. Same with &amp;quot;productions.featured.productions&amp;quot;. This object literal here is a bit of a &amp;quot;template&amp;quot; if you will. The &amp;quot;_execute&amp;quot; function will populate it:&lt;/p&gt;

&lt;p&gt;&lt;figure class='code'&gt;&lt;figcaption&gt;&lt;span&gt;The API Execute Method&lt;/span&gt;&lt;/figcaption&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
&lt;span class='line-number'&gt;2&lt;/span&gt;
&lt;span class='line-number'&gt;3&lt;/span&gt;
&lt;span class='line-number'&gt;4&lt;/span&gt;
&lt;span class='line-number'&gt;5&lt;/span&gt;
&lt;span class='line-number'&gt;6&lt;/span&gt;
&lt;span class='line-number'&gt;7&lt;/span&gt;
&lt;span class='line-number'&gt;8&lt;/span&gt;
&lt;span class='line-number'&gt;9&lt;/span&gt;
&lt;span class='line-number'&gt;10&lt;/span&gt;
&lt;span class='line-number'&gt;11&lt;/span&gt;
&lt;span class='line-number'&gt;12&lt;/span&gt;
&lt;span class='line-number'&gt;13&lt;/span&gt;
&lt;span class='line-number'&gt;14&lt;/span&gt;
&lt;span class='line-number'&gt;15&lt;/span&gt;
&lt;span class='line-number'&gt;16&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class='javascript'&gt;&lt;span class='line'&gt;  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;&lt;em&gt;execute&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;    &lt;span class="nx"&gt;Production&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;      &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;productions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;all&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;      &lt;span class="nx"&gt;special&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slug&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;ft&lt;/em&gt;speaker&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;      &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;      &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;productions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;special&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;production&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;special&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;      &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;productions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;featured&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;productions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slug&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;mvc3&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slug&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;ft&lt;em&gt;triage&lt;/em&gt;oren&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slug&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;ft&lt;em&gt;speaker&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;      &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;      &lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;    &lt;span class="nx"&gt;execute&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;&lt;/em&gt;execute&lt;/span&gt;
&lt;/span&gt;&lt;span class='line'&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
We&amp;#39;re hitting the database (Production is an object that abstracts basic queries - I&amp;#39;ll talk more about that later) and pushing the resulting docs (response) into productions.all. Then, we&amp;#39;re filtering those results, dropping them into featured and special.&lt;/p&gt;

&lt;p&gt;This will work for now - not sure how well it will scale if we move to 1000 productions :) but it makes a nice proof of concept.&lt;/p&gt;

&lt;p&gt;Now that we have the data - let&amp;#39;s wire up the Client.&lt;/p&gt;

&lt;h2&gt;Back To The Client&lt;/h2&gt;

&lt;p&gt;I don&amp;#39;t like having templating script blocks all over the view pages. They look a bit wonky in my mind, so I&amp;#39;m going to put them into partials. I&amp;#39;ll create two partials: specialTemplate and featuredTemplate.&lt;/p&gt;

&lt;p&gt;Tekpub has the notion of a &amp;quot;Special&amp;quot; production - one that we&amp;#39;re exceedingly proud of. So let&amp;#39;s build that template and stick it onto the home page (again, this will change so I&amp;#39;m just snapshotting the code. If you want it, it&amp;#39;s up at github):&lt;/p&gt;

&lt;p&gt;&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.23.55-AM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.23.55-AM.png" alt="" title="Screen Shot 2012-03-22 at 11.23.55 AM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is Handlebars.js - it&amp;#39;s exceedingly fast and pretty easy to understand. I&amp;#39;ll inject the &amp;quot;special&amp;quot; data into it, and it will render out the production YouTube preview as well as some nice quotes.&lt;/p&gt;

&lt;p&gt;Next, I need to render it somehow. I can add this to my Tekpub client object:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.26.24-AM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.26.24-AM.png" alt="" title="Screen Shot 2012-03-22 at 11.26.24 AM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This code takes the JSON assignment (preload) and renders a template that I specify. I&amp;#39;m trying to lean on conventional naming so I don&amp;#39;t need to execute the same template rendering code all over the place - but in short loadTemplate() will find the &amp;quot;specialTemplate&amp;quot;, compile it, and then render it with the &amp;quot;@special&amp;quot; data - which is populated in the constructor.&lt;/p&gt;

&lt;p&gt;Now I need to do the same for featured.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.28.51-AM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.28.51-AM.png" alt="" title="Screen Shot 2012-03-22 at 11.28.51 AM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There&amp;#39;s something tricky going on here. Notice the &amp;quot;include&amp;quot; statement? That&amp;#39;s how the Jade ViewEngine works with partial views. I know I&amp;#39;ll be reusing that production view and I&amp;#39;m trying to keep these templates as clean as I can. So I need a 3rd partial to work with - and I&amp;#39;ll call it simply &amp;quot;production.jade&amp;quot;: &lt;/p&gt;

&lt;p&gt;&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.30.40-AM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.30.40-AM.png" alt="" title="Screen Shot 2012-03-22 at 11.30.40 AM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Things are really starting to take shape. I have my views, my partials, some client script and an updated API. Let&amp;#39;s make it work.&lt;/p&gt;

&lt;h2&gt;Hooking It All Up&lt;/h2&gt;

&lt;p&gt;Back on the index view (my home page) I need to render out the partials, as well as make sure that I&amp;#39;m calling the API and loading up my Tekpub client object with the API data. Might seem like a lot - but my view is exceedingly light. LOVE IT:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.33.11-AM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.33.11-AM.png" alt="" title="Screen Shot 2012-03-22 at 11.33.11 AM"&gt;&lt;/a&gt;I have to say - that was pretty easy and took me about 2 hours to stitch together. &lt;/p&gt;

&lt;p&gt;Have a look:
&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.34.12-AM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-22-at-11.34.12-AM.png" alt="" title="Screen Shot 2012-03-22 at 11.34.12 AM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Thoughts&lt;/h2&gt;

&lt;p&gt;I always look for a time during an &amp;quot;exploration process/spike&amp;quot; where things start to flow and make sense. This was one of those times. The lightness of the code (in my eyes) and the way I was able to hand off small chunks of process and layout - it really felt good to me.&lt;/p&gt;

&lt;p&gt;One thing in particular that I wanted to dive into was using CoffeeScript alongside Javascript to actively build something out. Specifically I wanted to see if the negative things were actually negative things. I did get tripped up a bit once or twice - but in the end, reading the Tekpub class code above was more than compelling for me.&lt;/p&gt;

&lt;p&gt;I like the aesthetics of it. Then again, I also like Ruby. What do you think?&lt;/p&gt;

&lt;p&gt;Also, as I was building this out I was starting to see the divide between what Backbone can handle, and what I don&amp;#39;t need Backbone for. Simple presentation like this - I don&amp;#39;t need Backbone for. However when it comes to adding things to an Invoice, switching the view around for previews/downloads and purchases - yeah Backbone will work great.That comes next.&lt;/p&gt;
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=J13sJ3-ZkKE:ZxvvJeNR8a4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=J13sJ3-ZkKE:ZxvvJeNR8a4:Q8R26LmAkSY"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=J13sJ3-ZkKE:ZxvvJeNR8a4:Q8R26LmAkSY" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=J13sJ3-ZkKE:ZxvvJeNR8a4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=J13sJ3-ZkKE:ZxvvJeNR8a4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=J13sJ3-ZkKE:ZxvvJeNR8a4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=J13sJ3-ZkKE:ZxvvJeNR8a4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/wekeroad/EeKc/~4/J13sJ3-ZkKE" height="1" width="1"/&gt;</content>
    <published>2012-03-22T10:00:00-05:00</published>
    <updated>2012-03-22T10:00:00-05:00</updated>
  <feedburner:origLink>http://wekeroad.com/2012/03/22/alt-tekpub-working-more-with-the-hypermedia-style-api</feedburner:origLink></entry>
  <entry>
    <title>CoffeeScript or Straight Up Javascript? It's Decision Time</title>
    <author>
      <name>Rob Conery</name>
      <uri>http://wekeroad.com</uri>
    </author>
    <link type="text/html" rel="alternate" href="http://feedproxy.google.com/~r/wekeroad/EeKc/~3/D0sTNEhyHxU/coffeescript-or-straight-up-js-i-suck-either-way" />
    <id>tag:wekeroad.com,2012-03-21:/2012/03/21/coffeescript-or-straight-up-js-i-suck-either-way</id>
    <content type="html">&lt;p&gt;One of the perils of riding blind into the Wild West of Web Programming: Everyone has an opinion on what you should do. What tool you should use, what language you need to flex. It's almost as if they don't want you here...&lt;/p&gt;&lt;p&gt;&lt;img src='http://wekeroad.com/wp-content/uploads/2012/03/onceuponatime2.jpeg'/&gt;&lt;/p&gt;&lt;p&gt;&lt;h2&gt;Decision Time&lt;/h2&gt;

&lt;p&gt;Up to now I&amp;#39;ve been using &lt;a href="http://coffeescript.org"&gt;CoffeeScript&lt;/a&gt; mainly for my tests - such as they are. I find it highly descriptive and easy to read: a must when reviewing a test suite. This instantly brings up two questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;If it&amp;#39;s so readable and descriptive, shouldn&amp;#39;t you be using it always? Javascript is offensive.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;It&amp;#39;s sad that you think Javascript isn&amp;#39;t readable. Do you code often?&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I&amp;#39;ve had equally passionate, stubborn, smart, friendly, and overall lovely devs hit me from either side of the CoffeeScript divide. One friend told me he couldn&amp;#39;t read my test suite unless I used CoffeeScript (&amp;quot;what&amp;#39;s with the noise dude?&amp;quot;) and another ask me if it&amp;#39;s possible to see the generated JS so he &amp;quot;could read it with some level of sanity&amp;quot;.&lt;/p&gt;

&lt;p&gt;I want to reiterate this: both of these guys are well known, super-smart developers as opposed to the thrash/bash crowd on Reddit or HN. These are my friends. Each is suggesting (strongly) I should &amp;quot;choose a side and grab a pistol&amp;quot;.&lt;/p&gt;

&lt;p&gt;I&amp;#39;m leaning towards that. It doesn&amp;#39;t make sense to have both - I want to pick one and move on...&lt;/p&gt;

&lt;h2&gt;They Keep Pulling Me Back In&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;I&amp;#39;ve tried to avoid this decision&lt;/strong&gt; because, frankly, I think it&amp;#39;s overheated and runs the risk of derailing my entire effort here. &lt;/p&gt;

&lt;p&gt;Consider: If I choose to go 100% with CoffeeScript, the hard-core JS crowd will ... be the hard-core JS crowd and dismiss the efforts thus. If I go with pure Javascript I&amp;#39;ll end up writing (overall) more code - if only for the lack of syntactic niceties from CoffeeScript - as well as alienating the folks who&amp;#39;ve come to heavily prefer CoffeeScript.&lt;/p&gt;

&lt;p&gt;And no - these aren&amp;#39;t people who are afraid of anything - they are some of the smartest people I know.This is about the time where I&amp;#39;m reminded:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;CoffeeScript is just Javascript. Get over it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Cheers - consider me the Cow jumping over your condescending Moon. CoffeeScript &lt;em&gt;is&lt;/em&gt; Javascript - except that it&amp;#39;s not. It&amp;#39;s CoffeeScript. It &lt;strong&gt;becomes Javascript&lt;/strong&gt; and I&amp;#39;m well aware of that. Pedantry aside, let&amp;#39;s move on.&lt;/p&gt;

&lt;p&gt;The only way to intelligently ponder this issue is to distill the rhetoric and see if there&amp;#39;s something compelling that I can ... drizzle with my experience. Let&amp;#39;s do it.&lt;/p&gt;

&lt;h2&gt;CoffeeScript Sucks&lt;/h2&gt;

&lt;p&gt;This seems to be &lt;a href="http://ryanflorence.com/2011/2012/case-against-coffeescript/"&gt;the canonical rebuttal against the use of CoffeeScript&lt;/a&gt;. I appreciate the author&amp;#39;s candor and detailed approach to what he sees as a shortcoming in CoffeeScript. Let&amp;#39;s see if I can work this down to something croonable.&lt;/p&gt;

&lt;h3&gt;Debugging.&lt;/h3&gt;

&lt;p&gt;The author points out that debugging a problem involves looking at the compiled JS and then stepping back into CoffeeScript to see where you messed up. This is a reasonable point: by using CoffeeScript you&amp;#39;ve just added syntactic complexity to your application: You could have a CoffeeScript error during CoffeeScript compilation that you need to solve. This, by definition, wouldn&amp;#39;t happen if you weren&amp;#39;t using CoffeeScript.&lt;/p&gt;

&lt;p&gt;You could have a logic error you need to figure out, and now you&amp;#39;re climbing through 2 stacks instead of 1. If you&amp;#39;re working in the browser this can be an issue, to be sure - you&amp;#39;ll have to debug the generated JS, not the CoffeeScript. If you&amp;#39;re working in NodeJS (which understands CoffeeScript) - you can get &amp;quot;odd&amp;quot; error messages returned that lack syntactic guides as to where the problem is. Not a very big issue - but it slows down the overall development process.&lt;/p&gt;

&lt;p&gt;Believe it or not - this problem is seen mostly in testing. It takes some time to get the hang of writing CoffeeScript tests and understanding the output if there&amp;#39;s an error. Sometimes it&amp;#39;s helpful - other times it&amp;#39;s simply not. For instance - it&amp;#39;s all too common a mistake to use a &amp;quot;&lt;strong&gt;var&lt;/strong&gt;&amp;quot; keyword when declaring a variable in CoffeeScript. This kind of thing is pounded into your head when writing Javascript to avoid global naming issues.&lt;/p&gt;

&lt;p&gt;Consider this code here (a mocha test):&lt;/p&gt;

&lt;p&gt;&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-20-at-3.06.09-PM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-20-at-3.06.09-PM.png" alt="" title="Screen Shot 2012-03-20 at 3.06.09 PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I run this, I receive an error:&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/cs_error.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/cs_error.png" alt="" title="cs_error"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Word is not defined? Of course it&amp;#39;s defined! It&amp;#39;s VAR dude!&lt;/strong&gt; Oh right - there is no var is CoffeeScript! &lt;/p&gt;

&lt;p&gt;Sure would be nice if the error message said that. And yes - it&amp;#39;s a bit of a nit, to be sure. But when you read this output when running a test - wouldn&amp;#39;t your first inclination be to check your code under test to see if there&amp;#39;s a problem?&lt;/p&gt;

&lt;p&gt;Notice that I have no line numbers here. I do have a file reference which works - but it&amp;#39;s not nearly as clear as the same kind of output from Mocha if you have an error in straight-up Javascript.&lt;/p&gt;

&lt;p&gt;This kind of thing slows you down a touch, and it does happen. I don&amp;#39;t like going slower.&lt;/p&gt;

&lt;h3&gt;Readability != Comprehension&lt;/h3&gt;

&lt;p&gt;One point that&amp;#39;s majorly in CoffeeScript&amp;#39;s corner is the ability to read quickly what the code is trying to do. This is especially hard in Javascript given the event loop and asynchronous structures the language leans on. &lt;a href="http://encosia.com"&gt;Yes, if you&amp;#39;re Batman you can read Javascript&lt;/a&gt; quickly and surmise the code&amp;#39;s purpose. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But that&amp;#39;s reading code - and it&amp;#39;s quite different than &amp;quot;readable code&amp;quot; as dumb as that might sound.&lt;/strong&gt; In the Ruby community, Rubyists will thrash themselves to make a chunk of code aesthetically pleasing as well as immediately &amp;quot;grokkable&amp;quot;. This is the goal of the language, and I find it to be amazingly compelling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;C-based languages were written to be understood by machines, not humans&lt;/strong&gt;, so there&amp;#39;s a gap there. But let&amp;#39;s get back to the point: is CoffeeScript more comprehendable than Javascript?&lt;/p&gt;

&lt;p&gt;This is an excerpt &lt;a href="http://ryanflorence.com/2011/2012/case-against-coffeescript/"&gt;from Ryan Florence&amp;#39;s blog&lt;/a&gt; (it&amp;#39;s beautifully laid out btw):&lt;a href="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-20-at-3.16.42-PM.png"&gt;&lt;img src="http://wekeroad.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-20-at-3.16.42-PM.png" alt="" title="Screen Shot 2012-03-20 at 3.16.42 PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My takeaway from this is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you like C-based languages and you know Javascript deeply enough that glyphs make sense and you don&amp;#39;t mind extra punctuation, use Javascript.But...
Use CoffeeScript if you&amp;#39;re averse to C structures and glyphs add noise to your code and you don&amp;#39;t want extra code in your code for doing mundane stuff.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Remember, we&amp;#39;re talking comprehension here, not syntax excitement. Which sentence sat happier in your brain? If we&amp;#39;re going to get literal on comprehending editorial intent: it&amp;#39;s a hard and fast rule that you start with a premise and build on it. That&amp;#39;s writing 101 (and speaking 101 for that matter): lead with the punchline (or abstract) and then make your case.That&amp;#39;s what CoffeeScript favors. But this is a small, silly example anyway. &lt;/p&gt;

&lt;p&gt;Throw in the function() keywords a few times with some braces, parens and semi-colon eye-stabbery, then we can talk about &amp;quot;comprehension&amp;quot;.&lt;/p&gt;

&lt;p&gt;Overall I find this latter point a bit weak - yet it is a point: if you know/like/love C-structure, then Javascript is your buddy.&lt;/p&gt;

&lt;p&gt;The rest of Ryan&amp;#39;s post amounts to arm-waving about &amp;quot;what others might do&amp;quot; and how CoffeeScript allows you to shoot yourself in the foot if you point a gun at your foot and pull the trigger. Not terribly convincing stuff. Let&amp;#39;s move on to Javascript.&lt;/p&gt;

&lt;h3&gt;You&amp;#39;re Stuck If You Don&amp;#39;t Know Javascript.&lt;/h3&gt;

&lt;p&gt;This is more my thought then Ryan&amp;#39;s (and is common knowledge as well) - but I&amp;#39;ll throw it in: &lt;strong&gt;if you don&amp;#39;t know Javascript and you use CoffeeScript... you&amp;#39;re in for trouble&lt;/strong&gt;. This probably means you were weaned on Ruby/Python and you&amp;#39;re hoping CoffeeScript will shield you.&lt;/p&gt;

&lt;p&gt;This is a bad choice. If you don&amp;#39;t understand the thrash-fest that is Javascript not defensively-written, you&amp;#39;ll be in for a nightmare. It&amp;#39;s true that CoffeeScript shields you from a lot of Javascript&amp;#39;s warts - but you really need to understand those warts (and what you&amp;#39;re avoiding) should you ever get backed into a corner.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thinking logically - if you need to know Javascript in order to use CoffeeScript - why use CoffeeScript at all?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That, to me, is a very very compelling question. I can get over the code noise, and I can figure out the good patterns - so &lt;strong&gt;why mess with an interpretor? It seems like extra work for what amounts to syntactic sugar&lt;/strong&gt;... is it really worth it?&lt;/p&gt;

&lt;h2&gt;Javascript Sucks.&lt;/h2&gt;

&lt;p&gt;I come from a C-language background (largely C#) so &lt;strong&gt;braces/punctuation don&amp;#39;t scare me&lt;/strong&gt;. I can scan Javascript quickly and understand most of what&amp;#39;s happening - and I actually find it much more &amp;quot;legible&amp;quot; than CoffeeScript.&lt;/p&gt;

&lt;h3&gt;function()&lt;/h3&gt;

&lt;p&gt;I don&amp;#39;t need to add much to this. I&amp;#39;ve pondered just how much I&amp;#39;ve written the word &amp;quot;function(..)&amp;quot; over the past years - and a thought occurred to me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If I had a nickel for every time I wrote &amp;quot;function()&amp;quot;, I could almost fill the void that is &lt;a href="https://twitter.com/#!/averyj"&gt;Avery&amp;#39;s head&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;(this is a derivation of a joke: &amp;quot;what would you rather have: 1 million dollars or Avery&amp;#39;s head full of nickels&amp;quot; - it&amp;#39;s a tough question).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I don&amp;#39;t mind writing the word, I mind the repetition of it. Javascript is a functional language. As such your write... FUNCTIONS. Having a keyword called &amp;quot;function&amp;quot; seems a bit ridiculous. I&amp;#39;ll get some hate for this - you can write me a little hate function and see how many function keywords you can use.&lt;em&gt;&lt;strong&gt;function()&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Moving on...&lt;/p&gt;

&lt;h3&gt;Aren&amp;#39;t We Trying To Move Forward?&lt;/h3&gt;

&lt;p&gt;I was talking to a friend the other day and he just flat out said it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I don&amp;#39;t get why people like Javascript. It&amp;#39;s a Neon and Acid Wash language&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Again - this is a very smart person with way more experience then me reflecting on how Javascript is a language that&amp;#39;s fascinating on some levels and, frankly, had its day. Many people love it, have come to terms with its existence - do we really need to go there again?&lt;/p&gt;

&lt;p&gt;This opinion, while a tad blunt, isn&amp;#39;t completely without merit. The language has flaws - flaws that are quite glaring and ones that will bite you by default. Global leaks, &lt;a href="http://www.watchmecode.net/javascript-scope"&gt;scoping issues&lt;/a&gt;, &lt;a href="https://www.destroyallsoftware.com/talks/wat"&gt;inconsistencies in comparisons and equality&lt;/a&gt;... this is all well known stuff.&lt;/p&gt;

&lt;p&gt;When I started using Ruby (and Python... for a bit) it was such a fun exploration of what a modern, dynamic language could do. Learning those languages was joyous! Working with Javascript has been ... well a difficult walk down a painful memory lane for me (personally).&lt;/p&gt;

&lt;p&gt;I find myself enjoying Node a lot - Mongo too. It&amp;#39;s really fun to be learning and helping in a growing ecosystem. But... Javascript... it&amp;#39;s so hard for me to look at the code I write and feel the same level of excitement and engagement that I did with Ruby.&lt;/p&gt;

&lt;p&gt;Of course - this is my personal opinion and I know there are good parts (and yes I&amp;#39;ve read Crockford). My point here is that Javascript has a tarnished past. I know people are trying to spread Good Habits and that&amp;#39;s exciting... but it also has its negative aspects.&lt;/p&gt;

&lt;p&gt;There&amp;#39;s a lot of elitism, snottiness, and overall pedantry in the hardcore Javascript crowd. Accidentally write a global variable and put your work out there for all to see... look out.&lt;/p&gt;

&lt;h2&gt;What To Do?&lt;/h2&gt;

&lt;p&gt;I&amp;#39;m on the fence here, but I feel compelled to make a choice. I&amp;#39;m leaning in the CoffeeScript direction because I enjoy the terser syntax and the Ruby aesthetic, but I also know that there will be times when it slows me down.&lt;/p&gt;

&lt;p&gt;I&amp;#39;d love to hear your feedback, but please (as always) provide some reasons I can sink my teeth into and think about. Opinions are welcome too - just try to balance them on things other than links and quotes.I&amp;#39;ll be moderating this thread heavily.&lt;/p&gt;
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=D0sTNEhyHxU:2Yuwniq7Pwg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=D0sTNEhyHxU:2Yuwniq7Pwg:Q8R26LmAkSY"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=D0sTNEhyHxU:2Yuwniq7Pwg:Q8R26LmAkSY" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=D0sTNEhyHxU:2Yuwniq7Pwg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=D0sTNEhyHxU:2Yuwniq7Pwg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/wekeroad/EeKc?a=D0sTNEhyHxU:2Yuwniq7Pwg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/wekeroad/EeKc?i=D0sTNEhyHxU:2Yuwniq7Pwg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/wekeroad/EeKc/~4/D0sTNEhyHxU" height="1" width="1"/&gt;</content>
    <published>2012-03-21T10:00:00-05:00</published>
    <updated>2012-03-21T10:00:00-05:00</updated>
  <feedburner:origLink>http://wekeroad.com/2012/03/21/coffeescript-or-straight-up-js-i-suck-either-way</feedburner:origLink></entry>
</feed><!-- page cached: 2012-25-05 22:30:17 -->

