<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Powered by Penguins</title>
	<atom:link href="http://poweredbypenguins.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://poweredbypenguins.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Wed, 10 Aug 2011 05:26:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='poweredbypenguins.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Powered by Penguins</title>
		<link>http://poweredbypenguins.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://poweredbypenguins.wordpress.com/osd.xml" title="Powered by Penguins" />
	<atom:link rel='hub' href='http://poweredbypenguins.wordpress.com/?pushpress=hub'/>
		<item>
		<title>XCSS Parser</title>
		<link>http://poweredbypenguins.wordpress.com/2011/08/10/xcss-parser/</link>
		<comments>http://poweredbypenguins.wordpress.com/2011/08/10/xcss-parser/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 05:25:20 +0000</pubDate>
		<dc:creator>sledgy</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://poweredbypenguins.wordpress.com/?p=50</guid>
		<description><![CDATA[Working with CSS can be painful at times, and while there is the option of switching to SASS or similar I personally find these more even more annoying. Being able to quickly preview your work is useful. CSS does actually &#8230; <a href="http://poweredbypenguins.wordpress.com/2011/08/10/xcss-parser/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=50&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Working with CSS can be painful at times, and while there is the option of switching to SASS or similar I personally find these more even more annoying. Being able to quickly preview your work is useful.</p>
<p>CSS does actually have a few built in constructs to break up work better <code>@import</code> does allow you to split up multiple files although this is not recommended for a production site as it increases the number HTTP requests.</p>
<p>My simple solution is a python app that will take your CSS files and combine them into a single file, at the same time removing any blank lines, this is not as advanced as a CSS minification tool but does a similar job. Combined with gzip compression on the server side for best results.</p>
<p>My biggest dislike with SASS and co is that the syntax is quite different from standard CSS, this means you cannot preview the output in your browser without a compile stage, slowing down the development workflow. My solution (thus far) does not introduce anything that is not supported already by your browser.</p>
<p>The only feature I added (which is entirely optional) is support for variables, again I wanted to ensure that the syntax is as similar as possible to standard CSS (they actually work more like a Make MACRO). A variable is defined using <code>@define NAME VALUE;</code> and can then be referenced with <code>$NAME</code>.</p>
<p>Anyway if your interested check out the project on BitBucket:<br />
<a href="https://bitbucket.org/timsavage/xcss-parser/overview"> https://bitbucket.org/timsavage/xcss-parser/overview</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/poweredbypenguins.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/poweredbypenguins.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/poweredbypenguins.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/poweredbypenguins.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/poweredbypenguins.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/poweredbypenguins.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/poweredbypenguins.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/poweredbypenguins.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/poweredbypenguins.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/poweredbypenguins.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/poweredbypenguins.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/poweredbypenguins.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/poweredbypenguins.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/poweredbypenguins.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=50&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://poweredbypenguins.wordpress.com/2011/08/10/xcss-parser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2f628263a3b0ec5fc3198c21c8ab79f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sledgy</media:title>
		</media:content>
	</item>
		<item>
		<title>Django Ajax form&#039;s updated</title>
		<link>http://poweredbypenguins.wordpress.com/2010/06/29/django-ajax-forms-updated/</link>
		<comments>http://poweredbypenguins.wordpress.com/2010/06/29/django-ajax-forms-updated/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 14:40:57 +0000</pubDate>
		<dc:creator>sledgy</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.poweredbypenguins.org/?p=44</guid>
		<description><![CDATA[With the release of Django 1.2 the newforms module has had a re-factor, with validation pulled out into its own module (django.core.validation). Changes where required to the form introspection code that works out what validation is required client site. The &#8230; <a href="http://poweredbypenguins.wordpress.com/2010/06/29/django-ajax-forms-updated/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=44&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With the release of Django 1.2 the newforms module has had a re-factor, with validation pulled out into its own module (<em>django.core.validation</em>). Changes where required to the form introspection code that works out what validation is required client site. The upshot of these changes is that generating a JSON representation of the rules now requires a lot less code and is a lot simpler. =o)</p>
<p>The updated version code is now in the <a href="http://code.google.com/p/django-ajax-forms/source/browse/?r=02cec0f1879c75d106201161e7d4056a92dbc1d3">Django1.2 branch</a> until I can work out how I will merge back into trunk while maintaining backward compatibility.</p>
<p>More to come soon&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/poweredbypenguins.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/poweredbypenguins.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/poweredbypenguins.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/poweredbypenguins.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/poweredbypenguins.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/poweredbypenguins.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/poweredbypenguins.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/poweredbypenguins.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/poweredbypenguins.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/poweredbypenguins.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/poweredbypenguins.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/poweredbypenguins.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/poweredbypenguins.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/poweredbypenguins.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=44&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://poweredbypenguins.wordpress.com/2010/06/29/django-ajax-forms-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2f628263a3b0ec5fc3198c21c8ab79f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sledgy</media:title>
		</media:content>
	</item>
		<item>
		<title>Hacking up Gypsy</title>
		<link>http://poweredbypenguins.wordpress.com/2010/06/20/hacking-up-gypsy/</link>
		<comments>http://poweredbypenguins.wordpress.com/2010/06/20/hacking-up-gypsy/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 04:13:22 +0000</pubDate>
		<dc:creator>sledgy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[gpsd]]></category>
		<category><![CDATA[gypsy]]></category>

		<guid isPermaLink="false">http://www.poweredbypenguins.org/?p=36</guid>
		<description><![CDATA[I recently came across a great little project (part of freedesktop.org) called Gypsy. Gypsy is a dbus enabled replacement for gpsd. My own efforts are writing a GPS daemon are hosted on Google Code. My daemon was written entirely in &#8230; <a href="http://poweredbypenguins.wordpress.com/2010/06/20/hacking-up-gypsy/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=36&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently came across a great little project (part of freedesktop.org) called <a href="http://gypsy.freedesktop.org/wiki/">Gypsy</a>. Gypsy is a dbus enabled replacement for gpsd.</p>
<p>My own efforts are writing a GPS daemon are hosted on <a href="http://code.google.com/p/python-gpsd/">Google Code</a>. My daemon was written entirely in python and similar to Gypsy published information via dbus. But Gypsy has a number of advantages:</p>
<ul>
<li>Support for the garmin protocol</li>
<li>More complete implementation of NMEA and all DBUS information</li>
<li>Designed to be efficient for both client and server</li>
<li>Includes all configuration to run as a DBus service</li>
</ul>
<p>My only concern was a feature that I had written into my daemon and this was the ability to record an NMEA stream and replay the stream at any time. This becomes very useful when testing client software.</p>
<p><del datetime="2010-06-21T14:55:56+00:00">To this end I have written two patches for Gypsy to firstly add support for TCP and secondly add support for writing a time delta to the NMEA logs output by Gypsy as well as providing a Python tool for replaying these logs via a TCP socket.<br />
</del></p>
<p>The patches have been submitted to the Gypsy dev&#8217;s or can be fetched from the <a href="http://bugs.freedesktop.org/show_bug.cgi?id=28667">Freedesktop bugzilla</a>.</p>
<p>Update: after feedback from the gypsy maintainers I have updated my patch to simply record a delta to the log file. As of Gypsy 0.8 gypsy can now read from a named pipe the patch also includes a python script that can be used to replay the log.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/poweredbypenguins.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/poweredbypenguins.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/poweredbypenguins.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/poweredbypenguins.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/poweredbypenguins.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/poweredbypenguins.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/poweredbypenguins.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/poweredbypenguins.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/poweredbypenguins.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/poweredbypenguins.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/poweredbypenguins.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/poweredbypenguins.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/poweredbypenguins.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/poweredbypenguins.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=36&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://poweredbypenguins.wordpress.com/2010/06/20/hacking-up-gypsy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2f628263a3b0ec5fc3198c21c8ab79f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sledgy</media:title>
		</media:content>
	</item>
		<item>
		<title>More on IEnumerable and ICollection</title>
		<link>http://poweredbypenguins.wordpress.com/2010/06/11/more-on-ienumerable-and-icollection/</link>
		<comments>http://poweredbypenguins.wordpress.com/2010/06/11/more-on-ienumerable-and-icollection/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 23:39:20 +0000</pubDate>
		<dc:creator>sledgy</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[IEnumerable]]></category>

		<guid isPermaLink="false">http://www.poweredbypenguins.org/?p=27</guid>
		<description><![CDATA[Following up from my post yesterday on enhancing IEnumerable with additional features Phil Haack (Program Manager on ASP.NET for MS) posted a comment on the use of the Count Linq extension method and some of the dangers of using it &#8230; <a href="http://poweredbypenguins.wordpress.com/2010/06/11/more-on-ienumerable-and-icollection/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=27&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following up from my post yesterday on enhancing IEnumerable with additional features Phil Haack (Program Manager on ASP.NET for MS) posted a comment on the use of the Count Linq extension method and some of the dangers of using it with generic IEnumerables. With this in mind I would suggest updating my code to enhance ICollection which would remove this risk.</p>
<p>See Phil Haack&#8217;s post <a href="http://haacked.com/archive/2010/06/10/checking-for-empty-enumerations.aspx">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/poweredbypenguins.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/poweredbypenguins.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/poweredbypenguins.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/poweredbypenguins.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/poweredbypenguins.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/poweredbypenguins.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/poweredbypenguins.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/poweredbypenguins.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/poweredbypenguins.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/poweredbypenguins.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/poweredbypenguins.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/poweredbypenguins.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/poweredbypenguins.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/poweredbypenguins.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=27&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://poweredbypenguins.wordpress.com/2010/06/11/more-on-ienumerable-and-icollection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2f628263a3b0ec5fc3198c21c8ab79f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sledgy</media:title>
		</media:content>
	</item>
		<item>
		<title>Enhancing the ASP.NET MVC View fornext loop</title>
		<link>http://poweredbypenguins.wordpress.com/2010/06/10/enhancing-the-asp-net-mvc-view-fornext-loop/</link>
		<comments>http://poweredbypenguins.wordpress.com/2010/06/10/enhancing-the-asp-net-mvc-view-fornext-loop/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 00:45:22 +0000</pubDate>
		<dc:creator>sledgy</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[Collections]]></category>

		<guid isPermaLink="false">http://www.poweredbypenguins.org/?p=16</guid>
		<description><![CDATA[A common problem with the default ASP.NET MVC view engine, when rendering collections in a for/next construct is the inability to easily determine where you are in the loop. For example a common way of displaying a menu is to &#8230; <a href="http://poweredbypenguins.wordpress.com/2010/06/10/enhancing-the-asp-net-mvc-view-fornext-loop/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=16&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A common problem with the default ASP.NET MVC view engine, when rendering collections in a for/next construct is the inability to easily determine where you are in the loop. For example a common way of displaying a menu is to use unordered lists and produce the following markup:</p>
<pre class="brush:xml">&lt;ul class="menu&gt;
    &lt;li class="first"&gt;&lt;a href="/home"&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li class="selected"&gt;&lt;a href="/page-1"&gt;Page 1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/page-2"&gt;Page 2&lt;/a&gt;&lt;/li&gt;
    &lt;li class="last"&gt;&lt;a href="/page-3"&gt;Page 3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>With the basic for/next loop over an ICollection producing this output is rather difficult.</p>
<p>My solution is an extension method for ICollection that provides additional information about the loop.</p>
<pre class="brush:csharp">public static class CollectionExtensions
{
    public static IEnumerable&lt;LoopItem&lt;TSource&gt;&gt; Loop&lt;TSource&gt;(this ICollection&lt;TSource&gt; self)
    {
        if (self == null) throw new ArgumentNullException("self");

        var index = 0;
        var count = self.Count();

        foreach (var item in self)
        {
            yield return new LoopItem&lt;TSource&gt;(item, index, count);
            index++;
        }
    }
}

public class LoopItem&lt;TSource&gt;
{
    private int _count;

    internal LoopItem(TSource item, int index, int count)
    {
        this.Value  = item;
        this.Index  = index;
        this._count = count;
    }

    public TSource Value { get; private set; }

    public int Index { get; private set; }

    public bool IsOdd
    {
        get { return !this.IsEven; }
    }

    public bool IsEven
    {
        get { return this.Index % 2 == 0; }
    }

    public bool IsFirst
    {
        get { return this.Index == 0; }
    }

    public bool IsLast
    {
        get { return this.Index == (this._count - 1); }
    }
}</pre>
<p>With this code in place we can now do generate the menu from a collection with:</p>
<pre class="brush:xml">&lt;ul&gt;
    &lt;% foreach(var item in menuList.Loop()) {
        var classes = "";
        if (item.IsFirst) classes += "first ";
        if (item.IsLast) classes += "last ";%&gt;
        &lt;li class="&lt;%: classes %&gt;" &gt;
            &lt;%: Html.ActionLink(item.Value.Action, item.Value.Title) %&gt;
        &lt;/li&gt;
    &lt;% } %&gt;
&lt;/ul&gt;</pre>
<p>This makes displaying lists of data with specific classes a lot easier and simplifies your views. This same piece of code can also be used for rendering tables with odd/even rows.</p>
<p>Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/poweredbypenguins.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/poweredbypenguins.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/poweredbypenguins.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/poweredbypenguins.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/poweredbypenguins.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/poweredbypenguins.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/poweredbypenguins.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/poweredbypenguins.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/poweredbypenguins.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/poweredbypenguins.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/poweredbypenguins.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/poweredbypenguins.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/poweredbypenguins.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/poweredbypenguins.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=16&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://poweredbypenguins.wordpress.com/2010/06/10/enhancing-the-asp-net-mvc-view-fornext-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2f628263a3b0ec5fc3198c21c8ab79f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sledgy</media:title>
		</media:content>
	</item>
		<item>
		<title>Templatrix 1.1</title>
		<link>http://poweredbypenguins.wordpress.com/2010/04/04/templatrix-1-1/</link>
		<comments>http://poweredbypenguins.wordpress.com/2010/04/04/templatrix-1-1/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 17:02:53 +0000</pubDate>
		<dc:creator>sledgy</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Joocey Labs]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Templatrix]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.poweredbypenguins.org/?p=8</guid>
		<description><![CDATA[About two years ago I built the first version of Templatrix. To put it simply it&#8217;s a tool for generating the base HTML/XHTML template that you start with every time you do a new website cut up, or have a &#8230; <a href="http://poweredbypenguins.wordpress.com/2010/04/04/templatrix-1-1/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=8&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>About two years ago I built the first version of Templatrix. To put it simply it&#8217;s a tool for generating the base HTML/XHTML template that you start with every time you do a new website cut up, or have a brilliant idea you want to try out. Over that time I have used it a lot, but it was starting to show it&#8217;s age, it still referenced jQuery 1.2.x and still didn&#8217;t support optional extras (i.e. jQuery UI) that had been planned. So without further ado I present <a href="http://code.poweredbypenguins.org/Templatrix/">Templatrix 1.1.1</a>.</p>
<p>This version includes the following enhancements:</p>
<ul>
<li>References to all JavaScript and CSS libraries hosted by Google.</li>
<li>References to optional extra&#8217;s that certain JS and CSS libraries offer.</li>
<li>Tweaked UI (no more popup to select code) and enhancements from later releases of jQuery UI.</li>
<li>Everything minified and optomised.</li>
</ul>
<p>It&#8217;s been quite a busy weekend. First installing WordPress, crafting a template and a rebuild/new version of an old tool.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/poweredbypenguins.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/poweredbypenguins.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/poweredbypenguins.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/poweredbypenguins.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/poweredbypenguins.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/poweredbypenguins.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/poweredbypenguins.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/poweredbypenguins.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/poweredbypenguins.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/poweredbypenguins.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/poweredbypenguins.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/poweredbypenguins.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/poweredbypenguins.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/poweredbypenguins.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=8&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://poweredbypenguins.wordpress.com/2010/04/04/templatrix-1-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2f628263a3b0ec5fc3198c21c8ab79f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sledgy</media:title>
		</media:content>
	</item>
		<item>
		<title>First Post!</title>
		<link>http://poweredbypenguins.wordpress.com/2010/04/03/hello-world-2/</link>
		<comments>http://poweredbypenguins.wordpress.com/2010/04/03/hello-world-2/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 16:02:25 +0000</pubDate>
		<dc:creator>sledgy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.poweredbypenguins.org/?p=1</guid>
		<description><![CDATA[Well after sitting on the domain and only giving it some window dressing in 4 or is it 5 years. I&#8217;ve finally just installed word press and gotten on with it. The motivation was simple I guess, still paying for &#8230; <a href="http://poweredbypenguins.wordpress.com/2010/04/03/hello-world-2/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=13&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well after sitting on the domain and only giving it some window dressing in 4 or is it 5 years. I&#8217;ve finally just installed word press and gotten on with it. The motivation was simple I guess, still paying for the previous server that isn&#8217;t really doing anything except serving a blank page! that and it&#8217;s a long weekend and I&#8217;ve been bored.</p>
<p>Anyway if anybody actually reads this I&#8217;ll be surprised.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/poweredbypenguins.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/poweredbypenguins.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/poweredbypenguins.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/poweredbypenguins.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/poweredbypenguins.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/poweredbypenguins.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/poweredbypenguins.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/poweredbypenguins.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/poweredbypenguins.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/poweredbypenguins.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/poweredbypenguins.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/poweredbypenguins.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/poweredbypenguins.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/poweredbypenguins.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=poweredbypenguins.wordpress.com&amp;blog=20434633&amp;post=13&amp;subd=poweredbypenguins&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://poweredbypenguins.wordpress.com/2010/04/03/hello-world-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2f628263a3b0ec5fc3198c21c8ab79f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sledgy</media:title>
		</media:content>
	</item>
	</channel>
</rss>
