<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Haineault.com / Blog</title><link>http://haineault.com/blog/</link><description>Haineault.com's latest blog entries.</description><language>en</language><lastBuildDate>Thu, 12 Nov 2009 06:14:25 -0000</lastBuildDate><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/Haineaultcom/Blog" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>10-Nov-2009 15:04 - If Architects Had to Work Like Web Programmers</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/fQpvrVtkPd8/</link><description>&lt;p&gt;&lt;a href="http://www.reddit.com/r/Design/comments/a2wyt/if_architects_had_to_work_like_web_programmers/"&gt;Someone reposted&lt;/a&gt; an old satirical post on Reddit. I remember reading it a while a go but can't recall its origin.
&lt;/p&gt;
&lt;p&gt;I believe &lt;a href="http://www.ninisworld.com/oddsends/justforfun/68architects.html"&gt;this site&lt;/a&gt; was the first to post it .. Can anyone confirm ? I'd really like to know who is the original author..
&lt;/p&gt;
&lt;p&gt;Anyway that's a great post that is worth reading if you build websites. 
&lt;/p&gt;
&lt;p&gt;You'll find it really funny and if you don't build website for living you'll have a short glimpse of how it's like;
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Dear Mr. Architect:
&lt;/p&gt;
&lt;p&gt;Please design and build me a house. I am not quite sure of what I need, so you should use your discretion. My house should have somewhere between two and forty-five bedrooms. Just make sure the plans are such that the bedrooms can be easily added or deleted. When you bring the blueprints to me, I will make the final decision of what I want. Also, bring me the cost breakdown for each configuration so that I can arbitrarily pick one.
&lt;/p&gt;
&lt;p&gt;Keep in mind that the house I ultimately choose must cost less than the one I am currently living in. Make sure, however, that you correct all the deficiencies that exist in my current house (the floor of my kitchen vibrates when I walk across it, and the walls don't have nearly enough insulation in them).
&lt;/p&gt;
&lt;p&gt;As you design, also keep in mind that I want to keep yearly maintenance costs as low as possible. This should mean the incorporation of extra-cost features like aluminum, vinyl, or composite siding. (If you choose not to specify aluminum, be prepared to explain your decision in detail.)
&lt;/p&gt;
&lt;p&gt;Please take care that modern design practices and the latest materials are used in construction of the house, as I want it to be a showplace for the most up-to-date ideas and methods. Be alerted, however, that kitchen should be designed to accommodate, among other things, my 1952 Gibson refrigerator.
&lt;/p&gt;
&lt;p&gt;To insure that you are building the correct house for our entire family, make certain that you contact each of our children, and also our in-laws. My mother-in-law will have very strong feelings about how the house should be designed, since she visits us at least once a year. Make sure that you weigh all of these options carefully and come to the right decision. I, however, retain the right to overrule any choices that you make.
&lt;/p&gt;
&lt;p&gt;Please don't bother me with small details right now. Your job is to develop the overall plans for the house: get the big picture. At this time, for example, it is not appropriate to be choosing the color of the carpet. However, keep in mind that my wife likes blue.
&lt;/p&gt;
&lt;p&gt;Also, do not worry at this time about acquiring the resources to build the house itself. Your first priority is to develop detailed plans and specifications. Once I approve these plans, however, I would expect the house to be under roof within 48 hours.
&lt;/p&gt;
&lt;p&gt;While you are designing this house specifically for me, keep in mind that sooner or later I will have to sell it to someone else. It therefore should have appeal to a wide variety of potential buyers. Please make sure before you finalize the plans that there is a consensus of the population in my area that they like the features this house has. I advise you to run up and look at my neighbor's house he constructed last year. We like it a great deal. It has many features that we would also like in our new home, particularly the 75-foot swimming pool. With careful engineering, I believe that you can design this into our new house without impacting the final cost.
&lt;/p&gt;
&lt;p&gt;Please prepare a complete set of blueprints. It is not necessary at this time to do the real design, since they will be used only for construction bids. Be advised, however, that you will be held accountable for any increase of construction costs as a result of later design changes. You must be thrilled to be working on as an interesting project as this! To be able to use the latest techniques and materials and to be given such freedom in your designs is something that can't happen very often. Contact me as soon as possible with your complete ideas and plans.
&lt;/p&gt;
&lt;p&gt;PS: My wife has just told me that she disagrees with many of the instructions I've given you in this letter. As architect, it is your responsibility to resolve these differences. I have tried in the past and have been unable to accomplish this. If you can't handle this responsibility, I will have to find another architect.
&lt;/p&gt;
&lt;p&gt;PPS: Perhaps what I need is not a house at all, but a travel trailer. Please advise me as soon as possible if this is the case.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
    1 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cLVcf6n-9wKNomM88f6yDaI6RDY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cLVcf6n-9wKNomM88f6yDaI6RDY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cLVcf6n-9wKNomM88f6yDaI6RDY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cLVcf6n-9wKNomM88f6yDaI6RDY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/fQpvrVtkPd8" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/121/</guid><feedburner:origLink>http://www.haineault.com/blog/121/</feedburner:origLink></item><item><title>07-Nov-2009 12:30 - How to join an Open Source project</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/IrZAVlwgqZ4/</link><description>&lt;p&gt;This is not a definitive guide, but just some basic rules to follow to make your
   Open Source contribution enjoyable for both you and the project maintainers.
&lt;/p&gt;
&lt;h2&gt;Why joining an Open Source Project ?&lt;/h2&gt;
&lt;p&gt;First there is many incentive to join an Open Source project. The first one probably
   being the "cool" factor. You know, so you can tell your geek friends "hey I'm on XYZ 
   project dev team ! I totally rock."
&lt;/p&gt;
&lt;p&gt;But this is not a very good reason. The first requirement to join an Open Source project
   is probably &lt;em&gt;to use it&lt;/em&gt;. There is not a big incentive to use a project that has
   no practical use for yourself.
&lt;/p&gt;
&lt;p&gt;Some good reason to join an Open Source project would be;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
     You want to have write access to the code base to push either your own feature or bug fixes
 &lt;/li&gt;
&lt;li&gt;
     You think you could bring significant improvements to the project
 &lt;/li&gt;
&lt;li&gt;
     You have too much spare time
 &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Initial approach&lt;/h2&gt;
&lt;p&gt;Joining an Open Source project for the first time might be a little more tricky for two reason.
&lt;/p&gt;
&lt;p&gt;First there is no standard approach, there is no "Join this Project!" button. You have to contact
   the project owner (or maintainer) directly and talk to him.
&lt;/p&gt;
&lt;p&gt;The other thing that could make the joining process a little harder for starters is the lack of
   curriculum. 
&lt;/p&gt;
&lt;p&gt;Before trying to join an Open Source project you should try to start your own. Even if it's a small project or
   just a library. Just something simple but yet useful. Then announce it on your blog and on some social sites.
   If you're lucky some people will also find it useful and start using it.
&lt;/p&gt;
&lt;p&gt;By doing this you will learn two things; first how to run an Open Source project and secondly you will
   learn what it's like having your own creation used by many others. It's quite a thrill when you realize
   that probably thousands of people use your code and some review it and give you feedbacks, ideas or patches.
&lt;/p&gt;
&lt;p&gt;But beyond that, you'll also see how the community works and evolve. You'll start to see you project
   from many point of view in many different contexts. 
&lt;/p&gt;
&lt;p&gt;It will open up new perspectives.
&lt;/p&gt;
&lt;p&gt;If you either have done that or feel that you are ready to join a project anyway, there are other prerequisites;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
     You must understand well the VCS that the project use. For example, if the project use Subversion, you should know how to commit, merge, revert, patch etc ..
 &lt;/li&gt;
&lt;li&gt;
     You should understand the importance of readable code and documentation
 &lt;/li&gt;
&lt;li&gt;
     You should know how to comment your code
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you feel comfortable with all this, the first step is to start playing with the project. Do a checkout
   and dive into the code, learn how it works and what it does. Note the programming style used as well.
   It's not capital to code exactly like the current project maintainers, but your code should at least bear
   the same style. You have to consider at all time that somebody else &lt;em&gt;will&lt;/em&gt; read and modify your code.
&lt;/p&gt;
&lt;p&gt;Like they say; always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.
&lt;/p&gt;
&lt;p&gt;When you feel ready to join you can go for the next step, contacting the project maintainer
&lt;/p&gt;
&lt;h2&gt;Initial contact&lt;/h2&gt;
&lt;p&gt;If you already ran your own Open Source project you probably have a good idea on how your email
   will be considered and what the guy reading it will think.
&lt;/p&gt;
&lt;p&gt;This is not rocket science;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
     the guy is on many Open Source projects and has probably a full time job on top of that; be short and sweet;
 &lt;/li&gt;
&lt;li&gt;
     the guy don't know shit about you. And everyone that ran an Open Source project in his life knows at least one
        thing: &lt;em&gt;Hell is paved with good intentions&lt;/em&gt;. Which brings me to the next point;
 &lt;/li&gt;
&lt;li&gt;
     show your knowledge about the project, not your excitement about it. In other words, start by proving to the project owner that you have the qualifications to be part of the project, you'll have plenty of time to show your motivation and excitement if you get access.
 &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;OK I joined, now what ?&lt;/h2&gt;
&lt;p&gt;By experience, there is two types of people who joins an Open Source project; those who make the project
   go forward and those who don't.
&lt;/p&gt;
&lt;p&gt;Those who don't are usually more prone to show their excitement than actual qualifications. They join the project
   and either never commit anything or commit too much new code and new functionnalities and therefore brings in new bugs.
&lt;/p&gt;
&lt;p&gt;When joining a project it's important to ask yourself if you have enough motivation to actually do something, but
   it's also important to not do &lt;em&gt;too much&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;A new programmer is a bit like a new manager in a workplace in a sense that it take similar qualities to be successful.
&lt;/p&gt;
&lt;p&gt;The real good manager will take a new job position carefully. Even if his ultimate goal is to turn the company upside down and optimize the whole process, he will start by emulating perfectly the previous manager.
&lt;/p&gt;
&lt;p&gt;Why ? 
&lt;/p&gt;
&lt;p&gt;Put yourself on either the workers bellow him (read users) or the top management (read project owner(s)). They get a new manager which;
&lt;/p&gt;
&lt;p&gt; A: Enters the company, try to change the business upside down, break the process in the way thus preventing workers from working. But with a lot of hard work it will be so much better!
&lt;/p&gt;
&lt;p&gt; B: Enters the company, does the job perfectly down to the details and brings small incremental improvement to the work process. Eventually he drafts and present to the higher management detailed plan to optimize the throughput by turning the process upside down.
&lt;/p&gt;
&lt;p&gt;Which has more chance to succeed ?
&lt;/p&gt;
&lt;p&gt;Obviously it's B, because on the first hand he proved he was more than competent by bringing slight improvements while doing it's job and then presented a clear and detailed plan of the big changes he wanted to make &lt;em&gt;before&lt;/em&gt; trying to implement them.
&lt;/p&gt;
&lt;p&gt;It's not impossible to bring big changes to an Open Source project, but first you have to prove you can do it.
&lt;/p&gt;
&lt;p&gt;A successful Open Source project is almost like a successful business, it's hard to change a successful recipe without ruining it.
&lt;/p&gt;
&lt;p&gt;So be careful with your big changes.
&lt;/p&gt;
&lt;p&gt;In fact the best place to start when joining an Open Source project is the very base. Start where you can only do little harm.
&lt;/p&gt;
&lt;p&gt;Improve the project documentation or the comments, add new unit tests or do some code review. It's a good opportunity to get to really know the project, its weakness and strengths. The maintainer(s) will be very happy about it,  it's a good way to earn their trust and show you are serious about helping with the project.
&lt;/p&gt;
&lt;p&gt;It's also a good idea to create your own branch, this way you are sandbox-ed and it's almost impossible to break the project or do something wrong.
&lt;/p&gt;
&lt;p&gt;Just merge the trunk to your branch often to keep your code up to date with it.
&lt;/p&gt;
&lt;h2&gt;The politics&lt;/h2&gt;
&lt;p&gt;I don't think there is any written rules about it, but you must know something very important about most Open Source projects;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It is NOT a democracy.&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;Call it what you want, but in the end there is only one authority; the project owner(s).
&lt;/p&gt;
&lt;p&gt;Don't like it ? Fork it.
&lt;/p&gt;
&lt;p&gt;
    0 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mPrdGx7AanVKF_oFED-oG3Y_sQo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mPrdGx7AanVKF_oFED-oG3Y_sQo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mPrdGx7AanVKF_oFED-oG3Y_sQo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mPrdGx7AanVKF_oFED-oG3Y_sQo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/IrZAVlwgqZ4" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/120/</guid><feedburner:origLink>http://www.haineault.com/blog/120/</feedburner:origLink></item><item><title>27-Oct-2009 15:42 - Django: disabling actions site-wide</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/fTUVK359Vhs/</link><description>&lt;p&gt;I've been searching for it at least 2 times, so next time I'll know where to find it:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;django.contrib&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;

&lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;disable_action&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;delete_selected&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Making it compatible with legacy admin interface:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;django.contrib&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;hasattr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;#39;disable_action&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;disable_action&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;delete_selected&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;
    0 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yopF41IbKNtd-CiWCN3o-Dt7eGs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yopF41IbKNtd-CiWCN3o-Dt7eGs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yopF41IbKNtd-CiWCN3o-Dt7eGs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yopF41IbKNtd-CiWCN3o-Dt7eGs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/fTUVK359Vhs" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/119/</guid><feedburner:origLink>http://www.haineault.com/blog/119/</feedburner:origLink></item><item><title>23-Oct-2009 16:30 - Canucks; TekSavvy and MTS Allstream just saved our asses .. just saying.</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/6Jqj6-AMWsk/</link><description>&lt;blockquote&gt;&lt;p&gt;The Commission granted interim approval in Telecom Order 2009-484 to Bell Aliant Regional Communications, Limited Partnership's (Bell Aliant) and Bell Canada's (collectively, the Bell companies) applications to introduce two new speed options for their Gateway Access Services (GAS)1 and usage-based billing (UBB) rates and an excessive usage charge (together, UBB) for their residential GAS. Telecom Order  2009-484 approved, on an interim basis, the implementation of UBB on 10 November 2009.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;In plain English; the CRTC passed a new regulation that would allow Bell to cap and throttle the bandwidth they are required to resell to smaller independents ISP, effectively crippling their services and f*cking their clients in the ass real good. 
&lt;/p&gt;
&lt;p&gt;I'm sorry for the unwelcome analogy, but it still somewhat an euphemism for what is happening right now.
&lt;/p&gt;
&lt;p&gt;For everyday DSL users it means no more unlimited download, new compulsory bandwidth cap (300GB/month) , a significant increase of the Internet bills and higher penalties fees if the bandwidth quotas are exceeded.. 
&lt;/p&gt;
&lt;p&gt;In short you pay more to have less. 
&lt;/p&gt;
&lt;p&gt;Now &lt;a href="http://www.teksavvy.com/en/index.asp"&gt;TekSavvy&lt;/a&gt; and &lt;a href="http://www.mts.ca/"&gt;MTS Allstream&lt;/a&gt; filled a complaint to the CRTC and this decision was rolled back and delayed.
&lt;/p&gt;
&lt;p&gt;The war is not over yet, but thanks to these two companies, we might have won the first battle. 
&lt;/p&gt;
&lt;p&gt;We (Canadians) should fill complaints to the CRTC too and show some support to TekSavvy and MTS Allstream.
&lt;/p&gt;
&lt;p&gt;You're with Bell ? Why not call TekSavvy or MTS Allstream, you might even get a better deal. 
&lt;/p&gt;
&lt;p&gt;Bell lose, they win.
&lt;/p&gt;
&lt;p&gt;I've personally tried both Bell and TekSavvy for more than a year and I can assure you that TekSavvy's service and prices were nothing comparable to Bell. It was day and night and I would choose TekSavvy over Bell a million times if I had to go back on DSL. 
&lt;/p&gt;
&lt;p&gt;Not to mention that bell was blocking ports 25 and 80 &lt;em&gt;on a commercial DSL line&lt;/em&gt;, it makes your life somewhat sucks when you are  in charge of a web department in a company.
&lt;/p&gt;
&lt;p&gt;Now if you might think that your lonely complaint email sent to the CRTC or dropping Bell will probably not change much and you might be right, there is no certitudes. 
&lt;/p&gt;
&lt;p&gt;However if nobody does anything, there will be only one one certitude; Bell will win and we will all lose.
&lt;/p&gt;
&lt;p&gt;As they says: take care of politics or politics will take care of you.
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;More:&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.crtc.gc.ca/eng/archive/2009/2009-484.htm#0"&gt;Telecom Order CRTC 2009-484&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.crtc.gc.ca/eng/archive/2009/2009-658.htm"&gt;Applications by Teksavvy Solutions Inc. and MTS Allstream Inc. to review and vary portions of Telecom Order 2009-484 regarding usage-based billing for Bell Aliant Regional Communications, Limited Partnership's and Bell Canada's residential Gateway Access Services&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.crtc.gc.ca/eng/info_sht/g4.htm"&gt;How to Participate in a CRTC Public Process &lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
    0 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7jcXI0ThHGAcnDLPGgPc1C057ho/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7jcXI0ThHGAcnDLPGgPc1C057ho/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7jcXI0ThHGAcnDLPGgPc1C057ho/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7jcXI0ThHGAcnDLPGgPc1C057ho/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/6Jqj6-AMWsk" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/118/</guid><feedburner:origLink>http://www.haineault.com/blog/118/</feedburner:origLink></item><item><title>13-Oct-2009 17:45 - Bureaucracy in Quebec</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/2L-QMz2Bfwg/</link><description>&lt;p&gt;Recently I got a speeding ticket. Not a big one, but still not cool.
&lt;/p&gt;
&lt;p&gt;Anyway.
&lt;/p&gt;
&lt;p&gt;So I went to the municipal court to pay it because when I had my last ticket, about two years ago, I went to the &lt;em&gt;Caisse Desjardins&lt;/em&gt; (basically a bank) to pay it, as someone told me to do. However at the time the bank told me it wasn't possible to pay a ticket there anymore.. I had to go to the municipal court.
&lt;/p&gt;
&lt;p&gt;So there I were today with my ticket at the municipal court, ready to pay.  However the lady at the counter seemed a bit confused and told me that I had to go to the &lt;em&gt;justice court&lt;/em&gt; to pay my ticket..
&lt;/p&gt;
&lt;p&gt;After crossing the city I arrive at the &lt;em&gt;justice court&lt;/em&gt;, again with my ticket. But this time I ask first
   if I am at the right place to pay it.
&lt;/p&gt;
&lt;p&gt;She replied; &lt;em&gt;it depends.. are you within the 30 days period ?&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;Me: &lt;em&gt;Uh, well yes..&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Oh OK, then you must go to the Caisse Desjardins&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;And of course it's 4:30h and the bank close at 3:00h.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update&lt;/em&gt;:
&lt;/p&gt;
&lt;p&gt;Today I went to the &lt;em&gt;Caisse Desjardins&lt;/em&gt; to pay the damn ticket .. but they would not accept my bank card. They said I would have to use the ATM.. with 3$ transaction fees. What a fucking racket. I crossed the city once more to withdraw the money at my bank, just to not give a dime to these crooks.
&lt;/p&gt;
&lt;p&gt;
    2 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3leu3Dha5qbjcTet_2ckf4BmO_4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3leu3Dha5qbjcTet_2ckf4BmO_4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3leu3Dha5qbjcTet_2ckf4BmO_4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3leu3Dha5qbjcTet_2ckf4BmO_4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/2L-QMz2Bfwg" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/117/</guid><feedburner:origLink>http://www.haineault.com/blog/117/</feedburner:origLink></item><item><title>08-Oct-2009 19:00 - Deploying Django on Plesk</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/D0XLCvBd-pk/</link><description>&lt;p&gt;The main difficulty in deploying Django sites is the root access requirement. 
   But if you can modify the vhost file at your will, there is no problems.
&lt;/p&gt;
&lt;p&gt;However if you can't, you're in for a whole lot of fun.
&lt;/p&gt;
&lt;p&gt;My hosting partner use Plesk to administer hosting accounts, which means
   almost every configs are generated by Plesk. So any changes to those configs 
   might get overwritten or worst, fuck up Plesk.
&lt;/p&gt;
&lt;p&gt;For the last year I've used a &lt;em&gt;.htaccess&lt;/em&gt; file to set the python handler.
   With a rewrite rule and some urls/config tweaks it was possible to get the site up and running.
&lt;/p&gt;
&lt;p&gt;The only downside was that the &lt;em&gt;.htaccess&lt;/em&gt; needed a directory to be parsed, which means 
   I couldn't use the document root to serve a Django site. So I ended up having to put an URL prefix
   before each of the urls.
&lt;/p&gt;
&lt;p&gt;To be honest, it was a co-worker at the time who tested different approaches
   and found out it was the only way to go if we couldn't change the vhosts directives.
&lt;/p&gt;
&lt;p&gt;Now I have my own company and today I was launching &lt;a href="http://braves.qc.ca/"&gt;the first website we produced&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;I was about to use a similar hack to get Django working with Plesk, but the URL prefix really bugged me.
&lt;/p&gt;
&lt;p&gt;I think it's unprofessional and I had the feeling Plesk wasn't &lt;em&gt;that&lt;/em&gt; rigid.
&lt;/p&gt;
&lt;p&gt;Two Google searches later my problem was solved.
&lt;/p&gt;
&lt;p&gt;It turns out Plesk does allow overriding vhost directives and quite easily that is.
&lt;/p&gt;
&lt;p&gt;Just create or edit a &lt;em&gt;vhost.conf&lt;/em&gt; file in the right directory;
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;sudo vim /home/www/vhosts/yourdomain.com/conf/vhost.conf
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Then simply add your vhost directives:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;ServerAdmin  &lt;span class="s2"&gt;&amp;quot;bob@yourdomain.com&amp;quot;&lt;/span&gt;
DocumentRoot /var/www/vhosts/yourdomain.com/httpdocs
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE settings
...
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Then you just have to refresh Plesk's config and restart apache:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name&lt;span class="o"&gt;=&lt;/span&gt;yourdomain.com
/etc/init.d/httpd graceful
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Et voila.
&lt;/p&gt;
&lt;p&gt;
    0 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jDqw-l7UJI9E30bXqRZ9VAMgyhU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jDqw-l7UJI9E30bXqRZ9VAMgyhU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jDqw-l7UJI9E30bXqRZ9VAMgyhU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jDqw-l7UJI9E30bXqRZ9VAMgyhU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/D0XLCvBd-pk" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/116/</guid><feedburner:origLink>http://www.haineault.com/blog/116/</feedburner:origLink></item><item><title>14-Sep-2009 16:56 - My dad has the most awesome cat, period.</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/MOYRvvLIJ_0/</link><description>&lt;p&gt;He's my neighbor so I pay him a visit quite often and every time his cat, Timo, runs at the door as soon as he ears me coming. I'm not really supposed to play with him because I'm allergic, but I just can't help myself.
&lt;/p&gt;
&lt;p&gt;This cat is funny because he's always meowing. Not the short type, the long and complaining one. Like longs MeeEeEooooOooOOwwwwwW. It's really like he's trying to talk to us and actually, he's always been an incredible communicator.
&lt;/p&gt;
&lt;p&gt;For example, one day I come from work and see him trapped the hall. My father came home did not saw him pass the door when he entered his apartment. The cat always tries to go outside, but when he manage to, he chickens out and wants to go back inside. So he was there wandering in the hall and as soon as the he saw me, he caught my attention with a brief &lt;em&gt;meow&lt;/em&gt; and when he saw that I was looking at him he turned his head up and looked straight at the door's knob above him and meowed again.
&lt;/p&gt;
&lt;p&gt;It was a clear: "&lt;em&gt;Servitor! Turn that thing so I can go back inside&lt;/em&gt;".
&lt;/p&gt;
&lt;p&gt;I laughed and let him in. But I was still amazed by how well this cat understand the fundamentals of communications.
&lt;/p&gt;
&lt;p&gt;Then one day I had an idea. 
&lt;/p&gt;
&lt;p&gt;OK, he might be able to grasp the basic communication principles, but could he detect or decode more subtle communications patterns ? 
&lt;/p&gt;
&lt;p&gt;He tries to communicate with me by meowing because it's all he can do. I can meow back at him, however I would just reproduce sounds, this would not be &lt;em&gt;communication&lt;/em&gt;. It must be a somewhat frustrating situation for him.. You try to communicate something to someone far more intelligent (I sincerely hope so), educated and capable physically using all your physical limits and all this person does is to reply in his own language or mimics yours almost perfectly but just repeats what you said incoherently.
&lt;/p&gt;
&lt;p&gt;So for almost a year when I went to my father and was about to leave I'd say "Bye Timo" and blinked one eye at the cat.
&lt;/p&gt;
&lt;p&gt;I though it was the perfect &lt;em&gt;subtle&lt;/em&gt; communication for my little experiment because it's a movement that doesn't require any particular physical capacity but yet, it occurs quite rarely &lt;em&gt;naturally&lt;/em&gt;. 
&lt;/p&gt;
&lt;p&gt;I mean, usually when you blink you blink both eyes.
&lt;/p&gt;
&lt;p&gt;So for a almost year I blinked at a cat and he would only stare back at me without any reaction, just like any cat would.
&lt;/p&gt;
&lt;p&gt;Sometimes I had the feeling he really saw my blinks, but all I ever got back was a blank stare or a meow.
&lt;/p&gt;
&lt;p&gt;Until today.
&lt;/p&gt;
&lt;p&gt;When I was about to leave, the door was almost shut and I heard a &lt;em&gt;meow&lt;/em&gt;..
&lt;/p&gt;
&lt;p&gt;Then I though "Oh yeah, the blink".. I reopen the door pass my head through and say "Bye Timo!" and right when I was about to blink that little fucker sitting still on the carpet looked at me and blinked.
&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p class="center"&gt;&lt;a href="http://www.flickr.com/photos/haineault/sets/72157622371449274/"&gt;&lt;img src="http://farm3.static.flickr.com/2653/3921293610_6cee3957f4.jpg" alt="Timo" title="Timo" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
    2 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7w93fl6D3Cmts-6Q1eqxxsKNouc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7w93fl6D3Cmts-6Q1eqxxsKNouc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7w93fl6D3Cmts-6Q1eqxxsKNouc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7w93fl6D3Cmts-6Q1eqxxsKNouc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/MOYRvvLIJ_0" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/115/</guid><feedburner:origLink>http://www.haineault.com/blog/115/</feedburner:origLink></item><item><title>12-Sep-2009 19:29 - How to view Adobe Illustrator files on Linux</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/_htt1FZP7fM/</link><description>&lt;p&gt;Just change the file extension to &lt;em&gt;pdf&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;I've been using this trick for well over two years. Actually ever since the day I wanted to write a PDF parser and saw this upon opening a PDF file with Vim:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;%PDF-1.4
%âãÏÓ
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;This was the first line. Obviously the next thing I did was to rename the AI file to PDF. It was quite obvious that it was indeed just a PDF file since the thumbnail in Nautilus instantly appeared :)
&lt;/p&gt;
&lt;p&gt;Yes it can be opened by anything, like Gimp, not the layers don't work.
&lt;/p&gt;
&lt;p&gt;Bonus for Ubuntu users:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;rename -v &lt;span class="s1"&gt;&amp;#39;s/\.ai/\.pdf/&amp;#39;&lt;/span&gt; *.ai
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Have fun.
&lt;/p&gt;
&lt;p&gt;
    0 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JiHNuMTba-NzU1obVkh4gQHdUdY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JiHNuMTba-NzU1obVkh4gQHdUdY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JiHNuMTba-NzU1obVkh4gQHdUdY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JiHNuMTba-NzU1obVkh4gQHdUdY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/_htt1FZP7fM" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/114/</guid><feedburner:origLink>http://www.haineault.com/blog/114/</feedburner:origLink></item><item><title>04-Sep-2009 10:10 - Django: Two little but yet handy for loop tricks</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/06QBhOMCERk/</link><description>&lt;p&gt;I've been using those tricks for a while and find then awesomely useful.
&lt;/p&gt;
&lt;p&gt;First the more obvious. When styling navigation it's sometime useful to have a way to distinguish first and last elements, to eliminate a border for example.
&lt;/p&gt;
&lt;p&gt;CSS provide handy selectors expressions (&lt;em&gt;:first-child&lt;/em&gt; and &lt;em&gt;:last-child&lt;/em&gt;)  to achieve this without pain. But were would the fun be without pain ? 
&lt;/p&gt;
&lt;p&gt;To rectify the situation Microsoft decided nobody needed such selectors and didn't implement them in Internet Explorer.
&lt;/p&gt;
&lt;p&gt;So a sure way to do it in a for loop is like this;
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;object_list&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;forloop&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ul&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endif&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;li&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;forloop&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;forloop&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;last&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{&lt;/span&gt;&lt;span class="si"&gt;% i&lt;/span&gt;&lt;span class="s"&gt;f forloop.first %}first{&lt;/span&gt;&lt;span class="si"&gt;% e&lt;/span&gt;&lt;span class="s"&gt;lse %}last{&lt;/span&gt;&lt;span class="si"&gt;% e&lt;/span&gt;&lt;span class="s"&gt;ndif %}&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endif&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;li&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;forloop&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;last&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;ul&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endif&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endfor&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;*Edit: Updated code. Thanks to &lt;a href="/blog/113/#comment-6893"&gt;Aidas Bendoraitis&lt;/a&gt; for his more fail safe approach.
&lt;/p&gt;
&lt;p&gt;* NOTE: Both "if forloop..." should be &lt;em&gt;inside&lt;/em&gt; the LI tag &lt;a href="http://pastebin.ca/1553848"&gt;like this&lt;/a&gt;, where the attributes goes. My code highlight doesn't seem to like it however .. the whole line disappear when I try to put it at the right place.
&lt;/p&gt;
&lt;p&gt;That way the first and last element are easily accessible with the &lt;em&gt;.first&lt;/em&gt; and &lt;em&gt;.last&lt;/em&gt; classes, even in a retarded browser.
&lt;/p&gt;
&lt;p&gt;The other trick is a bit more useful.
&lt;/p&gt;
&lt;p&gt;Let's take again or nav example from above but we want to create a anchor links list. How to easily create unique and related anchor names ? Easy: slugify.
&lt;/p&gt;
&lt;p&gt;Slugify is a nice template tag that convert a string into a URL friendly string to create readable URLs.
&lt;/p&gt;
&lt;p&gt;But it's easy to use it to create anchors too;
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ul&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;object_list&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;li&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;#{{ item.name|slugify }}&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;li&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endfor&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;ul&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Then when you cycle through the object link you can create the corresponding anchor as easily:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;object_list&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{ item.name|slugify }}&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endfor&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;That's it !
&lt;/p&gt;
&lt;p&gt;
    3 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Bf6zaMY6D005B5By23Fb09oDvEc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bf6zaMY6D005B5By23Fb09oDvEc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Bf6zaMY6D005B5By23Fb09oDvEc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bf6zaMY6D005B5By23Fb09oDvEc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/06QBhOMCERk" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/113/</guid><feedburner:origLink>http://www.haineault.com/blog/113/</feedburner:origLink></item><item><title>29-Aug-2009 16:20 - jQuery Utils 0.8.5 released! Nearly 50% slimmer...</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/zP6xJLgB0K8/</link><description>&lt;p&gt;&lt;a href="http://code.google.com/p/jquery-utils/"&gt;Grab it now here.&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;I've just found a tiny but yet quite embarrassing bug in my build system that caused the source 
   code to be include twice in the distribution file...
&lt;/p&gt;
&lt;p&gt;To fix the problem was easy, I only had to change this:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;modules&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
        &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
        &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;module&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;modules&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;To this:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;modules&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
        &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;module&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;modules&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
            &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;But I've spent a whole hour searching for that damn bug and I'm still trying to figure out why I didn't notice that my file size had almost doubled somewhere overnight.
&lt;/p&gt;
&lt;p&gt;If it would have been a corporate project I would surely be the hero of the day for my managers ;)
&lt;/p&gt;
&lt;p&gt;Here's the before/after &lt;em&gt;du -chs&lt;/em&gt;:
&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;
   4.0K    dist/jquery.utils.css
   152K    dist/jquery.utils.js
   36K dist/jquery.utils.lite.js
   20K dist/jquery.utils.lite.min.js
   76K dist/jquery.utils.min.js
   276K    dist/jquery.utils.ui.js
   144K    dist/jquery.utils.ui.min.js
   708K    total
   &lt;/pre&gt;
&lt;pre&gt;
   28K dist/jquery.ddbelated.js
   16K dist/jquery.ddbelated.min.js
   4.0K    dist/jquery.utils.css
   108K    dist/jquery.utils.js
   96K dist/jquery.utils.lite.js
   48K dist/jquery.utils.lite.min.js
   56K dist/jquery.utils.min.js
   356K    total
   &lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;To be fair, the UI build was also dropped in this release, but the size has significantly dropped..
&lt;/p&gt;
&lt;p&gt;Anyway, I'm glad it's fixed now.
&lt;/p&gt;
&lt;p&gt;This release also comes with a lot of other fixes and enhancements, among them;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
     re-factored countdown (thanks gnuvince)
 &lt;/li&gt;
&lt;li&gt;
     removed arrayUtils from distribution files (not useful enough)
 &lt;/li&gt;
&lt;li&gt;
     removed youtubeLinksToEmbed (not useful enough)
 &lt;/li&gt;
&lt;li&gt;
     removed livequery (use jQuery.live instead)
 &lt;/li&gt;
&lt;li&gt;
     removed UI build (nearly useless for now)
 &lt;/li&gt;
&lt;li&gt;
     new logo !
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Enjoy !
&lt;/p&gt;
&lt;p&gt;
    0 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PCbATmPyW89TLvat3JxxIP2x-ms/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PCbATmPyW89TLvat3JxxIP2x-ms/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PCbATmPyW89TLvat3JxxIP2x-ms/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PCbATmPyW89TLvat3JxxIP2x-ms/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/zP6xJLgB0K8" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/112/</guid><feedburner:origLink>http://www.haineault.com/blog/112/</feedburner:origLink></item></channel></rss>
