<?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>explosive web programming w/ j_blotus</title>
	<atom:link href="http://www.jblotus.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jblotus.com</link>
	<description>modern code tactics</description>
	<lastBuildDate>Thu, 14 Feb 2013 04:25:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Slides: Simply Scale w/ Nginx, PHP-FPM, Memcached + APC @ SoFlo PHP</title>
		<link>http://www.jblotus.com/2013/02/14/slides-simply-scale-w-nginx-php-fpm-memcached-apc-soflo-php/</link>
		<comments>http://www.jblotus.com/2013/02/14/slides-simply-scale-w-nginx-php-fpm-memcached-apc-soflo-php/#comments</comments>
		<pubDate>Thu, 14 Feb 2013 04:24:29 +0000</pubDate>
		<dc:creator>jblotus</dc:creator>
				<category><![CDATA[nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Scaling]]></category>
		<category><![CDATA[Slides]]></category>
		<category><![CDATA[Web Development / Programming]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[new relic]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-fpm]]></category>
		<category><![CDATA[scaling]]></category>

		<guid isPermaLink="false">http://www.jblotus.com/?p=1159</guid>
		<description><![CDATA[<p>This is a talk I gave at the <a href="http://www.soflophp.org/events/34360482/">South Florida PHP Users Group about Nginx</a>, PHP-FPM, Memcached, identifying bottlenecks and other topics related to website performance.<br /> <a href="http://www.slideshare.net/jblotus/nginx-pres" title="Nginx pres" target="_blank">Nginx pres</a> from <a href="http://www.slideshare.net/jblotus" target="_blank">James Fuller</a>]]></description>
				<content:encoded><![CDATA[<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/02/14/slides-simply-scale-w-nginx-php-fpm-memcached-apc-soflo-php/"></g:plusone></div><p>This is a talk I gave at the <a href="http://www.soflophp.org/events/34360482/">South Florida PHP Users Group about Nginx</a>, PHP-FPM, Memcached, identifying bottlenecks and other topics related to website performance.<br />
<iframe src="http://www.slideshare.net/slideshow/embed_code/16518499" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>
<div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/jblotus/nginx-pres" title="Nginx pres" target="_blank">Nginx pres</a> </strong> from <strong><a href="http://www.slideshare.net/jblotus" target="_blank">James Fuller</a></strong> </div>
<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/02/14/slides-simply-scale-w-nginx-php-fpm-memcached-apc-soflo-php/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.jblotus.com/2013/02/14/slides-simply-scale-w-nginx-php-fpm-memcached-apc-soflo-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simply scale with Nginx, Memcached, PHP-FPM and APC</title>
		<link>http://www.jblotus.com/2013/02/01/simply-scale-with-nginx-memcached-php-fpm-and-apc/</link>
		<comments>http://www.jblotus.com/2013/02/01/simply-scale-with-nginx-memcached-php-fpm-and-apc/#comments</comments>
		<pubDate>Fri, 01 Feb 2013 15:27:49 +0000</pubDate>
		<dc:creator>jblotus</dc:creator>
				<category><![CDATA[Caching]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scaling]]></category>
		<category><![CDATA[Web Development / Programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-fpm]]></category>
		<category><![CDATA[scaling]]></category>
		<category><![CDATA[web servers]]></category>

		<guid isPermaLink="false">http://www.jblotus.com/?p=1119</guid>
		<description><![CDATA[<p>When I started programming in PHP, my hosting setup involved a cPanel installation with Apache and MySQL. This has been the de facto standard for many PHP developers and for the most part I don&#8217;t think any of that needs to change. I simply never had to deal with websites that got more than 10,000 [...]]]></description>
				<content:encoded><![CDATA[<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/02/01/simply-scale-with-nginx-memcached-php-fpm-and-apc/"></g:plusone></div><p>When I started programming in PHP, my hosting setup involved a cPanel installation with Apache and MySQL. This has been the de facto standard for many PHP developers and for the most part I don&#8217;t think any of that needs to change. I simply never had to deal with websites that got more than 10,000 visits a day. This all changed when I started work at my current job a few years ago. We sell an educational product that serves a predictable 15,000 requests per minute for 10+ hours/day, every day. Instead of Apache, we use nginx with <a href="http://www.php.net/manual/en/install.fpm.php">PHP-FPM</a> to handle this traffic. This is becoming a very popular setup for many companies with non-trivial traffic, but I have also found success with it in my small <a href="http://www.linode.com/?r=8ab874aa33b39b129030c8e53132a9d5ce87a06f">256MB Ram VPS</a>. For various reasons, nginx does a better job with memory and concurrent connection handling than Apache. In this post, I want to talk about some of the reasons you might want to go with this setup.</p>
<p><span id="more-1119"></span></p>
<h3>I/O is slow</h3>
<p>CPU&#8217;s are fast.<a href="http://en.wikipedia.org/wiki/CPU_cache"> L1 cache and L2 cache is the nuts</a>. Next in line, you want to live in RAM. Since we can&#8217;t fit everything into CPU cache or RAM, we end up going with some sort of disk. You could go SSD, but most systems are some type of spinning platter hard drive. RAID and disk cache speeds it up, but eventually things like fragmentation and load slow down access speeds. We also have swap situations which murder our performance, when the OS has to dump memory to disk to fill it up with new things constantly, and shuffle between them (overburden). Then you have things like network access, which in some cases is faster than disk depending on what they do. One example of that is memcached. If you save processing on a database server that might need to analyze millions of records by pulling the results directly out of memory, you have created huge efficiency gains.</p>
<h3>Nginx is also a win for efficiency</h3>
<p>Nginx is low-profile, event-driven web server that excels at serving multiple clients due to it&#8217;s asynchronous nature. Here a few ways that people commonly use nginx:</p>
<ul>
<li>reverse proxy for Apache</li>
<li>primary web server</li>
<li>reverse proxy for php-fpm</li>
</ul>
<h4>So what is a reverse proxy?</h4>
<p>It&#8217;s basically a program that sits in front of other servers in your stack. A request comes in to nginx and it will be forwarded along to other machines. This could be used to load-balance your application servers, perhaps running Apache with mod_php. To understand why we would want to do that we need to understand a bit about how nginx handles connections and resource usage compared to Apache.</p>
<p>Some reasons Apache has problems under load:</p>
<ul>
<li>Apache holds connections open until they complete</li>
<li>Those connections use a thread, and each thread loads all Apache modules</li>
<li>These Apache threads suck up memory and slow down other threads</li>
<li>High memory usage leads the operating system into swap</li>
<li>Swap means that memory has to be dumped to the hard-drive temporarily</li>
<li>Hard drives are slow, remember?</li>
<li>Performance degrades across the entire machine</li>
<li>Most of the time Apache spends in a thread is simply waiting, waiting, waiting</li>
</ul>
<p>When Apache handles a web request, typically all the modules Apache needs are loaded to handle that connection, e.g. mod_php. This is not really a desirable thing when you are serving static assets like images, JavaScript or css. The reason it is not desirable is that for every connection, Apache forks a new process to handle it (with prefork the default method). This leads to a few problems: more processes = more memory and CPU  Remember that Apache is loading all its modules for each request, so there is a lot of waste here. For a single web page request, you might pull in a ton of assets, meaning Apache has to create a process for each one, and holds the process until the response has been delivered back to the client. This can quickly get out of hand and if the problem is not addressed via some caching layer like varnish, the machine will start utilizing all available memory and go into swap. Swap is bad because we are shuffling things back and forth from disk to memory.</p>
<p>You can tweak Apache to use worker mpm instead of prefork, which changes the way apache runs to more efficiently handle this problem, but then we get into an issue of thread safety. I don&#8217;t think most programmers want to be concerned about threads in general and PHP has a reputation for not being entirely thread safe to begin with.</p>
<h3>So what does Nginx do differently compared to Apache?</h3>
<ul>
<li>nginx uses a set number of &#8220;workers&#8221; (Apache 2.4 has something similar now) and those workers utilize a predictable number of threads.</li>
<li>when a request is received, the response is asynchronous so the thread won&#8217;t stay open until it has something to do. When the web server has a response ready it will be sent back to the client.</li>
<li>This is called &#8220;never block, finish fast&#8221;. Think of an event loop in JavaScript.</li>
<li>Most static assets are buffered to memory so they get served very fast</li>
</ul>
<p>Nginx handles this problem by using the Reactor pattern, which is another way of saying it is event driven. When a request comes in, nginx passes it off to the appropriate handler, but it does not hold a process or thread open waiting for the response! Only when the response is ready does nginx send it back to the client. Nginx also buffers static files to memory for increased performance, meaning that the hard disk doesn&#8217;t have to be touched for some requests. I would argue the majority of requests against a web server are for static assets.</p>
<p>Now if you run nginx in front of Apache then you are essentially keeping Apache busier and it doesn&#8217;t have to waste time dealing with asset delivery to the client, thereby leading to more efficient memory usage since less connections have to be maintained as threads/processes. This can be a very effective strategy if you don&#8217;t want to completely replace apache in your stack. Nginx does this via proxy pass.</p>
<p>Ditching Apache might not be possible for you, especially if you are doing any sort of client hosting, since we lose the convenience of htaccess files. By the way, htaccess files are another performance killer for apache stacks since the file system has to be checked often (starting to see a theme here? file system is slow). If you have AllowOverride enabled, Apache also tries to read any .htaccess files before serving a page, which is another hook into the file system to degrade performance.</p>
<p>I forego Apache entirely, but we still need a way to handle PHP requests. Nginx does not have a PHP &#8220;module&#8221; like Apache does. Instead we use the FASTCGI protocol to send requests to a program called PHP-FPM.</p>
<h4>But wait, what is FastCGI?</h4>
<p><a href="http://en.wikipedia.org/wiki/FastCGI">FastCGI</a> is just a common protocol for web servers to talk to other programs.</p>
<h3>Is PHP-FPM just mod_php without Apache?</h3>
<p>PHP-FPM is a daemon that listens on a port or socket for php requests and it uses a similar worker setup to nginx, in that a main daemon controls several worker threads when FastCGI requests come in. You have a fixed or variable number of &#8220;workers&#8221; that can execute the PHP code and return a response back upstream to whatever requested it, typically the webserver. People often compare PHP-FPM to mod_php without Apache. That&#8217;s not really fair because Apache can also use PHP-FPM instead of mod_php via the FASTCGI protocol.</p>
<p>One advantage of PHP-FPM is that it can run as a seperate user than the web server  This is a win for security since exploits that affect the webserver or php itself are isolated from eachother. Another nice thing about PHP-FPM is that you can reload and restart it without having to touch the web server  and vice-versa. That means that if you upgrade or reconfigure your web server or PHP you don&#8217;t have to restart the whole shebang.</p>
<p>At the end of the day, PHP-FPM is just another way to use the same language you know and love.</p>
<h3>Memcached</h3>
<p>To increase our performance even more, we want to start caching expensive things that our application server needs to do. At work we use a master-slave MySQL setup and generally try to pull reads from our read-only database. This is great for spreading the load, but we also want to be caching database query results whenever possible. In fact, most of the bottlenecks you will run into when trying to scale is the database itself. Tuning queries and indexing are very important, but caching is also something that you should look into. Even lot&#8217;s of small queries can add up and it is much harder to scale out a MySQL database than to add extra memcached instances.</p>
<p>Memcached is a proven piece of software often used to deal with this problem and you can get great results by running an instance that reserves as little as 25mb of ram for storage. Memcached is two things, a client and server. The server is an event-driven simple key-value store that runs as a daemon. The OS talks to memcached via a client library. PHP uses an extension, either php_memcache or php_memcached to attach to the native memcached client library, the latter understanding how to communicate with the server daemon.</p>
<h4>For connecting to memcached with PHP, you have two options:</h4>
<h4><a href="http://pecl.php.net/memcache">php_memcache</a> or <a href="http://pecl.php.net/package/memcached">php_memcached</a></h4>
<p>php_memcache(d) with a &#8220;d&#8221; is the one you really want to be on since it is more actively developed. Unfortunately if you are on windows, you are out of luck and you will have to use <a href="https://github.com/php-memcached-dev/php-memcached">php_memcache with no &#8220;d&#8221;</a>. For a really awesome talk about memcached (and APC) I recommend listening to <a href="http://techportal.inviqa.com/2010/08/03/apc-memcache-the-high-performance-duo/">DPCRadio: APC &amp; Memcache the High Performance Duo</a> by <a href="http://ilia.ws/"><strong>Ilia Alshanetsky</strong></a> who is a core PHP developer and one of the maintainers of php_memcached.</p>
<h3>APC</h3>
<p>When you run a php script, it is first tokenized, then turned into byte-code (opcode) that the php interpreter can run at a lower level on the machine. The idea behind APC is that often times we don&#8217;t need to perform this step since the php opcode is mostly that same for many pages. APC will store this compiled byte code, which can dramatically speed up performance.</p>
<p>Running APC is a no-brainer, but APC may need to be tuned a bit to fit your specific situation. Just like any caching, staleness is a factor, so APC has to occasionally check for newer versions of a script. Most of the default settings for APC should be fine for lower loads, but if you have a non-trivial amount of traffic you will want to more closely examine the various settings. I have personally taken down servers with bad APC settings.</p>
<h3>Wiring it together</h3>
<p>The setup we use at work involves a single front-end web server running nginx, and a number of commodity application servers only running php-fpm. All static assets are served from the web server machine so nginx can keep them in memory as often as possible. When a request comes in for a web page, we will send it off to an application server via round robin. (there are several server selection methods available). The application servers only have one job, serving PHP. This approach allows us to very easily add or remove extra servers as needed.</p>
<p>One challenge with this setup is synchronizing the code. We have a deploy process that will rsync our project code to the individual application servers. For user sessions, we store them in memcached so that we don&#8217;t worry about users jumping to different servers on subsequent requests.</p>
<h3>Bonus Tips</h3>
<ul>
<li><span style="font-size: 14px; line-height: 1.6em;">Don&#8217;t forget to set up your expires headers. See this<a href="http://www.youtube.com/watch?v=HKNZ-tQQnSY&amp;list=UUkQX1tChV7Z7l1LFF4L9j_g&amp;index=13"> awesome google presentation on the subject</a> (cache is king).</span></li>
<li>Set up some monitoring to measure your results. We use cacti, nagios, and newrelic at work.</li>
<li>Don&#8217;t forget to test that your cache mechanisms are actually working.</li>
</ul>
<h3>Not an Apache Bash</h3>
<p>I don&#8217;t want this post to come off as an Apache bash,  and I merely present to you these opinions based upon my current experience. I think Apache is a great piece of software and I use it in many contexts. Any piece of software you add to your stack has the potential to perform better with adequate tuning, including Apache. I don&#8217;t want to present benchmarks because your situation is going to be different from mine. But the point here is that I have used these technologies successfully and you may achieve similar results, so don&#8217;t be scared to explore them. Thanks for reading!</p>
<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/02/01/simply-scale-with-nginx-memcached-php-fpm-and-apc/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.jblotus.com/2013/02/01/simply-scale-with-nginx-memcached-php-fpm-and-apc/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Common JavaScript &#8220;Gotchas&#8221;</title>
		<link>http://www.jblotus.com/2013/01/13/common-javascript-gotchas/</link>
		<comments>http://www.jblotus.com/2013/01/13/common-javascript-gotchas/#comments</comments>
		<pubDate>Sun, 13 Jan 2013 02:16:17 +0000</pubDate>
		<dc:creator>jblotus</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Web Development / Programming]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[closures]]></category>
		<category><![CDATA[ecmascript]]></category>
		<category><![CDATA[ecmascript 5]]></category>
		<category><![CDATA[es3]]></category>
		<category><![CDATA[es5]]></category>
		<category><![CDATA[globals]]></category>
		<category><![CDATA[hoisting]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[this]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[var keyword]]></category>

		<guid isPermaLink="false">http://www.jblotus.com/?p=1023</guid>
		<description><![CDATA[<p>PHP was my first programming language, and my initial exposure to JavaScript was through libraries like <a href="http://jquery.com/">jQuery</a>. There were things about JavaScript that always seemed to trip me up in the beginning due to how they worked differently than PHP. Heck there are still some things today that are confusing. I want to share [...]]]></description>
				<content:encoded><![CDATA[<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/01/13/common-javascript-gotchas/"></g:plusone></div><p>PHP was my first programming language, and my initial exposure to JavaScript was through libraries like <a href="http://jquery.com/">jQuery</a>. There were things about JavaScript that always seemed to trip me up in the beginning due to how they worked differently than PHP. Heck there are still some things today that are confusing. I want to share some of the things that I struggled when I started working with JavaScript. I am going to cover the global namespace, <code>this</code>, knowing the difference between <strong>ECMAScript 3</strong> and <strong>ECMAScript 5</strong>, asynchronous operations, prototypes, and simple JavaScript inheritance.</p>
<p><span id="more-1023"></span></p>
<h3>The Global Namespace</h3>
<p>In PHP specifically, when you declare a variable function outside of a class (<a href="http://php.net/manual/en/language.namespaces.definitionmultiple.php">or namespace block</a>) you are essentially adding a function to the global namespace. In JavaScript, there is no such thing as a namespace per se, rather everything is attached to the global object. In the case of the web browser, that is the <code>window</code> object. The other key difference is that in JavaScript, functions and variables are attributes of the global object, which we typically refer to as properties.</p>
<p>This can be troublesome because you won&#8217;t get a warning in JavaScript if you overwrite a global function or property and it can actually be quite dangerous.</p>
<pre class="brush:js">function globalFunction() {
  console.log('I am the original global function');
}

function overWriteTheGlobal() {
  globalFunction = function() {
    console.log('I am the new global function');
  }
}
globalFunction(); //outputs "I am the original global function"
overWriteTheGlobal(); //this will overwrite the original global function
globalFunction(); //outputs "I am the new global function"</pre>
<p>One technique that is useful in JavaScript to ensure that your variables and functions are self contained is to use a <strong>immediately-invoked function expression</strong>, commonly known as a <strong>self-executing anonymous function</strong>. I typically expose things to the outside world by passing in a carrier object to the function. This is a variation of the <strong>module pattern</strong>.</p>
<pre class="brush:js">var module = {};

(function(exports){

  exports.notGlobalFunction = function() {
    console.log('I am not global');
  };  

}(module));

function notGlobalFunction() {
  console.log('I am global');
}

notGlobalFunction(); //outputs "I am global"
module.notGlobalFunction(); //outputs "I am not global"</pre>
<p>Inside the <strong>self-executing anonymous function</strong>, all of the global scope is enclosed and we finish by attaching it the the <code>module</code> variable. Technically you could just append properties directly to the <code>module</code> variable, but the reason we are passing it in to the function is to make it explicitly clear what we are attaching our function to. It also allows us to alias the passed in object inside the function. The critical thing here is that we are declaring our dependencies upfront and not relying on global variables, other than the module variable.</p>
<p>You also might have noticed the <code>var</code> keyword. If you aren&#8217;t sure of how it is used, a basic explanation is that by preceding a variable declaration with <code>var</code> creates a property on the nearest containing function. If you omit the <code>var</code> keyword than you are saying that you want to assign a new value to an existing variable higher up the scope chain, which may or may not be the global scope.</p>
<pre class="brush:js">var imAGlobal = true;

function globalGrabber() {
  imAGlobal = false;
  return imAGlobal;
}

console.log(imAGlobal); //outputs "true"
console.log(globalGrabber()); //outputs "false"
console.log(imAGlobal); //outputs "false"</pre>
<p>As you can see, it is quite dangerous to rely on globals in your functions, due to possible side effects and collisions that are bound to occur. Now what happens when we use the <code>var</code> keyword?</p>
<pre class="brush:js">var imAGlobal = true;

function globalGrabber() {
  var imAGlobal = false;
  return imAGlobal;
}

console.log(imAGlobal); //outputs "true"
console.log(globalGrabber()); //outputs "false"
console.log(imAGlobal); //outputs "true"</pre>
<p>JavaScript hoists the <code>var</code> declaration to the top of the function block, then initializes the variable. This is called <strong>variable hoisting</strong>.</p>
<p><strong>To summarize:</strong> all variables are scoped to a function (which is itself an object), and where you declare those variables with <code>var</code> determines the function they are scoped to. Excluding var will imply global scope for a variable.</p>
<p>Let&#8217;s look at how variable hoisting happens:</p>
<pre class="brush:js">function variableHoist() {
  console.log(hoisty);
  hoisty = 1;  
  console.log(hoisty);
  var hoisty = 2;
  console.log(hoisty);
}

variableHoist(); 
//outputs undefined (would get a ReferenceError if no var declaration existed in scope)
//outputs "1"
//outputs "2"

try {
  console.log(hoisty); //outputs ReferenceError (no global var "hoisty")
} catch (e) {
  console.log(e);
}</pre>
<p>So as you can see, it doesn&#8217;t actually matter where you put the <code>var</code> declaration in the function, because the property gets created before the function executes any code. Now in practice, generally you want to put your <code>var</code> declarations at the top of the function, since that is where they end up anyway. It is also totally acceptable to initialize you variables at the top of the function, just be aware of the order of events here.</p>
<p>Functions declared with the <code>function</code> keyword in JavaScript (not variable assignment) also get hoisted. Behind the scenes, the entire function gets hoisted up and is made available for execution.</p>
<pre class="brush:js">myFunction(); //outputs "i exist"

function myFunction() {
  console.log('i exist');
}</pre>
<p><strong><br />
</strong>This wholesale function hoisting does not occur when you use the var form of function declaration:</p>
<pre class="brush:js">try {
  myFunction();
} catch (e) {
  console.log(e); //throws "Uncaught TypeError: undefined is not a function"
}
var myFunction = function() {
  console.log('i exist');
}

myFunction();  //outputs "i exist"</pre>
<p>&nbsp;</p>
<h3>Understanding &#8220;this&#8221;</h3>
<p>Since JavaScript uses function scope, the meaning of <code>this</code> is quite different than what you get in <strong>PHP</strong>, and causes a lot of confusion. Consider the following:</p>
<pre class="brush:js">console.log(this); // outputs window object

var myFunction = function() {
  console.log(this);
}

myFunction(); //outputs window object

var newObject = {
  myFunction: myFunction
}

newObject.myFunction(); //outputs newObject</pre>
<p><code>this</code> by default refers to the object a function is contained in. Since <code>myFunction()</code> is a property of the global object, <code>this</code> is a reference to the global object, which is <code>window</code>. Now when we mix <code>myFunction()</code> into a <code>newObject</code>, <code>this</code> now refers to <code>newObject</code>. In <strong>PHP</strong> and other similar languages, <code>this</code> always refers to the the instance of a class containing the method. You could argue that JavaScript is doing something stupid here, but truthfully much of the power of the JavaScript language comes from this feature. In fact, we can even replace the value of <code>this</code> when invoking our JavaScript functions by using the <code>call()</code> or <code>apply()</code> methods.</p>
<pre class="brush:js">var myFunction = function(arg1, arg2) {
  console.log(this, arg1, arg2);
};

var newObject = {};

myFunction.call(newObject, 'foo', 'bar'); //outputs newObject "foo" "bar" 
myFunction.apply(newObject, ['foo', 'bar']); //outputs newObject "foo" "bar"</pre>
<p>But let&#8217;s not get ahead of ourselves. All we are doing here is invoking the function <code>myFunction</code> by substituting an alternative value for <code>this</code> inside the function by placing the value of the object we want to use a substitute as the first argument. The fundamental difference between <code>call()</code> and <code>apply()</code> is the way you pass arguments to the function. <code>call()</code> will take an unlimited amount of arguments after the first argument and <code>apply()</code> expects and array of arguments as it&#8217;s second argument.</p>
<p>Libraries like jQuery perform a lot of magic by invoking things this way. <strong>Let&#8217;s look at the $.each() method in jQuery:</strong></p>
<pre class="brush:js">var $els = [$('div'), $('span')];
var handler = function() { 
  console.log(this);
};

$.each($els, handler);

//iteration 1 outputs wrapped jquery dom element for "div" tag
//iteration 2 outputs wrapped jquery dom element for "span" tag

handler.apply({}); //outputs object</pre>
<p>jQuery will often rewrite the value of <code>this</code>, so you should always try to be aware of what <code>this</code> means in the context of a jQuery event handler, or other such constructs.</p>
<p>&nbsp;</p>
<h3>Know the difference between ECMAScript 3 and ECMAScript 5</h3>
<p>For many years, <strong>ECMAScript 3</strong> has been the standard in most browsers, but more recently <strong>ECMAScript 5</strong> has made it&#8217;s way into most modern browsers (IE is still lagging behind). ECMAScript 5 introduced a lot of common sense features to JavaScript and some native methods that you previously relied upon a library for, such as <code>String.trim()</code> and <code>Array.forEach()</code>. The problem is you still can&#8217;t rely on these methods being available in browser environments if you have users that are using Internet Explorer.</p>
<p><strong>Take a look at what happens when we try to use <code>String.trim</code> in IE 8:</strong></p>
<pre class="brush:js">var fatString = "   my string   ";

//in modern browsers
console.log(fatString); //outputs "   my string   "
console.log(fatString.trim()); //outputs "my string"

//in IE 8
console.log(fatString.trim()); //error: Object doesn't support property or method 'trim'</pre>
<p>So in the interim, we can use methods like <code>jQuery.trim</code> to do this for us, which I believe will fallback to <code>String.trim</code> if it is available in your browser for increased performance (native browser implementations are faster).</p>
<p>You might not care or even need to know about all of the differences between <strong>ECMAScript 3</strong> and <strong>ECMAScript 5</strong>, but it is generally a good idea to check out the <a href="https://developer.mozilla.org/en-US/docs/JavaScript">Mozilla Developer Network (MDN)</a> for function reference to see what versions of the language a function is available in first. Generally speaking, you should be fine if you are using a library like <strong>jQuery</strong> or <strong>underscore</strong> to handle this for you.</p>
<p>If you are interested in using a polyfill of <strong>ECMAScript 5</strong> for older browser, please check out <a href="https://github.com/kriskowal/es5-shim">https://github.com/kriskowal/es5-shim</a></p>
<h3>Understanding Async</h3>
<p>One of the things that tripped me up the most when beginning to work with JavaScript code, jQuery in particular is the fact that some operations are asynchronous. There were many times that I wrote code in a procedural manner expecting a result to be returned immediately without realizing it.</p>
<p><strong>Take a look at this broken code:</strong></p>
<pre class="brush:js">var remoteValue = false;
$.ajax({
  url: 'http://google.com',
  success: function() {
    remoteValue = true;
  }
});

console.log(remoteValue); //outputs "false"</pre>
<p>It took me a while to realize that you need to program around asynchronous calls using callbacks to deal with the outcome of my ajax calls.</p>
<pre class="brush:js">var remoteValue = false;

var doSomethingWithRemoteValue = function() {
  console.log(remoteValue); //outputs true on success
}

$.ajax({
  url: 'https://google.com',
  complete: function() {
    remoteValue = true;
    doSomethingWithRemoteValue();    
  }
});</pre>
<p>Another cool thing is deferred objects (sometimes called promises), which you can use to program in a more procedural style:</p>
<pre class="brush:js">var remoteValue = false;

var doSomethingWithRemoteValue = function() {
  console.log(remoteValue); 
}

var promise = $.ajax({
  url: 'https://google.com'
});

//outputs "true"
promise.always(function() {
  remoteValue = true;
  doSomethingWithRemoteValue();    
});

//outputs "foobar"
promise.always(function() {
  remoteValue = 'foobar';
  doSomethingWithRemoteValue();    
});</pre>
<p>You can use promises to chain callbacks in a style that is in my opinion a bit easier to work with than nested callbacks in addition to a host of other benefits these objects offer.</p>
<p><strong>Animations in the browser are also asyncronous</strong>, so this is also a common source of confusion. I&#8217;m not going to go into detail here, but you need to treat animations much like ajax requests in the way you handle them via callbacks. I&#8217;m not really an expert on the subject though so please take a look at the <a href="http://api.jquery.com/animate/">jQuery .animate() method</a>.</p>
<h3>Simple Inheritance in JavaScript</h3>
<p>Grossly simplified, JavaScript clones objects to extend them, while PHP, Ruby, Python and Java use and extend classes. In JavaScript you have something called a <code>prototype</code>, and every object has one. In fact, all functions, strings, numbers and objects have a common ancestor, <code>Object</code>. There are two things about prototype to remember:  blueprints and chains.</p>
<p>Each <code>prototype</code> is basically an object in itself that describes properties available when creating an instance of an object. The prototype chain is what allows prototypes to extend other prototypes. In fact, prototypes themselves can have prototypes. When a method or attribute does not exist on an object instance, then it is looked for in that object&#8217;s <code>prototype</code>, and the prototypes&#8217;s <code>prototype</code>, and so on until it finally reaches <code>undefined</code> if no such property exists.</p>
<p>Thankfully, beginners generally don&#8217;t need to mess with this stuff at all, since it is easy enough to create an object literal and append properties to it at runtime.</p>
<pre class="brush:js">var obj = {};

obj.newFunction = function() {
  console.log('I am a dynamic function');
};

obj.newFunction();</pre>
<p>An easy way to extend objects that I use all the time is <code>jQuery.extend()</code></p>
<pre class="brush:js">var obj = {
  a: 'i am a lonely property'
};

var newObj = {
  b: function() {
    return 'i am a lonely function';
  }
};

var finalObj = $.extend({}, obj, newObj);

console.log(finalObj.a); //outputs "i am a lonely property"
console.log(finalObj.b()); //outputs "i am a lonely function"</pre>
<p><strong>ECMAScript 5</strong> offers us <code>Object.create()</code>, which you can use to extend from an existing object but you probably need to avoid using this if you need to support older browsers. It does offer distinct advantages to property creation and setting attributes of properties (yes, <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/defineProperty">properties also have properties</a>).</p>
<pre class="brush:js">var obj = {
  a: 'i am a lonely property'
}; 

var finalObj = Object.create(obj, {
  b: {
    get: function() {
      return "i am a lonely function";
    }
  }
});

console.log(finalObj.a); //outputs "i am a lonely property" 
console.log(finalObj.b); //outputs "i am a lonely function"</pre>
<p>You can get pretty deep into the subject of <a href="http://www.crockford.com/javascript/inheritance.html">inheritance in JavaScript</a> but the beautiful thing here again is that you really don&#8217;t have to due to the immense power and flexibility of the language.</p>
<h3>Bonus Gotcha: Forgetting to use var in for loops</h3>
<pre class="brush:js">var i = 0;

function iteratorHandler() {  
  i = 10;
}

function iterate() {
 //this iteration will only run once
  for (i = 0; i &lt; 10; i++) {
    console.log(i); //outputs 0
    iteratorHandler();
    console.log(i); //outputs 10
  } 
}

iterate();</pre>
<p>The example is contrived, but you can see the danger here. The solution is to declare you iterator variables with <code>var</code>.</p>
<pre class="brush:js">var i = 0;

function iteratorHandler() {  
  i = 10;
}

function iterate() {
  //this iteration will run 10 times
  for (var i = 0; i &lt; 10; i++) {    
    iteratorHandler();
    console.log(i);
  }
}

iterate();</pre>
<p>This all goes back to our scope rules. Remember to use <code>var</code> properly.</p>
<h2>Summary</h2>
<p>JavaScript may be the only language people don&#8217;t need to learn before using it, but eventually you are going to run in to some unexplained trouble. Other than avoiding your own bugs, learning JavaScript makes a lot of sense these days considering it&#8217;s rebirth and widespread availability. This blog by no means attempts to be a complete panacea, but hopefully it will help a few people understand some of the fundamentals before being forced into writing more awful JavaScript code, secretly hoping to get reassigned to a backend project buried in database queries in happy PHP land.</p>
<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/01/13/common-javascript-gotchas/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.jblotus.com/2013/01/13/common-javascript-gotchas/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>My Programming Heroes: Douglas Crockford</title>
		<link>http://www.jblotus.com/2013/01/05/my-programming-heroes-douglas-crockford/</link>
		<comments>http://www.jblotus.com/2013/01/05/my-programming-heroes-douglas-crockford/#comments</comments>
		<pubDate>Sat, 05 Jan 2013 22:40:56 +0000</pubDate>
		<dc:creator>jblotus</dc:creator>
				<category><![CDATA[Concurrent Programming]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[node.js]]></category>
		<category><![CDATA[Progamming Heroes]]></category>
		<category><![CDATA[Web Development / Programming]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[computer history]]></category>
		<category><![CDATA[douglas crockford]]></category>
		<category><![CDATA[grace hopper]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[monads]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[programming heroes]]></category>
		<category><![CDATA[robert martin]]></category>
		<category><![CDATA[xss]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.jblotus.com/?p=1021</guid>
		<description><![CDATA[<p>JavaScript is a language that people would use without learning it first, which is by mistake that<br /> you would not make in other language &#8211; Douglas Crockford</p> <p>I&#8217;m a huge fan of <a href="http://www.crockford.com/">Douglas Crockford</a>, and that has a lot to do with how I learned <a href="https://developer.mozilla.org/en-US/docs/JavaScript">JavaScript</a>. Like many web developers, I generally [...]]]></description>
				<content:encoded><![CDATA[<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/01/05/my-programming-heroes-douglas-crockford/"></g:plusone></div><blockquote><p>JavaScript is a language that people would use without learning it first, which is by mistake that<br />
you would not make in other language &#8211; Douglas Crockford</p></blockquote>
<p>I&#8217;m a huge fan of <a href="http://www.crockford.com/">Douglas Crockford</a>, and that has a lot to do with how I learned <a href="https://developer.mozilla.org/en-US/docs/JavaScript">JavaScript</a>. Like many web developers, I generally loathed JavaScript until <a href="http://jquery.com/">jQuery</a> came along, and then I suddenly thought I understood the language. It wasn&#8217;t until I had to write non-trivial applications in JavaScript that I truly began to notice the huge gaps in my education. With the rise of server-side JavaScript and the constant deluge of new interesting things happening in the JavaScript community, I felt that I needed to catch up, quickly. I needed a master to learn from, and Douglas Crockford was the master I chose.</p>
<p><span id="more-1021"></span></p>
<h2>Who is this Douglas Crockford?</h2>
<p><a href="http://www.youtube.com/watch?v=-C-JoyNuQJs">Douglas Crockford discovered JSON</a>, you know, the language that <a href="http://blog.programmableweb.com/2011/05/25/1-in-5-apis-say-bye-xml/">relegated XML to second-class status</a>? Everywhere I looked all you heard was <a href="https://github.com/twitter/bootstrap/issues/3057#issuecomment-5135512">Crockford this,</a> <a href="http://ajaxian.com/archives/doug-crockford-and-the-online-booty-call-saga">Crockford that</a>. JSLint will make you cry, they said. Let&#8217;s not even get started on the <a href="http://dailyjs.com/2012/04/19/semicolons/">debate about semicolons</a>. So clearly <a href="http://yuiblog.com/crockford/">Crockford is an important character in the JavaScript world</a>: serves on the ECMAScript board, former-chief JavaScript architect at Yahoo <a href="http://techcrunch.com/2012/05/13/paypal-gets-its-own-share-of-the-yahoo-diaspora-hires-java-icon-douglas-crockford/">and now PayPal</a>. Oh yeah, he also wrote a pretty popular book, <a href="http://shop.oreilly.com/product/9780596517748.do">JavaScript: The Good Parts</a>. Douglas is also a <a href="http://commonquote.com/author/15734/douglas-crockford">master of hyperbole</a>.</p>
<p><a href="http://javascript.crockford.com/">There is a ton of stuff to cover with Crockford</a>, but his recorded talks are probably one of my favorite resources and frankly I fall asleep with these playing on my iPad quite regularly. If you are looking for some free JavaScript education, do yourself a favor and <strong>WATCH ALL OF HIS VIDEOS</strong>.</p>
<h2></h2>
<h2>YUI Library Lectures</h2>
<p>This is an awesome<a href="http://developer.yahoo.com/yui//theater/"> <strong>8-part series</strong> of lectures given by Crockford while he was still Chief JavaScript Architect at Yahoo</a>. This is a great starting point for anyone looking to learn more about JavaScript.</p>
<h3>Volume 1 &#8211; The Early Years</h3>
<p>In this video, Douglas Crockford covers pretty much the entire history of our industry! This video taught me about <a href="http://en.wikipedia.org/wiki/Grace_Hopper">Grace Hopper and her contributions to programming</a>, such as <a href="http://en.wikipedia.org/wiki/A-0_System">creating the first compiler</a> and <a href="http://www.waterholes.com/~dennette/1996/hopper/bug.htm">coining the term &#8220;bug&#8221;</a>. He also covers CPU architecture, mainframes, and the first software. <strong>Too many programmers today don&#8217;t bother learning anything about the origin of programming</strong> and the fact that he was able to sum it up in just under two hours is quite impressive.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/JxAXlJEmNMg?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3>Chapter 2 &#8211; And Then There Was JavaScript</h3>
<p>Here, Douglas Crockford discusses the origins and history of JavaScript, specifically it&#8217;s good bad parts and the dangerous bad parts. This is a great fundamental introduction to how this language actually works and frankly most people who watch this should pick up a lot of good information. <strong>This is a fairly technical talk.</strong></p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/RO1Wnu-xKoY?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3>Act III &#8211; Function the Ultimate</h3>
<p>In this video, Crockford describes the very best part of JavaScript, functions. This is a critically important talk because Crockford covers often-misunderstood topics like hoisting, function hoisting, scope, closure, and recursion. He also covers JavaScript&#8217;s version of inheritance, both pseudo-classical and prototypal, a common source of confusion for JavaScript developers. <strong>This talk is very code heavy, so grab some Red Bull or coffee.</strong></p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/ya4UHuXNygM?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3>Episode IV &#8211; The Metamorphosis of Ajax</h3>
<p>This video focuses on the origins of Ajax, which was born out of <a href="http://www.w3.org/TR/XMLHttpRequest/">work by Microsoft</a> and applied by <a href="http://en.wikipedia.org/wiki/Jesse_James_Garrett">Jesse James Garret</a> to create the version of ajax we use today. Crockford also gives us a bit of history about HTML and how it evolved in the beginning, went on to evolve during the browser wars, and how it lead to the awful DOM we have today. There is a lot of talk about web standards and how browsers actually work, including the DOM. This is great video for users of modern libraries like jQuery to understand why those libraries exist in the first place.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/Fv9qT9joc0M?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3>Part V &#8211; The End of All Things</h3>
<blockquote><p>If you don&#8217;t have these vulnerabilities in your browser (XSS), it is not standards compliant. So there is something deeply, deeply wrong with the standards of the web.. -Douglas Crockford</p></blockquote>
<p>This talk covers important topics like <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">cross-site scripting attacks (XSS)</a>, browser vulnerabilities, <a href="http://thechangelog.com/post/676820023/episode-0-2-6-douglas-crockford-on-json-and-javascript-f">including why HTML5 actually makes the situation worse</a>. He also covers some interesting ideas about creating secure JavaScript code, such a <a href="http://en.wikipedia.org/wiki/Object-capability_model">programming by capability</a>. Other topics covered are JavaScript performance and bench-marking  and more best practices, specifically discussing some of the rules in<a href="http://www.jslint.com/"> JSLint</a> and how they came about.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/47Ceot8yqeI?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3>Scene 6 &#8211; Loopage<a href="https://github.com/zephyrfalcon/magicripper2"><br />
</a></h3>
<p>This video talks about the Event Loop, one of the most important features of the JavaScript language. Crockford covers the origin of I/O, from the time-sharing mainframe systems of old, the user-friendly <a href="http://en.wikipedia.org/wiki/HyperCard">HyperCard</a> for the Mac, and the danger of threads. He also discusses server and client architecture for modern web applications, using node and YUI to build fast, performant programs.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/QgwSUtYSUqA?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3>Level 7 &#8211; ECMAScript 5: The New Parts</h3>
<p>This video has Douglas Talking about <a href="http://en.wikipedia.org/wiki/ECMAScript">ECMAScript 5</a>, and some of the challenges in designing the standard to replace ECMAScript 3. One of the interesting things I learned in this video is how difficult it is to actually move the standard forward (ECMAScript 3 has been out since 1999) and why it takes so long to make these changes (HINT: It&#8217;s about not breaking the web&#8230;and Microsoft). This talk gives a nice tour of some of the new features of the language and even offers some insights about where <a href="https://wiki.mozilla.org/ES6_plans">ES6/ESNext</a> is going, which he hopes will fix some of the problems the ECMAScript 5 was unable to address.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/UTEqr0IlFKY?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3>Section 8 &#8211; Programming Style &amp; Your Brain</h3>
<blockquote><p>JavaScript and brains? What&#8217;s the connection? -Douglas Crockford</p></blockquote>
<p>This talk is mostly about how consistent programming style affects good habits and reduces errors in our code. This is probably one of the more controversial things Douglas Crockford is known for, considering how &#8220;subjective&#8221; most programmers are about coding style. Douglas tries to make the argument that these things are actually less subjective than we think  and that by following a consistent and rigorous style, we actually produce better code.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/taaEzHI9xyY?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>&nbsp;</p>
<h2>More Awesome Crockford Videos</h2>
<p>Did you finish the YUI Lectures? Don&#8217;t worry, there are still <a href="http://www.youtube.com/playlist?list=PLwDFnUJNt1B0MOseiYYN95Cht60zqwplH">a ton of great Crockford videos</a> out there. I haven&#8217;t posted all of the ones I know about, just some of my favorites that I think are the most useful and entertaining.</p>
<h3>Monads &amp; Gonads</h3>
<p>Douglas is always good with titles, but this talk doesn&#8217;t require balls to watch. Douglas talks about <a href="http://www.haskell.org/haskellwiki/Haskell">Haskell</a>, and the <a href="http://www.haskell.org/tutorial/monads.html">concept of a Monad</a> and how you can achieve this programming style in JavaScript. The topic of promises, concurrency and parallelism are also discussed in detail. I still haven&#8217;t gotten my head around this topic, so <strong>I&#8217;ve been watching this video frequently</strong>.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/dkZFtimgAcM?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3>What Would Crockford Do?</h3>
<p>Well, <a href="http://techcrunch.com/2012/04/04/yahoo-cuts-14-percent-of-workforce-2000-given-pink-slips/">Yahoo had a big talent drain awhile ago</a>, including one of their biggest assets, as <a href="http://techcrunch.com/2012/05/13/paypal-gets-its-own-share-of-the-yahoo-diaspora-hires-java-icon-douglas-crockford/">Doug jumped over to PayPal</a>. Never one to shy away from controversy, he gave a talk about how he would have run Yahoo had he been in charge of the company. I think there is an element of voyeurism here that makes it hard to stop watching and ultimately even though this isn&#8217;t really a technical talk, it is one of my <strong>favorite Crockford talks of all time</strong>.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/8HzclYKz4yQ?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3>JavaScript: Your New Overlord</h3>
<p>For context, this talk was given at <a href="http://jaxconf.com/">JAX, which is a Java and Android conference</a>. In this talk Douglas pretty much talks smack about XML, the enterprise, JavaScript &#8211; and why JavaScript is now the language of the future in spite of how maligned it is by  developers in other languages. You get a nice overview of the history of the language and the good parts. Douglas also covers <a href="http://www.hanselman.com/blog/JavaScriptIsAssemblyLanguageForTheWebSematicMarkupIsDeadCleanVsMachinecodedHTML.aspx">JavaScript as the ultimate VM</a>, including languages that compile to JavaScript like <a href="http://coffeescript.org/">CoffeeScript</a>, and even old languages that are being compiled to JavaScript.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='719' height='435' src='http://www.youtube.com/embed/Trurfqh_6fQ?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h2>What else?</h2>
<p>You can probably accuse me of being a Douglas Crockford fan by now, and you would be right. What I appreciate most about him is how he presents his opinions. His arguments are always backed up by some reasoning, no matter how opinionated. Some people do not agree with Crockford, and to those people I offer this except from <a href="http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882">Clean Code</a>, a book by another on of my programming heroes, <a href="https://twitter.com/unclebobmartin">Robert Martin</a>:</p>
<p><img class="wp-image-1063 alignnone" alt="cleancodecover" src="http://www.jblotus.com/wp-content/uploads/2013/01/cleancodecover.jpg" width="192" height="254" /></p>
<blockquote><p>Students of these approaches immerse themselves in the teachings of the founder. They dedicate themselves to learn what that particular master teaches, often to the exclusion of any other master’s teaching. Later, as the students grow in their art, they may become the student of a different master so they can broaden their knowledge and practice.<br />
Some eventually go on to reﬁne their skills, discovering new techniques and founding their own schools.<br />
None of these different schools is absolutely right. Yet within a particular school we act as though the teachings and techniques are right. After all, there is a right way to practice Hakkoryu Jiu Jitsu, or Jeet Kune Do. But this rightness within a school does not invalidate the teachings of a different school</p>
<p>-Robert Martin (Clean Code)</p></blockquote>
<h3>Follow a Master</h3>
<p>Essentially, I immersed myself in Douglas Crockford&#8217;s teachings because he is a <strong>worthy master</strong>. Without these videos, I&#8217;m pretty sure my interest in JavaScript or my knowledge wouldn&#8217;t be at the level it is today. There are many other masters of the JavaScript language you might also want to follow: <a href="http://ejohn.org/">John Resig</a>, <a href="https://github.com/jashkenas">Jeremy Ashkenas</a>, <a href="http://addyosmani.com/blog/">Addy Osmani</a>, <a href="http://yehudakatz.com/">Yehuda Katz</a>, <a href="http://mir.aculo.us/">Thomas Fuchs</a>, <a href="http://paulirish.com/">Paul Irish</a>, <a href="http://tjholowaychuk.com/">TJ Holowaychuk</a>, <a href="https://twitter.com/substack">James Halliday</a>, <a href="https://github.com/isaacs">Isaac Schlueter</a>, etc. So my final advice today would be:<strong> pick a master and immerse yourself!</strong></p>
<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/01/05/my-programming-heroes-douglas-crockford/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.jblotus.com/2013/01/05/my-programming-heroes-douglas-crockford/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2013 Programming Podcasts for the New Year</title>
		<link>http://www.jblotus.com/2013/01/03/2013-programming-podcasts-for-the-new-year/</link>
		<comments>http://www.jblotus.com/2013/01/03/2013-programming-podcasts-for-the-new-year/#comments</comments>
		<pubDate>Thu, 03 Jan 2013 03:18:44 +0000</pubDate>
		<dc:creator>jblotus</dc:creator>
				<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[Web Development / Programming]]></category>
		<category><![CDATA[/dev/hell]]></category>
		<category><![CDATA[dhh]]></category>
		<category><![CDATA[giant robots smashing into other giant robots]]></category>
		<category><![CDATA[hanselminutes]]></category>
		<category><![CDATA[herding code]]></category>
		<category><![CDATA[javascript jabber]]></category>
		<category><![CDATA[microphp]]></category>
		<category><![CDATA[podcasts]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[thoughtbot]]></category>

		<guid isPermaLink="false">http://www.jblotus.com/?p=977</guid>
		<description><![CDATA[<p>I have a long drive to work, and one of the things I do to pass the time regularly is listen to podcasts in the car. I really enjoy programming podcasts and conference talk recordings, and it&#8217;s a really great way to educate yourself on the go. I wanted to throw a shout out to [...]]]></description>
				<content:encoded><![CDATA[<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/01/03/2013-programming-podcasts-for-the-new-year/"></g:plusone></div><p>I have a long drive to work, and one of the things I do to pass the time regularly is listen to podcasts in the car. I really enjoy programming podcasts and conference talk recordings, and it&#8217;s a really great way to educate yourself on the go. I wanted to throw a shout out to some podcasts that I haven&#8217;t previously mentioned on the blog and hopefully turn on a few new listeners.</p>
<p><span id="more-977"></span></p>
<p><strong>For reference, here are links to the previous posts:</strong></p>
<p><a title="July 2011 Podcasts for Web Developers, Programmers and Software Engineers" href="http://www.jblotus.com/2011/07/21/july-2011-podcasts-for-web-developers-programmers-and-software-engineers/">July 2011 Podcasts for Web Developers, Programmers and Software Engineers</a></p>
<p><a title="Podcasts for Programmers, Developers and Web Designers" href="http://www.jblotus.com/2011/06/04/podcasts-for-programmers-developers-and-web-designers/">Podcasts for Programmers, Developers and Web Designers</a></p>
<p>&nbsp;</p>
<div id="attachment_994" class="wp-caption alignnone" style="width: 180px"><a href="http://devhell.info"><img class="size-full wp-image-994 " alt="/dev/hell Podcast" src="http://www.jblotus.com/wp-content/uploads/2013/01/dev-hell-podcast.jpg" width="170" height="170" /></a><p class="wp-caption-text">/dev/hell Podcast</p></div>
<p><strong><a href="http://devhell.info/">/dev/hell</a></strong></p>
<p>This is probably my favorite new programming podcast, hosted by one of my internet heroes <a href="https://twitter.com/grmpyprogrammer">Chris Hartjes</a> and <a href="https://twitter.com/funkatron">Ed Finkler</a>. This is a mostly PHP podcast, but there are many discussions about other languages like Javascript, Python, etc. Truthfully those discussions are generally presented through the lens of a PHP developer frustrated with the shortcomings of his chosen language. It was fun to listen along to this podcast over the year and hear discussions about <a href="http://microphp.org/">Ed Finkler&#8217;s MicroPHP Manifesto</a>, and watching Chris try to develop his brand as <a href="http://www.littlehart.net/atthekeyboard/">grumpy programmer</a>, write a book and even stress out about organizing a conference (<a href="http:// truenorthphp.ca">True North PHP</a>). The other great thing is that since Chris and Ed part of the so-called &#8220;PHP Elite&#8221;, you get a really nice selection of top tier guests like <a href="https://twitter.com/ElizabethN">Elizabeth Naramore</a>, <a href="https://twitter.com/shiflett">Chris Shiflett</a>, <a href="https://twitter.com/jperras">Joël Perras</a>. This is definitely the must-listen podcast for PHP developers, but I think any web developer would appreciate it.</p>
<p>&nbsp;</p>
<div id="attachment_995" class="wp-caption alignnone" style="width: 180px"><a href="http://robots.thoughtbot.com/"><img class="size-full wp-image-995" alt="Giant Robots Smashing Into Other Giant Robots Podcast" src="http://www.jblotus.com/wp-content/uploads/2013/01/giant-robots-podcast.jpg" width="170" height="170" /></a><p class="wp-caption-text">Giant Robots Smashing Into Other Giant Robots Podcast</p></div>
<p><a href="http://robots.thoughtbot.com/"><strong>Giant Robots Smashing into other Giant Robots</strong></a></p>
<p>This is an awesome new podcast put out by the guys at <a href="http://www.thoughtbot.com/">thoughtbot</a>. It is primarily ruby focused, but I find that the topics covered are interesting to almost any programmer. There are also interviews with various people in the programming industry at various stages in their careers. Notable guests like <a href="http://learn.thoughtbot.com/podcast/28">David Heinemeier Hansson</a>, the creator of Ruby on Rails, help to give even more credibility to this podcast. One of the great things about this podcast is the host, <a href="https://twitter.com/r00k">Ben Orenstien</a>. His questions and voice are really thoughtful and he never comes off as pretentious. It&#8217;s really refreshing considering the way the ruby community in general tends to suffer from a bit of <a href="http://www.reddit.com/r/ruby/comments/elygz/what_is_the_biggest_current_problem_in_ruby/">elitism</a>, at least in the presentation. Most of my favorite episodes was entirely about code and you will often here refrains to &#8220;<a href="http://robots.thoughtbot.com/post/27572137956/tell-dont-ask">Tell, don&#8217;t ask</a>&#8221; and other useful design patterns. Spin this one up even if you aren&#8217;t a rubyist.</p>
<p>&nbsp;</p>
<div id="attachment_999" class="wp-caption alignnone" style="width: 180px"><a href="http://programmingthrowdown.blogspot.com/"><img class="size-full wp-image-999" alt="Programming Throwdown Podcast" src="http://www.jblotus.com/wp-content/uploads/2013/01/programming-throwdown-podcast.jpg" width="170" height="170" /></a><p class="wp-caption-text">Programming Throwdown Podcast</p></div>
<p><strong><a href="http://programmingthrowdown.blogspot.com/">Programming Throwdown</a></strong></p>
<p>Programming Throwdown is a podcast built around the idea of discussing a different programming language or developer technology with each episode. Each episode starts with about 20 minutes of banter and soft-talk which admittedly I try to skip, but if you are willing to forgive the hosts enthusiasm and <a href="http://www.wikihow.com/Stop-Saying-the-Word-%22Like%22">overuse of the word &#8220;like&#8221; and unabashed &#8220;valley speak&#8221;</a> you will find some excellent technical knowledge behind these discussions. If I had to imagine, the hosts probably went to the same college and comp sci courses together because you actually can&#8217;t tell them apart. In any event, where else can you listen to a <a href="http://programmingthrowdown.blogspot.com/2012/12/episode-22-latex.html">podcast about Latex</a> one week, and C++ or Python the next week.</p>
<p>&nbsp;</p>
<div id="attachment_998" class="wp-caption alignnone" style="width: 180px"><a href="http://javascriptjabber.com/"><img class="size-full wp-image-998" alt="Javascript Jabber Podcast" src="http://www.jblotus.com/wp-content/uploads/2013/01/javascript-jabber-podcast.jpg" width="170" height="170" /></a><p class="wp-caption-text">Javascript Jabber Podcast</p></div>
<p><strong><a href="http://javascriptjabber.com/">Javascript Jabber</a></strong></p>
<p><strong>Javascript Jabber</strong> is an in-depth, technical podcast based around the JavaScript language. This podcast is hosted by <a href="https://twitter.com/cmaxw">Charles Max Wood</a>, and features a rotating cast of notables from the JavaScript world. My favorite episode was pretty much a <a href="http://javascriptjabber.com/004-jsj-backbone-js-with-jeremy-ashkenas/">debate between Yehuda Katz (Ember.js, Rails, jQuery) and Jeremy Ashkenas (Backbone,js, underscore.js) about JavaScript MVC frameworks</a>. Other regular guests are guys like <a href="https://twitter.com/creationix">Tim Caswell</a>, who is a <a href="http://howtonode.org/">big deal in the node community</a>. This podcast gets very technical about JavaScript development which to me makes it very attractive and distinct from <a href="http://javascriptshow.com/">The Javascript Show<strong>,</strong></a> which is more of a news roundup about the happenings in the JavaScript world. Definitely check this one out if you develop with JavaScript.</p>
<p>&nbsp;</p>
<div id="attachment_996" class="wp-caption alignnone" style="width: 180px"><a href="http://www.hanselminutes.com/"><img class="size-full wp-image-996" alt="Hanselminutes Podcast" src="http://www.jblotus.com/wp-content/uploads/2013/01/hanselminutes-podcast.jpg" width="170" height="170" /></a><p class="wp-caption-text">Hanselminutes Podcast</p></div>
<p><strong><a href="http://www.hanselminutes.com/">Hanselminutes</a></strong></p>
<p>I initially avoided <strong>Hanselminutes</strong> since I assumed it was strictly a .NET and Microsoft centered podcast, since host <a href="http://www.hanselman.com/blog/">Scott Hanselman</a> is a big fish in the Microsoft World. After running dry on podcasts I decided to download a few episodes and I was pleasantly surprised by how well put together this podcast is. I think Scott puts a lot of effort into covering a broad range of topics, everything from <a href="http://www.hanselminutes.com/344/moment-of-inspiration-inside-the-moi3d-modelling-tool-with-michael-gibson">interviewing a guy who makes 3d modeling software</a>, to <a href="http://www.hanselminutes.com/350/learning-how-to-learn-git-with-michael-sarchet">discussing his struggles with Git</a>. Scott interviews all kinds of interesting people from around the developer ecosystem, and isn&#8217;t afraid to get personal, talking about his <a href="http://www.hanselman.com/blog/TheSadStateOfDiabetesTechnologyIn2012.aspx">struggles with diabetes</a> for example. The podcast is probably especially worthwhile to listen to if you come from an open-source background since Scott has an interesting perspective considering his experience in the industry.</p>
<p>&nbsp;</p>
<div id="attachment_997" class="wp-caption alignnone" style="width: 180px"><a href="http://herdingcode.com/"><img class="size-full wp-image-997" title="Herding Code Podcast" alt="Herding Code Podcast" src="http://www.jblotus.com/wp-content/uploads/2013/01/herding-code-podcast.jpg" width="170" height="170" /></a><p class="wp-caption-text">Herding Code Podcast</p></div>
<p><strong><a href="http://herdingcode.com/">Herding Code</a></strong></p>
<p>While I&#8217;m on the subject of .NET/Microsoft focused podcasts, <strong>Herding Code</strong> is another great listen even for the open-source guys. These guys pump out a ton of interesting discussions on a very regular basis and topics range from ASP.NET MVC to testing and mobile development. This podcast really did a lot to change my opinion about Microsoft developers, who I used to think just played with Excel all day and generated code with wizards. I mean sure, they still do that, but&#8230;.give the podcast a listen to anyway!</p>
<p><strong>P.S </strong>Check out this awesome implementation of<a href="http://www.smore.com/clippy-js"> Clippy in javascript</a>!</p>
<p>&nbsp;</p>
<h3>Did I miss anything?</h3>
<p>That&#8217;s all I have for the moment folks! There are a few podcasts I didn&#8217;t mention because I don&#8217;t listen to them or I think they are low-quality but please leave a comment if I&#8217;m missing anything you like to listen to!</p>
<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/01/03/2013-programming-podcasts-for-the-new-year/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.jblotus.com/2013/01/03/2013-programming-podcasts-for-the-new-year/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Looking back on 2012, ahead to 2013</title>
		<link>http://www.jblotus.com/2013/01/01/looking-back-on-2012-ahead-to-2013/</link>
		<comments>http://www.jblotus.com/2013/01/01/looking-back-on-2012-ahead-to-2013/#comments</comments>
		<pubDate>Tue, 01 Jan 2013 18:05:39 +0000</pubDate>
		<dc:creator>jblotus</dc:creator>
				<category><![CDATA[Brain Dump]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Reflection]]></category>
		<category><![CDATA[Web Development / Programming]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[meetups]]></category>
		<category><![CDATA[new years]]></category>
		<category><![CDATA[phptek]]></category>
		<category><![CDATA[self improvement]]></category>
		<category><![CDATA[soflophp]]></category>
		<category><![CDATA[talks]]></category>
		<category><![CDATA[zce]]></category>

		<guid isPermaLink="false">http://www.jblotus.com/?p=964</guid>
		<description><![CDATA[<p>I&#8217;m usually not a fan of these posts, but I felt that doing some reflection would be therapeutic for me. Fair Warning: this post is probably going to be very self-indulgent.</p> <p>In 2012:</p> My wife and I had our second baby boy My wife and I got married (we did it backwards) Finally talking to my grandparents [...]]]></description>
				<content:encoded><![CDATA[<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/01/01/looking-back-on-2012-ahead-to-2013/"></g:plusone></div><p>I&#8217;m usually not a fan of these posts, but I felt that doing some reflection would be therapeutic for me. <strong>Fair Warning:</strong> this post is probably going to be very self-indulgent.</p>
<p>In <strong>2012</strong>:</p>
<ul>
<li>My wife and I had our second baby boy</li>
<li>My wife and I got married (we did it backwards)</li>
<li>Finally talking to my grandparents again after a long strained relationship. Forgiveness is a wonderful thing.</li>
<li>I presented a <a href="http://www.jblotus.com/2012/04/14/fighting-fear-driven-development-w-phpunit-slides/">talk about PHPUnit</a> at my <a href="http://www.soflophp.org/">local PHP user group</a></li>
<li>I attended <strong>8</strong> <a href="http://www.soflophp.org/">SoFlo PHP Users Group meetups</a></li>
<li><a href="https://twitter.com/adamculp">Adam Culp</a>, <a href="https://twitter.com/pgodel">Pablo Godel</a>, <a href="https://twitter.com/betaflip">John Gills</a> and I drank beers with <a href="https://twitter.com/derickr">Derick Rethans</a> from <a href="http://www.10gen.com/">10gen</a> (MongoDB) after <a href="http://www.soflophp.org/events/71930042/">his presentation</a> and argued about the <a href="http://www.homebrewtalk.com/f14/american-pint-vs-european-pint-150471/">difference between a British Pint and an American Pint</a></li>
<li>Watched <a href="http://www.soflophp.org/events/40433602/">Rasmus Lerdorf speak</a> and even got to ask him a few questions (about <a href="https://wiki.php.net/rfc/shortsyntaxforarrays">short array syntax in php 5.4</a>).  <em>Technically this was December 2011 but I&#8217;m still counting it!</em></li>
<li>I attended <a href="http://codeworks.phparch.com/">CodeWorks 2012</a>, my first conference - albeit a small one &#8211; still great times and very eye opening. I even convinced the boss to shell out for it!</li>
<li>I helped select talks for  <a href="http://sunshinephp.com/">SunshinePHP</a>. I also built a little app to help rate the talks with <a href="http://cakephp.org/">CakePHP</a> at <a href="https://twitter.com/adamculp">Adam Culp</a>&#8216;s request. It was and is a great honor to be help out with this upcoming conference. <strong><a href="http://sunshinephp.com/register/">Click here to buy tickets</a></strong></li>
<li>I moved into the lead developer position at <a href="http://www.spellingcity.com/">work</a> (on my team) and have really had some great experiences there this year.</li>
<li>Made my first <a href="http://wordpress.org/extend/plugins/mojolive-profile-widget/">wordpress plugin</a></li>
<li>Started playing <a href="http://www.wizards.com/Magic/Summoner/">Magic: The Gathering</a> again, via <a href="https://www.wizards.com/magic/digital/magiconline.aspx">Magic Online</a> and on the iPad and PC via <a href="https://www.wizards.com/Magic/Digital/DuelsOfThePlaneswalkers.aspx?x=mtg/digital/d13/whatis">Duels of the Planeswalkers</a>. I used to play this almost 17 years ago when I was around 12-13 years old.</li>
</ul>
<p>Some regrets and sadness in <strong>2012</strong>:</p>
<ul>
<li><span style="line-height: 14px;" data-mce-mark="1">I regret not giving more talks, although life definitely got in the way</span></li>
<li>I wanted to see <a href="https://twitter.com/unclebobmartin">Robert Martin</a> talk since he was in the area, but missed it</li>
<li>My co-worker Conrad shipped off to Atlanta! There are special people in life that teach you things from another perspective and Conrad is definitely one of them.</li>
<li>Election Season wasn&#8217;t nearly as exciting as I had hoped (the primaries sucked out all the energy).</li>
</ul>
<p>Now for this year&#8217;s docket. In <strong>2013</strong>:</p>
<ul>
<li><span style="line-height: 14px;" data-mce-mark="1">I will attend <a href="http://sunshinephp.com/">SunshinePHP</a>, my first large conference right here in South Florida!</span></li>
<li>I really want to go to <a href="http://tek.phparch.com/">PHPTek13 in Chicago</a>, which will hopefully be a watershed moment</li>
<li>Take the <a href="http://www.zend.com/services/certification/php-5-certification/">Zend Certification Exam for PHP 5.3</a></li>
<li>I am giving a <a href="http://www.soflophp.org/events/34360482/">presentation about Nginx and Memcache</a> at my<a href="http://www.soflophp.org/"> local PHP user group</a></li>
<li>Spend more time playing <a href="https://minecraft.net/">Minecraft</a> with my soon to be 4 year-old son. Seriously this is the best.</li>
<li>Play less games. My Steam collection is about <a href="http://steamcommunity.com/id/rehabitual">142 games and growing</a> and I&#8217;m not even counting other sources of games. I must have put hundreds of hours into games this year.</li>
<li><span style="color: #800000;" data-mce-mark="1"><strong>Write more blog posts</strong></span>. In 2012, I only wrote something like <strong>5</strong> blog posts compared to around <strong>22</strong> for 2011.</li>
<li>Finish more software! (<a href="https://github.com/jblotus">https://github.com/jblotus</a>) Seriously I start something like <strong>1 </strong>project per week, and usually throw code in it for a day and abandon it. Truthfully I usually do this to play with new libraries and such but it would be nice to actually release something.</li>
</ul>
<p>So that&#8217;s all I can think about right now. Here&#8217;s to the new year! Thanks for reading.</p>
<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2013/01/01/looking-back-on-2012-ahead-to-2013/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.jblotus.com/2013/01/01/looking-back-on-2012-ahead-to-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Impressions: Cloud9 IDE + PHP</title>
		<link>http://www.jblotus.com/2012/12/25/first-impressions-of-cloud9-ide/</link>
		<comments>http://www.jblotus.com/2012/12/25/first-impressions-of-cloud9-ide/#comments</comments>
		<pubDate>Tue, 25 Dec 2012 23:44:20 +0000</pubDate>
		<dc:creator>jblotus</dc:creator>
				<category><![CDATA[IDE Love/Hate]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[Web Development / Programming]]></category>
		<category><![CDATA[ace editor]]></category>
		<category><![CDATA[cloud9]]></category>
		<category><![CDATA[cloud9 ide]]></category>
		<category><![CDATA[development environments]]></category>
		<category><![CDATA[online ide]]></category>
		<category><![CDATA[pair programming]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php ide]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[vagrant]]></category>

		<guid isPermaLink="false">http://www.jblotus.com/?p=928</guid>
		<description><![CDATA[<p>I love programming, but admittedly I absolutely hate setting up local development environments. I have been using tools like <a title="Go to the Vagrant Homepage" href="http://vagrantup.com/">Vagrant</a> and <a title="Go to the PuppetLabs Homepage" href="http://puppetlabs.com/">Puppet</a> to help ease the pain, but even then I find it tedious to get a quick project off the ground. This inevitably leads [...]]]></description>
				<content:encoded><![CDATA[<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2012/12/25/first-impressions-of-cloud9-ide/"></g:plusone></div><p>I love programming, but admittedly I absolutely hate setting up local development environments. I have been using tools like <a title="Go to the Vagrant Homepage" href="http://vagrantup.com/">Vagrant</a> and <a title="Go to the PuppetLabs Homepage" href="http://puppetlabs.com/">Puppet</a> to help ease the pain, but even then I find it tedious to get a quick project off the ground. This inevitably leads to me making some master development VM, but this stuff takes time and can kill an idea before I even lay down a single line of code. Well, what if I didn&#8217;t need to bother with that boring stuff anymore? I have been hearing about the <a title="Go to the Cloud9 IDE Homepage" href="https://c9.io/">Cloud9 online code editor</a> for a long time (based on the <a title="Go to the ACE Editor Homepage" href="http://ace.ajax.org/#nav=about">ACE Editor</a>) and thought maybe it would be suitable for some <a href="http://nodejs.org/">node.js</a> development. Little did I know how many features they are packing now for free into this awesome web applicaiton.</p>
<p><span id="more-928"></span></p>
<h3>Your code anywhere</h3>
<p>At first I though <strong>Cloud9</strong> would be a simple editor, perhaps a nice showcase of what you can do with HTML5 and some well-written javascript but it quickly became evident that this app was packing a lot of powerful features.</p>
<h4><span style="text-decoration: underline;" data-mce-mark="1">Features at a glance:</span></h4>
<ul>
<li>Integrated linux sandbox environment with pre-installed PHP, Node, MySQL, etc</li>
<li>Inline Shell access (no sudo and some other restrictions)</li>
<li>Easy connection to GitHub and BitBucket</li>
<li>Remote, multi-collaborator real-time editing (Pair programming anyone?)</li>
<li>512 MB of storage in the sandbox</li>
<li>Did I mention you can hop on to any computer and start coding right away?</li>
</ul>
<p>Sounds pretty awesome if you think about it. You can even connect you own server via SSH instead of using the build in sandbox (this is a paid feature).</p>
<h3>Is this the Holy-Grail?</h3>
<p><strong>Not Really, but it&#8217;s close. </strong>This is a very exciting product that almost reaches holy-grail status, but it falls short in a few key areas. Occasional stuttering, delays in the terminal and editor tabs are mood killers. Having to wait 5-10 seconds to save a file while in a cycle of test-driven-development is painful, which is something that happened to me quite frequently. You also will miss CTRL-Clicking into a method and other modern conveniences you get for free in editors like <a title="Why can’t someone just make a good IDE for PHP?" href="http://www.jblotus.com/2012/06/29/why-cant-someone-just-make-a-good-ide-for-php/">PHPStorm, NetBeans, etc</a>.</p>
<p>If you are a <strong>VIM</strong> person you probably won&#8217;t be 100% happy with the responsiveness and let&#8217;s face it, <a title="IDE or Text Editor" href="http://stackoverflow.com/questions/136056/ide-or-text-editor">you guys hate IDE&#8217;s</a>. To be fair you can pull up VI in a terminal window, but there are also some problems there. If you are used to a native terminal client or <a title="PuTTY Terminal Client" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTY</a>, the provided HTML5 terminal has some quirks, CTRL-C doesn&#8217;t work as expected and I also ran in to some issues with my local aliases disappearing.</p>
<h3>Let&#8217;s use PHP 5.5</h3>
<p>Some other complaints are that the built in versions for PHP are a bit low (5.3.3), an I&#8217;m not sure there is an obvious way to change this other than building from source. You do get <strong>PEAR</strong> and <strong>PECL</strong> pre-installed but I haven&#8217;t tried to do anything serious with that yet. It looks like you do have the ability to compile from source, but it takes awhile. I was unable to successfully build memcached but I was able to build <a title="PHP 5.5 Alpha" href="http://downloads.php.net/dsp/">PHP 5.5 alpha</a> (in about two hours) although due to permissions issues I had to do <span style="text-decoration: underline;" data-mce-mark="1">something like this</span>:</p>
<pre class="brush:shell">$ ./configure prefix=$HOME
$ make
$ make install

$ php -v                                                     
PHP 5.5.0alpha1 (cli) (built: Dec 25 2012 15:17:46)
Copyright (c) 1997-2012 The PHP Group       
Zend Engine v2.5.0-dev, Copyright (c) 1998-2012 Zend Technologies</pre>
<p>If you know your way around linux, you will probably have more luck than I did, but your mileage may vary.</p>
<h3>Is it FREE?</h3>
<p>Well it seems that just like GitHub  you can create<strong> unlimited public workspaces, with unlimited collaborators.</strong> If you need more than one private project and only want to give your team access, or you want to connect your own VM instead of using the built in sandbox &#8211; you will probably want to cough up the<em> $12/month</em>. If you are strictly experimenting or working on open-source there isn&#8217;t a lot to lose here.</p>
<h3>The Verdict</h3>
<p>The <strong>Cloud9</strong> team has done a great job removing the barriers to getting a simple idea out the door. I implemented <a title="FizzBuzz In PHP - A Test Drive of the Cloud9 IDE" href="https://github.com/jblotus/cloud9-php-fizzbuzz">FizzBuzz in PHP</a> using <a title="Composer PHP Dependency Management" href="http://getcomposer.org/">Composer</a>, <a title="PHPUnit Manual" href="http://www.phpunit.de/manual/current/en/index.html">PHPUnit</a>, and some<a title="PHP Standard PHP Library" href="http://php.net/manual/en/book.spl.php"> SPL interfaces</a> and got it all done , and posted to GitHub in about an hour. Since Apache is also installed, this is a really brain-dead simple way to prototype, or even work on non-trivial projects. I haven&#8217;t tried the multi-user editing yet, but it actually sounds like a lot of fun. Also, the whole thing is available independently of the online service so you can install Cloud9 locally (<a title="Cloud9 IDE GitHub Source" href="https://github.com/ajaxorg/cloud9/">check out the GitHub repo</a>).  What are you waiting for? Go <a title="Cloud9 IDE Signup" href="https://c9.io/">sign up</a> and/or check it out locally and let me know what you think in the comments section!</p>
<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2012/12/25/first-impressions-of-cloud9-ide/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.jblotus.com/2012/12/25/first-impressions-of-cloud9-ide/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Burnout</title>
		<link>http://www.jblotus.com/2012/12/19/burnout/</link>
		<comments>http://www.jblotus.com/2012/12/19/burnout/#comments</comments>
		<pubDate>Wed, 19 Dec 2012 20:43:55 +0000</pubDate>
		<dc:creator>jblotus</dc:creator>
				<category><![CDATA[Brain Dump]]></category>
		<category><![CDATA[Burnout]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Web Development / Programming]]></category>
		<category><![CDATA[brain dump]]></category>
		<category><![CDATA[burnout]]></category>

		<guid isPermaLink="false">http://www.jblotus.com/?p=919</guid>
		<description><![CDATA[<p>Start a blog post, type some words.  It&#8217;s crap, revise. Type it up again, brain freeze. Sigh.</p> <p>Frustrated, computer errors don&#8217;t help. Unbelievable. Should I check my email?</p> <p>One thousand projects and priorities. Kids need attention, but I&#8217;m busy not producing anything.</p> <p>To much pressure, inner critic too critical. Damn, vacation failed. Still cynical.</p> <p>I&#8217;ve got [...]]]></description>
				<content:encoded><![CDATA[<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2012/12/19/burnout/"></g:plusone></div><p>Start a blog post, type some words.  It&#8217;s <strong>crap</strong>, revise. Type it up again, brain freeze. Sigh.</p>
<p>Frustrated, computer errors don&#8217;t help. <strong>Unbelievable</strong>. <em>Should I check my email?</em></p>
<p>One thousand projects and priorities. Kids need attention, but I&#8217;m busy not producing anything.</p>
<p>To much pressure, inner critic too critical. Damn, vacation failed. <strong>Still cynical</strong>.</p>
<p>I&#8217;ve got an idea for a cool new app! Start coding, give up before writing a single line. <strong>Crap</strong>.</p>
<p>Energy sapped, no explanation. Eyes blurry, body aches. Sitting <strong>endlessly</strong>, body wasting.</p>
<p>But I&#8217;ve <strong>no time</strong> to wallow. The water from the fire hose demands a mouth to swallow.</p>
<p>Need to work harder, maybe smarter &#8211; <em>I&#8217;ll start tomorrow</em>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2012/12/19/burnout/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.jblotus.com/2012/12/19/burnout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why can&#8217;t someone just make a good IDE for PHP?</title>
		<link>http://www.jblotus.com/2012/06/29/why-cant-someone-just-make-a-good-ide-for-php/</link>
		<comments>http://www.jblotus.com/2012/06/29/why-cant-someone-just-make-a-good-ide-for-php/#comments</comments>
		<pubDate>Fri, 29 Jun 2012 01:29:54 +0000</pubDate>
		<dc:creator>jblotus</dc:creator>
				<category><![CDATA[Career]]></category>
		<category><![CDATA[IDE Love/Hate]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development / Programming]]></category>
		<category><![CDATA[dreamweaver]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[integrated development environment]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php ide]]></category>
		<category><![CDATA[phpstorm]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[software philosophy]]></category>
		<category><![CDATA[zend studio]]></category>

		<guid isPermaLink="false">http://www.jblotus.com/?p=851</guid>
		<description><![CDATA[<p>I think the first &#8220;<a href="http://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a>&#8221; I ever used for web development would have to be <a href="http://www.adobe.com/devnet/dreamweaver.html">Adobe Dreamweaver</a> (née Macromedia). Ok, so maybe it was <a href="http://en.wikipedia.org/wiki/Microsoft_FrontPage">Microsoft FrontPage</a>, but that shouldn&#8217;t really count. Dreamweaver for the novice held the promise of being able to easily create <a href="http://en.wikipedia.org/wiki/Dynamic_HTML">DHTML</a> animations and offered <a href="http://en.wikipedia.org/wiki/WYSIWYG">WYSIWYG</a> perfection [...]]]></description>
				<content:encoded><![CDATA[<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2012/06/29/why-cant-someone-just-make-a-good-ide-for-php/"></g:plusone></div><p>I think the first &#8220;<a href="http://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a>&#8221; I ever used for web development would have to be <a href="http://www.adobe.com/devnet/dreamweaver.html">Adobe Dreamweaver</a> (née Macromedia). Ok, so maybe it was <a href="http://en.wikipedia.org/wiki/Microsoft_FrontPage">Microsoft FrontPage</a>, but that shouldn&#8217;t really count. Dreamweaver for the novice held the promise of being able to easily create <a href="http://en.wikipedia.org/wiki/Dynamic_HTML">DHTML</a> animations and offered <a href="http://en.wikipedia.org/wiki/WYSIWYG">WYSIWYG</a> perfection for creating web interactive pages. All of the deployment you needed was built in (FTP) and you did get some sense that it was the best product on the market for doing web work (in fact it still might be for your average designer). This post is about my experience moving away from the oft-maligned program and some lessons learned in my quest for the perfect IDE.<br />
<span id="more-851"></span></p>
<h3>Ignorance is Bliss</h3>
<p>I wrote a ton of <a href="http://www.php.net/">PHP</a> code in Dreamweaver. In fact, I learned PHP while using Dreamweaver to edit <a href="http://www.joomla.org/">joomla</a> templates back when I was a &#8220;website manager&#8221;. I went on to write thousands of lines of code in Dreamweaver for about a year into my programming journey. Eventually though, I started to feel like I was missing out on something. I decided to search for dedicated PHP development software and realized were at least 10 IDE programs available for PHP and clearly Dreamweaver was not among them. I decided then and there that I needed to move forward and ditch my old reliable Dreamweaver.</p>
<p>As a novice, it was an <a href="http://coding.smashingmagazine.com/2009/02/11/the-big-php-ides-test-why-use-oneand-which-to-choose/">overwhelming experience even trying to pick an IDE</a>. I was writing a large website with <a href="http://cakephp.org/">CakePHP</a> at the time and figured that I would look around and see what others in that community were using. For the record, candidates included: <a href="http://www.activestate.com/komodo-ide">Komodo</a>, <a href="http://netbeans.org/features/php/">NetBeans</a>, <a href="http://www.eclipse.org/projects/project.php?id=tools.pdt">Eclipse PDT</a>, <a href="http://www.zend.com/en/products/studio/">Zend Studio</a>, <a href="http://www.jetbrains.com/phpstorm/">PHPStorm</a> and a few more. I downloaded a few different programs and had a difficult time evaluating them because after all, how would a beginner know what made for a good IDE? Additionally, some of these programs cost money and I did not have a penny to spare in those days. So it had to be free.</p>
<h3>NoobBeans</h3>
<p>I settled on NetBeans initially. I had heard of this nifty feature called &#8220;<a href="http://en.wikipedia.org/wiki/Autocomplete">code-completion</a>&#8221; and some people said that you could use it to <a href="http://bakery.cakephp.org/articles/SymenTimmermans/2009/01/21/model-based-code-insight-and-completion-in-netbeans">auto-complete model class relationships and methods for CakePHP</a>. I had mixed results with that, but in time code-completion in general was quickly becoming something that I could not live without. NetBeans also had built-in FTP and <a href="http://subversion.tigris.org/">SVN</a> integration. That was neat, especially since I had begun using version control with <a href="http://tortoisesvn.net/">TortoiseSVN </a>recently (it seemed important to learn). Eventually I found the auto-format code button, and realized my coding style was pretty sloppy compared to the corrections it was making.</p>
<p>I gave NetBeans a daily workout for a good year or two, but then I decided wanted to make mobile apps for a living. After learning that I needed a mac to make iPhone applications, I decided that I would have to <a href="http://developer.android.com/sdk/index.html">start out with android</a>. Of course this required me to learn Java, and also introduced me to Eclipse. Once I started using Eclipse in a Java context, I was starting to feel that net beans was lacking a ton of configuration options that eclipse offered. So I downloaded <a href="http://www.eclipse.org/projects/project.php?id=tools.pdt">Eclipse PDT</a>, which is basically a free version of Zend Studio.<strong> Now I felt powerful</strong>.</p>
<h3>The 7th Circle of Hell is called Eclipse</h3>
<p>When I started at a new company, I was assigned a pretty low spec machine to do PHP development work on. The codebase I was working on was also massive. Eclipse couldn&#8217;t keep up. Things were always building, indexing or validating! I could count on Eclipse crashing at least five times a day. Eventually I began fighting back by disabling validators and automatic project building. I was turning off feature after feature and started to long for the good old days of Dreamweaver.</p>
<p>Once my workstation was upgraded to an HP Intel i7 with 12 gigs of ram, most of my crashing problems started to go away. I also tried several favors of eclipse like Aptana, and finally ended up using Zend Studio on a trial basis. Zend Studio seemed at least a little bit better than Eclipse PDT, because it had refactoring features and a more advanced formatter amongst other things not included with PDT. I found zend studio to be a bit more stable, but ultimately the refactoring featurs never seemed to work for me, and the code formatter was just crappy. Now I found myself spending more time using the backspace, enter and delete keys to correct sends formatting wonkyness than actually coding. That is hyperbole, but I was starting to see why all the Ruby guys used Textmate or vim.</p>
<h3>It&#8217;s just a glorified text editor</h3>
<p>I hate <a title="VIM" href="http://www.vim.org/">vim</a>, and I&#8217;m not on a mac so <a title="TextMate" href="http://macromates.com/">textmate</a> is out. So along comes <a href="http://www.sublimetext.com/2">Sublime Text 2</a>. I started using Sublime Text casually on some of my hobby projects and I started to understand why people preferred a lighter text editor. Sometimes I just felt like the editor was reading mind and I never had performance issues. Still as much as I enjoy Sublime Text, I didn&#8217;t find that it gave me a productivity advantage overall. I personally don&#8217;t want to hop around my computer for different tools to get my code tested and deployed, which I don&#8217;t do as often with an IDE. Additionally, the speed of searching for code in my IDE is lightning fast and I could never achieve those results with a text editor.</p>
<p>So I was stuck with Zend Studio and i was afraid. I knew I was one corrupt workspace away from disaster. But it wasn&#8217;t all bad. I had a few macros, a few useful plugins and my workflow was sufficiently fast. I could live with this. Things went along fine for months, until I went to a meetup of the <a href="http://www.soflophp.org/">South Florida Php Users Group</a>. There I was introduced to <a href="http://www.jetbrains.com/phpstorm/">PHPStorm</a>. Just another IDE I thought to myself, as I debated the merits of switching from Eclipse. I was so damn wrong.</p>
<h3>Salvation is a (PHP)Storm</h3>
<p>I tried out PHPStorm for a free 30 day trial. Several ex-eclipse users can be wrong right? Besides I had some side projects to hack on and eclipse was borked on my laptop. Once up and running, PHPStorm made me a quick convert. Everything just worked better. The code completion was faster and more accurate, the settings easier to manage. Unlike Eclipse PDT, Zend Studio or <a href="http://aptana.com/">Aptana</a>, it didn&#8217;t feel like someone had grafted to php support onto a IDE written for programming in Java – although I&#8217;m sure PHPStorm is entirely based on <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a>.</p>
<p>Features starting popping up all the time that would pleasantly surprise me: <a title="Zen Coding Project Homepage" href="http://code.google.com/p/zen-coding/">Zen Coding support</a>, <a title="PHPStorm language injection" href="http://www.jetbrains.com/phpstorm/webhelp/language-injections.html">inline string language injection</a>, doc block validation and more. PHPStorm had all of the stuff Zend Studio gave me, but is mostly better implemented. Stability is also vey good, as I haven&#8217;t seen a crash yet in two months. My i5 laptop did have a bit of sluggishness on a really large project, but I tweaked a few settings and everything seemed reasonably fast again. I still run in to some annoyances with the code formatter and some incorrect code syntax warnings, but therein lies another lesson. I don&#8217;t think an IDE or any tool for that matter is free of blemishes.</p>
<h3>Always end on a Cliché</h3>
<p>Overall I think I will stick it out with PHPStorm for awhile. Looking back I realize that IDE&#8217;s have been a constant annoyance and yet have prompted so much growth and development in my skill level. I just plain work faster and write better code with an IDE. I also think that the problems I have ran into with IDE&#8217;s are true about software in general. We search for better solutions and always fall short.</p>
<p><strong>I am reminded of a famous quote:</strong></p>
<blockquote><p>Perfect is the enemy of good<em>  –<a title="Voltaire's famous quote about perfection" href="http://www.famous-quotes.net/Quote.aspx?The_perfect_is_the_enemy_of_the_good">Voltaire</a></em></p></blockquote>
<p>The reality is that I could probably still get a lot done in Dreamweaver, but it is the journey on the quest for improvement that can help us truly master our craft.</p>
<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2012/06/29/why-cant-someone-just-make-a-good-ide-for-php/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.jblotus.com/2012/06/29/why-cant-someone-just-make-a-good-ide-for-php/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Fighting Fear-Driven-Development w/ PHPUnit Slides</title>
		<link>http://www.jblotus.com/2012/04/14/fighting-fear-driven-development-w-phpunit-slides/</link>
		<comments>http://www.jblotus.com/2012/04/14/fighting-fear-driven-development-w-phpunit-slides/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 13:46:04 +0000</pubDate>
		<dc:creator>jblotus</dc:creator>
				<category><![CDATA[Career]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Web Development / Programming]]></category>
		<category><![CDATA[fear-driven-development]]></category>
		<category><![CDATA[giving a technical presentation]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test-driven-development]]></category>

		<guid isPermaLink="false">http://www.jblotus.com/?p=842</guid>
		<description><![CDATA[<p>I recently presented on one of my favorite topics at my local PHP user group, the <a href="http://www.soflophp.org/">South Florida PHP Users Group</a>. The talk was meant to be an introduction to <a href="http://www.phpunit.de/manual/current/en/index.html">PHPUnit </a>- I chose to dedicate some time to describing the need for automated testing. I think many PHP developers have a hard [...]]]></description>
				<content:encoded><![CDATA[<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2012/04/14/fighting-fear-driven-development-w-phpunit-slides/"></g:plusone></div><p>I recently presented on one of my favorite topics at my local PHP user group, the <a href="http://www.soflophp.org/">South Florida PHP Users Group</a>. The talk was meant to be an introduction to <a href="http://www.phpunit.de/manual/current/en/index.html">PHPUnit </a>- I chose to dedicate some time to describing the need for automated testing. I think many PHP developers have a hard time seeing the benefit of unit testing. My main point was that developers already do tons of manual testing, so why waste all those precious hours when you could simply get the computer to handle it for you.</p>
<p>These are they slides, feel free to grab them from slideshare. I will gladly answer any questions people have.</p>
<div id="__ss_12538302" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="Fighting Fear-Driven-Development With PHPUnit" href="http://www.slideshare.net/jblotus/fighting-feardrivendevelopment-with-phpunit" target="_blank">Fighting Fear-Driven-Development With PHPUnit</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/12538302" height="355" width="425" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/jblotus" target="_blank">James Fuller</a></div>
</div>
<div class="plus-one-wrap"><g:plusone href="http://www.jblotus.com/2012/04/14/fighting-fear-driven-development-w-phpunit-slides/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.jblotus.com/2012/04/14/fighting-fear-driven-development-w-phpunit-slides/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
