<?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>Javascript Kata &#187; white belt</title>
	<atom:link href="http://www.javascriptkata.com/category/level/white-belt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javascriptkata.com</link>
	<description>Advanced katas for javascripters</description>
	<lastBuildDate>Tue, 15 Jun 2010 14:21:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Error with hashes in IE but not in Firefox</title>
		<link>http://www.javascriptkata.com/2010/04/06/error-with-hashes-in-ie-but-not-in-firefox/</link>
		<comments>http://www.javascriptkata.com/2010/04/06/error-with-hashes-in-ie-but-not-in-firefox/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 12:55:59 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[white belt]]></category>

		<guid isPermaLink="false">http://www.javascriptkata.com/?p=181</guid>
		<description><![CDATA[There&#8217;s a common error that happens quite a lot on IE only and never on Firefox. You search it, you check all your variables, you comment your code to the bare minimum but you can never find it. Stop looking! Here&#8217;s the answer. You probably just forgot a comma (,) at the end of a [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a common error that happens quite a lot on IE only and never on Firefox. You search it, you check all your variables, you comment your code to the bare minimum <strong>but you can never find it</strong>.</p>
<p><strong>Stop looking! Here&#8217;s the answer.</strong></p>
<p>You probably just forgot a comma (,) at the end of a hash. Here&#8217;s an example :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> val = <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; cat:<span class="st0">&quot;Mistigri&quot;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; dog:<span class="st0">&quot;Rex&quot;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; butler:<span class="st0">&quot;Jeeves&quot;</span>, <span class="co1">// There&#8217;s an extra comma</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>You see the extra comma at the string &#8220;Jeeves&#8221;? This what causes the problem. <strong>Firefox handles an extra comma nicely but Internet explorer doesn&#8217;t</strong>. To correct the error, just write :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> val = <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; cat:<span class="st0">&quot;Mistigri&quot;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; dog:<span class="st0">&quot;Rex&quot;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; butler:<span class="st0">&quot;Jeeves&quot;</span> <span class="co1">// There&#8217;s no extra comma</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<h3>JSLint to the rescue</h3>
<p><a href="http://programmieraffe.de/">Programmieraffe</a> told me about <a href="http://www.jslint.com/">JSLint</a>. You paste your javascript code and it verifies it for you. Not only for extra-commas but everything else.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptkata.com/2010/04/06/error-with-hashes-in-ie-but-not-in-firefox/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Two google-like jquery calendars</title>
		<link>http://www.javascriptkata.com/2010/03/15/two-google-like-jquery-calendars/</link>
		<comments>http://www.javascriptkata.com/2010/03/15/two-google-like-jquery-calendars/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 16:10:26 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[white belt]]></category>

		<guid isPermaLink="false">http://www.javascriptkata.com/?p=183</guid>
		<description><![CDATA[Sometimes, it feels to me that javascript was invented for the only purpose of writing calendars to select a date.]]></description>
			<content:encoded><![CDATA[<p>Sometimes, it feels to me that <strong>javascript was invented for the only purpose of writing calendars</strong> to select a date. I wrote one myself (because I had to, not because I wanted to) in a previous job. I use a new calendar that is &#8220;better than the other one&#8221; on each of my project. It seems like the world will never run out of javascript calendars. In fact, you probably are writing a new one as you read this.</p>
<p>I want to talk about a different kind of calendar. The really hard one to write : <strong>calendars for displaying events</strong> in jquery.</p>
<h3>The pretty jquery-week-calendar</h3>
<p>Written by <a href="http://github.com/robmonie">Rob Monie</a>, this is the first one I tried. I was amazed about how easy it was to integrate with the current development of <a href="http://www.timmyontime.com" target="_blank">Timmy</a> (you can see an early beta when you&#8217;re logged <a href="http://www.timmyontime.com/dashboard/calendar" target="_blank">here</a>). You can <a href="http://robmonie.github.com/jquery-week-calendar/full_demo/weekcalendar_full_demo.html" target="_blank">take a look at the demo</a>. Unfortunately, I had unexplicable bugs and I didn&#8217;t take the time to understand them. Please, don&#8217;t do like me and <a href="http://github.com/robmonie/jquery-week-calendar" target="_blank">participate to the code on GitHub</a>.</p>
<ul>
<li>Looks good</li>
<li>Easy to integrate</li>
<li>May be buggy when drag-dropping/resizing</li>
</ul>
<h3>The robust fullcalendar</h3>
<p>We switched to this calendar, written by <a href="http://github.com/arshaw" target="_blank">Adam Shaw</a>, because it had three different views (month, week, day) and because we had some problem with the other calendar. It doesn&#8217;t look as good as the week-calendar (<a href="http://arshaw.com/fullcalendar/">demo</a>). You can also <a href="http://github.com/arshaw/fullcalendar" target="_blank">participate on GitHub</a>.</p>
<ul>
<li>The default look is OK</li>
<li>Harder to work with</li>
<li>Display may seem slow (on firefox)</li>
<li>More robust than week-calendar</li>
</ul>
<h3>Finally</h3>
<p>These guys have made a great job doing something really hard. Just think about two overlapping events or when an event is two minutes long or hundreds of special cases that could happen. Kudos to them for giving their time and talent to us.</p>
<h3>A word about git</h3>
<p>Our team (me and Frank, the <a href="http://www.rubyfleebie.com">RubyFleebie</a> guy) worked with SVN for a couple of years until Git stole the spotlight. For a couple of months, we worked with it and enjoyed it. Until we had to do &#8220;more advanced&#8221; things (branching, merging which is pretty basic to my sense) and things got incredibly hard. We switched to <a href="http://mercurial.selenic.com/">Mercurial</a> a couple weeks ago which feels more like the perfect mix between SVN and Git. So if, like us, you feel puzzled by Git, give Mercurial a chance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptkata.com/2010/03/15/two-google-like-jquery-calendars/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Easy loop for every element of an array</title>
		<link>http://www.javascriptkata.com/2009/05/12/easy-loop-for-every-element-of-an-array/</link>
		<comments>http://www.javascriptkata.com/2009/05/12/easy-loop-for-every-element-of-an-array/#comments</comments>
		<pubDate>Tue, 12 May 2009 15:24:21 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[white belt]]></category>

		<guid isPermaLink="false">http://www.javascriptkata.com/?p=85</guid>
		<description><![CDATA[There's something bugging me with javascript <em>for</em> loop : the extra work to loop though all elements of an array. Suppose I want to <em>alert</em> each element of an array, there are three ways of doing it.]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s something bugging me with javascript <em>for</em> loop : the extra work to loop though all elements of an array. Suppose I want to <em>alert</em> each element of an array, there are three ways of doing it.</p>
<p>First, you loop with an index and assign the element to a variable.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> items = <span class="br0">&#91;</span><span class="st0">&quot;a&quot;</span>, <span class="st0">&quot;b&quot;</span>, <span class="st0">&quot;c&quot;</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i = <span class="nu0">0</span>; i &lt; items.<span class="me1">length</span>; i++<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">var</span> <span class="kw1">item</span> = items<span class="br0">&#91;</span>i<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw3">alert</span><span class="br0">&#40;</span><span class="kw1">item</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>You always have to have that extra assignment at the beginning of the loop.</p>
<p>Second, you loop with a <em>for each</em>.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> items = <span class="br0">&#91;</span><span class="st0">&quot;a&quot;</span>, <span class="st0">&quot;b&quot;</span>, <span class="st0">&quot;c&quot;</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i <span class="kw1">in</span> items<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">var</span> <span class="kw1">item</span> = items<span class="br0">&#91;</span>i<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw3">alert</span><span class="br0">&#40;</span><span class="kw1">item</span><span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>In javascript, the <em>for each</em> <strong>loops though the index</strong> of the array instead of looping though the elements, like in most other languages. Thus, you also have to make the extra assignment at the beginning of the loop.</p>
<p><strong>The easiest way</strong> of doing it is the third one.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> items = <span class="br0">&#91;</span><span class="st0">&quot;a&quot;</span>, <span class="st0">&quot;b&quot;</span>, <span class="st0">&quot;c&quot;</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i = <span class="nu0">0</span>, <span class="kw1">item</span>; <span class="kw1">item</span> = items<span class="br0">&#91;</span>i<span class="br0">&#93;</span>; i++<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw3">alert</span><span class="br0">&#40;</span><span class="kw1">item</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p><strong>How does it work?</strong> First it uses multi-assignment on one line. In javascript, you could write <em>var i = 0, j = 1;</em> and it would create two variables, <em>i</em> and <em>j</em>.</p>
<p>The second part of the <em>for</em> is confusing : it assigns the item but it never check if <em>i</em> it is out of bounds of the array (using <em>i < items.length</em>). It works because when javascript tries to assign an item after the end of the array (in our case <em>items[3]</em>), it returns <em>null</em> which is considered by javascript as <em>false</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptkata.com/2009/05/12/easy-loop-for-every-element-of-an-array/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Cleanest way of executing javascript code on page load</title>
		<link>http://www.javascriptkata.com/2008/12/01/cleanest-way-of-executing-javascript-code-on-page-load/</link>
		<comments>http://www.javascriptkata.com/2008/12/01/cleanest-way-of-executing-javascript-code-on-page-load/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 15:01:08 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[white belt]]></category>

		<guid isPermaLink="false">http://www.javascriptkata.com/?p=69</guid>
		<description><![CDATA[Everytime that I work on a new project, I'm always unsure about which way to execute javascript on page load.]]></description>
			<content:encoded><![CDATA[<p>Everytime that I work on a new project, I&#8217;m always unsure about which way to execute javascript on page load. These are the different techniques :</p>
<h3>Your old buddy body.onload()</h3>
<p>The safest way to execute javascript when a page loads is to use the body.onLoad method.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&lt;body onload=&quot;doSomething();&quot;&gt;&lt;/body&gt;</div>
</li>
</ol>
</div>
<h3>The document.ready function with jquery</h3>
<p>This technique requires jquery and is similar to the <strong>body.onLoad technique</strong> (see above).</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&lt;body&gt;&lt;script&gt;$(document).ready()&lt;/script&gt;&lt;/body&gt;</div>
</li>
</ol>
</div>
<p>The problem is that I don&#8217;t like that the javascript code is too close to the HTML code. There&#8217;s really something that I don&#8217;t like.</p>
<h3>The #ID.ready</h3>
<p><strong>DO NOT USE!</strong> It doesn&#8217;t work. At first, I tought that this technique worked but in fact, even if the element corresponding to the ID doesn&#8217;t exists, the function is called. To understand it better, I&#8217;ll give you an example. Suppose that I want to load a user list with ajax after the page load and that list correspond to <strong>ul#users</strong>, I&#8217;d write the following code</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">$<span class="br0">&#40;</span><span class="st0">&quot;ul#users&quot;</span><span class="br0">&#41;</span>.<span class="me1">ready</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; loadUsersWithAjax<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>Unfortunately, it doesn&#8217;t work.</p>
<h3>The document.ready + #ID.each</h3>
<p>After the failure of the #ID.ready technique (see above), I tried a similar thing that is working but ugly looking. Suppose I want to do the same as above, I&#8217;d write this :</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">$<span class="br0">&#40;</span>document<span class="br0">&#41;</span>.<span class="me1">ready</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; $<span class="br0">&#40;</span><span class="st0">&quot;ul#users&quot;</span><span class="br0">&#41;</span>.<span class="me1">each</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; loadUsersWithAjax<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>That way, it would execute the loadUsersWithAjax() method for each <strong>ul#users</strong> and because element IDs are unique to a page, the method would be called only once. It looks bad but it&#8217;s the &#8220;prettiest&#8221; way I found of executing javascript code on page load.</p>
<p>Now, I want to know <strong>what would you suggest? Which technique is your?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptkata.com/2008/12/01/cleanest-way-of-executing-javascript-code-on-page-load/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>JavascriptKata now ad free</title>
		<link>http://www.javascriptkata.com/2008/11/28/javascriptkata-now-ad-free/</link>
		<comments>http://www.javascriptkata.com/2008/11/28/javascriptkata-now-ad-free/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 17:11:41 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[white belt]]></category>

		<guid isPermaLink="false">http://www.javascriptkata.com/?p=68</guid>
		<description><![CDATA[[Update 2009-09-20 : I will try to bring back ads. I removed them because I was frustrated, I bring them back as an experience.] JavascriptKata was created in the blog bubble. In a time when all you had to do was to create a blog, put ads on it and you were rich. It never [...]]]></description>
			<content:encoded><![CDATA[<p>[Update 2009-09-20 : I will try to bring back ads. I removed them because I was frustrated, I bring them back as an experience.]</p>
<p>JavascriptKata was created in the blog bubble. In a time when <cite>all you had to do was to create a blog, put ads on it and you were rich</cite>. It never was true. The ads on this blog gave me about 100$ in a year so I finally felt discouraged and left it for dead. Nevertheless, this blog as a good share of traffic and more subscribers in the feed than any blog that I&#8217;ve owned/I own/will own. In fact, I call it a blog but it&#8217;s not really a blog. I used wordpress and that&#8217;s the main reason why I&#8217;m calling it a blog.</p>
<p>I tried several things to keep my interest in writing about javascript but they all failed because there was the devil saying &#8220;anyways, you don&#8217;t make any money out of it&#8221;. But there was the angel saying &#8220;maybe you don&#8217;t make money but you like javascript and should continue to write about it&#8221;. As usual, the devil won.</p>
<p>I won&#8217;t try to make another revival of this blog but I&#8217;ll try to write more about little things that happens between me and javascript, about the daily problems that I encounter. I&#8217;ll write a lot about <a href="http://www.jquery.com" target="_blank">jquery</a> too since for me, there can be no javascript without jquery.</p>
<p>Thanks to all of you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptkata.com/2008/11/28/javascriptkata-now-ad-free/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Load a page with javascript</title>
		<link>http://www.javascriptkata.com/2008/02/12/load-a-page-with-javascript/</link>
		<comments>http://www.javascriptkata.com/2008/02/12/load-a-page-with-javascript/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 14:31:20 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Ask Dan a javascript question]]></category>
		<category><![CDATA[white belt]]></category>

		<guid isPermaLink="false">http://www.javascriptkata.com/2008/02/12/load-a-page-with-javascript/</guid>
		<description><![CDATA[Someone asked me : "I would like this site to automatically load a certain page (1-31) depending on what day of the month it is (1-31)"]]></description>
			<content:encoded><![CDATA[<p>I receive javascript-related questions in my inbox from time to time and here&#8217;s the last one.</p>
<blockquote><p> I am ok with HTML but awfully new to JavaScript and I know very little at this point. My question is for this web site I&#8217;m building. I need to know the exact JavaScript code and placement of the code in an HTML document for this goal. I would like this site to <strong>automatically load a certain page (1-31) depending on what day of the month it is (1-31)</strong>. I don&#8217;t need to worry about what month or year it is, just the date in the month. For instance when it is the eleventh day in the month, page11.html will automatically load when you click on to the site. I would like it to take the time(Date) from the client side not the server. This way no mater what time zone your in the right HTML page will pop up at midnight.</p></blockquote>
<p>Most people can&#8217;t give the <em>exact javascript code placement of the code in an HTML document</em> because it would always be buggy. They can give hints and/or snippets of code but rarely a complete working piece. Sorry&#8230;</p>
<p>Secondly, relying on javascript to do all this work would be a mistake because <strong>if javascript is disabled, the site will not work</strong>. Most users have javascript enabled but you should always think about web-crawlers (google, yahoo!, etc) that will try to index your page but will hit an empty page.</p>
<p>It&#8217;s always hard to guess all the reasons why someone would want a different page everyday of the month and I don&#8217;t know more about the project than what is written above. Considering this, maybe there are just parts of the page that are changing everyday and you could load them on the server-side thus having a single page loading including other pages depending on the day. The problem is that you would have to ask the timezone of the user and keep it in a cookie.</p>
<p>Just remember, <strong>javascript should not be a requirement to navigate in a site</strong>.</p>
<p>Finally, if I would really want to load a complete new page in javascript, I would do the following.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> dayOfTheMonth = <span class="br0">&#40;</span><span class="kw2">new</span> Date<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>.<span class="me1">getDate</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">location.<span class="me1">href</span>=<span class="st0">&quot;page&quot;</span> + dayOfTheMonth.<span class="me1">toString</span><span class="br0">&#40;</span><span class="br0">&#41;</span> + <span class="st0">&quot;.html&quot;</span>;</div>
</li>
</ol>
</div>
<p style="margin-bottom: 2em">&nbsp;</p>
<p>This is the way I would do it, <strong>do you have any other suggestions?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptkata.com/2008/02/12/load-a-page-with-javascript/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>New on Javascript Kata : the echo chamber</title>
		<link>http://www.javascriptkata.com/2008/01/08/new-on-javascript-kata-the-echo-chamber/</link>
		<comments>http://www.javascriptkata.com/2008/01/08/new-on-javascript-kata-the-echo-chamber/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 22:55:55 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[white belt]]></category>

		<guid isPermaLink="false">http://www.javascriptkata.com/2008/01/08/new-on-javascript-kata-the-echo-chamber/</guid>
		<description><![CDATA[Since the beginning of the new year, I&#8217;m offering to javascripters the echo chamber. What is it? It&#8217;s a category where I will post news about what happens in the javascript world. I will try to avoid ajax related news because Ajaxian already does the job really well. You can subscribe to the RSS feed [...]]]></description>
			<content:encoded><![CDATA[<p>Since the beginning of the new year, I&#8217;m offering to javascripters the <a href="http://www.javascriptkata.com/category/echo-chamber/">echo chamber</a>. What is it? It&#8217;s <strong>a category where I will post news about what happens in the javascript world</strong>. I will try to avoid ajax related news because <a href="http://ajaxian.com/" target="_blank">Ajaxian</a> already does the job really well.</p>
<p>You can subscribe to the RSS feed with <a href="http://feeds.feedburner.com/JavascriptKata">all the articles</a> or to the RSS feed<a href="http://feeds.feedburner.com/javascriptkata/no_echo_chamber"> without the articles from the echo chamber</a>.</p>
<p>Some may have noticed that I redesigned the site. The <a href='http://www.javascriptkata.com/wp-content/uploads/2008/01/js_old.jpg' title='Javascript Kata - old design'>old design</a> was long overdue and it was a pleasure for my eyes to have a new one.</p>
<p>I would also like to have your <strong>feedback on what you think of the new echo chamber and design</strong>?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptkata.com/2008/01/08/new-on-javascript-kata-the-echo-chamber/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A new project &#8211; I hate PHP</title>
		<link>http://www.javascriptkata.com/2007/12/05/a-new-project-i-hate-php/</link>
		<comments>http://www.javascriptkata.com/2007/12/05/a-new-project-i-hate-php/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 15:55:20 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[white belt]]></category>

		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=55</guid>
		<description><![CDATA[If you are javascripter, chances are that you must work with some back-end languages like ASP.NET, ColdFusion, Ruby On Rails or PHP. If you work with a back-end language, chances are that you become frustrated against it sometimes. That&#8217;s why I created I hate PHP. What is it? I hate PHP helps you to evacuate [...]]]></description>
			<content:encoded><![CDATA[<p>If you are  javascripter, chances are that you must work with some back-end languages like ASP.NET, ColdFusion, Ruby On Rails or <strong>PHP</strong>. If you work with a back-end language, chances are that <strong>you become frustrated against it</strong> sometimes. That&#8217;s why I created <a href="http://www.ihatephp.net/" target="_blank">I hate PHP</a>.</p>
<h3>What is it?</h3>
<p><a href="http://www.ihatephp.net/" target="_blank">I hate PHP</a> helps you to evacuate your daily frustrations against the PHP language via <a href="http://www.twitter.com" target="_blank">Twitter</a>. It&#8217;s simple. You must tell your <em>twitter username</em> to <em>I hate PHP</em> (on the website) and then, send a direct message to the <a href="http://twitter.com/ihatephp" target="_blank">ihatephp twitter user</a> in the following format : <strong>d ihatephp <em>a thing that frustrates you in PHP</em></strong>.</p>
<h3>Why against PHP?</h3>
<p>I could have done it against a lot of languages because <strong>they all suck in their own special way</strong>. But the moment I was thinking about the project, I was working with PHP and I just kept sending IM messages to Frank (of <a href="http://www.rubyfleebie.com/" target="_blank">Ruby Fleebie</a>) to tell him about things that frustrated me in PHP. I just made it more &#8220;official&#8221; and now I tell it to the world via <a href="http://www.ihatephp.net" target="_blank">I hate PHP</a>.</p>
<p>Subscribe to the <a href="http://feeds.feedburner.com/ihatephp" target="_blank">RSS</a> of I hate PHP!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptkata.com/2007/12/05/a-new-project-i-hate-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3 reasons why I still love Firebug</title>
		<link>http://www.javascriptkata.com/2007/08/01/3-reasons-why-i-still-love-firebug/</link>
		<comments>http://www.javascriptkata.com/2007/08/01/3-reasons-why-i-still-love-firebug/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 17:32:51 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[white belt]]></category>

		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=53</guid>
		<description><![CDATA[There was a buzz around Firebug a couple of months ago. A lot of developers installed it and enjoy every second they use it. There are some others that missed the train and are still using alerts to debug. If you&#8217;re from that second category, here&#8217;s your chance to get back on tracks. 1. The [...]]]></description>
			<content:encoded><![CDATA[<p>There was a buzz around <a href="http://getfirebug.com/" target="_blank">Firebug</a> a couple of months ago. A lot of developers installed it and enjoy every second they use it. There are some others that missed the train and are still using <em>alerts</em> to debug. If you&#8217;re from that second category, here&#8217;s your chance to get back on tracks.</p>
<h3>1. The console</h3>
<p><a href="http://www.javascriptkata.com/wp-content/uploads/2007/07/firebug1.jpg" title="Firebug console" target="_blank"><img src="http://www.javascriptkata.com/wp-content/uploads/2007/07/firebug1.thumbnail.jpg" alt="Firebug console" /></a></p>
<p>The console is a kind of dashboard. It shows what happens client-side : CSS, javascript error, warnings, ajax&#8230; all you want to know in just one sight.</p>
<p>If <strong>you have an error</strong>, just click on it and Firebug will open the source code and highlight it.</p>
<p>Every <strong>ajax</strong> request is also shown here along with its parameters and the response from the server.</p>
<h3>2 . Debugger</h3>
<p><a href="http://www.javascriptkata.com/wp-content/uploads/2007/07/firebug2.jpg" title="Firebug debugger"><img src="http://www.javascriptkata.com/wp-content/uploads/2007/07/firebug2.thumbnail.jpg" alt="Firebug debugger" /></a></p>
<p>The debugger is insanely efficient, it offers everything you would expect from a debugger : breakpoints, step-by-step, watch expressions and functions stack. Do you need anything more?</p>
<h3>3. Inspector</h3>
<p><a href="http://www.javascriptkata.com/wp-content/uploads/2007/07/firebug3.jpg" title="Firebug inspector"><img src="http://www.javascriptkata.com/wp-content/uploads/2007/07/firebug3.thumbnail.jpg" alt="Firebug inspector" /></a><br />
Great, there&#8217;s an alternative to the infamous &#8220;View page source and then search through the code&#8221; technique. With Firebug, you just click on <strong>Inspect</strong> and move your cursor over the element that causes the problem and you have it all in one sight : the HTML on left and the CSS style on right. You can manipulate both of them to try to correct the problem and then, it&#8217;s done.</p>
<h3>Conclusion</h3>
<p>There&#8217;s no reason in the world why you shouldn&#8217;t use Firebug, go and get it at <a href="http://getfirebug.com/" target="_blank">http://getfirebug.com/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptkata.com/2007/08/01/3-reasons-why-i-still-love-firebug/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Ask Dan : Friggin&#8217; libraries</title>
		<link>http://www.javascriptkata.com/2007/06/26/ask-dan-friggin-libraries/</link>
		<comments>http://www.javascriptkata.com/2007/06/26/ask-dan-friggin-libraries/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 13:21:06 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Ask Dan a javascript question]]></category>
		<category><![CDATA[white belt]]></category>

		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=49</guid>
		<description><![CDATA[I received two questions about librairies in the Ask Dan a javascript question serie. Don&#8217;t forget to ask me your questions too by sending a mail at dan@javascriptkata.com. Effects Camilou asked Is it too hard to a poor mortal like me to achieve that fancy effects that some libraries like Prototype do offer? I mean, [...]]]></description>
			<content:encoded><![CDATA[<p>I received two questions about librairies in the <a href="http://www.javascriptkata.com/category/ask-dan-a-javascript-question/" title="Ask Dan a javascript question">Ask Dan a javascript question</a> serie. Don&#8217;t forget to ask me your questions too by sending a mail at <a href="mailto:dan@javascriptkata.com" title="dan@javascriptkata.com">dan@javascriptkata.com</a>.</p>
<h3>Effects</h3>
<p>Camilou asked</p>
<p style="margin-left: 40px">Is it too hard to a poor mortal like me to achieve that fancy effects that some libraries like Prototype do offer? I mean, that drag-and-drop stuff looks pretty complicated to me. Or maybe I am just too noob.</p>
<p>Drag-and-drop is complicated but not that much. Thousands of people have done it before the libraries-era. But, I&#8217;d say that if you want to achieve something similar to prototype, you&#8217;ll probably work for months. Prototype is the most known javascript library and if you start today, there&#8217;s little chance you will get as far as them. Sorry. But if you have a very different and easier way of doing things, maybe you&#8217;ll succeed.</p>
<h3>Creating a new library</h3>
<p>Frank Stepanski asked</p>
<p style="margin-left: 40px"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial">If I want to start creating my own JS libraries, how do I start?<br />
</span></font><br />
If you have no better idea than re-implementing what already exists in other libraries, you&#8217;ll never know where to start. A new library should fill a hole that is not filled by anyone else. So, you&#8217;ll find where to start the day that you will want to do something and that you won&#8217;t find any library that does it.</p>
<h3>TimmyOnTime</h3>
<p>We are <a href="http://www.javascriptkata.com/2007/06/14/a-new-project-timmyontime/" title="still working">still working</a> on <a href="http://timmyontime.com/" title="TimmyOnTime" target="_blank">TimmyOnTime</a>. TimmyOnTime is a time-management that uses instant messaging so you don&#8217;t forget to track your time. There are still places available for the alpha period. Please, give us some feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptkata.com/2007/06/26/ask-dan-friggin-libraries/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
