<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Jey Balachandran</title>
  <link href="http://jeybalachandran.com/atom.xml" rel="self"/>
  <link href="http://jeybalachandran.com/"/>
  <updated>2012-05-27T20:14:12-07:00</updated>
  <id>http://jeybalachandran.com</id>
  <author>
   <name>Jey Balachandran</name>
  </author>

  
    <entry>
     <title>San Francisco Caltrain Punchcard</title>
     <link href="http://jeybalachandran.com/posts/San-Francisco-Caltrain-Punchcard"/>
     <updated>2012-05-27T00:00:00-07:00</updated>
     <id>http://jeybalachandran.com/posts/San-Francisco-Caltrain-Punchcard</id>
     <content type="html">&lt;p&gt;I found GitHub&amp;rsquo;s punchcard a very useful visualization for displaying data.
Thus I wrote my own using &lt;a href=&quot;http://d3js.org/&quot;&gt;d3&lt;/a&gt;. You can find the source over
at my GitHub repository &lt;a href=&quot;https://github.com/jeyb/d3.punchcard&quot;&gt;jeyb/d3.punchcard&lt;/a&gt;.
To show an example, the punchcard below shows the San Francisco southbound
schedule and the San Mateo northbound schedule. Clearly the Caltrain is tailored
toward the 9-5 crowd.&lt;/p&gt;

&lt;div id=&quot;caltrain&quot;&gt;
  &lt;a href=&quot;javascript:showData(sf_southbound); $('#caltrain a').removeClass('selected'); $('#caltrain a:first').addClass('selected');&quot; class=&quot;selected&quot;&gt;San Francisco Southbound&lt;/a&gt;
  &lt;a href=&quot;javascript:showData(sm_northbound); $('#caltrain a').removeClass('selected'); $('#caltrain a:last').addClass('selected');&quot;&gt;San Mateo Northbound&lt;/a&gt;
&lt;/div&gt;




&lt;div id=&quot;punchcard&quot;&gt;&lt;/div&gt;


&lt;script src=&quot;//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;


&lt;script src=&quot;http://d3js.org/d3.v2.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;


&lt;script src=&quot;/js/jquery.tipsy.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;


&lt;script src=&quot;/js/d3.punchcard.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

</content>
    </entry>
  
    <entry>
     <title>Gemfile.local</title>
     <link href="http://jeybalachandran.com/posts/Gemfile.local"/>
     <updated>2012-03-30T00:00:00-07:00</updated>
     <id>http://jeybalachandran.com/posts/Gemfile.local</id>
     <content type="html">&lt;p&gt;Bundler is excellent for managing dependencies of my applications but not for
managing my custom dependencies. There are gems that I&amp;rsquo;d like to use locally,
knowing their implications, without forcing that behavior on other developers
or designers on the team. One such gem is &lt;a href=&quot;https://github.com/thedarkone/rails-dev-boost&quot;&gt;rails-dev-boost&lt;/a&gt;,
which speeds up my development environment considerably. &lt;code&gt;Gemfile.local&lt;/code&gt; solves
this limitation. Create &lt;code&gt;Gemfile.local&lt;/code&gt; at &lt;code&gt;Rails.root&lt;/code&gt; with the following
content.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;  &lt;span class=&quot;nb&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;Gemfile&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;group&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:development&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;rails-dev-boost&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:git&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;git://github.com/thedarkone/rails-dev-boost.git&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:require&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;rails_development_boost&amp;#39;&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Then execute these commands from &lt;code&gt;Rails.root&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt; &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt; cp Gemfile.lock Gemfile.local.lock
 &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;BUNDLE_GEMFILE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;Gemfile.local bundle
 &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;$(cat .gitignore)\nGemfile.local\nGemfile.local.lock&amp;quot;&lt;/span&gt; &amp;gt; .gitignore
 &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt; git commit -m &lt;span class=&quot;s2&quot;&gt;&amp;quot;Added Gemfile.local to .gitignore.&amp;quot;&lt;/span&gt; .gitignore
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Whenever you need to use your custom &lt;code&gt;Gemfile.local&lt;/code&gt; you can prepend the command
with &lt;code&gt;BUNDLE_GEMFILE=Gemfile.local bundle exec&lt;/code&gt;. For example, start the rails
server by executing &lt;code&gt;BUNDLE_GEMFILE=Gemfile.local bundle exec rails s&lt;/code&gt; and
enjoy the benefits of your custom Gemfile.&lt;/p&gt;
</content>
    </entry>
  
    <entry>
     <title>Thin and Fat Arrows in CoffeeScript</title>
     <link href="http://jeybalachandran.com/posts/thin-and-fat-arrows-in-coffeescript"/>
     <updated>2012-02-13T00:00:00-08:00</updated>
     <id>http://jeybalachandran.com/posts/thin-and-fat-arrows-in-coffeescript</id>
     <content type="html">&lt;p&gt;The difference between &lt;code&gt;-&amp;gt;&lt;/code&gt; and &lt;code&gt;=&amp;gt;&lt;/code&gt; is often overlooked due to the ease of
always using &lt;code&gt;=&amp;gt;&lt;/code&gt;. We can grasp the difference by this example which should
trigger a &lt;code&gt;console.log()&lt;/code&gt; when an element is clicked and double-clicked.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;coffeescript&quot;&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;callback = &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;    &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Callback triggered!&amp;#39;&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;#id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bind&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;click&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;@callback&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;#id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bind&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;dbclick&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;@callback&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;__bind&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;me&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;me&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;arguments&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;callback&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;Callback triggered!&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;#id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bind&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;click&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// this is bound to the HTML element, which has no callback() function.&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;#id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bind&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;dbclick&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;__bind&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// this is bound to the local context by __bind(), which does have a callback() function.&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;If we were to click on the bound element, it would cause a JavaScript error
since there is no &lt;code&gt;callback()&lt;/code&gt; function in this context. jQuery&amp;rsquo;s &lt;code&gt;bind()&lt;/code&gt;
function assigns the HTML element as the context.&lt;/p&gt;

&lt;p&gt;Dissimilarly, if we were to double-click on the bound element it would trigger
the &lt;code&gt;callback()&lt;/code&gt; function. The &lt;code&gt;__bind()&lt;/code&gt; function defined on line 1 uses &lt;a href=&quot;https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/apply&quot;&gt;apply&lt;/a&gt;
to assign the correct context. The same behavior can be replicated by using &lt;a href=&quot;http://api.jquery.com/jQuery.proxy/&quot;&gt;jQuery.proxy&lt;/a&gt;
as follows.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;coffeescript&quot;&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;callback = &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;    &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Callback triggered!&amp;#39;&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;#id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bind&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;click&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;@callback&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;#id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bind&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;dbclick&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;jQuery&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;    &lt;span class=&quot;nx&quot;&gt;@callback&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;callback&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;Callback triggered!&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;#id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bind&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;click&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// this is bound to the HTML element, which has no callback() function.&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;#id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bind&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;dbclick&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;jQuery&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// this is bound to the local context by jQuery.proxy(), which does have a callback() function.&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;



</content>
    </entry>
  
    <entry>
     <title>Scarce startup culture of Toronto</title>
     <link href="http://jeybalachandran.com/posts/scarce-startup-culture-of-toronto"/>
     <updated>2012-02-12T00:00:00-08:00</updated>
     <id>http://jeybalachandran.com/posts/scarce-startup-culture-of-toronto</id>
     <content type="html">&lt;p&gt;I lived in Toronto for fifteen years, I &lt;em&gt;still&lt;/em&gt; call it home. There was no
shortage of jobs for skilled Ruby, Rails or JavaScript developers. The
available options, however, left a yearning desire. Notable Ruby on Rails shops
focused on consulting; I wanted to focus on a product. Others are subsidiaries
of organizations that drank the Rails Kool-Aid. The remaining few fought tooth
and nail to receive funding. For these reasons, I moved to San Francisco.&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s been slightly over a year since I moved and began work for Doximity. Prior
to my first day on the job, I&amp;rsquo;ve never been to San Francisco. In hindsight, it
was the best move for my career. Working in the San Francisco bay area has
honed my skills as a developer. Talented people who focus on sharing knowledge,
large array of meetups where one can collaborate on ideas, startups that
contribute to the open-source community, all sums up to make this an idyllic
city for developers.&lt;/p&gt;

&lt;p&gt;From the perspective of a Torontonian, I am amazed by how much this city
revolves around startups and technology. I hope one day Toronto can become an
incubator for startups. The talent exists, attaining funding remains difficult.
Unfortunately, nobody in Toronto wants to fund something that isn&amp;rsquo;t already
generating revenue.&lt;/p&gt;
</content>
    </entry>
  
</feed>
