Eamonn O'Brien-Strain

LinkedIn


date: '2011-02-18 14:08:25' layout: post slug: rdf-schema-diagrams status: publish ref: http://www.w3.org/2001/sw/RDFCore/Schema/200203/#ch_appendix_figs title: RDF Schema Diagrams wordpress_id: '1120' categories: Programming


For some reason the latest (2004) version of the RDF Schema specification does not include the useful diagrams that were included in previous drafts. Maybe they were omitted because the diagrams sacrificed some formalism for the sake of clarity. Nevertheless I found those older diagrams useful for getting my head around some of the concepts, so here they are:

2002 Version

1999 Version

The current 2004 version of the spec does include these useful summary tables:

6.1 RDF classes

Class name comment

rdfs:Resource

The class resource, everything.

rdfs:Literal

The class of literal values, e.g. textual strings and integers.

rdf:XMLLiteral

The class of XML literals values.

rdfs:Class

The class of classes.

rdf:Property

The class of RDF properties.

rdfs:Datatype

The class of RDF datatypes.

rdf:Statement

The class of RDF statements.

rdf:Bag

The class of unordered containers.

rdf:Seq

The class of ordered containers.

rdf:Alt

The class of containers of alternatives.

rdfs:Container

The class of RDF containers.

rdfs:ContainerMembershipProperty

The class of container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'.

rdf:List

The class of RDF Lists.

6.2 RDF

properties

Property name comment domain range

rdf:type

The subject is an instance of a class.

rdfs:Resource

rdfs:Class

rdfs:subClassOf

The subject is a subclass of a class.

rdfs:Class

rdfs:Class

rdfs:subPropertyOf

The subject is a subproperty of a property.

rdf:Property

rdf:Property

rdfs:domain

A domain of the subject property.

rdf:Property

rdfs:Class

rdfs:range

A range of the subject property.

rdf:Property

rdfs:Class

rdfs:label

A human-readable name for the subject.

rdfs:Resource

rdfs:Literal

rdfs:comment

A description of the subject resource.

rdfs:Resource

rdfs:Literal

rdfs:member

A member of the subject resource.

rdfs:Resource

rdfs:Resource

rdf:first

The first item in the subject RDF list.

rdf:List

rdfs:Resource

rdf:rest

The rest of the subject RDF list after the first item.

rdf:List

rdf:List

rdfs:seeAlso

Further information about the subject resource.

rdfs:Resource

rdfs:Resource

rdfs:isDefinedBy

The definition of the subject resource.

rdfs:Resource

rdfs:Resource

rdf:value

Idiomatic property used for structured values (see the RDF Primer for an example of its usage).

rdfs:Resource

rdfs:Resource

rdf:subject

The subject of the subject RDF statement.

rdf:Statement

rdfs:Resource

rdf:predicate

The predicate of the subject RDF statement.

rdf:Statement

rdfs:Resource

rdf:object

The object of the subject RDF statement.

rdf:Statement

rdfs:Resource

In addition to these classes and properties, RDF also uses properties called rdf:_1, rdf:_2, rdf:_3... etc., each of which is both a sub-property of rdfs:member and an instance of the class rdfs:ContainerMembershipProperty. There is also an instance of rdf:List called rdf:nil that is an empty rdf:List.


date: '2011-02-17 23:31:01' layout: post slug: hp-labs-seeking-an-agile-java-contract-web-programmer-to-do-amazing status: publish title: HP Labs seeking an agile Java contract web programmer to Do Amazing wordpress_id: '1117' categories: Programming image: img/HPLabs560.gif image-text: HP Labs Logo (in 2011)


If the following description sounds like you then we should talk.

You are one of the best programmers you know and have several years demonstrable experience in Java on a cloud-deployed web stack. Although Java is your prime language you are also a skilled JavaScript programmer and understand the fundamentals of web technologies, from the database to the browser UI. You may even be able to hack some C++ code in a pinch. You know the standard web stack inside-out, but also can show us engagement with Internet-scale technologies such as map-reduce computation frameworks and noSQL distributed data stores. You can architect and build a scalable deployment on an elastic cloud infrastructure such as AWS.

You love learning new tools, frameworks, and programming languages, but are also able to critically evaluate when it makes sense to use them. You have heard of Riak, Scala, Play, and JQuery and maybe even dabbled with them. You know what “big O” means.

You can work in an agile environment of two-weekly sprints, working with your team and the customer representative to hone the user stories, and plan the work. You can create clean elegant designs and explain them clearly to your team with appropriate diagrams. You have realized that unit tests are not a chore, but a productive tool to drive your coding. You have internalized the practices of DRY, refactoring, and continuous integration. You can work effectively in a team distributed over many time zones, and are OK with virtual meetings outside normal work hours.

In return you get to work in a stimulating environment, working side-by-side with HP Labs researchers in Palo Alto. You can take advantage of on-site gym and cafeteria, and the opportunity to attend talks from a variety of areas of science and technology.

(Please respond on Craig's List.)


date: '2010-12-23 23:37:55' layout: post slug: now-you-can-convert-any-text-to-ogham status: publish ref: http://eamonn.org/ogham.php title: Now you can convert any text to Ogham wordpress_id: '1072' categories: Language


In a little bit of recreational programming I threw together a web converter that takes any text and converts it into Ogham.

Ogham (pronounced oh-em) is an alphabet from early Medieval Ireland, around the time Christianity took root. It was designed to be carved on the vertical corner of a monumental stone, read from bottom to top.

Amazingly the Unicode character encoding standard includes entries for the Ogham alphabet, though the glyphs are rotated so that they are read left to right rather than bottom to top. So my converter simply converts from normal Latin characters to their Ogham equivalent. However, whether this displays correctly for you might depend on what browser you are using. (I would appreciate you adding any comments to this posting letting me know on what browsers it displays correctly or not).

The rest of this posting is this text converted into Ogham.

᚛ᚔᚅ ᚐ ᚂᚔᚈᚈᚂᚓ ᚁᚔᚈ ᚑᚃ ᚏᚓᚉᚏᚕᚈᚔᚑᚅᚐᚂ ᚚᚏᚑᚌᚏᚐᚋᚋᚔᚍ ᚔ ᚈᚆᚏᚓᚒ ᚈᚑᚌᚓᚈᚆᚓᚏ ᚐ ᚒᚓᚁ ᚉᚑᚅᚃᚓᚏᚈᚓᚏ ᚈᚆᚐᚈ ᚈᚐᚉᚓᚄ ᚐᚅᚔ ᚈᚓᚕᚈ ᚐᚅᚇ ᚉᚑᚅᚃᚓᚏᚈᚄ ᚔᚈ ᚔᚅᚈᚑ ᚑᚌᚆᚐᚋ᚜

᚛ᚑᚌᚆᚐᚋ ᚚᚏᚑᚅᚑᚒᚅᚉᚓᚇ ᚑᚆᚓᚋ ᚔᚄ ᚐᚅ ᚐᚂᚚᚆᚐᚁᚓᚈ ᚃᚏᚑᚋ ᚕᚏᚂᚔ ᚋᚓᚇᚔᚓᚃᚐᚂ ᚔᚏᚓᚂᚐᚅᚇ  ᚐᚏᚑᚒᚅᚇ ᚈᚆᚓ ᚈᚔᚋᚓ ᚕᚏᚔᚎᚘᚅᚔᚈᚔ ᚈᚑᚑᚉ ᚏᚑᚑᚈ᚜

᚛ᚔᚈ ᚒᚐᚄ ᚇᚓᚄᚔᚌᚅᚓᚇ ᚈᚑ ᚁᚓ ᚉᚐᚏᚃᚓᚇ ᚑᚅ ᚈᚆᚓ ᚃᚓᚏᚈᚔᚉᚐᚂ ᚉᚑᚏᚅᚓᚏ ᚑᚃ ᚐ ᚋᚑᚅᚒᚋᚓᚅᚈᚐᚂ ᚎᚑᚅᚓ  ᚏᚕᚇ ᚃᚏᚑᚋ ᚁᚑᚈᚈᚑᚋ ᚈᚑ ᚈᚑᚚ᚜

᚛ᚐᚋᚐᚎᚔᚍᚂᚔ ᚈᚆᚓ ᚒᚅᚔᚉᚑᚇᚓ ᚕᚐᚏᚐᚉᚈᚓᚏ ᚓᚅᚉᚑᚇᚔᚍ ᚎᚐᚅᚇᚐᚏᚇ ᚔᚅᚉᚂᚒᚇᚓᚄ ᚓᚅᚈᚏᚔᚓᚄ ᚃᚑᚏ ᚈᚆᚓ ᚑᚌᚆᚐᚋ ᚐᚂᚚᚆᚐᚁᚓᚈ  ᚈᚆᚑᚒᚌᚆ ᚈᚆᚓ ᚌᚂᚔᚚᚆᚄ ᚐᚏᚓ ᚏᚑᚈᚐᚈᚓᚇ ᚄᚑ ᚈᚆᚐᚈ ᚈᚆᚓᚔ ᚐᚏᚓ ᚏᚕᚇ ᚂᚓᚃᚈ ᚈᚑ ᚏᚔᚌᚆᚈ ᚏᚐᚈᚆᚓᚏ ᚈᚆᚐᚅ ᚁᚑᚈᚈᚑᚋ ᚈᚑ ᚈᚑᚚ᚜

᚛ ᚄᚑ ᚋᚔ ᚉᚑᚅᚃᚓᚏᚈᚓᚏ ᚄᚔᚋᚚᚂᚔ ᚉᚑᚅᚃᚓᚏᚈᚄ ᚃᚏᚑᚋ ᚅᚑᚏᚋᚐᚂ ᚂᚐᚈᚔᚅ ᚕᚐᚏᚐᚉᚈᚓᚏᚄ ᚈᚑ ᚈᚆᚓᚔᚏ ᚑᚌᚆᚐᚋ ᚓᚊᚗᚃᚐᚂᚓᚅᚈ᚜

᚛ᚆᚑᚒᚓᚃᚓᚏ  ᚒᚆᚓᚈᚆᚓᚏ ᚈᚆᚔᚄ ᚇᚔᚄᚚᚂᚐᚔᚄ ᚉᚑᚏᚏᚓᚉᚈᚂᚔ ᚃᚑᚏ ᚔᚑᚒ ᚋᚔᚌᚆᚈ ᚇᚓᚚᚓᚅᚇ ᚑᚅ ᚒᚆᚐᚈ ᚁᚏᚑᚒᚄᚓᚏ ᚔᚑᚒ ᚐᚏᚓ ᚒᚄᚔᚍ᚜

᚛ᚔ ᚒᚑᚒᚂᚇ ᚐᚚᚚᚏᚓᚉᚘᚈᚓ ᚔᚑᚒ ᚐᚇᚇᚔᚍ ᚐᚅᚔ ᚉᚑᚋᚋᚓᚅᚈᚄ ᚈᚑ ᚈᚆᚔᚄ ᚚᚑᚎᚔᚍ ᚂᚓᚈᚈᚔᚍ ᚋᚓ ᚉᚅᚑᚒ ᚑᚅ ᚒᚆᚐᚈ ᚁᚏᚑᚒᚄᚓᚏᚄ ᚔᚈ ᚇᚔᚄᚚᚂᚐᚔᚄ ᚉᚑᚏᚏᚓᚉᚈᚂᚔ ᚑᚏ ᚅᚑᚈ᚜

᚛ᚈᚆᚓ ᚏᚓᚎ ᚑᚃ ᚈᚆᚔᚄ ᚚᚑᚎᚔᚍ ᚔᚄ ᚈᚆᚔᚄ ᚈᚓᚕᚈ ᚉᚑᚅᚃᚓᚏᚈᚓᚇ ᚔᚅᚈᚑ ᚑᚌᚆᚐᚋ᚜


date: '2010-12-23 09:17:41' layout: post slug: webos-shortcut-bullseye-means-hold-gesture-area-until-gesture-light-glows status: publish ref: http://www.404techsupport.com/2009/07/02/palm-pre-shortcuts title: WebOS shortcut “bullseye” means hold gesture area until gesture light glows. wordpress_id: '1064' categories: Futzing


Finally! Thanks to this Palm Pre Shortcuts article I now understand the “keyboard shortcuts” that show in the Edit menu of every WebOS app.  They show a bullseye symbol followed by, for example “ C” for copy and “ V” for paste.  But I never understood what the bullseye symbol meant.  It looked a bit like the onscreen cursor hint that shows when you are in “shift” mode or “orange” (actually white on my phone) mode.  But that never worked, and it turns out that the bullseye seem instead to be an attempt to show a glowing gesture area light.  You need to hold the gesture area till you get the light and then press the specified key.

I really like the WebOS UI, but it is definitely missing some affordances that let a user know that some functionality exists.  I suppose this is a necessary tradeoff in going the Apple route and making the interface radically simple.

Many years ago when I first learned Java, I really liked the “checked exception” programming language feature. If the code in a method can throw a checked exception then the compiler forces the programmer to either surround the code with a try-catch or include the exception in the throws clause of the function declaration (which will recursively cause this compiler do this check in the calling code). Like strong typing, it seemed like a great way for the compiler to help the programmer writing more robust code with fewer error-handling problems.

However there is an insidious anti-pattern that many programmers slide into: swallowing exceptions with a try-catch that does not propagate an exception or otherwise deal appropriately with it. In the most blatant case there will be an empty catch statement, causing the exception to be silently ignored.

Personally I have always been very careful to propagate my exceptions, by adding them to the throws clauses. When you have deeply layered code where each layer uses its own exceptions you either end up with very large throws clauses containing the exceptions for all the layers below (breaking some encapsulation) or in each layer you have to catch all of the exceptions from the layers below and rethrow new exceptions. This is a lot of disciplined programming that you have to get right, and often changes you make in exception-handling in one area of code force you to make many changes in many other areas of the code.

I have finally decided, enough is enough; checked exceptions are not worth the effort. Partly this is a result of spending sometime working with Scala, which like Java is a strongly-typed language that runs on the JVM. Scala does not have checked exceptions, and I never missed them. It was one of the many things that makes Scala code much more concise and beautiful than Java.

So from now on I plan to have all my custom Java exception classes extend (the unchecked) RuntimeException. My catch statements for these exceptions will generally only be at the top level of the thread in which they are running, or some other high-level code where I can handle the problem appropriately. I am looking forward to simpler, cleaner code.

[Originally published on my old blog on 19 Dec 2010]

UPDATE (April 2013): In the few years since I posted this I have indeed switched over to using non-checked exceptions in all the Java code I write, and I am enjoying the cleaner code and fewer mysteriously swallowed exceptions. No downside so far.

UPDATE #2 (September 2019): Now after six years in Google I have become used to the Google convention which follows Effective Java's rule in “avoid unnecessary use of checked exceptions”, but does use them judiciously.


This article is also on Medium


date: '2010-11-12 10:53:32' layout: post slug: hudson-and-play-%e2%80%93-how-to-configure-hudson-for-continuous-integration-of-play-framework-web-applications status: publish title: Hudson and Play – how to configure Hudson for continuous integration of Play Framework Web Applications wordpress_id: '1014' categories: Programming


The Play Framework is a very nice rapid-development environment for building Java web applications. It brings many of the sensibilities of Ruby on Rails to Java web development, including a nice test framework that allows for test-driven design. However, when you use Play you need to use its own particular build system using command-line commands such as “play run” and “play test”, and not more standard Java build systems like Ant or Maven.

Hudson is an amazingly useful continuous integration environment that you can set up to watch all your modules in your source-control-system. When it sees a commit you can have it compile your module, track compiler warnings, run regression tests, and track code coverage. I have used Hudson successfully on many projects, but always using Hudson's integration to the Ant build system.

To integrate Play with Hudson I created a simple Makefile in the Play project directory:

PLAY=../play-1.1/play

hudson: play-test play-javadoc

play-test: ../play-1.1 $(PLAY) auto-test

play-javadoc: ../play-1.1 $(PLAY) javadoc

../play-1.1/play: play-1.1.zip cd ..; unzip */play-1.1.zip

(Note that this assumes that I have included a ZIPed copy of the play framework in the module directory. The first time the default target is called this will be unzipped into a sibling directory of the module directory. This means that I do not need any special setup of the Hudson server for Play — the module is self-contained.)

In the Hudson configuration you then need simply put in a script that changes to the module directory and invokes “make” [caption id=“attachment_1016” align=“alignnone” width=“768” caption=“”]Configuring Hudson for Play Framework module[/caption]

The screen-shot above assumes you install the Cobertura module into Play. This gives you nice tracking of your code coverage. On a brand new Play application, with no extra code added by you the coverage is as shown by Hudson in the screen-shot below.

Initial code coverage on an empty Play Framework app

When working on an Agile project it is important to get the continuous integration set up from the very beginning — and it turns out to be easy to do that with Play.


date: '2010-09-06 15:58:18' layout: post slug: well-beings-veterinary-homeopathy status: publish title: Well Beings Veterinary Homeopathy wordpress_id: '979' categories: Science


I just discovered that in my neighborhood is a business called Well Beings Veterinary Homeopathy. People in the city do treat their pets like people, and belief in homeopathy is consistent with stereotypes of Californians, but what really tickled me was to see the “well” prefix (usually as in “well-woman” or “well-baby”) added to the somewhat Buddhist use of the word “being”. This name sounds like a parody created by someone mocking San Francisco.

(Homeopathy is an alternative medicine, which treats diseases with ultra-pure water.)

In digging deeper, I found this was not an aberration, that there are practitioners of veterinary homeopathy in many parts of North America. One disturbing thing I found was in a question-and-answer page on the web site of the person responsible for training many of these practitioners:

Q 12. If you are treating an animal with homeopathy and they need dentistry (perhaps teeth removed), or are thought to have Lyme disease, or develop an infection or abscess, would you then change over to using antibiotics and other allopathic treatments?

There are many veterinarians that offer homeopathy that do not really rely on it when “times get tough”, when there is what appears to be an infection or severe inflammatory condition. This, of course, is their professional opinion but going back and forth between homeopathy and the usual use of drugs does not really work well and is not the most skillful approach. You may not have choice in this regard but if you do, especially with animals having a chronic condition, try to find a veterinarian that firmly believes in and uses homeopathy even in what appears to be serious illness.

(The term “allopathic” is a term used by homeopathic proponents to describe standard medicine.)

For human beings, we might expect some benefit from homeopathy just because of the placebo effect. However for non-human beings, presumably homeopathy will have absolutely no effect because they will not have a placebo response.

I hope there are not too many animals that suffer unnecessarily as a result of being given pure water instead of real veterinary care.


date: '2010-08-29 13:58:35' layout: post slug: challenging-dogma status: publish ref: http://www.flickr.com/photos/87435331@N00/3550096549/ title: Challenging “Challenging Dogma” wordpressid: '971' categories: Science image: http://farm3.static.flickr.com/2429/3550096549327882169c_m.jpg image-text: Flickr photo


Challenging Dogma, originally uploaded by andrewrosspoetry.

I somehow got sucked into a rather exhausting debate on evolution with creationist Andrew Ross in the comment section of one of his photographs on Flickr.


date: '2010-06-05 22:31:52' layout: post slug: announcing-0-5-release-of-nrby-photos-a-palm-webos-app-to-display-nearby-photographs status: publish ref: https://web.archive.org/web/20141023104118/https://developer.palm.com/webChannel/index.php?packageid=org.eamonn.nrby title: Announcing 0.5 Release of Nrby Photos, a Palm WebOS App to Display Nearby Photographs wordpress_id: '885' categories: Product


Thanks again to the beta testers who have helped shape the features in this release.

The Beta 0.5 will soon be available for installation from the Palm application web page.

Changes:

  1. Internal changes to how the search radius is adjusted according to the local density of photographs.

  2. Make the refresh button semi-transparent.

  3. Miscellaneous bug fixes.

Please add any questions or comments below.

Update:

There is now a new dedicated web page for the app, as well as a video clip demo:


date: '2010-06-01 21:52:14' layout: post slug: announcing-0-4-release-of-nrby-photos-a-palm-webos-app-to-display-nearby-photographs status: publish ref: https://web.archive.org/web/20141023104118/https://developer.palm.com/webChannel/index.php?packageid=org.eamonn.nrby title: Announcing 0.4 Release of Nrby Photos, a Palm WebOS App to Display Nearby Photographs wordpress_id: '873' categories: Product


Thanks again to the beta testers who have helped shape the features in this release.

The Beta 0.4 is now available for installation from the Palm application web page.

Changes:

  1. Photos do not now automatically refresh when new photos are available, but instead the user controls the refresh explicitly by pressing a button.

  2. Included with the title of a photo is an indication of how far away and in what direction is the photo.

  3. Miscellaneous bug fixes.

Please add any questions or comments below.