<?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>Yesterday I was wrong &#187; Uncategorized</title>
	<atom:link href="http://dan.bodar.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://dan.bodar.com</link>
	<description>Dan's technical ramblings</description>
	<lastBuildDate>Tue, 29 Jun 2010 07:39:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Off topic &#8211; a very addictive little game for Windows, Mac and Linux&#8230;</title>
		<link>http://dan.bodar.com/2010/06/29/off-topic-a-very-addictive-little-game-for-windows-mac-and-linux/</link>
		<comments>http://dan.bodar.com/2010/06/29/off-topic-a-very-addictive-little-game-for-windows-mac-and-linux/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 07:38:50 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dan.bodar.com/?p=117</guid>
		<description><![CDATA[http://www.hemispheregames.com/osmos/
Very chilled out&#8230;
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hemispheregames.com/osmos/">http://www.hemispheregames.com/osmos/</a></p>
<p>Very chilled out&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.bodar.com/2010/06/29/off-topic-a-very-addictive-little-game-for-windows-mac-and-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crazy Talk &#8211; Holistic Web Testing &#8211; Whys and Values&#8230;</title>
		<link>http://dan.bodar.com/2010/06/22/crazy-talk-holistic-web-testing-whys-and-values/</link>
		<comments>http://dan.bodar.com/2010/06/22/crazy-talk-holistic-web-testing-whys-and-values/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 07:22:35 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dan.bodar.com/?p=108</guid>
		<description><![CDATA[Now for some web specific whys/values I do the in-memory acceptance testing&#8230;

Semantic Html is my golden hammer
Progressive enhancement is my swiss army knife
I love JavaScript but try to never write any but if i must I make sure it&#8217;s generic. I try very hard to make sure no else writes any either and if they [...]]]></description>
			<content:encoded><![CDATA[<p>Now for some web specific whys/values I do the in-memory acceptance testing&#8230;</p>
<ul>
<li>Semantic Html is my golden hammer</li>
<li>Progressive enhancement is my swiss army knife</li>
<li>I love JavaScript but try to never write any but if i must I make sure it&#8217;s generic. I try very hard to make sure no else writes any either and if they do I just refactor it till it deletes itself.</li>
<li>I love AHAH and barely tolerate AJAX / JSON</li>
<li>REST is my natural state not something I read about</li>
</ul>
<p>All of these forces / values / beliefs drive me to solve the problem of web testing in a very different approach from most people. It is about an alternative holistic approach to web architecture, testing and productivity. </p>
<p>So now I have expressed some of the forces / the whys, I will try cover the hows and whats.</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.bodar.com/2010/06/22/crazy-talk-holistic-web-testing-whys-and-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crazy Talk &#8211; Holistic Web Testing &#8211; Some values&#8230;</title>
		<link>http://dan.bodar.com/2010/06/01/crazy-talk-holistic-web-testing-some-values/</link>
		<comments>http://dan.bodar.com/2010/06/01/crazy-talk-holistic-web-testing-some-values/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 19:20:59 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[crazy talk]]></category>

		<guid isPermaLink="false">http://dan.bodar.com/?p=103</guid>
		<description><![CDATA[(Previously on TWSDEV)
As the &#8220;crazy&#8221; guy behind the in-memory / out-of-container acceptance testing on a number of java/.net projects, I think it&#8217;s important I explain to people the &#8220;Why&#8221; and the forces / constraints I am trying to balance. But first I want to quickly lay down my beliefs and values:

I believe in testing as [...]]]></description>
			<content:encoded><![CDATA[<p>(Previously on TWSDEV)</p>
<p>As the &#8220;crazy&#8221; guy behind the in-memory / out-of-container acceptance testing on a number of java/.net projects, I think it&#8217;s important I explain to people the &#8220;Why&#8221; and the forces / constraints I am trying to balance. But first I want to quickly lay down my beliefs and values:</p>
<ul>
<li>I believe in testing as much as possible (UI included)</li>
<li>I believe tests must add more value than they cost (Measure it!)</li>
<li>I value tests that are fast and are resilient to change more than tests  that take a long time to run and are brittle.</li>
<li>When refactoring a feature I value acceptances tests and integration test over unit tests.</li>
<li>When designing/exploring a new interface / object interaction I value unit tests over acceptance tests to help guide me.</li>
<li>I believe that QA&#8217;s are so much better at finding bugs than DEVs but worse at writing code / abstractions</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dan.bodar.com/2010/06/01/crazy-talk-holistic-web-testing-some-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A fan with no blades?</title>
		<link>http://dan.bodar.com/2009/10/31/a-fan-with-no-blades/</link>
		<comments>http://dan.bodar.com/2009/10/31/a-fan-with-no-blades/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 08:20:31 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dan.bodar.com/?p=97</guid>
		<description><![CDATA[Wow Dyson have done it again: http://www.dyson.co.uk/technology/airmultiplier.asp
Interestingly they talk about the fact they had to do &#8220;Hundreds of iterative tests&#8221; to get the design right:
http://www.dyson.co.uk/insidedyson/default.asp#Air_Mult_Tech_Dev
]]></description>
			<content:encoded><![CDATA[<p>Wow Dyson have done it again: <a href="http://www.dyson.co.uk/technology/airmultiplier.asp">http://www.dyson.co.uk/technology/airmultiplier.asp</a></p>
<p>Interestingly they talk about the fact they had to do &#8220;Hundreds of iterative tests&#8221; to get the design right:</p>
<p><a href="http://www.dyson.co.uk/insidedyson/default.asp#Air_Mult_Tech_Dev">http://www.dyson.co.uk/insidedyson/default.asp#Air_Mult_Tech_Dev</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dan.bodar.com/2009/10/31/a-fan-with-no-blades/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chromium Team rocks!</title>
		<link>http://dan.bodar.com/2009/09/05/google-chromium-team-rocks/</link>
		<comments>http://dan.bodar.com/2009/09/05/google-chromium-team-rocks/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 10:49:08 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dan.bodar.com/?p=89</guid>
		<description><![CDATA[So I noticed an issue with Google Chromium and it not updating the cached entry with new headers on a HTTP 304 response. So I logged the issue last weekend and bang! 6 days later the issue is resolved and I have a new version of the browser on my desktop.
Not only was the process [...]]]></description>
			<content:encoded><![CDATA[<p>So I noticed an issue with Google Chromium and it not updating the cached entry with new headers on a HTTP 304 response. So I logged the <a href="http://code.google.com/p/chromium/issues/detail?id=20594">issue</a> last weekend and bang! 6 days later the issue is resolved and I have a new version of the browser on my desktop.</p>
<p>Not only was the process super fast but I watched the fix being discussed then applied. I looked at the code change and the unit tests being updated all as it happened. Needless to same I am very impressed.</p>
<p>Interestingly I noticed the same issue with Opera and logged an issue with the exact same details on the same day, unfortunately Opera&#8217;s bug tracking system is private and so I have no idea if the issue is even being looked at. When they do eventually fix the issue I&#8217;ll still have to wait for sometime as they don&#8217;t have a public build server for me to download and try the fix before an official release.</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.bodar.com/2009/09/05/google-chromium-team-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a fullscreen editor to update my blog</title>
		<link>http://dan.bodar.com/2009/08/31/using-a-fullscreen-editor-to-update-my-blog/</link>
		<comments>http://dan.bodar.com/2009/08/31/using-a-fullscreen-editor-to-update-my-blog/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 10:36:25 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dan.bodar.com/?p=71</guid>
		<description><![CDATA[So after rediscovering the distraction free editors to write reports, it seemed mad not to use the same environment to update my blog. I really like the fact that the editor only supports plain text and didn&#8217;t want to reduce the readability of the plain text by having lots of unneeded markup all over the [...]]]></description>
			<content:encoded><![CDATA[<p>So after rediscovering the distraction free editors to write reports, it seemed mad not to use the same environment to update my blog. I really like the fact that the editor only supports plain text and didn&#8217;t want to reduce the readability of the plain text by having lots of unneeded markup all over the place.</p>
<p>What I needed was a simple tool to convert my semi structured text into html and then I could just upload that to my blog. Ideally the tool would be a command line tool so I could easily automate the two steps.</p>
<p>I looked at a few different tools but in the end chose to use <a href="http://www.sange.fi/~atehwa/cgi-bin/piki.cgi/stx2any">stx2any</a> as it seemed to be a fairly close fit to the type of plain text I normally use, and also produced the cleanest html.</p>
<p>Then I started to look at tools to upload html into my Wordpress blog, I was expecting there to be quite a few but can honestly say I didn&#8217;t even find one. I find this a bit wierd as blogs where originally just html and before that text (remember finger). So I started to look at Python scripts that interacted with the <a href="http://www.xmlrpc.com/metaWeblogApi">MetaWeblogAPI</a> but as my Python is fairly limited I thought I could probably do it quicker in <a href="http://www.scala-lang.org/">Scala</a> (as thats what I&#8217;ve been mainly working in lately).</p>
<p>And so an hour or two later <a href="http://code.google.com/p/html2blog/">html2blog</a> was born. And here is how I tied it all together:</p>
<pre>
stx2any --link-abbrevs --make-title off -T html $1 |
 tidy -asxhtml -qc -w 0 | java -jar html2blog.jar
</pre>
<p>Currently html2blog is very limited in that it always creates a new draft, so the next step will be to make it update an existing entry. I&#8217;d also like to get images working at some point.</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.bodar.com/2009/08/31/using-a-fullscreen-editor-to-update-my-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fullscreen Editors</title>
		<link>http://dan.bodar.com/2009/08/29/fullscreen-editors/</link>
		<comments>http://dan.bodar.com/2009/08/29/fullscreen-editors/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 19:27:04 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dan.bodar.com/?p=46</guid>
		<description><![CDATA[So many moons ago I was reading about a fullscreen editor for Mac called WriteRoom. The basic premise is that it is a very limited editor that actively aims to block out all distractions from writing. It achieves this by:

Running fullscreen (so no desktop distractions)
Supporting plain text only (so no styling distractions)
No toolbar
No menubar
No statusbar
A [...]]]></description>
			<content:encoded><![CDATA[<p>So many moons ago I was reading about a fullscreen editor for Mac called WriteRoom. The basic premise is that it is a very limited editor that actively aims to block out all distractions from writing. It achieves this by:</p>
<ul>
<li>Running fullscreen (so no desktop distractions)</li>
<li>Supporting plain text only (so no styling distractions)</li>
<li>No toolbar</li>
<li>No menubar</li>
<li>No statusbar</li>
<li>A few simple shortcuts to do what you need</li>
</ul>
<p>Anyway I have been running Ubuntu for a number of years, and had often ran Nano fullscreen in a Gnome Terminal but was curious what might now be available. So a few moments googling and this was the list:</p>
<ul>
<li><a href="http://www.hogbaysoftware.com/products/writeroom">WriteRoom</a> for Mac</li>
<li><a href="http://they.misled.us/dark-room">DarkRoom</a> for Windows</li>
<li><a href="http://www.baara.com/q10/">q10</a> for Windows</li>
<li><a href="http://pyroom.org/">PyRoom</a> for Linux</li>
<li><a href="http://spreadingfunkyness.com/focused/">Focussed</a> for Adobe Air</li>
</ul>
<p>After trying each one, I decided that I actually really liked the q10 version and even though it runs perfectly on Linux via Wine, it just takes way to long to startup (2-3 seconds). Mean while the PyRoom version starts in less than 200ms, so after upgrading to 0.41 I was able to get PyRoom looking very similar to q10 with the following settings:</p>
<ul>
<li>Green screen theme</li>
<li>95% height</li>
<li>62% width</li>
<li>Padding 5</li>
<li>No border</li>
<li>Autosave</li>
<li>BitStream Vera Sans font</li>
</ul>
<p>The only thing I am missing is it remembering what file I was last editing, maybe it&#8217;s time I brushed up my Python skills.</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.bodar.com/2009/08/29/fullscreen-editors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Html Contracts &#8211; How semantic html can help your cross functional team</title>
		<link>http://dan.bodar.com/2009/07/22/html-contracts-how-semantic-html-can-help-your-cross-functional-team/</link>
		<comments>http://dan.bodar.com/2009/07/22/html-contracts-how-semantic-html-can-help-your-cross-functional-team/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 17:48:45 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[semantic]]></category>

		<guid isPermaLink="false">http://dan.bodar.com/?p=39</guid>
		<description><![CDATA[One of the pain points we see on web projects is the divide between client side and back end development. This pain might show itself in a number of ways:

Small changes in the HTML cause lots of tests to fail
Small changes to visual layout require large changes to the HTML which then causes the above
Developers [...]]]></description>
			<content:encoded><![CDATA[<p>One of the pain points we see on web projects is the divide between client side and back end development. This pain might show itself in a number of ways:</p>
<ul>
<li>Small changes in the HTML cause lots of tests to fail</li>
<li>Small changes to visual layout require large changes to the HTML which then causes the above</li>
<li>Developers say the work is done but it can&#8217;t be signed off as it looks terrible or doesn&#8217;t work in certain browsers</li>
<li>CSS or QAs want developer to add ID attributes to lots of elements so they can target them more easily</li>
</ul>
<p>Now ideally all your developers should be poly skilled and understand javascript / CSS / HTML just as well as they understand java / C# / ruby but often the reality is not quite so rosy.<br />
So if we are working in a world where we don&#8217;t have the ideal but still need to get the job done what can we do to reduce the pain?</p>
<p>Well the technique I have used on a number of teams is to come up with a &#8220;HTML contract&#8221;. An example might be as follows:</p>
<ul>
<li>Everyone must make the HTML as semantic as possible</li>
<li>IDs are deprecated in favor of class attributes. Just use more specific CSS selectors to target elements</li>
<li>Developers will liberally add class attributes with semantic names even if they don&#8217;t need them immediately (QAs and CSS will use them even if you don&#8217;t)</li>
<li>CSS / Designers can add class attributes if needed but can not remove class attributes without pairing with a dev/QA.</li>
<li>Changing the HTML to support visual display (I&#8217;m talking about document order, float and clear) is severely frowned upon. If you have to do it consider doing it with javascript instead.</li>
<li>QAs are to use hand written XPath expressions in tests that match the domain and make extensive use of contains(@class, &#8217;someClassName&#8217;) and descendant:: rather than IDs or specifying HTML tags</li>
</ul>
<p>Some more general tips that I find help:</p>
<ul>
<li>Converting tables to divs is really no better apart from download size. Use divs to group things or as the root element for a control, use lists for lists of things, tables for tabular data etc.</li>
<li>Hacking HTML, CSS, Javascript just because you are fed up with IE6 is not acceptable</li>
<li>No Cut and Pasting from the web. Or mass import of Javascript / CSS fixes. Don&#8217;t put it in if you don&#8217;t understand what it does.</li>
<li>When you have a CSS issue keep deleting rules until you work out which rule is causing the problem then rebuild the rules up.</li>
</ul>
<p>I post some examples in my next post</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.bodar.com/2009/07/22/html-contracts-how-semantic-html-can-help-your-cross-functional-team/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So how about truly private fields in C#?</title>
		<link>http://dan.bodar.com/2009/05/21/so-how-about-truly-private-fields-in-c/</link>
		<comments>http://dan.bodar.com/2009/05/21/so-how-about-truly-private-fields-in-c/#comments</comments>
		<pubDate>Thu, 21 May 2009 09:58:55 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dan.bodar.com/?p=34</guid>
		<description><![CDATA[UPDATE: Jim pointed out that you can access the field via reflecting over the delegate.  (See comment) Damn this is a bit like how java does anonymous access to private fields of the parent class. I wonder if you could use this for some nasty security violations as people tend to think local variables are [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE: Jim pointed out that you can access the field via reflecting over the delegate.  (See comment) Damn this is a bit like how java does anonymous access to private fields of the parent class. I wonder if you could use this for some nasty security violations as people tend to think local variables are safe from reflection.</p>
<p>After the crazy !@$%  with JavaScript yesterday I said to Christian, I bet we can do this with C# lambda. So the challenge was set&#8230;.</p>
<pre class="brush: csharp;">

class Purse
{
    public Func&lt;int&gt; get;
    public Action&lt;int&gt; set;

    public Purse(int money)
    {
        get = () =&gt; { return money; };
        set = (newMoney) =&gt; { money = newMoney ; };
    }
}
</pre>
<p>And here is the test &#8230;</p>
<pre class="brush: csharp;">

var p = new Purse(2);
p.set(p.get() + 1);
Assert.AreEqual(3, p.get());
</pre>
<p>If you tried to use reflection, as expected there is no field to inspect.</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.bodar.com/2009/05/21/so-how-about-truly-private-fields-in-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Truly private fields in JavaScript</title>
		<link>http://dan.bodar.com/2009/05/21/truly-private-fields-in-javascript/</link>
		<comments>http://dan.bodar.com/2009/05/21/truly-private-fields-in-javascript/#comments</comments>
		<pubDate>Thu, 21 May 2009 09:50:55 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://dan.bodar.com/?p=24</guid>
		<description><![CDATA[So I was chatting with Christian Blunden about JavaScript, and he asked if it was possible to have private fields in JavaScript.
Now the language doesn&#8217;t have a key word but I knew that you could use function scoping to achieve the same affect as I had seen the same thing done using the E programming [...]]]></description>
			<content:encoded><![CDATA[<p>So I was chatting with Christian Blunden about JavaScript, and he asked if it was possible to have private fields in JavaScript.</p>
<p>Now the language doesn&#8217;t have a key word but I knew that you could use function scoping to achieve the same affect as I had seen the same thing done using the <a href="http://www.erights.org/#2levels">E programming language</a>.</p>
<p>So after 5 minutes here is what we came up with:</p>
<pre class="brush: jscript;">
function Purse(money) {
	this.getMoney = function() {
		return money;
	}
	this.setMoney = function(newMoney) {
		money = newMoney;
	}
}
</pre>
<p>This will create a truely private field that can only be accessed via the methods.</p>
<p>You can still mix your private getters and setters with prototype methods. eg:</p>
<pre class="brush: jscript;">
Purse.prototype = {
	add : function( money ) {
		this.setMoney(this.getMoney() + money);
	}
}

var p = new Purse(2);
p.add( 1 );
p.getMoney(); returns 3
</pre>
<p>If you tried to access the money field directly it would be undefined.</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.bodar.com/2009/05/21/truly-private-fields-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
