<?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>Fuel Your Coding</title>
	
	<link>http://fuelyourcoding.com</link>
	<description />
	<lastBuildDate>Tue, 03 Jan 2012 11:01:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/fuelyourcoding" /><feedburner:info uri="fuelyourcoding" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>fuelyourcoding</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>What Could Developers Do With Apple’s Rumored iTV?</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/eJC7ngZA6aQ/</link>
		<comments>http://fuelyourcoding.com/what-could-developers-do-with-apples-rumored-itv/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 11:01:46 +0000</pubDate>
		<dc:creator>Joel Falconer</dc:creator>
				<category><![CDATA[Apps]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1474</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p><img class="aligncenter size-full wp-image-1508" title="appletv" src="http://fuelyourcoding.com/files/appletv1.jpg" alt="appletv" width="592" height="452" /></p>
<p>Rumors that Apple has been working on a television set have been going for quite some time. The fire was stoked on the release of Walter Isaacson&#8217;s Steve Jobs biography, in which Jobs declares that he &#8220;finally cracked it&#8221; &#8212; referring to television user interfaces &#8212; and again in the past week after DigiTimes claimed the company was working on a summer 2012 timeline with 32&#8243; and 37&#8243; models (at those sizes, I hope DigiTimes is wrong &#8212; their track record is hit and miss).</p>
<p>The current Apple TV, a fantastic product but not a television set in itself, runs a version of iOS that has no support for third-party App Store applications. In the last few months, we&#8217;ve had the smallest taste of what apps on an iOS TV platform could do with the introduction of AirPlay, which allows an iPad to serve as a controller, serving up the control interface on the tablet and another view on the television.</p>
<p>We can assume that a fully-fledged television set from Apple, with the interface Jobs says he finally perfected before his death, will do what the iPhone 3G did for third-party developers and allow applications on the platform. But just what exactly is it that we can look forward to? What innovative ideas will take root on Apple&#8217;s television platform in ways that could be significantly different from the apps present on existing iOS devices?</p>
<h2>Gaming</h2>
<p>With AirPlay, some of the most interesting developments have been in the gaming world. When the feature was announced in June, I wondered about the potential that could be unlocked by <a href="http://startfrag.com/does-the-ipad-2-have-the-gaming-potential-to-beat-the-wii-u/">using iOS devices as controllers for console-like gaming</a>, with many parallels to the upcoming Wii U. The big question is: will AirPlay setups eventually dent console sales as much as devices like the iPhone and iPad have put a dent in sales of dedicated mobile gaming devices like the PlayStation Vita and Nintendo 3DS?</p>
<p>The iPad is a pretty great mobile gaming device but the current Apple TV is decidedly underpowered; it still can&#8217;t run 1080p video content, which is at this stage otherwise pretty ubiquitous. It pretty much goes without saying that the iTV would run 1080p video and there&#8217;s a good chance it would have the guts to run apps with 3D graphics of some quality if Apple has any plans to let developers near it.</p>
<p>With a television that can handle high-definition graphics processing and an iOS controller that can change to suit any game, I&#8217;d say this is one area that independent and big name studios alike will have a field day in. I don&#8217;t believe it would take serious gamers away from the Xbox 360 and the PlayStation but I can see the Wii losing market share.</p>
<h2>Education</h2>
<p>I&#8217;m not a fan of straight up educational video, and I&#8217;m not a huge fan of audio teaching either. I love learning using web apps or the reflective nature of learning via text where you can pause and think about certain concepts or lines, or the passive, reactionary mode of learning through video &#8212; which pretends to be more like classroom experiences where the teacher can interact with the students but is really anything but.</p>
<p>We&#8217;ve had heaps of great apps on computers, tablets and mobile devices for learning new skills, such as the plethora of language-learning apps that have been selling in droves since before the Internet was a common household utility, but I think an iTV running iOS, using voice or other iOS devices as an input, could make for a great learning environment in your living room.</p>
<p>Imagine, for example, pulling up guitar tablature on your iPad while watching the technique in practice, in real-time on the TV, and being able to quickly pull up related instruction &#8212; for instance, if there&#8217;s a pinch harmonic in the song you&#8217;re learning but you&#8217;re not sure of the technique, you can keep the context &#8212; the tablature for the song &#8212; on the tablet and learn the technique from the video instruction on the big screen; you wouldn&#8217;t have to leave the current exercise to learn prerequisite techniques as you went along.</p>
<p>As the Siri technologies of voice recognition and intelligent processing get more advanced it&#8217;s exciting to think about what teacher-student interactions our devices could emulate in the future.</p>
<h2>Fitness</h2>
<p>For longer than I can remember, aerobics on the beach has dominated early morning TV. One of the most popular product categories inspired by the Xbox Kinect is fitness gaming, with titles such as Zumba &#8212; which appeals primarily to women, not the Xbox&#8217;s traditional demographic &#8212; selling insanely well, along with other strong performers like UFC Personal Trainer.</p>
<p>It&#8217;s clear that, for those who can&#8217;t find, get to or afford fitness groups in their area, or are just taking baby steps off the couch, the television is a great facilitator of beginner exercise. I can see iOS developers building programs much like those seen on TV but that offer the user complete customization over their workouts, and integrated ways to track and graph things like weight loss and gain and logging of food consumption.</p>
<p>Where Xbox fitness titles can be pretty gimmicky, I can see iOS developers creating a cohesive system across devices: responsive video training in front of the TV and logging data on the go with the iPad and iPhone.</p>
<p>These are just three of the areas that developers will undoubtedly leap on first if the iTV arrives and if it opens up for App Store submissions. Let us know your own predictions in the comments section.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=eJC7ngZA6aQ:7_47AOSFFRM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=eJC7ngZA6aQ:7_47AOSFFRM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=eJC7ngZA6aQ:7_47AOSFFRM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=eJC7ngZA6aQ:7_47AOSFFRM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=eJC7ngZA6aQ:7_47AOSFFRM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=eJC7ngZA6aQ:7_47AOSFFRM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=eJC7ngZA6aQ:7_47AOSFFRM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=eJC7ngZA6aQ:7_47AOSFFRM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=eJC7ngZA6aQ:7_47AOSFFRM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=eJC7ngZA6aQ:7_47AOSFFRM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=eJC7ngZA6aQ:7_47AOSFFRM:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/eJC7ngZA6aQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/what-could-developers-do-with-apples-rumored-itv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/what-could-developers-do-with-apples-rumored-itv/</feedburner:origLink></item>
		<item>
		<title>10 Tools &amp; Frameworks for Responsive Design</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/QZk5InaE6bc/</link>
		<comments>http://fuelyourcoding.com/10-tools-frameworks-for-responsive-design/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 00:33:03 +0000</pubDate>
		<dc:creator>Joel Falconer</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Languages]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1448</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>Like webfonts, <a href="http://www.alistapart.com/articles/responsive-web-design/" target="_blank">responsive design</a> wasn’t something you heard much about until CSS3 specs started making it into popular browsers. Now, it’s the cool thing to do, and for good reason — it means one site to maintain for all devices. But it’s also a really challenging approach to web design. In this article, we look at 10 tools that’ll help you handle the challenge.</p>
<h2>320 and up</h2>
<p style="text-align: center; "><a href="http://www.stuffandnonsense.co.uk/projects/320andup/"><img class="size-full wp-image-1453 aligncenter" title="320andup" src="http://fuelyourcoding.com/files/320andup.jpg" alt="320andup" width="592" height="208" /></a></p>
<p>Most responsive designs are built with full desktop size in mind and scaled down from there. Andy and Keith Clark, the developers behind 320 and up, believe the opposite approach works best: design for the small screen, and implement the layout working upwards in size. <a href="http://www.stuffandnonsense.co.uk/projects/320andup/" target="_blank">320 and up</a> contains Media Query increments for five viewport sizes, a vertical grid, preset styles for typography and components from HTML5 Boilerplate.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">inuit.css</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">inuit.css is a HTML5 framework that uses a grid system that scales down to small screens ‘out of the box’. It’s a minimalist approach, giving you just what you need to get started without unnecessary styles, but it’s extensible and there are a range of handy plugins available for it — such as one that creates breadcrumb trails out of ordered lists.</div>
<h2>inuit.css</h2>
<p style="text-align: center; "><a href="http://csswizardry.com/inuitcss/"><img class="size-full wp-image-1456 aligncenter" title="inuitcss" src="http://fuelyourcoding.com/files/inuitcss.jpg" alt="inuitcss" width="592" height="300" /></a></p>
<p><a href="http://csswizardry.com/inuitcss/" target="_blank">inuit.css</a> is a HTML5 framework that uses a grid system that scales down to small screens ‘out of the box’. It’s a minimalist approach, giving you just what you need to get started without unnecessary styles, but it’s extensible and there are a range of handy plugins available for it — such as one that creates breadcrumb trails out of ordered lists.</p>
<h2>Skeleton</h2>
<p style="text-align: center; "><a href="http://getskeleton.com/"><img class="size-full wp-image-1457 aligncenter" title="skeleton" src="http://fuelyourcoding.com/files/skeleton.jpg" alt="skeleton" width="592" height="374" /></a></p>
<p><a href="http://getskeleton.com/" target="_blank">Skeleton</a> is a light collection of CSS and JavaScript files that make designing responsive sites based on the 960px grid easy. Skeleton includes some basic styling and typography presets to get you out of the gate quickly. This project is the brainchild of Dave Gamache, formerly of esteemed UX firm ZURB and now on Twitter’s design team.</p>
<h2>Less Framework</h2>
<p style="text-align: center; "><a href="http://lessframework.com/"><img class="size-full wp-image-1458 aligncenter" title="lessframework" src="http://fuelyourcoding.com/files/lessframework.jpg" alt="lessframework" width="592" height="351" /></a></p>
<p><a href="http://lessframework.com/" target="_blank">Less Framework</a> is a CSS starter with four layouts — default at 992px, and tablet, mobile and wide mobile sizes — based on a grid system and including a selection of typography presets. Because Less Framework is one of the most popular options, there’s a range of supporting tools such as a Rails gem, OmniGraffle stencil and Compass plugin built around Less.</p>
<h2>BluCSS</h2>
<p style="text-align: center; "><a href="http://www.designlunatic.com/projects/blucss/"><img class="size-full wp-image-1459 aligncenter" title="blucss" src="http://fuelyourcoding.com/files/blucss.jpg" alt="blucss" width="592" height="289" /></a></p>
<p><a href="http://www.designlunatic.com/projects/blucss/" target="_blank">BluCSS </a>is a CSS framework that, as usual, uses a flexible grid to facilitate responsive design. One feature that stands out is its responsive images, something many of these frameworks leave out; apply a class to your images and they’ll scale with your design. No need to include multiple files at multiple sizes, though be wary of unnecessary load on mobile devices with this approach.</p>
<h2>Mobile Boilerplate</h2>
<p style="text-align: center; "><a href="http://html5boilerplate.com/mobile"><img class="size-full wp-image-1460 aligncenter" title="mobileboilerplate" src="http://fuelyourcoding.com/files/mobileboilerplate.jpg" alt="mobileboilerplate" width="592" height="186" /></a></p>
<p>From the developers behind the famous HTML5 Boilerplate comes <a href="http://html5boilerplate.com/mobile" target="_blank">Mobile Boilerplate</a>, a responsive template that puts the focus on mobile devices, namely those running Android, iOS, Blackberry and Symbian software. Everything from viewport scaling to HTML5 offline caching to home screen icons are ready to go.</p>
<h2>Tiny Fluid Grid</h2>
<p style="text-align: center; "><a href="http://www.tinyfluidgrid.com/"><img class="size-full wp-image-1461 aligncenter" title="tinyfluidgrid" src="http://fuelyourcoding.com/files/tinyfluidgrid.jpg" alt="tinyfluidgrid" width="592" height="265" /></a></p>
<p>If you find all these CSS frameworks to be too much for your needs, <a href="http://www.tinyfluidgrid.com/" target="_blank">Tiny Fluid Grid</a> may be the alternative you’re looking for. Simply tell it how many columns your grid will need, how big you want your gutters and how wide the site will be, and this site will spit out a responsive fluid grid you can use right away.</p>
<h2>Golden Grid System</h2>
<p style="text-align: center; "><a href="http://goldengridsystem.com/"><img class="size-full wp-image-1462 aligncenter" title="goldengrid" src="http://fuelyourcoding.com/files/goldengrid.jpg" alt="goldengrid" width="592" height="217" /></a></p>
<p>The <a href="http://goldengridsystem.com/" target="_blank">Golden Grid System</a> is a 16 column grid that uses a folding method inspired by the DIN paper system to collapse down to 8 columns on tablet-size screens and 4 columns on mobile screens, making it work for designs that range from 240 to 2560 pixels wide. The GGS developers say their folding method is superior to others because the gutters are better at staying in proportion with the content, producing less of a squeezed (or sparse, depending on direction) look.</p>
<h2>1140 CSS Grid</h2>
<p style="text-align: center;"><a href="http://cssgrid.net/"><img class="size-full wp-image-1463 aligncenter" title="1140" src="http://fuelyourcoding.com/files/1140.jpg" alt="1140" width="592" height="247" /></a></p>
<p>The <a href="http://cssgrid.net/" target="_blank">1140 CSS Grid</a> takes the opposite approach of the 320 and up system. This is primarily aimed at people who really want to design for a wider 1280 pixel screen, and are sick of catering to a 1024 pixel baseline. 1140 CSS Grid allows them to do that while fluidly re-arranging to fit on smaller screens all the way down to mobile.</p>
<h2>Respond.js</h2>
<p>Even before you start working on a responsive design, you may be worried about visitors using browsers that don’t support media queries, the CSS3 feature that responsive sites depend on. With <a href="https://github.com/scottjehl/Respond" target="_blank">Respond.js</a>, this problem is easily solved; the script makes min-width and max-width work in Internet Explorer 6, 7 and 8, and should work with other browsers lacking support.</p>
<h2>Bonus: ZURB Foundation</h2>
<p><img class="aligncenter size-full wp-image-1472" title="foundation" src="http://fuelyourcoding.com/files/foundation.jpg" alt="foundation" width="592" height="412" /></p>
<p>ZURB&#8217;s <a href="http://foundation.zurb.com/">Foundation</a> is a newer entry among responsive design frameworks, and is one of the most promising, having already won over many users of other frameworks. Billed as an easy-to-use yet powerful framework for building both prototypes and production deployments that work across all kinds of devices, Foundation makes use of a flexible grid, a library of styles and elements for rapid prototyping, and professes to take the pain out of creating layouts for different formats with the same markup.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=QZk5InaE6bc:jvTDea2EHKM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=QZk5InaE6bc:jvTDea2EHKM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=QZk5InaE6bc:jvTDea2EHKM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=QZk5InaE6bc:jvTDea2EHKM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=QZk5InaE6bc:jvTDea2EHKM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=QZk5InaE6bc:jvTDea2EHKM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=QZk5InaE6bc:jvTDea2EHKM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=QZk5InaE6bc:jvTDea2EHKM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=QZk5InaE6bc:jvTDea2EHKM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=QZk5InaE6bc:jvTDea2EHKM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=QZk5InaE6bc:jvTDea2EHKM:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/QZk5InaE6bc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/10-tools-frameworks-for-responsive-design/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/10-tools-frameworks-for-responsive-design/</feedburner:origLink></item>
		<item>
		<title>Screens – Developing for Mobile, Tablets &amp; More. (DISCOUNT)</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/CQMXyV6BeXM/</link>
		<comments>http://fuelyourcoding.com/screens-developing-for-mobile-tablets-more-discount/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 20:13:24 +0000</pubDate>
		<dc:creator>Adelle Charles</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[conference]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1438</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>The Fuel Network has supported FITC events over the years and today is no different. <a href="http://www.fitc.ca/mobile" target="_blank">SCREENS</a> 2011, <em>(formerly known as &#8220;FITC Mobile&#8221;)</em>, now dedicated to mobile, tablet and set top box development. Jam packed with information and a massive networking opportunity, SCREENS consists of presentations, demonstrations and panel discussions. It is one of the only events in the world designed for developers of all platforms of screen content.</p>
<ul>
<li>2 full days of presentations, plus one optional day of pre-conference workshops</li>
<li>Covering iOS, Android, HTML5 &#8211; JQuery Mobile, HP/WebOS, AIR, FLEX, Windows Mobile, as well as marketing and business of apps</li>
<li>Over 40 presentations and panels covering all aspects of mobile, tablet, and set top box development</li>
<li>400+ attendees anticipated from around the world</li>
<li>Evening networking event</li>
</ul>
<p><img class="aligncenter size-full wp-image-1440" title="screens" src="http://fuelyourcoding.com/files/screens.png" alt="screens" width="592" height="189" /></p>
<h2>The Details</h2>
<p>Developing for Mobile, tablets, and more<br />
November 14-15, 2011<br />
Toronto, Ontario Canada<br />
<a href="http://www.fitc.ca/mobile" target="_blank">Event website link</a></p>
<h2>The Venue</h2>
<p><a href="http://www.mtccc.com" target="_blank">Metro Toronto Convention Centre (MTCC)</a><br />
North Building (255 Front street west), Toronto, Ontario Canada</p>
<h2>Confirmed Speakers</h2>
<ul>
<li>Alex Kennberg</li>
<li>Bob Burns</li>
<li>Brady Gilchrist</li>
<li>Chuck Freedman</li>
<li>Darren Osadchuk</li>
<li>Erik Von Harten</li>
<li>Greg Carron</li>
<li>Julian Dolce</li>
<li>Kevin Suttle</li>
<li>Marin Alejandro</li>
<li>Martin Dufort</li>
<li>Matt Fisher</li>
<li>Matt Rix</li>
<li>Matthew Patience</li>
<li>Mikko Haapoja</li>
<li>Pearl Chen</li>
<li>Peter Nitsch</li>
<li>R Blank</li>
<li>Renaun Erickson</li>
<li>Ryan Creighton</li>
<li>Scott Janousek</li>
<li>Timothy Quinn</li>
</ul>
<h2>Topics</h2>
<p>Android OS • App Success • BlackBerry Tablet OS • Corona SDK • Designing for Mobile • Mobile Marketing • Digital Home • Grand Central Dispatch and Blocks • iOS • jQuery Mobile • Managing Mobile Projects • Metro • Microsoft Stack • HCI • QNX • Thread Management • UI • UX • Windows Phone<strong><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold;"><br />
</span></strong></p>
<h2>Who will be attending SCREENS?</h2>
<p>SCREENS is for both current and future developers of mobile, tablet and set top box content. The program caters to beginners, intermediate and advanced programmers. While most of the topics will be technical in nature, they will include coverage of usability and design considerations for these platforms. They will also cover how to monetize app content, what the market looks like, and how to market your product and services.</p>
<h2>Companies represented at SCREENS 2011 include:</h2>
<p>Microsoft • Adobe • HP • Wavefront • Indusblue • QNX • Mobicartel • Ludicrous Software • Jam3 Media • Bestbuy • WhereCloud Inc • Almer/Blank • Transcontinental Interactive • Teehan + Lax • Canadian Film Center • WhereCloud Inc.</p>
<h2>Pricing &amp; Fuel Discount</h2>
<p>Festival ticket prices range from $199-$499<br />
Festival + Workshop ticket prices range from $249-$299<br />
Student Festival ticket prices range from $99-$229</p>
<p>All tickets include coffee, snacks, evening events and an event grab bag.</p>
<p><strong>Discount code &#8216;Fuel&#8217; provides 10% off any SCREENS 2011 tickets.<br />
</strong>The super early bird deadline is August 26<span><sup>th</sup></span></p>
<p><a href="http://www.fitc.ca/events/tickets/?event=118">Full ticket details here.</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=CQMXyV6BeXM:rrCb19jqZsA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=CQMXyV6BeXM:rrCb19jqZsA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=CQMXyV6BeXM:rrCb19jqZsA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=CQMXyV6BeXM:rrCb19jqZsA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=CQMXyV6BeXM:rrCb19jqZsA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=CQMXyV6BeXM:rrCb19jqZsA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=CQMXyV6BeXM:rrCb19jqZsA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=CQMXyV6BeXM:rrCb19jqZsA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=CQMXyV6BeXM:rrCb19jqZsA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=CQMXyV6BeXM:rrCb19jqZsA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=CQMXyV6BeXM:rrCb19jqZsA:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/CQMXyV6BeXM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/screens-developing-for-mobile-tablets-more-discount/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/screens-developing-for-mobile-tablets-more-discount/</feedburner:origLink></item>
		<item>
		<title>Future Coders</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/3zkxd3G1KDA/</link>
		<comments>http://fuelyourcoding.com/future-coders/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 11:00:28 +0000</pubDate>
		<dc:creator>Dan Denney</dc:creator>
				<category><![CDATA[Featured Developers]]></category>
		<category><![CDATA[web education]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1415</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p><img src="http://fuelyourcoding.com/files/full-sail-campus.jpg" alt="Full Sail Studios" title="Full Sail Studios" width="597" height="373" class="alignnone size-full wp-image-1420" /></p>
<p>I recently had the opportunity to get an inside look at a graduating class from Full Sail University. Future Coders may be  a little misleading as these students have already been rocking out, but I&#8217;m still calling them &#8220;The Future&#8221; because they are now leaving school and heading out to join the community.</p>
<h2>Where They Learned</h2>
<p>Admittedly, the initial thought of university based web education had me a little skeptical. As with most things in life, though, proper perspective is achieved by getting a first-hand look instead of judging from afar. I challenge anyone to take a walk around the Full Sail Campus and not drop your jaw. In a city hosting Disney World, it approaches a Campus layout with the same level of awe inspiring detail. My wife joined me for the tour and said that she would even become a geek like me in order to attend there.</p>
<p>Inspiration is vital and there is no lack of it on this campus. The achievements of past creatives and some fantastic tech are all around the facilities. While these aren&#8217;t coding related, being in a space with full video green rooms, amazing sound decks and an ESPN motion capture studio has to be inspiring. The campus is filled with creatives and the feel as you walk around is amazing.</p>
<h2>Who they Learned From</h2>
<p>These students took the web design and development track, which focuses on Interface Design &amp; Usability, Web Standards, Flash / ActionScript 3.0, Dynamic Back-End Development, leading to a Final Project.</p>
<p>Graduation from the program doesn&#8217;t just end with Final Project, though. These students sit down with their teachers and the faculty and discuss the program. They discuss the good and the bad, sharing observations and suggestions for improvement. There was some great data shared in comparing Github&#8217;s commit history graphs with their daily schedules. The staff truly listens and engages, it was great to see the process in action. I imagine that this happens with every group, but this particular one seemed as if they could not be ignored. They were extremely impressive.</p>
<h2>Their Final Projects</h2>
<p>The biggest challenge that I could imagine that there is for the instructors at Full Sail University is letting these awesome students out of their sight. I only got a few short hours with them and I went home wanting to know what they&#8217;ll each be doing next. For the time being, though, we&#8217;d like to share their Final Projects.</p>
<h2>Anthony Colangelo</h2>
<p><a href="http://twitter.com/antcolangelo"><img src="http://fuelyourcoding.com/files/antcolangelo.png" alt="@antcolangelo" title="@antcolangelo" width="128" height="128" class="alignnone size-full wp-image-1423" /></a></p>
<h3>What did you think of Full Sail University?</h3>
<p>I absolutely loved Full Sail University. The community is so vibrant, the teachers are all brilliant and truly amazing teachers, and all of the people around here are awesome people to be around. They&#8217;re all smart, passionate, and driven, which inspires you and makes you push yourself harder. I cannot convey my love for this school and these people enough.</p>
<h3>Why did you build it, and how did you do it?</h3>
<p>For our final project, we built WDD Social (<a href="http://wddsocial.com">http://wddsocial.com</a>), which is a social network for the Full Sail web community (teachers, students, and alumni). It is a great way for the community to meet, share projects and industry information, and to stay connected. It is also a great way for the outside world, especially industry professionals and future employers, to see what the community has to offer.</p>
<p>We built it because, after going through the degree, we realized this is something that has been missing from the community and it is something that would make the community better as a whole.</p>
<p>We built the front-end of WDD Social with HTML5, CSS 3, and jQuery 1.6. On the back-end, we built a custom PHP 5.3 framework, called Framework5, and a MySQL database.</p>
<h3>Which teachers and courses really stood out to you, and why?</h3>
<p>The teachers that stood out to me were Jason Madsen (<a href="http://twitter.com/jason_madsen">@jason_madsen</a>, now the Program Director, formerly the Object-oriented Programming teacher) and Rick Osborne (<a href="http://twitter.com/rickosborneorg">@rickosborneorg</a>, now Department Chair, formerly server-side language and database teacher). They both are so smart, passionate, and hardworking that it truly inspired me to work extremely hard. They really taught me a lot, and I will always go back to them for advice and insight as I move on in my career.</p>
<p>Follow Anthony <a href="http://twitter.com/antcolangelo">@antcolangelo</a></p>
<h2>Alicia Brooks</h2>
<p><a href="http://twitter.com/aliciaj_"><img src="http://fuelyourcoding.com/files/aliciaj.jpg" alt="aliciaj" title="aliciaj" width="128" height="128" class="alignnone size-full wp-image-1426" /></a></p>
<h3>What did you think of Full Sail University?</h3>
<p>Full Sail University was by far the greatest choice I could have made. I absolutely love the fast pace and realistic structure. The accelerated program keeps you on your feet, working hard, and out into the world so much sooner. I feel that it really did prepare me for my upcoming career.</p>
<h3>Why did you build it, and how did you do it?</h3>
<p> <br />
I built my final project, <a href="http ://supportmymission.org">supportmymission.org</a> because I wanted to help people through my web skills. Supportmymission is a non-profit that makes raising funds for mission’s trips easier. It allows users to share their mission with everyone online rather than being limited to the people they know. I used a lot of technologies but the main one was CakePHP, learning a framework was something I wanted to accomplish before graduating.</p>
<h3>Which teachers and courses really stood out to you, and why?</h3>
<p> <br />
I have to say that every teacher at Full Sail is awesome, they are all experienced and all always willing to help you advance your skill set. I would have to say that Brandon Brown (<a href="http://twitter.com/bybrandonbrown">@bybrandonbrown</a>) and Marianne Sheldon (<a href="http://twitter.com/mariannesheldon">@marianneSheldon</a>) definitely stood out to me. I asked them so many questions during final project. They were always willing and open to make time for anything I needed. I really appreciated that!</p>
<p>Follow Alicia <a href="http://twitter.com/aliciaj_">@aliciaj_</a></p>
<h2>Oliver Lacan</h2>
<p><a href="http://twitter.com/olivierlacan"><img src="http://fuelyourcoding.com/files/olivier.jpg" alt="olivier" title="olivier" width="128" height="128" class="alignnone size-full wp-image-1427" /></a></p>
<h3>What did you think of Full Sail University?</h3>
<p>I loved nearly every minute of it.</p>
<p>I mastered more in two years than I&#8217;ve managed to teach myself in ten: vector drawing, user experience &#038; usability concepts, basic animation, object-oriented programming, server-side dev, relational and NoSQL databases, web standards &#038; accessibility, mobile dev, and the all-essential production process. I&#8217;ve met good, passionate and driven people, both on the teacher and student side.</p>
<p>New classes each month meant that we never got stale information, curriculums evolve month-to-month. It also made it hard to get sick of a topic for which you had no affinity.</p>
<h3>What is your Final Project?</h3>
<p>My final project at Full Sail is called <a href="http://roomiesapp.com">Roomies</a>. It&#8217;s a web application that offers task and expense management for roommates with busy schedules. It incentivizes collaboration and good relationships by rewarding participation and assignment completion.</p>
<h3>Why did you build it, and how did you do it?</h3>
<p>We wanted to make tedious house-related group tasks and expenses less painful and stressful. The idea had been in the back of my mind since the fall of 2009 when I met Andrew Smith, another Full Sail web student, on Twitter and realized he had a very similar idea. We wanted it to exist too badly.</p>
<p>To build Roomies we used Ruby on Rails (a first at Full Sail). We became familiar with it while working on cleverCode, a tiny company we founded six months into our degree with my classmate Zach Nicoll. Andrew, who joined us in early 2010, introduced us to RoR and I started actively teaching myself how to use the framework six months before our final project.</p>
<p>After we discovered CouchDB at Full Sail, Andrew showed me the MongoDB document-oriented database. The excellent integration with Rails through the Mongoid ODM made us decide to use it on Roomies instead of classical SQL.</p>
<p>We also used CoffeeScript, Sass, Haml, and Compass to speed up and clean up our development process as much as we could since we had less than 2 months of active development time.</p>
<h3>Which teachers and courses really stood out to you, and why?</h3>
<p>All teachers at Full Sail have one great quality, they constantly evolve. They&#8217;re encouraged to freelance by the faculty which means they&#8217;re always learning new techniques and eager to pass them on to us.</p>
<p>Chris Burke &#038; Gus Hernandez &#8211; Web Interface &#038; Usability / Applied Design Tools &#038; Interfaces: Those two classes are the crux of the user experience, usability and web design knowledge we received. Both spectacular courses taught by two guys who will not wear gloves to smack you down if you don&#8217;t apply critical thinking and logic when designing an interface. In a field where people give to much credit to aesthetics, I can&#8217;t overstate how crucial this was.</p>
<p>Concepts of Object-oriented Programming: As a non-programmer when I started Full Sail, I struggled through the first ActionScript class there. After Sean Bernath ( @sbernath managed to help me &#8220;get&#8221; programming, Jason Madsen was the guy who carried me through the &#8220;OOP revelation&#8221; faster than I had ever imagined possible. His skill at breaking down intimidating concepts into simple metaphors and challenging exercises made me fall in love with coding, and bear in mind this was AS3 &#038; Flash. The fact that he went on to become the Program Director at Full Sail Web makes me extremely confident regarding the degree&#8217;s future.</p>
<p>Advanced Server-side Languages &#038; Advanced Database Structures: I&#8217;m still amazed at the in-depth knowledge of database design &#038; management Rick Osborne managed to transmit to us. His push for the use of Git (now widespread in the program), unit testing, and further OOP concepts is why I think grads will be very valuable in the industry.</p>
<p>The jQuery class with Mike Smotherman (<a href="http://twitter.com/codeinfused">@codeinfused)</a> made me realize why I had fallen in love with the web (and not applications) in the first place, and get a glimpse at the power of the DOM.</p>
<p>Follow Olivier <a href="http://twitter.com/olivierlacan">@olivierlacan</a></p>
<h2>Kent Lassen</h2>
<h3>What did you think of Full Sail University?</h3>
<p>It was an amazing experience. I couldn&#8217;t have asked for a better school. It has brought me from my days of coding HTML in tables to today, where I know plenty of languages and how to create amazing websites.</p>
<h3>What is your Final Project?</h3>
<p>Lightning Owl. It is a web app that allows a person to write and share notes. It is a writer&#8217;s management tool.</p>
<h3>Why did you build it, and how did you do it?</h3>
<p>I built this as my final project. It was an idea that I had been thinking about because I was getting into blogging.</p>
<h3>Which teachers and courses really stood out to you, and why?</h3>
<p>Jason Madsen, who was one of my flash teachers was amazing. His class was extremely helpful to me when it came to programming. I also think that all of the final project teachers were amazing and helped greatly. Without them, I wouldn&#8217;t have been inspired.</p>
<p>Follow Kent <a href="http:/twitter.com/kentlassen">@kentlassen</a></p>
<h2>Tyler Matthews</h2>
<p><a href="http://twitter.com/tmatthewsdev"><img src="http://fuelyourcoding.com/files/tyler.jpg" alt="tyler" title="tyler" width="128" height="128" class="alignnone size-full wp-image-1428" /></a></p>
<h3>What did you think of Full Sail University?</h3>
<p>Full Sail has provided me with an incredible education experience. The curriculum is designed to teach the latest technologies used in various areas of the web, including user interface design, server-side development, as well as production and deployment. The program is also accelerated, which is essential when you consider the fast paced nature of the web, with its ever expanding list of technologies and trends. The most beneficial part of Full Sail was the people I interacted with during the time I spent there. The community of web students and teachers come from a diverse range of technical backgrounds, which provide everyone with various perspectives, methods and techniques.</p>
<h3>What is your Final Project?</h3>
<p>For my final project, Anthony Colangelo and I built a social network for the web program here at Full Sail. Our site WDD Social (<a href="http://wddsocial.com">wddsocial.com</a>) is a community for students and teachers to interact and share industry related information. Members can also share projects with the community, which are displayed on their public profile and visible to prospective employers. We also created a job board for current students and alumni, where positions could be posted by community and non-community members. </p>
<h3>Why did you build it, and how did you do it?</h3>
<p>Early in the program, Anthony and I realized that it was difficult to interact with students throughout the degree. Full Sail has an accelerated approach to education, where classes are typically taken at the rate of two per month. This makes it difficult to meet others throughout the degree, especially those who are more than a few months ahead or behind our group. We realized that a community site could benefit students, while utilizing the technologies we learned during our 21 months here at Full Sail. </p>
<h3>Which teachers and courses really stood out to you, and why?</h3>
<p>I&#8217;ve always been fascinated by server-side languages, and feel as if that part of the degree was most beneficial to me. The topics covered provided me with an in-depth understanding of what it takes to develop practical applications in PHP and Coldfusion. The server side courses also covered database topics such as relational database systems, MySQL optimization, and even experience with NoSQL database technologies.</p>
<p>Follow Tyler <a href="http://twitter.com/tmatthewsdev">@tmatthewsdev</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=3zkxd3G1KDA:KnWpP3KRX0o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=3zkxd3G1KDA:KnWpP3KRX0o:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=3zkxd3G1KDA:KnWpP3KRX0o:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=3zkxd3G1KDA:KnWpP3KRX0o:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=3zkxd3G1KDA:KnWpP3KRX0o:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=3zkxd3G1KDA:KnWpP3KRX0o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=3zkxd3G1KDA:KnWpP3KRX0o:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=3zkxd3G1KDA:KnWpP3KRX0o:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=3zkxd3G1KDA:KnWpP3KRX0o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=3zkxd3G1KDA:KnWpP3KRX0o:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=3zkxd3G1KDA:KnWpP3KRX0o:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/3zkxd3G1KDA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/future-coders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/future-coders/</feedburner:origLink></item>
		<item>
		<title>Rise of the Mac Git GUIs</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/StIogbPV1C4/</link>
		<comments>http://fuelyourcoding.com/rise-of-the-mac-git-guis/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 14:00:58 +0000</pubDate>
		<dc:creator>Jerod Santo</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1399</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>One sign of a developer power tool hitting critical mass is when a wellspring of Graphical User Interfaces explode onto the scene. It looks like <a href="http://git-scm.com/">Git</a> &mdash; the distributed version control system authored by Linus Torvalds &mdash; has arrived. It brings with it a bevy of Git clients for Mac OS X.</p>
<p>Some are old, some are shiny new, and some haven&#8217;t even officially been released yet. Let&#8217;s run them down, shall we?</p>
<h3><a href="http://gitx.frim.nl/">GitX</a></h3>
<p>GitX may be the oldest of the lot, but this is a powerful and great looking Git client. It features a history viewer, <a href="https://gist.github.com">GitHub&#8217;s gist</a> integration, and most importantly a great commit interface which allows for easy hunk and single-line commits.</p>
<p><a href="http://gitx.frim.nl/"><img src="http://fuelyourcoding.com/files/GitX-Commit-600x465.png" alt="GitX-Commit" title="GitX-Commit" width="600" height="465" class="aligncenter size-medium wp-image-1402" /></a></p>
<p>Best of all, it&#8217;s totally free &#038; open source! There is a ton of activity on GitHub, most interesting of which is a <a href="https://github/com/brotherbard/gitx">fork by Brotherbard</a> that adds many experimental features.</p>
<h3><a href="http://www.git-tower.com/">Git Tower</a></h3>
<p>Free while still in beta, Git Tower is a commercial application claiming to be &#8220;the most powerful Git client for Mac&#8221;. Big words, but they&#8217;re doing a great job living up to them. Git Tower has a slick interface, a repo manager for easily loading previous projects, remote repo integration, and the list goes on.</p>
<p><a href="http://www.git-tower.com/"><img src="http://fuelyourcoding.com/files/history_recent_big-600x432.jpg" alt="history_recent_big" title="history_recent_big" width="600" height="432" class="aligncenter size-medium wp-image-1405" /></a></p>
<p>Another thing that makes this application <em>special</em> is that they managed to capture FUEL editor Doug Neiner&#8217;s ugly mug on the History view screenshot. What are the odds?! :)</p>
<h3><a href="http://gitboxapp.com/">Gitbox</a></h3>
<p>Gitbox hosts a bunch of powerful features while maintaining a minimal interface. Anybody who has designed interfaces for software knows how difficult a task that can be.</p>
<p><a href="http://gitboxapp.com/"><img src="http://fuelyourcoding.com/files/gitbox-1.0-screenshot-600x351.png" alt="gitbox-1.0-screenshot" title="gitbox-1.0-screenshot" width="600" height="351" class="aligncenter size-medium wp-image-1407" /></a></p>
<p>The app is free for a single repository and $39 for multiple repositories. Its features include single-click operations, automated remote commit fetching, local/remote branches, and external diffing tool integration.</p>
<h3><a href="http://gitmacapp.com/">GitMac</a></h3>
<p><a href="http://gitmacapp.com/comingsoon"><img src="http://fuelyourcoding.com/files/screenshot_1-600x421.png" alt="screenshot_1" title="screenshot_1" width="600" height="421" class="aligncenter size-medium wp-image-1408" /></a></p>
<p>We don&#8217;t know too much about GitMac since it hasn&#8217;t entered its beta stage yet, but its definitely one to keep an eye on as development progresses.</p>
<h3>Review</h3>
<p>It&#8217;s exciting to see the maturation and adoption of a tool as powerful as Git. While graphical interfaces aren&#8217;t necessary for us &#8220;hardcore developers&#8221;, they are really nice for those who could benefit greatly from distributed version control, but have a case of Terminalitis®.</p>
<p>Give these tools a try and be sure to let us know in the comments if we missed any!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=StIogbPV1C4:RHgM2QXNd2s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=StIogbPV1C4:RHgM2QXNd2s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=StIogbPV1C4:RHgM2QXNd2s:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=StIogbPV1C4:RHgM2QXNd2s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=StIogbPV1C4:RHgM2QXNd2s:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=StIogbPV1C4:RHgM2QXNd2s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=StIogbPV1C4:RHgM2QXNd2s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=StIogbPV1C4:RHgM2QXNd2s:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=StIogbPV1C4:RHgM2QXNd2s:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=StIogbPV1C4:RHgM2QXNd2s:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=StIogbPV1C4:RHgM2QXNd2s:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/StIogbPV1C4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/rise-of-the-mac-git-guis/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/rise-of-the-mac-git-guis/</feedburner:origLink></item>
		<item>
		<title>WebDeveloperWeekly: A Free Newsletter for Web Developers</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/nVSj5oRTUEQ/</link>
		<comments>http://fuelyourcoding.com/webdeveloperweekly-a-free-newsletter-for-web-developers/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 22:45:15 +0000</pubDate>
		<dc:creator>Jerod Santo</dc:creator>
				<category><![CDATA[Freebies]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1388</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p><a href="http://designerfoo.com/">Manoj Sachwani</a> &mdash; a contributor here at Fuel Your Coding &mdash; is launching a free weekly newsletter just for web developers!</p>
<p><a href="http://www.webdeveloperweekly.com/"><img src="http://fuelyourcoding.com/files/mainlogo-600x198.jpg" alt="mainlogo" title="mainlogo" width="600" height="198" class="aligncenter size-medium wp-image-1390" /></a></p>
<p>Manoj says there will be just one email each Saturday and absolutely no spam. Right now the newsletter will mostly be sharing valuable links for developers, but he is open to feedback and would love us to help him improve it.</p>
<p>Potential topics include:</p>
<blockquote><p>AJAX, AS3, ASP, ASP.net, Browsers, CSS,Cappuccino, CoffeeScript, Cold Fusion, Flash, Flex, HTML, HTML5, JavaScript, Media, PHP, Photoshop, Prototype, RSS, Rails and Ruby, SOAP, SQL, SVG, Semantic, WAP, XML, YUI, jQuery,Jobs, &#038; more</p></blockquote>
<p>Looks like he has something for everybody in that list. If you&#8217;re interested head on over to <a href="http://www.webdeveloperweekly.com/">WebDeveloperWeeky.com</a> and subscribe!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=nVSj5oRTUEQ:jEc9_6g1Ido:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=nVSj5oRTUEQ:jEc9_6g1Ido:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=nVSj5oRTUEQ:jEc9_6g1Ido:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=nVSj5oRTUEQ:jEc9_6g1Ido:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=nVSj5oRTUEQ:jEc9_6g1Ido:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=nVSj5oRTUEQ:jEc9_6g1Ido:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=nVSj5oRTUEQ:jEc9_6g1Ido:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=nVSj5oRTUEQ:jEc9_6g1Ido:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=nVSj5oRTUEQ:jEc9_6g1Ido:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=nVSj5oRTUEQ:jEc9_6g1Ido:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=nVSj5oRTUEQ:jEc9_6g1Ido:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/nVSj5oRTUEQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/webdeveloperweekly-a-free-newsletter-for-web-developers/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/webdeveloperweekly-a-free-newsletter-for-web-developers/</feedburner:origLink></item>
		<item>
		<title>Getting Started with jQuery Mobile &amp; Rails 3</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/qJ1kzPCnSNo/</link>
		<comments>http://fuelyourcoding.com/getting-started-with-jquery-mobile-rails-3/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 13:06:15 +0000</pubDate>
		<dc:creator>Jerod Santo</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery mobile]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1341</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>

&#60;head&#62;
  &#60;title&#62;Jqmoblog&#60;/title&#62;
  &#60;link rel=&#34;stylesheet&#34; href=&#34;http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css&#34; /&#62;
  &#60;%= javascript_include_tag :defaults %&#62;
  &#60;script src=&#34;http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js&#34;&#62;&#60;/script&#62;
  &#60;%= csrf_meta_tag %&#62;
&#60;/head&#62;

Okay, everything is in place. Now we&#8217;re ready to turn this into a mobile app!
Getting Started
Before we flesh out our mobile CRUD actions, let&#8217;s get the posts index looking decent in mobile browsers. jQuery Mobile relies [...]]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>The very promising <a href="http://jquerymobile.com/">jQuery Mobile</a> project is now in its first Alpha release! What better time to give it a spin with our (err&#8230; my) <a href="http://rubyonrails.org">favorite web framework</a>?!</p>
<p>You should read jQuery Mobile&#8217;s <a href="http://jquerymobile.com/demos/1.0a1/#docs/about/intro.html">official introduction</a> section to familiarize yourself with its principles, but in a few words: you include it on the page, format your markup to conform to its requirements and reap the benefits. Yay, let&#8217;s write a (very contrived) <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">CRUD</a> application with Rails 3 and jQuery Mobile!</p>
<h2>Setup</h2>
<p>Our application will allow us to create, read, update and delete blog posts (remember when I said it was contrived? Uhm..yah) from mobile devices. If you don&#8217;t have Rails 3 installed yet, you can get it via <a href="http://rubygems.org">RubyGems</a>:</p>
<pre class="brush: plain;">
gem install rails
</pre>
<p>Use the <tt>rails</tt> command line tool to generate a new application. We&#8217;ll call it <strong>jqmoblog</strong>.</p>
<pre class="brush: plain;">
rails new jqmoblog
# ... a bunch of files are created
cd jqmoblog
</pre>
<p>As of Rails 3.0.1 you cannot specify jQuery as the JavaScript tool of choice when you generate a Rails application, but we can easily swap it in by using the handy, dandy <a href="http://github.com/indirect/jquery-rails">jquery-rails</a> gem. Edit the <tt>Gemfile</tt> in the project&#8217;s root directory and add a dependency on the gem. Once finished your <tt>Gemfile</tt> will look something like this:</p>
<pre class="brush: ruby;">
source 'http://rubygems.org'

gem 'rails', '3.0.1'
gem 'sqlite3-ruby', :require =&gt; 'sqlite3'
gem 'jquery-rails'
</pre>
<p>Install the required gems using the <tt>bundle</tt> command line tool:</p>
<pre class="brush: plain;">
bundle install
</pre>
<p>Now we&#8217;ll use the Rails generator added by the <tt>jquery-rails</tt> gem to get all the jQuery files we need:</p>
<pre class="brush: plain;">
rails generate jquery:install
</pre>
<p>When prompted, allow it to overwrite <tt>rails.js</tt>.</p>
<p>We&#8217;re almost ready. The application skeleton is in place and jQuery has replaced the Rails default JavaScript libraries, but we&#8217;re missing the basic model, controller, and views for our application.</p>
<p>Thankfully, Rails has a generator which will create these files for us and its called the <tt>scaffold</tt> generator. We&#8217;ll keep the blog posts in our app super-simple since we&#8217;re really just using them to learn about jQuery Mobile. Each post will have a title and a body. Generate the scaffold for a Post resource like this:</p>
<pre class="brush: plain;">
rails generate scaffold Post title:string body:text
</pre>
<p>This command will provide a list of files and directories it created. There should be a model (<tt>app/models/post.rb</tt>), a controller (<tt>app/controller/posts_controller.rb</tt>), and a directory of views (<tt>app/views/posts</tt>) for our Post resource.</p>
<p>Run the database migration that was created from the <tt>scaffold</tt> command so our database has a <tt>posts</tt> table with the required columns for storing our posts:</p>
<pre class="brush: plain;">
rake db:migrate
</pre>
<p>At this point you can fire up a Rails server and the app will load up in your browser:</p>
<pre class="brush: plain;">
rails server
</pre>
<p>Point your browser to <tt>http://localhost:3000</tt> and you should see this:</p>
<p style="text-align: center;"><img src="http://fuelyourcoding.com/files/default.png" alt="default" title="default" width="549" height="518" class="aligncenter size-full wp-image-1363" /></p>
<p>Hmm, before we get to mobilizing this application, let&#8217;s make the root url load the list of our posts instead of the default Rails index file:</p>
<pre class="brush: plain;">
rm public/index.html
</pre>
<p>Edit the <tt>config/routes.rb</tt> and set the root route like so:</p>
<pre class="brush: ruby;">
Jqmoblog::Application.routes.draw do
  resources :posts
  root :to =&gt; &quot;posts#index&quot;
end
</pre>
<p>Now load up <tt>http://localhost:3000</tt> again and you should see the empty list of posts.</p>
<p>We still need to get the jQuery Mobile files on the page. Lets use the ones hosted on <a href="http://jquery.com">jquery.com</a>. Add them to the application&#8217;s <tt>layout</tt> file so they&#8217;ll be on every page that gets served. In <tt>app/views/layouts/application.html.erb</tt>, edit the <tt>head</tt> section to look like this:</p>
<pre class="brush: xml;">
&lt;head&gt;
  &lt;title&gt;Jqmoblog&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css&quot; /&gt;
  &lt;%= javascript_include_tag :defaults %&gt;
  &lt;script src=&quot;http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js&quot;&gt;&lt;/script&gt;
  &lt;%= csrf_meta_tag %&gt;
&lt;/head&gt;
</pre>
<p>Okay, everything is in place. <em>Now</em> we&#8217;re ready to turn this into a mobile app!</p>
<h2>Getting Started</h2>
<p>Before we flesh out our mobile CRUD actions, let&#8217;s get the posts index looking decent in mobile browsers. jQuery Mobile relies directly on the page&#8217;s markup to work its magic, so to invoke it we just need to change our views to conform to its conventions.</p>
<p>Each &#8220;page&#8221; in a jQuery Mobile application needs to be wrapped in a <tt>div</tt> with a <tt>data-role</tt> attribute of <tt>page</tt>. I put &#8220;page&#8221; in quotes because there can actually be many of them on a single webpage loaded from the server. In our app we&#8217;ll be loading each &#8220;page&#8221; from Rails, so we should just add this to our layout file which will wrap each of our individual views:</p>
<p><strong>Before</strong></p>
<pre class="brush: xml;">
&lt;body&gt;
  &lt;%= yield %&gt;
&lt;/body&gt;
</pre>
<p><strong>After</strong></p>
<pre class="brush: xml;">
&lt;body&gt;
  &lt;div data-role=&quot;page&quot;&gt;
    &lt;%= yield %&gt;
  &lt;/div&gt;
&lt;/body&gt;
</pre>
<p>Next edit the post&#8217;s index (<tt>index.html.erb</tt>) and change the markup to create a header and a content section which lists all the posts in the database.</p>
<p><strong>Before</strong></p>
<pre class="brush: xml;">
&lt;h1&gt;Listing posts&lt;/h1&gt;

&lt;table&gt;
  &lt;tr&gt;
    &lt;th&gt;Title&lt;/th&gt;
    &lt;th&gt;Body&lt;/th&gt;
    &lt;th&gt;&lt;/th&gt;
    &lt;th&gt;&lt;/th&gt;
    &lt;th&gt;&lt;/th&gt;
  &lt;/tr&gt;

&lt;% @posts.each do |post| %&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;%= post.title %&gt;&lt;/td&gt;
    &lt;td&gt;&lt;%= post.body %&gt;&lt;/td&gt;
    &lt;td&gt;&lt;%= link_to 'Show', post %&gt;&lt;/td&gt;
    &lt;td&gt;&lt;%= link_to 'Edit', edit_post_path(post) %&gt;&lt;/td&gt;
    &lt;td&gt;&lt;%= link_to 'Destroy', post, :confirm =&gt; 'Are you sure?', :method =&gt; :delete %&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;% end %&gt;
&lt;/table&gt;

&lt;br /&gt;

&lt;%= link_to 'New Post', new_post_path %&gt;
</pre>
<p><strong>After</strong></p>
<pre class="brush: xml;">
&lt;div data-role=&quot;header&quot;&gt;
  &lt;h1&gt;Listing posts&lt;/h1&gt;
&lt;/div&gt;

&lt;div data-role=&quot;content&quot;&gt;
  &lt;ul data-role=&quot;listview&quot;&gt;
    &lt;% @posts.each do |post| %&gt;
    &lt;li&gt;
      &lt;%= link_to post.title, post %&gt;
      &lt;%= link_to 'edit post', edit_post_path(post), &quot;data-icon&quot; =&gt; &quot;gear&quot; %&gt;
    &lt;/li&gt;
    &lt;% end %&gt;
  &lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>Load up the page and it should look like this:</p>
<p style="text-align: center;"><img src="http://fuelyourcoding.com/files/base.png" alt="base" title="base" width="472" height="615" class="aligncenter size-full wp-image-1365" /></p>
<p>Two things to note here. First, we are once again using the <tt>data-role</tt> attribute to create the header and the styled list. This is a major theme of jQuery Mobile (as of the Alpha, I&#8217;m told they <em>*might*</em> be switching to class names instead of data- attributes). Second, each list item has two links, and jQuery Mobile automatically knows that this means we want to use a <a href="http://jquerymobile.com/demos/1.0a1/#docs/lists/lists-split.html">split button list</a>. Pretty cool, huh?</p>
<p>Let&#8217;s add a button which will take us to a page where we can create new posts. Add this line to the end of the header <tt>div</tt>:</p>
<pre class="brush: xml;">
&lt;%= link_to 'Add', new_post_path, &quot;data-icon&quot; =&gt; &quot;plus&quot;, &quot;class&quot; =&gt; &quot;ui-btn-right&quot; %&gt;
</pre>
<p>Again, jQuery Mobile &#8220;just knows&#8221; that this should be a button in our header and we pass it a class and a <tt>data-icon</tt> attribute to tell it where to place it and which icon to use. We now have a button in the header which links to the new post path!</p>
<p style="text-align: center;"><img src="http://fuelyourcoding.com/files/base-add.png" alt="base-add" title="base-add" width="472" height="615" class="aligncenter size-full wp-image-1366" /></p>
<h2>Create</h2>
<p>We&#8217;re gonna need to create posts so we can read, update and delete them, so lets handle creation first. The &#8220;Add&#8221; button on the posts index links to the <tt>new.html.erb</tt> view. It works as is and looks okay too. We&#8217;ll just tweak the markup to make it fit into the jQuery Mobile styles:</p>
<pre class="brush: xml;">
&lt;div data-role=&quot;header&quot;&gt;
  &lt;h1&gt;New Post&lt;/h1&gt;
&lt;/div&gt;

&lt;div data-role=&quot;content&quot;&gt;
  &lt;%= render 'form' %&gt;
&lt;/div&gt;
</pre>
<p>We can now add new posts using the mobile interface! Go ahead and create a few so the posts index shows a list with links to edit each post:</p>
<p style="text-align: center;"><img src="http://fuelyourcoding.com/files/base-posts.png" alt="base-posts" title="base-posts" width="472" height="615" class="aligncenter size-full wp-image-1367" /></p>
<h2>Read</h2>
<p>People will read posts from their <tt>show.html.erb</tt> view. Again, no change to the underlying controller or model code needs to happen. Just update the view file to look like this:</p>
<pre class="brush: xml;">
&lt;div data-role=&quot;header&quot;&gt;
  &lt;h1&gt;&lt;%= @post.title %&gt;&lt;/h1&gt;
  &lt;%= link_to 'Home', posts_url, &quot;class&quot; =&gt; &quot;ui-btn-right&quot; %&gt;
&lt;/div&gt;

&lt;div data-role=&quot;content&quot;&gt;
  &lt;%= @post.body %&gt;
&lt;/div&gt;
</pre>
<p style="text-align: center;"><img src="http://fuelyourcoding.com/files/post-show.png" alt="post-show" title="post-show" width="472" height="615" class="aligncenter size-full wp-image-1368" /></p>
<h2>Update</h2>
<p>When we set up the posts index we added links to the <tt>edit.html.erb</tt> view using the gear icon on the right side of the split list. Now we just need to change the markup on that view to conform to jQuery Mobile&#8217;s requirements. Have you sniffed out a pattern to this development process yet?</p>
<pre class="brush: xml;">
&lt;div data-role=&quot;header&quot;&gt;
  &lt;h1&gt;Editing Post&lt;/h1&gt;
&lt;/div&gt;

&lt;div data-role=&quot;content&quot;&gt;
  &lt;%= render 'form' %&gt;
&lt;/div&gt;
</pre>
<p>Again, it just works as expected and it will look great on many mobile devices. On to the final action, delete!</p>
<h2>Delete</h2>
<p>To facilitate deleting a post we just have to modify the delete links created by Rails&#8217; scaffold generator to fit the rest of the mobile site. I think the edit page is a good place to add a delete link, so lets add a button to the header of <tt>edit.html.erb</tt>:</p>
<pre class="brush: xml;">
&lt;%= link_to 'Delete', @post, :method =&gt; :delete, &quot;data-icon&quot; =&gt; &quot;delete&quot;, &quot;class&quot; =&gt; &quot;ui-btn-right&quot; %&gt;
</pre>
<p>The edit view is now complete, and it lets us update and delete our post.</p>
<p style="text-align: center;"><img src="http://fuelyourcoding.com/files/post-edit.png" alt="post-edit" title="post-edit" width="472" height="615" class="aligncenter size-full wp-image-1369" /></p>
<h2>Closing Up</h2>
<p>If you&#8217;ve made it this far, you&#8217;ve probably realized that working with jQuery Mobile is pretty painless and it fits in with Rails quite well. There are a bunch of other things that jQuery Mobile can do, but this should hopefully whet your appetite. Remember, the framework is still in the <strong>Alpha</strong> stage so things can and probably will change.</p>
<p>I encourage you to <a href="http://jquerymobile.com/">read more</a> about the project and get involved at an early stage so we can all benefit from a strong community!</p>
<p style="text-align: center;"><a href="http://fuelyourcoding.com/files/jqmoblog.zip">***Download the source code for the application built in this post***</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=qJ1kzPCnSNo:aPEXBQnPtUg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=qJ1kzPCnSNo:aPEXBQnPtUg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=qJ1kzPCnSNo:aPEXBQnPtUg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=qJ1kzPCnSNo:aPEXBQnPtUg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=qJ1kzPCnSNo:aPEXBQnPtUg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=qJ1kzPCnSNo:aPEXBQnPtUg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=qJ1kzPCnSNo:aPEXBQnPtUg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=qJ1kzPCnSNo:aPEXBQnPtUg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=qJ1kzPCnSNo:aPEXBQnPtUg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=qJ1kzPCnSNo:aPEXBQnPtUg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=qJ1kzPCnSNo:aPEXBQnPtUg:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/qJ1kzPCnSNo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/getting-started-with-jquery-mobile-rails-3/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/getting-started-with-jquery-mobile-rails-3/</feedburner:origLink></item>
		<item>
		<title>WebKit’s JavaScript Profiler Explained</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/KiQCzY7549Q/</link>
		<comments>http://fuelyourcoding.com/webkits-javascript-profiler-explained/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 12:56:41 +0000</pubDate>
		<dc:creator>Jerod Santo</dc:creator>
				<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Plugins / Add-Ons]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[web inspector]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1316</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>The trend toward rich client-side web applications has brought with it a need for robust JavaScript development tools. <a href="http://getfirebug.com/">Firebug</a> lead the way in this arena, but WebKit&#8217;s <a href="http://trac.webkit.org/wiki/WebInspector">Web Inspector</a> has caught up in a big way and ships with all recent versions of Safari <strong>and</strong> Chrome.</p>
<p>One powerful tool inside Web Inspector that is likely under utilized is the <em><strong>Profiles</strong></em> pane. I write <strong>a lot</strong> of client-side JavaScript and it still took me a long time to work up the gusto to dig into this tool and get anything out of it. If you find yourself in the position I was in, hopefully this post will give you what you need to get up and running quickly.</p>
<h2>Basics</h2>
<p>The JavaScript profiler is used to find and alleviate CPU bottlenecks in your code. To use it you invoke one or more &#8220;profile&#8221; runs in which Web Inspector tracks all JavaScript executed on the page and the time taken to execute it. In the picture below you will see a single profile called &#8220;<strong>Profile 1</strong>&#8221; being displayed.</p>
<p><img src="http://fuelyourcoding.com/files/base-1.png" alt="base-1" title="base-1" width="600" height="400" class="aligncenter size-full wp-image-1320" /></p>
<p>There are two ways to run a profile:</p>
<h3>1) Manually</h3>
<p>The pane itself has a little button in the lower left-hand corner which can be used to start and stop a profile. This is the least precise of the two methods, but is sometimes good enough for one-off profiles. Click it once, go perform whatever action on the page that invokes the code you want profiled, and then click it again to stop.</p>
<h3>2) Programmatically</h3>
<p>The way I suggest you invoke profile runs is by calling into the console directly from your code. This will allow you to precisely position the start and stop of the profile for maximum signal to noise ratio. Here is how you might profile a totally contrived <tt>for</tt> loop programmatically:</p>
<pre class="brush: jscript;">
console.profile('for loop');
for (var i = 0; i &lt; 100; i++) {
  console.log('i is: ', i);
}
console.profileEnd('for loop');
</pre>
<p>After that bit of code is executed a new profile titled &#8220;for loop&#8221; will appear in the Profiles pane to be reviewed. The string argument to these functions is optional. If you don&#8217;t provide one it will simply increment &#8220;Profile [x]&#8221; like it does when run manually.</p>
<h2>The Lingo</h2>
<p>Now we know what the <em><strong>Profiles</strong></em> pane looks like and how to make it run, but its of no use unless we can derive meaning from the results. We can&#8217;t do that without understanding the terms used, so here are explanations as I understand them:</p>
<p><strong>Self</strong> &mdash; the amount of time spent directly in the corresponding function</p>
<p><strong>Total</strong> &mdash; the amount of time spent in the corresponding function and all functions called by it</p>
<p><strong>Calls</strong> &mdash; how many times the corresponding function was called</p>
<p><strong>Average</strong> &mdash; the value of the corresponding function&#8217;s <strong>Self</strong> divided by its <strong>Calls</strong></p>
<p>Of these, <strong>Self</strong> and <strong>Total</strong> are the most confusing. The key thing to know is that the profiler tracks not only the time spent in each individual function, but also the time spent in functions called by that function. This is very useful when &#8220;drilling down&#8221; on a stack of function calls because you can look to see if the <strong>Total</strong> is bigger than the <strong>Self</strong> and if it is you know the time-consuming function is nested beneath the current one. </p>
<h2>Everything&#8217;s Relative (or Absolute)</h2>
<p>By default the <strong><em>Profiles</em></strong> pane displays all information in relative times so that each function is assigned a percentage of the total time of the profile. This is helpful in some scenarios, but I find the absolute times (measured in milliseconds and seconds) much more useful most of the time. To switch the profile result to absolute times, just click the little % sign at the bottom of the pane.</p>
<p><img src="http://fuelyourcoding.com/files/absolute-time.png" alt="absolute-time" title="absolute-time" width="600" height="400" class="aligncenter size-full wp-image-1325" /></p>
<h2>Top to Bottom. Bottom to Top</h2>
<p>You can also sort the profile results using two different approaches. The default is the &#8220;Heavy&#8221; view or bottom up approach, which will more quickly float up the offending functions to the top of the heap. This is helpful to quickly identify trouble areas, but sometimes confusing because it doesn&#8217;t follow the logical structure of your code. For that, switch to the &#8220;Tree&#8221; view or top down approach. It looks like this instead:</p>
<p><img src="http://fuelyourcoding.com/files/tree-view.png" alt="tree-view" title="tree-view" width="600" height="400" class="aligncenter size-full wp-image-1327" /></p>
<h2>Focus</h2>
<p>One more feature of the <em><strong>Profiles</strong></em> pane is the ability to remove sections of the results and <strong>focus</strong> solely on the interesting bits. Do this by highlighting the interesting function and clicking the little eye icon in the lower lefthand corner. Other results will disappear and time percentages will be recalculated in the scope of the focused function.</p>
<h2>Conclusion</h2>
<p>I hope the above information explains what Web Inspector&#8217;s Profiles pane is, how to invoke it, what the results mean, and how to better organize them to increase their value. Give this power tool a try the next time you have some CPU intensive JavaScript that needs optimizing!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=KiQCzY7549Q:Gz0Hju1UyxQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=KiQCzY7549Q:Gz0Hju1UyxQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=KiQCzY7549Q:Gz0Hju1UyxQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=KiQCzY7549Q:Gz0Hju1UyxQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=KiQCzY7549Q:Gz0Hju1UyxQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=KiQCzY7549Q:Gz0Hju1UyxQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=KiQCzY7549Q:Gz0Hju1UyxQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=KiQCzY7549Q:Gz0Hju1UyxQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=KiQCzY7549Q:Gz0Hju1UyxQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=KiQCzY7549Q:Gz0Hju1UyxQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=KiQCzY7549Q:Gz0Hju1UyxQ:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/KiQCzY7549Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/webkits-javascript-profiler-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/webkits-javascript-profiler-explained/</feedburner:origLink></item>
		<item>
		<title>Down &amp; Dirty with MongoDB Part 3: PHP ToDo</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/EEfpz6e3upw/</link>
		<comments>http://fuelyourcoding.com/down-dirty-with-mongodb-part-3-php-todo/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 12:35:33 +0000</pubDate>
		<dc:creator>John Hobbs</dc:creator>
				<category><![CDATA[Datastores]]></category>
		<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[nosql]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1251</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>
Earlier this summer, we kicked off a series on MongoDB where the goal was to write a simple todo application using native MongoDB drivers and three of our favorite scripting languages.
</p>
<ul>
<li><a href="/down-and-dirty-with-mongodb-part-1/">Part One: the Plot</a></li>
<li><a href="/down-and-dirty-with-mongodb-part-2/">Part Two: Ruby ToDo</a></li>
</ul>
<p>
This article is part 3 in that series, in which we write said application in PHP.
</p>
<h2>The Interface</h2>
<p>In case you missed it you can look back at the <a href="http://fuelyourcoding.com/down-and-dirty-with-mongodb-part-1/">introductory article</a> for the complete details, but real quick I&#8217;ll review interface here:</p>
<ul>
<li><strong>todo</strong> &#8211; list all incomplete tasks sorted by priority then chronologically</li>
<li><strong>todo next</strong> &#8211; list all incomplete tasks that are high priority</li>
<li><strong>todo done</strong> &#8211; list all complete tasks chronologically</li>
<li><strong>todo high &#8220;pay bills&#8221;</strong> &#8211; add high priority task called &#8220;pay bills&#8221;</li>
<li><strong>todo low &#8220;get milk&#8221;</strong> &#8211; add low priority task called &#8220;get milk&#8221;</li>
<li><strong>todo finish &#8220;pay bills&#8221;</strong> &#8211; complete task called &#8220;pay bills&#8221;</li>
<li><strong>todo dont &#8220;get milk&#8221;</strong> &#8211; delete task called &#8220;get milk&#8221;</li>
<li><strong>todo help</strong> &#8211; list all commands and their usage</li>
</ul>
<p>Looks simple enough, let&#8217;s dive in!</p>
<h2>The Driver</h2>
<p><a href="http://www.10gen.com/" target="_blank">10gen</a> distributes the PHP extension as a PECL package, or you can install from source. For more details, refer to the <a href="http://www.php.net/manual/en/mongo.installation.php">PHP.net Guide</a></p>
<p>We will go ahead and just use PECL, which is as easy as running one command.</p>
<p><pre class="brush: bash;">
pecl install mongo
</pre>
</p>
<p>You will also need to edit your php.ini file to add the following line, and probably reload your server.</p>
<p><pre class="brush: bash;">
extension=mongo.so
</pre>
</p>
<p>Go ahead and start a file called ToDo.php and stub out the first few lines.  Since this is a command line application, it&#8217;s a bit different from a standard PHP script.  We need to add a <a href="http://en.wikipedia.org/wiki/Shebang_%28Unix%29">shebang</a> and we&#8217;ll go ahead and change our error reporting levels to keep things quiet.  Changing your error reporting is optional, if you aren&#8217;t sure of your coding skills, just leave the error reporting at full blast, you can turn it down when we finish the app.</p>
<p><pre class="brush: php;">
#!/usr/bin/env php
&lt; ?php

error_reporting( E_ERROR | E_PARSE );
</pre>
<h2>The ToDo Class</h2>
</p>
<p>PHP5 has great support for object-oriented programming, so we will employ a single object of a class we’ll write called <tt>ToDo</tt>. The class will take in the required command-line arguments, connect to the MongoDB collection that stores our todos, and execute the appropriate commands on them.</p>
<p>To facilitate these needs, our object will need to take some arguments from the user and store a reference to the MongoDB collection when it is instantiated:</p>
<pre class="brush: php;">
  class ToDo {

    protected $argv = array();
    protected $mongo_connection = null;
    protected $mongo_db = null;

    public function __construct ( $argv ) {
      $this-&gt;argv = $argv;
      try {
        $this-&gt;mongo_connection = $mongo = new Mongo();
        $this-&gt;mongo_db = $this-&gt;mongo_connection-&gt;todo;
      }
      catch ( Exception $e ) {
        throw new Exception ( &quot;Oops! Error connecting to MongoDB: &quot; . $e-&gt;getMessage() );
     }
   }
</pre>
<p>The <tt>__construct function</tt> is the <a href="http://php.net/manual/en/language.oop5.decon.php">PHP5 way of adding a constructor to a class</a>. This is called when you instantiate an object, like this for instance:</p>
<pre class="brush: php;">
$my_todo = new ToDo( $argv );
</pre>
<p>When a new <tt>ToDo</tt> object is instantiated, our class will store the arguments passed in to it in an protected member called <tt>$argv</tt> and set up a connection to MongoDB in a member called <tt>$mongo_connection</tt>. <tt><a href="http://www.php.net/manual/en/class.mongo.php">Mongo</a></tt> is a class provided by the Mongo extension we installed earlier.</p>
<p>For convenience we will set up an instance of <tt><a href="http://www.php.net/manual/en/class.mongodb.php">MongoDB</a></tt> in the member called $mongo_db.  We do this since we will only be using one database.</p>
<p>Our <tt>ToDo</tt> class expects some arguments passed in to the constructor, so we need to provide them when we instantiate it. These arguments will be read in from the command-line when the program is executed, and PHP exposes these to our program via the <tt>$argv</tt> global variable.</p>
<p>However, <tt>$argv</tt> only exists in certain execution contexts of PHP, so we need to make sure we are executing from the command line.  To ascertain this, we look at the constant <tt>PHP_SAPI</tt>, then we instantiate a ToDo object with the <tt>$argv</tt> array.</p>
<p><pre class="brush: php;">
  if( 'cli' == PHP_SAPI ) {
    try {
      $app = new ToDo( $argv );
    }
    catch( Exception $e ) {
      print $e-&gt;getMessage() . &quot;\n&quot;;
    }
  }
</pre>
</p>
<p>At this point, the ToDo.php should look like this:</p>
<pre class="brush: php;">
#!/usr/bin/env php
&lt;?php
   error_reporting( E_ERROR | E_PARSE );
   class ToDo {
     protected $argv = array();
     protected $mongo_connection = null;
     protected $mongo_db = null;
     public function __construct ( $argv ) {
       $this-&gt;argv = $argv;
      try {
        $this-&gt;mongo_connection = $mongo = new Mongo();
        $this-&gt;mongo_db = $this-&gt;mongo_connection-&gt;todo;
      }
      catch ( Exception $e ) {
        throw new Exception ( &quot;Oops! Error connecting to MongoDB: &quot; . $e-&gt;getMessage() );
      }
    }
  }

  if( 'cli' == PHP_SAPI ) {
    try {
      $app = new ToDo( $argv );
    }
    catch( Exception $e ) {
      print $e-&gt;getMessage() . &quot;\n&quot;;
    }
  }
</pre>
<p>You can execute this program from the command-line, but nothing visible will happen. We still need to implement the bulk of the program, which parses the user’s command-line arguments and acts appropriately.</p>
<h2>A Little Help</h2>
<p>The first thing we’ll implement is also the simplest, a method that prints usage help for the program. It looks like this:</p>
<pre class="brush: php;">
protected function help ( $error = null ) {
  if( ! is_null( $error ) ) {
    print &quot;$error\n&quot;;
    print &quot;\n&quot;;
  }

  $out = &lt; &lt;&lt;EOF usage: {$this-&gt;argv[0]} &lt;method&gt;

== Methods ==

&lt;none&gt;             list all incomplete tasks sorted by priority then chronologically
help               show this help
next               list all incomplete tasks that are high priority
done               list all complete tasks chronologically
high &lt;argument&gt;    add high priority task called &lt;/argument&gt;&lt;argument&gt;
low &lt;/argument&gt;&lt;argument&gt;     add low priority task called &lt;/argument&gt;&lt;argument&gt;
finish &lt;/argument&gt;&lt;argument&gt;  complete task called &lt;/argument&gt;&lt;argument&gt;
dont &lt;/argument&gt;&lt;argument&gt;    delete unfinished task called &lt;/argument&gt;&lt;argument&gt;

EOF;
  print $out;
}
</pre>
<h2>Run, Baby, Run</h2>
<p>Now our application needs to be able to actually do it&#8217;s job, so lets create a method called <tt>run</tt> which will handle the program’s flow. In this method we examine the commands the user has given and call our other methods to get that work done. The default action is to list all incomplete tasks, and the catch-all is to execute the help method we implemented above. Here is what <tt>run</tt> looks like:</p>
<pre class="brush: php;">
public function run () {
	try {
		if ( 1 &gt;= count( $this-&gt;argv ) ) {
			$this-&gt;show(
				array( &quot;complete&quot; =&gt; false ),
				array( &quot;level&quot; =&gt; 1, &quot;added&quot; =&gt; 1 )
			);
		}
		else {
			$argument = strtolower( $this-&gt;argv[1] );
			if ( &quot;help&quot; == $argument )
				$this-&gt;help();
			else if ( &quot;next&quot; == $argument )
				$this-&gt;show(
					array( &quot;level&quot; =&gt; &quot;high&quot;, &quot;complete&quot; =&gt; false ),
					array( &quot;level&quot; =&gt; 1, &quot;added&quot; =&gt; 1 )
				);
			else if ( &quot;done&quot; == $argument )
				$this-&gt;show(
					array( &quot;complete&quot; =&gt; array( '$ne' =&gt; false ) ),
					array( 'completed' =&gt; 1 )
				);
			else if ( &quot;high&quot; == $argument )
				$this-&gt;add( &quot;high&quot;, $this-&gt;argv[2] );
			else if ( &quot;low&quot; == $argument )
				$this-&gt;add( &quot;low&quot;, $this-&gt;argv[2] );
			else if ( &quot;finish&quot; == $argument )
				$this-&gt;complete( true, $this-&gt;argv[2] );
			else if ( &quot;dont&quot; == $argument )
				$this-&gt;complete( false, $this-&gt;argv[2] );
			else
				throw new Exception( &quot;Bad Method&quot; );
		}
	}
	catch ( Exception $e ) {
		$this-&gt;help( $e-&gt;getMessage() );
	}
}
</pre>
<p><tt>$this->argv</tt> is an <tt>Array</tt> we were given when the <tt>ToDo</tt> constructor was run.  It should hold all of the options and arguments that the user provided when they ran the application from the command line.  If there is only one or fewer arguments we use a default action.  Otherwise we move into the <tt>switch</tt> statement and choose a method there.</p>
<p>One item worth noting is that we assume that <tt>$this->argv[0]</tt> is the name of the program itself, which is how PHP (and most other languages) handle command line arguments.</p>
<h2>Using Mongo</h2>
<p>So far we’ve only dealt with setting up our class and parsing user arguments, we’ve hardly event glanced at MongoDB! Time to change that!  I&#8217;ll work through each of the methods referenced in <tt>run</tt></p>
<p>First, the show method:</p>
<pre class="brush: php;">
protected function show ( $params = null, $sort = null ) {
  $cursor = $this-&gt;mongo_db-&gt;todos-&gt;find( $params );
  if( ! is_null( $sort ) )
    $cursor-&gt;sort( $sort );
  foreach ( $cursor as $row )
    print $row['task'] . &quot;\n&quot;;
}
</pre>
<p>This method takes an array of selection parameters and an array of sort options (both optional) and passes them directly to the MongoDB cursor.  The cursor will then let us extract the matching documents one at a time, sorted and returned as arrays. This style of interface is pretty easy to work with, it&#8217;s one of the great benefits of using a document store like MongoDB.</p>
<p>Now let&#8217;s find a way to store those item&#8217;s in MongoDB in the first place.  This requires us to implement the <tt>add</tt> method.</p>
<pre class="brush: php;">
protected function add ( $level, $item ) {
  if ( 2 &gt;= count( $this-&gt;argv ) )
    throw new Exception( &quot;missing argument&quot; );
  $this-&gt;mongo_db-&gt;todos-&gt;insert( array(
    &quot;task&quot; =&gt; $item,
    &quot;level&quot; =&gt; $level,
    &quot;complete&quot; =&gt; false,
    &quot;added&quot; =&gt; time()
   ) );
}
</pre>
</p>
<p>Our <tt>add</tt> method takes two arguments.  <tt>$level</tt> is the importance of the item, either &#8220;high&#8221; or &#8220;low&#8221;.  <tt>$item</tt> is the text of the item itself.  Once you have these two facts you can quickly pass them on to MongoDB&#8217;s <tt>insert</tt> method.</p>
<p>The <tt><a href="http://php.net/manual/en/mongocollection.insert.php">insert</a></tt> method in MongoDB takes an associative array and persists it to the datastore as a document.  You can store just about anything you like this way, as long as it can be serialized.</p>
<p>The final method we need is a bit more versatile, the <tt>complete</tt> method.  This method can either finish a task or remove it from the system.</p>
<pre class="brush: php;">
protected function complete ( $finish, $item ) {
  if ( 2 &gt;= count( $this-&gt;argv ) )
    throw new Exception( &quot;missing argument&quot; );
  $document = $this-&gt;mongo_db-&gt;todos-&gt;findOne( array( &quot;complete&quot; =&gt; false, &quot;task&quot; =&gt; $item ) );
  if ( is_null( $document ) )
    print &quot;No Matching ToDo Found\n&quot;;
  else {
    if ( $finish ) {
      $document['complete'] = time();
      $this-&gt;mongo_db-&gt;todos-&gt;save( $document );
    }
    else {
      $this-&gt;mongo_db-&gt;todos-&gt;remove( $document );
    }
  }
}
</pre>
<p>This method uses a variant of <tt><a href="http://www.php.net/manual/en/mongocollection.find.php">find</a></tt> (which we used in <tt>show</tt>) called <tt><a href="http://www.php.net/manual/en/mongocollection.findone.php">findOne</a></tt>.  Think of this as the MongoDB version of <tt>LIMIT 0,1</tt>.  After we&#8217;ve tried to find a task matching the requested title, we then either abort (if not found) or complete (if found).</p>
<p>When completing we will use one of two MongoDB methods, depending on whether we are finishing or skipping the task.  The <tt><a href="http://www.php.net/manual/en/mongocollection.save.php">save</a></tt> method will be used to finish a task.  This method takes a MongoDB document that was previously retrieved and saves it back into the database.  Any changes you make to the object (like setting the <tt>completed</tt> time, for instance) is persisted to the database.  This is done through a unique (but <u>not necessarily sequential</u>) ID given to each document in the datastore.</p>
<p>To delete a task from our list we need to use <tt><a href="http://www.php.net/manual/en/mongocollection.remove.php">remove</a></tt>. This method takes an existing document object (with a document id) and deletes it from the database.</p>
<h2>Finishing Up</h2>
<p>So there you have it, we&#8217;ve completed all of our methods.  Now all we have to do is call run and we should have a working todo program!
</p>
<pre class="brush: php;">
if( 'cli' == PHP_SAPI ) {
  try {
    $app = new ToDo( $argv );
    $app-&gt;run();
  }
  catch( Exception $e ) {
    print $e-&gt;getMessage() . &quot;\n&quot;;
  }
}
</pre>
<p>You can view/download the program in its entirety <a href="http://gist.github.com/405143">here</a>. One thing to note is how little datastore code is needed to add CRUD to an application when using MongoDB as a datastore.</p>
<p>Hopefully this article has helped you with PHP or MongoDB, or both. Stay tuned for our next article in the series when we write the exact same application in Python!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EEfpz6e3upw:zESuOJkn7xE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EEfpz6e3upw:zESuOJkn7xE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=EEfpz6e3upw:zESuOJkn7xE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EEfpz6e3upw:zESuOJkn7xE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=EEfpz6e3upw:zESuOJkn7xE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EEfpz6e3upw:zESuOJkn7xE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=EEfpz6e3upw:zESuOJkn7xE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EEfpz6e3upw:zESuOJkn7xE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EEfpz6e3upw:zESuOJkn7xE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=EEfpz6e3upw:zESuOJkn7xE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EEfpz6e3upw:zESuOJkn7xE:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/EEfpz6e3upw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/down-dirty-with-mongodb-part-3-php-todo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/down-dirty-with-mongodb-part-3-php-todo/</feedburner:origLink></item>
		<item>
		<title>Slow Down to Go Faster</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/dvRn9_gEUFM/</link>
		<comments>http://fuelyourcoding.com/slow-down-to-go-faster/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 13:32:24 +0000</pubDate>
		<dc:creator>Jerod Santo</dc:creator>
				<category><![CDATA[Concepts & Training]]></category>
		<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1279</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>Today&#8217;s software development culture promotes <a href="http://en.wikipedia.org/wiki/Rapid_application_development">rapid development methodologies</a>, <a href="http://en.wikipedia.org/wiki/Minimum_viable_product">minimum viable products</a>, releasing early &amp; often, and the axiom that &#8220;<a href="http://www.folklore.org/StoryView.py?story=Real_Artists_Ship.txt">real artists ship</a>.&#8221; What common thread weaves its way through all of these things?</p>
<p><strong>SPEED</strong>.</p>
<p>If you haven&#8217;t felt the pressure to squeeze one more feature in before the release date, to fix an interface bug &#8220;RIGHT NOW!&#8221;, to get your product launched before your competition, or to shave a week off of your development schedule then you haven&#8217;t been developing software for all that long.</p>
<p>What many people fail to realize &mdash; and what I&#8217;ll emphasize in this post &mdash; is that the compromises we often make when optimizing for development speed can actually slow us down. More succinctly:</p>
<p><strong>If you want to move faster, you have to slow down.</strong></p>
<p>Allow me to demonstrate this concept in a few key areas of software development.</p>
<h2 id="testing">Testing</h2>
</p>
<p>Automated tests are one of the first things to get tossed out when on a time crunch. Writing tests takes time, and that time could be spent implementing features. The problem with this line of thought is that one way or another the software needs to be tested before it&#8217;s released, and the less you automate the more you end up testing manually (how many times have you stepped through the same web form to test server responses?).</p>
<p>The added benefit of writing tests alongside your implementation code (preferably <a href="http://en.wikipedia.org/wiki/Test-driven_development">before it</a>) is that it forces you to think about the problem space and you go into your implementation having put much more thought into it. So yes, you spend time writing tests, but you make it up in reduced implementation time.</p>
<p>The Big Win™ with building up a solid test suite is it reduces the amount of work you have to perform later when you refactor or add new features, making it a HUGE time savings as the system becomes more complex. Regressions suck. A solid test suite helps avoid them.</p>
<h2>Naming Things</h2>
<p>It&#8217;s <a href="http://www.reddit.com/r/programming/comments/cqmdp/ask_programming_what_do_you_waste_too_much_time/c0uiwhk">been said</a> that there are only two hard problems in Computer Science: cache invalidation, naming things and off-by-one errors.</p>
<p>When it comes to naming things people often mail it in because <em>it is</em> hard and they think they are wasting a lot of time doing it. This &#8220;speed optimization&#8221; can manifest itself in variables named &#8220;x&#8221;, &#8220;foo&#8221;, or &#8220;tmp3&#8221. Those are ridiculous names, but even &#8220;okay&#8221; names that don&#8217;t properly describe what they represent can be quite troublesome.</p>
<p>Why is it so important to name things well and how could dedicating time towards that effort speed up development? Remember, code is written once and read many times. The ability for you (or more often, somebody else) to return to your software and pick up the context quickly is paramount in maintaining development speed. Nothing makes picking up context more difficult &mdash; and therefore time consuming &mdash; than non-semantic (devoid of meaning) variable, function, and/or class names.</p>
<p>Do yourself a favor: slow down &amp; put some thought into naming things. Future-you will reap the benefits.</p>
<h2>Documentation</h2>
<p>When time is of the essence documentation is often pushed to last or thrown out altogether. The problem with this is that it also impacts how quickly new developers (including yourself 6-12 months later) can come up to speed and be efficient. There is no better time to document your code than after you have just finished writing it. At that point it is still fresh on your mind and you know all the little gotchas that will cost hours &amp; days of development time if the next programmer doesn&#8217;t see them coming.</p>
<p>One reason people think documentation slows them down is that they formalize it too much or end up writing novels about their software. If your code needs a novel to explain it, it is too complicated and needs to be refactored into smaller, simpler pieces.</p>
<p>How can you document code and keep up the speed of development? Follow these guidelines and you&#8217;ll find that adding documentation as you go (which is far less daunting than going back and documenting everything at the end) adds trivial amounts of time to the overall development.</p>
<ol>
<li>Put a brief summary at the top of multi-line functions.</li>
<li>Include inline warnings or explanations for tricky bits of code. This is also a red flag for refactoring later</li>
<li>Always document the <em>intent</em> instead of <em>implementation</em></li>
<li>Make exceptions to these guidelines when it is prudent</li>
</ol>
<p>The importance of documentation (as well as the form of it) varies from project-to-project, but almost all code needs these little breadcrumbs to be easily maintained &#038; extended.</p>
<h2>The Principle</h2>
<p>That&#8217;s just a handful of examples. I could go on to talk about code style &#038; establishing conventions, optimizing for readability, habitual refactoring, and other such concepts, but it is the overriding principle that is most important:</p>
<p>Invest time to <em>think</em> about what you&#8217;re trying to accomplish and the <em>best</em> way to proceed from the start when your software is simple. That way when complexity rears its ugly head your development won&#8217;t come to a screeching halt.</p>
<p>Need to develop something quickly? Just remember that sometimes you have to slow down to go faster.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=dvRn9_gEUFM:DibxbqfWZZI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=dvRn9_gEUFM:DibxbqfWZZI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=dvRn9_gEUFM:DibxbqfWZZI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=dvRn9_gEUFM:DibxbqfWZZI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=dvRn9_gEUFM:DibxbqfWZZI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=dvRn9_gEUFM:DibxbqfWZZI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=dvRn9_gEUFM:DibxbqfWZZI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=dvRn9_gEUFM:DibxbqfWZZI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=dvRn9_gEUFM:DibxbqfWZZI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=dvRn9_gEUFM:DibxbqfWZZI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=dvRn9_gEUFM:DibxbqfWZZI:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/dvRn9_gEUFM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/slow-down-to-go-faster/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/slow-down-to-go-faster/</feedburner:origLink></item>
		<item>
		<title>jQuery Events: Stop (Mis)Using Return False</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/raojCQdRpD4/</link>
		<comments>http://fuelyourcoding.com/jquery-events-stop-misusing-return-false/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 13:53:37 +0000</pubDate>
		<dc:creator>Douglas Neiner</dc:creator>
				<category><![CDATA[Concepts & Training]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[bubbling]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1266</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>

&#60;div class=&#34;post&#34;&#62;
    &#60;h2&#62;&#60;a href=&#34;/path/to/page&#34;&#62;My Page&#60;/a&#62;&#60;/h2&#62;
    &#60;div class=&#34;content&#34;&#62;
        Teaser text...
    &#60;/div&#62;
&#60;/div&#62;
&#60;div class=&#34;post&#34;&#62;
    &#60;h2&#62;&#60;a href=&#34;/path/to/other_page&#34;&#62;My Other Page&#60;/a&#62;&#60;/h2&#62;
    &#60;div class=&#34;content&#34;&#62;
        Teaser text...
    &#60;/div&#62;
&#60;/div&#62;

Now lets say we [...]]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>Probably one of the first topics covered when you get started learning about jQuery events is the concept of canceling the browser&#8217;s default behavior. For instance, a beginner <code>click</code> tutorial may include this:</p>
<pre class="brush: jscript;">
$(&quot;a.toggle&quot;).click(function () {
    $(&quot;#mydiv&quot;).toggle();
    return false; // Prevent browser from visiting `#`
});
</pre>
<p>This function toggles the hiding and displaying of <code>#mydiv</code>, then cancels the browser&#8217;s default behavior of visiting the <code>href</code> of the anchor tag. </p>
<p>It is in these very first examples that bad habits are formed as users continue to use <code>return false;</code> whenever they want to cancel the default browser action. I am going to cover two very important topics in this article relating to the canceling of browser events:</p>
<ul>
<li>Use the right method for the job: <code>return false</code> vs. <code>preventDefault</code>, <code>stopPropagation</code>, and <code>stopImmediatePropagation</code></li>
<li>Top, bottom or somewhere in the middle: where in the event callback should you cancel default behavior?</li>
</ul>
<p><em>Note: in this article when I refer to event bubbling, I am talking about how most events will fire on the original DOM element, and then on each parent element in the DOM tree. Events do not bubble to siblings or children (When events &#8220;bubble&#8221; downward, it is called event capturing). <a href="http://www.nczonline.net/blog/2009/06/30/event-delegation-in-javascript/">Learn more about bubbling and capturing.</a></em></p>
<h2 id="use_the_right_method_for_the_job">Use the Right Method for the Job</h2>
<p>The main reason <code>return false</code> is so widely misused is because it <em>appears</em> to be doing what we want. Link callbacks no longer redirect the browser, form submit callbacks no longer submit the form, etc. So why is it so bad?</p>
<h3 id="what_return_false_is_really_doing">What <code>return false</code> is <em>really</em> doing</h3>
<p>First off, <code>return false</code> is actually doing three very separate things when you call it:</p>
<ol>
<li>event.preventDefault();</li>
<li>event.stopPropagation();</li>
<li>Stops callback execution and returns immediately when called.</li>
</ol>
<p>&#8220;Wait a minute,&#8221; you cry! I only needed to stop the default behavior! I don&#8217;t need these other two items&#8230; I think. </p>
<p>The only one of those three actions needed to cancel the default behavior is <code>preventDefault()</code>. Unless you mean to actually stop event propagation (bubbling), using <code>return false</code> will greatly increase the brittleness of your code. Lets see how this misuse plays out in a real world scenario:</p>
<p>Here is our HTML for the example:</p>
<pre class="brush: xml;">
&lt;div class=&quot;post&quot;&gt;
    &lt;h2&gt;&lt;a href=&quot;/path/to/page&quot;&gt;My Page&lt;/a&gt;&lt;/h2&gt;
    &lt;div class=&quot;content&quot;&gt;
        Teaser text...
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post&quot;&gt;
    &lt;h2&gt;&lt;a href=&quot;/path/to/other_page&quot;&gt;My Other Page&lt;/a&gt;&lt;/h2&gt;
    &lt;div class=&quot;content&quot;&gt;
        Teaser text...
    &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>Now lets say we want the actual article to load into the corresponding <code>div.content</code> when a user clicks on either title link:</p>
<pre class="brush: jscript;">
jQuery(document).ready(function ($) {
   $(&quot;div.post h2 a&quot;).click(function () {
      var a    = $(this),
          href = a.attr('href'), // Let jQuery normalize `href`,
          content  = a.parent().next();
      content.load(href + &quot; #content&quot;);
      return false; // &quot;cancel&quot; the default behavior of following the link
   });
});
</pre>
<p>All is well (currently) and our dynamic page is well under way. Down the road we decide another piece of functionality we want is to add the class <code>"active"</code> to any <code>div.post</code> that has been clicked (or when a child element has been clicked) most recently. So, we decide to add a <code>click</code> handler to them as well:</p>
<pre class="brush: jscript;">
// Inside Document Ready:
var posts = $(&quot;div.post&quot;);
posts.click(function () {
    // Remove active from all div.post
    posts.removeClass(&quot;active&quot;);
    // Add it back to this one
    $(this).addClass(&quot;active&quot;);
});
</pre>
<p>Will this work when we click a title link? NO! The reason it won&#8217;t work is because we used <code>return false</code> in the link click event instead of using what we really meant! Because <code>return false</code> really means <code>event.preventDefault(); event.stopPropagation();</code> the <code>click</code> event never bubbled up to the parent <code>div.post</code> and our new event has not been called. </p>
<p>This becomes even more of an issue when mixing normal events with <code>live</code> or <code>delegate</code> events:</p>
<pre class="brush: jscript;">
$(&quot;a&quot;).click(function () {
    // do something
    return false;
});

$(&quot;a&quot;).live(&quot;click&quot;, function () {
    // THIS WON'T FIRE
});
</pre>
<h3 id="so_what_do_you_really_want">So what DO you really want?</h3>
<h4 id="preventdefault"><code>preventDefault()</code></h4>
<p>In most situations where you would use <code>return false</code> what you <em>really</em> want is <code>e.preventDefault()</code>. Using <code>preventDefault</code> requires you allow for the event parameter to be accessed in your callback (In this example, I use <code>e</code>):</p>
<pre class="brush: jscript;">
$(&quot;a&quot;).click(function (e) {
    // e == our event data
    e.preventDefault();
});
</pre>
<p>This does everything we want without prohibiting parent elements from receiving these events as well. The fewer restrictions you place on your code the more flexible it will be to maintain. </p>
<h4 id="stoppropagation"><code>stopPropagation()</code></h4>
<p>Sometimes you just want to stop the propagation. Take the following example:</p>
<pre class="brush: xml;">
&lt;div class=&quot;post&quot;&gt;
    Normal text and then a &lt;a href=&quot;/path&quot;&gt;link&lt;/a&gt; and then more text.
&lt;/div&gt;
</pre>
<p>Now, lets pretend we want one thing to happen when you click anywhere in the <code>div</code> <strong>except</strong> on the link, and you want the user to actually be able to follow the link if they click on it. (From a usability standpoint, this is a poor example. You probably don&#8217;t want something else to happen if a user slightly misses clicking on the link!)</p>
<pre class="brush: jscript;">
$(&quot;div.post&quot;).click(function () {
   // Do the first thing;
});

$(&quot;div.post a&quot;).click(function (e) {
    // Don't cancel the browser's default action
    // and don't bubble this event!
    e.stopPropagation();
});
</pre>
<p>In this case if we had used <code>return false</code> the <code>div</code>&#8217;s click event would not have fired, but the user would also not have been directed to the correct destination either.</p>
<h4 id="stopimmediatepropagation"><code>stopImmediatePropagation()</code></h4>
<p>This method stops any further execution of an event, even to other handlers bound on the same object. All events bound to a particular item will fire in the order they were bound.  Take the following example:</p>
<pre class="brush: jscript;">
$(&quot;div a&quot;).click(function () {
   // Do something
});

$(&quot;div a&quot;).click(function (e) {
   // Do something else
   e.stopImmediatePropagation();
});

$(&quot;div a&quot;).click(function () {
   // THIS NEVER FIRES
});

$(&quot;div&quot;).click(function () {
   // THIS NEVER FIRES
});
</pre>
<p>If you think this example looks contrived, it really is. However, the situation is a very real one. As you build more abstracted code, different widgets and plugins may be adding events to the same code you are working with. This makes understanding and using <code>stopImmediatePropagation</code> worth while when you come across a situation that needs it!</p>
<h4><code>return false</code></h4>
<p>Only use <code>return false</code> when you want both <code>preventDefault()</code> and <code>stopPropagation()</code> and your code can support not canceling the default behavior until you reach the end of your callback execution. <em>I strongly encourage against using this method in any examples you may write for new jQuery developers. It promotes a poor use of event cancellation and should only be used when you are consciously deciding you need what it provides.</em>.</p>
<h2 id="top_bottom_or_somewhere_in_the_middle">Top, Bottom or Somewhere in the Middle</h2>
<p>Before, when you were (mis)using <code>return false</code>, it always had to go at the end of your function, or at least at the end of a particular line of logic where no further execution was needed. With <code>e.preventDefault</code> we have more choices. It can be called at any time during a callback function to take effect. So where should you put it?</p>
<p><strong>1. During development, it should <em>(almost) always</em> be the very first line.</strong> The last thing you want is for your form you are trying to AJAXify to actually submit to another page while you try to debug a JavaScript error in the callback. </p>
<p><strong>2. In production, if you are following progressive enhancement, put it at the bottom of the callback, or at the end of execution flow.</strong> If you are progressively enhancing a normal page, then your link <code>click</code> event or form <code>submit</code> event has the proper server side fallbacks needed for browsers that don&#8217;t support JavaScript (or don&#8217;t have support enabled). The benefit here, however, is <strong>not</strong> related to browsers with JS turned off, but rather browsers with it turned on in the situation where <em>your code throws an error</em>! Take a look at the following code:</p>
<pre class="brush: jscript;">
var data = {};
$(&quot;a&quot;).click(function (e) {
    e.preventDefault(); // cancel default behavior

    // Throws an error because `my` is undefined
    $(&quot;body&quot;).append(data.my.link); 

    // The original link doesn't work AND the &quot;cool&quot;
    // JavaScript has broken. The user is left with NOTHING!
});
</pre>
<p>Now, lets take a look at the same event with the <code>preventDefault</code> call being placed at the bottom:</p>
<pre class="brush: jscript;">
var data = {};
$(&quot;a&quot;).click(function (e) {
    // Throws an error because `my` is undefined
    $(&quot;body&quot;).append(data.my.link); 

    // This line is never reached, and your website
    // falls back to using the `href` instead of this
    // &quot;cool&quot; broken JavaScript!

    e.preventDefault(); // cancel default behavior
});
</pre>
<p>The same applies for <code>form submit</code> events as well, provided you have the proper fallback information in place. Never count on your code always working. It is far better to plan for a nice fallback than assume errors will never occur!</p>
<p><strong>3. In production, if the functionality is JavaScript only, keep the call on the first line.</strong> Remember, it doesn&#8217;t necessarily have to be the first line in the function, but it should come as early as fits with your program logic. The concept here is this: If this part of your functionality was added with JavaScript in the first place, then a fallback is not really as necessary. In this case, having it first will just ensure random <code>#</code> characters don&#8217;t appear in the URL or cause the page to jump around. Obviously, provide as much error handling as needed to ensure your users aren&#8217;t left with nothing for their efforts!</p>
<h2 id="conclusion">Conclusion</h2>
<p>I hope this article presented enough information for you to make the right choice when you cancel events. Remember to only use <code>return false</code> when you really need it, and make sure you cancel the default behavior at the right location in your callback. Always work to make your code as flexible as possible, and stop using return false!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=raojCQdRpD4:x9SPgP_AiWU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=raojCQdRpD4:x9SPgP_AiWU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=raojCQdRpD4:x9SPgP_AiWU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=raojCQdRpD4:x9SPgP_AiWU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=raojCQdRpD4:x9SPgP_AiWU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=raojCQdRpD4:x9SPgP_AiWU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=raojCQdRpD4:x9SPgP_AiWU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=raojCQdRpD4:x9SPgP_AiWU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=raojCQdRpD4:x9SPgP_AiWU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=raojCQdRpD4:x9SPgP_AiWU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=raojCQdRpD4:x9SPgP_AiWU:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/raojCQdRpD4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/jquery-events-stop-misusing-return-false/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/jquery-events-stop-misusing-return-false/</feedburner:origLink></item>
		<item>
		<title>Down &amp; Dirty with MongoDB Part 2: Ruby ToDo</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/Cbjt-BSxRn8/</link>
		<comments>http://fuelyourcoding.com/down-and-dirty-with-mongodb-part-2/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 14:40:31 +0000</pubDate>
		<dc:creator>Jerod Santo</dc:creator>
				<category><![CDATA[Datastores]]></category>
		<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[nosql]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1235</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>Earlier this summer, we kicked off <a href="/down-and-dirty-with-mongodb-part-1/">a series on MongoDB</a> where the goal was to write a simple todo application using native <a href="http://mongodb.org">MongoDB</a> drivers and three of our favorite scripting languages.</p>
<p>This article is part 2 in that series, in which we write said application in <a href="http://ruby-lang.org">Ruby</a>.</p>
<h2>The Interface</h2>
<p>You can refer back to the <a href="http://fuelyourcoding.com/down-and-dirty-with-mongodb-part-1/">introductory article</a> for all the details, but I&#8217;ll reiterate the command-line interface here for easy reference:</p>
<ul>
<li><strong>todo</strong> &#8211; list all incomplete tasks sorted by priority then chronologically</li>
<li><strong>todo next</strong> &#8211; list all incomplete tasks that are high priority</li>
<li><strong>todo done</strong> &#8211; list all complete tasks chronologically</li>
<li><strong>todo high &#8220;pay bills&#8221;</strong> &#8211; add high priority task called &#8220;pay bills&#8221;</li>
<li><strong>todo low &#8220;get milk&#8221;</strong> &#8211; add low priority task called &#8220;get milk&#8221;</li>
<li><strong>todo finish &#8220;pay bills&#8221;</strong> &#8211; complete task called &#8220;pay bills&#8221;</li>
<li><strong>todo dont &#8220;get milk&#8221;</strong> &#8211; delete task called &#8220;get milk&#8221;</li>
<li><strong>todo help</strong> &#8211; list all commands and their usage</li>
</ul>
<p>Okay, let&#8217;s write this thing!</p>
<h2>The Driver</h2>
<p><a href="http://www.10gen.com/">10gen</a> distributes the Ruby driver using Ruby&#8217;s most popular package distribution tool, <a href="http://rubygems.org">RubyGems</a>. To install the driver on your machine simply execute:</p>
<pre class="brush: bash;">
gem install mongo
</pre>
<p>Our program will need to load in the driver before anything else, and we&#8217;ll use RubyGems to do it, so create a new text file called <tt>mongo_todo.rb</tt> and begin it with the following:</p>
<pre class="brush: ruby;">
require 'rubygems'
require 'mongo'
</pre>
<h2>The ToDo Class</h2>
<p>Ruby is a purely object-oriented language, so our program will employ a single object of a class we&#8217;ll write called <tt>ToDo</tt>. The class will take in the required command-line arguments, connect to the MongoDB collection that stores our todos, and execute the appropriate command on them.</p>
<p>To facilitate these needs, our object will need to take some arguments from the user and store a reference to the MongoDB collection when it is instantiated:</p>
<pre class="brush: ruby;">
class ToDo
  def initialize(args)
    @args  = args
    @mongo = Mongo::Connection.new.db(&quot;todo&quot;).collection(&quot;todos&quot;)
  end
end
</pre>
<p>In Ruby, the <tt>initialize</tt> instance method is called when a new object of a class is instantiated, most often using the <tt>new</tt> class method, like this:</p>
<pre class="brush: ruby;">
my_todo = ToDo.new
</pre>
<p>When a new <tt>ToDo</tt> object is instantiated, our class will store the arguments passed in to it in an instance variable called <tt>@args</tt> and store a connection to MongoDB in an instance variable called <tt>@mongo</tt>. <a href="http://api.mongodb.org/ruby/current/Mongo/Collection.html">Mongo::Connection</a> is a class provided by the <tt>mongo</tt> gem that we&#8217;re using.</p>
<p>Since our class expects some arguments passed in to the initializer, we need to provide them to the <tt>new</tt> method. The arguments will be read in from the command-line when the program is executed, and Ruby exposes these to our program via the <tt>ARGV</tt> variable. So, we call <tt>new</tt> like this instead:</p>
<pre class="brush: ruby;">
my_todo = ToDo.new(ARGV)
</pre>
<p>At this point, the entire program should look like this:</p>
<pre class="brush: ruby;">
require 'rubygems'
require 'mongo'

class Todo
  def initialize(args)
    @args  = args
    @mongo = Mongo::Connection.new.db(&quot;todo&quot;).collection(&quot;todos&quot;)
  end
end

ToDo.new(ARGV)
</pre>
<p>You can execute this program from the command-line, but nothing will happen. Well, stuff will happen but you won&#8217;t see it displayed back to you. We still need to implement the bulk of the program, which parses the user&#8217;s command-line arguments and acts appropriately.</p>
<h2>A Little Help</h2>
<p>The first thing we&#8217;ll implement is a method that prints usage help for the program. It looks like this:</p>
<pre class="brush: ruby;">
def help
  abort &lt;&lt;-HELP
  usage: #{__FILE__} &lt;method&gt;

  == Methods ==
  &lt;none&gt;            list all incomplete tasks sorted by priority
  help              show this help
  next              list all incomplete tasks that are high priority
  done              list all complete tasks chronologically
  high &quot;argument&quot;   add high priority task called argument
  low &quot;argument&quot;    add low priority task called argument
  finish &quot;argument&quot; complete task called argument
  dont &quot;argument&quot;   delete unfinished task called argument
  HELP
end
</pre>
<p>In Ruby, <a href="http://ruby-doc.org/ruby-1.9/classes/Kernel.html#M002645">abort</a> is a method you can call which will exit the application and display a string you pass to it. The string we&#8217;re passing in shows all the ways the program can be used, which will be displayed back to the user. This will be executed by default if the user doesn&#8217;t pass in an argument that we want to handle. More on that in the next section.</p>
<h2>Run, Baby, Run</h2>
<p>At some point, our application needs to run, so lets create an instance method called <tt>run</tt> which will handle the program&#8217;s flow. In this method we will determine what the user passed in from the command-line and call another method that handles the different use cases. The default action is to list all incomplete tasks, and the catch-all is to execute the <tt>help</tt> method we implemented above. Here is what <tt>run</tt> looks like:</p>
<pre class="brush: ruby;">
def run
  if @args.empty?
    show :complete =&gt; false
  else
    case @args.first
    when &quot;help&quot;   then help
    when &quot;high&quot;   then add &quot;high&quot;
    when &quot;low&quot;    then add &quot;low&quot;
    when &quot;next&quot;   then show :complete =&gt; false, :level =&gt; &quot;high&quot;
    when &quot;done&quot;   then show :complete =&gt; true
    when &quot;dont&quot;   then complete false
    when &quot;finish&quot; then complete true
    else
      help
    end
  end
end
</pre>
<p><tt>ARGV</tt> is an <a href="http://ruby-doc.org/ruby-1.9/classes/Array.html">Array</a>, so we can call methods like <a href="http://ruby-doc.org/ruby-1.9/classes/Array.html#M000711">empty?</a> and <a href="http://ruby-doc.org/ruby-1.9/classes/Array.html#M000698">first</a> on it. The meat of the run method is a Ruby <tt>case</tt> statement which checks if the first argument passed in by the user matches any of our predetermined keywords and calls other methods, <tt>add</tt><tt>, </tt><tt>show</tt>, and <tt>complete</tt>. These methods are the ones that actually interact with MongoDB and display information back to the user. We&#8217;ll implement them next.</p>
<h2>Using Mongo</h2>
<p>So far we&#8217;ve only dealt with setting up our class and parsing user arguments, we&#8217;ve barely even touched MongoDB! This is the meat of the application, so let&#8217;s get straight to it. First, the <tt>show</tt> method:</p>
<pre class="brush: ruby;">
def show(params)
  sort = [[&quot;level&quot;, Mongo::ASCENDING], [&quot;added&quot;, Mongo::ASCENDING]]
  @mongo.find(params, :sort =&gt; sort).each { |todo| puts &quot;#{todo[&quot;task&quot;]} (#{todo[&quot;level&quot;]})&quot; }
end
</pre>
<p><tt>show</tt> takes a hash of <tt>params</tt> as an argument and passes that hash on directly to the <tt>mongo</tt> library&#8217;s <a href="http://api.mongodb.org/ruby/current/Mongo/Collection.html#find-instance_method">find</a> method, which will return an array of the found items in the collection.</p>
<p>We print each of the todo items returned from <a href="http://api.mongodb.org/ruby/current/Mongo/Collection.html#find-instance_method">find</a> along with the level of the todo. How do those items get in there in the first, place? That is up to the <tt>add</tt> method, which we will implement next.</p>
<pre class="brush: ruby;">
def add(level)
  help unless @args.length == 2
  @mongo.insert &quot;task&quot; =&gt; @args.last, &quot;level&quot; =&gt; level, &quot;complete&quot; =&gt; false, &quot;added&quot; =&gt; Time.now
  puts &quot;added #{level} level task: #{@args.last}&quot;
end
</pre>
<p><tt>add</tt> takes a single argument, the level of the todo to create (e.g.- &#8220;high&#8221; or &#8220;low&#8221;). It then makes sure that the user had passed in two arguments at the command line because it needs the second one for the name of the task. If not, it calls <tt>help</tt> which aborts the application.</p>
<p>If so, It calls Mongo&#8217;s <a href="http://api.mongodb.org/ruby/current/Mongo/Collection.html#insert-instance_method">insert</a> method and passes it all the information to be stored in the datastore.</p>
<p>Finally, we need to implement the <tt>complete</tt> method, which is the most complex of the lot. Like <tt>add</tt>, it makes sure there were two command-line arguments given. Then it tries to find the todo by the &#8220;task&#8221; name. If found, it will either &#8220;finish&#8221; the task or &#8220;remove&#8221; the task depending on a boolean argument passed in. The method looks like this:</p>
<pre class="brush: ruby;">
def complete(finish)
  help unless @args.length == 2
  if (document = @mongo.find_one(&quot;task&quot; =&gt; @args.last, &quot;complete&quot; =&gt; false))
    if finish
      document[&quot;complete&quot;] = Time.now
      @mongo.save(document)
      puts &quot;finished: #{@args.last}&quot;
    else
      @mongo.remove(document)
      puts &quot;removed: #{@args.last}&quot;
    end
  else
    puts &quot;No ToDo matching #{@args.length} found&quot;
  end
end
</pre>
<p>The mongo-related calls in the <tt>complete</tt> method are <a href="http://api.mongodb.org/ruby/current/Mongo/Collection.html#find_one-instance_method">find_one</a>, <a href="http://api.mongodb.org/ruby/current/Mongo/Collection.html#save-instance_method">save</a>, and <a href="http://api.mongodb.org/ruby/current/Mongo/Collection.html#remove-instance_method">remove</a>.</p>
<h2>Finishing Up</h2>
<p>So, we&#8217;ve written our <tt>run</tt> method which calls the other methods using the user&#8217;s passed in arguments. Now all we have to do to get the class going is finish the program by creating a ToDo class object and calling <tt>run</tt> on it, like this:</p>
<pre class="brush: ruby;">
ToDo.new(ARGV).run
</pre>
<p>You can view/download the program in its entirety <a href="http://gist.github.com/409729">here</a>. One thing to note is how little code is needed to add CRUD to an application when using MongoDB as a datastore.</p>
<p>Hopefully this article has helped you with Ruby or MongoDB or both. Stay tuned for our next article in the series when we write the exact same application in PHP!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=Cbjt-BSxRn8:IegRfutF_Yo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=Cbjt-BSxRn8:IegRfutF_Yo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=Cbjt-BSxRn8:IegRfutF_Yo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=Cbjt-BSxRn8:IegRfutF_Yo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=Cbjt-BSxRn8:IegRfutF_Yo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=Cbjt-BSxRn8:IegRfutF_Yo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=Cbjt-BSxRn8:IegRfutF_Yo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=Cbjt-BSxRn8:IegRfutF_Yo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=Cbjt-BSxRn8:IegRfutF_Yo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=Cbjt-BSxRn8:IegRfutF_Yo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=Cbjt-BSxRn8:IegRfutF_Yo:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/Cbjt-BSxRn8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/down-and-dirty-with-mongodb-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/down-and-dirty-with-mongodb-part-2/</feedburner:origLink></item>
		<item>
		<title>Jquery, JQuery and Asking for help</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/OfVZOCjwR9A/</link>
		<comments>http://fuelyourcoding.com/jquery-jquery-and-asking-for-help/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 09:00:15 +0000</pubDate>
		<dc:creator>Douglas Neiner</dc:creator>
				<category><![CDATA[Concepts & Training]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1223</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>A few weeks ago, I tweeted:</p>
<blockquote><p>General service announcement: it is written &#8220;jQuery&#8221; not &#8220;Jquery&#8221; or &#8220;JQuery&#8221;&#8230; even if it comes first in a sentence!!!! <a href="http://twitter.com/dougneiner/status/15858703370">∞</a></p></blockquote>
<p>Then Saturday I put out a stronger tweet, and caught some stronger feedback for it:</p>
<blockquote><p>Test: &#8220;If you want jQuery help, which misspelling will greatly hurt your chances: a) Jquery b) JQuery c) jquery d) All of the above. <a href="http://twitter.com/dougneiner/status/18214276476">∞</a></p></blockquote>
<p>At the end of the day, does it really matter how someone writes the name &#8220;jQuery&#8221;? Does it make them a better or worse programmer based on how they type it out?</p>
<p>Let me clarify that I have never failed to answer a question on Stack Overflow (Where I like to hang out and answer jQuery questions) because the asker typed jQuery with incorrect capitalization. <strong>I would never fail to respond to an email because the asker wrote it as Jquery or JQuery.</strong> I would hate to be that petty an individual, and I think that is the feeling some people were picking up from my tweets.</p>
<p>However, I can say I <em>notice</em> it and it <em>bothers me</em> when people seeking help don&#8217;t type out the library name correctly. It really is a small thing, and maybe it shouldn&#8217;t bother me, but it does. It got me thinking about things that might negatively affect a request for help, and I came up with a list of six suggestions. I hope these suggestions are helpful when you need to ask for help with open source software.</p>
<h2>Asking for Help</h2>
<p>If you need help with an open source project, you will often be dealing with people that 1) don&#8217;t have a lot of time and 2) must use the time they have wisely. With that in mind, here are few suggestions that might help you get answers easier:</p>
<ol>
<li>Take the time to <strong>make sure your question makes sense</strong>. Complete sentences, clear code examples, and links to a page demonstrating the problem all go a long way in ensuring a quality answer.</li>
<li><strong>Run spell-check</strong> before sending your question. There are at least two reasons there would be a lot of spelling errors in a question: 1) English is not the native tongue of the person requesting help 2) The person requesting help didn&#8217;t take the time ensure a quality question. Most applications have spell check. If they don&#8217;t, you can copy and paste your question to an application that does have spell check. Reason #1 is understandable and should be overlooked; reason #2 is what will stand out most to someone reading your question. It may affect that person&#8217;s decision to answer you.</li>
<li>Getting back to my original statement regarding Jquery, JQuery and jquery. Some libraries have really weird spelling or capitalizations, some are more straight forward. <strong>Write the library/plugin name correctly when asking for help with it!</strong> jQuery should be very easy, but so many people get it wrong. It is like the names iPad and iPhone: the first letter is lowercase! For another example, the popular blogging platform is WordPress, not Wordpress or Word Press.</li>
<li>At the very least, <strong>run a Google/Yahoo/Bing search (pick one) </strong>with some of the words from the question you plan on asking. I almost always take time to run a few searches to answer a question myself before asking on Stack Overflow or emailing someone for help. It is just common courtesy to spend some of <em>your</em> time before asking for the time of <em>someone else</em>.</li>
<li>If you find the answer yourself after asking for help, <strong>be sure to let the person know you no longer need their help</strong>. Sometimes emails will sit around until there is time to answer them while in the mean time you find the answer somewhere else. It might reduce your chance of getting future emails answered if the person who takes the time to answer your question finds out they wasted their time.</li>
<li><strong>Be respectful and kind.</strong> If an open source project is screwing up your project, you have a few choices 1) use a different project 2) pay for help 3) Ask kindly for help from the project. Notice I didn&#8217;t put &#8220;4) Demand help for free.&#8221; On a very positive note, I have to say every request I have gotten for help on the few small projects I maintain have been both respectful and kind. This is really important!</li>
</ol>
<h2>What It All Means</h2>
<p>The bottom line is this: <em>If it appears to someone reading your question that you have not put any time into either solving the problem yourself or writing a decent request for help, they will be less likely to put any time into answering it.</em></p>
<p>Remember, it isn&#8217;t always about just getting an answer. Sometimes its about getting the <em>right person</em> to answer your question. For instance, there are tons of programmers answering questions on Stack Overflow, but not all of them have equal qualifications and skill. Put in the effort up front when asking the question. It will be worth it when you get a solid answer!</p>
<p>Do you have any tips to add? If so, please let me know about them in the comments!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=OfVZOCjwR9A:WAsgpS-7rvI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=OfVZOCjwR9A:WAsgpS-7rvI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=OfVZOCjwR9A:WAsgpS-7rvI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=OfVZOCjwR9A:WAsgpS-7rvI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=OfVZOCjwR9A:WAsgpS-7rvI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=OfVZOCjwR9A:WAsgpS-7rvI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=OfVZOCjwR9A:WAsgpS-7rvI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=OfVZOCjwR9A:WAsgpS-7rvI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=OfVZOCjwR9A:WAsgpS-7rvI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=OfVZOCjwR9A:WAsgpS-7rvI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=OfVZOCjwR9A:WAsgpS-7rvI:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/OfVZOCjwR9A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/jquery-jquery-and-asking-for-help/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/jquery-jquery-and-asking-for-help/</feedburner:origLink></item>
		<item>
		<title>Down &amp; Dirty with MongoDB Part 1: the Plot</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/w6Mal4_R5v8/</link>
		<comments>http://fuelyourcoding.com/down-and-dirty-with-mongodb-part-1/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 13:32:22 +0000</pubDate>
		<dc:creator>Jerod Santo</dc:creator>
				<category><![CDATA[Datastores]]></category>
		<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[nosql]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1197</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p><a href="http://www.mongodb.org/">MongoDB</a> is an open-source, document-based datastore that has been gaining traction with developers lately. Its popularity is most likely due to the &#8220;middle ground&#8221; it provides between relational databases like <a href="http://www.mysql.com/">MySQL</a> and key-value stores like <a href="http://code.google.com/p/redis/m">Redis</a>.</p>
<p><a href="http://www.mongodb.org/"><img src="http://fuelyourcoding.com/files/MongoDB.png" alt="MongoDB" title="MongoDB" width="550" height="115" class="alignright size-full wp-image-1200" /></a></p>
<p>We&#8217;ve found the datastore a joy to use and wanted to feature it somehow on FYC. However, there are many, many <a href="http://devzone.zend.com/article/12132">introductory articles</a> and <a href="http://www.rubyinside.com/getting-started-mongodb-ruby-1875.html">getting started tutorials</a> for MongoDB (also the <a href="http://www.mongodb.org/display/DOCS/Home">information</a> on the project&#8217;s website is spectacular), so we would be remiss to provide yet another basic intro.</p>
<p>Instead, we decided to highlight how the datastore is used from a few popular dynamic languages. <a href="http://www.10gen.com/">10gen</a> &#8211; MongoDB&#8217;s creator &#8211; provides many official client drivers (libraries) and the open-source community has produced a handful of libraries as well. We couldn&#8217;t feature them all, so we chose three favorites &#8211; Ruby, Python, and PHP &#8211; to include in the series.</p>
<h2 id="theplot">The Plot</h2>
<p>Many demonstrations use throwaway &#8220;Hello World&#8221; type programs. We thought it would be much cooler to write something that we can actually use, build upon, and maybe derive some value from. With that in mind, we tried to think of an application that had the following characteristics:</p>
<ol>
<li>Real-world use case</li>
<li>Few lines of code (~ 100)</li>
<li>Simple to understand and implement</li>
<li>No 3rd party libraries or frameworks</li>
<li>Demonstrate the basic <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">CRUD</a> operations</li>
</ol>
<p>For better or worse, we chose to write a command-line todo list app as it fit the requirements well.</p>
<h2 id="thespec">The Spec</h2>
<p>Our todo application is invoked from the command-line and works as follows:</p>
<ul>
<li><strong>todo</strong> &#8211; list all incomplete tasks sorted by priority then chronologically</li>
<li><strong>todo next</strong> &#8211; list all incomplete tasks that are high priority</li>
<li><strong>todo done</strong> &#8211; list all complete tasks chronologically</li>
<li><strong>todo high &#8220;pay bills&#8221;</strong> &#8211; add high priority task called &#8220;pay bills&#8221;</li>
<li><strong>todo low &#8220;get milk&#8221;</strong> &#8211; add low priority task called &#8220;get milk&#8221;</li>
<li><strong>todo finish &#8220;pay bills&#8221;</strong> &#8211; complete task called &#8220;pay bills&#8221;</li>
<li><strong>todo dont &#8220;get milk&#8221;</strong> &#8211; delete task called &#8220;get milk&#8221;</li>
<li><strong>todo help</strong> &#8211; list all commands and their usage</li>
</ul>
<p style="text-align: center;"><img src="http://fuelyourcoding.com/files/todo-example.png" alt="todo-example" title="todo-example" width="520" height="98" class="size-full wp-image-1216" /></p>
<p>The only requirement outside of the user interface outlined above is that MongoDB be used to persist the todo list.</p>
<h2 id="thesetup">The Setup</h2>
<p>An identical application will be written in Ruby, Python, and PHP using the <a href="http://www.mongodb.org/display/DOCS/Drivers">official MongoDB drivers</a>. Each language will get its own article in the series. You have the application requirements so feel free to code along in your language of choice. Also, we&#8217;d love to see versions in <a href="http://www.mongodb.org/display/DOCS/Perl+Language+Center">some</a> <a href="http://www.mongodb.org/display/DOCS/Javascript+Language+Center">other</a> <a href="http://www.mongodb.org/display/DOCS/JVM+Languages">languages</a> that we won&#8217;t be covering. Show us your skills by submitting them in the comments. We&#8217;ll happily tweet them out and link them up in our final article in the series!</p>
<p>Be sure to grab our <a href="http://feeds.feedburner.com/FuelYourCoding">RSS feed</a> or follow <a href="http://twitter.com/fuelyourcoding">@fuelyourcoding</a> on Twitter so you don&#8217;t miss out as we get down &amp; dirty with MongoDB!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=w6Mal4_R5v8:KLy_cUc-LI4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=w6Mal4_R5v8:KLy_cUc-LI4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=w6Mal4_R5v8:KLy_cUc-LI4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=w6Mal4_R5v8:KLy_cUc-LI4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=w6Mal4_R5v8:KLy_cUc-LI4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=w6Mal4_R5v8:KLy_cUc-LI4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=w6Mal4_R5v8:KLy_cUc-LI4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=w6Mal4_R5v8:KLy_cUc-LI4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=w6Mal4_R5v8:KLy_cUc-LI4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=w6Mal4_R5v8:KLy_cUc-LI4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=w6Mal4_R5v8:KLy_cUc-LI4:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/w6Mal4_R5v8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/down-and-dirty-with-mongodb-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/down-and-dirty-with-mongodb-part-1/</feedburner:origLink></item>
		<item>
		<title>Eight Great iOS Apps for Developers</title>
		<link>http://feedproxy.google.com/~r/fuelyourcoding/~3/EOgzxupB4WA/</link>
		<comments>http://fuelyourcoding.com/eight-great-ios-apps-for-developers/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 13:30:22 +0000</pubDate>
		<dc:creator>Jerod Santo</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://fuelyourcoding.com/?p=1138</guid>
		<description><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://rss.buysellads.com/click.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" target="_blank"><img src="http://rss.buysellads.com/img.php?z=1271313&k=f16d4ddc81a95a47348dcddb230bad58&a=<?php echo($a); ?>&c=<?php echo(rand()); ?>" border="0" alt="" /></a></p><p><a href="http://buysellads.com/buy/sitedetails/pubkey/f16d4ddc81a95a47348dcddb230bad58/zone/1271313" target="_blank">Advertise here via BSA</a></p></p>
<p>The trouble with having over <strong>200,000</strong> iOS apps in the App Store is how difficult it is to find high quality apps to fit our needs. With that in mind, I have compiled this list of eight apps that I&#8217;ve found invaluable as a developer.</p>
<p>Without any further ado, here they are listed alphabetically:</p>
<hr />
<h2><a href="http://itunes.apple.com/us/app/air-display/id368158927?mt=8">Air Display</a></h2>
<p><a href="http://itunes.apple.com/us/app/air-display/id368158927?mt=8"><img src="http://fuelyourcoding.com/files/AirDisplay.png" alt="AirDisplay" title="AirDisplay" width="125" height="125" class="alignright size-full wp-image-1167" style="border: none; background: transparent; padding-left: 50px; padding-bottom: 0;"/></a></p>
<p><strong>Price:</strong> $9.99<br />
<strong>Type:</strong> iPad<br />
<strong>Version:</strong> 1.0.1</p>
<p>Air Display lets you use your iPad as a wireless display for your Mac OS X computer. Why is this great for developers? Because we need screen real estate, baby!</p>
<p><a href="http://www.flickr.com/photos/sant0sk1/4645873586/">Here&#8217;s a pic</a> of Air Display in action as my 3rd monitor. The iPad monitor is perfect size for your <a href="http://www.skype.com/">Skype</a> windows, API documentation, or a browser session with programming tutorials.</p>
<hr />
<h2><a href="http://itunes.apple.com/us/app/domainstorm/id376898108?mt=8">DomainStorm</a></h2>
<p><a href="http://itunes.apple.com/us/app/domainstorm/id376898108?mt=8"><img src="http://fuelyourcoding.com/files/DomainStorm.png" alt="DomainStorm" title="DomainStorm" width="125" height="125" class="alignright size-full wp-image-1160" style="border: none; background: transparent; padding-left: 50px; padding-bottom: 0;"/></a></p>
<p><strong>Price:</strong> Free<br />
<strong>Type:</strong> iPhone<br />
<strong>Version:</strong> 1.0</p>
<p>When inspiration for that new web application hits you, the first (and most fun) thing to do is buy a great domain name for it. </p>
<p>DomainStorm is a relatively new app from <a href="http://networksolutions.com/">Network Solutions</a> built to help you accomplish just that. It tells you if domains are available, helps you brainstorm name ideas, lets you mark domains as favorites for later purchase, and even provides you <a href="http://en.wikipedia.org/wiki/Whois">WHOIS</a> information so you can contact current domain owners about a purchase. A must have for sure!</p>
<hr />
<h2><a href="http://itunes.apple.com/us/app/ego/id306785502?mt=8">Ego</a></h2>
<p><a href="http://itunes.apple.com/us/app/ego/id306785502?mt=8"><img src="http://fuelyourcoding.com/files/Ego.png" alt="Ego" title="Ego" width="125" height="125" class="alignright size-full wp-image-1163" style="border: none; background: transparent; padding-left: 50px; padding-bottom: 0;"/></a></p>
<p><strong>Price:</strong> $1.99, $4.99<br />
<strong>Type:</strong> iPhone, iPad<br />
<strong>Version:</strong> 2.1</p>
<p>Obsessed with checking your site analytics? There is no better way to get a quick glance at your traffic than the beautifully designed <a href="http://ego-app.com/">Ego</a> by <a href="http://garrettmurray.net/">Garrett Murray</a>.</p>
<p>With support for Google Analytics, Ember, FeedBurner, Twitter, Mint, Vimeo, Tumblr, and SquareSpace this app has your analytics needs covered. Did I mention it was beautifully designed?</p>
<hr />
<h2><a href="http://itunes.apple.com/us/app/evernote/id281796108?mt=8">Evernote</a></h2>
<p><a href="http://itunes.apple.com/us/app/evernote/id281796108?mt=8"><img src="http://fuelyourcoding.com/files/Evernote.png" alt="Evernote" title="Evernote" width="125" height="125" class="alignright size-full wp-image-1169" style="border: none; background: transparent; padding-left: 50px; padding-bottom: 0;"/></a></p>
<p><strong>Price:</strong> Free<br />
<strong>Type:</strong> Universal<br />
<strong>Version:</strong> 3.3.5</p>
<p><a href="http://www.evernote.com">Evernote</a> is a wonderful way to store all the programming tips, tricks, tutorials and gotchas that we accumulate as we go about our development efforts. The power of Evernote is the universal access to your notes that it provides. They have a web interface, Mac/Windows clients, and mobile apps including a highly polished iOS app.</p>
<p>If you haven&#8217;t tried Evernote yet, now is a great time to put all your notes in one highly accessible place. You can even save passwords in Evernote as they provide encrypted strings inside your notes.</p>
<hr />
<h2><a href="http://itunes.apple.com/us/app/ioctocat/id310429782?mt=8">iOctocat</a></h2>
<p><a href="http://itunes.apple.com/us/app/ioctocat/id310429782?mt=8"><img src="http://fuelyourcoding.com/files/iOctocat.png" alt="iOctocat" title="iOctocat" width="125" height="125" class="alignright size-full wp-image-1151" style="border: none; background: transparent; padding-left: 50px; padding-bottom: 0;"/></a></p>
<p><strong>Price:</strong> $4.99<br />
<strong>Type:</strong> iPhone<br />
<strong>Version:</strong> 1.7.1.1</p>
<p>iOctocat is, hands down, the best way to keep up to snuff with open-source development on <a href="http://github.com">GitHub</a> from your iPhone.</p>
<p>This app features access to your personal news feed, repositories, individual commits, issues, user profiles and site search. While the app is not free as in beer, it is <a href="http://en.wikipedia.org/wiki/Gratis_versus_Libre#.22Free_as_in_beer.22_vs_.22Free_as_in_speech.22">free as in speech</a> and the source is aptly hosted <a href="http://github.com/dbloete/ioctocat">on GitHub</a>. That makes it <a href="/one-sure-fire-way-to-improve-your-coding">a great candidate for learning</a> iOS development as well!</p>
<hr />
<h2><a href="http://itunes.apple.com/us/app/issh-ssh-vnc-console/id287765826?mt=8">iSSH</a></h2>
<p><a href="http://itunes.apple.com/us/app/issh-ssh-vnc-console/id287765826?mt=8"><img src="http://fuelyourcoding.com/files/iSSH.png" alt="iSSH" title="iSSH" width="125" height="125" class="alignright size-full wp-image-1144" style="border: none; background: transparent; padding-left: 50px; padding-bottom: 0;" /></a></p>
<p><strong>Price:</strong> $9.99<br />
<strong>Type:</strong> Universal<br />
<strong>Version:</strong> 4.2.5</p>
<p>Most developers have found themselves <a href="http://en.wikipedia.org/wiki/Afk">AFK</a> when a very important server is having problems. If you know the feeling, then <a href="http://www.zinger-soft.com/iSSH_features.html">iSSH</a> is your new best friend. </p>
<p>There are a few remote server control iOS apps available, but this one is the best one that I&#8217;ve come across. It allows SSH, telnet, and even VNC connections and boasts many features. The iPad version provides a display size large enough to allow <a href="http://www.flickr.com/photos/sant0sk1/4555954836/">determined coders like myself</a> to fire up vim and get some coding done. The price is a bit steep, but if iSSH saves your butt one time then it has already earned its keep.</p>
<hr />
<h2><a href="http://itunes.apple.com/us/app/istat-sys-monitoring-battery/id303034517?mt=8">iStat</a></h2>
<p><a href="http://itunes.apple.com/us/app/istat-sys-monitoring-battery/id303034517?mt=8"><img src="http://fuelyourcoding.com/files/iStat.png" alt="iStat" title="iStat" width="125" height="125" class="alignright size-full wp-image-1171" style="border: none; background: transparent; padding-left: 50px; padding-bottom: 0;"/></a></p>
<p><strong>Price:</strong> $0.99<br />
<strong>Type:</strong> iPhone<br />
<strong>Version:</strong> 1.2</p>
<p>Bjango makes gorgeous and useful software including the OS X system monitoring tool <a href="http://bjango.com/apps/istatmenus/">iStat Menus</a>. They also offer a similar app called <a href="http://bjango.com/apps/istat/">iStat</a> which displays your iPhone&#8217;s system stats.</p>
<p>The beauty of the iStat app for developers is that you can also use it to monitor remote servers running Mac, Linux or Solaris! You simply install a daemon on the server you need monitoring and iStat will show you its CPU, memory, disk, temps, uptime, and tons more information. It feels great to have intimate details about your servers always at your fingertips.</p>
<hr />
<h2><a href="http://itunes.apple.com/us/app/nezumi/id346715875?mt=8">Nezumi</a></h2>
<p><a href="http://itunes.apple.com/us/app/nezumi/id346715875?mt=8"><img src="http://fuelyourcoding.com/files/Nezumi.png" alt="Nezumi" title="Nezumi" width="125" height="125" class="alignright size-full wp-image-1174" style="border: none; background: transparent; padding-left: 50px; padding-bottom: 0;"/></a></p>
<p><strong>Price:</strong> $4.99<br />
<strong>Type:</strong> iPhone<br />
<strong>Version:</strong> 1.2</p>
<p>This one is specific to Ruby-using web developers. For those who fit that description, you absolutely need to try deploying an application to <a href="http://heroku.com/">Heroku</a>. It is the dead simplest way to get deployed and if you haven&#8217;t tried it yet then you don&#8217;t know what you&#8217;re missing out on.</p>
<p>For those who&#8217;ve seen the Heroku light, <a href="http://nezumiapp.com/">Nezumi</a> is a must-have companion app for the Heroku service. Nezumi gives you instant access to your Heroku apps from your iPhone so you can add collaborators, manage your dynos, toggle maintenance mode, execute rake/console tasks, and even restart your application on the go. Love it!</p>
<hr />
<p>So there you have &#8216;em. Eight great iOS apps for developers. Hopefully you&#8217;ll find that one or more of these apps helps you increase your productivity as a developer. I know I&#8217;m better off with them than I was without.</p>
<p>If you know of any other iOS apps that did not make my list, please give them a shout out in the comments, so we can all check them out!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EOgzxupB4WA:83iqQsjP-cY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EOgzxupB4WA:83iqQsjP-cY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=EOgzxupB4WA:83iqQsjP-cY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EOgzxupB4WA:83iqQsjP-cY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=EOgzxupB4WA:83iqQsjP-cY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EOgzxupB4WA:83iqQsjP-cY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=EOgzxupB4WA:83iqQsjP-cY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EOgzxupB4WA:83iqQsjP-cY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EOgzxupB4WA:83iqQsjP-cY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?i=EOgzxupB4WA:83iqQsjP-cY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/fuelyourcoding?a=EOgzxupB4WA:83iqQsjP-cY:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/fuelyourcoding?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/fuelyourcoding/~4/EOgzxupB4WA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fuelyourcoding.com/eight-great-ios-apps-for-developers/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://fuelyourcoding.com/eight-great-ios-apps-for-developers/</feedburner:origLink></item>
	</channel>
</rss>

