Unit Testing

Unit Testing

29/10/09 17:52

"Article on out of container testing. http://blog.code-adept.com "

from recent.xml after an edit

A Wiki, a Note Pad, a Feed

10/11/09 10:44

I think this is a very amazing tool, just because it encourages writing.
I think I will settle on capitals for begining of sentences, a various other norms of writing. This is so easy, do I need more?

But I thought, not unreasonably, that I would like to mirror these posts - is it a blog? - into my blogger blog, SemanticC. As I don't often post there and this machine is not always available.
I will get onto that, but first, point out -

a. Yes, it is true, this is not a blog, or a very sophisticated wiki, no subscriptions, or not easily, no various other bits.

b. As you will see, who needs the clutter?

c. this is only 1 - 3 meg memory footprint, compare to firefox - 340, artifactory - 259, nepomuk - 200, tomcat - 170, konquerer - 25, other nepomuk services 14 each and so on.

lua is suitable for embedding in phones as can be seen. I wonder how hard that is?

d. markdown, the styling syntax is dead simple and unobtrusive.

e. the whole interface is a joy of simplicity, once mysteries have been solved, such as the alias game, which is too much fun!

As a feed.

There is a feed to these pages and, I believe, the whole output is available too, as feedvalidator.org shows.

But there seems to be no way of echoing a followed blog from blogs I am reading into the main blog.
I imagine this is because one shouldn't quote without reading first, but still I'm a bit surprised. In my case, anyway, I just want to syndicate my own material. Perhaps I have missed something?
What I haven't missed is that when I copy it into a post it becomes, from something elegant, a whole mess to the point of being impossible to read.
Keeping things simple, legible and attractive in blogger is an effort.
What to do?

This Is How It Works

10/11/09 10:18

nanoki keeps a reference to the address that it is contacted from, whether internal or external.
an edit from a different internal machine yields a different alias.
an edit from the same machine, no matter the address is conjoint.biz or 192 ... is the same alias.
does nanoki just resolve it to the same internal address or is it relying on a cookie sent to the browser?
not too bothered to find out at the moment.
does my machine resolve all internal request to the same address, or series of addresses, which nanoki then receives?

what is important is that it is possible to to check my machine is available on certain posts. but gibson shieldsup is not quite enough on its own as I found I didn't understand what it meant when it reported a port closed. now I do know I guess it would be, but I also used http://www.websitepulse.com/help/tools.php?

Who Am I

10/11/09 10:07

So now I come in from conjoint.biz, I assume a different alias.
But how about www.conjoint.biz and my internal address, 192... ?
Anyway ...

So, who am I now, coming in from a different internal address, no cookies?

Internal Alias

10/11/09 10:03

This is me on the internal net, but not localhost, which, by the way, is not available.
That is another story.
linux -
1. many routing tables - 255 c.f. route and ip route
2. a host table
3. but why is it that tomcat can start in two instances and both available as 192...:port, localhost:port and conjoint.biz:port? Whereas this is not so of nanoki?

No wonder I thought is was the firewall!
Not sure at the moment what I need to look for to sort out. Presumably it is either in the host table, but I don't think there is any port number given in that, or it is the way nanoki binds to an address?

I think I'll move on for now.
Edge Cases
posted by Lab Zipzipace at Recent - 13 minutes ago
I can inspect a POM and see if each artifact - as they shall be known - corresponds to a rule. Consider:- net.sourceforge.nekohtml nekohtml...
Lab Zipzipace
posted by Rat Outzipair at Recent - 13 minutes ago
Eurydice by Sue Hubbard I am not afraid as I descend, step by step, leaving behind the salt winds blowing up the corrugated river The damp city streets their sodium glare of rush hour headlights pitted...
posted by Nanoki at Recent - 13 minutes ago
posted by Lab Zipzipace at Recent - 13 minutes ago
What an effort to get this up - too many hours. But worth it. Now to enjoy! Remember this is a wiki not a blog, so page postings I guess. Wonder how formated. alt.dev looks good and is intuitive. So this...
Markdown syntax reference
posted by Nanoki at Recent - 13 minutes ago
Paragraphs, Headers, Blockquotes A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line contai...
Maven Dependency Resolution
posted by Lab Zipzipace at Recent - 13 minutes ago
What have I been doing recently? Building a variety of projects. These include some - relatively - old projects. All of the CoffeeShop sample code in JUnit Recipes: Practical Methods for Programmer Testi...
posted by Nanoki at Recent - 13 minutes ago
*Nanoki* is a simple wiki engine implemented in Lua, allowing you to create, edit, and link web pages easily. [image: Nanoki] ------------------------------ Run Nanoki Start Nanoki from the command lin...
Rat Outzipair
posted by Lab Zipzipace at Recent - 13 minutes ago
This is the default high level user. Edited by Lab Zipzipace. One or other of these fabulous names must be lost if another one of the pair is to be created using some other name. But how to add other use...
posted by Rat Outzipant at Recent - 13 minutes ago
a text page that is a test
Unit Testing
posted by Lab Zipzipace at Recent - 13 minutes ago
"Article on out of container testing. http://blog.code-adept.com "

Maven Dependency Resolution

Maven Dependency Resolution

05/11/09 17:42

What have I been doing recently?
Building a variety of projects.
These include some - relatively - old projects. All of the CoffeeShop sample code in JUnit Recipes: Practical Methods for Programmer Testing -
Here are the details --
By: J. B. Rainsberger
Publisher: Manning Publications
Pub. Date: July 15, 2004
Print ISBN-10: 1-932394-23-0
Print ISBN-13: 978-1-932394-23-8
Pages in Print Edition: 752

This is from around 2005.
I have also done same with zoe, also from around 2005.
CoffeeShop, with multiple projects, needed a lot of work reconciling dependencies.
In come my friends jarvana and so.
zoe [1.,2.,3.,4.] is different, and, in a way, more complex.
zoe is configured for maven1 with a project.xml file.
It is instructive making the conversion by hand. Certainly the mvn one:convert tool cannot cope.
There are guesses that can be made that must be regular mappings. So why not look at the xsd for each version, along with any notes, and make a map from this, say using generateDS?

There are some other things.
The way I see it is that we have.

  1. ant builds - these entail finding canonical versions of referenced artifacts across a system - as far as is

    1.1. when artifacts have been resolved the .properties file needs to be referenced in the created pom

    1.2. the build.xml file needs to be parsed, from what I can see just for directory locations

    1.3. the build file remains intact, other tasks, such as code generation, will be invoked via ant

    1.3.1. some tasks are ant like and it is not reasonable to use maven for them. However some tasks imply something
    about structure that really needs to be resolved in the pom module dependency hierarchy.
    It is unclear how to make this distinction automatically, but a mechanism to create a module against
    which a specific complex ant task is run would go some way.

  2. maven1 builds - this would entail a mapping between the two as mentioned.

  3. creating canonical versions and canonical version management.

    3.1. creating canonical - there are different issues here. Finally it seems that there is no way of engineering
    an unknown version apart from doing a look up

    3.2. look ups have their own difficulties and interest. Sometimes a project cannot be found -

    3.2.1. the jar is not available on public repositories, e.g. Sun version jars

    3.2.2. the particular version is not available

    3.3. above seems to be an issue that could be solved with some very sophisticated search - more later

    3.4. canonical version management - augeas with the magic lens seems to be the way to control this and seems
    preferable to an XML db. It would only be build.xml that would be appropriate to an xml db anyway.

  4. issues to explore are semantic annotation, which would seem appropriate to build.xml etc. This maybe made
    automatic if it is possible to digest the nature of the ant tasks.

  1. http://alt.textdrive.com/dynam/
  2. http://alt.textdrive.com/nanoki/
  3. http://it1.evectors.it/itSites/zoe/
  4. http://www.zoeprofessional.com/taketour.html

05/11/09 12:02

What an effort to get this up - too many hours. But worth it. Now to enjoy!
Remember this is a wiki not a blog, so page postings I guess. Wonder how formated.
alt.dev looks good and is intuitive.
So this is the main page.

Added the file “2004-03-02-12-54-00.jpg”. "On the quay"

(this doesn't show for some reason so omitted from this entry.)

Edge Cases

Edge Cases

31/10/09 18:51

I can inspect a POM and see if each artifact - as they shall be known - corresponds to a rule.

  1. Is it possible to deduce the information in above from a jar file?

  2. Where it is possible to find - starting from the most right part of the jar file name after the .jar suffix - the version and the artifactId, is it possible to find the groupId?

  3. is a sub to 1. and the answer to 1. is no completely. The first jar will be nekohtml-1.9.12 and the second spring-full-1.1-rc1, but in neither case is it possible to know the groupId.

Look at these examples:-

The simple case --

and two complex cases -



The simple case is just httpunit-1.6.2,jar, and that is easy.

The first complex case is -

  --- Notice there are several hyphens in the artifactId, as the next case shows, it is
     not possible to know which one denotes the boundary between version and artifactId. ---

The second complex case is -

  --- Here it is possible to surmise from the meaning that 4aug2000r7-dev belongs to the version,
     it would be difficult to make a reliable rule for this, as the previous case shows. ---

I have also seen in private repositories an underscore used in place of a hyphen and artifacts anonymised when placed into the repository from their source, i.e. this information striped out of their name, only to be renamed differently where they are consumed.
 --- This may seem particularly strange, but when you consider that the artifact is playing a role in a
     different project with its own release versions and naming, it makes some sort of sense. ---

I don't think it is possible to order artifacts without consulting an online service such as jarvana.
This would have benefits in that other information can be gleaned at the same time, such as dependencies and, of course, the missing groupId.
However, it can be that a needed dependency is incorrectly refered to. How does this happen?

This was needed.


This is what was found.


I coped with this through renaming, and I assume that the dependency is to be found in some prior POM downloaded with another artifact? I should look into this, but either was something has to be re-edited.
Actually I think I made the wrong choice, the thing to do would have been to look into the offending POM dependency and correct it, this way the correct artifact could be downloaded to a correct position.

So, in the end, jarvana to the rescue and my ant/maven1 ---> maven2 tool has a bit of a way to go still.

Rat Outzipair

Rat Outzipair

29/10/09 18:22

This is the default high level user.
Edited by Lab Zipzipace.
One or other of these fabulous names must be lost if another one of the pair is to be created using some other name.
But how to add other users?
This is, perhaps, the most surprising, but also the most lua aspect of nanoki. Users are created according to IP!

How's it done?

I wonder what that name generation algorithm is, maybe just a text file, will check at some point.

Lab Zipzipace

29/10/09 11:58

Eurydice by Sue Hubbard

I am not afraid as I descend,
step by step, leaving behind
the salt winds blowing up the
corrugated river

The damp city streets
their sodium glare of
rush hour headlights
pitted with pearls of rain
for my eyes still reflect the half remembered moon

Already your face receads beneath the station clock
a damp smudge among the shadows
mirrored in the trains wet glass.

Will you forget me?
Steal tracks lead you out past crains and crematoria
boat yards and bike sheds

ruby shards of roman glass
and wolfbone mummified in mud.
These rows of curtains windows like
eyelids heavy with sleep to the citys green edge.

Now I stop
my ears with wax
hold fast to the memory of the song you once whispered in my ear
it's echoes tangle like briars in my thick hair

You turned to look
second fly past like birds
my hands grow cold
i am ice and cloud.

This path unravels deep in hidden rooms
filled with dust and sour night breath
the lost city is sleeping

Above the hurt sky is weeping,
soaked nightingales have ceased to sing.
Dusk has come early. I am drowning in blue.

I dream of a green garden
where the sun feathers my face
like your once eager kiss

soon, soon
i will climb from the blackened earth
into the diffident light.


29/10/09 01:19

Nanoki is a simple wiki engine implemented in Lua, allowing you to create, edit, and link web pages easily.


Run Nanoki

Start Nanoki from the command line:

cd Nanoki
lua Nanoki.lua . localhost 1080

The above command will start Nanoki on your local host at port 1080, using the local directory for storage:

Command synopsis:

Nanoki [location] [address] [port] [not|forwarded] [not|secure]

location tells Nanoki where to store its data.

address indicates which network address to bind the Nanoki server to.

port indicates what port number to use.

forwarded indicates whether x-forwarded-for should be trusted.

secure indicates whether https should be used.


Create a page

To create a new page, type its name in your browser address bar:


If the page doesn't exists yet, Nanoki will redirect you to the page editor:

New Editor

Edit a page

To edit a page, click on its title. This will take you to the page editor:


The editor uses Markdown syntax to describe the page content.

To save your text, press Preview and then Save.

Upload a file

From the editor, you can upload files to Nanoki:


Each page can have its own files. You can refer to those files like so:

[1]: nanoki/file/run.png

File link synopsis:


page is the name of the page under which the file is located.

name is the file name.

Control panel

From the editor, you can access the control panel to rename or delete a page:



From the editor, you can access a page revision history by clicking on its title:


Clicking a revision number will display the page content as it was then.

Revision differences

From the revision page, you can access the revision differences by clicking on its title:

Revision differences

Related pages

Each page keep tracks of which other pages links to it:


Breadcrumb navigation

Each page reflects its location using a breadcrumb trail:


Index navigation

Nanoki provides a table of content, indexed by page title:


Date navigation

The date navigation indexes pages by their publication date:


Recent changes

The recent changes page lists what has changed in Nanoki recently:



The search allows to locate pages by their title:


XML feed

Aside from the editor, most pages provide an XML feed:


Feed view

System page

The system page provides basic information about Nanoki itself:


Posting by mail

Unfortunately Kontact will not post directly to blogger, the Journal connect feature doesn't sign in correctly to this API.
Never mind.

Test Preparation - suppressed

Location: surpressed
Due on: 16/09/2009

Ideas for test preparation.

Minimal directory structure

Choose just the directory and corresponding test directory for the targets under test

Ensure that dependencies are met - eclipse should be able to build this area without marking error

Stage 1 -

no change to lib directories in class path - no attempt to mavenize the project


What areas might be automated?

One idea is just to copy across, either way by simple command, and delete .svn directories in the process, as we are copying they are not needed in a subsidiary project and are a pain.


Software Development,Software Development:Test,Software Development:Test:Preparation

Priority: 5

0 % completed

Creation date: 13/09/2009 18:37

Bookmark: http://mikearthur.co.uk/2008/09/kde-blog-from-korganizer-howto/
adamdeli's notes: KDE – Blog from KOrganizer HOWTO

Saturday 27th September, 2008 @ 01:14

Blog from KOrganizer? What kind of madness is this? Apparently some crazy (but yet incredibly good looking) fool decided to give you the ability to post journals from KOrganizer to your blog. Let's learn how to do it!

You can find more of adamdeli's bookmarks at
- http://delicious.com/adamdeli

Delivered by Delicious.com
The tastiest bookmarks on the web

WesterheverevehretseWImage by Der Ohlsen via Flickr

Couldn't resist!

Date blogger

Well I can see the problem with the date. The code I have introduced means that the date and month part must appear below the day abbreviation when it is a Thursday. This, in turn, means that the text doesn't flow correctly.
I'll have a look at what is most elegant to solve this.
I think, from inspection, that the abbreviation treatment is correct.
I have introduced a poll. It seems like a poll cannot extend beyond the month it is set in, which I find annoying.
I am still not happy with the use of the screen. I think the side panels take up too much rook, and waste space when there is nothing in them. The current design has two RHS panels, a narrow one and a wider one.
I also don't like the background to the gadgets.
What I do like is the way I am using MarkMail.
What i have done is narrowed down a search, in the case of the the one from scala-internals, to just two posts from David Pollak, to just 2.
Appart from the fact that this makes me look very cleaver if I can understand what he has posted about, this is genuinely very cool and useful.
What it is is a way of making comment on the list postings without having to post to the list. This is important to me because my comments will typically be off topic and, so, very annoying if made on the list.
I will elaborate on what I have to say about this post later.
In the meantime I also need to find a way of gathering data from MarkMail, if this is possible. It would be very interesting to have David Pollak has posted x number of emails on the subject of ... . Actually David has posted a huge number of mails, as it happens. I am unclear if this is a good example of what I am driving at or not.
I do remember that MS released a betta (it was quite broken from what I remember) many years ago of software that built a social picture of the interrelated posts on a topic or series of topics. I'm surprised this hasn't surfaced in any recognizable form, but, then, I haven't really been looking.
I notice that the blog doesn't display correctly as the blog entry is overwritten by the date. I wonder what the difference is with original template.
Well, obviously, the way to change all tags is to select them on each and every post where they are used, delete and then reinstate with the new spelling or format, in this case all lowercase. This might not work if there are a lot of posts!
On the other hand it is gratifying to notice that if a label is not used, i.e. the title case version, it does not appear in the show all labels, yes, tags are labels here, of course, and the philosophy behind them is a bit different to other tag usages.
I promised come back to this.
First of all I have decided to move all tags to lower case, but that is appro pro nothing apart from the last post.
The thread of thought is in the notion of insight into the evolving world of semantics.
First of all that is not my professional world, so I only know a little about it. Still there are ideas to explore which I shall come to over time.
Further I will be unselfconscious in the statements I make and the questions I ask.
I don't mind seeming foolish, no doubt I am foolish.
This applies to all of my ramblings. Call me a fool if you will, it's OK.
An example of my foolishness would be in the use of tags.
What, actually, are tags for and what do they have to do with web 2.0/3.0 - the semantic web?
You do not have to be in this industry for too long to come up against received opinion, the twist is that received opinion here has been formed about things that have existed for hardly any time, e.g. tags, but the way of forming those opinions is the same as ever.
So someone may argue the benefits of tags and tagging as if there is something in them more than what is quite apparent about them.
Tags will be sold, and I use the word deliberately, as a semantic idiom, something that expands meaning on the item that has been tagged, that is to say, enriches our understanding of that item.
Tags will be sold as a facility that fits in with web 3.0 and complements it.
But I think it is just that, a sales pitch given in a work situation where advocates don't want to lose face and want, if they can, to sell a facility for the benefit to themselves of having that to their credit, without thinking too hard about what, really, the benefit is.
I am speaking of a real work situation I have witnessed here.
But my rule of thumb comes in here, that is where there is one instance there is at least 2 * one order of magnitude other examples that lie beneath the surface.
So here I am talking about the pitch for tag enablement.
- My rule of thumb is not for the situation where the phenomenon is absolutely ubiquitous. An example of the latter would be where Ben Goldacre, in Is this a joke? noticed a report about the connection between crime, imprisonment and re-offending.
His conclusion was, to paraphrase, that the authors had not understood, or possibly even read, the reports from which they formed their own report and that the only people who could be interested in this report would be those who had no interest in the underlying arguments.
That behaviour, I would say, is ubiquitous and not subject to my 2 * one order of magnitude rule.
Coming back to tags.
Really this depends on how they are used. In the context of a blog they aford a useful way of sorting information and filtering, and of displaying the basis for filters.
But I don't think that is more than adding a single flat association to each item in the first place. I don't think that tags expand the meaning through description of the tagged item.
I also can't see how they can be reasoned over as they have little of no relationship to each other.
Still there is a frustration here. Why is this? delicious does a very good job of suggesting tags now. MT (MovableType) does an even better job, more later.
What with AdWords and so, I would have thought google would offer something in that direction. But I think that is a bit of the problem. The sort of tag suggestions I might want wouldn't be the same as what might appear from AdWords, and the priority would be entirely different.
Something to think about.
Well I had to go into the Javascript to create a conditional so that Thursday will appear as Thurs and all other days will appear as three characters (Sun, Mon etc.). No big deal, just detail, and a strategy to deal with the detail since I didn't know what I was doing.
Most of the time it was finding that strategy.
I have night mares about setting up a decent debug environment, my next task at work. No doubt the same principal.
I then had to find the setting for the time zone, it is a basic setting.
w.r.t the tag cloud I'm unsure how it will look when there is a proper differential in usage. But suspect I have seen better implementations so i may change it or use a different impl.
I have to decide a couple of things. Am I happy with capitalized tags?
If not can they be changed across the site, I suspect so.
Can I import my tags from Firefox and/or delicious. It is bad enough that i have these different collections of tags, in different formats. I gues next trivial task will be to see whether I can find (or create?) a conversion tool that harvests and publishes tags between different on line presences. This is a bit of a bizare business since there is also flickr and, at a stretch though I don't use either, linkedin and facebook and locally digicam and nepomuk. There is also Last.fm.
I think that argues well for some uniform tool and there have been efforts in this direction. One was a DB that was built out of harvesting publically available tags, obviously in the line of what I am thinking. I think that service has, more or less, closed or sells into advertising agencies. This last is a sensible move and might be worth my investigating again?
About tags - well this is a whole other post, but just entering them
  1. It is far less effort to enter in lowercase.
  2. I am unsure how to deal with plurals - do I mean services or service? What about blogging, blogger and blog which are two nouns (blogger, blog), one with two meanings, blogger this service, blogger a person and two verbs (blogging, blog). Em.
  3. From my experiance with delicious, how to deal with compound words or concepts.
  4. How many tags to apply to a post anyway - that is how to know that more is not better? It just seems that fewer is easier for the user, but that depends on usage ...
Well, I have messed around with the template and feel happy enough with it.
Some points.
This is a note pad. I'm not too concerned if anyone reads this.
This blog is oriented to my work and carries my signature, so it has some restrictions on what I might say. This, in turn, probably is to the benefit of the reader, or at least the type of reader who may end up here, since, in some parallel universe there may be another blog, possibly posted to under an alias, that contains all my most creative imaginings and inconsistent ramblings, right down to the most acerbic, biting critique. But enough of that, that is not for here. That only may ever take place. And, anyway, when it comes to this industry I will make a critique, it will be suitably anonymised here to prevent red faces, my own or others, in anger or shame.
This brings me to the last point I wanted to make in this first 'real' post.
The blog is called SemanticC, somehow a cleaver name, but it really means next to nothing.
I guess it could mean insight into the evolving world of semantics. Perhaps it will turn out that way, I have no objection. I will elaborate on this point in my next post.
But looking at the first post from April last year says something about me.
A debate graph - what a good idea.
What it says about me is that I expect, anticipate, even like contention.
I could say more about this, the person who puts himself in the middle of opposing arguments to see if they can be resolved.
I will leave this point dangling, but it is a good thing to bear in mind when considering AI and semantics.