<?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>Nicolas Cadou's Blog</title>
	<atom:link href="http://nicolascadou.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicolascadou.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 12 May 2011 01:27:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Continuous integration on a zc.buildout-managed project with pyzmq</title>
		<link>http://nicolascadou.com/blog/2011/05/continuous-integration-on-a-zc-buildout-managed-project-with-pyzmq/</link>
		<comments>http://nicolascadou.com/blog/2011/05/continuous-integration-on-a-zc-buildout-managed-project-with-pyzmq/#comments</comments>
		<pubDate>Thu, 12 May 2011 01:27:21 +0000</pubDate>
		<dc:creator>ncadou</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[pyzmq]]></category>
		<category><![CDATA[zeromq]]></category>

		<guid isPermaLink="false">http://nicolascadou.com/blog/?p=226</guid>
		<description><![CDATA[Sometimes things are simple So we&#8217;ve got that awesome Hudson server, checking out our projects at each commit, running all the tests and reporting on the outcome. That way we always know when something broke, what, and which committer just fell out of his Ballmer peak. On that server we install as little stuff as [...]]]></description>
			<content:encoded><![CDATA[<h3>Sometimes things are simple</h3>
<p>So we&#8217;ve got that awesome <a title="Hudson Continuous Integration" href="http://hudson-ci.org/" target="_blank">Hudson</a> server, checking out our projects at each commit, running all the tests and reporting on the outcome. That way we always know when something broke, what, and which committer just fell out of his <a title="xkcd: Ballmer Peak" href="http://xkcd.com/323/" target="_blank">Ballmer peak</a>.</p>
<p>On that server we install as little stuff as possible and any non-Python dependency required for compiling python packages at install time is handled by buildout. That way we can keep our Hudson environment as clean as possible, preventing version conflicts and cruft accumulation.</p>
<p>For instance, the buildout for a project depending on GeoIP-Python contains the following snippet. It downloads and compiles GeoIP in a directory private to the project, then uses it when installing GeoIP-Python:</p>
<pre>[geoip-python]
recipe = zc.recipe.egg:custom
eggs = GeoIP-Python
include-dirs = parts/geoip/include
library-dirs = parts/geoip/lib

[geoip]
recipe = zc.recipe.cmmi
url = http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.6.tar.gz</pre>
<h3>Sometimes not</h3>
<p>Enter <a title="Less is More - zeromq" href="http://www.zeromq.org/" target="_blank">pyzmq</a>.</p>
<p>You would think that the following would work, but it doesn&#8217;t:</p>
<pre>[pyzmq]
recipe = zc.recipe.egg:custom
egg = pyzmq
include-dirs = parts/zeromq/include
library-dirs = parts/zeromq/lib

[zeromq]
recipe = zc.recipe.cmmi
url = http://download.zeromq.org/zeromq-2.1.6.tar.gz</pre>
<h3>The solution</h3>
<p>The pyzmq build scripts do things differently, and they override the provided directories for various reasons. This is kind of annoying, but I can live with it, as we can get the desired result by settings a few environment variables:</p>
<pre>[pyzmq-env]
ZMQ_DIR = ${buildout:parts-directory}/zeromq
LIBRARY_PATH = ${buildout:parts-directory}/zeromq/lib
LD_LIBRARY_PATH = ${buildout:parts-directory}/zeromq/lib

[pyzmq]
recipe = zc.recipe.egg:custom
egg = pyzmq
environment = pyzmq-env

[zeromq]
recipe = zc.recipe.cmmi
url = http://download.zeromq.org/zeromq-2.1.6.tar.gz</pre>
<h3>The catch</h3>
<p>Beware that in either case, the declaration of buildout:parts needs to have the above parts at the beginning. Order matters here, as it obviously does no good to install pyzmq (which could very well happen when buildout runs setup.py develop on the project) before zeromq is compiled.</p>
<p>This is mainly annoying because the project has a hudson-specific buildout file that contains these compiling parts, as developers use another buildout so they can use their local system libraries and not have to compile everything. This means that the bulk of buildout:parts has to be duplicated in both files as the += operator would otherwise add the additional parts at the end, thus breaking the build.</p>
<p>I&#8217;ve not yet found a way to insert parts at the beginning.</p>
<p>That&#8217;s it, happy testing!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnicolascadou.com%2Fblog%2F2011%2F05%2Fcontinuous-integration-on-a-zc-buildout-managed-project-with-pyzmq%2F&amp;title=Continuous%20integration%20on%20a%20zc.buildout-managed%20project%20with%20pyzmq" id="wpa2a_2"><img src="http://nicolascadou.com/blog/wp-content/plugins/add-to-any/share_save_120_16.gif" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://nicolascadou.com/blog/2011/05/continuous-integration-on-a-zc-buildout-managed-project-with-pyzmq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django localeurl and reverse()</title>
		<link>http://nicolascadou.com/blog/2011/01/django-localeurl-and-reverse/</link>
		<comments>http://nicolascadou.com/blog/2011/01/django-localeurl-and-reverse/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 19:15:13 +0000</pubDate>
		<dc:creator>ncadou</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[broken]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[locale]]></category>
		<category><![CDATA[localeurl]]></category>
		<category><![CDATA[reverse]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://nicolascadou.com/blog/?p=220</guid>
		<description><![CDATA[If you use django-localeurl, you might run into the issue that on some machines, django.core.urlresolvers.reverse() works just fine and returns a URL with the locale prepended, while on other machines, it does not. The reason is that, when localeurl is installed, it monkey-patches django.core.urlresolvers.reverse to change its behavior and have it prepend a locale to whatever [...]]]></description>
			<content:encoded><![CDATA[<p>If you use <a title="Django-localeurl on Google Project Hosting" href="http://code.google.com/p/django-localeurl/" target="_blank">django-localeurl</a>, you might run into the issue that on some machines, django.core.urlresolvers.reverse() works just fine and returns a URL with the locale prepended, while on other machines, it does not.</p>
<p>The reason is that, when localeurl is installed, it monkey-patches django.core.urlresolvers.reverse to change its behavior and have it prepend a locale to whatever URL is to be returned. And what happens is that the load order of the different files Django needs can change from one machine to another, thus makes the monkey-patching occur at a different timing, and you end up importing on some occasions the unpatched version of reverse().</p>
<p>The real solution, according to the localeurl author themselves, would be to devise a solution for localeurl which doesn&#8217;t involve monkey-patching at all.</p>
<p>Until this is done, here&#8217;s a work-around that works, even if a bit ugly. Instead of:</p>
<pre style="padding-left: 30px;">from django.core.urlresolvers import reverse
...
reverse('xyz')</pre>
<p>Try this, ﻿you&#8217;ll make sure you always get the patched version:</p>
<pre style="padding-left: 30px;">from django.core import urlresolvers
...
<pre>urlresolvers.reverse('xyz')</pre>
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnicolascadou.com%2Fblog%2F2011%2F01%2Fdjango-localeurl-and-reverse%2F&amp;title=Django%20localeurl%20and%20reverse%28%29" id="wpa2a_4"><img src="http://nicolascadou.com/blog/wp-content/plugins/add-to-any/share_save_120_16.gif" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://nicolascadou.com/blog/2011/01/django-localeurl-and-reverse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajah web site is live</title>
		<link>http://nicolascadou.com/blog/2010/09/ajah-web-site-is-live/</link>
		<comments>http://nicolascadou.com/blog/2010/09/ajah-web-site-is-live/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 03:54:06 +0000</pubDate>
		<dc:creator>ncadou</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[ajah]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://nicolascadou.com/blog/?p=214</guid>
		<description><![CDATA[Tonight at Ajah we reached our first public milestone. Our web site is live! Woohoo!! We will hold a private beta very soon now, so a good web site with a proper landing page was in order. So that&#8217;s it. Shortest post ever. Off to the beer now]]></description>
			<content:encoded><![CDATA[<p>Tonight at Ajah we reached our first public milestone. Our <a title="Ajah - Smarter Fundraising" href="http://ajah.ca/" target="_blank">web site</a> is live!</p>
<p>Woohoo!! <img src='http://nicolascadou.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>We will hold a private beta very soon now, so a good web site with a proper landing page was in order.</p>
<p>So that&#8217;s it. Shortest post ever. Off to the beer now <img src='http://nicolascadou.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnicolascadou.com%2Fblog%2F2010%2F09%2Fajah-web-site-is-live%2F&amp;title=Ajah%20web%20site%20is%20live" id="wpa2a_6"><img src="http://nicolascadou.com/blog/wp-content/plugins/add-to-any/share_save_120_16.gif" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://nicolascadou.com/blog/2010/09/ajah-web-site-is-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next Montreal article on Ajah</title>
		<link>http://nicolascadou.com/blog/2010/08/next-montreal-article-on-ajah/</link>
		<comments>http://nicolascadou.com/blog/2010/08/next-montreal-article-on-ajah/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 12:57:16 +0000</pubDate>
		<dc:creator>ncadou</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ajah]]></category>
		<category><![CDATA[next montreal]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://nicolascadou.com/blog/?p=211</guid>
		<description><![CDATA[Our startup Ajah just got featured on Next Montreal. This is so cool! What&#8217;s more, it is a nicely written article which makes a pretty good job explaining what we&#8217;re up to, and how the day-to-day life is like in our office. Which by the way really is pretty awesome. You can check it out [...]]]></description>
			<content:encoded><![CDATA[<p>Our startup <a title="Smarter Fundraising for Canadian Non-Profits" href="http://ajah.ca/">Ajah</a> just got featured on <a title="Ajah is Opening Up Data for Non-Profits" href="http://nextmontreal.com/ajah-opening-up-data-for-non-profits/">Next Montreal</a>.</p>
<p>This is so cool!</p>
<p>What&#8217;s more, it is a nicely written article which makes a pretty good job explaining what we&#8217;re up to, and how the day-to-day life is like in our office. Which by the way really is pretty awesome.</p>
<p>You can check it out <a title="Ajah is Opening Up Data for Non-Profits" href="http://nextmontreal.com/ajah-opening-up-data-for-non-profits/">here</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnicolascadou.com%2Fblog%2F2010%2F08%2Fnext-montreal-article-on-ajah%2F&amp;title=Next%20Montreal%20article%20on%20Ajah" id="wpa2a_8"><img src="http://nicolascadou.com/blog/wp-content/plugins/add-to-any/share_save_120_16.gif" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://nicolascadou.com/blog/2010/08/next-montreal-article-on-ajah/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opendata in Montreal</title>
		<link>http://nicolascadou.com/blog/2010/08/opendata-in-montreal/</link>
		<comments>http://nicolascadou.com/blog/2010/08/opendata-in-montreal/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 02:40:20 +0000</pubDate>
		<dc:creator>ncadou</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[city]]></category>
		<category><![CDATA[democracy]]></category>
		<category><![CDATA[montreal]]></category>
		<category><![CDATA[open data]]></category>

		<guid isPermaLink="false">http://nicolascadou.com/blog/?p=202</guid>
		<description><![CDATA[Just came out of the first Montreal Ouvert open meeting. I was pleasantly surprised to see so many interested people showing up, and from so many different backgrounds. Developers, entrepreneurs, municipal employees, students, journalists, and more that I forgot about of course. In the end they were all just citizens, enthusiastic about the possibilities of [...]]]></description>
			<content:encoded><![CDATA[<p>Just came out of the first <a href="http://montrealouvert.net/">Montreal Ouvert</a> open meeting.</p>
<p>I was pleasantly surprised to see so many interested people showing up, and from so many different backgrounds. Developers, entrepreneurs, municipal employees, students, journalists, and more that I forgot about of course.</p>
<p>In the end they were all just citizens, enthusiastic about the possibilities of open data, ready to put in some grey matter and some work to help make it a reality. For some the work began some time ago, as much as a few years back.</p>
<p>And the possibilities ﻿of open data are many: availability of fresh, constantly updated data leads to increased government transparency, increasing its accountability and usefulness. It also means more tools for the population to get involved in the process and take informed action, making democracy work better.</p>
<p>Having data available in open, documented formats will tremendously benefit the city itself, as its own employees often struggle to obtain data from silo-ed, undocumented and not always fresh data.</p>
<p>And open data by the way is not only about having the government publish the data it has, it&#8217;s also about the free flow of data in general, as much as practically/legally possible, in both directions. Quality data exists out there which could complement what the government is producing, potentially making it more aware of what&#8217;s happening, sooner, making it again more responsive and relevant.</p>
<p>And last but not least, the economic consequences are real and tangible. Head over to <a href="http://montrealouvert.net/">Montreal  Ouvert&#8217;s blog</a> and you&#8217;ll find multiple reports of other cities that are going through the process and reaping the benefits. The numbers are just staggering, both in the form of savings and local business generated.</p>
<p>So this first meeting brought all these different people together, and provided a space for a discussion to happen. All kinds of ideas where exchanged on how to make it happen, information about what has worked for other cities, about the realities and limitations of those and in the end, what would be the best things to do to make it work in the interest of all parties.</p>
<p>All in all, very exciting!</p>
<p>Montreal Ouvert as a collective is already pretty focused, and I&#8217;m sure there was enough material tonight to help it gather even more steam. At the very least, tonight&#8217;s meeting will have served to rally all sorts of isolated efforts, thus increasing greatly the potential power to make change happen, in the interest of everyone.</p>
<p>So, make sure you follow their <a href="http://montrealouvert.net/">blog</a>, and contribute your ideas and comments wherever you can.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnicolascadou.com%2Fblog%2F2010%2F08%2Fopendata-in-montreal%2F&amp;title=Opendata%20in%20Montreal" id="wpa2a_10"><img src="http://nicolascadou.com/blog/wp-content/plugins/add-to-any/share_save_120_16.gif" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://nicolascadou.com/blog/2010/08/opendata-in-montreal/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>On taking action</title>
		<link>http://nicolascadou.com/blog/2010/03/on-taking-action/</link>
		<comments>http://nicolascadou.com/blog/2010/03/on-taking-action/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 14:51:08 +0000</pubDate>
		<dc:creator>ncadou</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[ajah]]></category>
		<category><![CDATA[Career]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[responsibility]]></category>

		<guid isPermaLink="false">http://nicolascadou.com/blog/?p=179</guid>
		<description><![CDATA[So what happened in all that time since my last substantial blog post?

No, I wasn't busy counting red cars passing on the street, or marveling at the cat's anatomy as my kids do.

After mulling over the possibility for a while, I finally decided to quit my job and go solo, and that turned out to be one of the greatest, most satisfying choices I have ever made!

But it wasn't an easy one.]]></description>
			<content:encoded><![CDATA[<p>So what happened in all that time since my last substantial blog post?</p>
<p>No, I wasn&#8217;t busy counting red cars passing on the street, or marveling at the cat&#8217;s anatomy as my kids do.</p>
<p>After <a title="On taking responsibility" href="/blog/2009/06/taking-responsibility/">mulling over the possibility</a> for a while, I finally decided to quit my job and go solo, and that turned out to be one of the greatest, most satisfying choices I have ever made!</p>
<p>But it wasn&#8217;t an easy one.<span id="more-179"></span></p>
<h2>Peering over the precipice</h2>
<p>My first idea was to get a good contract in Montreal, then quit my job and move my family away from my small village. Seemed like a good plan. I have a wife and three children, gotta get both my feet firmly planted on the ground before attempting anything funny right?</p>
<p>I tried hard.</p>
<p>I worked really hard to get my resume in shape, spent a lot of time online skimming over job boards and freelance sites, went through the application process on a number of them, and although it looked close enough most of the time, it just wasn&#8217;t happening.</p>
<p>And I learned a lot in the process.</p>
<p>Trying to secure these opportunities had me meet recruiters, which happened to be an invaluable help to get my resume in shape. I would always get advice from each of them, which in turn led me to ask myself numerous questions about who I am, and what I want to accomplish in life, and how to formulate that in a resume.</p>
<p>During that time I opened an account on <a title="Meetup.com" href="http://www.meetup.com/">meetup.com</a> and went to every networking and/or tech event I could find. I also took care of a lot of details at my job, making sure they were not left out in the cold after I leave.</p>
<p>Well, they were kind of left out in the cold anyway, when I left later, because I was the only one possessing the knowledge and expertise in some areas at this company, but I still did my best to mitigate the loss.</p>
<h2>Leaping into the void</h2>
<p>I still had no contract, no net to catch me down that precipice but at some point I got a strong sense it was pointless to continue the waiting game. And I think that&#8217;s the gist of it. No more waiting after promises of advancement, or after anybody or anything for that matter. My turn!</p>
<p>Followed a pretty intense period of apartment seeking, with frequent 2-hour round trips to Montreal with the wife and kids. We did not settle for the cheapest by the way. The Plateau Mont-Royal is a nice place to live, but while it is not outrageously expensive, you still have to pay for the privilege.</p>
<p>Turned out to be a pretty good choice, as we now save a lot of time and energy because everything we need is at a small walk&#8217;s distance.</p>
<p>Looking back, I can&#8217;t do anything but marvel at the fact that as soon as I had made my mind, and started to get into action, things began to happen.</p>
<p>It probably is just a coincidence, but it definitely has that magical glow to my eyes.</p>
<p>It all began on that Monday morning a bit more than 6 months ago &#8211; I had gathered all my courage to knock on the boss&#8217; door. But he had no time now. So I went back to my office. I was probably looking completely helpless (which I absolutely was,) because of the stress I was going through.</p>
<p>I think I bit my nails through to my elbows while I was going through that excruciating wait.</p>
<p>Can you tell I&#8217;m not used to doing this kind of things? Oh boy&#8230; It&#8217;s not every day that I get to quit my job, with nothing in sight professionally-wise, and with a whole family to support. And for some reason that thought just made the stress a whole lot worse.</p>
<p>After a while I couldn&#8217;t wait any more, so I tried again, heart beat rate going crazy again while asking if he&#8217;s got time now, and no, he still didn&#8217;t have the time!!!</p>
<p>If I didn&#8217;t knew better I&#8217;d have thought he knew what I was up to and just wanted to kill me with the stress!!!</p>
<p>So anyways, it went on and on like this, but each time my stress was decreasing, so it ended up being a good thing, as that helped me strengthen my will and courage and feel a bit more relaxed about the whole affair.</p>
<p>Eventually I made my way into his office to accomplish my deed.</p>
<h2>Then the magic happened</h2>
<p>My boss was kind of disappointed that I quit.</p>
<p>I had been working there for the past 10 years, we were beginning to be somewhat friends, and yes, I was going away with a substantial chuck of knowledge with me. And what happened is that, before I had left his office, he asked if I would consider working with them as my client.</p>
<p>What? Are you kidding me? You mean I&#8217;m not going to burn in flames in retribution to having my family starve to death? Of course I would consider it!</p>
<p>Well in fact, at this point, I already had peacefully accepted that I would have nothing before me, so this proposal came as a really pleasant surprise.</p>
<p>And so as soon as I quit, I got my first contract! Talk about opportunity.</p>
<h2>But wait. There&#8217;s more.</h2>
<p>In between round-trips to Montreal to visit apartments, meet recruiters and participate to tech events, I stumbled upon a job posting on the techentreprise.com web site.</p>
<p>Well, not really a job posting, more like a looking-for-a-startup-technical-cofounder ad.</p>
<p>I contacted the guys and soon enough we all found out we were a pretty good fit together. So a short while after I gave my notice to my boss, I ended up associating with three amazing partners in a brand-spankin-new web startup, with which I have been working closely for the last six months. We&#8217;re getting ready to launch soon. It&#8217;s called the Digital Brewers and you can find some news about our product over at <a title="Ajah's Blog" href="http://ajah.ca/blog/">Ajah&#8217;s blog</a>.</p>
<p>What&#8217;s especially nice is that after having been a PHP programmer for the past 10 years, I wanted to make the jump to Python programming, and wonders of wonders, this project is entirely done in Python, with <a title="Pylons" href="http://pylonshq.com/">Pylons</a>/<a title="TurboGears" href="http://turbogears.org/">TurboGears</a>/<a title="SQLAlchemy" href="http://www.sqlalchemy.org/">SQLAlchemy</a>/<a title="Mako" href="http://www.makotemplates.org/">Mako</a>, and one of my partners is the lead organizer at <a title="Montreal-Python" href="http://www.montrealpython.org/">Montreal-Python</a>.</p>
<p>So I&#8217;m having the job of my dreams, in a co-founder capacity, working with top-notch professionals. I have a freakin&#8217; great Python mentor, we work in our new office which is less than a ten-minute walk from my home, all the while doing contracts for a customer with whom it&#8217;s pretty easy working with.</p>
<p>Now. Seriously. How awesome is that?!!</p>
<p>Man, I have to pinch myself sometimes, just to be sure I&#8217;m not dreaming.</p>
<p>And, as great as all this is, there has been way more than this. I truly have been blessed beyond all my expectations. But this post is way too long already, so I&#8217;ll just shut up now.</p>
<p>See you next time, and in the mean time I&#8217;ll enjoy that delicious home-brewed beer that I get to drink nearly everyday.</p>
<p>Oh yeah, that&#8217;s one of the other nice things I didn&#8217;t talk about, we&#8217;re not called the Digital Brewers for nothing.</p>
<p> <img src='http://nicolascadou.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nicolascadou.com/blog/2010/03/on-taking-action/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery.getJSON() callback not firing with IE</title>
		<link>http://nicolascadou.com/blog/2009/10/jquery-getjson-callback-not-firing-with-ie/</link>
		<comments>http://nicolascadou.com/blog/2009/10/jquery-getjson-callback-not-firing-with-ie/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 23:35:27 +0000</pubDate>
		<dc:creator>ncadou</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://nicolascadou.com/blog/?p=175</guid>
		<description><![CDATA[Just a reminder to myself, so I won&#8217;t waste as much time if it happens again. When a jQuery.getJSON() callback is called by Firefox but not by Internet Explorer, check if the JSON data returned really is squeaky-clean. An extra comma at the end of an object declaration was doing okay with the more forgiving [...]]]></description>
			<content:encoded><![CDATA[<p>Just a reminder to myself, so I won&#8217;t waste as much time if it happens again.</p>
<p>When a jQuery.getJSON() callback is called by Firefox but not by Internet Explorer, check if the JSON data returned really is squeaky-clean.</p>
<p>An extra comma at the end of an object declaration was doing okay with the more forgiving Firefox JSON parser, but tripped IE&#8217;s, with no error message, and no callback ever called.</p>
<p>I found the error by using jQuery.load() instead and eval()-ing the AJAX responseText in the callback, which threw a JavaScript error this time.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnicolascadou.com%2Fblog%2F2009%2F10%2Fjquery-getjson-callback-not-firing-with-ie%2F&amp;title=jQuery.getJSON%28%29%20callback%20not%20firing%20with%20IE" id="wpa2a_12"><img src="http://nicolascadou.com/blog/wp-content/plugins/add-to-any/share_save_120_16.gif" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://nicolascadou.com/blog/2009/10/jquery-getjson-callback-not-firing-with-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On taking responsibility</title>
		<link>http://nicolascadou.com/blog/2009/06/taking-responsibility/</link>
		<comments>http://nicolascadou.com/blog/2009/06/taking-responsibility/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 22:15:42 +0000</pubDate>
		<dc:creator>ncadou</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Career]]></category>
		<category><![CDATA[responsibility]]></category>

		<guid isPermaLink="false">http://nicolascadou.com/blog/?p=108</guid>
		<description><![CDATA[And so I was asking myself today, after realizing that maybe, my current situation at work might not support in a sufficient way my personal and professional growth anymore, what would it take to reach out to the next level? What is it that would be needed in order to break out of the protective [...]]]></description>
			<content:encoded><![CDATA[<p>And so I was asking myself today, after realizing that maybe, my current situation at work might not support in a sufficient way my personal and professional growth anymore, what would it take to reach out to the next level?</p>
<p>What is it that would be needed in order to break out of the protective shell that is a regular job, with its predictable income stream and limited responsibility?</p>
<p>Being employed as a programmer is, up to a point, pretty comfortable. You don&#8217;t have to worry all that much about getting new customers, and about accounting, office space, and a whole lot of other headaches.</p>
<p>In the end, you don&#8217;t have to take responsibility for those things. Somebody else does that for you. And I believe that this is the whole point: little responsibility.</p>
<h2>Taking responsibility</h2>
<p>A few years ago, I was looking at the rent our family paid each month to the landlord and realized that I would rather keep this money for myself, so we bought a duplex house and moved in. Not only the monthly payment went hereafter to capital repayment (minus interest of course,) but we got to collect a rent check every month for the second unit!</p>
<p>We went from tenants, with zero responsibility for the building and not much more for the apartment, little freedom about how we could rearrange or renovate the place, and total loss of the money we paid each month, to owners with full responsibility, money starting to pile up as well as coming partly from somebody else&#8217;s pocket.</p>
<p>Yes, sometimes a water tank needs to be replaced, a roof repaired, but in the end the trouble is way smaller than the benefits.</p>
<p>And now things are beginning to look an awful lot similar to me, professionally-wise. I get the paycheck in exchange of not having to worry inside that quite nice and shinny cage.</p>
<p>It looks that a lot of us are just happy to trade responsibility, freedom and expanded wealth-building abilities, for the easy ride, the one we can safely travel blindly without getting too much bothered.</p>
<p>Don&#8217;t get me wrong, I don&#8217;t want to come across as judgemental: I don&#8217;t think being an employee is intrinsically worse that being self-employed or an entrepreneur. It all depends on what you want to achieve, and what phase of your life your are in. Do what fits you best, and as a matter of fact I have no regrets whatsoever to having had a job for so long. It&#8217;s just that I&#8217;m now wondering, how farther could I go without the constraints a job affords.</p>
<h2>So what&#8217;s next?</h2>
<p>Well, that is the part which is not all clear yet, but I think the next step would be to define exactly where I&#8217;d like to go. Who am I, what are my strengths, what is the value that I could offer to the marketplace?</p>
<p>I guess my actual skills would make for a good start, in addition to the numerous improvements that I envisioned for our processes at work but was not allowed to implement.</p>
<p>Let&#8217;s see what comes off it.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnicolascadou.com%2Fblog%2F2009%2F06%2Ftaking-responsibility%2F&amp;title=On%20taking%20responsibility" id="wpa2a_14"><img src="http://nicolascadou.com/blog/wp-content/plugins/add-to-any/share_save_120_16.gif" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://nicolascadou.com/blog/2009/06/taking-responsibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web hosting adventures</title>
		<link>http://nicolascadou.com/blog/2009/06/web-hosting-adventures/</link>
		<comments>http://nicolascadou.com/blog/2009/06/web-hosting-adventures/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 18:59:28 +0000</pubDate>
		<dc:creator>ncadou</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://nicolascadou.com/blog/?p=94</guid>
		<description><![CDATA[While A2Hosting has a pretty darn good bang for the buck, I recently had to look for a web host with even more advanced features. For instance, I needed to be able to compile a more recent version of the git DVCS, and use it on my account of course. So I looked around some [...]]]></description>
			<content:encoded><![CDATA[<p>While <a title="A2Hosting" href="http://www.a2hosting.com/1814.html">A2Hosting</a> has a pretty darn good bang for the buck, I recently had to look for a web host with even more advanced features. For instance, I needed to be able to compile a more recent version of the <a title="Git Distributed Version Control System" href="http://git-scm.com/">git</a> <a title="DVCS Wikipedia definition" href="http://en.wikipedia.org/wiki/Distributed_revision_control">DVCS</a>, and use it on my account of course.</p>
<p>So I looked around some more and settled on <a title="WebFaction" href="http://www.webfaction.com?affiliate=ncadou">WebFaction</a>. I had wanted to try them out for a while now based on all the good reviews you can find on the Internet on them, and now that I have I must say that I&#8217;m pretty impressed.</p>
<p>I was able to compile git using my SSH account, along with the dependencies to be able to use git-svn, and it all went pretty flawlessly.</p>
<p>The control panel at WebFaction is awesome, easy to use, and it seems one can host just about everything on their servers: anything <a title="PHP" href="http://www.php.net/">PHP</a>, all sorts of <a title="Python" href="http://www.python.org/">Python</a> and <a title="Ruby" href="http://www.ruby-lang.org/">Ruby</a> frameworks, it just looks fantastic.</p>
<p>In most cases you are running your own private <a title="Apache Web Server" href="http://httpd.apache.org/">Apache</a> daemon, so you control your own configuration, add the modules you want, etc.</p>
<p>Pretty good stuff, check them out!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnicolascadou.com%2Fblog%2F2009%2F06%2Fweb-hosting-adventures%2F&amp;title=Web%20hosting%20adventures" id="wpa2a_16"><img src="http://nicolascadou.com/blog/wp-content/plugins/add-to-any/share_save_120_16.gif" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://nicolascadou.com/blog/2009/06/web-hosting-adventures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript date parsing woes</title>
		<link>http://nicolascadou.com/blog/2009/04/javascript-date-parsing-woes/</link>
		<comments>http://nicolascadou.com/blog/2009/04/javascript-date-parsing-woes/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 14:05:29 +0000</pubDate>
		<dc:creator>ncadou</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://nicolascadou.com/blog/?p=79</guid>
		<description><![CDATA[I just corrected an interesting bug in a web application&#8217;s client-side JavaScript code. How come, most of the time, the string &#8217;2009-02-01&#8242; gets parsed into a Date object with the correct February 1st, 2009 value, but sometimes results in March 1st, 2009? This particular piece of code builds a financial periods menu by extracting dates [...]]]></description>
			<content:encoded><![CDATA[<p>I just corrected an interesting bug in a web application&#8217;s client-side JavaScript code.</p>
<p>How come, most of the time, the string &#8217;2009-02-01&#8242; gets parsed into a Date object with the correct February 1st, 2009 value, but sometimes results in March 1st, 2009?</p>
<p>This particular piece of code builds a financial periods menu by extracting dates out of some HTML returned by an AJAX request. Here&#8217;s what the function looks like &#8211; it may not be the best way to construct a date from a string in the form yyyy-mm-dd, but it works:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> makeDateFromIsoString<span style="color: #009900;">&#40;</span>isoString<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>isoString <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> date <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; date.<span style="color: #660066;">setFullYear</span><span style="color: #009900;">&#40;</span>isoString.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; date.<span style="color: #660066;">setMonth</span><span style="color: #009900;">&#40;</span>isoString.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; date.<span style="color: #660066;">setDate</span><span style="color: #009900;">&#40;</span>isoString.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">8</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; date.<span style="color: #660066;">setHours</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; date.<span style="color: #660066;">setMinutes</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; date.<span style="color: #660066;">setSeconds</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> date<span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>That is, it works most of the time, but not at the end of some months, as I discovered.</p>
<p>Take yesterday, for instance &#8211; March 31st, 2009 &#8211; and let&#8217;s look at what <em>makeDateFromIsoString(&#8217;2009-02-01&#8242;)</em> returned:</p>
<ul>
<li><em>var date = new Date()</em> created a new Date object, containing the current date and time: <span style="text-decoration: underline;">March 31st, 2009</span>.</li>
<li><em>date.setFullYear(isoString.substr(0, 4))</em> changed the <strong>year</strong> of the data object to  &#8216;<strong>2009</strong>&#8216;, so its value stayed the same.</li>
<li><em>date.setMonth(isoString.substr(5, 2) &#8211; 1)</em> changed the <strong>month</strong> of the date object to  &#8216;<strong>02</strong>&#8216; (minus one, because months in JavaScript are zero-based,) so its value became <span style="text-decoration: underline;">February 31st, 2009</span>. Of course, February 31st doesn&#8217;t exists, so because the real date three days after February 28th, 2009 is <span style="text-decoration: underline;">March 3rd, 2009</span>, the date object now contained that value.</li>
<li>So by the the time the code was done with <em>date.setDate(isoString.substr(8, 2))</em>, the date value had become <span style="text-decoration: underline;">March 1st, 2009</span>.</li>
</ul>
<p>And this is how February became March, but only during the three last days of March. Interesting twist, isn&#8217;t it?</p>
<p>The fix was simple: call <em>setDate()</em> before <em>setMonth()</em>.</p>
<p>Viva la <a title="Firebug (Firefox extension)" href="http://getfirebug.com/">Firebug</a> for helping me nail this one down.</p>
<p><strong>Update</strong>: In the end, I just replaced the whole function body with this: <em>return new Date(isoString.replace(&#8216;-&#8217;, &#8216;/&#8217;, &#8216;g&#8217;))</em>. Much simpler, and not subject to the above subtle, but interesting nevertheless, bug.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnicolascadou.com%2Fblog%2F2009%2F04%2Fjavascript-date-parsing-woes%2F&amp;title=JavaScript%20date%20parsing%20woes" id="wpa2a_18"><img src="http://nicolascadou.com/blog/wp-content/plugins/add-to-any/share_save_120_16.gif" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://nicolascadou.com/blog/2009/04/javascript-date-parsing-woes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

