<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brit Gardner ::: Web Developer ::: Dallas, TX &#187; web development</title>
	<atom:link href="http://britg.com/topics/developer-thoughts/feed/" rel="self" type="application/rss+xml" />
	<link>http://britg.com</link>
	<description>The big yellow one&#039;s the sun.</description>
	<lastBuildDate>Sun, 10 Jan 2010 17:25:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quick Look: WebGL and Web Sockets</title>
		<link>http://britg.com/2010/01/10/quick-look-webgl-and-web-sockets/</link>
		<comments>http://britg.com/2010/01/10/quick-look-webgl-and-web-sockets/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 17:07:11 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[webgl]]></category>
		<category><![CDATA[websockets]]></category>

		<guid isPermaLink="false">http://britg.com/?p=1303</guid>
		<description><![CDATA[The internet is still a very young ecosystem of immature techn&#8230; Woah, the BS meter pegged there for a second.  Forget the pontification, let me just spit out the two technologies that get me excited about billing myself as a Web Developer.
WebGL
This is a new spec that&#8217;s being developed by the Khronos Group (the [...]]]></description>
			<content:encoded><![CDATA[<p><strike>The internet is still a very young ecosystem of immature techn&#8230;</strike> Woah, the BS meter pegged there for a second.  Forget the pontification, let me just spit out the two technologies that get me excited about billing myself as a Web Developer.</p>
<h3>WebGL</h3>
<p>This is a new spec that&#8217;s being developed by the <a href="http://www.khronos.org/webgl/">Khronos Group</a> (the group behind OpenGL) to expose OpenGL to browsers through the canvas element.</p>
<p>Why is it exciting? Three words: <strong>Javascript</strong>. <strong>Hardware</strong>. <strong>Acceleration</strong>.  Damn, I need three more: <strong>In</strong>. <strong>The</strong>. <strong>Browser</strong>.</p>
<p>The concepts should speak for themselves, but if you still need some convincing follow the steps below and be sure to take a look at your CPU usage while running these demos.  (Hint: CPU usage will be very low because you&#8217;re riding your GPU).</p>
<ul>
<li>Grab the latest nighly of Chromium <a href="http://build.chromium.org/buildbot/snapshots/chromium-rel-xp/?C=M;O=D">here</a> if you are not already running it.</li>
<li>Start Chromium via the command line:
<ul>
<li>Windows: <code>chrome.exe --no-sandbox --enable-webgl</code></li>
<li>OSX: <code>Chromium.app/Contents/MacOS/Chromium --no-sandbox --enable-webgl</code></li>
<li>Linux: <code>./chrome --no-sandbox --enable-webgl</code></li>
</ul>
</li>
<li>Follow <a href="http://hacks.mozilla.org/2009/09/three-more-webgl-demos/">this link</a> to some examples of WebGL in action.</li>
</ul>
<p>Again, check your CPU usage while running the demos. It should be very low (if you have a GPU) as the demos should be hardware accelerated.</p>
<h3>Web Sockets</h3>
<p>Comet? Long-Polling? Forever Frame? In two years we will all be sitting around a trash barrel fire laughing about the days of yore when we had to use such hacks. </p>
<p>Why are we huddled around a trash barrel fire? Because it&#8217;s post-apocolyptic New Zealand, the last bastion of humanity. Anyways, that&#8217;s another &#8220;In This Decade&#8221; blog post&#8230;</p>
<p>From <a href="http://www.websockets.org/">websockets.org</a>:</p>
<blockquote><p>[The Web Socket Interface] defines a full-duplex communications channel that operates over a single socket and is exposed via a JavaScript interface in compliant browsers</p></blockquote>
<p>Here&#8217;s the <a href="http://www.w3.org/TR/2009/WD-websockets-20091222/">spec</a> in case you want to read it&#8230; haha, me neither.</p>
<p>Again, the concept here should speak for itself.  Two-way communication with web servers in an easy-to-use interface.</p>
<pre class="brush: jscript;">

var websock = new WebSocket(&quot;ws://www.websocket.org&quot;);

websock.onopen = function(evt) {
  console.log(evt)
  websock.send(&quot;Hello Web Socket!&quot;);
};
websock.onmessage = function(evt) {
  console.log(evt)
};
websock.onclose = function(evt) {
  console.log(evt)
};
websock.close();
</pre>
<p>Fortunately, there are already many projects implementing the web sockets protocol.  To name a few,</p>
<ul>
<li><a href="http://github.com/guille/node.websocket.js/">node.websocket.js</a></li>
<li><a href="http://github.com/igrigorik/em-websocket">em-websocket (Ruby)</a></li>
<li><a href="http://code.google.com/p/pywebsocket/">pywebsocket</a></li>
</ul>
<p>One thing to note is that the web socket protocol will adhere to the cross-domain security restriction that XHR has.  The good news is it will ship with support for server-side origin discretion using the same Origin headers in <a href="http://britg.com/2009/12/02/cross-origin-resource-sharing/">CORS</a>.</p>
<h3>It&#8217;s all about the gaming, stupid</h3>
<p>I&#8217;m going to predict that in 2 years, we will see current A quality games developed in-browser ontop of these two technologies.  Don&#8217;t get me wrong, AAA quality console and PC titles won&#8217;t be disrupted like the music and print industries any time soon.  But, the &#8220;casual&#8221; label on browser games will go away.</p>
<p>This is what has me really excited about being a web developer in this decade.  Parity with desktop development is inching closer, and all ontop of open technologies.</p>
<p>No plugins.  No corporate owner.</p>
<p>Win. Win.</p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2010/01/10/quick-look-webgl-and-web-sockets/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Cross Origin Resource Sharing with Sinatra</title>
		<link>http://britg.com/2009/12/29/cross-origin-resource-sharing-with-sinatra/</link>
		<comments>http://britg.com/2009/12/29/cross-origin-resource-sharing-with-sinatra/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 15:46:45 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[cors]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://britg.com/?p=1282</guid>
		<description><![CDATA[It&#8217;s no lie that I think highly of the potential of Cross Origin Resource Sharing.  One of the great things about it is that it doesn&#8217;t take much re-wiring of existing server (or client-side) apps to start working cross domain.
Enabling your server app is as simple as including a few extra headers when you [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s no lie that <a href="http://britg.com/2009/12/02/cross-origin-resource-sharing/">I think highly</a> of the potential of Cross Origin Resource Sharing.  One of the great things about it is that it doesn&#8217;t take much re-wiring of existing server (or client-side) apps to start working cross domain.</p>
<p>Enabling your server app is as simple as including a few extra headers when you detect a cross origin request.  How do you know it&#8217;s a cross origin request?  You&#8217;ll see the <code>Origin:</code> header &#8212; all CORS requests will have it.  From there, response headers depend on the specifics of the request, but I won&#8217;t go over those here &#8212; check out the <a href="https://developer.mozilla.org/En/HTTP_access_control">Mozilla Developer Center treatment</a> for in-depth information.</p>
<p>I&#8217;ve been working with Sinatra a lot lately, so I put together <a href="http://github.com/britg/sinatra-cross_origin">an extension for Sinatra</a> that makes enabling Cross Origin requests even easier.</p>
<p><code>sudo gem install sinatra-cross_origin</code></p>
<p>There are two ways to use the extension: globally or per-route.</p>
<h3>Global</h3>
<p>For when you want to share all your endpoints cross-domain.</p>
<pre class="brush: ruby;">

require 'sinatra/base'
require 'sinatra/cross_origin'

class MyApp &lt; Sinatra::Base
  register Sinatra::CrossOrigin

  enable cross_origin

  get '/' do
    &quot;This is available to cross domain javascript requests automatically&quot;
  end
end
</pre>
<h3>Per Route</h3>
<p>For when you want to share only some of your routes cross-domain.</p>
<pre class="brush: ruby;">

require 'sinatra/base'
require 'sinatra/cross_origin'

class MyApp &lt; Sinatra::Base
  register Sinatra::CrossOrigin

  get '/' do
    cross_origin
    &quot;This is available to cross domain javascript requests&quot;
  end
end
</pre>
<h3>Configuration</h3>
<p>You can mix and match app-wide config and request specific config.</p>
<pre class="brush: ruby;">

require 'sinatra/base'
require 'sinatra/cross_origin'

class MyApp &lt; Sinatra::Base
  register Sinatra::CrossOrigin

  configure do
    # Comma separate list of remote hosts that are allowed.
    # :any will allow any host
    set :allow_origin, :any

    # HTTP methods allowed
    set :allow_methods, [:get, :post]

    # Allow cookies to be sent with the requests
    set :allow_credentials, true
  end

  get '/' do
    # Only available to GET requests originating from
    # http://example.com.  No cookies allowed.
    cross_origin :allow_origin =&gt; 'http://example.com',
      :allow_methods =&gt; [:get],
      :allow_credentials =&gt; false
    &quot;This is available to cross domain javascripts&quot;
  end
end
</pre>
<p>Grab the source at Github: <a href="http://github.com/britg/sinatra-cross_origin">britg/sinatra-cross_origin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2009/12/29/cross-origin-resource-sharing-with-sinatra/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scriptstack &#8211; Organize and Share Javascripts</title>
		<link>http://britg.com/2009/12/17/scriptstack-organize-and-share-javascripts/</link>
		<comments>http://britg.com/2009/12/17/scriptstack-organize-and-share-javascripts/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 05:11:57 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://britg.com/?p=1263</guid>
		<description><![CDATA[I&#8217;ve been hacking on a small project in my free time that I uploaded today: scriptstack.
What is scriptstack?
Well, if you&#8217;re like me you probably have 4 or 5 javascript files you include in just about every new project or site your start.  jQuery.  Tooltips.  Lightbox. qTip. Or, you just put together a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://scriptstack.com"><img src="http://britg.com/blog/wp-content/uploads/2009/12/scriptstack.png" alt="scriptstack" title="scriptstack" width="163" height="36" class="alignright size-full wp-image-1266" /></a>I&#8217;ve been hacking on a small project in my free time that I uploaded today: <a href="http://scriptstack.com">scriptstack</a>.</p>
<h3>What is scriptstack?</h3>
<p>Well, if you&#8217;re like me you probably have 4 or 5 javascript files you include in just about every new project or site your start.  jQuery.  Tooltips.  Lightbox. <a href="http://britg.com/2009/12/06/qtip-jquery-tooltip-plugin-with-excellent-docs/">qTip</a>. Or, you just put together a nice portfolio site for a client and you want to save that specific set of javascript plugins for the next time you do something similar.</p>
<p>Scriptstack aims to be an easy and social way to organize your &#8220;stacks&#8221; of scripts.  You can:</p>
<ul>
<li>Upload scripts.</li>
<li>Click and drag them into the order they should be loaded in the browser.</li>
<li>Tag them with a few keywords to make them indexable for future search.</li>
<li>Download the concatenated stack in minified or raw format.</li>
</ul>
<p>That&#8217;s about it for now, haha. Release early, release often, right?  I should note that there&#8217;s no permissions on the stacks.  If you create one, it&#8217;s editable by anyone right now.  I plan to add User accounts and ownership soon.</p>
<p><strong>Warning:</strong> the site probably only works in Firefox.</p>
<h3>Under the hood</h3>
<p>I took this opportunity to expand my horizons as far as the technology under the hood.  I&#8217;ll go in-depth on these as I continue to develop, but a quick rundown of the tech stack (<em>pun intended but probably shouldn&#8217;t be</em>):</p>
<ul>
<li><a href="http://mongodb.org">MongoDB</a> (via <a href="http://mongohq.com">MongoHQ</a>)</li>
<li><a href="http://github.com/jnunemaker/mongomapper">MongoMapper</a></li>
<li><a href="http://heroku.com">Heroku</a></li>
<li><a href="http://sinatrarb.com">Sinatra</a></li>
<li><a href="http://haml-lang.com">Haml</a></li>
<li><a href="http://compass-style.org/">Compass</a></li>
</ul>
<p>I also open sourced all the code that runs the site <a href="http://github.com/britg/scriptstack">here</a> incase you are interested in what poorly written Ruby looks like.</p>
<p>If you happen to check it out, let me know what you think!  And as I said, I will expand on different parts of it here in the near future, so stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2009/12/17/scriptstack-organize-and-share-javascripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On Stack Overflow Careers</title>
		<link>http://britg.com/2009/12/10/on-stack-overflow-careers/</link>
		<comments>http://britg.com/2009/12/10/on-stack-overflow-careers/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 16:02:21 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[stackoverflow]]></category>

		<guid isPermaLink="false">http://britg.com/?p=1198</guid>
		<description><![CDATA[With Stack Overflow, I am a consumer not a contributor. Should I make an effort to participate and will that give me an advantage as a freelance developer when looking for work?]]></description>
			<content:encoded><![CDATA[<p><em>If you&#8217;re not familiar with Stack Overflow Careers, check out <a href="http://blog.stackoverflow.com/2009/10/introducing-stack-overflow-careers/">Introducing Stack Overflow Careers</a> and <a href="http://www.codinghorror.com/blog/archives/001308.html">Stack Overflow Careers: Amplifying Your Awesome</a>.</em></p>
<p><em>In short, it aims to build a for-pay CV hosting and searching service on top of the success of Stack Overflow.</em></p>
<p><a href="http://stackoverflow.com"><img src="http://britg.com/blog/wp-content/uploads/2009/12/stackoverflow.png" alt="stackoverflow" title="stackoverflow" width="250" height="61" class="alignleft size-full wp-image-1204" style="border:0;" /></a> I have mixed feelings about Stack Overflow Careers.</p>
<p>No, I&#8217;m not questioning whether or not they should have built it, or whether or not they should charge money for it.  I have no problem with Joel or Jeff using their interweb fame to make a buck <a href="http://www.cforcoding.com/2009/12/joel-inc-stackoverflow-careers-and.html">like this guy</a> seems to (<em style="color:#777; font-size:90%;"><strong>Clarification:</strong> William&#8217;s beef isn&#8217;t with the for-pay aspect, but with the underlying system itself.  See first comment.</em>).  If they want to, they should.</p>
<p>America++!  </p>
<p>My quandary is whether I should make an effort to participate in Stack Overflow and Careers. I like the site and use it daily, but I don&#8217;t actually participate.  I am a consumer, not a contributor. Should I eschew my natural introverted tendencies and force myself to contribute?</p>
<h4>Maybe</h4>
<p>The Stack Overflow group of programmers seem to &#8220;get it.&#8221;  On the whole they are smart, pragmatic, and can communicate in complete sentences (<em>skills listed in reverse order of importance</em>).  </p>
<p>As a freelance programmer, I would like to be attributed with those qualities when looking for work.  That&#8217;s the true value in associating a job search with Stack Overflow and is the reason why they can charge programmers to list their CV.  If you&#8217;re recognized as a member of that community, you&#8217;re much more valuable to job searchers that are Stack Overflow-aware.</p>
<p>Maybe there&#8217;s some value in participating in the site and quantifying my association with the Stack Overflow type of programmer?</p>
<h4>Nah</h4>
<p>But, ultimately what am I trying to accomplish?  Sure, I want to be known as a competent and gets-stuff-done kind of programmer.  Stack Overflow is an avenue to <em>quantify</em> that I have these skills; it isn&#8217;t the method by which these skills are obtained.</p>
<p>Joel Spolsky himself <a href="http://www.joelonsoftware.com/articles/FindingGreatDevelopers.html">said</a>,</p>
<blockquote><p>The great software developers, indeed, the best people in every field, are quite simply never on the market.</p></blockquote>
<p>He goes on to explain that if you&#8217;re a great developer, you&#8217;ll be recognized as such through your work.  </p>
<p>I think this says it all. I shouldn&#8217;t force myself to participate in a contrived system attempting to quantify competence.  Don&#8217;t get me wrong, if you enjoy interacting and contributing to Stack Overflow, more power to you!  But for me, if I&#8217;m doing the right things to further myself as a developer, the rest will take care of itself.  More do-ey, less talk-ey.</p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2009/12/10/on-stack-overflow-careers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
