<?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>Joan Llenas</title>
	<atom:link href="http://www.joangarnet.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.joangarnet.com</link>
	<description>Software development</description>
	<lastBuildDate>Fri, 08 Apr 2016 22:31:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.4.4</generator>
	<item>
		<title>Reactive programming with RxJS</title>
		<link>http://www.joangarnet.com/?p=2125</link>
		<comments>http://www.joangarnet.com/?p=2125#respond</comments>
		<pubDate>Fri, 08 Apr 2016 22:20:26 +0000</pubDate>
		<dc:creator><![CDATA[Joan Llenas]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[RxJS]]></category>

		<guid isPermaLink="false">http://www.joangarnet.com/?p=2125</guid>
		<description><![CDATA[RxJS is a set of APIs that unifies the way you interact with collections and events. The main actors are Observables and Observers, but the full power of the library is the rich set of operators and schedulers that you can combine to achieve really complex data processing and orchestration in a very expressive and &#8230; <a href="http://www.joangarnet.com/?p=2125" class="more-link">Continue reading <span class="screen-reader-text">Reactive programming with RxJS</span></a>]]></description>
				<content:encoded><![CDATA[<p>RxJS is a set of APIs that unifies the way you interact with collections and events.<br />
The main actors are Observables and Observers, but the full power of the library is the rich set of operators and schedulers that you can combine to achieve really complex data processing and orchestration in a very expressive and declarative way.</p>
<p><strong>Observables push values to subscribers.</strong><br />
<iframe width="100%" height="300" src="//jsfiddle.net/joanllenas/7wwx0xff/embedded/js/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
<p><strong>You can convert different data types to Observables.</strong><br />
<iframe width="100%" height="300" src="//jsfiddle.net/joanllenas/t7kbkrpd/embedded/js/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
<p><strong>There are a few shortcut operators to create common <em>special</em> Observables.</strong><br />
<iframe width="100%" height="300" src="//jsfiddle.net/joanllenas/hkyyov6p/embedded/js/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
<p><strong>To stream values over time you can use schedulers.</strong><br />
<iframe width="100%" height="300" src="//jsfiddle.net/joanllenas/gra7j5f4/embedded/js/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
<p><strong>Finally, you can unsubscribe from an Observable  to stop recibing data.</strong><br />
<iframe width="100%" height="300" src="//jsfiddle.net/joanllenas/25dnwmvw/embedded/js/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
<p>That just scratches the surface of what can be achieved with Observables.<br />
To find out more about RxJS check the <a href="https://github.com/ReactiveX/rxjs">RxJS github repo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joangarnet.com/?feed=rss2&#038;p=2125</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mocking jQuery selector calls with Jasmine</title>
		<link>http://www.joangarnet.com/?p=2098</link>
		<comments>http://www.joangarnet.com/?p=2098#respond</comments>
		<pubDate>Thu, 17 Sep 2015 13:42:59 +0000</pubDate>
		<dc:creator><![CDATA[Joan Llenas]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://www.joangarnet.com/?p=2098</guid>
		<description><![CDATA[It looks like you can mock jQuery selector api calls by spying on $.fn.find or $.fn.init. In the case of #ID selectors it works different and document.getElementById() is used. I have proof:]]></description>
				<content:encoded><![CDATA[<p>It looks like you can mock jQuery selector api calls by spying on <code>$.fn.find</code> or <code>$.fn.init</code>. In the case of #ID selectors it works different and <code>document.getElementById()</code> is used.<br />
I have proof:<br />
<iframe width="100%" height="400" src="//jsfiddle.net/joanllenas/64jeyfvc/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joangarnet.com/?feed=rss2&#038;p=2098</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing constructors</title>
		<link>http://www.joangarnet.com/?p=2070</link>
		<comments>http://www.joangarnet.com/?p=2070#respond</comments>
		<pubDate>Mon, 29 Jun 2015 21:52:20 +0000</pubDate>
		<dc:creator><![CDATA[Joan Llenas]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://www.joangarnet.com/?p=2070</guid>
		<description><![CDATA[When you need to test what is happening inside a constructor it&#8217;s not obvious how to do it, because it looks like you can&#8217;t spy the SUT when you haven&#8217;t even created an instance. Well, thanks to JavaScript&#8217;s prototypal nature you can spy on the prototype object directly, just like you would do with any &#8230; <a href="http://www.joangarnet.com/?p=2070" class="more-link">Continue reading <span class="screen-reader-text">Testing constructors</span></a>]]></description>
				<content:encoded><![CDATA[<p>When you need to test what is happening inside a constructor it&#8217;s not obvious how to do it, because it looks like you can&#8217;t spy the SUT when you haven&#8217;t even created an instance.<br />
Well, thanks to JavaScript&#8217;s prototypal nature you can spy on the prototype object directly, just like you would do with any instance:</p>
<p><iframe width="100%" height="300" src="//jsfiddle.net/joanllenas/j5o5dhu8/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joangarnet.com/?feed=rss2&#038;p=2070</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jasmine spy.and.callFake scope</title>
		<link>http://www.joangarnet.com/?p=2064</link>
		<comments>http://www.joangarnet.com/?p=2064#respond</comments>
		<pubDate>Thu, 25 Jun 2015 16:18:40 +0000</pubDate>
		<dc:creator><![CDATA[Joan Llenas]]></dc:creator>
				<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://www.joangarnet.com/?p=2064</guid>
		<description><![CDATA[When using Jasmine&#8217;s spy.and.callFake, the function execution happens within the spied instance. This fact is not documented elsewhere but it&#8217;s interesting anyway, because it allows some neat tricks. Some tests to illustrate the scenario:]]></description>
				<content:encoded><![CDATA[<p>When using Jasmine&#8217;s <a href="http://jasmine.github.io/2.3/introduction.html#section-Spies">spy.and.callFake</a>, the function execution happens within the spied instance.<br />
This fact is not documented elsewhere but it&#8217;s interesting anyway, because it allows some neat tricks.<br />
Some tests to illustrate the scenario:<br />
<iframe width="100%" height="300" src="//jsfiddle.net/joanllenas/zm0cabp9/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joangarnet.com/?feed=rss2&#038;p=2064</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cordova projects and npm modules</title>
		<link>http://www.joangarnet.com/?p=2017</link>
		<comments>http://www.joangarnet.com/?p=2017#respond</comments>
		<pubDate>Wed, 07 Jan 2015 10:18:19 +0000</pubDate>
		<dc:creator><![CDATA[Joan Llenas]]></dc:creator>
				<category><![CDATA[Cordova/Phonegap]]></category>

		<guid isPermaLink="false">http://www.joangarnet.com/?p=2017</guid>
		<description><![CDATA[It may sound obvious but I did it wrong for a while&#8230; When you create a Cordova (Phonegap) application and you want to use npm modules don&#8217;t add them within the www folder, use the Cordova project root instead, otherwise the generated node_modules folder will get compiled and added to your build. The final project &#8230; <a href="http://www.joangarnet.com/?p=2017" class="more-link">Continue reading <span class="screen-reader-text">Cordova projects and npm modules</span></a>]]></description>
				<content:encoded><![CDATA[<p>It may sound obvious but I did it wrong for a while&#8230;<br />
When you create a Cordova (Phonegap) application and you want to use npm modules don&#8217;t add them within the <strong>www</strong> folder, use the Cordova project root instead, otherwise the generated <strong>node_modules</strong> folder will get compiled and added to your build.<br />
The final project structure (as of Cordova 4.0) should look something like this:</p>
<pre>
+---MyCordovaApp
|   \---hooks
|   \---node_modules
|   \---platforms
|   \---plugins
|   \---www
|   \---config.xml
|   \---package.json // npm project config file
|   \---gulpfile.js // Gulp config file
|   \---karma.conf.js // Karma test runner config file
</pre>
<p>The node_modules folder is safe here, it won&#8217;t be added to the app build.<br />
The only thing that you have to bear in mind is that configuration files paths have to be prefixed with <strong>www</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joangarnet.com/?feed=rss2&#038;p=2017</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The (sometimes) annoying Chrome dev-tools Inspector tooltip</title>
		<link>http://www.joangarnet.com/?p=2011</link>
		<comments>http://www.joangarnet.com/?p=2011#respond</comments>
		<pubDate>Mon, 29 Dec 2014 23:26:32 +0000</pubDate>
		<dc:creator><![CDATA[Joan Llenas]]></dc:creator>
				<category><![CDATA[Tips and tricks]]></category>

		<guid isPermaLink="false">http://www.joangarnet.com/?p=2011</guid>
		<description><![CDATA[When you are inspecting the DOM in Chrome Dev-tools there&#8217;s a yellowish tooltip that displays information about the currently hovered HTML node. To get rid of it just press CMD (OSX) or CTRL (WIN) while hovering the Element&#8217;s panel in dev-tools. Happy inspecting :)]]></description>
				<content:encoded><![CDATA[<p>When you are inspecting the DOM in Chrome Dev-tools there&#8217;s a yellowish tooltip that displays information about the currently hovered HTML node.</p>
<p><img src="http://i0.wp.com/www.joangarnet.com/wp-content/uploads/2014/12/Screen-Shot-2014-12-30-at-00.09.461.png?resize=476%2C88" alt="" class="alignnone size-full wp-image-2014" srcset="http://i0.wp.com/www.joangarnet.com/wp-content/uploads/2014/12/Screen-Shot-2014-12-30-at-00.09.461.png?resize=300%2C55 300w, http://i0.wp.com/www.joangarnet.com/wp-content/uploads/2014/12/Screen-Shot-2014-12-30-at-00.09.461.png?w=476 476w" sizes="(max-width: 476px) 100vw, 476px" data-recalc-dims="1" /></p>
<p><strong>To get rid of it just press CMD (OSX) or CTRL (WIN) while hovering the Element&#8217;s panel in dev-tools</strong>.</p>
<p>Happy inspecting :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joangarnet.com/?feed=rss2&#038;p=2011</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ng-click and stopPropagation()</title>
		<link>http://www.joangarnet.com/?p=1976</link>
		<comments>http://www.joangarnet.com/?p=1976#respond</comments>
		<pubDate>Sun, 23 Nov 2014 13:12:11 +0000</pubDate>
		<dc:creator><![CDATA[Joan Llenas]]></dc:creator>
				<category><![CDATA[AngularJS]]></category>

		<guid isPermaLink="false">http://www.joangarnet.com/?p=1976</guid>
		<description><![CDATA[I have a calendar grid where each grid cell has an ng-click handler that takes me to the day&#8217;s detail view. At the same time, each grid cell can have an indeterminate amount of events associated, each with an ng-click handler associated that displays the selected event details on a popover. As you can see &#8230; <a href="http://www.joangarnet.com/?p=1976" class="more-link">Continue reading <span class="screen-reader-text">ng-click and stopPropagation()</span></a>]]></description>
				<content:encoded><![CDATA[<p>I have a calendar grid where each grid cell has an ng-click handler that takes me to the day&#8217;s detail view.<br />
At the same time, each grid cell can have an indeterminate amount of events associated, each with an ng-click handler associated that displays the selected event details on a popover.</p>
<p>As you can see there&#8217;s a conflict here. When you click on a calendar event there will be two ng-click handlers executed (because the event is <a href="https://developer.mozilla.org/en-US/docs/Web/API/Event.bubbles">bubbling</a>), one will display the popover and the other one will go to the day&#8217;s detail view. Not what we want.<br />
Thankfully ng-click scope exposes the <a href="https://docs.angularjs.org/guide/expression#-event-">$event</a> property, which is the DOM event being propagated.<br />
You can use the DOM event <a href="https://developer.mozilla.org/en-US/docs/Web/API/Event.stopPropagation">stopPropagation()</a> method to stop event propagation.</p>
<p><iframe width="100%" height="300" src="http://jsfiddle.net/joanllenas/vv1ecf6k/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
<p><strong>Related:</strong></p>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Event.stopPropagation">event.stopPropagation()</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Event.bubbles">event.bubbles</a></li>
<li><a href="https://docs.angularjs.org/guide/expression#-event-">$event</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.joangarnet.com/?feed=rss2&#038;p=1976</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git: change filename case</title>
		<link>http://www.joangarnet.com/?p=1973</link>
		<comments>http://www.joangarnet.com/?p=1973#respond</comments>
		<pubDate>Sat, 08 Nov 2014 18:24:26 +0000</pubDate>
		<dc:creator><![CDATA[Joan Llenas]]></dc:creator>
				<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.joangarnet.com/?p=1973</guid>
		<description><![CDATA[Whe you modify a filename by just changing to upper/lowercase Git won&#8217;t detect it (at least on OSX). When you want to perform such action you have to explicitly tell Git what&#8217;s changed. Say we have the helloWorld.js file already commited but we want to actually call it HelloWorld.js. The following Git command will do &#8230; <a href="http://www.joangarnet.com/?p=1973" class="more-link">Continue reading <span class="screen-reader-text">Git: change filename case</span></a>]]></description>
				<content:encoded><![CDATA[<p>Whe you modify a filename by just changing to upper/lowercase Git won&#8217;t detect it (at least on OSX).<br />
When you want to perform such action you have to explicitly tell Git what&#8217;s changed.<br />
Say we have the <strong>helloWorld.js</strong> file already commited but we want to actually call it <strong>HelloWorld.js</strong>.<br />
The following Git command will do the trick:</p>
<pre>
$ git mv -f helloWorld.js HelloWorld.js
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.joangarnet.com/?feed=rss2&#038;p=1973</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frameworkless full-height mobile app CSS layout</title>
		<link>http://www.joangarnet.com/?p=1931</link>
		<comments>http://www.joangarnet.com/?p=1931#respond</comments>
		<pubDate>Fri, 26 Sep 2014 21:20:08 +0000</pubDate>
		<dc:creator><![CDATA[Joan Llenas]]></dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Mobile apps]]></category>

		<guid isPermaLink="false">http://www.joangarnet.com/?p=1931</guid>
		<description><![CDATA[A few CSS tricks to emulate a native mobile application layout. I hate the fact that inline-block elements don&#8217;t support spaces between them, it&#8217;s weird&#8230; (view fullscreen) Related: learnlayout.com Absolute, Relative, Fixed Positioning: How Do They Differ? detect number of children an element has with css Useful :nth-child Recipes]]></description>
				<content:encoded><![CDATA[<p>A few CSS tricks to emulate a native mobile application layout.<br />
I hate the fact that inline-block elements don&#8217;t support spaces between them, it&#8217;s weird&#8230;<br />
(<a href="http://jsfiddle.net/joanllenas/6zojkm48/embedded/result/">view fullscreen</a>)<br />
<iframe width="100%" height="300" src="http://jsfiddle.net/joanllenas/6zojkm48/embedded/result,html,css/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
<p><strong>Related:</strong></p>
<ul>
<li><a href="http://learnlayout.com/">learnlayout.com</a></li>
<li><a href="http://css-tricks.com/absolute-relative-fixed-positioining-how-do-they-differ/">Absolute, Relative, Fixed Positioning: How Do They Differ?</a></li>
<li><a href="http://stackoverflow.com/a/12198561/779529">detect number of children an element has with css</a></li>
<li><a href="http://css-tricks.com/useful-nth-child-recipies/">Useful :nth-child Recipes</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.joangarnet.com/?feed=rss2&#038;p=1931</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AngularJS Loading Bar</title>
		<link>http://www.joangarnet.com/?p=1928</link>
		<comments>http://www.joangarnet.com/?p=1928#respond</comments>
		<pubDate>Thu, 25 Sep 2014 08:08:46 +0000</pubDate>
		<dc:creator><![CDATA[Joan Llenas]]></dc:creator>
				<category><![CDATA[AngularJS]]></category>

		<guid isPermaLink="false">http://www.joangarnet.com/?p=1928</guid>
		<description><![CDATA[An automatic loading bar using angular interceptors. It works automatically, so simply include it as a dependency and it will automatically display the progress of your $http requests. Related: Demo: https://chieffancypants.github.io/angular-loading-bar/ GitHub repo: https://github.com/chieffancypants/angular-loading-bar]]></description>
				<content:encoded><![CDATA[<p>An automatic loading bar using angular interceptors.<br />
It works automatically, so simply include it as a dependency and it will automatically display the progress of your <strong>$http</strong> requests.</p>
<p><strong>Related:</strong></p>
<ul>
<li>Demo: <a href="https://chieffancypants.github.io/angular-loading-bar/">https://chieffancypants.github.io/angular-loading-bar/</a></li>
<li>GitHub repo: <a href="https://github.com/chieffancypants/angular-loading-bar">https://github.com/chieffancypants/angular-loading-bar</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.joangarnet.com/?feed=rss2&#038;p=1928</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
