<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Calcatraz Blog</title>
	<atom:link href="http://www.calcatraz.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.calcatraz.com/blog</link>
	<description>Towards an optimized life</description>
	<lastBuildDate>Mon, 30 Jan 2012 20:53:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A Trio of Tomato-Based Sauces</title>
		<link>http://www.calcatraz.com/blog/a-trio-of-tomato-based-sauces-266?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-trio-of-tomato-based-sauces</link>
		<comments>http://www.calcatraz.com/blog/a-trio-of-tomato-based-sauces-266#comments</comments>
		<pubDate>Sun, 29 Jan 2012 05:36:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Food & Drink]]></category>

	<!-- AutoMeta Start -->
	<category>sauce</category>
	<category>tomato</category>
	<category>city</category>
	<category>barbeque</category>
	<category>sauces</category>
	<category>taco</category>
	<category>cup</category>
	<category>tsp</category>
	<category>sauce</category>
	<category>tomato</category>
	<category>city</category>
	<category>barbeque</category>
	<category>sauces</category>
	<category>taco</category>
	<category>cup</category>
	<category>tsp</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.calcatraz.com/blog/?p=266</guid>
		<description><![CDATA[When I cook I like to chain recipes, where the result of one cooking session becomes an ingredient in another. That way later recipes are often improved by the use of a freshly prepared ingredient rather than a store-bought alternative. And you often end up with several prepared dishes for the same amount of effort [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Kansas City Barbeque Sauce" src="http://www.calcatraz.com/blog/wp-content/uploads/barbeque-sauce-224x300.jpg" alt="Kansas City Barbeque Sauce" width="224" height="300" />When I cook I like to chain recipes, where the result of one cooking session becomes an ingredient in another. That way later recipes are often improved by the use of a freshly prepared ingredient rather than a store-bought alternative. And you often end up with several prepared dishes for the same amount of effort it would take to make the last dish in the chain from scratch.</p>
<p>I&#8217;ve been separately planning to make a barbeque sauce and a taco sauce. Putting the chaining principle to work, I realised that they both have (or at least can have) a common base &#8211; tomato sauce (aka ketchup). So rather than make each from scratch, I figured I&#8217;d make a tomato sauce first, then add to it as necessary to make the barbeque and taco sauces. In doing so, I was able to make the three sauces (tomato, bbq and taco), with less effort than it would have been to make just two sauces (bbq and taco) separately.</p>
<p>The flip side of this is that you need to ensure the base is good, otherwise you could end up spoiling both sauces. A ketchup-style sauce is made by reducing a large quantity of tomato then flavouring with various spices, a bit of vinegar and some sugar. There is a lot of latitude in this for varying the added flavourings to a taste you like. But I&#8217;ve found the recipe below produces both a very enjoyable tomato ketchup, and makes a great base other tomato-based sauces, like the Kansas City barbeque sauce and the taco sauce below.</p>
<h3>Tomato Sauce (Ketchup)</h3>
<p>A rich, flavoursome tomato sauce. Feel free to use whatever tomatoes you have at hand (canned, vine ripened, cherry, etc.). A mix of half canned and half fresh gives a good balance between a fresh taste and a ketchupy consistency.</p>
<ul>
<li>1.5kg tomatoes (roughly chopped)</li>
<li>1/8th cup extra virgin olive oil</li>
<li>1/2 brown onion (chopped)</li>
<li>1 clove of garlic (minced)</li>
<li>1/4 cup brown sugar</li>
<li>200ml white-wine vinegar</li>
<li>1/2 tsp paprika</li>
<li>1 tsp cloves</li>
<li>1 tsp allspice</li>
<li>1 tsp cracked black pepper</li>
<li>1 tsp salt</li>
</ul>
<p>Heat the oil in a large pan over a medium-high heat. Add onion and garlic and cook until starting to brown, 4-5 mins. Add the tomatoes. Cover, bring to a gentle boil, then reduce the heat and simmer until the tomatoes are very tender (approx 1hr). Cool slightly, transfer into a blender and process until smooth. Return to a clean pan and stir in the vinegar and sugar. Add in the spices and seasoning. Then continue to simmer until it has reduced down to the consistency of a standard ketchup (1-2hrs). Pass through a sieve to remove any remaining pulp. Decant into sterilized bottles and store in the fridge. Makes 3 cups of sauce.</p>
<h3>Kansas City Barbeque Sauce</h3>
<p>An intense, fiery sauce that&#8217;s not for the faint-hearted.</p>
<ul>
<li>1 cup tomato sauce (recipe above)</li>
<li>1/4 cup water</li>
<li>1/4 cup vinegar</li>
<li>1/4 cup brown sugar</li>
<li>3 tbsp olive oil</li>
<li>2 tbsp smoked paprika</li>
<li>1 tbsp chilli</li>
<li>2 cloves garlic (minced)</li>
</ul>
<div>Heat the oil over a medium-high heat, and cook the garlic until brown. Add the rest of the ingredients and simmer gently until thickened (approx 15 mins). Cool, then decant into a sterilized bottle.</p>
<h3>
Taco Sauce</h3>
<p>A spicy accompaniment to any Mexican dish.</p></div>
<ul>
<li>1 cup tomato sauce (recipe above)</li>
<li>1/4 cup water</li>
<li>1/4 tsp chilli powder</li>
<li>1 tsp cumin</li>
<li>1 tbsp onion (chopped)</li>
<li>1 tbsp white vinegar</li>
<li>1/2 clove garlic (minced)</li>
<li>1/4 tsp salt</li>
<li>1/4 tsp paprika</li>
<li>1/4 tsp sugar</li>
<li>1/4 tsp chilli flakes</li>
</ul>
<p>Blend ingredients together until smooth. Transfer to a pan and simmer for 15 mins. Cool and store in a sterilized bottle.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calcatraz.com/blog/a-trio-of-tomato-based-sauces-266/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summer Sorbets</title>
		<link>http://www.calcatraz.com/blog/summer-sorbets-241?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=summer-sorbets</link>
		<comments>http://www.calcatraz.com/blog/summer-sorbets-241#comments</comments>
		<pubDate>Wed, 25 Jan 2012 14:09:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Food & Drink]]></category>

	<!-- AutoMeta Start -->
	<category>freezer</category>
	<category>sorbet</category>
	<category>cup</category>
	<category>sugar</category>
	<category>frozen</category>
	<category>fully</category>
	<category>smooth</category>
	<category>sorbets</category>
	<category>freezer</category>
	<category>sorbet</category>
	<category>cup</category>
	<category>sugar</category>
	<category>frozen</category>
	<category>fully</category>
	<category>smooth</category>
	<category>sorbets</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.calcatraz.com/blog/?p=241</guid>
		<description><![CDATA[Sorbets are the perfect refreshing summer dessert, having as they do all the ice, but none of the cream, of icecream. They are astonishingly simple to make &#8211; very respectable sorbets can be knocked up in just 5 minutes and then stored for a whole season of enjoyment. Overview Sorbets despite their sophisticated appearance, have [...]]]></description>
			<content:encoded><![CDATA[<p>Sorbets are the perfect refreshing summer dessert, having as they do all the ice, but none of the cream, of icecream. They are astonishingly simple to make &#8211; very respectable sorbets can be knocked up in just 5 minutes and then stored for a whole season of enjoyment.</p>
<h3>Overview</h3>
<p><img class="alignright size-medium wp-image-242" title="Lemon, lime and bitters sorbet" src="http://www.calcatraz.com/blog/wp-content/uploads/sorbet-300x269.png" alt="Lemon, lime and bitters sorbet" width="300" height="269" /></p>
<p>Sorbets despite their sophisticated appearance, have a notably unsophisticated base. At its most basic, a sorbet is little more than frozen sugar water. While tricks like adding alcohol or egg whites help make a smoother sorbet, a very acceptable result can be achieved without this extra complexity.</p>
<p>A typical ratio of water to sugar seems to be three units of water per unit of sugar. The water is heated to dissolve the sugar, and then cooled before freezing.</p>
<p>The only other thing that must be added is the flavor-giving ingredients themselves. The simple, neutral base makes it possible to concoct a wide-range of flavours. If these ingredients contain water or sugar themselves, it may be necessary to adjust the ratio used in the base.</p>
<p>The real magic in the sorbet is in how it is frozen. Rather than putting it in the freezer and forgetting about it, the sorbet should be stirred well while it is freezing. The purpose of this is to break up the large ice-crystals which form, resulting in a smoother sorbet. (At the other extreme, where large ice-crystals are actively sought, is the Italian dessert, granita). I find the easiest and most effective way to do this is to freeze the sorbet until it is firm, but not fully frozen, then blend it for 15s or so. The result is a very smooth, thick but runny sorbet which can be re-tubbed and returned to the freezer to freeze completely.</p>
<p>Here are the recipes for the sorbets I have made.</p>
<h3>Dark Chocolate Sorbet</h3>
<p>A rich, decadent dark chocolate sorbet balancing bitterness and sweetness.</p>
<ul>
<li>1 cup sugar</li>
<li>3/4 cup cocoa powder</li>
<li>pinch of salt</li>
<li>170g dark chocolate (70% cocoa is ideal)</li>
<li>1/2 tsp vanilla extract</li>
</ul>
<p>In a large pan, combine the the sugar, cocoa powder, salt and 1 1/2 cups of water. Bring to the boil, while stirring. Remove from the heat after 45s. Then add the chocolate and stir until fully melted. Add the vanilla extract and 3/4 cup of water. Blend the mixture for 15s. Allow to cool, then transfer to a tub and place in the freezer until firm, but not fully frozen. Remove from the freezer, blend until smooth and then return to the freezer to finish freezing. When ready to eat, remove from the freezer and sit for 10 mins to soften before serving.</p>
<h3>Mixed Berry and Watermelon Sorbet</h3>
<p>A light, refreshing sorbet.</p>
<ul>
<li>2 cups watermelon, diced</li>
<li>2 cups mixed berries</li>
<li>1/2 cup sugar</li>
<li>1 tbsp fresh mint, finely chopped</li>
</ul>
<p>In a large pan, combine the the sugar with 1 cup of water. Heat, stirring until the sugar has fully dissolved. Remove from the heat and allow to cool slightly. Tip mixture into a blender and add the watermelon and berries. Blend until smooth (2-3mins), then sieve into a tub to remove the pips. Allow to cool, then transfer to a tub and place in the freezer. Stir after 1 hour, adding the mint as you do so. Return to the freezer until firm, but not fully frozen. Remove from the freezer, blend until smooth and then return to the freezer to finish freezing. When ready to eat, remove from the freezer and sit for 10 mins to soften before serving.</p>
<h3>Lemon, Lime and Bitters Sorbet</h3>
<p>A delicious twist on a traditional lemon sorbet.</p>
<ul>
<li>Juice of two limes</li>
<li>Juice of four lemons</li>
<li>1/2 cup white wine</li>
<li>2 tbsp Angostura bitters</li>
<li>2/3 cup sugar</li>
</ul>
<p>Combine the lime juice, lemon juice, wine, bitters, sugar and 1/2 cup of water in a small pan. Heat, stirring until the sugar has fully dissolved. Then remove from the heat and allow to cool slightly. Transfer to a tub and place in the freezer until firm, but not fully frozen. Remove from the freezer, blend until smooth and then return to the freezer to finish freezing. When ready to eat, remove from the freezer and sit for 10 mins to soften before serving.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calcatraz.com/blog/summer-sorbets-241/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making Mustards</title>
		<link>http://www.calcatraz.com/blog/making-mustards-220?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=making-mustards</link>
		<comments>http://www.calcatraz.com/blog/making-mustards-220#comments</comments>
		<pubDate>Tue, 24 Jan 2012 20:26:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Food & Drink]]></category>

	<!-- AutoMeta Start -->
	<category>mustard</category>
	<category>vinegar</category>
	<category>seeds</category>
	<category>wine</category>
	<category>tsp</category>
	<category>sugar</category>
	<category>white</category>
	<category>wholegrain</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.calcatraz.com/blog/?p=220</guid>
		<description><![CDATA[Mustards can be both a great condiment and a simple, rewarding side-project. Unlike some condiments which can be expensive, complex or short-lived, most mustards are a breeze to make, low cost, and virtually indestructable. They are also flexible in a way that may surprise anyone familiar only with &#8216;plain&#8217; mustards such as English, American and [...]]]></description>
			<content:encoded><![CDATA[<p>Mustards can be both a great condiment and a simple, rewarding side-project. Unlike some condiments which can be expensive, complex or short-lived, most mustards are a breeze to make, low cost, and virtually indestructable. They are also flexible in a way that may surprise anyone familiar only with &#8216;plain&#8217; mustards such as English, American and Dijon. Here I show how to make a standard wholegrain mustard as well as flavoured varieties such as Dark Ale and Honey mustard and Spicy Whisky mustard.</p>
<h3>Overview</h3>
<p><img class="alignright size-medium wp-image-222" title="Mustards" src="http://www.calcatraz.com/blog/wp-content/uploads/batch1-300x231.png" alt="Mustards" width="300" height="231" /></p>
<p>The essential ingredient in any mustard is, of course, the mustard seed. It comes in two basic forms: wholegrain (i.e. just the seed), and powder (i.e. ground seeds). The seeds come in several colours, namely the milder yellow seed and the more potent brown and black seeds. A wholegrain mustard will often mix yellow and brown seeds for balance and visual appeal.</p>
<p>To make the mustard proper, the seed is soaked in a cool or cold liquid, such as water, which kicks off a chemical reaction (between the myrosinase enzyme and glucosilinates present in the seeds) and produces the &#8216;heat&#8217; of the mustard. The longer the reaction runs the hotter the resulting mustard will be. Vinegar and salt are usually used to control the reaction, and hence heat, and to enhance the flavour.</p>
<p>For wholegrain mustard, the heat-generating reaction will generally take 2-3 days to reach a suitable level and, after blending, the mustard may take several days (and sometimes upto several months) to &#8216;mature&#8217; to its final taste. With mustard powder, the heat-generating reaction is a lot faster, taking a matter of hours. The powerfully anti-bacterial mustard seed when combined with vinegar and salt will be very resiliant and long-lasting. Note, though, that the addition of short-lived flavour ingredients such as fresh herbs will reduce the shelf-life of the mustard.</p>
<p>Flavours can be introduced in the liquid used, for instance swapping the vinegar for a flavoured variety (white wine, apple cider) or an alcohol (such as whisky or beer) with enough vinegar (or other acid) added to attain and balance the desired heat. Alternatively, or additionally, flavours can be mixed in at the blending stage, for instance adding herbs, seasoning and spices. A sweetener, such as sugar or honey, is often added as well. The combinations which can be made are practically (and perhaps actually) limitless.</p>
<p>Here&#8217;s the recipe I used, along with the three variants I made. As I had ran out of black mustard seeds by the time I got to the red wine mustard, I used 4 tbsp yellow mustard seeds instead.</p>
<h3>Wholegrain Mustard</h3>
<p>A basic wholegrain mustard, from which endless variations can be produced.</p>
<ul>
<li>2 tbsp mustard seeds (yellow)</li>
<li>2 tbsp mustard seeds (black)</li>
<li>100ml white wine vinegar</li>
<li>1 tsp sugar</li>
<li>1/2 tsp salt</li>
</ul>
<p>Mix the mustard seeds and vinegar in a non-metallic bowl. Cover with cling-film and leave to stand for 2-3 days (3 days for a hotter mustard). Check occasionally and add extra vinegar if it has all been absorbed.</p>
<p>Then, drain any excess liquid and set aside. In a mortar and pestle (or blender), blend the seeds into a paste. Blend in the salt and sugar, along with some of the reserved liquid (if required) to get the right consistency.</p>
<p>Decant the resulting mustard into a clean, sterilised jar. Cap and leave to mature for 2 days prior to use.</p>
<p><strong>Dark Ale and Honey Mustard</strong></p>
<p>Replace the white wine vinegar with 100ml of your favourite dark ale, mixed with 2 tsp of white vinegar. Replace the sugar with 1 tsp of honey.</p>
<p><strong>Spicy Whisky Mustard</strong></p>
<p>Replace the white wine vinegar with a mixture of 50ml whisky, 50ml white wine vinegar and 1/2 tsp chilli flakes. Replace the sugar with 1 tsp honey and 1 tsp nutmeg.</p>
<p><strong>Red wine, Rosemary and Thyme Mustard</strong></p>
<p>Replace the white wine vinegar with a mixture of 50ml water, 50ml red wine vinegar, 2 tsp dried thyme and 2 tsp dried rosemary. Use brown sugar in place of normal sugar.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calcatraz.com/blog/making-mustards-220/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Review: Signal vs Noise</title>
		<link>http://www.calcatraz.com/blog/site-review-signal-vs-noise-211?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=site-review-signal-vs-noise</link>
		<comments>http://www.calcatraz.com/blog/site-review-signal-vs-noise-211#comments</comments>
		<pubDate>Thu, 08 Dec 2011 23:09:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[37signals]]></category>
		<category><![CDATA[Darren Rowse]]></category>
		<category><![CDATA[Rework]]></category>
		<category><![CDATA[websites]]></category>

	<!-- AutoMeta Start -->
	<category>technical</category>
	<category>noise</category>
	<category>signal</category>
	<category>traffic</category>
	<category>complaints</category>
	<category>design</category>
	<category>topics</category>
	<category>stats</category>
	<category>technical</category>
	<category>noise</category>
	<category>signal</category>
	<category>traffic</category>
	<category>complaints</category>
	<category>design</category>
	<category>topics</category>
	<category>stats</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.calcatraz.com/blog/?p=211</guid>
		<description><![CDATA[In an attempt to improve this blog, I&#8217;m currently doing Darren Rowse&#8217;s 31 day better blog challenge. Today&#8217;s task is to review an existing blog (in a similar niche) and answer a few questions about it. I&#8217;ve picked Signal vs Noise, a blog on web design by the 37 signals guys. These are the same [...]]]></description>
			<content:encoded><![CDATA[<p>In an attempt to improve this blog, I&#8217;m currently doing Darren Rowse&#8217;s <a href="http://www.problogger.net/31dbbb-workbook/">31 day better blog challenge</a>. Today&#8217;s task is to review an existing blog (in a similar niche) and answer a few questions about it. I&#8217;ve picked <a href="http://37signals.com/svn">Signal vs Noise</a>, a blog on web design by the 37 signals guys. These are the same guys behind web apps such as Basecamp, and book such as Rework &#8211; which made it onto into my <a title="My Top 10 (Mainly Online) Business Books of The Year" href="http://www.calcatraz.com/blog/my-top-10-mainly-online-business-books-of-the-year-200">top 10 business books of the year</a>.</p>
<p><img class="alignleft size-medium wp-image-231" title="Signal vs Noise" src="http://www.calcatraz.com/blog/wp-content/uploads/svn-297x300.png" alt="Signal vs Noise" width="297" height="300" /></p>
<p><strong>Content:</strong></p>
<p><strong></strong><em>What topics are they covering?</em></p>
<p>According to their own tag line: design, business, experience, simplicity, the web, culture, and more.</p>
<p><em>What topics are they ignoring?</em></p>
<p>Despite being an online business, they don&#8217;t seem to write much about (or do) much in the way of traditional SEO / link building, etc.</p>
<p><em>What voice/style do they post in?</em></p>
<p>Posts are generally informal, with a cut-the-crap attitude.</p>
<p><em>How often are they posting?</em></p>
<p>Once or twice a week on average.</p>
<p><em>What level are they pitching their posts at (beginners, advanced etc)</em></p>
<p>Their posts are typically high level, avoiding nitty gritty technical details. Even the technical articles tackle whatever specific technical issue at a high level.</p>
<p><strong>Reader Engagement:</strong></p>
<p><strong></strong><em>What topics generate most conversation?</em></p>
<p>It seems to be those that are somewhat political in nature, or relate to significant new product features.</p>
<p><em>What styles of posts seem to connect with readers best?</em></p>
<p>Posts of a technical nature seem to produce the most in-depth comments.</p>
<p><em>What questions are readers asking in comments?</em></p>
<p>Asking for further details on the topics discussed.</p>
<p><em>What complaints do you see readers making in comments?</em></p>
<p>Complaints about product features / changes required. Also complaints about nonsensical topics / lines of argument.</p>
<p><em>What tools/mediums is the site using (eg: are they using Twitter, forums etc)</em></p>
<p>Twitter widget showing latest tweets. RSS feed and stats counter. Comments. Newsletter signup. Site search.</p>
<p><strong>Design:</strong></p>
<p><strong></strong><em>What first impression does their design give?</em></p>
<p>Clean, colourful.</p>
<p><em>What have they done well? What have they done poorly?</em></p>
<p>Good emphasis / de-emphasis / elimination of page elements. Somewhat confusing &#8216;mini-posts&#8217; which visually appear to belong to the major post above, but which I don&#8217;t think actually do. RSS feed blends with ad block &#8211; I wasn&#8217;t sure if it was part of the ad, or part of the site, until I hovered over it to see the URL.</p>
<p><em>What Options do they give readers to subscribe?</em></p>
<p>Newsletter, RSS, link to follow on twitter.</p>
<p><strong>Monetization:</strong></p>
<p><strong></strong><em>what advertisers are targeting this blog?</em></p>
<p>IT ads.</p>
<p><em>what type of affiliate programs are they promoting?</em></p>
<p>None that I can see, but promote their own web apps and books quite prominently.</p>
<p><strong>Traffic:</strong><br />
3,412 on Alexa for the entire 37signals domain, with 16k sites linking in. Traffic has decreased sightly (by around 10%) over the past 3 months.</p>
<p><strong>SEO:</strong></p>
<p><strong></strong><em>Who is linking to this blog? (use the link:www.blogurl.com command in Google to find out)</em></p>
<p>Lots of diverse sites, especially tech / design blogs.</p>
<p><em>What does their source code reveal about how they’ve set up their site</em></p>
<p>Very clean HTML source, with defined meta tags, etc.</p>
<p><em>If they have an open or unlocked stats package what can you learn from their stats? What pages are popular? Where does their incoming traffic come from?</em></p>
<p>Not available.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calcatraz.com/blog/site-review-signal-vs-noise-211/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Top 10 (Mainly Online) Business Books of The Year</title>
		<link>http://www.calcatraz.com/blog/my-top-10-mainly-online-business-books-of-the-year-200?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-top-10-mainly-online-business-books-of-the-year</link>
		<comments>http://www.calcatraz.com/blog/my-top-10-mainly-online-business-books-of-the-year-200#comments</comments>
		<pubDate>Thu, 08 Dec 2011 05:11:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[top 10]]></category>
		<category><![CDATA[web application]]></category>
		<category><![CDATA[zappos]]></category>

	<!-- AutoMeta Start -->
	<category>important</category>
	<category>important</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.calcatraz.com/blog/?p=200</guid>
		<description><![CDATA[Looking for a good read? Or maybe a good Christmas present? I spent a lot of this year reading business books. These were mainly, but not exclusively, web related. My aim has been to learn, particularly through case studies, what is involved in turning Calcatraz from an interesting side-project into a proper business. I&#8217;ve read [...]]]></description>
			<content:encoded><![CDATA[<p>Looking for a good read? Or maybe a good Christmas present? I spent a lot of this year reading business books. These were mainly, but not exclusively, web related. My aim has been to learn, particularly through case studies, what is involved in turning Calcatraz from an interesting side-project into a proper business.</p>
<p><img class="alignleft" title="The lean startup - Eric Ries" src="http://www.calcatraz.com/blog/wp-content/uploads/lean-startup-ries-300-198x300.jpg" alt="The lean startup - Eric Ries" width="198" height="300" />I&#8217;ve read many books, some good and some a waste of time. If you&#8217;re looking for a great book, here is my pick of the very best (predominantly web-related) business books of the year:</p>
<p><strong>1. <a href="http://www.amazon.com/gp/product/0307887898/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0307887898">The Lean Startup</a></strong><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=0307887898" alt="" width="1" height="1" border="0" /> - Eric Ries introduces the lean startup methodology, a way to bring to web businesses the massive success companies manufacturing companies such as Toyota have had with lean manufacturing. Ries covers achieving competitive advantage through rapid product iterations and the use of &#8216;validated learning&#8217;. I consider this a must-read for anyone running a web-business. I&#8217;m already working to implement, and starting to benefit from, the many techniques it covers.</p>
<p><strong>2. <a href="http://www.amazon.com/gp/product/B005ZO5RAE/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B005ZO5RAE">Evil Plans</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=B005ZO5RAE" alt="" width="1" height="1" border="0" /> - </strong>Cartoonist Hugh MacLeod&#8217;s book is a brilliantly easy read. While not an in-depth how-to book, it is simply packed full of motivation. I challenge anyone to read it and not be inspired to start blogging, cartooning or &#8216;doing something you love&#8217;.</p>
<p><strong>3. <a href="http://www.amazon.com/gp/product/B005K5N87W/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B005K5N87W">Unlikely Destinations: The Lonely Planet Story</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=B005K5N87W" alt="" width="1" height="1" border="0" /> - </strong>I struck gold with this one while trawling through a stack of (incomprehensible to me) Vietnamese books at a book stand in Ho Chi Minh airport. It is the story of how Tony and Maureen Wheeler started the Lonely Planet travel book behemoth, almost by accident while trying to fund their round-the-world travels. Part travel diary, part business book, it makes for great reading.</p>
<p><strong>4. <a href="http://www.amazon.com/gp/product/B0043RT9R6/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0043RT9R6">Making it All Work</a></strong><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=B0043RT9R6" alt="" width="1" height="1" border="0" /> - In this follow-up to his wildly successful book, <a href="http://www.amazon.com/gp/product/0142000280/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0142000280">Getting Things Done</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=0142000280" alt="" width="1" height="1" border="0" />, David Allen expands on and generalises on the principles of his work/life management system. Definitely worth a read for anyone trying to implement their own GTD system.</p>
<p><strong>5. <a href="http://www.amazon.com/gp/product/1905736169/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1905736169">Great Ikea!</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=1905736169" alt="" width="1" height="1" border="0" /> - </strong>While the furniture giant may now be in the &#8216;cashing in&#8217; phase of the business life-cycle, Elen Lewis&#8217; book documents how the company rose to dominate the world of flat-pack goods by focusing tirelessly on delivering brilliantly designed products at the lowest prices possible.</p>
<p><strong>6. <a href="http://www.amazon.com/gp/product/0446563048/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0446563048">Delivering Happiness</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=0446563048" alt="" width="1" height="1" border="0" /></strong> - In delivering happiness, Zappos CEO Tony Hsieh tells of his path to Zappos and how this lead to the online shoe retailer focusing explicitly on the happiness of its customers, employees and partners as a business goal more important than profit. By prioritising happiness in this way, Zappos was rapidly able to transform itself into a billion-dollar organisation with aims much higher than just selling shoes.</p>
<p><strong>7. <a href="http://www.amazon.com/gp/product/0743277465/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0743277465">The Art of Learning</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=0743277465" alt="" width="1" height="1" border="0" /></strong> - Not strictly a business book, but highly relevant none the less. The Art of Learning documents Josh Waitzkin&#8217;s life as a childhood chess prodigy and subsequent reinvention as world champion in the combat form of Tai chi chuan. With the tagline &#8216;an inner journey to optimal performance&#8217;, Josh delivers a lucid description of the techniques he uses to achieve mastery in both highly competitive and complex disciplines. The lessons have clear applications to the world of business.</p>
<p><strong>8. <a href="http://www.amazon.com/gp/product/0307463745/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0307463745">Rework</a></strong><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=0307463745" alt="" width="1" height="1" border="0" /> - Written by the guys at 37signals (responsible for a number of highly successful web applications such as basecamp), this book is a collection of unconventional tips for building web-businesses. With tips such as &#8216;underdo the competition&#8217; and &#8216;welcome obscurity&#8217;, it is full of insight into building better web applications with less stress and less overheads.</p>
<p><strong>9. <a href="http://www.amazon.com/gp/product/B004N8ETAW/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B004N8ETAW">The Facebook Effect</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=B004N8ETAW" alt="" width="1" height="1" border="0" /></strong> - This is the inside story into the phenomenon that is Facebook (what, never heard of it?). From the early beginnings to managing a company with hundreds of millions of users, the book covers it all in depth. If you&#8217;ve seen the &#8216;social network&#8217; movie, I&#8217;ll just say this &#8211; the book is better.</p>
<p><strong>10. <a href="http://www.amazon.com/gp/product/1430210788/ref=as_li_tf_tl?ie=UTF8&amp;tag=calcatraz-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1430210788">Founders at Work</a></strong><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=calcatraz-20&amp;l=as2&amp;o=1&amp;a=1430210788" alt="" width="1" height="1" border="0" /> - In founders at work, Jessica Livingstone (co-founder of startup incubator Y-combinator) brings an impressive collection of interviews with founders of some of the biggest and most successful companies and products around: Apple, Yahoo!, Gmail, Hotmail, Research in Motion, Craigslist, del.icio.us and many more. The interviews discuss the early days of these startup ventures, what they did, and ultimately how they managed to achieve success with the odds stacked against them.</p>
<p>&nbsp;</p>
<p>If you are at all interested in running a business, particularly a web-based one, I highly recommend taking a look at whichever of these caught your eye. They won&#8217;t disappoint.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calcatraz.com/blog/my-top-10-mainly-online-business-books-of-the-year-200/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog redesigned</title>
		<link>http://www.calcatraz.com/blog/blog-redesigned-192?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=blog-redesigned</link>
		<comments>http://www.calcatraz.com/blog/blog-redesigned-192#comments</comments>
		<pubDate>Sun, 13 Nov 2011 20:56:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Calcatraz]]></category>

	<!-- AutoMeta Start -->
	<category>layout</category>
	<category>topics</category>
	<category>posts</category>
	<category>frequent</category>
	<category>catch</category>
	<category>attention</category>
	<category>interest</category>
	<category>delve</category>
	<category>layout</category>
	<category>topics</category>
	<category>posts</category>
	<category>frequent</category>
	<category>catch</category>
	<category>attention</category>
	<category>interest</category>
	<category>delve</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.calcatraz.com/blog/?p=192</guid>
		<description><![CDATA[Just a quick one today. I&#8217;ve uploaded a change to the blog layout. This new layout offers better separation of and navigation between categories. By using the menu you can quickly delve into the topics which interest you. This should make the blog more relevant to you, rather than requiring you to wade through posts [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick one today. I&#8217;ve uploaded a change to the blog layout. This new layout offers better separation of and navigation between categories. By using the menu you can quickly delve into the topics which interest you. This should make the blog more relevant to you, rather than requiring you to wade through posts on topics you don&#8217;t care about. This also now makes it possible for me to broaden the scope of the blog without affecting the user experience. As well as the posts on Calcatraz and its apps, and web development, I plan to introduce posts on lifestyle topics such as travel and productivity which I hope will also be of interest to anyone  looking to enhance their lives. There will also be shorter, more frequent posts on things which catch my attention as I go about the business of building Calcatraz.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calcatraz.com/blog/blog-redesigned-192/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yesterday&#8230;</title>
		<link>http://www.calcatraz.com/blog/yesterday-170?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yesterday</link>
		<comments>http://www.calcatraz.com/blog/yesterday-170#comments</comments>
		<pubDate>Thu, 20 Oct 2011 21:06:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Calcatraz]]></category>

	<!-- AutoMeta Start -->
	<category>design</category>
	<category>kaggle</category>
	<category>ninefold</category>
	<category>techseeder</category>
	<category>accounts</category>
	<category>yesterday</category>
	<category>account</category>
	<category>meeting</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.calcatraz.com/blog/?p=170</guid>
		<description><![CDATA[Yesterday was a big day for Calcatraz. Here are a few of the highlights: New Design Launched &#8211; I got up at 4am to put the finishing touches to a complete redesign of the site. By the time I had to leave for my day job, it was up and running. I think the design [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday was a big day for Calcatraz. Here are a few of the highlights:</p>
<p><strong>New Design Launched &#8211; </strong>I got up at 4am to put the finishing touches to a complete redesign of the site. By the time I had to leave for my day job, it was up and running. I think the design improves significantly on the previous version, but you can judge for yourself at <a title="Calcatraz" href="http://www.calcatraz.com">www.calcatraz.com</a> (oh, and let me know what you think using the feedback form&#8230;).</p>
<p><strong>User Accounts Launched</strong> - On my lunch break I forewent the traditional pub lunch, and took my laptop down to a cafe where I nutted out the last of the code for handling user accounts. Then immediately after work I headed back to the cafe and pushed the code live. So you can now <a title="Get a Calcatraz Account" href="http://www.calcatraz.com/accounts/register">sign up for a free Calcatraz Account</a> which gives you permanent access to your full calculation history and touch-typing history (on the <a title="Calcatraz Calculator" href="http://www.calcatraz.com/calculator">Calculator </a>and <a title="Calcatraz Typist" href="http://www.calcatraz.com/typist">Typist </a>apps respectively).</p>
<p><strong>Melbourne Lean Startup Meeting</strong> - Calcatraz then took its first steps into the wider world at last night&#8217;s lean startup meeting. The night featured awesome talks from the <a title="NineFold" href="http://ninefold.com">NineFold</a>, <a title="Rome to Rio" href="http://www.rome2rio.com/">RomeToRio</a> and <a title="Kaggle" href="http://www.kaggle.com/">Kaggle </a>guys. It was also great to talk to people doing some really interesting stuff in the startup space, including Peter, Daryl, Jai from <a title="UnBaa" href="http://www.unbaa.com/">UnBaa</a> (a social decision making site), and Anita from <a title="TechSeeder" href="http://www.techseeder.com/">TechSeeder</a>. Cheers guys!</p>
<p>So yeah, quite a day overall! P.S. Here&#8217;s the new design:</p>
<p><a href="http://www.calcatraz.com"><img class="alignnone  wp-image-233" title="Calcatraz Version 3 Design" src="http://www.calcatraz.com/blog/wp-content/uploads/design-v3.png" alt="Calcatraz Version 3 Design" width="666" height="427" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.calcatraz.com/blog/yesterday-170/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Case Study: Speeding up the Calcatraz API</title>
		<link>http://www.calcatraz.com/blog/case-study-speeding-up-the-calcatraz-api-168?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=case-study-speeding-up-the-calcatraz-api</link>
		<comments>http://www.calcatraz.com/blog/case-study-speeding-up-the-calcatraz-api-168#comments</comments>
		<pubDate>Sun, 14 Aug 2011 21:31:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

	<!-- AutoMeta Start -->
	<category></category>
	<category></category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.calcatraz.com/blog/?p=168</guid>
		<description><![CDATA[I wanted the Calcatraz API to be fast enough to be usefully callable within a single page request. To this end, I performed some optimisation and was able to reduce the runtime of an API call to around 1/6 of its original time. To establish a baseline, I looked at the fastest page load time [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.calcatraz.com/calculator/api"><img class="alignleft size-medium wp-image-236" title="Calcatraz API" src="http://www.calcatraz.com/blog/wp-content/uploads/api-300x244.png" alt="Calcatraz API" width="300" height="244" /></a>I wanted the Calcatraz API to be fast enough to be usefully callable within a single page request. To this end, I performed some optimisation and was able to reduce the runtime of an API call to around 1/6 of its original time.</p>
<p>To establish a baseline, I looked at the fastest page load time possible on my local host. This was around 12ms avg for a minimal html page (containing the word &#8216;test&#8217; only) and around 15-17ms for a minimal php page. Note that I cleared the cache after each request. My aim then is to get the api working on localhost at something approaching these times. Any additional delay in the production environment would presumably be down to dns / latency / shared hosting, which I can deal with separately.</p>
<p>I then tested the api for its response time. A simple calculation such as 3*3 gave a response time of 250-320ms. Not bad, but not as good as I would like. As a start, I aimed to reduce it below 50ms. This should be done with improvements which benefit all calculations, rather than being achieved with caching of previously seen answers (which I want to have as a separate speedup).</p>
<p><strong>Output Buffering</strong></p>
<p>Using webgrind, I profiled the call. The call took 406ms this time (presumably slowed by the profiling code). It showed that the slowest individual function call (i.e. self-cost) was the single database call, taking 147ms. This call is used to simply log the calculation made &#8211; it isn&#8217;t actually used in the production of the calculation. As a result, it can be moved to the end of the code and executed after the output has been sent by the user. That way, though the time to run the php script hasn&#8217;t improved, the time until the user gets their answer has.</p>
<p>I did this, using the following PHP code to send the output buffer contents to the user and close the connection:</p>
<p>// Initialise content buffering (using compression)<br />
ob_start(&#8216;ob_gzhandler&#8217;);</p>
<p>&#8230; code to generate user output goes here &#8230;</p>
<p>// close the http connection and send the data to the user<br />
echo str_pad(&#8221;, 1024); // pad so IE and Chrome will render short answers<br />
header(&#8220;Connection: close&#8221;);<br />
header(&#8220;Content-Length: &#8220;.ob_get_length());<br />
ob_end_flush(); // send the results to the user<br />
ob_flush();<br />
flush();</p>
<p>&#8230; code to process behind the scenes goes here &#8230;</p>
<p>The result of this change was that the response time dropped from 250-320ms to around 110ms &#8211; more than halving the response time.</p>
<p><strong>File Inclusion</strong></p>
<p>Going back to the webgrind profile output, I found that the next largest bottleneck was a bunch of file inclusions I was doing at the start of the code. These include library functions which I store with one file per function. The time taken to include the files seems to vary between about 30 and 60ms.</p>
<p>Originally the files were included using the include_once() function. I changed this to the include() function to remove the (unnecessary) check for a previous inclusion. This seemed to slightly reduce the time to load to 25-30ms. While I will probably inline the functions at a later time, having them separate makes development easier. So until I sort out a solution I&#8217;ll leave it as it is.</p>
<p><strong>Function Caching</strong></p>
<p>The next target for improvement was a function which consumed around 20ms per page load. Reviewing the function revealed that while caching was in use on the function return values, not all return paths were being cached &#8211; essentially the function was traversing a tree structure and caching the nodes but not the leaves. By adding caching I was able to cut the time used by the function to around 8ms. With the changes so far, the time for the api call has now dropped from 250-320ms to around 65-90ms. As an added bonus, I was able to make use of PHP static variables to replace the previous, more clumsy, caching method (I learned how to do this while studying the Drupal codebase). And as a further bonus I was able to remove two of the library functions being included (as discussed above), very slightly addressing that problem.</p>
<p><strong>Dead Code Elimination</strong></p>
<p>While it might seem excessive, I continued to try and further reduce the time towards my 50ms goal. I took a look at one frequently called function which was using around 10ms. It was being called from two locations. The vast majority of the calls were coming from a function which, on inspection, turned out not to actually need to call it. Removing this call all but eliminated the 10ms usage.</p>
<p><strong>File Inclusion Revisited</strong></p>
<p>By this point, the file inclusion issue below has become the clear bottleneck, accounting for over a third of the total runtime of the API call. So I decided to bite the bullet and tackle it. I realised that Toyota-style lean principles suggest that I should combine the many files into fewer as the multiple calls do not add value to the user and are therefore &#8216;waste&#8217;. While it benefits me as a developer, there are other ways I can achieve the same effect. A short-term approximation is to use the &#8216;fold all&#8217; feature of notepad++ to collapse the functions into a browseable list. If I need something more closely resembling explorer&#8217;s view of the files (e.g. so I can work on two or more functions in a tabbed view, I can easily write something which will let me do it. I combined the functions into four larger library files (corresponding to the four directories the function files were stored in), and changed the code to include just these. Immediately the time cost of loading the functions dropped form around 70ms to around 7ms. I could take it further and combine these four files, but I think it would complicate development more than it would benefit runtime.</p>
<p><strong>Conclusion</strong></p>
<p>Through a series of optimisations I was able to reduce the time the server takes to feed the user a response to a simple API query from 250-320ms to only 45ms. This was done exclusively through optimisations which simplified the codebase, or just moved things around in a way that will have minimal impact on ease of development. While other potential optimisations exist to reduce the time requirement further, they will require more involved development work and so are not going to be carried out at this time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calcatraz.com/blog/case-study-speeding-up-the-calcatraz-api-168/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing XDebug and Webgrind for XAMPP on Windows</title>
		<link>http://www.calcatraz.com/blog/installing-xdebug-and-webgrind-for-xampp-on-windows-164?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installing-xdebug-and-webgrind-for-xampp-on-windows</link>
		<comments>http://www.calcatraz.com/blog/installing-xdebug-and-webgrind-for-xampp-on-windows-164#comments</comments>
		<pubDate>Fri, 12 Aug 2011 22:06:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

	<!-- AutoMeta Start -->
	<category>program</category>
	<category>xampp</category>
	<category>xdebug</category>
	<category>ini</category>
	<category>instructions</category>
	<category>vc6</category>
	<category>windows</category>
	<category>windows</category>
	<category>program</category>
	<category>xampp</category>
	<category>xdebug</category>
	<category>ini</category>
	<category>instructions</category>
	<category>vc6</category>
	<category>windows</category>
	<category>windows</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.calcatraz.com/blog/?p=164</guid>
		<description><![CDATA[When XDebug is installed it will produce a file each time you load a PHP webpage on your localhost. This file contains detailed timing information on which functions the PHP file called and for how long. This is essential information for improving the speed of a website as it allows you to pinpoint exactly which [...]]]></description>
			<content:encoded><![CDATA[<p>When XDebug is installed it will produce a file each time you load a PHP webpage on your localhost. This file contains detailed timing information on which functions the PHP file called and for how long. This is essential information for improving the speed of a website as it allows you to pinpoint exactly which part of your code is slowing your site down the most. Webgrind provides an easy to use web view of the information produced by XDebug.</p>
<p>I&#8217;ve installed this combination on several web servers in the past and it has always proved a bit more time-consuming and painful than it really should be. To save myself, and hopefully others, from similar pain in the future, here are the steps I used this time round. Note that these instructions apply to installing XDebug and Webgrind for use with XAMPP on Windows.</p>
<p>1. Create a php file under your localhost webroot containing the command:</p>
<p>&lt;?php phpinfo() ?&gt;</p>
<p>2. Open the file in a browser &#8211; it should display a load of configuration about your php setup.</p>
<p>3. Select and copy all the content of that page</p>
<p>4. Paste it into the textbox on this page: http://www.xdebug.org/find-binary.php</p>
<p>5. Click &#8216;Analyse my phpinfo() output</p>
<p>6. This will generate some output like:</p>
<p>Summary<br />
Xdebug installed: no<br />
Server API: Apache 2.0 Handler<br />
Windows: yes &#8211; Compiler: MS VC6 &#8211; Architecture: x86<br />
Zend Server: no<br />
PHP Version: 5.3.5<br />
Zend API nr: 220090626<br />
PHP API nr: 20090626<br />
Debug Build: no<br />
Thread Safe Build: yes<br />
Configuration File Path: C:\Windows<br />
Configuration File: C:\Program Files\xampp\php\php.ini<br />
Extensions directory: C:\Program</p>
<p>Instructions</p>
<p>Download php_xdebug-2.1.2-5.3-vc6.dll<br />
Move the downloaded file to C:\Program<br />
Edit C:\Program Files\xampp\php\php.ini and add the line<br />
zend_extension = C:\Program\php_xdebug-2.1.2-5.3-vc6.dll<br />
Restart the webserver</p>
<p>7. Before following these instructions, note that they are wrong! The extension dir path has been truncated. You will need to locate your extension dir and update the instructions accordingly. For instance, my extension dir is at: C:\Program Files\xampp\php\ext</p>
<p>This gives the revised instructions:</p>
<p>Download php_xdebug-2.1.2-5.3-vc6.dll<br />
Move the downloaded file to C:\Program Files\xampp\php\ext\<br />
Edit C:\Program Files\xampp\php\php.ini and add the line<br />
zend_extension = &#8220;C:\Program Files\xampp\php\ext\php_xdebug-2.1.2-5.3-vc6.dll&#8221;<br />
Restart the webserver</p>
<p>8. Follow these instructions, but to save a bit of time you don&#8217;t yet need to restart the webserver. Also keep php.ini open.</p>
<p>9. Add the following to php.ini to run XDebug every time a page is requested:<br />
xdebug.profiler_enable = 1</p>
<p>10. Still in php.ini, Change the line:<br />
xdebug.profiler_output_name = &#8220;xdebug_profile.%R::%u&#8221;<br />
To:<br />
xdebug.profiler_output_name = &#8220;xdebug_profile.%R.%u&#8221;</p>
<p>This is because windows can&#8217;t handle the colons in the file name, and won&#8217;t write the files otherwise. This took me a while to figure out.</p>
<p>11. Now restart the Apache web server</p>
<p>12. It should be working. To test, load (in a browser) the localhost page you want to profile. If all is well, XDebug will produce a file named xdebug_profile.xxxx.xxxx or similar in the XDebug output directory. (For me the directory is &#8220;C:\Program Files\xampp\tmp&#8221;, but you find / set the output dir from the php.ini line which looks like: xdebug.profiler_output_dir = &#8220;C:\Program Files\xampp\tmp&#8221;).</p>
<p>13. Install webgrind:</p>
<p>* Download webgrind from https://github.com/jokkedk/webgrind (use the &#8216;downloads&#8217; button).<br />
* Extract webgrind to a folder accessible to the webserver.<br />
* Start using webgrind by browsing to the URL of your webgrind install, e.g. http://localhost/webgrind.</p>
<p>If all has gone well you should now be able to use webgrind to view the profile information for the page you loaded in step 12.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calcatraz.com/blog/installing-xdebug-and-webgrind-for-xampp-on-windows-164/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Apache mod_rewrite encoded slash problem</title>
		<link>http://www.calcatraz.com/blog/the-apache-mod_rewrite-encoded-slash-problem-152?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-apache-mod_rewrite-encoded-slash-problem</link>
		<comments>http://www.calcatraz.com/blog/the-apache-mod_rewrite-encoded-slash-problem-152#comments</comments>
		<pubDate>Sun, 31 Jul 2011 00:36:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

	<!-- AutoMeta Start -->
	<category>txt|xml</category>
	<category>encoded</category>
	<category>urls</category>
	<category>encoding</category>
	<category>url</category>
	<category>mod_rewrite</category>
	<category>api</category>
	<category>apache</category>
	<category>txt|xml</category>
	<category>encoded</category>
	<category>urls</category>
	<category>encoding</category>
	<category>url</category>
	<category>mod_rewrite</category>
	<category>api</category>
	<category>apache</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.calcatraz.com/blog/?p=152</guid>
		<description><![CDATA[The Aim &#160; I&#8217;ve been working on an API for the new version of Calcatraz (both API and new version coming soon). As part of this, I&#8217;ve been trying to configure the API to use nice URLs. This has caused me to bump up against a tricky problem in Apache&#8217;s mod_rewrite module. I want to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The Aim</strong></p>
<p><img class="alignright size-medium wp-image-259" title="Apache HTTP Server" src="http://www.calcatraz.com/blog/wp-content/uploads/apache1-300x230.png" alt="Apache HTTP Server" width="300" height="230" /></p>
<p>&nbsp;</p>
<p>I&#8217;ve been working on an API for the new version of Calcatraz (both API and new version coming soon). As part of this, I&#8217;ve been trying to configure the API to use nice URLs. This has caused me to bump up against a tricky problem in Apache&#8217;s mod_rewrite module.</p>
<p>I want to be able to accept URLs containing a calculation such as:</p>
<pre>http://www.calcatraz.com/api/calc/3*3.txt</pre>
<p>&nbsp;</p>
<p>And redirect it to a script which can extract the calculation (3*3) and the required format (in this case plain text &#8216;txt&#8217;).</p>
<p><strong>The Basics</strong></p>
<p>For the case above it can be done without problem, you just use a .htaccess redirect rule such as:</p>
<pre>RewriteRule calc/ api.php [L]</pre>
<p>&nbsp;</p>
<p>which calls api.php to serve the page. Then in api.php you parse the $_SERVER['REQUEST_URI'] variable &#8211; which contains the original url &#8211; and extract the various parts. Alternatively you can get a bit more complex in mod_rewrite and do the redirect and parsing in one, with something like:</p>
<pre>RewriteRule calc/(.+)\.(txt|xml)$ api.php?calc=$1&amp;format=$2 [L]</pre>
<p>&nbsp;</p>
<p><strong>The Problem</strong></p>
<p>So far, so good. But this breaks down when the calculation contains characters with special meaning in URLs, such as &#8216;/&#8217;, &#8216;?&#8217;, etc. My initial thought was to require that the calculation is url-encoded before inclusion in the API URL. This works for the likes of &#8216;?&#8217;. Encoding a slash is a different matter. The encoded URL for 3/3 would be:</p>
<pre>http://www.calcatraz.com/api/calc/3%2F3.txt</pre>
<p>&nbsp;</p>
<p>Here the %2F is the urlencoded form of &#8216;/&#8217;.</p>
<p>This seems like it should be passed through to the api.php script, but it isn&#8217;t. Instead a 404 not found page is found. It turns out that this is <a title="Apache bug discussion on mod_rewrite slash encoding issue" href="https://issues.apache.org/bugzilla/show_bug.cgi?id=34602">a known bug</a> in Apache / mod_rewrite.</p>
<p>No matter what I tried, there seems to be no way to redirect an API url containing a %2F to a particular script.</p>
<p><strong>The Solution(s)</strong></p>
<p>1) What does work is to perform a double url-encoding of the calculation before placing it in an API URL. So the api call to get the answer for 3/3 would be:</p>
<pre>http://www.calcatraz.com/api/calc/3%252f3.txt</pre>
<pre></pre>
<p>&nbsp;</p>
<p>This works, redirecting to the script and allowing us to extract the calculation and get its original form by performing a single url-decoding (as Apache / mod_rewrite performs one level of decoding implicitly). The main problem with it is that the URLs are pretty messy, and the user has to be asked to perform a double url-encoding. It also makes the URLs less obviously hackable / readable.</p>
<p>2) We can remove the need for the user to perform a double url-encoding by replacing it with a single base-64 encoding. This slightly tidies up the client-side API calls, but it means the URLs are completely inscrutable - the user can&#8217;t easily play around with them at all.</p>
<p>3) Since the slash will actually work without any encoding (it is only other characters as &#8216;?&#8217; which must be encoded), we could create  a custom version of urlencode which encodes everything normally encoded, other than slashes. This would yield the most readable URLs, but significantly complicates things for the user.</p>
<p>4) Switch web servers. As discovered in <a title="ServerFault mod_rewrite url encoding issue discussion" href="http://serverfault.com/questions/295664/mod-rewrite-not-working-with-url-encoded-values">this ServerFault discussion</a> I&#8217;ve been having on the issue, while it affects Apache, it doesn&#8217;t affect some other servers such as <a title="NGINX web server writeup at Pingdom.com" href="http://royal.pingdom.com/2010/02/23/nginx-the-little-russian-web-server-taking-on-the-giants/">nginx</a>.</p>
<p><strong>5) Update: Okay, thanks to the guys over at ServerFault, I now have the answer. By default Apache decodes encoded slashes (the problem). This behaviour can be disabled by adding the following to Apache&#8217;s httpd.conf file (or the relevant vhost configuration):</strong></p>
<pre><strong>AllowEncodedSlashes On</strong></pre>
<p>&nbsp;</p>
<p><strong>Conclusion</strong></p>
<p>I haven&#8217;t tested it on my public web server yet (only my dev server), but all being well Solution 5 is going to be the winner. Look out for the API, coming soon along with nice URLs, and a new version of <a title="Calcatraz, online calculator" href="http://www.calcatraz.com">Calcatraz calculator</a>.</p>
<p><strong>Side Note</strong></p>
<p>Interestingly, it seems that WordPress also falls prey to this issue. I originally posted this article with the term %2F in the title. WordPress took this title and url-decoded it to produce the URL &#8220;slug&#8221; for the post &#8211; which now contained a slash. When the slug is used in the permalink of the page title it is URL encoded back up, and clicking on the link then requests a URL containing a %2F. Because wordpress makes use of redirects, then as seen before, the redirect fails and a 404 error is returned. So it was not possible to actually view the post!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calcatraz.com/blog/the-apache-mod_rewrite-encoded-slash-problem-152/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

