<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>cookingcoder</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/" />
    <link rel="self" type="application/atom+xml" href="http://www.cookingcoder.com/atom.xml" />
    <id>tag:www.cookingcoder.com,2010-02-16://4</id>
    <updated>2012-05-02T09:36:07Z</updated>
    <subtitle>Jack of all trades, master of muffins and computer science.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.32-en</generator>

<entry>
    <title>It&apos;s affine transformation, but I want perspective</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2012/04/not-affine-transformation-after-all.php" />
    <id>tag:www.cookingcoder.com,2012://4.64</id>

    <published>2012-04-30T14:31:17Z</published>
    <updated>2012-05-02T09:36:07Z</updated>

    <summary>I&apos;m writing a little software rasteriser which lets you apply an arbitrary transformation to a 2D image. This includes both translation, rotation, scaling and shearing (the affine transformations) as well as full perspective mapping. There are a few tricks to...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Coder" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="graphics" label="graphics" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="maths" label="maths" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="matrix" label="matrix" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p>I'm writing a little software rasteriser which lets you apply an arbitrary transformation to a 2D image. This includes both translation, rotation, scaling and shearing (the affine transformations) as well as full perspective mapping.</p>

<p>There are a few tricks to do quick affine transformations which I won't go into here; they're pretty easy to find, online and in books. Essentially, you exploit the fact that opposite sides are parallel in the quadrilateral (or <strong>quad</strong>) that defines the boundaries of the transformed image.</p>

<p>What is harder to find is dealing with perspective mapping; at least, in a 2D context.</p>

<h2>The mathematics of perspective</h2>

<p>A perspective-mapped rectangle has one or two vanishing points; the point at which opposite sides of the rectangle meet. Objects which are regularly spaced apart will appear closer together the further away they are, such as the sleepers on a railway track:</p>

<p class="center" style="text-align:center"><img src="http://www.cookingcoder.com/2012/04/30/5430937797_a710fd3f76.jpg" alt="Railroad at Sunset" height="500" width="334" /></p>

<p class="center" style="font-size: smaller;text-align:center">Picture taken by <a href="http://www.flickr.com/photos/michaelpwilson/5430937797/">Michael Wilson</a>. Used under <a href="http://creativecommons.org/licenses/by-nc-nd/2.0/">CC BY-NC-ND 2.0 license</a>.</p>

<p>The further back you go, the smaller everything gets. More specifically, the apparent size of an object is inversely proportional to its distance, reaching its limit at the vanishing point where everything is infinitely small. Obviously we can't just linearly interpolate between the corners of our quad, like we can with an affine transformation; we need to include the depth information in our calculation. The interpolation equation (shamelessly lifted from <a href="http://en.wikipedia.org/wiki/Texture_mapping#Perspective_correctness">Wikipedia</a>) :</p>

<p>$latex u^{}_{\alpha}= \frac{ (1 - \alpha ) \frac{ u_0 }{ z_0 } + \alpha \frac{ u_1 }{ z_1 } }{ (1 - \alpha ) \frac{ 1 }{ z_0 } + \alpha \frac{ 1 }{ z_1 } }$ where $latex 0 \le \alpha \le 1$ with endpoints specified by $latex u_0$ and $latex u_1$.</p>

<h2>Extruding flatland at an angle</h2>

<p>So that's great, but how exactly do you get that depth variable $latex z $ from a 2D quad? Consider the above equation. When $latex z_{\{0,1\}} = 1$ it is equivalent to linear interpolation. We know that the vanishing point is asymptotic and that the apparent size is inversely proportional to distance (or depth) - the latter is accounted for in the interpolation equation, so we need only select appropriate reference points.</p>

<p>Setting $latex z_v = 0 $ to represent the vanishing point will give us an asymptote via division by zero. Setting $latex z_0 = 1 $ will leave the point on the quad furthest from the vanishing point unchanged; now all we need is to find the depth of the point closer to the vanishing point $latex z_1 $ where $latex z_v \leq z_1 \leq z_0 $.</p>

<h3>Cross products and angry merchandise</h3>

<p>We can find out if there is a vanishing point by using the vector cross-product. If you're familiar with the vector cross-product, feel free to skip a few paragraphs. Otherwise, here is its definition:</p>




<p align="center">$latex
\vec{u} \times \vec{v} = (u_y v_z - v_y u_z) \mathbf{i} + (u_z v_x - v_z u_x) \mathbf{j} + (u_x v_y - v_x u_y) \mathbf{k}
$</p>




<p>This calculates the vector perpendicular to both $latex \vec{u}$ and $latex \vec{v}$ in three dimensional space. You will note that, in two dimensions, the z component is always zero, leaving us with the simplified equation </p>

<p class="center" style="text-align:center">$latex \vec{u} \times \vec{v} = (u_x v_y - v_x u_y) \mathbf{k} $</p>

<p>which means it is also the magnitude of that vector. It can be considered a measure of 'perpendicularness', as is apparent when taking the cross-product of the unit vectors: $latex \mathbf{i} \times \mathbf{j} = 1$ and $latex \mathbf{i} \times \mathbf{i} = 0$.</p>

<p>Diversion over. Take the vectors of two opposite sides of our perspective-mapping quad:</p>

<p class="center" style="text-align:center"> $latex
\vec{AB} & = (b_x - a_x, b_y - a_y) \\
\vec{DC} & = (c_x - d_x, c_y - d_y) \\
\vec{OA} & = (a_x, a_y) \\
\vec{OD} & = (d_x, d_y) $ </p>

<p>where $latex \vec{OA}, \vec{OD} $ is the vector from the origin to points A and D, respectively. If the cross-product $latex \vec{AB} \times \vec{DC} = 0 $ then the lines are parallel and there is no vanishing point; otherwise we may find the intersection by calculating the point at which the two line equations are equal:</p>

<p class="center" style="text-align:center">$latex \vec{OA} + \gamma \vec{AB} = \vec{OD} + \delta \vec{DC} $</p>

<p>Cross both sides by $latex \vec{DC} $:</p>




<p align="center">$latex
(\vec{OA} + \gamma \vec{AB}) \times \vec{DC} & = (\vec{OD} + \delta \vec{DC}) \times \vec{DC} \\
\vec{OA} \times \vec{DC} + \gamma \vec{AB} \times \vec{DC} & = \vec{OD} \times \vec{DC} + \delta \vec{DC} \times \vec{DC} \\
\gamma & = \frac{(\vec{OD} - \vec{OA}) \times \vec{DC}} {\vec{AB} \times \vec{DC}}
$</p>




<p>Making use of the cross-product identity $latex \vec{DC} \times \vec{DC} = 0 $.</p>

<p>Now we have our value for $latex \gamma $ we may substitute it into the first line equation to find our intersection point, aka. the vanishing point:</p>




<p align="center">$latex
(v_x, v_y) = \vec{OA} + \vec{AB} \frac{(\vec{OA} - \vec{OD}) \times \vec{DC}} {\vec{AB} \times \vec{DC}}
$</p>




<p>Note that if $latex \gamma $ is negative then the intersection lies in the direction opposite $latex \vec{AB} $, making B the farthest point from the vanishing point and therefore the nearest point to us.</p>

<h3>The depth equation</h3>

<p>Now we may calculate the depth of the farthest point $latex f $ by linearly interpolating between the nearest point to us (A or B as found in the last paragraph; referred to in the equations as $latex n $) and our vanishing point $latex v $, and applying our depth formula. Remember that $latex z_v = 0, z_0 = 1$ .</p>




<p align="center">$latex
f & = z_1 n + (1 - z_1) v \\
 & = v + z_1 (n - v) \\
z_1 & = \frac{f-v}{n-v}
$</p>




<h2>Tying it all together</h2>

<p><img alt="Two-point Perspective, depth labelled" src="http://www.cookingcoder.com/2012/05/01/twopoint-depth.png" width="198" height="100" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></p>

<p>With two-point perspective, the depth is the same along each parallel edge, with the longest at $latex z_0 $ and the other $latex z_1 $. However, three-point perspective places each corner at a different depth. We calculate the depth of the two points on the same line as the nearest point, and then calculate the final point's depth as the product of the two adjacent to it. (Two-point perspective is a special case of this method - can you see why?)</p>

<p><img alt="Three-point Perspective, depth labelled" src="http://www.cookingcoder.com/2012/05/01/threepoint-perspective.png" width="307" height="380" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></p>

<p>Luckily for us, depth along these lines <strong>is</strong> a linear function - so we now have everything we need to map perspective. First, find the line upon which our u, v coordinates lie by interpolating by $latex \alpha $ on opposite sides of the quad.</p>

<p class="center" style="text-align:center">
$latex
\vec{AB_{\alpha}} &= \frac{ (1 - \alpha ) \frac{ \vec{A} }{ z_A } + \alpha \frac{ \vec{B} }{ z_B } }{ (1 - \alpha ) \frac{ 1 }{ z_A } + \alpha \frac{ 1 }{ z_C } } \\
\vec{DC_{\alpha}} &= \frac{ (1 - \alpha ) \frac{ \vec{D} }{ z_D } + \alpha \frac{ \vec{C} }{ z_C } }{ (1 - \alpha ) \frac{ 1 }{ z_D } + \alpha \frac{ 1 }{ z_B } } \\
z_{AB} &= ( 1 - \alpha ) z_A + \alpha z_B \\
z_{DC} &= ( 1 - \alpha ) z_D + \alpha z_C
$
</p>

<p>Now we can calculate u, v by interpolating along the line between those two points.</p>

<p class="center" style="text-align:center">
$latex
\vec{u_{\alpha}v_{\beta}} &= \frac{ (1 - \beta ) \frac{ \vec{AB_\alpha} }{ z_{AB} } + \beta \frac{ \vec{DC_\alpha} }{ z_{DC} } }{ (1 - \beta ) \frac{ 1 }{ z_{AB} } + \beta \frac{ 1 }{ z_{DC} } }
$
</p>

<p><img alt="UV coordinate calculation" src="http://www.cookingcoder.com/2012/05/01/uv.png" width="200" height="200" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></p>

<p>This just leaves one part left: how do we use these coordinates to render our image? And how do we actually render the image efficiently? This will be revealed in the next part coming soon...</p>]]>
        
    </content>
</entry>

<entry>
    <title>A US keyboard with a UK pound sign</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2012/04/a-us-keyboard-with-a-uk-pound-sign.php" />
    <id>tag:www.cookingcoder.com,2012://4.63</id>

    <published>2012-04-03T18:48:54Z</published>
    <updated>2012-04-03T19:19:50Z</updated>

    <summary>I bought a mechanical keyboard from the USA a few months ago and absolutely love the action on it. Of course, an American keyboard brings with it an American layout - and while the wide shift keys on both sides...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Coder" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="keyboard" label="keyboard" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="windows" label="windows" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p>I bought <a href="http://williamjudd.com/2011/06/24/leopold-fc200rt-tenkeyless-linear-black-review/">a mechanical keyboard</a> from the USA a few months ago and absolutely love the action on it. Of course, an American keyboard brings with it an American layout - and while the wide shift keys on both sides and the subtle positioning differences of the keys are nice to have, every Brit needs to be able to enter £ signs.</p>

<p>Ubuntu comes with enough layouts and the customisation provided by (X? Gnome?) to do this out of the box, but Windows was a little more tricky. The United States-International layout gave you a pound but also gave you a whole bunch of dead keys for entering accents - a total deal-breaker, since every time you press quote or apostrophe, it waits for you to enter a letter (to add an accent) or hit space if you just want a quote. The UK Extended layout manages to deal with this in a superior way, by adding accents only when you hit the Alt-Gr key as in (Alt-Gr + ^, e) for ê.</p>

<p>Fortunately, Microsoft provides a <a href="http://msdn.microsoft.com/en-us/goglobal/bb964665">keyboard layout creator</a>, so I duly modified the US-International layout to be more like UK Extended, using right Alt for dead key accents. Now I can (right-Alt + $) for a £ and enter quotes and apostrophes like a regular layout!</p>

<p>The best thing of all is that it&#8217;s easy to distribute the layouts. You can <a href="http://www.chrisbranch.co.uk/downloads/us-intl-deadkeys.zip">download my keyboard layout</a>, run the installer, and have a pound-friendly American keyboard layout without any fuss. Hopefully this will save other people time searching for a solution.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>London Cocktail Week</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2011/10/london-cocktail-week.php" />
    <id>tag:www.cookingcoder.com,2011://4.62</id>

    <published>2011-10-29T22:38:59Z</published>
    <updated>2011-10-30T04:02:27Z</updated>

    <summary> At the start of this month, dozens of bars prepared themselves for London Cocktail Week, each one serving their unique signature cocktail for the exceptionally reasonable price of £4. I found out about this from my girlfriend who thought...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="CB" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="cocktails" label="cocktails" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="drinks" label="drinks" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="events" label="events" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="london" label="london" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p><a href="http://www.cookingcoder.com/assets_c/2011/10/DPP_0001-107.php" onclick="window.open('http://www.cookingcoder.com/assets_c/2011/10/DPP_0001-107.php','popup','width=720,height=1080,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.cookingcoder.com/assets_c/2011/10/DPP_0001-thumb-240x360-107.jpg" width="240" height="360" alt="Teenage Blues cocktail" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /></a></p>

<p>At the start of this month, dozens of bars prepared themselves for London Cocktail Week, each one serving their unique signature cocktail for the exceptionally reasonable price of £4. I found out about this from my girlfriend who thought it&#8217;d be a fun thing to do - as indeed it was.</p>

<p>We kicked it off at Shaker &amp; Co. Shown here is their Teenage Blues cocktail with a portion going to support the Teenage Cancer Trust. My personal favourite was their Benedictine and grapefruit cocktail &#8216;Le Pamplemousse&#8217;. Amazingly, these guys opened their bar for the first time on the very first night of the week - if they call that a &#8216;soft launch&#8217;, I can only wonder what numbers the guys behind them are used to.</p>

<p><a href="http://www.cookingcoder.com/assets_c/2011/10/DPP_0002-109.php" onclick="window.open('http://www.cookingcoder.com/assets_c/2011/10/DPP_0002-109.php','popup','width=720,height=1080,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.cookingcoder.com/assets_c/2011/10/DPP_0002-thumb-240x360-109.jpg" width="240" height="360" alt="Le Pamplemousse cocktail" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></a></p>

<p>We spent a lot of our time there having too much fun with their Canadian bartender (your name escapes me now, sorry!) and the flamboyant drinks he made for us afterwards. Nevertheless we finally headed out to Centre Point, ascending to the 34th floor of one of the oldest skyscrapers in London to visit the Paramount bar.</p>

<p><a href="http://www.cookingcoder.com/assets_c/2011/10/Centre_Point_London-111.php" onclick="window.open('http://www.cookingcoder.com/assets_c/2011/10/Centre_Point_London-111.php','popup','width=333,height=600,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.cookingcoder.com/assets_c/2011/10/Centre_Point_London-thumb-150x270-111.jpg" width="150" height="270" alt="Centre Point" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /></a></p>

<p>The tour continued on Tuesday around Camden. Coco Bamboo offered spicy mint mojitos (i.e. your regular mojito but with Bacardi&#8217;s new Oakheart spirit). The Hawley Arms offered a rather non-descript Jack Daniels-based drink - I doubt Amy Winehouse loved the place for its alcohol.</p>

<p>One of the star bars was a gin and real ale bar, <a href="http://thecolonelfawcett.co.uk/">The Colonel Fawcett</a>, who gave us this fine Tom Collins with added Chambourd. I&#8217;m not normally a gin fan but I do love raspberry, and this turned out to be a great cocktail that&#8217;s a little too easy to drink! If you go, check out the menu - the chocolate and chestnut cake with hazelnut ice cream is fantastic and everything you could possibly ask of a dessert.</p>

<p><a href="http://www.cookingcoder.com/assets_c/2011/10/DPP_0003-113.php" onclick="window.open('http://www.cookingcoder.com/assets_c/2011/10/DPP_0003-113.php','popup','width=720,height=1080,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.cookingcoder.com/assets_c/2011/10/DPP_0003-thumb-240x360-113.jpg" width="240" height="360" alt="Colonel Tom Collins" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></a></p>

<p>Our final bar was <a href="http://cottonscamden.co.uk/">Cottons</a>, who have supremely knowledgeable staff who love rum and making interesting cocktails. One favourite was a malty cocktail made with condensed milk, Jamaican Dragon Stout (it is a rhum shack after all) and a few other additions blended together into a deliciously creamy drink. It&#8217;s like a mudslide made with <a href="http://en.wikipedia.org/wiki/Bournvita">Bournvita</a>.</p>

<p>At the end of the night I asked our bartender to make a cocktail that met a particular taste profile I wanted. The good news is it was one of the most delicious alcoholic beverages I have consumed. The bad news is, I was too drunk to remember it or think about writing it down. It&#8217;s too bad; I guess I&#8217;ll just have to go there again&#8230;</p>

<p>The London Cocktail Week lasted until the 16th of October. While we only managed two days, maybe next year I&#8217;ll be able to last the whole week. After all, if you don&#8217;t come out never wanting to touch a drop again, you probably haven&#8217;t gone far enough.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Heavy-duty persistence for Lua</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2011/05/heavy-duty-persistence-for-lua.php" />
    <id>tag:www.cookingcoder.com,2011://4.61</id>

    <published>2011-05-24T15:17:11Z</published>
    <updated>2011-05-24T15:28:26Z</updated>

    <summary>I was using Lua for my final year project, but found some bugs with the Pluto library on 64-bit systems. Pluto lets you serialise almost any Lua object into a flat representation; tables, functions, even coroutines, which allowed me to...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Coder" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="continuations" label="continuations" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="github" label="github" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="lua" label="lua" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p>I was using Lua for my final year project, but found some bugs with the Pluto library on 64-bit systems.</p>

<p>Pluto lets you serialise almost any Lua object into a flat representation; tables, functions, even coroutines, which allowed me to recreate continuations in Lua, albeit with some limitations.</p>

<p>However, the library seemingly hadn&#8217;t been updated since early 2010, and there were a few problems. Digging on the lua-users mailing list I found that someone else had taken over maintenance and posted the code on github. If I&#8217;d found this earlier it would&#8217;ve saved me a lot of time!</p>

<p>Hopefully future users can find it more quickly: <a href="https://github.com/hoelzro/pluto">Pluto - Heavy Duty Persistence for Lua</a></p>
]]>
        

    </content>
</entry>

<entry>
    <title>Cook the basics... Rice</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/11/cook-the-basics-rice.php" />
    <id>tag:www.cookingcoder.com,2010://4.58</id>

    <published>2010-11-15T22:22:29Z</published>
    <updated>2010-11-15T22:37:36Z</updated>

    <summary>It&#8217;s really not that hard If you have scales and a timer. However, this simple technique is easily destroyed by the insatiable curiosity some people have, so the recipe is a little longer than usual. Pay particular attention to the...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Cooking" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="basics" label="basics" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="itoldyounottotouchit" label="i told you not to touch it" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rice" label="rice" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p>It&#8217;s really not that hard If you have scales and a timer. However, this simple technique is easily destroyed by the insatiable curiosity some people have, so the recipe is a little longer than usual. Pay particular attention to the steps in bold.</p>

<h2>STAGE ONE: Preparation</h2>

<ul>
<li>Measure your rice. 80g per person is good.</li>
<li>Wash your rice in a sieve until the water runs clear, to remove all the starches.</li>
<li>Put it in the pot.</li>
<li>Add 1.75x as much cold water by weight, or 1.5x by volume.</li>
</ul>

<h2>STAGE TWO: Cook</h2>

<ul>
<li>Put a lid on the pot.</li>
<li><strong>DO NOT TAKE THE LID OFF AGAIN.</strong></li>
<li>Bring it to the boil and then simmer for however long the packet says. <br />
Long grain = 10 minutes, basmati = 12 minutes, brown rice = 20+.</li>
<li><strong>DO NOT TOUCH THE POT.</strong></li>
<li>Once the time is up, <strong>LET IT STAND FOR 5 MINUTES</strong></li>
<li><strong>LEAVE THE LID ON.</strong></li>
<li><strong>LET IT STAND.</strong></li>
<li>Then serve.</li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>God the Software Developer</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/06/god-the-software-developer.php" />
    <id>tag:www.cookingcoder.com,2010://4.57</id>

    <published>2010-06-30T10:32:51Z</published>
    <updated>2010-06-30T10:34:38Z</updated>

    <summary>Stolen off reddit: Look, most new products spend YEARS in development - god only spent 6 days rushing out the entire universe, and only a single day on humans (if that). When you rush things out they contain bugs and...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Coder" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="bugs" label="bugs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="religion" label="religion" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p><a href="http://www.reddit.com/r/atheism/comments/ckdap/homosexuality_and_religion_pic/c0t79t1">Stolen off reddit:</a></p>

<blockquote>
  <p>Look, most new products spend YEARS in development - god only spent 6 days rushing out the entire universe, and only a single day on humans (if that). When you rush things out they contain bugs and after that you need to patch them and maintain them.</p>

<p>Adam and Eve were corrupted by a snake (worm) and everything went south from there - you can see it time and time again; god backed up his important documents and placed them in an ark and then formatted the world, before declaring he should never have to do it again, yet he reguarly formats mini sections of the globe in a haphazard manner.</p>

<p>Jesus represents a sort of Service Pack, however it is clear that after that God just sort of gave up and hasn&#8217;t bothered to make any updates since.</p>
</blockquote>
]]>
        

    </content>
</entry>

<entry>
    <title>Chocolate ice cream</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/06/chocolate-ice-cream.php" />
    <id>tag:www.cookingcoder.com,2010://4.56</id>

    <published>2010-06-20T19:38:28Z</published>
    <updated>2010-06-20T20:22:52Z</updated>

    <summary>Whenever there&#8217;s an offer on the premium chocolates I tend to stock up. Lately I&#8217;ve been eating my chocolate quite slowly and have built up a little cache as a result. So what do you do when there&#8217;s yet another...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Cooking" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="chocolate" label="chocolate" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dessert" label="dessert" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="icecream" label="ice cream" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p>Whenever there&#8217;s an offer on the premium chocolates I tend to stock up. Lately I&#8217;ve been eating my chocolate quite slowly and have built up a little cache as a result. So what do you do when there&#8217;s yet another offer at the supermarket?</p>

<p>You make chocolate desserts, of course.</p>

<p>As it&#8217;s summer, the first dessert you ought to make is <strong>ice cream</strong>. It&#8217;s simple to make if you&#8217;ve got an ice cream maker, otherwise it can be a bit of a faff to freeze slightly, blend, freeze, blend, freeze&#8230; the manual process makes it a special occasion piece, the ice cream maker enables it to be a regular occurrence.</p>

<p style="text-align: center; font-style: italic;"><a href="http://www.cookingcoder.com/assets_c/2010/06/IMG_1843-104.php" onclick="window.open('http://www.cookingcoder.com/assets_c/2010/06/IMG_1843-104.php','popup','width=1000,height=578,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.cookingcoder.com/assets_c/2010/06/IMG_1843-thumb-500x289-104.jpg" width="500" height="289" alt="ice cream maker" class="mt-image-center" style="display: block; margin: 0 auto 20px;" /></a>
Churn, baby, churn</p>

<p><a href="http://www.bbcgoodfood.com/recipes/6980/bitter-chocolate-ice-cream">This recipe from Olive magazine</a> gives you a rich, bitter chocolate-lover&#8217;s ice cream. I prefer to substitute half the cocoa for an equivalent amount of 70% dark chocolate - not a large difference, but I prefer it.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Lighttpd, PHP 5.3 and MySQL 5.1 on a small VPS</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/06/lighttpd-php-53-and-mysql-on-a-small-vps.php" />
    <id>tag:www.cookingcoder.com,2010://4.55</id>

    <published>2010-06-08T11:18:34Z</published>
    <updated>2010-06-08T14:06:03Z</updated>

    <summary>To save money, I decided to migrate several of my family&#8217;s websites to a VPS. Now, setting up lighttpd is a piece of cake, but because these websites are dynamic, database-backed affairs, you have to do a little more work....</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Coder" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="lighttpd" label="lighttpd" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="linux" label="linux" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mysql" label="mysql" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="php" label="php" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="vps" label="vps" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="websites" label="websites" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p>To save money, I decided to migrate several of my family&#8217;s websites to a VPS. Now, setting up <a href="http://www.lighttpd.net/">lighttpd</a> is a piece of cake, but because these websites are dynamic, database-backed affairs, you have to do a little more work. I might be a programmer, but I&#8217;m not really a Linux expert.</p>

<p>That said, it was relatively painless, and in contrast to some previous experience. Besides, who needs tech support if you have Google and a decent brain in your head?</p>

<h1>Why Lighty?</h1>

<p>Apache is very well known and full-featured. It&#8217;s also rather memory-hungry. Lighttpd has a far smaller memory footprint, but still has a lot of capability; if YouTube and Wikipedia prefer it over Apache, it&#8217;ll be just fine for my piddly little sites.</p>

<p>The smaller memory means I can get away with a smaller VPS. I&#8217;m using an incredibly inexpensive 128MB instance from <a href="http://prgmr.com/xen/">Prgmr</a>. Even that is overkill, but then I&#8217;m not using the server solely for websites.</p>

<p>Also, configuring lighty is pretty simple. I never had much fun configuring Apache.</p>

<h1>Step 0: download all you require</h1>

<p>I chose to build <a href="http://www.lighttpd.net/download/">lighttpd</a> and <a href="http://www.php.net/downloads.php">PHP</a> from source for more control. For MySQL, I decided to install a package provided by the <a href="http://iuscommunity.org/">IUS Community Project</a> (more details on doing this yourself <a href="http://wiki.iuscommunity.org/Doc/ClientUsageGuide">here</a>).</p>

<h1>Step 1: get lighttpd working</h1>

<p><a href="http://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource">Follow the guide</a>, obeying the instructions for your particular distribution.</p>

<p>It would be wise to create a unprivileged user for lighttpd to run as. After installing,</p>

<pre><code>addgroup www
adduser -g www -M www
</code></pre>

<p>Now let&#8217;s create somewhere for the websites to reside:</p>

<pre><code>mkdir /var/www
mkdir /var/www/default
echo hello world &gt;/var/www/default/index.html
chown -R www:www /var/www/default
</code></pre>

<p>Finally, setup lighttpd.conf (should reside at /etc/lighttpd/lighttpd.conf) with the following:</p>

<pre><code>server.username = "www"
server.groupname = "www"
server.document-root = "/var/www/default/"

mimetype.assign = (
  ".html" =&gt; "text/html", 
  ".txt" =&gt; "text/plain",
  ".jpg" =&gt; "image/jpeg",
  ".png" =&gt; "image/png" 
)
</code></pre>

<p>Run <code>/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf</code> and try connecting to your server. If you get the &#8216;hello world&#8217; message, everything is rosy. Press Ctrl+C to stop lighttpd and install the other bits.</p>

<p>Don&#8217;t forget to <code>/sbin/chkconfig lighttpd on</code> so that lighty runs on server startup.</p>

<h1>Step 2: install MySQL</h1>

<p>I did this from a package, so nothing more to say here than <code>yum install mysql51 mysql51-server mysql51-devel</code>.</p>

<p>It&#8217;s important you install the development package as PHP requires the MySQL libraries/header files for MySQL support.</p>

<p>After installation, run <code>/usr/bin/mysql_secure_installation</code> to finish setting up the database. (Very important!) Follow the prompts and accept their suggestions.</p>

<p>Check you can connect to the database with <code>mysql --user=root --password</code>. If everything&#8217;s fine, go create a database and a <a href="http://dev.mysql.com/doc/refman/5.1/en/adding-users.html">user account</a> for your PHP website to use later.</p>

<p>Again, <code>/sbin/chkconfig mysqld on</code>.</p>

<h1>Step 3: build and install PHP</h1>

<pre><code>yum install flex bison
tar xvjf php-5.3.2.tar.bz2
cd php-5.3.2
./configure --with-mysql
make
su make install
cp php.ini-production /usr/local/lib/php.ini
</code></pre>

<p>You probably want to pass more options to <code>./configure</code> depending on what libraries you need support for, or alternatively don&#8217;t want support for. A <a href="http://www.php.net/manual/en/configure.about.php">full list</a> is here. Configure will complain if it can&#8217;t find PHP&#8217;s dependencies, but it&#8217;s not too hard to sort out (hooray for package managers!).</p>

<p>Edit your lighttpd.conf to add the following:</p>

<pre><code>server.modules += ( <font color="#ff40ff"><b>&quot;mod_fastcgi&quot;</b></font> )

fastcgi.server = ( <font color="#ff40ff"><b>&quot;.php&quot;</b></font> =&gt;
                   ( <font color="#ff40ff"><b>&quot;localhost&quot;</b></font> =&gt;
                     (
                       <font color="#ff40ff"><b>&quot;socket&quot;</b></font> =&gt; <font color="#ff40ff"><b>&quot;/tmp/php.socket&quot;</b></font>,
                       <font color="#ff40ff"><b>&quot;bin-path&quot;</b></font> =&gt; <font color="#ff40ff"><b>&quot;/usr/local/bin/php-cgi&quot;</b></font>,
                       <font color="#ff40ff"><b>&quot;bin-environment&quot;</b></font> =&gt; (
                         <font color="#ff40ff"><b>&quot;PHP_FCGI_CHILDREN&quot;</b></font> =&gt; <font color="#ff40ff"><b>&quot;16&quot;</b></font>,
                         <font color="#ff40ff"><b>&quot;PHP_FCGI_MAX_REQUESTS&quot;</b></font> =&gt; <font color="#ff40ff"><b>&quot;10000&quot;</b></font>
                       ),
                       <font color="#ff40ff"><b>&quot;bin-copy-environment&quot;</b></font> =&gt; (
                         <font color="#ff40ff"><b>&quot;PATH&quot;</b></font>, <font color="#ff40ff"><b>&quot;SHELL&quot;</b></font>, <font color="#ff40ff"><b>&quot;USER&quot;</b></font>
                       ),
                       <font color="#ff40ff"><b>&quot;min-procs&quot;</b></font> =&gt; 1,
                       <font color="#ff40ff"><b>&quot;max-procs&quot;</b></font> =&gt; 1,
                       <font color="#ff40ff"><b>&quot;idle-timeout&quot;</b></font> =&gt; 20
                     )
                   )
                )
</code></pre>

<p>This sets up FastCGI for use with PHP. You should restart lighttpd to make the changes take effect (<code>/etc/init.d/lighttpd restart</code>) and test if PHP is working in the classic manner (<code>echo &lt;?php phpinfo() ?&gt; &gt;/var/www/default/phpinfo.php</code>). Go to http://<your server>/phpinfo.php and see what happens!</p>

<p>Now go and configure to your heart&#8217;s content. Have fun!</p>

<h2>Things I do</h2>

<p>I use mod_rewrite, mod_redirect and mod_accesslog, among others. As you can see, lighty is quite powerful.</p>

<pre><code><font color="#00ffff"><b># Redirect subdomainless addresses to their www equivalents</b></font>
$HTTP[<font color="#ff40ff"><b>&quot;host&quot;</b></font>] =~ <font color="#ff40ff"><b>&quot;^([^.]+)\.(com|co\.uk|net)$&quot;</b></font>{
  url.redirect            = ( <font color="#ff40ff"><b>&quot;^/(.*)&quot;</b></font> =&gt; <font color="#ff40ff"><b>&quot;http://www.%0/$1&quot;</b></font> )
}

<font color="#00ffff"><b># Rewrite subdomains.domain.com to doc-root/subdomain</b></font>
$HTTP[<font color="#ff40ff"><b>&quot;host&quot;</b></font>] =~ <font color="#ff40ff"><b>&quot;^(.*)\.starfishgames\.co\.uk$&quot;</b></font> {
  server.document-root = <font color="#ff40ff"><b>&quot;/var/www/starfishgames.co.uk/pages/&quot;</b></font>
  url.rewrite-once = ( <font color="#ff40ff"><b>&quot;^/(.*)&quot;</b></font> =&gt; <font color="#ff40ff"><b>&quot;/%1/$1&quot;</b></font> )
  accesslog.filename   = <font color="#ff40ff"><b>&quot;/var/www/starfishgames.co.uk/access.log&quot;</b></font>
}
</code></pre>
]]>
        

    </content>
</entry>

<entry>
    <title>There is good espresso, and then there is bad espresso</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/05/there-is-good-espresso-and-then-there-is-bad-espresso.php" />
    <id>tag:www.cookingcoder.com,2010://4.54</id>

    <published>2010-05-15T13:56:16Z</published>
    <updated>2010-05-15T14:01:14Z</updated>

    <summary>This article appeals to the coffee snob in me, and might go some way to explaining why you might love coffee but hate espresso. I had no idea that anyone could contemplate using as much as 20 grams of it...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Cooking" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="coffee" label="coffee" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="espresso" label="espresso" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p><a href="http://www.theatlantic.com/food/archive/2010/05/a-winning-formula-for-traditional-espresso/56621/">This article appeals to the coffee snob in me</a>, and might go some way to explaining why you might love coffee but hate espresso.</p>

<p>I had no idea that anyone could contemplate using as much as 20 grams of it for a double, let alone a single - ugh! At least now I know how some places manage to make such syrupy drinks. And these are the same places that will give you weak tea, when they&#8217;re doing the coffee equivalent of stuffing four teabags into a mug.</p>

<p>Crazy world.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Electoral reformers... proportionally represent!</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/05/electoral-reformers-proportionally-represent.php" />
    <id>tag:www.cookingcoder.com,2010://4.53</id>

    <published>2010-05-08T06:29:36Z</published>
    <updated>2010-05-08T07:05:37Z</updated>

    <summary>The election results are in and the UK has a hung parliament. Nobody wins. Especially not the people. The Conservatives have 36% of the popular vote and 47% of parliament. 29% of people voted Labour, awarding them 40% of seats....</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="CB" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="politics" label="politics" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p>The election results are in and the UK has a hung parliament. Nobody wins.</p>

<p>Especially not the people.</p>

<p>The Conservatives have 36% of the popular vote and 47% of parliament. <br />
29% of people voted Labour, awarding them 40% of seats. <br />
Finally, the Liberal Democrats get 23% of votes, but just 9% of seats. <br />
(<a href="http://news.bbc.co.uk/1/shared/election2010/results/">source</a>)</p>

<p>In what world is this disparity between the electorate&#8217;s wishes and the actual result fair?</p>

<p>It&#8217;s not even the first time our voting system has given skewed results. In 2005, Labour got 3% more votes than the Conservatives across the entire country, yet this translated to 24% more seats in parliament.</p>

<p>As a result of our political system&#8217;s inherent need to form a majority government, we are going to see a possible Con-Lib or Lab-Lib coalition. This is unlikely to please voters of any of the three major parties due to conflicting policy interests. Britain simply isn&#8217;t used to compromise, and as a result we have a real problem dealing with it in times, like now, when it is required.</p>

<p>Storm clouds of discontent have been brewing ever since it became possible for less than <em>two-fifths</em> of the population to set the government for the entire country. Now we have no majority party we are forced to deal with it. Perhaps, at long last, we will.</p>

<p>We don&#8217;t need superficial change, as presented by the Tories. We need genuine reform.</p>

<p>We need to <a href="http://www.takebackparliament.com/">take back parliament</a>.</p>

<p>More info on <a href="http://www.lightrefrain.net/election2010/">the hard facts, with charts visualising where your votes go - or don&#8217;t</a>.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Tis the season of asparagus</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/05/tis-the-season-of-asparagus.php" />
    <id>tag:www.cookingcoder.com,2010://4.52</id>

    <published>2010-05-08T05:27:16Z</published>
    <updated>2010-05-08T06:28:22Z</updated>

    <summary>Ooh, you know you want some. My first encounter with asparagus was at an Italian restaurant in a risotto - it was pretty damned delicious. Besides which, there are few vegetables with that unique, inviting look, much less any that...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Cooking" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="asparagus" label="asparagus" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="cajun" label="cajun" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="cheese" label="cheese" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="salsa" label="salsa" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tuna" label="tuna" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p>Ooh, you know you want some. My first encounter with asparagus was at an Italian restaurant in a risotto - it was pretty damned delicious. Besides which, there are few vegetables with that unique, inviting look, much less any that retain that look post-cooking.</p>

<p><img alt="Asparagus spears" src="http://www.cookingcoder.com/2010/05/08/509183469_c4eb646286.jpg" width="500" height="334" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto;" /> <br />
(photo by <a href="http://www.flickr.com/photos/itsjustanalias/509183469/">itsjustanalias</a>)</p>

<p>Tonight I am going to try it with <a href="http://www.guardian.co.uk/lifeandstyle/2010/may/08/asparagus-tomato-salsa-cheese-ottolenghi">tomato salsa and mild, crumbly cheese</a>. I&#8217;m personally substituting the suggested cheese for Caerphilly; one day I&#8217;ll have the budget to let me mimic the foodies&#8217; experiences, but knowing cheaper and more readily available substitutes to the niche ingredients is <em>very</em> useful for a budding cook.</p>

<p>Also on the menu: diced tuna lightly rubbed with Cajun spices (Bart&#8217;s make a nice mix). Clearly I&#8217;m making up for our grill pan&#8217;s months of disuse.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Jarvis Cocker&apos;s Ragdoll Records</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/03/jarvis-cockers-ragdoll-records.php" />
    <id>tag:www.cookingcoder.com,2010://4.50</id>

    <published>2010-03-17T13:00:00Z</published>
    <updated>2010-03-16T14:55:51Z</updated>

    <summary> Has anyone played those games where you have to drag a ragdoll body with the mouse? That&#8217;s what immediately sprang to mind when I saw the picture of Jarvis Cocker on iPlayer. Someone&#8217;s clicked on his head and is...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="CB" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="6music" label="6music" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="jarviscocker" label="Jarvis Cocker" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="music" label="music" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="radio" label="radio" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p><img alt="Jarvis Cocker 6music picture" src="http://www.cookingcoder.com/2010/03/16/jarvis_cocker.jpg" width="276" height="360" class="mt-image-center" style="float: left; display: block; margin: 0 10px;" /></p>

<p>Has anyone played those games where you have to drag a ragdoll body with the mouse?</p>

<p>That&#8217;s what immediately sprang to mind when I saw the picture of Jarvis Cocker on iPlayer. Someone&#8217;s clicked on his head and is dragging him across the side of the screen, hoping they might rub some static electricity into his hair.</p>

<p>It&#8217;s not just me, is it? Probably is. Oh well. <a href="http://www.bbc.co.uk/6music/shows/jarviscocker/">Jarvis&#8217;s show is really good, though.</a> Support him, and with it, 6music, by listening in. <a href="http://save6music.com/">6music needs all your help</a> - nay, <strong>INDEPENDENT MUSIC NEEDS YOUR HELP</strong>. There are few outlets for new artists or anyone who strays from the mainstream; if the BBC follows through with its plan to axe 6music it will be a serious blow to musicians and music lovers. Do all you can to convince them otherwise.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Delicious chocolate pots</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/03/delicious-chocolate-pots.php" />
    <id>tag:www.cookingcoder.com,2010://4.49</id>

    <published>2010-03-16T13:53:55Z</published>
    <updated>2010-03-16T14:16:29Z</updated>

    <summary>A rich, tasty and easy-to-prepare dessert - all it requires is patience Serves 2-3, depending on how greedy you feel Ingredients: 100g good-quality dark chocolate (for eating, not baking) 150ml carton of double cream 1 medium egg yolk A splash...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Cooking" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="chocolate" label="chocolate" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dessert" label="dessert" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p><em>A rich, tasty and easy-to-prepare dessert - all it requires is patience</em></p>

<p><a href="http://www.cookingcoder.com/assets_c/2010/03/chocolatepot-99.php" onclick="window.open('http://www.cookingcoder.com/assets_c/2010/03/chocolatepot-99.php','popup','width=1600,height=1067,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.cookingcoder.com/assets_c/2010/03/chocolatepot-thumb-500x333-99.jpg" width="500" height="333" alt="Chocolate pot" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></p>

<p>Serves 2-3, depending on how greedy you feel</p>

<p><strong>Ingredients:</strong></p>

<ul>
<li>100g good-quality dark chocolate (for eating, not baking)</li>
<li>150ml carton of double cream</li>
<li>1 medium egg yolk</li>
<li>A splash of milk</li>
<li>A pinch of salt</li>
<li>2 drops vanilla extract</li>
<li>2-3 ramekins to store/serve</li>
</ul>

<p>Break the chocolate into small pieces into a pyrex bowl. Heat the cream in a saucepan on a moderate heat; when it reaches boiling point, pour the cream into the bowl to melt the chocolate.</p>

<p>Separate the egg yolk from the white. Keep the white for another day - they freeze well, and there are an awful lot of things you can bake with them.</p>

<p>Beat the yolk in a separate bowl/mug, then add to the chocolate/cream mixture along with a splash of milk to loosen the whole thing. Add a pinch of salt and a couple of drops of vanilla extract. Stir well, making sure all the lumps melt away into homogeneous, chocolatey goodness.</p>

<p>The consistency of the mixture should be dense but pourable due to the warmth. Which is perfect, because now you&#8217;re going to pour it into the ramekins. Cover the ramekins with clingfilm to keep smells out and put them into the fridge to chill for 4-6 hours.</p>

<p>I suggest you take them out of the fridge for half an hour before you eat them. There&#8217;s nothing wrong with eating them straight from the fridge, but I reckon you experience more of the bitter cacao deliciousness when they are a little warmer.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Lights On</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/03/lights-on.php" />
    <id>tag:www.cookingcoder.com,2010://4.48</id>

    <published>2010-03-03T10:52:50Z</published>
    <updated>2010-03-03T11:46:19Z</updated>

    <summary>In just under 40 minutes, Ellie Goulding answers the question &#8220;What would Imogen Heap sound like if she did pop?&#8221; You&#8217;d think the producers had decided that nothing on each track may sound harsher than Ellie&#8217;s voice. I mean that...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="CB" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="elliegoulding" label="ellie goulding" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="music" label="music" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pop" label="pop" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p>In just under 40 minutes, Ellie Goulding answers the question &#8220;What would Imogen Heap sound like if she did pop?&#8221;</p>

<p><a href="http://www.cookingcoder.com/assets_c/2010/03/folder-94.php" onclick="window.open('http://www.cookingcoder.com/assets_c/2010/03/folder-94.php','popup','width=800,height=800,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.cookingcoder.com/assets_c/2010/03/folder-thumb-250x250-94.jpg" width="250" height="250" alt="Ellie Goulding - Lights" class="mt-image-left" style="float: right; margin: 20px;" /></a></p>

<p>You&#8217;d think the producers had decided that nothing on each track may sound harsher than Ellie&#8217;s voice. I mean that in a good way - it&#8217;s comparable to (but softer than) Cerys Matthews, interesting enough to act as an instrument in its own right, and often the driving force in each song. Although considering her acoustic folk roots, it&#8217;s no surprise.</p>

<p>In some ways it&#8217;s a shame she has transitioned only halfway between folk and Frankmusik. For example, I don&#8217;t know whether to be impressed or disappointed that the synthesisers didn&#8217;t break out of their soft, inoffensive bubble during Pink-soundalike &#8216;Every Time You Go&#8217;. Having access to a vast range of electronics affords you an intensity a lone singer-songwriter could only dream of achieving, but that capability isn&#8217;t used here. Goulding has stuck to what she knows best, in a move that has undoubtedly disappointed many critics expecting her to go one further than &#8216;Under The Sheets&#8217;.</p>

<p>That said, effects are put to very good use, keeping it fresh and interesting, even while you&#8217;re saying to yourself &#8220;this is a bit like Linkin Park here&#8221; or &#8220;ooh, they nicked that from &#8216;Last Christmas&#8217;&#8221;.</p>

<p>All in all, &#8216;Lights&#8217; is a decent bit of pop with good melodies, an interesting backing track, a bit of emotional response and a nice voice to listen to. Really, everything pop music is meant to be, rather than Simon Cowell-produced noise pollution. If I wanted the full wrath of synthesisers and samplers I&#8217;d put on some Animal Collective, thankyouverymuch.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Bean salsa wrap</title>
    <link rel="alternate" type="text/html" href="http://www.cookingcoder.com/2010/02/bean-salsa-wrap.php" />
    <id>tag:www.cookingcoder.com,2010://4.47</id>

    <published>2010-02-27T06:12:23Z</published>
    <updated>2010-02-27T15:26:00Z</updated>

    <summary>I had a few leftovers that needed using up - most importantly, the remnants of my homemade salsa after my housemates attacked it with their army of tortilla chips. Fortunately for me, I have a well-stocked food cupboard at my...</summary>
    <author>
        <name>Seabee</name>
        
    </author>
    
        <category term="Cooking" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="lunch" label="lunch" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mexican" label="mexican" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="naughty" label="naughty" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="wraps" label="wraps" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cookingcoder.com/">
        <![CDATA[<p>I had a few leftovers that needed using up - most importantly, the remnants of my homemade salsa after my housemates attacked it with their army of tortilla chips. Fortunately for me, I have a well-stocked food cupboard at my disposal.</p>

<p><a href="http://www.cookingcoder.com/assets_c/2010/02/IMG_1674-91.php" onclick="window.open('http://www.cookingcoder.com/assets_c/2010/02/IMG_1674-91.php','popup','width=1500,height=831,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.cookingcoder.com/assets_c/2010/02/IMG_1674-thumb-500x277-91.jpg" width="500" height="277" alt="Bean salsa wrap" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></p>

<p><strong>Ingredients</strong></p>

<ul>
<li>130g mixed beans, rinsed and drained</li>
<li>1 tsp olive oil</li>
<li>1 heaped tsp Cajun seasoning (I use Bart)</li>
<li>100g tomato salsa</li>
<li>a little bit of green pepper</li>
<li>20g cheese, grated</li>
<li>1 large wrap - a brand like Discovery works well</li>
<li>1 leaf of a large lettuce</li>
<li>a little soured cream</li>
</ul>

<p>Throw the beans in a saucepan pan together with the oil. Mix the Cajun seasoning into the beans and heat gently for 5 minutes.</p>

<p>Add the pepper and the salsa. I turned the heat up a little since my salsa just came out of the fridge. Sometimes you feel impatient, and that&#8217;s okay in its place, where you can afford to do it. (i.e. right here.) Anyway, heat through - probably another 5-7 minutes.</p>

<p>While you wait for that, grate the cheese and tear up the lettuce into itty bits. Have the decency not to use iceberg - that stuff is barely acceptable in a cold salad, let alone any place where warmth is involved. But if, say, your partner or housemates buy it, use it anyway and remember to scold them thoroughly afterwards for having such a mundane taste in vegetables.</p>

<p>Seriously. Iceberg lettuce is as pointless as a vacuum cleaner in space. It sucks hard yet achieves nothing. Feel free to take that analogy to the bank, by the way.</p>

<p>Er, where was I? Ah yes. Now you&#8217;ve cut up your cheese and lettuce into small pieces, it&#8217;s time to dispose of the evidence. But first, zap the wrap in the microwave for 10 seconds - no point having a warm filling if its container is going to cool it down before you even manage to get halfway through.</p>

<p>Cover the wrap with lettuce, spoon the bean salsa on top in a wide line, sprinkle the cheese over the mixture, and finally pour soured cream on top.</p>

<p>Folding wraps is the only hard part in this entire exercise. One careless move and you could get a creamy hand, except in this instance it&#8217;s socially acceptable to lick it off. And now you have that on your mind, happy eating! Tee hee!</p>

<p><strong>Postscript:</strong> It might pay to mash the beans a little. Ersatz refried beans, if you will. I might try it with proper ones someday.</p>
]]>
        

    </content>
</entry>

</feed>
