<?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>Zen and the Art of Programming &#187; General</title>
	<atom:link href="http://programmingzen.com/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://programmingzen.com</link>
	<description>By Antonio Cangiano, Software Engineer &#38; Technical Evangelist at IBM</description>
	<lastBuildDate>Wed, 21 Jul 2010 22:12:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The pursuit of excellence in programming</title>
		<link>http://programmingzen.com/2010/07/04/the-pursuit-of-excellence-in-programming/</link>
		<comments>http://programmingzen.com/2010/07/04/the-pursuit-of-excellence-in-programming/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 22:59:44 +0000</pubDate>
		<dc:creator>Antonio Cangiano</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://programmingzen.com/?p=1224</guid>
		<description><![CDATA[As I write a series of thoughts on the pursuit of excellence in programming, I must preface my essay by asking you to ignore that I wrote these words. I invite you to evaluate the opinions and ideas presented here not ad hominem, but rather on the basis of their own merits. It would be [...]]]></description>
			<content:encoded><![CDATA[<p>As I write a series of thoughts on the pursuit of excellence in programming, I must preface my essay by asking you to ignore that I wrote these words. I invite you to evaluate the opinions and ideas presented here not <em>ad hominem</em>, but rather on the basis of their own merits. It would be easy to otherwise mistakenly dismiss them with the infamous question posed by Steve Jobs to a blogger: “What have you done that’s so great?”.</p>
<p>This is to say that I talk about the ambitious and noble goal of achieving excellence in programming, fully conscious of not having achieved said excellence. For the time being, I don’t feel like I can point my finger at something that would impress Steve Jobs (or less critical observers). I’m just a traveler on the journey of learning, with a desire to share his experiences and plans.</p>
<p><strong>Two visions of intelligence</strong></p>
<p>Mastering a complex discipline such as programming requires a great amount of learning over the course of several years, perhaps even decades. Maximizing one’s ability to learn is therefore an early investment that can quickly repay itself.</p>
<p>The biggest impact on my ability to learn was caused by a shift in the way I considered the matter of intelligence. There are mainly two ways to think about it. You can either consider intelligence to be a static, intrinsic ability or a more dynamic, cultivable characteristic of human beings.</p>
<p>Cognitive scientists and psychologists conclusively determined that people who perceived intelligence as a dynamic characteristic, outperformed and were more successful than people who internalized intelligence as an intrinsic, static ability.</p>
<p>It’s worth noting that it’s not really important whether intelligence can actually be developed through application. It’s the perception of it that forges students’ approach to learning.</p>
<p>This difference in perception is often conditioned by early parenting. Kids who are encouraged to work hard to achieve results and are praised on the basis of their effort, tend to develop a perception of intelligence and results as something they can work on. Other kids are conditioned to think that they are doing well because they are “smart” and that their intelligence alone will most likely lead them to success.</p>
<p>Society has a fascination with genius, and parents like to fancy their little ones to be several standard deviations better than the norm, but conditioning children this way has dangerous and counterproductive consequences.</p>
<p>Kids who are labeled and praised because of their “innate capabilities”, will often suffer from an overconfidence that will affect their ability to challenge themselves through the depths of the unknown, because they feel it would threaten their status. What if they fail? It would mean, in their eyes, that perhaps they are not the smart person they have been assumed to be all along. We all have seen such kids failing here and there, and quickly making excuses such as, “Oh, I wasn’t trying at all”.</p>
<p>A parent who is cultivating a kid’s interest in hard work, may be more likely to encourage their child with words such as, “It’s OK. Keep studying, and you’ll definitely do better next time”. A parent proposing a model of static intelligence, may justify their child’s failure in a given subject by concluding that “maybe you are not cut out for subject X”. [1]</p>
<p>When facing failure, the “static intelligence” child may crumble under the weight of his own demise, as if failure was a reflection of their intrinsic value rather than a temporary speed bump and occasion for growth. A “dynamic intelligence” child will simply try harder next time. Genius or not, excellence and mastery of any subject requires hard work and many “smart” kids fall short when the bar is raised high enough so that “smartness” alone won’t cut it anymore. This usually corresponds with the switch from high school to college.</p>
<p>I’m very familiar with all of this, because I was one of those kids. I was labeled by my parents and science teachers as a “genius”. Even psychologists at school, who came to help us figure out what careers we were better suited for, ended up telling me that I could pursue virtually any career (at the time I was interested in nuclear physics) and that according to their (virtually meaningless) IQ tests I would be classified as a &#8220;genius&#8221;.</p>
<p>Please note that the problem wasn’t so much the label. Most smart kids figure out that they are smart on their own rather quickly. The real problem was that I wasn’t taught the value of long-term intellectual effort. Effort itself was considered as being somewhat detrimental to my status. Not only was I supposed to succeed, but I supposedly had to do so without putting forth any effort (a &#8220;utopic&#8221; ambition).</p>
<p>One of the first example of this that I can remember is when my father “caught me studying” for a few hours the same book before a test in middle school. He told me something along the lines of “Why do you need to study? A genius like you should figure out the test without studying.”. It’s absurd, I know, and probably one of the dumbest things my &mdash; otherwise bright &mdash; father has ever told me. As a young kid though, such a statement can have a strong impact on you.</p>
<p>Another example has to do with Latin. My teacher was a palm reading, crazy cat lady and I had no respect for her from the start. So I didn’t pay attention in class, on top of not studying Latin at home, I set myself up for failure. When the first translation assignment came around, I got a mildly negative score. My less than professional teacher told me, “Oh I thought you were good, but I guess you are not”. Afterwards my father added to this by saying something along the lines of, “Well, don’t worry, I guess languages are not your strength.”.</p>
<p>Boom. That was enough for me to stop having any interest in Latin and completely ignore a subject at which I wasn’t excelling. Nobody could tell me, “You are stupid because you don’t understand Latin,” if I didn’t try at all. So I was the high school kid who did advanced Calculus stuff on his own for fun, when my classmates where struggling with Algebra, yet I pretty much sucked at Latin. (In retrospective, the thought patterns required to excel at Latin where not very different from those required to excel at math or mastering English as a second language. I suspect that had I put in some effort I could have been very good at, and actually enjoyed, the subject.)   </p>
<p>Over the years I had to readjust this perception entirely. By falling on my face more than once, I learned that excellence is only achieved through a combination of talent and effort. The real genius may lie in the ability to put in thousands of hours of focused study and practice, in the pursuit of whatever one person is trying to learn and understand.</p>
<blockquote><p>If people knew how hard I worked to get my mastery, it wouldn&#8217;t seem so wonderful at all. &mdash; Michelangelo</p></blockquote>
<p>By this new definition, I was a complete idiot who had to entirely learn from scratch how to appreciate the value of effort to hone and develop his “talent” (which is nothing but a seed on its own).</p>
<p><strong>Learning to learn</strong></p>
<p>Being very interested in programming, computer science, mathematics, and science in general, I decided at some point that I had to entirely change my attitude towards learning if I were to master any of those disciplines. Effort was now more important than intelligence on its own, and I would feel satisfied only when doing a really good job in the pursuit of something challenging, that couldn’t be achieved by sheer “talent”.</p>
<blockquote><p>The saddest thing in life is wasted talent, and the choices that you make will shape your life forever. &mdash; Calogero &#8216;C&#8217; Anello from A Bronx Tale</p></blockquote>
<p>In the process, I started to internalize a few principles and I dealt with issues related to both the art of learning and the art of programming.</p>
<p><strong>An awful feeling</strong></p>
<p>There is a cognitive bias known as the Dunning-Kruger effect [2], in which subjects who are inexperienced or less competent within a given discipline, tend to overestimate their abilities (they are in other words affected by illusory superiority [3]).</p>
<p>The other side of this coin is that the more you study, the more you realize how little you know and how much there is to know (a concept put forward by Socrates back in the days of Ancient Greece). This is both a pleasure and a discomfort. There is a huge amount of satisfaction in finding things out. Yet, being in doubt and fully aware of how little you know tends to be an unpleasant side effect all learners have to live with. Doubt truly is the water that’s fundamental for the growth of the flower of intellectual curiosity. [4]</p>
<p>My approach in this case is to embrace and dominate my ignorance and fears. Whenever there is a concept that I feel particularly ignorant about or that is way over my head, I try to tackle it as if my life depended on it. There are still countless things I’m ignorant about, but this approach as really paid off for me over the years.</p>
<p>If you are trying to learn a whole branch of computer science or mathematics, it will take a long time, so you may want to start first with smaller “fears” that can be mastered, at least at an introductory level, in a short amount of time. Rather than thinking, “Oh yeah, I should really learn Git”, for months, act on the thought. The essential knowledge to work with Git or Hg doesn’t take months to learn (assuming you have a need for either of these particular tools).</p>
<p>But you are in this for the long run, so don’t be afraid of improving your craft by studying advanced topics that require a bigger commitment in terms of time as well. There is no royal shortcut, mastery of our craft will require thousands of hours of dedicated study and practice.</p>
<p><strong>Theory and practice</strong></p>
<p>Masters of any intellectual discipline tend to have good working knowledge of both theoretical and practical aspects. Pursuing excellence in programming requires the study of many insightful books that will widen your view of the field and as a result necessarily improve your craft.</p>
<p>Working with books alone is not enough though. Programming requires writing and reading programs every day for years. That’s why I have a rule: I refuse to go to sleep if I haven’t read and written some code on a given day (this doesn’t include the code I write for work, of course). So far, this rule has had a positive impact on my ability to code.</p>
<blockquote><p>It is a mistake to think that the practice of my art has become easy to me. I assure you, dear friend, no one has given so much care to the study of composition as I. There is scarcely a famous master in music whose works I have not frequently and diligently studied. &mdash; Mozart</p></blockquote>
<p><strong>Breadth Vs. Depth</strong></p>
<p>As we progress in our journey towards the pursuit of excellence in programming, a question that will no doubt pester people’s minds is whether one should go for breadth of knowledge, or depth. There are countless programming languages, paradigms, methodologies, technologies, et cetera.</p>
<p>The truth of the matter is that if we are to become GrandMaster programmers, we cannot ignore either of them. In practice, depth has a much stronger impact in the way we construct software. It is through deep understanding that we can see the whole through the parts. There is therefore value in specializing in just a few languages and technologies, and really mastering them in-depth.</p>
<p>Getting things done in software development requires a certain pragmatism and proficiency with the tools at hand. There is no escaping it. Depth is therefore necessary, but not sufficient.</p>
<p>I find that the web is particularly good at covering the breadth aspect of things. There are always new and interesting areas I can learn about and experiment with. I don’t need a whole 600 page book to get a feeling for &mdash; or to better understand &mdash; certain technologies that are not crucial to my area of specialization.</p>
<p>While there are quite a few exceptions I could mention, I’d say that I tend to use the Internet as an aid for horizontal scaling of my knowledge, and books for vertical scaling. And again, more often than not, the depth level is mostly determined by the amount of time, practice and effort I put into it, rather than the media I’m using.</p>
<p><strong>Where to find time</strong></p>
<p>One of the objections I hear often, particularly when it comes to reading books is, “I don’t have time!”. In a few extreme cases, that may actually be true, but I think that most people severely underestimate how much time is “wasted” on a daily basis (even just surfing online).</p>
<p>Breaks are extremely important, and I’m not advocating any regime of incessant study. I simply know how crucial it is to be constant. It’s a marathon, not a sprint.</p>
<p>My second rule is: I refuse to got sleep if I haven’t read at least a chapter of a book that day. Very often I get caught up in the book I’m reading or working through, and end up getting through much more than just one chapter (it really depends on the book, of course). But for me the rule is clear: no sleep allowed until one chapter has been read every day.</p>
<p>Try this approach and you’ll see that reading doesn’t have to take up much time, yet doing so you can still read several books (including technical ones) every month.</p>
<blockquote><p>We are what we repeatedly do. Excellence, then, is not an act but a habit. &mdash; Aristotle</p></blockquote>
<p>For certain books, it is convenient to have the book in PDF format on your computer, as you switch from the book to the editor/console and back. However, generally speaking the computer tends to be quite distracting and thoughts like “I’ll just check my email quickly” can easily lead to hours spent doing something else.</p>
<p>For this reason I prefer to read from a paper book which is also easier on the eyes for extensive reading after a day in front of a computer screen. Even if I’m using the computer at the same time to input code, the physical presence of a book next to my laptop is enough to remind me that I shouldn’t get distracted online. (For me the depth and focus required by books is also an antidote to the re-wiring that the web tends to do to our brains. [5])</p>
<p>By the way, a few days ago Amazon announced a gorgeous, brand new graphite color Kindle DX [6]. I think I may pull the trigger and get it for my upcoming 30th birthday. Buying numerous paper books is expensive, and given the price of Kindle books, this move would end up being cheaper in the long run. The large e-ink display almost looks like paper and the device is not as distracting as an iPad (you read on a Kindle, and that’s it). Plus, it’s lighter than most technical books and surely takes up less space in your home.</p>
<p><strong>Achieving focus</strong></p>
<p>With so much going on within the programming world, distractions are easy to come by. My approach is to focus only on the given macro-task at hand. If I’m trying to learn about process calculi for example, then for the next few months my “learning time” will be ruthlessly dedicated to that subject, as if the rest of the programming ecosystem stopped in time.</p>
<p>Then there is focusing at a micro-task level. Learning about a given subject can always be divided into a long series of smaller steps. When I’m focusing on one such, tiny step, then everything else ceases to exist (or at least in theory).</p>
<p>One trick I use to achieve solemn focus on micro-tasks, whether reading code, writing code, or reading a technical book, is the use of the Pomodoro Technique [7]. In short, I use timer software [8] which alerts me when 25 minutes (a pomodoro) have passed, and gives me a 5 minute break for each pomodoro. Every 4 pomodoros, I can take a longer break.</p>
<p>When I first started using this technique I thought it was mostly a gimmick and I had a hard time taking breaks. I just wanted to keep going and the “tracking” seemed silly. However, I must say that it strikes an elegant balance between the desire to focus for extensive periods of time and the importance of taking regular mini-breaks.</p>
<p>This approach has become routine for my mind now, so even if it is just a gimmick, it’s still a good way for me to get focused and “in the zone”.</p>
<p><strong>Aiming for sprezzatura</strong></p>
<p>The pursuit of excellence requires a huge drive from within, and a fundamental dissatisfaction with just being good at a given discipline. I believe this is true regardless of the profession at hand.</p>
<p>As I progress in my journey, I’m discovering how the key is to make the pursuit of excellence a habit. This goes against my nature of being an intellect sprinter, but I’m in for the long run and I’m really learning to enjoy the, marathon like, process.</p>
<p>My long-term goal is to program with sprezzatura [9], where the process is so internalized and part of my subconscious that it almost looks effortless (as if the act of programming was committed to muscle memory). It will be an overnight success, 15 years in the making.</p>
<p>Regardless of the improvement level achieved, I will always have the joy, privilege and need to continue to learn for the betterment of myself and my craft. When there is no set destination, the journey is what really matters.</p>
<blockquote><p>Ancora imparo. (I’m still learning.) &mdash; Michelangelo</p></blockquote>
<p><br/></p>
<p>Notes</p>
<p>[1] These concepts are explained, in a much more eloquent manner, in the early chapters of the excellent book, <a href="http://programmingzen.com/recommends/?0743277465">The Art of Learning</a> by Josh Waitzkin.</p>
<p>[2] <a href="http://en.wikipedia.org/wiki/Dunning-Kruger_effect">Dunning-Kruger Effect</a> on Wikipedia.</p>
<p>[3] <a href="http://en.wikipedia.org/wiki/Illusory_superiority">Illusory Superiority</a> on Wikipedia.</p>
<p>[4] For more on the importance of doubt in science, check out the beautiful epilogue in <a href="http://programmingzen.com/recommends/?0393320928">What do you care what other people think?</a> by Richard P. Feynman.</p>
<p>[5] For more on this phenomenon, read <a href="http://programmingzen.com/recommends/?0393072223">The Shallows</a> by Nicholas Carr. </p>
<p>[6] The new <a href="http://programmingzen.com/recommends/?B002GYWHSQ">Kindle DX</a> on Amazon.</p>
<p>[7] <a href="http://www.pomodorotechnique.com/">The Pomodoro Technique</a>.</p>
<p>[8] <a href="http://www.apple.com/downloads/macosx/development_tools/pomodoro.html">Pomodoro</a> for Mac OS X.</p>
<p>[9] <a href="http://en.wikipedia.org/wiki/Sprezzatura">Sprezzatura</a> on Wikipedia.</p>
<p><strong>Translations</strong></p>
<p>Carlos Marcelo Cabrera translated this article into Spanish: <a href="http://pointtonull.esdebian.org/42312/busqueda-excelencia-programacion">La búsqueda de la excelencia en la programación</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingzen.com/2010/07/04/the-pursuit-of-excellence-in-programming/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>A new domain name for Zen and the Art of Programming</title>
		<link>http://programmingzen.com/2010/06/20/a-new-domain-name-for-zen-and-the-art-of-programming/</link>
		<comments>http://programmingzen.com/2010/06/20/a-new-domain-name-for-zen-and-the-art-of-programming/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 10:16:49 +0000</pubDate>
		<dc:creator>Antonio Cangiano</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://programmingzen.com/?p=1201</guid>
		<description><![CDATA[For years Zen and the Art of Programming has been hosted on my domain antoniocangiano.com. However, I&#8217;ve decided to switch it over to a new one, programmingzen.com. This move was done for two main reasons: first, it is sometimes hard for native English speakers to communicate and remember my name. Second, my blog isn&#8217;t so [...]]]></description>
			<content:encoded><![CDATA[<p>For years Zen and the Art of Programming has been hosted on my domain antoniocangiano.com. However, I&#8217;ve decided to switch it over to a new one, <a href="http://programmingzen.com">programmingzen.com</a>. This move was done for two main reasons: first, it is sometimes hard for native English speakers to communicate and remember my name. Second, my blog isn&#8217;t so much about me and my life, as it is about the world of programming.</p>
<p>As I look towards the steps that are required to bring my blog to the next level, I decided it was time to make the switch to a new domain. I&#8217;d like to transform Zen and the Art of Programming into a blog that every programmer could potentially be interested in subscribing to, not just people who are into Ruby or following me.</p>
<p>The good news for you is that you don&#8217;t need to do a thing. Every internal link has been permanently redirected to a corresponding programmingzen.com link, with the exception of the homepage. I&#8217;m now using <a href="http://antoniocangiano.com/">antoniocangiano.com</a> as a sort of minimalist virtual business card, from which I link to my email, <a href="http://twitter.com/acangiano">Twitter</a>, Linkedin, my three blogs (this, my personal blog, and my math blog), as well as my book and <a href="http://thinkcode.tv">ThinkCode.TV</a>.</p>
<p>Stay tuned for lots of interesting new content, which I plan to post more frequently. Meanwhile please feel free to let me know what you think about this new change; I&#8217;d really welcome your thoughts.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingzen.com/2010/06/20/a-new-domain-name-for-zen-and-the-art-of-programming/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Follow up to my Gmail third-party access post</title>
		<link>http://programmingzen.com/2010/06/17/follow-up-to-my-gmail-third-party-access-post/</link>
		<comments>http://programmingzen.com/2010/06/17/follow-up-to-my-gmail-third-party-access-post/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 10:45:21 +0000</pubDate>
		<dc:creator>Antonio Cangiano</dc:creator>
				<category><![CDATA[Featured Article]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Industry News]]></category>

		<guid isPermaLink="false">http://antoniocangiano.com/?p=1194</guid>
		<description><![CDATA[My previous post about a possible intrusion by non-authorized parties on my Gmail account has received a lot of attention on Hacker News, and was even linked to from LifeHacker. There were a lot of questions, concerns, and critics that quickly surfaced, and in this post I&#8217;ll address most of them. Given the volume of [...]]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://antoniocangiano.com/2010/06/15/who-is-accessing-your-gmail-account/">previous post</a> about a possible intrusion by non-authorized parties on my Gmail account has received a lot of attention on Hacker News, and was even linked to from LifeHacker. There were a lot of questions, concerns, and critics that quickly surfaced, and in this post I&#8217;ll address most of them. Given the volume of heterogeneous points at hand, I will present this post in an informal <span class="caps">FAQ</span> manner.</p>
<p align="center"><img src="http://antoniocangiano.com/wp-content/uploads/2010/06/padlock.jpg" alt="Padlock image"/><br/><small><small>Image &copy; <a href="http://www.flickr.com/photos/sooperkuh/4241490395/">Sooperkuh</a></small></small>.</p>
<p><strong>Did the IP 173.203.211.51 belong to a malicious user?</strong></p>
<p>No. It belongs to <a href="http://etacts.com">etacts</a> (a social plugin for Gmail), who has confirmed that the IP is one of theirs. They were authorized by me to access my inbox via <span class="caps">IMAP</span> for &#8220;analytics&#8221; purposes.</p>
<p><strong>Why did you originally think that it could have been a malicious user?</strong></p>
<p>A reverse-lookup of the IP address did not show an etacts hostname, as it had in the past, but instead a generic Slicehost server. A search quickly revealed that other people had complained online about the same IP accessing their inbox, too. This was a red flag, but contrary to some peoples&#8217; interpretation, I didn&#8217;t freak out about it.</p>
<p><strong>Oh come on, you freaked out, admit it.</strong></p>
<p>Not quite, but I was reasonably concerned.</p>
<p><strong>Were you a bit paranoid about it?</strong></p>
<p>No.</p>
<p><strong>But they are after you.</strong></p>
<p>Really? Who?</p>
<p><strong>Everyone. Everyone is after you.</strong></p>
<p>Oh.</p>
<p><strong>What about Zoho Discussions and Trendly?</strong></p>
<p>Zoho and Trendly are the only two services I granted access to my Google account. In practice, this means I simply logged in using Google as a single sign-on, instead of creating a new account for each of those services. This type of OAuth-like authentication does not provide third party companies with your password, as explained by Google in <a href="https://www.google.com/support/accounts/bin/answer.py?answer=112802">this help page</a>.</p>
<p>Contrary to my initial post, Zoho and Trendly could not have been the culprits. etacts on the other hand required a username and password in order to work. This is likely to change when Google introduces OAuth for <span class="caps">IMAP</span>.</p>
<p><strong>Shouldn&#8217;t you &mdash; or anyone &mdash; know better than give your password to third parties?</strong></p>
<p>Generally speaking, yes. You shouldn&#8217;t share your password with anybody. In this case, I assessed the risks and benefits of doing so, and opted for the convenience of the service, feeling that etacts was/is trustworthy.</p>
<p>etacts is a YCombinator-funded startup and its entire business model depends, for the time being, on people trusting them with their login credentials. Until Google launches OAuth for <span class="caps">IMAP</span>, there isn&#8217;t really a way around this scenario, if you want to use such a service.</p>
<p>I fully understand that some people may feel that it&#8217;s never wise to trust a third party regardless of the benefits involved into the equation.</p>
<p><strong>Shouldn&#8217;t etacts attempt to prevent such false alarms?</strong></p>
<p>Yes, and the team at etacts was very proactive in terms of proposing possible solutions to prevent those users who trust them from needlessly worrying when an usual IP is recorded. Publishing a list of their IPs and ensuring that reverse lookups of such IPs lead to actual etacts hostnames, were two of the potential solutions that they suggested.</p>
<p><strong>So was it much ado about nothing?</strong></p>
<p>Yes and no. Without a doubt, the event that led me to write the article was the false alarm, but the real motivation behind it was to bring Google&#8217;s access log to people&#8217;s attention, regardless of whether they shared their password or not. In fact, following my post there were reports of people who&#8217;d discovered there had been illicit accesses to their accounts.</p>
<p>I also published the article to share some suggestions on what to do when dealing with an intrusion.</p>
<p><strong>Why did you say that you changed the password on a wired computer?</strong></p>
<p>As I mention in the post, it was unlikely that someone managed to sniff my password by whatever means. Occam&#8217;s Razor did point towards the service I&#8217;d given my password to, which I made clear in my initial post.</p>
<p>I happened to have a newly formatted Linux desktop, so I used that one. It didn&#8217;t take any extra effort on my part. In my case, using that or using my laptop would have been no different (in fact, I used my WiFi throughout the whole ordeal, and I haven&#8217;t bothered to change my WiFi password either).</p>
<p>Since those were general suggestions in a checklist of sort, it didn&#8217;t hurt to include it for people who may have had their password sniffed (even though such scenario would require further action).</p>
<p><strong>You don&#8217;t need <span class="caps"><a href="http://www.dban.org/">DBAN</a></span> to remove possible keyloggers</strong></p>
<p>That&#8217;s true, you don&#8217;t. I&#8217;d been planning to do a clean install on my MacBook Pro for a long time, so I thought I&#8217;d take the opportunity and go ahead with it now. As well, formatting one&#8217;s hard drive to remove keyloggers is still a valid suggestion for those who did have their password keylogged.</p>
<p><strong>You don&#8217;t need <span class="caps">DBAN</span> for a new installation either</strong></p>
<p>These days it&#8217;s rather rare that I do a brand new installation, so when I do, I like to start with a clean slate. Booting with <span class="caps">DBAN</span> and running a quick erase to zero in every bit is not an overly lengthy process. It&#8217;s an unnecessary step, that is unless you have unicorn riding midget pr0n to hide.</p>
<p><strong>Do you have unicorn pr0n to hide?</strong></p>
<p>Only a few gigabytes. <img src='http://programmingzen.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p><strong>Is there anything else you&#8217;d like to add?</strong></p>
<p>One thing I forgot to mention in my previous post is that, after changing your password, you may want to remove the app authorization from your list of authorized third parties for your Google Account.</p>
<p><strong>BTW, what&#8217;s up with the server dying on us?</strong></p>
<p>When I setup my server (a long time ago), <span class="caps">NGINX</span> wasn&#8217;t as established as it is today. So I went with Apache which is a slow and heavy beast. If you add that WordPress is resource hungry as well, you get a fine tuned 1GB of <span class="caps">RAM</span> slice that struggled with several thousand visitors in the span of a few hours. An strace of the Apache processes revealed that despite <span class="caps">APC</span> and the WordPress SuperCache plugin, <span class="caps">PHP</span> was still hogging resources like doing so is going out of style. (Despite my server issues more than 20,000 visitors managed to read the article from my old server.)</p>
<p>I have now moved this blog to a 4GB, 2 CPUs server in the cloud, using <span class="caps">NGINX</span> as a web server. I will slowly port my other blogs as well as I migrate away from Slicehost. This setup should be able to handle much heavier loads (at least in theory). If you notice any problems, please don&#8217;t hesitate to let me know. (I officially declare my current deployment as an alpha &#8220;release&#8221;).</p>
<p>That should wrap things up in regards to this Gmail investigation, folks. Time to move on. <img src='http://programmingzen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://programmingzen.com/2010/06/17/follow-up-to-my-gmail-third-party-access-post/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Who is accessing your Gmail account?</title>
		<link>http://programmingzen.com/2010/06/15/who-is-accessing-your-gmail-account/</link>
		<comments>http://programmingzen.com/2010/06/15/who-is-accessing-your-gmail-account/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 04:56:26 +0000</pubDate>
		<dc:creator>Antonio Cangiano</dc:creator>
				<category><![CDATA[Featured Article]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Quick Tips]]></category>

		<guid isPermaLink="false">http://antoniocangiano.com/?p=1192</guid>
		<description><![CDATA[The Gmail team recently introduced a new feature (in the footer) that enables account holders to verify the latest login activities on their account. I routinely check mine and the results are usually boring, reminding me I check my email way too often (and I do so mostly via browser, through my Canadian IP). An [...]]]></description>
			<content:encoded><![CDATA[<p>The Gmail team recently introduced a new feature (in the footer) that enables account holders to verify the latest login activities on their account. I routinely check mine and the results are usually boring, reminding me I check my email way too often (and I do so mostly via browser, through my Canadian IP).</p>
<p><strong>An unwelcome surprise</strong></p>
<p>If you don&#8217;t check yours regularly, you should (my version of Google Apps doesn&#8217;t have this feature though). In fact, tonight during a routine check, I discovered an unwelcome surprise: an entry that didn&#8217;t belong. The following screenshot shows the recent activity on my account (with some information blanked out):</p>
<p align="center"><img src="http://antoniocangiano.com/wp-content/uploads/2010/06/gmail-activity.png" alt="My Gmail activity window" /></p>
<p>See that US, IMAP line? That wasn&#8217;t me. So did someone manage to access my account? Or was it a web application that I authorized? Before panicking, I decided to look into whatever information I could gather about that IP.</p>
<p>It turns out that it&#8217;s the IP of a server hosted by Slicehost (RackSpace), but I couldn&#8217;t find any website running on that IP address (173.203.211.51). To make things more interesting, I found two people (<a href="http://www.google.com/support/forum/p/Google%20Mail/thread?tid=2a1a5c7cd2665946&#038;hl=de">one German</a>, <a href="http://d.hatena.ne.jp/PIcOz/20100608/1276022682">one Japanese</a>) complaining online about the same IP address and IMAP access to their Gmail accounts.</p>
<p>Was my account hacked into? I have a hard time believing that someone actually managed to login by guessing my password which was as secure as a password can be. I haven&#8217;t used my laptop on an unsecured WiFi. I use a Mac and am very cautious about what I install, so I doubt I have a keylogger installed or anything of that nature. Using 1Password I&#8217;m even immune to the so-called &#8220;tab napping&#8221; attacks.</p>
<p><strong>Possible culprits</strong></p>
<p>Assuming that this is not a misunderstanding and some SaaS application I authorized is not in fact using that server to perform a legitimate action, I think it&#8217;s likely that someone managed to get in through a vulnerability or backdoor in one such application.</p>
<p>I&#8217;m not pointing fingers here, nor accusing anyone, but it is interesting to find such an occurence happening so shortly after granting the aforementioned authorizations. The websites I granted access to were:</p>
<ul>
<li>Zoho Discussions (24 hours before the suspected intrusion happened)</li>
<li>Trendly (3 days before the intrusion)</li>
<li>Etacts (a few weeks before the intrusion)</li>
</ul>
<p>It&#8217;s worth mentioning that in the past Etacts had scared the crap out of me with their American IP showing up in the recent activity list. However a lookup has always shown the questionable IP to belong to them.</p>
<p>Do any of these services intentionally use the server with IP 173.203.211.51? Since I&#8217;m not the only one who suspects a violation from this IP, it would be interesting to hear what Slicehost has to say about it? Perhaps they know if it&#8217;s a legitimate or illegitimate use of their server.</p>
<p><strong>How to deal with an email intrusion</strong></p>
<p>The perception of being intruded upon, whether it&#8217;s real or just a scare, is definitely not pleasant. Just in case the same happens to you, here is what I did to deal with the situation:</p>
<ul>
<li>I verified that there were no messages sent on my behalf.</li>
<li>I checked that there weren&#8217;t any new filters that would forward emails to a possible malicious user.</li>
<li>I verified that there weren&#8217;t any forwards and ensured that forwarding was disabled.</li>
<li>POP3 was already disabled, and I have now disabled IMAP as well.</li>
<li>I revoked access to my Google account for all listed web applications.</li>
<li>I changed my password to another humongous one on a different computer, with a brand new installation of Linux, directly wired to my DSL modem (bypassing the whole wireless infrastructure I set up at home).</li>
<li>I will, soon enough, format my Mac (I&#8217;ve been planning a DBAN wipe, plus a brand new installation for a while either way).</li>
<li>I will continue to monitor my account activity.</li>
</ul>
<p>This is the kind of information I felt necessary to share even if this turns out to be a false alarm. I highly suggest that you keep an eye on your Gmail account activity and if you find something suspicious, act accordingly.</p>
<p><strong>UPDATE (June 17, 2010):</strong> Please read <a href="http://antoniocangiano.com/2010/06/17/follow-up-to-my-gmail-third-party-access-post/">my follow up post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingzen.com/2010/06/15/who-is-accessing-your-gmail-account/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>The world according to Android</title>
		<link>http://programmingzen.com/2010/06/02/the-world-according-to-android/</link>
		<comments>http://programmingzen.com/2010/06/02/the-world-according-to-android/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 19:10:18 +0000</pubDate>
		<dc:creator>Antonio Cangiano</dc:creator>
				<category><![CDATA[Featured Article]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Industry News]]></category>

		<guid isPermaLink="false">http://antoniocangiano.com/?p=1185</guid>
		<description><![CDATA[Apple is receiving copious amounts of bad press due to their somewhat arbitrary and restrictive App Store policies. This isn&#8217;t going to change a thing at Apple, but the complaints are warranted. Android on the other hand is touted as being &#8220;the open platform&#8221;, and developers are invited to develop and sell their apps on [...]]]></description>
			<content:encoded><![CDATA[<p>Apple is receiving copious amounts of bad press due to their somewhat arbitrary and restrictive App Store policies. This isn&#8217;t going to change a thing at Apple, but the complaints are warranted.  Android on the other hand is touted as being &#8220;the open platform&#8221;, and developers are invited to develop and sell their apps on the Android Market, rather than investing in a proprietary platform like the iPhone OS and the App Store.</p>
<p><strong>So much for being open</strong></p>
<p>When discussing the main emerging alternative platform, Android, we often hear about fragmentation issues, but critics tend to ignore the elephant in the room. Very few people can buy and sell apps on the Android Market. In fact, only developers from nine countries are allowed to sell applications on the Android Market. Take a look at the following map I prepared:</p>
<p align="center"><img src="http://antoniocangiano.com/wp-content/uploads/2010/06/android.png" alt="Android Market" /></p>
<p>Fine folks from Canada, Australia, New Zealand, Denmark, Sweden, Ireland, Russia, China, India, etc, are all excluded from this platform. Sure, they can sell apps on their own sites, but the real advantage of the App Store and the Android Market is in their ability to show and sell apps to a wide audience. If you lose that, you are pretty much out of the game or you&#8217;ll be starting off with a humongous disadvantage.</p>
<p><strong>Is this the best Google can do?</strong></p>
<p>Before you jump in and cut Google some slack, remember that the Android Market has been around for almost two years. As much as I want to cheer for the underdog, one has to ask if Google really thinks that this half-assed attempt will challenge the absolute supremacy of the App Store in the marketplace. How much innovation, money, and good will are they leaving on the table? Keep in mind that there is no stevejobs@google.com. Google is notoriously bad when it comes to supporting and listening to their customers, because trust me, I&#8217;m not the only one complaining about this.</p>
<p>I want to believe in the future of Android and the prospect of developing for it, but like many other developers I don&#8217;t even have the option. If I wanted to develop in the emerging mobile market and perhaps make some money out of it, it&#8217;s the iPhone OS way or the highway.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingzen.com/2010/06/02/the-world-according-to-android/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Upgrading to Rails 3</title>
		<link>http://programmingzen.com/2010/05/25/upgrading-to-rails-3/</link>
		<comments>http://programmingzen.com/2010/05/25/upgrading-to-rails-3/#comments</comments>
		<pubDate>Tue, 25 May 2010 07:12:12 +0000</pubDate>
		<dc:creator>Antonio Cangiano</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Featured Article]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Screencasts]]></category>

		<guid isPermaLink="false">http://antoniocangiano.com/?p=1179</guid>
		<description><![CDATA[Rails 3 is a major upgrade; using it almost feels like working with an entirely new framework. Porting existing applications and acquiring the skills required to build new ones entails a significant amount of effort. You could scout the net for bits and pieces of information, but that would be time consuming and possibly frustrating. [...]]]></description>
			<content:encoded><![CDATA[<p>Rails 3 is a major upgrade; using it almost feels like working with an entirely new framework. Porting existing applications and acquiring the skills required to build new ones entails a significant amount of effort. You could scout the net for bits and pieces of information, but that would be time consuming and possibly frustrating. Thankfully there are resources available that have done the work for you, so you don&#8217;t have to waste time trying to figure out what&#8217;s new.</p>
<p>In this post, I&#8217;d like to point out a couple of resources that I think compliment each other well, and focus on how to upgrade applications, as opposed to simply providing you with a shopping list of features.</p>
<p>The first one is <a href="http://thinkcode.tv/catalog/upgrading-rails-3/">Upgrading applications to Rails 3</a>, a screencast that was just released by <a href="http://thinkcode.tv">ThinkCode.TV</a>. This screencast is almost an hour-long and shows you how to port a real world web application from Rails 2 to Rails 3. As such, it can be very useful if you have existing code that you&#8217;d like to port over to Rails 3. The author ported a few large applications to Rails 3, as he has solid experience with it. I&#8217;m biased of course, but I feel it&#8217;s well worth $8.99. (Today only, use the coupon <strong>RAILS3</strong> to purchase this Rails screencast for just $5.99.)</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="rails3.png" src="http://antoniocangiano.com/wp-content/uploads/2010/05/rails3.png" border="0" alt="rails3.png" width="550" height="323" /></p>
<p>The second resource is the <a href="http://www.railsupgradehandbook.com/">Rails 3 Upgrade Handbook</a> by&nbsp;Jeremy McAnally. It&#8217;s a beautiful PDF that succinctly explains what&#8217;s new in Rails 3, as well as how to upgrade your applications to the new edition of the framework. At 10c per page ($12 for 120 pages), it too is worth the money in my opinion.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="rails3uh.png" src="http://antoniocangiano.com/wp-content/uploads/2010/05/rails3uh.png" border="0" alt="rails3uh.png" width="400" height="355" /></p>
<p>Regardless of whether you end up buying these resources or not, I sure hope you have extensive test coverage for your existing Rails 2 applications. In my experience this is a must, because porting complex applications to Rails 3 without solid test support is a definite challenge. Nevertheless, I feel that this major upgrade is truly worth it. Rails 3 really brings Rails to a whole new level and we, as a community, should be proud and excited about what lies ahead of us.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingzen.com/2010/05/25/upgrading-to-rails-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web or iPhone OS applications to make money?</title>
		<link>http://programmingzen.com/2010/05/20/web-or-iphone-os-applications-to-make-money/</link>
		<comments>http://programmingzen.com/2010/05/20/web-or-iphone-os-applications-to-make-money/#comments</comments>
		<pubDate>Thu, 20 May 2010 08:32:57 +0000</pubDate>
		<dc:creator>Antonio Cangiano</dc:creator>
				<category><![CDATA[Featured Article]]></category>
		<category><![CDATA[Startup]]></category>
		<category><![CDATA[iPhone OS Development]]></category>

		<guid isPermaLink="false">http://antoniocangiano.com/?p=1174</guid>
		<description><![CDATA[If you are a developer who&#8217;s interested in starting a new business or even just earning extra cash on the side, you have a few options that can lead to scalable profits and passive income. The most popular choices these days are SaaS (Software as a Service) and iPhone/iPad development. Choosing web application or iPhone [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" src="http://antoniocangiano.com/wp-content/uploads/2010/05/iphone-apps.jpg" alt="iPhone apps image" /></p>
<p>If you are a developer who&#8217;s interested in starting a new business or even just earning extra cash on the side, you have a few options that can lead to scalable profits and passive income. The most popular choices these days are SaaS (Software as a Service) and iPhone/iPad development.</p>
<p>Choosing web application or iPhone OS development is a matter of personal taste, skills, goals, technical requirements, and so on. If we are looking at things solely from an economical perspective though, it&#8217;s interesting to consider for a moment which of the two is most likely to be profitable all things being equal.</p>
<p>In my opinion, despite the horror stories, it is far easier to make money with iPhone/iPad development than with charging for a service provided by a web application. The reason for this is very simple. Users don&#8217;t expect to pay for websites. They occasionally do for the useful ones, but it&#8217;s a relatively new approach and people are still adjusting to it.</p>
<p>Due to the hosted nature of SaaS offerings, they often require a monthly or yearly subscription as well, which is harder to sell than a single one time purchase. $9.99 here, $19.99 there, all adds up very quickly to an uncomfortable monthly bill.</p>
<p>iPhone and iPad applications on the other hand have a major advantage. Apple created an incredible ecosystem where millions of users are ready to pay for tiny applications that solve one small problem or are amusing enough to install. Low prices without the need for a subscription encourage impulse buyers to purchase applications without giving it a second thought.</p>
<p>You&#8217;ve probably been on the web for many years now, yet how many web applications do you pay for? However if you have an iPod Touch, an iPhone, or an iPad, how many applications have you bought? I own an iPod Touch and rarely use it, yet even I&#8217;ve paid for some applications.</p>
<p>It&#8217;s a matter of expectations and Apple did a marvelous job in that respect. When you buy an iPhone, you are almost expected to get cool apps for it. That, along with web access, is the whole point of having an advanced smart phone device. There are no such expectations for web applications.</p>
<p>Take a look at this <a href="http://techcrunch.com/2010/05/16/iphone-app-sales-exposed/">list of applications</a> and their sales. Most of them could be easily ported to the web, yet their limited scope and functionality wouldn&#8217;t even justify calling the resulting sites web applications. Few people would pay for them, even if one were to price them at $0.99. (And I&#8217;m not talking about apps for which being on a phone is the key feature). Conversely, porting a free Flash game from the web to the iPhone, for example, would almost certainly lead to sales.</p>
<p>Android is an option too, but I feel that Google has done a much poorer job at setting expectations. Furthermore their <a href="http://www.android.com/market/">marketplace</a> is a lackluster version of the App Store, users from several countries are unable to purchase applications or have to jump through hoops to do so, and developers from countries such as Canada, cannot publish and sell their apps on the Android Market.</p>
<p>The question is, will Google do a better job with the <a href="https://chrome.google.com/webstore">Chrome Web Store</a> that was announced yesterday at Google I/O? If so, it may become a good extra channel through which to sell web applications; an App Store for the web if you will. The distinction between web apps and offline mobile apps may even fade away at some point. That would be a great thing for developers. For the time being however, it is my opinion that developing for the iPhone OS is a safer bet in terms of achieving profitability.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingzen.com/2010/05/20/web-or-iphone-os-applications-to-make-money/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Benchmarking MacRuby 0.6</title>
		<link>http://programmingzen.com/2010/05/16/benchmarking-macruby-0-6/</link>
		<comments>http://programmingzen.com/2010/05/16/benchmarking-macruby-0-6/#comments</comments>
		<pubDate>Sun, 16 May 2010 07:53:35 +0000</pubDate>
		<dc:creator>Antonio Cangiano</dc:creator>
				<category><![CDATA[Featured Article]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby Benchmark Suite]]></category>

		<guid isPermaLink="false">http://antoniocangiano.com/?p=1168</guid>
		<description><![CDATA[Recently MacRuby 0.6 was released. The development team put a lot of emphasis on improving compatibility with Ruby 1.9, and the viability of MacRuby as a tool for developing Mac OS X applications. Focus on these aspects took precedence over performance, but I was still curious to see how well it performed when compared to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently MacRuby 0.6 was released. The development team put a lot of emphasis on improving compatibility with Ruby 1.9, and the viability of MacRuby as a tool for developing Mac OS X applications. Focus on these aspects took precedence over performance, but I was still curious to see how well it performed when compared to Ruby 1.8.7 and Ruby 1.9, respectively.</p>
<p>This article showcases the results of a small Ruby shootout for Mac. I plan to publish a Windows one by next week, and then a week or two after that, a complete Linux shootout that will have many more implementations. Grab <a href="http://feeds2.feedburner.com/ZenAndTheArtOfRubyProgramming">my feed</a> or <a href="http://eepurl.com/xDb7">join the newsletter</a> to avoid missing upcoming shootout posts.</p>
<p><strong>The setup</strong></p>
<p>The tests are a large subset of the <a href="http://github.com/acangiano/ruby-benchmark-suite">Ruby Benchmark Suite</a>. Each test was run 10 times, five to detect the best execution time, and five to detect the minimal memory consumption. All of the tests were run on Mac OS X 10.6.3, on my MacBook Pro 2.66 GHz Intel Core 2 Duo, 4 GB 1067 MHz DDR3 RAM, 320 GB 7200 rpm disk.</p>
<p>Stable implementations tested:</p>
<ul>
<li>MacRuby 0.6</li>
<li>Ruby 1.8.7</li>
<li>Ruby 1.9.1</li>
</ul>
<p><strong>Disclaimer</strong></p>
<p>Synthetic benchmarks cannot predict how fast your programs will be with one implementation or another. They provide an (entertaining) educated guess, but <strong>you shouldn&#8217;t draw overly definitive conclusions from them</strong>. Furthermore, the Ruby Benchmark Suite has many tests that don&#8217;t provide much insight when it comes to comparing implementations. They are there for legacy reasons and will probably be removed in the future. For the time being, <strong>take them with a grain of salt</strong>.</p>
<p><strong>The results</strong></p>
<p>Without further hesitation, here are the execution times for the tests (divided in A-L, M-Z). Timeouts indicate that the execution of a single run took more than 60 seconds and had to be interrupted. Bold values indicate the best performance for each test.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://antoniocangiano.com/wp-content/uploads/2010/05/timeal1.png" alt="Time table A-L" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://antoniocangiano.com/wp-content/uploads/2010/05/timemz.png" alt="Time table M-Z" /></p>
<p>And here is the estimated memory usage:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://antoniocangiano.com/wp-content/uploads/2010/05/spaceal.png" alt="Memory table A-L" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://antoniocangiano.com/wp-content/uploads/2010/05/spacemz.png" alt="Memory table M-Z" /></p>
<p><strong>Conclusions</strong></p>
<p>MacRuby 0.6 is faster than Ruby 1.9.1 at times, but it can also be significantly slower. Overall, as things stand now, its performance appears to be between that of Ruby 1.9.1 and Ruby 1.8.7, with several outliers and a greater variance compared to those two implementations. Memory wise, MacRuby appears to be significantly more &#8220;memory hungry&#8221; than the other implementations (even though this wasn&#8217;t all that much of a surprise to me).</p>
<p>I&#8217;m interested in seeing how future releases that will be focused more on performance will affect these preliminary results. For the time being however, don&#8217;t let this outcome discourage you from using MacRuby 0.6, which is the first release that&#8217;s considered stable for Mac OS X development.</p>
<p>Download: <a href="http://antoniocangiano.com/wp-content/uploads/2010/05/time-memory.zip">CSV Files</a></p>
<p>PS: If you are looking for a fun and easy way to get started with MacRuby, check out <a href="http://thinkcode.tv/catalog/introduction-macruby/">ThinkCode.TV&#8217;s screencast</a> on the subject.</p>
<p><strong>Update (July 3, 2010)</strong>: The following box plot compares the various implementations for the tests for which all the implementations were successful. Only times for the largest successful input number were used in those tests where multiple input numbers were tested.</p>
<p align="center"><img src="http://programmingzen.com/wp-content/uploads/2010/05/mac_shootout.png" alt="Mac Shootout Boxplot" /></p>
]]></content:encoded>
			<wfw:commentRss>http://programmingzen.com/2010/05/16/benchmarking-macruby-0-6/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>The most important programming language today</title>
		<link>http://programmingzen.com/2010/05/14/the-most-important-programming-language-today/</link>
		<comments>http://programmingzen.com/2010/05/14/the-most-important-programming-language-today/#comments</comments>
		<pubDate>Fri, 14 May 2010 07:48:57 +0000</pubDate>
		<dc:creator>Antonio Cangiano</dc:creator>
				<category><![CDATA[Featured Article]]></category>
		<category><![CDATA[Industry News]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://antoniocangiano.com/?p=1164</guid>
		<description><![CDATA[&#8220;What programming language should I study next? What framework?&#8221; I occasionally receive emails from younger — and not so young — readers alike asking me for guidance about such matters. &#8220;Use the right tool for the job&#8221; is the correct answer, but it&#8217;s cheap advice when there are a plethora of tools seemingly right for [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;What programming language should I study next? What framework?&#8221; I occasionally receive emails from younger — and not so young — readers alike asking me for guidance about such matters. &#8220;Use the right tool for the job&#8221; is the correct answer, but it&#8217;s cheap advice when there are a plethora of tools seemingly right for the job. For most people these days the job at hand is of course web application development.</p>
<p>Should they study Ruby and Ruby on Rails? Or Python and Django? How about C# 4.0 and ASP.NET MVC? Maybe CakePHP? Java and Stripes? And how about more exotic choices like Clojure and Compojure or Scala and Lift?</p>
<p>With very few exceptions, in 2010, it&#8217;s hard to choose a combination of semi-popular technologies that couldn&#8217;t do the job. Does it really make a huge difference if you choose to study Ruby on Rails or Django? In all honesty, despite all the existing differences, it doesn&#8217;t really matter. As long as you become proficient with one of these tools, you will be adequately equipped to approach most web development tasks. Your experience as a server-side developer will be the bottleneck, not your framework of choice.</p>
<p>The real reason why I get asked these questions though, is that these people are mostly looking for a silver bullet, a language-framework combo that will magically allow them to create fantastic web applications in a matter of weeks. They are often after a shortcut, but there is no royal path to web programming.</p>
<p>When I think about the future of programming languages, I envision Babel not people talking Esperanto. We are destined to live in a technological world were there will be many valid server-side options, which are similar yet different enough to justify their own existence and that of their respective communities.</p>
<p>There won&#8217;t be a programming language to rule them all, but I believe one language will continue to be the lingua franca of the web. In that sense, it&#8217;s the most important programming language today and I think its relevance will only continue to grow in the future. I&#8217;m talking of course about JavaScript.</p>
<p>Today JavaScript is king when it comes to client-side web programming. It took us a while to reach this point. In the collective mind, JavaScript was considered a poor language used by amateurs to create annoying web pages. Today (thanks to AJAX amongst others factors) it&#8217;s a language that&#8217;s appreciated by many professionals and used by the vast majority of web developers. Whether you program web applications in Ruby, Python, Perl, PHP, C#, or something else, you&#8217;ll deal with JavaScript (it&#8217;s the greatest common denominator of the web development community). I know of very few professional web developers who lack a cursory knowledge of the language (or its cousin, ActionScript).</p>
<p>Over the past few years the browser has become the single most important application on users&#8217; computers. This in turn, sealed JavaScript&#8217;s fate for the foreseeable future. Despite <a href="http://antoniocangiano.com/recommends/?0596517742">its many flaws</a>, JavaScript is a powerful and elegant language that has advanced features which are blatantly missing from &#8220;full blown&#8221; languages like Java. Programmers have come to realize its power and usefulness within the browser. Beautiful JavaScript frameworks like jQuery, YUI, and more recently SproutCore and Cappuccino (Objective-J), showcased the art of what it&#8217;s possible to accomplish with this language. And with HTML5 becoming closer to reality, there will be an ever greater emphasis on DOM scripting and less reliance, when feasible, on RIA plugins.</p>
<p>If generally speaking, JavaScript is a solid and powerful language that most web developers need to know anyway, why can&#8217;t we develop in JavaScript server-side as well? And while we&#8217;re at it, maybe use it for desktop applications too? It would seem rational to capitalize on the benefits of having a huge percentage of programmers use the same language for both client and server-side programming. (If an update to the language is required to clean it up a little, let&#8217;s do that.) Why shouldn&#8217;t we be able to run <code>js myscript.js</code>, outside of a browser, and obtain the result of the computation in output? There is no inherent reason why JavaScript needs to be tied to the browser.</p>
<p>Thankfully times are changing and concrete answers to those rhetorical questions are emerging. The <a href="http://code.google.com/p/v8/">V8 JavaScript Engine</a> is a project that was started by Google which provides us with a standalone shell to execute scripts and try out code in a basic REPL (Read-eval-print-loop). It&#8217;s the same engine embedded into Google Chrome, and as such, it&#8217;s a fast implementation as well.</p>
<p><a href="http://nodejs.org/"><img style="float: right;" title="nodejs.gif" src="http://antoniocangiano.com/wp-content/uploads/2010/05/nodejs.gif" border="0" alt="nodejs.gif" width="250" height="76" /></a>Another great effort that&#8217;s headed in the same direction, and builds on top of V8 is <a href="http://nodejs.org/">Node.js</a>, an evented I/O framework. You can think of it as Tornado, Twisted or EventMachine, simplified for server-side JavaScript. Node doesn&#8217;t require as much knowledge about event loops and non-blocking I/O, and the look and feel of such callbacks is very reminiscent of the type of AJAX code we&#8217;ve all seen before. Node can easily be used as a basic, ultra fast web server, to which one can delegate I/O callbacks for scalability and efficiency.</p>
<p>Recently Heroku announced beta support for Node<sup>1</sup>. It&#8217;s a risk on their part, but one worth taking in my opinion. If nothing else, at the very least, Rails developers deploying on Heroku will have the option to integrate Node to increase scalability and performance.</p>
<p>But Node (which embeds the V8 engine) has a lot more potential than just that. The ultimate goal is to become a self-contained solution which would allow one to develop and deploy server-side JavaScript code in production mode.</p>
<p>Node is just a prominent example of the impact of the <a href="http://commonjs.org/">CommonJS</a> project/movement, which is aimed at making JavaScript available outside of the browser (on severs and desktops). There is in fact an ecosystem of new .js libraries that are meant to be used with server-side JavaScript (this is likely to grow over time).</p>
<p>What we really need is a lightweight web framework that well integrates server and client-side JavaScript. This would have game changing potential (think Rails back in 2004). Developers have grown accustomed to a high level of abstraction when it comes to web development though, so there are a couple of possibilities here: either Node will become that framework or someone will create such a framework (perhaps on top of Node). Whoever does that will hold a piece of future and a golden ticket in their hands.</p>
<p>[1] For a terrific demo of a Cappuccino + Node application deployed on Heroku, check out <a href="http://githubissues.heroku.com/">GitHub Issues</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://programmingzen.com/2010/05/14/the-most-important-programming-language-today/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>On the iPhone, iPad and Android Market Share</title>
		<link>http://programmingzen.com/2010/04/28/on-the-iphone-ipad-and-android-market-share/</link>
		<comments>http://programmingzen.com/2010/04/28/on-the-iphone-ipad-and-android-market-share/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 05:26:14 +0000</pubDate>
		<dc:creator>Antonio Cangiano</dc:creator>
				<category><![CDATA[Featured Article]]></category>
		<category><![CDATA[Industry News]]></category>

		<guid isPermaLink="false">http://antoniocangiano.com/?p=1147</guid>
		<description><![CDATA[There has been quite a bit of discussion over the market share of mobile devices today (arguably, for the past few years). It all started with a link on TechCrunch, claiming that Android overtook the iPhone in terms of US traffic (according to AdMob). This being a clear case of selection bias, I set about [...]]]></description>
			<content:encoded><![CDATA[<p>There has been quite a bit of discussion over the market share of mobile devices today (arguably, for the past few years). It all started with <a href="http://techcrunch.com/2010/04/27/admob-android-passes-iphone-web-traffic-in-u-s/">a link on TechCrunch</a>, claiming that Android overtook the iPhone in terms of US traffic (according to AdMob). This being a clear case of <a href="http://en.wikipedia.org/wiki/Selection_bias">selection bias</a>, I set about to figure out the mobile devices used by the visitors of some of my sites during the past month.</p>
<p>As these figures will obviously depend on the type of audience that a site attracts, I put the following three sites on the table as samples (the first two are mine, the last one is my wife&#8217;s). All three  sites have a predominantly North American audience, but they  aren&#8217;t lacking for international readers either. This is not meant to be a scientific survey, just a quick way to gather some empirical data and satisfy my (and perhaps your) curiosity. It&#8217;s also important to understand that the &#8220;market share&#8221; here is not actually the market share of all mobile devices sold, but rather limited to those normally used for web browsing.</p>
<p>Let&#8217;s start with the data for <a href="http://antoniocangiano.com">this site</a> which obviously has a very technical audience:</p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-1149" title="highly-technical" src="http://antoniocangiano.com/wp-content/uploads/2010/04/highly-technical1.png" alt="" width="630" height="305" /></p>
<p style="text-align: left;">Next are the results for <a href="http://math-blog.com">Math Blog</a>, with has a geeky, but less technical audience.</p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-1152" title="somewhat-technical" src="http://antoniocangiano.com/wp-content/uploads/2010/04/somewhat-technical1.png" alt="" width="602" height="327" /></p>
<p style="text-align: left;">Finally, <a href="http://chronicallyvintage.com">my wife&#8217;s blog</a> which is devoted to all things vintage. Her audience is generally non-technical and prominently comprised of female visitors.</p>
<p style="text-align: left;">
<p style="text-align: left;"><img class="aligncenter size-full wp-image-1153" title="non-technical" src="http://antoniocangiano.com/wp-content/uploads/2010/04/non-technical1.png" alt="" width="595" height="277" /></p>
<p style="text-align: left;">A few thoughts on this data:</p>
<ul>
<li>No matter how we look at it, the iPhone is still much more popular than Android, particularly among technical people. If we consider all the devices running iPhone OS, the outlook is even less encouraging for Android OS.</li>
<li>These numbers suggest that Android probably has a 10 to 20% &#8220;web usage share&#8221; amongst mobile devices.</li>
<li>In one month, the iPad managed to grab a 5 to 10% slice of the mobile pie. Assuming we are OK with grouping it together with smart phones and PDAs, I suspect its share will become much larger in the coming months.</li>
</ul>
<p>Android offers you a great degree of freedom, compared to the iPhone OS due to Apple&#8217;s draconian policies. But the market share for Android still seems to be somewhat small (at least according to the, admittedly limited, figures above). This may change in the future, if and when the number of popular devices that run Android continues to grow (which would include alternatives to the iPad).</p>
<p>With Android still having a long way to go before it catches up with the iPhone OS, which of the two would you develop for, assuming you could only pick one?</p>
<p><img class="aligncenter size-full wp-image-1154" title="iphone-android-sdk" src="http://antoniocangiano.com/wp-content/uploads/2010/04/iphone-android-sdk.png" alt="" width="594" height="301" /></p>
]]></content:encoded>
			<wfw:commentRss>http://programmingzen.com/2010/04/28/on-the-iphone-ipad-and-android-market-share/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
