Eamonn O'Brien-Strain

MastodonBlueskyThreads


date: '2011-03-21 20:41:09' layout: post slug: '1178' status: publish ref: http://www.flickr.com/photos/eob/5537982085/ title: Social Photo Sharing Sessions at SXSW wordpressid: '1178' categories: Product image: http://farm6.static.flickr.com/5214/5537982085fd89cf913c.jpg image-text: SWSW Panel DIscussion


Promiscuity or Private Groups: Mobile Photo Sharing

There were two different sessions at SXSW covering social photo sharing, one a panel and the other a round-table discussion group.

The panel, Photo Sharing – Promiscuity or Private Groups, featured Mayank Mehta from Cooliris the gee-whizz photo browsing company (who have recently added a social photo sharing) and Danny Trinh from Path, the social network that emphasizes private sharing among a select group of real friends. Also on the panel was the blogger Louis Gray who moderated.

The panel noted that online photo activity has moved away from the older services, typified by Shutterfly where people actively upload selected photos from their PC, to the newer services that receive photos automatically uploaded from mobile devices.

On interesting “minus 30 seconds” problem statement they posed how to decide the intent the photographer had when they took out their phone to shoot the photo just before the phone uploaded it. With whom did they intend sharing that photo? A simple approach is to have the user explicitly share with a particular group of social contacts, using the group context to control sharing.

The panel seemed to agree that social validation is the main reason that people post updates or share photos. If they at some point stop getting validated (are not getting many likes, comments, or retweets) they tend to stop sharing.

Finally there was a discussion on how startups could be successful in the age of Facebook. One opinion from the panel was that Facebook is simply a communication channel, and there are many ways to co-exist with it. The important thing was to concentrate on just one thing and to do it well. As for monetization, panelists advised having a paid premium level as well as having app-like things such as Instagram-like lenses sold individually.

Later, in the other session, a round table discussion, called Focusing In On the Future of Social Photography, one particularly interesting participant was Sam Odio head of Facebook Photos, who came in when Facebook acquired Divvyshot to “fix Facebook Photos”. The Facebook photo volume is huge—people upload a Flickr's worth of photographs every month —however Facebook considers that the cost of storing all those photos is more than outweighed by their value to Facebook. According to Odio, the main role of Facebook Photos is to “help users tell stories”, which mostly means providing context.

Instagram was a service that came up a lot in both sessions. There is a lot of buzz around this company because they have had such remarkably high adoption rates. They are an app with software “lenses” that apply effects to photos, which according to the Trinh makes people more willing to share photos because otherwise “most people think they take bad photos”. Instagram also has social networking features that people seem to like a lot. Trinh noted that Path have recently added lenses to their service.

Yan-David Erlich, the moderator of the round-table, said that in their service the most popular pages are the “places”. He also mentioned that concert venues are experimenting with social photography.

In response to a question on face recognition, Odio implied that Facebook do have such technology but that they are wary of deploying it. He said they have a whole team of people responsible for just thinking about the legal and social implications of face recognition.

As regards videos, people share them much less often than they share photos. One reason is that videos are still much more difficult to share online, though this is likely to change in the next few years. Another reason is that although an unskilled person can snap a halfway decent photo with today's devices, it is very difficult for them to shoot a decent looking video.



date: '2011-03-21 17:10:52' layout: post slug: minimalism-is-good-programming-lessons-from-music-and-writing status: publish ref: http://www.flickr.com/photos/eob/5538121276/ title: 'Minimalism is good: programming lessons from music and writing' wordpressid: '1169' categories: Programming image: http://farm6.static.flickr.com/5291/5538121276be254ebb1b.jpg image-text: Jon Dahl


Programming and Minimalism: Lessons from Orwell & The Clash

In his SXSW talk Programming and Minimalism: Lessons from Orwell & The Clash, Jon Dahl from Zencoder asked what other activity is programming like. He acknowledged that it was valid to think of programming being an engineering discipline and valid to think of it as being a craft, but he mostly proposed that programming is like writing, in particular that programming is like writing musical composition.

One analogy he made was of how styles of programming evolve in the same way as styles of musical composition. Music styles tend to get more and more complex over time until some new composers create a new radically simplified style, though keeping the best of the earlier style. Witness Mozart rejecting the Baroque, Phillip Glass rejecting complex early Twentieth century classical music, and the punk rockers rejecting the preening intellectualized operatic rock of the '70s.

Similarly in programming there are similar lurches back to minimalism in programming languages and in frameworks. Dahl did not explicitly talk about this, but I assume he meant the rise of Ruby on Rails and later similar systems which rejected the complex configurations and layering of both J2EE and Microsoft web stacks and replaced them with an elegantly simple framework that emphasized convention over configuration and “don't repeat yourself”. I would also add the earlier eclipsing of C++ by Java is an example of a similar return to simplicity, rejecting pointers, multiple inheritance, and explicit memory management. The speaker also made a foray into the realm of writing prose. He quoted George Orwell who asserted that sloppy writing leads to sloppy thinking, such as how using the passive voice avoids being clear who is responsible for some action. Sometimes writing is deliberately sloppy, such as giving a law the misleading title “The Patriot Act” and not something like “The Enhanced Surveillance and Executive Powers Act”, which would have been more accurate but less likely to get passed by Congress.

All of this was entertaining, but seemed a bit of a stretch in its analogies to programming. I felt it was stroking the egos of programmers a bit, allowing them to see themselves not as code monkeys but as exalted artists. However, he did end up with a list of coding guidelines that I already generally do follow and which I think all programmers should consider:

  1. The simplest approach is always best.
  2. Clever code is bad code.
  3. Any code not doing anything is harmful.
  4. It is good to accept constraints of your language and framework, and not to fight against them.
  5. As much as possible move view code to the controller, controller code to the model, model code to a library, library code to an open-source library.
  6. Do not over-abstract.
  7. Always actively clean up your code, constantly.
  8. Break hard problems down to simple problems.

Programming and Minimalism: Lessons from Orwell and the Clash

View more presentations from Jonathan Dahl



date: '2011-03-21 11:19:19' layout: post slug: what-levels-of-radiation-you-should-worry-about status: publish ref: http://xkcd.com/radiation/ title: What levels of radiation you should worry about wordpress_id: '1162' categories: Science


There has been a lot of irresponsible reporting of the possible dangers from the damaged Japanese nuclear reactors. Even the New York Times was guilty of providing an interactive presentation that gave a misleading impression that the U.S. West Coast was in danger.

Here is one piece of sanity that I urge you to study if you have any concerns about your risks from radiation.

Radiation Dose Chart

(Thanks to Bob Mayo for the pointer.)



date: '2011-02-19 16:41:49' layout: post slug: blogpost-02202011-a-m status: publish title: This is a nice solution for creating live HTML pages by “welding” JSON data onto HTML prototypes. wordpress_id: '1131' categories: Programming image: img/weld.webp image-text: Weld.js logo


This is a nice solution for creating live HTML pages by “welding” JSON data onto HTML prototypes.  If this works as the authors claim it could make it easier for graphic designers and web developers to work together. tags: javascript json web design library programming

Posted from Diigo. The rest of my favorite links are here.



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.