Gidley Gossipings
http://www.gidley.co.uk/plog/index.php?blogId=1
ben2006-08-02T07:08:12ZEclipse Callisto and BIRT
http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=43&blogId=1
<p>Eclipse have just released 3.2 and Callisto which is designed to help you fetch all the <a href="http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=36&blogId=1">plugins .</a></p><a href="http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=36&blogId=1"></a><p><br />This is a really good idea but it has a couple of glitches.</p><ul><li>Run the find new features to install twice, first time it misses some components that are really useful (e.g. the help for BIRT)</li><li>For BIRT you have to manually install prototype.js - see <a href="http://www.eclipse.org/birt/phoenix/build/">http://www.eclipse.org/birt/phoenix/build/</a> . For some odd reason this only affects the Callisto version of BIRT and not the stand alone versions. Without this installed BIRT just hangs when you try and set report parameters.</li><li>With all the plugins installed is often runs out of memory - edit the eclipse.ini and change -Xmx256m to -Xmx512m.</li></ul><br/>Java2006-07-06T07:23:54ZbenWhite/Black box testing and shades of gray
http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=42&blogId=1
<p>A great debate arose at work about what White and Black box testing, what they were for etc.</p><p>For starters here is my simple definition of testing in general</p><ul><li>Testing: Checking that the solution meets the requirements of system users.</li></ul><p>From this we then split testing into two groups</p><ul /><ul><li>Blackbox: Testing that is not aware of how it works. Just that it works. (e.g. user testing)</li><li>Whitebox: Testing that uses knowledge of how it works to help testing (e.g. looking in the database to see if the data really saved).</li></ul><p>This sounds quite a simple distinction.The debate at work was about whether unit testing can be (or should be) black box. I would argue it can and at least a good chunk of it should. </p><p>Unit testing is about testing the public interface of an object. You are testing to see if the object meets its contract (i.e. its requirements). When you write your unit tests (<a href="http://www.extremeprogramming.org/rules/testfirst.html" title="Test First">obviously first!</a>) you should ideally check it meets the contract. I would argue that this sort of test is black box testing - as the user (the calling class) is checking without any necessary knowledge of the class, it meets the requirements.</p><p>We do tend to enter shades of grey when it comes to really testing a system as running a black box test can often make testing hard. The main problems tend to be</p><ul><li>Getting suitable mock objects (or real objects) to test the interface</li><li>The database (what state is it in).</li><li>The API of the object may allow us to do everything it is meant to do. However it may not allow us to test is has done them. e.g. a void doIt() function. </li><li>Speed (normally related to the previous two items).</li></ul><p>So we then muddle our clean black box test to fix these issues. Normally this involves a combination of</p><ul><li>Calling/adding protected methods</li><li>Stubbing database implementations</li></ul><p>This is where we tend to get a grey test. The tests value however can only be preseved if you keep in mind your focus is to test it meets the contract.</p><p>Finally there are valid situations where we do want to white box unit test - however I would argue these are a minority. An example would be a complex logic to generate a random string suitable for use as a username or password. This should not be exposed via a public interface (getUserName() getPassword() would be appropiate), but to prove it is working you would need to test the implementation. </p><p>In conclusion I think you need to be clear about what you test is testing and you tests should be categorised into</p><ul><li>Black Box (with shades of grey): testing the contract of the interface</li><li>White Box: testing the implementation.</li></ul><p></p><p></p><br/>Alternative Title: why Mike and Gaz are wrongJava2006-06-07T10:12:46ZbenGoogle Notebook
http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=40&blogId=1
<p>I have just got a google notebook at <a href="http://www.google.com/notebook/user/04814795451745143598">http://www.google.com/notebook/user/04814795451745143598</a></p><a href="http://www.google.com/notebook/user/04814795451745143598"></a><p>This seems to be quite a cool service. Once you install the browser extension you can grab bits of web pages and keep them.</p><br/>General2006-05-16T09:34:37ZbenReview of Issue/Bug Tracking Systems
http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=39&blogId=1
<p>I am just starting a rolling review of a few bug tracking systems. Rather than put it directly on this Blog I decided to put it on Google pages - mainly to see what they could do.</p><p>See the main review of issue trackers is at <a href="http://bgidley.googlepages.com/issuetrackers"><b>http://bgidley.googlepages.com/issuetrackers</b></a></p><p></p><br/>Java2006-05-14T14:59:07ZbenGidley.eu
http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=38&blogId=1
<p>For reasons that don't really make much sense you can now access this site via http://gidley.eu as well as via http://www.gidley.co.uk. Very european of me!</p><br/>General2006-04-13T16:46:46ZbenCat + Kitten
http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=37&blogId=1
<p> Helen and I have just got a cat and kitten!</p><p><br />They are Parsnip</p><p><a class="nodecoration" id="res_15" href="http://www.gidley.co.uk/plog/resserver.php?blogId=1&resource=DSC01556.JPG" type="image/jpeg"><img border="0" class="res_image_small" style="margin: 5px;" alt="Parsnip" src="http://www.gidley.co.uk/plog/resserver.php?blogId=1&resource=DSC01556.JPG&mode=preview" /></a></p><p>and Sprout</p><p><a class="nodecoration" id="res_16" href="http://www.gidley.co.uk/plog/resserver.php?blogId=1&resource=DSC01557.JPG" type="image/jpeg"><img border="0" class="res_image_small" style="margin: 5px;" alt="Sprout" src="http://www.gidley.co.uk/plog/resserver.php?blogId=1&resource=DSC01557.JPG&mode=preview" /></a></p><br/>CatsGeneral2006-02-28T19:35:55ZbenEclipse and its plugins
http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=36&blogId=1
<p> <a href="http://www.eclipse.org/">Eclipse </a>is coming along extremely well as an IDE - but a lot of people are not finding the plugins that make it even better.</p><p>So as I was reinstalling Eclipse I thought I would note what is worth getting.</p><p>For a start </p><ul><li>Get Eclipse 3.1.2 as a download from www.eclipse.org</li></ul><p>Then the rest we can add via the update manager.</p><p>In Eclipse choose </p><p>Help<br /> > Software Updates<br /> > Find and Install...<br /> > Search for new features to install<br /> > Add Update Site...</p><p>In the Update Manager add the Web Tools Project update site http://download.eclipse.org/webtools/updates/ . This once installed adds both BIRT (reporting), Visual Editor and TPTP (testing and profiling) to your update site list.</p><p>Add the new Web Tools features to get</p><ul><li>A nice XML editor</li><li>A XML Schema view a bit like XML Spy's or <a href="www.oxygenxml.com">OxygenXml</a>'s </li><li>Web server start/stop plugins</li><li>Database editor/viewer</li></ul><p>Then once installed and restarted go back into the update manager and search for more featues. You can now install BIRT, TPPT and Visual Editor.</p><p>The TPPT (see <a href="http://www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html">http://www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html</a><br />for an tutorial). Allows you to</p><ul><li>Profile Code</li></ul><p>BIRT is a reporting suite - I keep looking at it as an alternative to Jasper Reports. The report building GUI certainly seems better than anything Jasper Offer.</p><p>The Visual Editor is a Swing/SWT GUI builder - nice if you want a thick client application.</p><br/>Java2006-02-25T16:49:13ZbenMy del.icio.us tags
http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=35&blogId=1
<script src="http://del.icio.us/feeds/js/tags/bgidley?icon;count=35;size=12-35;color=87ceeb-0000ff;title=my%20del.icio.us%20tags" type="text/javascript"></script><br/>General2006-02-12T19:36:51ZbenWeb 2.0
http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=34&blogId=1
<p>There appears to be a lot of hype about web 2.0 flying about at the moment. As every much of it doesn't live up to expectations but some of it does.<br /><br />I have taken to using http://del.icio.us/bgidley for my bookmarks and from there have found a range other web 2.0 sites.</p><p>The key things that web 2.0 appears to be is a slick GUI (usually using AJAX). This in itself seems like a good thing. </p><p>From a technology perspective I find the web 2.0 frames works all a bit worrying. Moving to the web from thick clients programmers lives got so much simpler - they didn't have to worry in the main about GUI events and instead just put the page back.</p><p>Web 2.0 is going to result in some really awful application bugs of the sort when you can fill in A then B then C but if you go back to A and edit it you will 'break' the page. This sort of thing was a common problem in the Visual Basic GUI's of a few years ago.</p><p>Hopefully component frameworks like Tapestry can keep all the Web2.0 coolness locked away and thus reduce the screw up likelyhood. </p><p>The other thing that worries me is the security aspect - unchecked input and cross site scripting are the most common sorts of security bugs and with Web 2.0 the opportunity for mistakes is going to be increased.</p><br/>Java2006-02-12T19:30:23ZbenStrong Space
http://www.gidley.co.uk/plog/index.php?op=ViewArticle&articleId=33&blogId=1
<p>I have recently started using <a href="http://www.strongspace.com">Strongspace</a>to backup all my files. This is a really good service that provides 4Gb of space for $5 a month! The great thing about this is all our digital photo's can be kept safely. It is one of the major downsides of digital photography if your PC breaks you could lose the lot.</p><p>The only obvious downside is they use SFTP or RSYNC to upload which will make it quite hard for non techy users to use. Fortunately there is a <a href="http://www.antidis.com/articles/2005/08/windows-rsync/">blog </a>with details.
</p>
<p>The one feature of Rsync that I wanted that this does not explain and the rsync manual does explain but not very clearly is how to do excludes and includes. </p>
<p>In my example I wanted to back up the My Pictures and Secure folder under My Documents but not the rest. The simplest way to do this is to use a filter file.</p>
<p><br />
To do this create a file (I called my exlc but you can call it what you like) with lines like the following in </p>
- /*<br />
<code>
+ /My Documents/<br />
+ /My Documents/Secure/<br />
+ /My Documents/My Pictures/<br />
- /My Documents/*<br />
</code>
<p>This will cause rsync to (in order)</p>
<ul><li>Ignore Everything</li>
<li>Look in My Documents</li>
<li>Look in My Documents/Secure</li>
<li>Look in My Documents/My Pictures</li>
<li>Ignore everything else in My Documents</li>
</ul><p>Then run rsync as per the tutorial with the --exclude-from option pointing at your file - e.g.<br />
</p>
<code>rsync -avz --delete --exclude-from=excl "/cygdrive/d/My Documents" username@username.strongspace.com:mydocs</code>
<p>
</p><p /><br/>General2005-12-28T08:10:36Zben