<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>MooTools</title>
	
	<link>http://mootools.net/blog</link>
	<description>The Blog</description>
	<lastBuildDate>Thu, 18 Apr 2013 19:28:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/mootools-blog" /><feedburner:info uri="mootools-blog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>MooTools Conference</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/VimrdifFsWQ/</link>
		<comments>http://mootools.net/blog/2013/04/18/mootools-conference/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 19:28:33 +0000</pubDate>
		<dc:creator>Garrick</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1915</guid>
		<description><![CDATA[This year we&#8217;re thinking about getting everyone in the MooTools community together, in one place, for a weekend to meet up, chat, discuss, and have an all-around good time. That&#8217;s right, we&#8217;re trying to plan a MooTools Conference! But before we can do that, we need your help. We&#8217;ve set up a form so we [...]]]></description>
			<content:encoded><![CDATA[<p>This year we&#8217;re thinking about getting everyone in the MooTools community together, in one place, for a weekend to meet up, chat, discuss, and have an all-around good time. That&#8217;s right, we&#8217;re trying to plan a MooTools Conference!</p>

<p>But before we can do that, we need your help. We&#8217;ve set up a <a href="https://docs.google.com/forms/d/1idslnn9d1_F4GvXowzA9m2fPrupXzTbCOvn7N-5r-y0/viewform">form</a> so we can gauge interest in a MooTools Conference. All you need to do is take a minute and answer the questions.</p>

<p>We&#8217;ll keep the form up until next week, but make sure you answer quickly so we can start planning this awesome Official MooTools Gathering (or OMG&#8212;which might or might not be the name of the conference).</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/VimrdifFsWQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2013/04/18/mootools-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2013/04/18/mootools-conference/</feedburner:origLink></item>
		<item>
		<title>Contributing to MooTools</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/8jhIRyPC4zA/</link>
		<comments>http://mootools.net/blog/2013/03/18/contributing-to-mootools/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 20:33:57 +0000</pubDate>
		<dc:creator>Arian</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1901</guid>
		<description><![CDATA[Sometimes we get requests from people that want to contribute to MooTools. In this post I would like to give some pointers how one could help, but first I&#8217;ll tell how I got involved in the MooTools project. It was late 2009, the MooTools Forge (plugin repository) was just released, and I was learning JavaScript [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes we get requests from people that want to contribute to MooTools. In this post I would like to give some pointers how one could help, but first I&#8217;ll tell how I got involved in the MooTools project.</p>

<p>It was late 2009, the MooTools Forge (plugin repository) was just released, and I was learning JavaScript and MooTools by creating many plugins. This is already the first form of contributing to the MooTools project: releasing code that might benefit others. The cool thing about this was that I also helped other people on GitHub that released their MooTools plugins, and thanks to this interaction I learned even more.</p>

<p>At the same time the MooTools Core developers were building MooTools 1.3. I closely followed the developments and noticed that a few things were still missing. One thing that seemed easy was the documentation. So, in some spare time I dove into the MooTools source code, looking through the commit history to see what changed, and update the existing MooTools 1.2 documentation accordingly. If I remember correctly a pull request on GitHub at that time was basically a private message to the MooTools devs, so it was exciting whether my changes would be accepted. Fortunately contributing to the documentation is always helpful, so my changes got merged!</p>

<p>Because MooTools 1.3, at that time, was fully under construction, there were many loose ends that were easy to fix. I got invited to talk to the MooTools devs on IRC, and got involved more and more. So I started working on MooTools More 1.3, which was something else that was not updated for the new 1.3 release. This was a great way to learn how the internals of MooTools work: we had to look into MooTools Core to know how to effectively update the More code, or even fix things in MooTools Core, but at the same time it wasn&#8217;t too difficult yet.</p>

<p>Later that year I went to the MooTools Hackathon in London, where we finalized the MooTools Core 1.3 and More 1.3 releases which were released later that year. I also got a nice place on the <a href="http://mootools.net/developers">MooTools developers</a> page!</p>

<p>So how does my nice story tell you how to contribute? Basically what I did is look if something was blocking the release for MooTools 1.3, went ahead and fixed that, just by spamming the MooTools devs with new pull requests.</p>

<p>The most important point is direct communication with the developers. This mainly happened on IRC, but is still valid. Join #mootools, say you want to help out with something, or did something, explain again why we should merge your pull request. This is really the best way to get started. If you don&#8217;t directly see a loose end where you can help, the MooTools developers probably know something interesting for you.</p>

<p>Currently there are a few aspects where you can help. If you have followed the development on GitHub you might know about prime, elements, agent, moofx etc. There is still some stuff (especially website/documentation related) to be done for a real release. See also the <a href="https://github.com/mootools/prime/wiki/Roadmap">roadmap</a> on the Prime Wiki.
But it&#8217;s also perfectly fine if you like to work on the current version of MooTools Core. The idea is to release a MooTools 1.5 with mostly bugfixes, and a few deprecations. The biggest chunk of work for 1.5 is a review of bug reports and pull requests.</p>

<p>If you&#8217;re not really comfortable contributing code or documentation directly, writing blog posts, tweeting about MooTools or helping other people on the <a href="https://groups.google.com/forum/?fromgroups#!forum/mootools-users">MooTools Mailing List</a>, #mootools on IRC or <a href="http://stackoverflow.com/questions/tagged/mootools">stackoverflow</a> are really great ways to contribute too.</p>

<p>I would like to conclude with the benefit of contributing to MooTools or <a href="https://www.google.com/search?q=why+contribute+to+open+source">Open Source</a> in general. I&#8217;ve learned so much and you get the opportunity to do things right. Apply testing techniques, try new technologies, learn more than you want to know about IE7 or other interesting browser behaviors. The things I learned by contributing MooTools simply made me a better developer.</p>

<p><em>Edit:</em> we created a wiki to collaborate on design and websites for MooTools projects on <a href="https://github.com/mootools/website/wiki">GitHub</a>. So if you&#8217;re into that kind of thing, this is another great way to contribute!</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/8jhIRyPC4zA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2013/03/18/contributing-to-mootools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2013/03/18/contributing-to-mootools/</feedburner:origLink></item>
		<item>
		<title>MooTools 1.2.6 Released</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/ZTXM0yi2iDQ/</link>
		<comments>http://mootools.net/blog/2013/02/19/mootools-1-2-6-released/#comments</comments>
		<pubDate>Tue, 19 Feb 2013 17:12:28 +0000</pubDate>
		<dc:creator>kentaromiura</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1875</guid>
		<description><![CDATA[This is a new maintenance release for the old 1.2 series. The new ECMAScript 6 specification has a proposal for String.prototype.contains that unfortunately conflicts with the MooTools implementation of contains. Firefox 18 already ships this new version of contains. This is not a problem for MooTools 1.3.x and onward, but this breaks MooTools 1.2.5, especially [...]]]></description>
			<content:encoded><![CDATA[<p>This is a new maintenance release for the old 1.2 series. The new ECMAScript 6 specification has a proposal for <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/contains">String.prototype.contains</a> that unfortunately <a href="https://github.com/mootools/mootools-core/issues/2402">conflicts</a> with the <a href="http://mootools.net/docs/core/Types/String#String:contains">MooTools implementation of contains</a>.</p>

<p>Firefox 18 already ships this new version of contains. This is not a problem for MooTools 1.3.x and onward, but this breaks MooTools 1.2.5, especially the code inside the MooTools framework that utilized this method, like selectors.</p>

<p>This new 1.2.6 release solves these issues by overwriting the native version with the MooTools version of <code>String.prototype.contains</code>.</p>

<p>For the next MooTools version, 1.5, we will use the standard ES6 version. If you rely on the old behavior (which is only when you use the second argument), it will be possible to use the old version through the compatibility layer.</p>

<ul>
<li><a href="/download/version/1.2.6">Download 1.2.6</a></li>
<li><a href="/download">Or upgrade to 1.4.5</a></li>
<li><a href="https://github.com/mootools/mootools-core/compare/1.2.5...1.2.6">See changes on GitHub</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/ZTXM0yi2iDQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2013/02/19/mootools-1-2-6-released/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2013/02/19/mootools-1-2-6-released/</feedburner:origLink></item>
		<item>
		<title>Book Review: Découvrez MooTools - Un framework JavaScript pour des sites dynamiques et interactifs</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/Pq0T4Im5XFY/</link>
		<comments>http://mootools.net/blog/2012/12/04/book-review-decouvrez-mootools-un-framework-javascript-pour-des-sites-dynamiques-et-interactifs/#comments</comments>
		<pubDate>Tue, 04 Dec 2012 22:26:29 +0000</pubDate>
		<dc:creator>jpdery</dc:creator>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1862</guid>
		<description><![CDATA[Until recently, French literature about MooTools was pretty much non-existent. Thanks to Xavier Lecomte, now there is a very good book about MooTools in your native tongue that will get you up to speed in no time. Découvrez Mootools - Un framework JavaScript pour des sites dynamiques et interactifs (Discover MooTools - A javascript framework [...]]]></description>
			<content:encoded><![CDATA[<p>Until recently, French literature about MooTools was pretty much non-existent. Thanks to Xavier Lecomte, now there is a very good book about MooTools in your native tongue that will get you up to speed in no time.</p>

<p><a href="http://www.amazon.com/gp/product/B008CH7GGE/">Découvrez Mootools - Un framework JavaScript pour des sites dynamiques et interactifs</a> (Discover MooTools - A javascript framework for dynamic and interactive websites) is aimed at beginner and intermediate developers who wish to create spectacular effects using MooTools. This book does not go deep into topics that would likely only confuse you, but instead it keeps everything simple and provides many clear cut examples and illustrations that will facilitate your understanding. Priced at 12.5 Euros (~15$) it’s a must-have if you’re looking to learn MooTools.</p>

<p>As the author says, it does not cover the entire framework. Instead, Xavier Lecomte selected the most commonly used MooTools pieces and explains them in detail. Throughout this book, you’ll learn how to create classes, handle DOM elements, create AJAX requests and create effects using Fx classes. The latter is probably the most discussed topic of this book as it goes through almost every Fx-based class in MooTools. When it comes to Fx classes, the most complex part is probably options. Although they are well named, they could be difficult to grasp, especially to the novice user. This book makes this type of functionality very clear by explaining all the options for each class discussed, at times, through the use of illustrations. The Fx chapter wraps up with a complete example, where the author builds a pong game using tools explained throughout the chapter.</p>

<p>Finally, the book discusses work done by the MooTools community. Although it does not go deeply into each project (most of them would require a book on their own), it gives a good idea of what MooTools is able to offer.</p>

<p>To conclude, if you&#8217;re a native French speaker interested in learning MooTools, this book is a must-have, especially at that price. I hope Xavier Lecomte will continue writing about MooTools, the in-depth detailing of this book is amazing and will certainly benefit many.</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/Pq0T4Im5XFY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/12/04/book-review-decouvrez-mootools-un-framework-javascript-pour-des-sites-dynamiques-et-interactifs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/12/04/book-review-decouvrez-mootools-un-framework-javascript-pour-des-sites-dynamiques-et-interactifs/</feedburner:origLink></item>
		<item>
		<title>Moobile 0.2 Released</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/1wFIhvpmjzE/</link>
		<comments>http://mootools.net/blog/2012/11/03/moobile-0-2-released/#comments</comments>
		<pubDate>Sat, 03 Nov 2012 15:16:48 +0000</pubDate>
		<dc:creator>jpdery</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1830</guid>
		<description><![CDATA[I’m very happy to present the latest version of Moobile. This release focuses on stability and building solid groundwork for the future. This includes, for instance&#8230; iOS 6 Theme The iOS theme has been updated to closely match the recent changes in iOS 6 for both iPhone and iPad. This release also addresses the updated [...]]]></description>
			<content:encoded><![CDATA[<p>I’m very happy to present the latest version of <a href="http://moobilejs.com">Moobile</a>. This release focuses on stability and building solid groundwork for the future. This includes, for instance&#8230;</p>

<h3>iOS 6 Theme</h3>

<p>The iOS theme has been updated to closely match the recent changes in iOS 6 for both iPhone and iPad. This release also addresses the updated border-image syntax that casued issues with buttons inside bars or alerts. Finally, elements that were not hardware-accelerated (using only translateX or translateY) are now as smooth as they should be.</p>

<h3>Android Theme</h3>

<p>This release includes a basic Android 4 theme. This is still a work in progress and, since my testing devices are limited, I cannot guarantee it will work well on all devices. Any tips you can share about improving speed on Android would be greatly appreciated.</p>

<h3>Transitions</h3>

<p>Two more transitions were added: Cover.Page and Cover.Box. They aim to replicate <a href="http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html">modal view transition on iPad</a>. The cover transition, using the Android theme, has also been customized to match the native Android look and feel.</p>

<h3>Simulator</h3>

<p>The simulator’s UI has been improved. It’s now less intrusive and provides a zoom functionality. Keyboard shortcuts were also added; you may now use the arrow keys to zoom or rotate. Settings (such as orientation, zoom and options) are now saved on a per-device basis so you won’t have to zoom out every time you use the iPad device on your laptop.</p>

<h3>The Boiler Plate</h3>

<p>Touch icons and startup images for all sizes have been added to the boiler plate.</p>

<h3>Moobile.Component.defineAttribute</h3>

<p>A minor improvement, but an improvement nonetheless. For those who were tired of writing data-option-style-name, data-style is the new alternative. It’s now possible to specify a behavior for certain attributes on a component thanks to the Moobile.Component.defineAttribute function.</p>

<h3>The Future</h3>

<p>The next release will geared towards adding content. Tab views, split views and on-off switches will be included in the new version. I’m also planning to improve the documentation, add more examples and make things easier to understand.</p>

<h3>Requests</h3>

<p>If you have any requests, you’re welcome to contact me through the <a href="https://github.com/jpdery">GitHub page</a>. I’ll be glad to listen to your requests and, hopefully, improve your experience working with Moobile.</p>

<p>Moobile is developed by Jean-Philippe Déry and is hosted on <a href="http://moobilejs.com">moobilejs.com</a></p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/1wFIhvpmjzE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/11/03/moobile-0-2-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/11/03/moobile-0-2-released/</feedburner:origLink></item>
		<item>
		<title>JavaScript Challenge #3: Review</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/NNu-UOqhWC4/</link>
		<comments>http://mootools.net/blog/2012/08/22/javascript-challenge-3-review/#comments</comments>
		<pubDate>Wed, 22 Aug 2012 10:54:02 +0000</pubDate>
		<dc:creator>chrisp</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Challenges]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1805</guid>
		<description><![CDATA[The third JavaScript challenge showed us what it would be like to draw with canvas. The challenge was open ended, in so far as there were no restrictions as to what drawing technology could have been used, but everyone just went straight for canvas. Arian Stolwijk - https://tinker.io/9d871/1 Arian impresses once again with some beautiful [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://mootools.net/blog/2012/08/08/javascript-challenge-3/">third JavaScript challenge</a> showed us what it would be like to draw with canvas. The challenge was open ended, in so far as there were no restrictions as to what drawing technology could have been used, but everyone just went straight for canvas.</p>

<p><span id="more-1805"></span></p>

<p>Arian Stolwijk - <a href="https://tinker.io/9d871/1">https://tinker.io/9d871/1</a></p>

<p>Arian impresses once again with some beautiful code. It’s also a good example of how to use requestAnimationFrame and how to calculate FPS.</p>

<p>Mickele Moriconi - <a href="http://jsfiddle.net/czsEe/">http://jsfiddle.net/czsEe/</a></p>

<p>Mickele’s example showcases a disembodied arrow to indicate the direction in which the cursor is pointed as well as keyboard navigation and event delegation.</p>

<p>Pete - <a href="http://jsfiddle.net/NHhqA/">http://jsfiddle.net/NHhqA/</a>, <a href="http://jsfiddle.net/DRgNd/">http://jsfiddle.net/DRgNd/</a>, <a href="http://jsfiddle.net/2T8v4/">http://jsfiddle.net/2T8v4/</a>, <a href="http://jsfiddle.net/u922h/">http://jsfiddle.net/u922h/</a></p>

<p>Pete really shines in this challenge; presenting many concepts and explaining the differences and benefits of various approaches to efficient design of his examples. If nothing else, read through his explanation of the coding approach he has taken in his third and fourth examples.</p>

<p>Corto - <a href="http://jsfiddle.net/corto/qrPav/7/">http://jsfiddle.net/corto/qrPav/7/</a></p>

<p>Corto used CoffeeScript and jQuery to build his example. Once you get over all the @ symbols, it’s really quite concise. :)</p>

<p>The purpose of this was to explore different means of input-based drawing with SVG, DOM and canvas. While we would have like to see more DOM and SVG implementations, there were many good examples of canvas usage!</p>

<p>We would like to thank everyone that participated - it was fun to see so much conversation and collaboration around a fun JavaScript challenge. Be sure to check out the Challenges category of blog posts for new challenges every week!</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/NNu-UOqhWC4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/08/22/javascript-challenge-3-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/08/22/javascript-challenge-3-review/</feedburner:origLink></item>
		<item>
		<title>JavaScript Challenge #2: Review</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/MGWP5UrGuwY/</link>
		<comments>http://mootools.net/blog/2012/08/22/javascript-challenge-2-review/#comments</comments>
		<pubDate>Wed, 22 Aug 2012 10:53:50 +0000</pubDate>
		<dc:creator>chrisp</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Challenges]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1801</guid>
		<description><![CDATA[The second JavaScript challenge was loads of fun! It seems the topic of game development creates interesting challenges and invited participation. Once again, there were many excellent entries but the following entries showcase something specific we want to point out&#8230; Christop Pojer - https://tinker.io/66bb4/4, https://tinker.io/c341c/8 Christoph’s example showcases a combination of concise code and CSS3 [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://mootools.net/blog/2012/08/01/javascript-challenge-2/">second JavaScript challenge</a> was loads of fun! It seems the topic of game development creates interesting challenges and invited participation. Once again, there were many excellent entries but the following entries showcase something specific we want to point out&#8230;</p>

<p><span id="more-1801"></span></p>

<p>Christop Pojer - <a href="https://tinker.io/66bb4/4">https://tinker.io/66bb4/4</a>, <a href="https://tinker.io/c341c/8">https://tinker.io/c341c/8</a></p>

<p>Christoph’s example showcases a combination of concise code and CSS3 animations to make the game fun and challenging. It makes minimal use of MooTools-provided methods and is generally a good example for how to code similar tasks.</p>

<p>The second example is just hilarious! Give them a bash&#8230;</p>

<p>haliphax - <a href="http://jsfiddle.net/YYyRD/">http://jsfiddle.net/YYyRD/</a></p>

<p>Haliphax’s example showcases a way to create delegated events in plain old JavaScript. It also makes good use of querySelectorAll().</p>

<p>Lionel Garcia - <a href="https://tinker.io/f5794">https://tinker.io/f5794</a></p>

<p>Lionel’s code is beautiful. It demonstrates a common way to package program code in a single object and provides a lot of interface elements over and above the brief or the competition. I had a lot of fun playing this one.</p>

<p>Kevin Western - <a href="https://gist.github.com/3229945">https://gist.github.com/3229945</a></p>

<p>Kevin demonstrates a port of the game to the Dart language. I am still amazed every time I see a 50 LOC Dart script and its 1800+ LOC JavaScript equivalent.</p>

<p>Pete - <a href="http://jsfiddle.net/tqvMc/">http://jsfiddle.net/tqvMc/</a></p>

<p>Pete’s example is the shortest, having hard coded the HTML elements and using a few minor MooTools convenience methods. Still a good job!</p>

<p>Cristian Carlesso - <a href="http://jsfiddle.net/kentaromiura/rUqJ7/21/">http://jsfiddle.net/kentaromiura/rUqJ7/21/</a></p>

<p>Inspired by Christoph’s example; Cristian adds variation by allowing target team selection and sound.</p>

<p>The purpose of this challenge was to introduce event delegation and to utilise some of the knowledge learned from the previous challenge. We would like to thank everyone that participated - it was fun to see so much conversation and collaboration around a fun JavaScript challenge.</p>

<p>Be sure to check out the Challenges category of blog posts for new challenges every week!</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/MGWP5UrGuwY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/08/22/javascript-challenge-2-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/08/22/javascript-challenge-2-review/</feedburner:origLink></item>
		<item>
		<title>JavaScript Challenge #5 (Cows never forget)</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/FhTOkIj86Pc/</link>
		<comments>http://mootools.net/blog/2012/08/22/javascript-challenge-5/#comments</comments>
		<pubDate>Wed, 22 Aug 2012 10:52:06 +0000</pubDate>
		<dc:creator>chrisp</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Challenges]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1797</guid>
		<description><![CDATA[The other day I was playing Fez when I was reminded of an old memory game I used to play where a sequence of colours are shown and the player has to repeat the sequence correctly to proceed. Players are shown increasingly long sequences or colours, stretching their memory to its limits! This week’s challenge [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was playing <a href="http://en.wikipedia.org/wiki/Fez_(video_game)">Fez</a> when I was reminded of an old memory game I used to play where a sequence of colours are shown and the player has to repeat the sequence correctly to proceed. Players are shown increasingly long sequences or colours, stretching their memory to its limits!</p>

<p><span id="more-1797"></span></p>

<p>This week’s challenge will be to create a memory game using shapes, colours, numbers or anything really, so long as it involves memory. Refer to the following diagram&#8230;</p>

<div style="padding-bottom: 1em"><img src="http://mootools.net/blog/wp-content/uploads/2012/08/post6.png" alt="" width="350" height="350" class="alignnone size-full wp-image-1798" /></div>

<p>The basic idea is that your game should present a series of colours, shapes, numbers, etc. for the user to then repeat. If they get the sequence right, the next level starts, which increases in difficulty.</p>

<p>Hint: you should store the order of the sequence so that it can be reused when checking the user’s input. Make things interesting by allowing keyboard navigation, or varying the elements used from level to level.</p>

<p>You can make your solutions as intricate or as basic as you wish!</p>

<p>As before; post your solutions in the form of links to <a href="http://jsfiddle.net/">jsfiddle</a>, <a href="http://tinker.io/">tinker</a> or <a href="http://jsbin.com/">jsbin</a> (in the comment section) and we’ll update this post with the solutions that we think tackle the problem in ways worthy of mention.</p>

<p>Happy coding!</p>

<p><strong>EDIT [2012/08/29]</strong>: We are closing comments and reviewing submissions. We will follow this post up with a review of our favourites and what they teach us about the task and JavaScript development in general.</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/FhTOkIj86Pc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/08/22/javascript-challenge-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/08/22/javascript-challenge-5/</feedburner:origLink></item>
		<item>
		<title>JavaScript Challenge #4 (Space, the final grassy gnoll)</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/_pOS-h7kH2s/</link>
		<comments>http://mootools.net/blog/2012/08/15/javascript-challenge-4/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 11:01:18 +0000</pubDate>
		<dc:creator>chrisp</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Challenges]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1777</guid>
		<description><![CDATA[Back in the old days, there was an operating system named after transparent, glass-filled wall apertures numbering in mid-90’s. This operating system was designed to run on computers with CRT screens, which actually needed software to upset the patterns of light they generated, called screensavers. This operating system had just such software, in a number [...]]]></description>
			<content:encoded><![CDATA[<p>Back in the old days, there was an operating system named after transparent, glass-filled wall apertures numbering in mid-90’s. This operating system was designed to run on computers with CRT screens, which actually needed software to upset the patterns of light they generated, called screensavers.</p>

<p>This operating system had just such software, in a number of different variations. One of these created the “illusion” that the observer was travelling through space, passing stars. This is the subject of this week’s challenge.</p>

<p><span id="more-1777"></span></p>

<p>Refer to the following diagram&#8230;</p>

<div style="padding-bottom: 1em"><img src="http://mootools.net/blog/wp-content/uploads/2012/08/8746c5e9fa690a0f8bec719949631537fd6d_1stars_med_362x272.jpeg" alt="" width="362" height="272" class="alignnone size-full wp-image-1778" /></div>

<p>&#8230;not very helpful.</p>

<p>The idea is that “stars” appear in the center and move to the bounds of the viewport. However you choose to create this effect is up to you.</p>

<p>Hint: you can achieve the effect using elements, canvas or SVG but so long as they move outward you are on the right track. What we’re interested in is how efficiently this can be coded and how little yours leaks! Try spicing things up by adding interactivity or variation of any description.</p>

<p>You can make your solutions as intricate or as basic as you wish!</p>

<p>As before; post your solutions in the form of links to <a href="http://jsfiddle.net/">jsfiddle</a>, <a href="http://tinker.io/">tinker</a> or <a href="http://jsbin.com/">jsbin</a> (in the comment section) and we’ll update this post with a link to a review post detailing solutions that we think tackle the problem in ways worthy of mention.</p>

<p>Good luck!</p>

<p><strong>EDIT [2012/08/22]</strong>: We are closing comments and reviewing submissions. We will follow this post up with a review of our favourites and what they teach us about the task and JavaScript development in general.</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/_pOS-h7kH2s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/08/15/javascript-challenge-4/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/08/15/javascript-challenge-4/</feedburner:origLink></item>
		<item>
		<title>Optimizing MooTools builds sans Internet Explorer</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/AbWWCJxCyKU/</link>
		<comments>http://mootools.net/blog/2012/08/13/optimizing-mootools-builds-sans-internet-explorer/#comments</comments>
		<pubDate>Mon, 13 Aug 2012 18:32:08 +0000</pubDate>
		<dc:creator>Arian</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1755</guid>
		<description><![CDATA[Since the very beginning of MooTools you can only pick the right components that you need with the MooTools Download Builder, to ensure there are no useless bytes going through the wires. But this means you still download browser-specific code. What if you could optimize the code further by removing unnecessary browser-specific code? The good [...]]]></description>
			<content:encoded><![CDATA[<p>Since the very beginning of MooTools you can only pick the right components that you need with the MooTools <a href="http://mootools.net/core/">Download</a> Builder, to ensure there are no useless bytes going through the wires. But this means you still download browser-specific code. What if you could optimize the code further by removing unnecessary browser-specific code?</p>

<p>The good news is, you can optimize MooTools builds to remove specific (IE) code! <a href="http://github.com/kamicane/packager">Packager</a> has been used to concatenate builds since MooTools 1.3. Removing certain code blocks, like MooTools 1.2. compatibility or specific IE code is one of the features of Packager. Lets see how it works. We begin with downloading Packager.</p>

<p><span id="more-1755"></span></p>

<p><strong>Note</strong>: the commands are tested on Ubuntu, and probably work fine on a Mac too. However some details might be different on a Windows machine.</p>

<h3>Getting Packager</h3>

<p>Packager is available on <a href="http://github.com/kamicane/packager">GitHub</a>, and can be pulled with git:</p>

<pre><code>~/$ git clone https://github.com/kamicane/packager.git
</code></pre>

<p>or downloaded <a href="https://github.com/kamicane/packager/zipball/master">directly</a>.</p>

<p>To test if Packager is set up correctly, open a terminal window, cd to the packager folder and type ./packager &#8212;help. If this doesn&#8217;t work you might need to install PHP first because Packager is written in PHP.</p>

<pre><code>~/$ cd packager
~/packager$ ./packager --help
</code></pre>

<p>It&#8217;s a good idea to add an alias in your ~/.bashrc file or create a symbolic link to /usr/local/bin so you can just type:</p>

<pre><code>$ packager --help
</code></pre>

<h3>Getting MooTools Core</h3>

<p>The second thing we have to do is to get the source code of MooTools Core. It doesn&#8217;t need to be placed in the same folder as Packager. MooTools Core can be pulled with git:</p>

<pre><code>~/$ git clone https://github.com/mootools/mootools-core.git
</code></pre>

<p>Unless you like to use the cutting edge, you probably should checkout the latest tag, at the moment of writing 1.4.5 to use a stable release:</p>

<pre><code>~/$ cd mootools-core
~/mootools-core$ git checkout 1.4.5   
</code></pre>

<p>or you can download the latest version from <a href="https://github.com/mootools/mootools-core/tags">the GitHub download page</a>.</p>

<h3>Registering MooTools</h3>

<p>Once we have pulled the MooTools code, we need to register it. Registering a package is done with the packager register command:</p>

<pre><code>~/mootools-core$ packager register .
</code></pre>

<p>If everything is correct, the terminal should output some text saying something like <em>the package Core has been registered</em>.</p>

<p>At this point we can create various MooTools Core builds, depending on your needs. Lets look at some examples.</p>

<h3>Building MooTools</h3>

<p>In the previous step we have registered MooTools Core as <em>Core</em>, all MooTools Core components are now under the <em>Core</em> package. Wherever you are, you can build a MooTools build. An example of building the DOMReady component from the Core package would be as follows:</p>

<pre><code>$ packager build Core/DOMReady
</code></pre>

<p>To build all components, the * wildcard can be used:</p>

<pre><code>$ packager build Core/*
$ packager build Core/* &gt; core.js
</code></pre>

<p>The <em>></em> redirects the output to save to a file.</p>

<h3>Optimizing MooTools filesize</h3>

<p>To exclude certain blocks, we can use the <code>-blocks</code> option. This is an command that removes most Internet Explorer 8 or lower specific code:</p>

<pre><code>$ packager build Core/* -blocks IE '!ES5' ltIE9 ltIE8
</code></pre>

<p>Note that the <code>!ES5</code> is in single quotes because otherwise the terminal would interpret the <code>!</code> as some other command.</p>

<p>As you can see there are several block types. Here&#8217;s a list of all the block types and what they&#8217;re used for.</p>

<ul>
<li><strong>1.2compat</strong> this is the MooTools 1.2 compatibility layer for old scripts that use MooTools 1.2</li>
<li><strong>1.3compat</strong> for API changes between 1.3 and 1.4</li>
<li><strong>!ES5</strong> this adds ECMAScript 5 methods, like <code>Array.prototype.{forEach, map, every}</code></li>
<li><strong>!ES5-bind</strong> if it should include <code>Function.prototype.bind</code>. This method wasn&#8217;t natively available before Safari 5.1.4.</li>
<li><strong>IE</strong> used for all Internet Explorer versions (may include IE9)</li>
<li><strong>ltIE9</strong> IE8 IE7 and IE6</li>
<li><strong>ltIE8</strong> IE7 and IE8</li>
<li><strong>ltFF4</strong> code for old FireFox browsers (only for <code>set('html')</code> and table elements)</li>
<li><strong>webkit</strong> code for webkit (currently a button type property bug)</li>
</ul>

<p>In the code the blocks are defined as something like <code>/*&lt;IE&gt;*/ … code … /*&lt;/IE&gt;*/</code>, so you could checkout the the code for more details, and decide whether you need it or not:</p>

<h3>Real Life Test Case</h3>

<p>What if we want to build an application for modern browsers only? We start it from scratch so we don&#8217;t need compatibility code and we like to use MooTools Class and Element for the basic stuff, and use an external library <a href="https://github.com/kamicane/moofx">moofx</a> for CSS3 animations. To initialize everything we also need DOMReady.</p>

<p>The packager command would look like:</p>

<pre><code>$ packager build Core/Class \
               Core/Class.Extras \
               Core/Element \
               Core/Element.Event \
               Core/DOMReady \
        -blocks 1.2compat 1.3compat '!ES5' '!ES5-bind' \
            IE ltIE9 ltIE8 firefox ltFF4 webkit &gt; core.js
</code></pre>

<p>From GitHub we have downloaded a moofx build which is in moofx.min.js. We can simply append this file to the freshly built MooTools build:</p>

<pre><code>$ cat moofx.min.js &gt;&gt; core.js
</code></pre>

<p>Moofx has a MooTools adapter, from the README:</p>

<pre><code>Element.implement('animate', function(){
    var moo = moofx(this);
    moo.animate.apply(moo, arguments);
    return this;
});
</code></pre>

<p>This code is saved in moofx.mootools-adapter.js, and can be appended to core.js as well:</p>

<pre><code>$ cat moofx.mootools-adapter.js &gt;&gt; core.js
</code></pre>

<p>At this point we have all our code we need, and nothing too much. However the MooTools Core Builder on the MooTools website has a compress option. We can do this with several tools like <a href="http://yuilibrary.com/projects/yuicompressor/">YUI Compressor</a>, <a href="https://github.com/mishoo/UglifyJS/">UglifyJS</a> or <a href="https://developers.google.com/closure/compiler/">Closure Compiler</a>. It&#8217;s outside the scope of this post to explain the exact differences and how you would use them. For now lets just use uglifyjs for our final build step:</p>

<pre><code>$ uglifyjs core.js &gt; core-min.js
</code></pre>

<p>No one really likes to do a lot of typing, so you might want to combine the commands in a simple bash script, a Makefile or whatever build system you might be using already. The script in this <a href="https://gist.github.com/3201540">Gist</a> pulls and builds everything for me.</p>

<h3>Beyond Packager</h3>

<p>Packager is great for building MooTools Core and MooTools More and many other projects. A great deal of projects on the MooTools Forge are also compatible with Packager. Unfortunately Packager is written in PHP and is actually only compatible with MooTools projects. Since the creation of Packager for MooTools 1.3, the the JavaScript community has (finally) picked up the idea of writing modules and separate components, but has chosen for CommonJS(-like) modules in Node.JS or AMD modules. In my Gist I also use an Packager alternative: <a href="https://github.com/kamicane/wrapup">WrapUp</a>. WrapUp is a tool like Packager but runs on Node.JS and supports CommonJS-like modules. Writing CommonJS/AMD modules has some sweet advantages which are outside the scope of this post, but you should definitely checkout WrapUp. For now, Packager does a great job by removing unnecessary code and picking the right components. Customize your MooTools builds and get a smaller filesize!</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/AbWWCJxCyKU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/08/13/optimizing-mootools-builds-sans-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/08/13/optimizing-mootools-builds-sans-internet-explorer/</feedburner:origLink></item>
		<item>
		<title>JavaScript Challenge #3 (Cows all the way down)</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/l_zh9MVsxbE/</link>
		<comments>http://mootools.net/blog/2012/08/08/javascript-challenge-3/#comments</comments>
		<pubDate>Wed, 08 Aug 2012 07:51:02 +0000</pubDate>
		<dc:creator>chrisp</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Challenges]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1736</guid>
		<description><![CDATA[This week we get graphical! Many people are exposed to some form of turtle drawing program when they first learn programming (or just basic computer usage and analytical thinking). It’s also a good way to develop the parts of your brain that deal with forward planning. The challenge for this week is to design a [...]]]></description>
			<content:encoded><![CDATA[<p>This week we get graphical! Many people are exposed to some form of <a href="http://en.wikipedia.org/wiki/Turtle_graphics">turtle drawing</a> program when they first learn programming (or just basic computer usage and analytical thinking). It’s also a good way to develop the parts of your brain that deal with forward planning.</p>

<p><span id="more-1736"></span></p>

<p>The challenge for this week is to design a <a href="http://en.wikipedia.org/wiki/Turtle_graphics">turtle drawing</a> program that accepts any form of user input in order to move, rotate and style a “pen” across a canvas. It should resemble the functionality demonstrated in the following diagram&#8230;</p>

<div style="padding-bottom: 1em">
<img src="http://mootools.net/blog/wp-content/uploads/2012/08/post4.png" alt="" width="400" height="370" class="alignnone size-full wp-image-1737" />
</div>

<p>The important things we are looking for are the ability to change direction and then to move forward in a straight line. You can do this with HTML elements (and some interesting CSS) but we encourage the use of SVG or canvas in your solutions as they are more suited to the task.</p>

<p>Hint: you don’t have to have the labels on the left and you can use text fields (or even keyboard navigation) instead of links. What is important is how you maintain and modify direction and position of the “pen” (the point at the “front” of the line).</p>

<p>You can make your solutions as intricate or as basic as you wish!</p>

<p>As before; post your solutions in the form of links to <a href="http://jsfiddle.net/">jsfiddle</a>, <a href="http://tinker.io/">tinker</a> or <a href="http://jsbin.com/">jsbin</a> (in the comment section) and we’ll update this post with a link to a review post detailing solutions that we think tackle the problem in ways worthy of mention.</p>

<p>Good luck!</p>

<p><strong>EDIT [2012/08/15]</strong>: We are closing comments and reviewing submissions. We will follow this post up with a review of our favourites and what they teach us about the task and JavaScript development in general.</p>

<p><strong>EDIT [2012/08/22]</strong>: We have posted the <a href="http://mootools.net/blog/2012/08/22/javascript-challenge-3-review/">review post</a> to for these submissions.</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/l_zh9MVsxbE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/08/08/javascript-challenge-3/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/08/08/javascript-challenge-3/</feedburner:origLink></item>
		<item>
		<title>JavaScript Challenge #1: Review</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/Xpm1sC2Ok-E/</link>
		<comments>http://mootools.net/blog/2012/08/08/javascript-challenge-1-review/#comments</comments>
		<pubDate>Wed, 08 Aug 2012 07:50:51 +0000</pubDate>
		<dc:creator>chrisp</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Challenges]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1744</guid>
		<description><![CDATA[The first JavaScript challenge was a huge success, with many excellent entries. While there are many excellent entries, we found the following few taught us interesting and helpful lessons&#8230; Lucas Corbeaux - http://jsfiddle.net/G5RuR/ Code reuse is a big issue when it comes to large-scale systems written in JavaScript. Lucas’ example shows us a method of [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://mootools.net/blog/2012/07/25/javascript-challenge-1/">first JavaScript challenge</a> was a huge success, with many excellent entries. While there are many excellent entries, we found the following few taught us interesting and helpful lessons&#8230;</p>

<p><span id="more-1744"></span></p>

<p>Lucas Corbeaux - <a href="http://jsfiddle.net/G5RuR/">http://jsfiddle.net/G5RuR/</a></p>

<p>Code reuse is a big issue when it comes to large-scale systems written in JavaScript. Lucas’ example shows us a method of wrapping processing/private code within a closure to provide a clean API and protected internal code.</p>

<p>Mickele Moriconi - <a href="http://jsfiddle.net/THrr6/1/">http://jsfiddle.net/THrr6/1/</a></p>

<p>While not technically JavaScript, Mickele’s example showcases a neat <a href="http://coffeescript.org/">CoffeeScript</a>/<a href="https://developer.mozilla.org/en-US/docs/HTML/Canvas">Canvas</a> approach to drawing the spiral, complete with text rendering code. If you have never seen or used <a href="http://coffeescript.org/">CoffeeScript</a> Mickele’s example may prove useful in learning some of the basic syntax differences.</p>

<p>Klaas Moerman - <a href="http://jsfiddle.net/BNs9z/">http://jsfiddle.net/BNs9z/</a></p>

<p>Using some clever maths, Klaas’ example shows how the spiral pattern can be generated using a tiny amount of code. While this doesn’t teach us anything specific to JavaScript, the algorithm is still pretty neat!</p>

<p>Cristian Carlesso - <a href="http://jsfiddle.net/kentaromiura/KtPw5/2/">http://jsfiddle.net/kentaromiura/KtPw5/2/</a></p>

<p>Nyan nyan nyan, nyan nyan nyan nyan nyan nyan nyan nyan nyan nyan nyan nyan nyan. Nyan nyan;  nyan nyan nyan nyan - “Nyan nyan  nyan nyan nyan nyan nyan.”. Nyan nyan nyan nyan nyan nyan nyan.</p>

<p>Tim Wienk - <a href="http://jsfiddle.net/timwienk/RQZ7H/">http://jsfiddle.net/timwienk/RQZ7H/</a></p>

<p>With the advent of Node.JS et al. the JavaScript world has been moving in the direction of <a href="http://requirejs.org/docs/whyamd.html#amd">Asynchronous Module Definition </a>(<a href="http://requirejs.org/docs/whyamd.html#amd">AMD</a>) as a means of defining and controlling modules and module dependencies. Tim’s example shows us some of the steps to take in order to create <a href="http://requirejs.org/docs/whyamd.html#amd">AMD</a> compatible modules of code.</p>

<p>Arian Stolwijk - <a href="https://tinker.io/024e3/4">https://tinker.io/024e3/4</a></p>

<p>If nothing else, this example’s code is beautifully formatted. It also showcases some neat CSS3-based animation.</p>

<p>Pete - <a href="http://jsfiddle.net/tq6Zf/">http://jsfiddle.net/tq6Zf/</a></p>

<p>This guy earns serious points for posting a <a href="http://jquery.com/">jQuery</a> solution on a <a href="http://mootools.net/">MooTools</a> blog. :)</p>

<p>The purpose of Challenge #1 was to introduce the challenges and exercise your logical brain; using as little “framework” code as possible. We would like to thank everyone that participated - it was fun to see so much conversation and collaboration around a fun JavaScript challenge.</p>

<p>Be sure to check out the Challenges category of blog posts for new challenges every week!</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/Xpm1sC2Ok-E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/08/08/javascript-challenge-1-review/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/08/08/javascript-challenge-1-review/</feedburner:origLink></item>
		<item>
		<title>JavaScript Challenge #2 (Whac-A-Moo)</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/2IHNTa95UGQ/</link>
		<comments>http://mootools.net/blog/2012/08/01/javascript-challenge-2/#comments</comments>
		<pubDate>Wed, 01 Aug 2012 09:49:18 +0000</pubDate>
		<dc:creator>chrisp</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Challenges]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1718</guid>
		<description><![CDATA[Hopefully the first challenge got you excited for JavaScript development in a competitive environment&#8230; One of the most common requirements of web applications is to be able to respond to user input, and in particular clicks (or touches). Continuing with our theme of element generation (and in some cases animation); this week’s challenge will be [...]]]></description>
			<content:encoded><![CDATA[<p>Hopefully the <a href="http://mootools.net/blog/2012/07/25/javascript-challenge-1/">first challenge</a> got you excited for JavaScript development in a competitive environment&#8230;</p>

<p>One of the most common requirements of web applications is to be able to respond to user input, and in particular clicks (or touches). Continuing with our theme of element generation (and in some cases animation); this week’s challenge will be to create a basic <a href="http://en.wikipedia.org/wiki/Whac-A-Mole">whac-a-mole</a> game.</p>

<p><span id="more-1718"></span></p>

<p>The point of the game will be to click on highlighted elements to increase score. This can be as basic or as intricate as you wish it to be, but it should resemble the following diagram&#8230;</p>

<div style="padding-bottom: 1em"><img src="http://mootools.net/blog/wp-content/uploads/2012/08/post3.png" alt="" width="390" height="260" class="alignnone size-full wp-image-1719" /></div>

<p>The green block represents the block a player must click in order to gain points. This means you will need logic to randomly select one of the possible blocks and highlight it. You also need to register user clicks and update the score “label”.</p>

<p>Hint: at times when you need to add many of the same kind of event to a variable amount of elements (in this case blocks); it is helpful and even efficient to use event delegation. You will need to use the <strong>setInterval()</strong> function or the <strong>setTimeout()</strong> function to create a predictable amount of time between each click or highlight.</p>

<p>As before; post your solutions in the form of links to <a href="http://jsfiddle.net/">jsfiddle</a>, <a href="http://tinker.io/">tinker</a> or <a href="http://jsbin.com/">jsbin</a> (in the comment section) and we’ll update this post with a link to a review post detailing solutions that we think tackle the problem in ways worthy of mention.</p>

<p><strong>EDIT [2012/08/08]</strong>: We are closing comments and reviewing submissions. We will follow this post up with a review of our favourites and what they teach us about the task and JavaScript development in general.</p>

<p><strong>EDIT [2012/08/22]</strong>: We have posted the <a href="http://mootools.net/blog/2012/08/22/javascript-challenge-2-review/">review post</a> to for these submissions.</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/2IHNTa95UGQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/08/01/javascript-challenge-2/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/08/01/javascript-challenge-2/</feedburner:origLink></item>
		<item>
		<title>JavaScript Challenge #1 (Wait, weekly?)</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/Fx1IDz49qjM/</link>
		<comments>http://mootools.net/blog/2012/07/25/javascript-challenge-1/#comments</comments>
		<pubDate>Wed, 25 Jul 2012 10:06:46 +0000</pubDate>
		<dc:creator>chrisp</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Challenges]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1658</guid>
		<description><![CDATA[The purpose of MooTools is not simply to bring syntactic sugar to JavaScript development but also to make you better at JavaScript. Often in forums and on Stack Overflow, the question will arise; &#8220;how do I do [insert UI widget] with [insert popular library]&#8221;. The problem with these kinds of questions is that they often [...]]]></description>
			<content:encoded><![CDATA[<p>The purpose of MooTools is not simply to bring syntactic sugar to JavaScript development but also to make you better at JavaScript. Often in forums and on Stack Overflow, the question will arise; &#8220;how do I do [insert UI widget] with [insert popular library]&#8221;.</p>

<p>The problem with these kinds of questions is that they often speak of the over-dependence on a certain framework (such as MooTools or jQuery) without a proper understanding of how JavaScript works or how to structure code well.</p>

<p>It is with this in mind that we want to set some challenges in plain old JavaScript (which are probably good programming challenges for any language) that will flex your grey matter.</p>

<p><span id="more-1658"></span></p>

<p>This week&#8217;s challenge is to find an elegant solution to generating elements in a spiral pattern. Consider the following diagram&#8230;</p>

<div style="padding-bottom: 1em"><img src="http://mootools.net/blog/wp-content/uploads/2012/07/Screen-Shot-2012-07-25-at-11.53.43-AM.png" alt="" width="399" height="201" /></div>

<p>Your solution can be <a href="http://en.wikipedia.org/wiki/Procedural_programming">procedural</a> or <a href="http://en.wikipedia.org/wiki/Recursive#Functional_recursion">recursive</a>, but in either case you will be dealing with a shrinking grid of possible locations for elements. The colours do not have to be in the result - they are only used to indicate the pattern.</p>

<p>Hint: Try defining variables for columns and rows so that the shape can change but the positioning and order remain the same.</p>

<p>Try also to minimize your use of any one particular set of libraries or modules, but rather use as much vanilla JavaScript in your solution as possible.</p>

<p>Post your solutions in the form of links to <a href="http://jsfiddle.net/">jsfiddle</a>, <a href="http://tinker.io/">tinker</a> or <a href="http://jsbin.com/">jsbin</a> (in the comment section) and we’ll update this post with a link to a review post detailing solutions that we think tackle the problem in ways worthy of mention.</p>

<p>We hope to make it a weekly thing, so be on the lookout for more challenges to follow!</p>

<p><strong>EDIT [2012/08/01]</strong>: We are closing comments and reviewing submissions. We will follow this post up with a review of our favourites and what they teach us about the task and JavaScript development in general.</p>

<p><strong>EDIT [2012/08/08]</strong>: We have posted the <a href="http://mootools.net/blog/2012/08/08/javascript-challenge-1-review/">review post</a> to for these submissions.</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/Fx1IDz49qjM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/07/25/javascript-challenge-1/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/07/25/javascript-challenge-1/</feedburner:origLink></item>
		<item>
		<title>MooTools Forge and GitHub are friends again</title>
		<link>http://feedproxy.google.com/~r/mootools-blog/~3/xODUT1jqrG4/</link>
		<comments>http://mootools.net/blog/2012/06/24/mootools-forge-and-github-are-friends-again/#comments</comments>
		<pubDate>Sun, 24 Jun 2012 19:14:55 +0000</pubDate>
		<dc:creator>timwienk</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://mootools.net/blog/?p=1620</guid>
		<description><![CDATA[Many of you have noticed that the Forge was having trouble updating and adding new plugins. GitHub updated their API to a new (v3) version quite a while ago, but we hadn&#8217;t been able to make the time to update the Forge to use it yet. On June 12, GitHub disabled the v2 API completely, [...]]]></description>
			<content:encoded><![CDATA[<p>Many of you have noticed that the Forge was having trouble updating and adding new plugins. GitHub updated their API to a new (v3) version quite a while ago, but we hadn&#8217;t been able to make the time to update the Forge to use it yet. On June 12, GitHub disabled the v2 API completely, and updating and adding to the Forge stopped working.</p>

<p><span id="more-1620"></span></p>

<p>A great deal of thanks goes to <a href="https://twitter.com/mienster">Mient-jan</a>, who started working on a fix right away, which was finished a few days ago. Another big thanks goes to <a href="https://twitter.com/fakedarren">Darren</a> for creating an easy to install clone of our Forge, actually making it possible for people to help and collaborate.</p>

<p>We used this weekend to do some testing, and earlier today we activated the changes on the live server: GitHub and the Forge are friends again! We hope the problems haven&#8217;t caused too much inconvenience, and we hope that you&#8217;ll enjoy using the Forge again.</p>
<img src="http://feeds.feedburner.com/~r/mootools-blog/~4/xODUT1jqrG4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mootools.net/blog/2012/06/24/mootools-forge-and-github-are-friends-again/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://mootools.net/blog/2012/06/24/mootools-forge-and-github-are-friends-again/</feedburner:origLink></item>
	</channel>
</rss>
