<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dare to Dream? &#187; Blog</title>
	<atom:link href="http://www.makuchaku.in/blog/category/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.makuchaku.in/blog</link>
	<description>Good judgment comes from experience; Experience comes from bad judgment.</description>
	<lastBuildDate>Sun, 02 Oct 2011 19:29:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>AppDok is here!</title>
		<link>http://www.makuchaku.in/blog/appdok-is-here</link>
		<comments>http://www.makuchaku.in/blog/appdok-is-here#comments</comments>
		<pubDate>Tue, 09 Aug 2011 18:36:28 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[AdoMado]]></category>
		<category><![CDATA[AppDok]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=1073</guid>
		<description><![CDATA[Tomorrow is when AppDok&#8217;s might is going to be tested! Wishing good luck to the AppDok&#8216;s launch tomorrow Fingers crossed! No related posts. Related posts brought to you by Yet Another Related Posts Plugin.


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/appdok-is-here&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p>Tomorrow is when AppDok&#8217;s might is going to be tested!</p>
<p>Wishing good luck to the <a href="http://appdok.com">AppDok</a>&#8216;s launch tomorrow <img src='http://www.makuchaku.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Fingers crossed!</p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/appdok-is-here&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/appdok-is-here/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>From being employed to self-employed!</title>
		<link>http://www.makuchaku.in/blog/from-being-employed-to-self-employed</link>
		<comments>http://www.makuchaku.in/blog/from-being-employed-to-self-employed#comments</comments>
		<pubDate>Fri, 07 Jan 2011 16:45:46 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=999</guid>
		<description><![CDATA[Its a huge huge step in my life &#8211; something I&#8217;ve always dreamt of ever since my college life &#8211; working for myself! What I&#8217;ve always seen practically happening is once you burn the bridges, there&#8217;s only one way to go &#8211; and that is move forward! That said, I still have butterflies in my [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/from-being-employed-to-self-employed&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p>Its a huge huge step in my life &#8211; something I&#8217;ve always dreamt of ever since my college life &#8211; working for myself!</p>
<p>What I&#8217;ve always seen practically happening is once you burn the bridges, there&#8217;s only one way to go &#8211; and that is move forward!</p>
<p>That said, I still have butterflies in my stomach &#8211; but this time, I&#8217;m more determined than being scared of what&#8217;s in store for me.</p>
<p>Bring it on&#8230; head on!</p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/from-being-employed-to-self-employed&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/from-being-employed-to-self-employed/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to restart an interrupted dist-upgrade &#8211; Ubuntu 10.10 (beta) mess!</title>
		<link>http://www.makuchaku.in/blog/how-to-restart-an-interrupted-dist-upgrade</link>
		<comments>http://www.makuchaku.in/blog/how-to-restart-an-interrupted-dist-upgrade#comments</comments>
		<pubDate>Sat, 18 Sep 2010 11:45:12 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=965</guid>
		<description><![CDATA[sudo dpkg &#8211;configure -a I&#8217;m still running this&#8230; lets see how my new Ubuntu 10.10 Beta install fairs out&#8230; Seems like the problem is with how ATI graphic drivers are updated. Please consult http://www.redshirtlinux.com/?p=239 before installing Ubuntu 10.10 Beta No related posts. Related posts brought to you by Yet Another Related Posts Plugin.


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/how-to-restart-an-interrupted-dist-upgrade&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><blockquote><p>sudo dpkg &#8211;configure -a</p></blockquote>
<p>I&#8217;m still running this&#8230; lets see how my new Ubuntu 10.10 Beta install fairs out&#8230;</p>
<p>Seems like the problem is with how ATI graphic drivers are updated. Please consult <a href="http://www.redshirtlinux.com/?p=239">http://www.redshirtlinux.com/?p=239</a> before installing Ubuntu 10.10 Beta</p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/how-to-restart-an-interrupted-dist-upgrade&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/how-to-restart-an-interrupted-dist-upgrade/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I will pick Samsung Galaxy S i9000 over Nexus One or HTC Desire</title>
		<link>http://www.makuchaku.in/blog/why-i-will-pick-samsung-galaxy-s-i9000-over-nexus-one-or-htc-desire</link>
		<comments>http://www.makuchaku.in/blog/why-i-will-pick-samsung-galaxy-s-i9000-over-nexus-one-or-htc-desire#comments</comments>
		<pubDate>Tue, 27 Jul 2010 16:18:48 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=917</guid>
		<description><![CDATA[Ok, so I have to admit it &#8211; the first time I saw the Samsung Galaxy S i9000 in flesh and blood &#8211; I was quite taken aback by the build quality of the device. When compared to the mighty Nexus One, it almost felt cheap&#8217;ish. Back cover of the device is done in plastic!!! [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/why-i-will-pick-samsung-galaxy-s-i9000-over-nexus-one-or-htc-desire&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p>Ok, so I have to admit it &#8211; the first time I saw the <a href="http://www.gsmarena.com/samsung_i9000_galaxy_s-3115.php" target="_blank">Samsung Galaxy S i9000</a> in flesh and blood &#8211; I was quite taken aback by the build quality of the device. When compared to the mighty Nexus One, it almost felt cheap&#8217;ish. Back cover of the device is done in plastic!!!</p>
<p>&#8220;Cummon Samsung!! Your device is priced at INR 28,000 and you couldn&#8217;t use decent buid material&#8230;?&#8221; &#8211; was the first thought that crossed my mind.</p>
<p>A few days went by and I was still trying to get hold of a <a href="http://www.gsmarena.com/htc_google_nexus_one-3069.php" target="_blank">Nexus One</a> or an <a href="http://www.gsmarena.com/htc_desire-3077.php" target="_blank">HTC Desire</a> &#8211; the only way to get them in India was to get it from the US. Done that way, the phone warranty wouldn&#8217;t be worth a penny! And I&#8217;ll have to rely on &#8220;importers in Gaffar market&#8221; to get the work done &#8211; no confirmation on if the device is in 100% working condition until I shell out the complete price &#8211; N1 is priced at about INR 28k and HTC Desire at INR 25k (no idea why INR 3k cheaper).</p>
<p>SAD story!</p>
<p>Thankfully, it ended when I first read about the <a href="http://androidandme.com/2010/07/news/samsung-captivate-galaxy-s-video-out-demonstration/" target="_blank">TV out functionality in Samsung Galaxy S i9000</a> on <a href="http://androidandme.com/" target="_blank">AndroidAndMe.com</a>. That was when I first went to see the device in real &#8211; and was taken aback by the cheap feeling build quality.</p>
<p>However, yesterday, after reading all the reviews and user experiences about <a href="http://forum.xda-developers.com/forumdisplay.php?f=656" target="_blank">SGS i9000 on xda-forums</a>, I decided to give SGS i9000 another shot.</p>
<ul>
<li> Can I keep aside the build quality for a second and look at the hardware packed inside?</li>
<li> Can I learn to appreciate a lighter device? - I&#8217;ve always had a heavy device in my pockets (E61, E72, G1, etc&#8230;)</li>
<li> Can I trust Samsung to release a Froyo update for the device?</li>
</ul>
<p>My answer to (most of) those questions was yes.<br />
And yesterday, I was out in the market again &#8211; looking for another hands on with the SGS i9000.<br />
And this time, with an open mindset towards the build quality.</p>
<p>I was not disappointed.</p>
<p><img class="alignnone size-full wp-image-938" title="sgs" src="http://www.makuchaku.in/blog/wp-content/uploads/2010/07/sgs.jpg" alt="" width="458" height="600" /><a href="http://www.makuchaku.in/blog/wp-content/uploads/2010/07/sgs-2.jpg"><img class="alignnone size-full wp-image-939" title="sgs-2" src="http://www.makuchaku.in/blog/wp-content/uploads/2010/07/sgs-2.jpg" alt="" width="450" height="600" /></a></p>
<p>Here are a few points which prompted me to reconsider Samsung Galaxy S i9000 &#8211; over  Nexus One or HTC Desire</p>
<p><span style="font-size: medium;"><strong>Super AMOLED, 4 inch Screen</strong></span><br />
Oh man! If you have ever used a <a href="http://en.wikipedia.org/wiki/Super_AMOLED" target="_blank">Super AMOLED</a> screen, you just cannot (I repeat, just cannot) go back to a regular AMOLED or LCD display. The screen is so bright and vivid that you just cannot miss it. Also, the 4 inch screen size Samsung has used &#8211; is just perfect. Not too huge (unlike EVO 4G or Droid X) or small (N1 or HTC Desire) &#8211; although screen size is more of a personal choice.</p>
<p><strong> </strong></p>
<p>Technically, this screen enables a slimmer form factor, gives a wider viewing angle, is 20% brighter, is 80% less reflective &amp; uses 20% lesser battery.</p>
<div id="attachment_928" class="wp-caption alignnone" style="width: 310px"><a href="http://www.makuchaku.in/blog/wp-content/uploads/2010/07/screen.jpg"><img class="size-medium wp-image-928" title="screen" src="http://www.makuchaku.in/blog/wp-content/uploads/2010/07/screen-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">SGS screen as compared to iPhone</p></div>
<p><span style="font-size: medium;"><strong>More powerful (Graphics) processor</strong></span><br />
Though all of the said devices (SGS i9000, N1, HCT Desire) pack a 1 Ghz processor and dish out a very snappy performance, they do have subtle differences (infact, quite some differences). They have different Graphics Processors (GPU).</p>
<ul>
<li><strong>Nexus One </strong>- Qualcomm QSD8×50 with Adreno 200 GPU can render 22 million triangles/sec</li>
<li><strong>Samsung Galaxy S</strong> &#8211; S5PC110 with PowerVR SGX540 GPU can render 90 million triangles/sec</li>
</ul>
<p>More triangles per sec =&gt; more GPU output =&gt; SGS  GPU is 3 times more powerful as compared to Nexus One&#8217;s GPU &#8211; hence smoother experience in games, movies and general UI navigation.<br />
Also, the SGS&#8217;s Humming Bird processor is built using a 45 nm die &#8211; which should consume less power than the N1&#8242;s processor which is using a 65 nm die.</p>
<p>Check out this Youtube video which does a <a href="http://www.youtube.com/watch?v=cl4p5JI0-gQ" target="_blank">head to head comparison of the GPU&#8217;s on Nexus One &amp; SGS</a> &#8211; a must watch! Also, how <a href="http://www.youtube.com/watch?v=dpP5QljEqow" target="_blank">SGS&#8217;s GPU blows away HTC Desire&#8217;s GPU in Doom 2 test</a>.</p>
<p><span style="font-size: medium;"><strong>TV Out capability</strong></span><br />
I am getting tired of constantly converting all my movies from MKV or AVI format into MPEG1/2 &amp; use a USB stick to watch on my 32 inch Sony Bravia. A 300 megs movie in MKV format is converted to almost 3 GB size in Mpeg2 format &#8211; which is ridiculous!</p>
<p>Hence, the TV out capability in SGS i9000 is like god-sent!<br />
Imagine a scenario, where I sync up SGS with the movies in my computer via WiFi and use TV out to directly mirror SGS&#8217;s screen on the TV &#8211; full HD playback with 720p resolution. No more conversions and copying. Yay <img src='http://www.makuchaku.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.youtube.com/watch?v=GTQBAx_BDfk"><img class="alignnone" src="http://i4.ytimg.com/vi/GTQBAx_BDfk/default.jpg" alt="TV out in SGS" width="120" height="90" /></a><br />
TV out in SGS</p>
<p><span style="font-size: medium;"><strong>With bill and warranty</strong></span><br />
Since this phone is available from gazillions of authorized Samsung dealers, there is not even a slightest chance of me buying this phone from the grey market. I am getting this device will bill, with warranty &#8211; tax paid!</p>
<p><span style="font-size: medium;"><strong>Video codec support</strong></span><br />
Samsung has done a great job in the multimedia department. Besides replacing Android&#8217;s stock media player, with their own custom implementation &#8211; which in my opinion, rocks! They have also added support for a ton of video (MP4/DivX/WMV/H.264/H.263 formats, plays .avi and .mkv wonderfully well) and audio (MP3/WAV/eAAC+/AC3/FLAC) codecs.</p>
<p><a href="http://www.makuchaku.in/blog/wp-content/uploads/2010/07/music-ui.jpg"><img class="alignnone size-medium wp-image-926" title="music-ui" src="http://www.makuchaku.in/blog/wp-content/uploads/2010/07/music-ui-250x300.jpg" alt="" width="250" height="300" /></a><br />
Now can one ask for more? <img src='http://www.makuchaku.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span style="font-size: medium;"><strong>16 Gigs On-board memory</strong></span><br />
The device comes preloaded with 16 GB of memory &#8211; which is more than enough for me to store my music, photos and occasional movies. That saves me another INR 2k on a 16 Gig Micro SDHC. However, that being said, I am planning to give apps2sd a shot with an <a href="http://cgi.ebay.in/ws/eBayISAPI.dll?ViewItem&amp;item=180530159596&amp;ssPageName=STRK:MEWAX:IT" target="_blank">8 Gigs Class 6 Micro SDHC</a>.</p>
<p><span style="font-size: medium;"><strong>1500 mAh Battery</strong></span><br />
A brilliant screen and demanding data requirements will only make the phone need more and more electron juice. And Samsung did it just right &#8211; by adding a 1500 mAh battery. Any lesser and the phone would have not been able to complete even one day on a single charge. Nice!</p>
<p><strong><span style="font-size: medium;">Bundled Apps&#8230;</span></strong><br />
Though, this is not important &#8211; never the less, its a factor. I think Samsung is the first Android mobile manufacturer which has decided to include a decent file explorer in the package. Though this can be done in an instant via the Android Market &#8211; but the fact that Sammy has thought this out for you &#8211; is wonderful. Samsung Galaxy S i9000 comes preloaded apps like <a href="http://swypeinc.com/" target="_blank">Swype</a>, <a href="http://www.engadget.com/2010/07/14/road-sms-encourages-you-to-text-while-walking/" target="_blank">Road SMS</a>, <a href="http://www.layar.com/" target="_blank">Layar</a>, <a href="http://www.aldiko.com/" target="_blank">Aldiko Ebook reader</a>, All Share, Daily Briefing, Memo, Mini Diary, Social Hub, Write &amp; Go, Car Home, and many more!</p>
<p><span style="font-size: medium;"><strong>TouchWiz UI 3.0</strong></span><br />
I am really looking forward to the custom skin on top of stock Android 2.1 &#8211; I&#8217;ve always had the stock installations &#8211; so this should be fun to play with.</p>
<p>Checkout the detailed <a href="http://www.gsmarena.com/samsung_i9000_galaxy_s-review-478.php" target="_blank">review (with screenshots) of the Samsung Galaxy S i9000</a>. Feel free to let me know about how you feel about this device via the comments.<br />
<strong>UPDATE</strong><br />
A lot of folks have complained that this device is slow &amp; its GPS sucks! I believe, this is just the software.<br />
And if this is just the software, this can always be fixed. Folks at xda-forums have already found fixes.<br />
Next up &#8211; my unboxing video and more! Stay tuned <img src='http://www.makuchaku.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/why-i-will-pick-samsung-galaxy-s-i9000-over-nexus-one-or-htc-desire&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/why-i-will-pick-samsung-galaxy-s-i9000-over-nexus-one-or-htc-desire/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Location of Rubygems in Ubuntu Jaunty</title>
		<link>http://www.makuchaku.in/blog/location-of-rubygems-in-ubuntu-jaunty</link>
		<comments>http://www.makuchaku.in/blog/location-of-rubygems-in-ubuntu-jaunty#comments</comments>
		<pubDate>Sun, 27 Sep 2009 14:19:49 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/location-of-rubygems-in-ubuntu-jaunty</guid>
		<description><![CDATA[With Jaunty, the location of installed gems has been moved to /var/lib/gems while it was /usr/lib/ruby in releases before. Please follow http://intertwingly.net/blog/2009/04/25/Rails-on-Jaunty for more on how to rectify the problem that might arise. No related posts. Related posts brought to you by Yet Another Related Posts Plugin.


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/location-of-rubygems-in-ubuntu-jaunty&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p>With Jaunty, the location of installed gems has been moved to /var/lib/gems while it was /usr/lib/ruby in releases before.<br />
Please follow <a href="http://intertwingly.net/blog/2009/04/25/Rails-on-Jaunty" target="_blank">http://intertwingly.net/blog/2009/04/25/Rails-on-Jaunty</a> for more on how to rectify the problem that might arise.</p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/location-of-rubygems-in-ubuntu-jaunty&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/location-of-rubygems-in-ubuntu-jaunty/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Revisting Ruby &#8211; Array.each</title>
		<link>http://www.makuchaku.in/blog/revisting-ruby-array-each</link>
		<comments>http://www.makuchaku.in/blog/revisting-ruby-array-each#comments</comments>
		<pubDate>Fri, 07 Aug 2009 04:56:46 +0000</pubDate>
		<dc:creator>Mayank Jain (makuchaku)</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Array.each]]></category>
		<category><![CDATA[blocks]]></category>
		<category><![CDATA[Revisiting Ruby]]></category>

		<guid isPermaLink="false">http://www.makuchaku.in/blog/?p=722</guid>
		<description><![CDATA[I&#8217;ve been in love with Ruby for long now &#8211; and its only obvious that I should get serious about it. Hence, I&#8217;ve decided to go through Programming Ruby 1.9 &#8211; a chapter a day. Understanding Array.each and blocks #!/usr/bin/env ruby &#160; class MyObject &#160; attr_accessor :data &#160; &#160; def initialize &#160; &#160; @data = [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[ 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/revisting-ruby-array-each&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span><p>I&#8217;ve been in love with Ruby for long now &#8211; and its only obvious that I should get serious about it.</p>
<p>Hence, I&#8217;ve decided to go through <a href="http://www.pragprog.com/titles/ruby3/programming-ruby-1-9" target="_blank">Programming Ruby 1.9</a> &#8211; a chapter a day.</p>
<p><strong>Understanding Array.each and blocks</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="co1">#!/usr/bin/env ruby</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">class</span> MyObject</div>
</li>
<li class="li1">
<div class="de1">&nbsp; attr_accessor <span class="re3">:data</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">def</span> initialize</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="re1">@data</span> = %w<span class="br0">&#123;</span>maku chaku was here<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">end</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="kw1">def</span> simple_yield_example</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw3">puts</span> <span class="st0">&quot;start&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">yield</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">yield</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw3">puts</span> <span class="st0">&quot;end&quot;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="kw1">end</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">def</span> each</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; idx = <span class="nu0">0</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">while</span> idx &lt; <span class="re1">@data</span>.<span class="me1">length</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; <span class="kw1">yield</span> <span class="re1">@data</span><span class="br0">&#91;</span>idx<span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; idx += <span class="nu0">1</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">end</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">end</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">end</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">puts</span> <span class="st0">&quot;##############&quot;</span></div>
</li>
<li class="li1">
<div class="de1">MyObject.<span class="me1">new</span>.<span class="me1">simple_yield_example</span> <span class="br0">&#123;</span> <span class="kw3">puts</span> <span class="st0">&quot;Hello there!&quot;</span> <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw3">puts</span> <span class="st0">&quot;##############&quot;</span></div>
</li>
<li class="li1">
<div class="de1">MyObject.<span class="me1">new</span>.<span class="me1">each</span> <span class="kw1">do</span> |val|</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw3">puts</span> val</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">end</span></div>
</li>
</ol>
</div>
<p><strong><br />
Output</strong></p>
<blockquote><p>[makuchaku@Warrior ruby]$ ./each.rb<br />
##############<br />
start<br />
Hello there!<br />
Hello there!<br />
end<br />
##############<br />
maku<br />
chaku<br />
was<br />
here</p></blockquote>
<p><strong><br />
Explanation</strong></p>
<p>Objective was to implement a lookalike of &#8220;each&#8221; as as iterator. A code block, when associated with a method call can be called by the method by using &#8220;yield&#8221;. The number of variables being passed into each block should match the number of variables being passed into the yield.</p>
 
<span class = "" style = "height: 40px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.makuchaku.in/blog/revisting-ruby-array-each&layout=button_count&send=false&show_faces=false&width=100&action=like&colorscheme=light&font=" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:40px"></iframe></span>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.makuchaku.in/blog/revisting-ruby-array-each/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

