<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Site-Server v@build.version@ (http://www.squarespace.com) on Wed, 08 Apr 2026 18:37:24 GMT
--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://www.rssboard.org/media-rss" version="2.0"><channel><title>Murali Narasimhan</title><link>http://www.muralinarasimhan.com/</link><lastBuildDate>Tue, 16 Feb 2016 12:04:26 +0000</lastBuildDate><language>en-US</language><generator>Site-Server v@build.version@ (http://www.squarespace.com)</generator><description><![CDATA[]]></description><item><title>Yo state of mind</title><category>Thoughts</category><dc:creator>Murali Narasimhan</dc:creator><pubDate>Thu, 10 Jul 2014 16:44:13 +0000</pubDate><link>http://www.muralinarasimhan.com/blog/2014/7/10/yo-state-of-mind</link><guid isPermaLink="false">53b3e127e4b047499e3f161e:53b3e645e4b005e321102d42:53bec228e4b045e0f81b43ec</guid><description><![CDATA[<a class="m-story" data-collapsed="true" href="https://medium.com/@murali/yo-state-of-mind-91fecea6f211">Yo state of mind</a>]]></description></item><item><title>Meteor and Telescope</title><category>Technology</category><dc:creator>Murali Narasimhan</dc:creator><pubDate>Thu, 10 Jul 2014 11:35:20 +0000</pubDate><link>http://www.muralinarasimhan.com/blog/2014/7/10/meteor-and-telescope</link><guid isPermaLink="false">53b3e127e4b047499e3f161e:53b3e645e4b005e321102d42:53be7136e4b0df823912ebbf</guid><description><![CDATA[<p><a target="_blank" href="https://www.meteor.com/">Meteor</a> is an open source real time JavaScript framework for building web apps. <a target="_blank" href="http://telesc.pe/">Telescope</a> is a fabulous implementation of the <a target="_blank" href="https://www.meteor.com/">meteor</a> framework created by <a target="_blank" href="http://sachagreif.com/">Sacha Greif</a>. You can use Telescope to build your own social news website similar to <a target="_blank" href="http://news.ycombinator.com/">Hacker News</a> or <a target="_blank" href="http://www.reddit.com">Reddit</a>. Sacha has recently released a <a target="_blank" href="http://telesc.pe/blog/telescope-v09-modulescope/">new version</a> of Telescope. The new version includes a great feature called "Post Modules" that allows you to add or remove features from Telescope in a modular fashion. I am using an older version of Telescope on <a target="_blank" href="http://www.stackde.com">stackde.com</a> which did not come with a default implementation for embedding images with your posts using <a target="_blank" href="http://www.embedly.com">Embedly</a>. I had to some minor hacks to get Embedly working with Telescope. You can find the changes in the gist <a target="_blank" href="https://gist.github.com/muralinarasimhan/f15e79d4cebb7f9704b3">here</a>. But in the new version of Telescope, you can use the Post Modules feature to enable the Embedly feature in a much cleaner way. Sacha has a great post that demonstrates doing just that. Check out the post <a target="_blank" href="http://telesc.pe/blog/extending-telescope-with-embedly-thumbnails">here.</a></p><p>For an excellent introduction to the <a target="_blank" href="http://www.meteor.com">meteor</a> framework watch this video by <a target="_blank" href="http://sachagreif.com/">Sacha</a>.</p>























<img data-load="false" data-image-focal-point="0.5,0.5" src="http://i1.ytimg.com/vi/q9pA2xApdY0/hqdefault.jpg?format=1000w" />


  <p id="yui_3_17_2_1_1404991866421_11596"><br></p><p id="yui_3_17_2_1_1404991866421_10109"><br></p><p><br></p>]]></description></item><item><title>The Long Tail of Mediocrity</title><category>Thoughts</category><dc:creator>Murali Narasimhan</dc:creator><pubDate>Sun, 06 Jul 2014 20:16:48 +0000</pubDate><link>http://www.muralinarasimhan.com/blog/2014/7/6/the-long-tail-of-mediocrity</link><guid isPermaLink="false">53b3e127e4b047499e3f161e:53b3e645e4b005e321102d42:53b9ad91e4b0657eb1ace1c4</guid><description><![CDATA[<a class="m-story" data-collapsed="true" href="https://medium.com/@murali/the-long-tail-of-mediocrity-a63ebccf6d3a">The Long Tail of Mediocrity</a>]]></description></item><item><title>"require"d Reading</title><category>Technology</category><dc:creator>Murali Narasimhan</dc:creator><pubDate>Wed, 02 Jul 2014 12:25:33 +0000</pubDate><link>http://www.muralinarasimhan.com/blog/2014/7/2/required-reading</link><guid isPermaLink="false">53b3e127e4b047499e3f161e:53b3e645e4b005e321102d42:53b3ea31e4b0f3ce5756ebaf</guid><description><![CDATA[<p><code>var myModule=require("./myModule");
</code></p>



  <p>Using <strong>require</strong> like this assigns the value of <strong>module.exports</strong> from the module myModule. Our myModule looks like this:</p>
























  
    <pre class="source-code"><span class="cm-comment">//myModule.js</span>
<span class="cm-keyword">var</span> <span class="cm-variable">func1</span><span class="cm-operator">=</span><span class="cm-keyword">function</span>(<span class="cm-def">a</span>){
  <span class="cm-keyword">return</span> <span class="cm-variable-2">a</span><span class="cm-operator">*</span><span class="cm-variable-2">a</span>;
}
<span class="cm-variable">exports</span>.<span class="cm-property">func1</span><span class="cm-operator">=</span><span class="cm-variable">func1</span>;</pre>
  




  <p>Wait a minute! We are using <strong>exports</strong> to export the functions from the module, not <strong>module.exports</strong>. Are they the same? Turns out that <strong>exports</strong> is a reference to <strong>module.exports</strong> that is shorter to type. <strong>exports</strong> is not global but local to each module.</p><p>It is like declaring the following at the top of each of your modules:</p>
























  
    var exports=module.exports;
  




  <p>All of this works fine if we are assigning all the exports from your module as properties (like in the myModule definition above). What happens if we did something like this:</p>
























  
    <pre class="source-code"><span class="cm-comment">//myModule.js</span>
<span class="cm-keyword">var</span> <span class="cm-variable">func1</span><span class="cm-operator">=</span><span class="cm-keyword">function</span>(<span class="cm-def">a</span>){
<span class="cm-keyword">return</span> <span class="cm-variable-2">a</span><span class="cm-operator">*</span><span class="cm-variable-2">a</span>;
}
<span class="cm-variable">exports</span><span class="cm-operator">=</span><span class="cm-variable">func1</span>;</pre>
  




  <p>Nothing gets exported - <strong>module.exports</strong> will be empty. Why? Remember <strong>exports</strong> is just a variable and when we assign something else to it, it is no longer referring to <strong>module.exports</strong>.</p><p>If you need to export a function or a complete object from your module, assign it to <strong>module.exports</strong> instead of <strong>exports</strong>.</p>
























  
    <pre class="source-code"><span class="cm-comment">//myModule.js</span>
<span class="cm-keyword">var</span> <span class="cm-variable">func1</span><span class="cm-operator">=</span><span class="cm-keyword">function</span>(<span class="cm-def">a</span>){
<span class="cm-keyword">return</span> <span class="cm-variable-2">a</span><span class="cm-operator">*</span><span class="cm-variable-2">a</span>;
}
<span class="cm-keyword">module</span>.<span class="cm-variable">exports</span><span class="cm-operator">=</span><span class="cm-variable">func1</span>;</pre>]]></description></item></channel></rss>