Lots of interesting data, available via a convenient API.
-
Lots of interesting data, available via a convenient API.
Posted from Diigo. The rest of my favorite links are here.
Lots of interesting data, available via a convenient API.
Posted from Diigo. The rest of my favorite links are here.
Setting up a Cassandra cluster with the DataStax AMI | DataStax
This looks like a convenient recipe for getting Cassandra up and running in the cloud.
Posted from Diigo. The rest of my favorite links are here.
A nicely organized tool to measure your web site performance, prioritizing the actions you should take. It goes beyond some other similar tools in also doing a mobile-specific analysis.
Posted from Diigo. The rest of my favorite links are here.
Casbah casbah-core v2.1.1 – _root_
API doc for scala API to MongoDB
Posted from Diigo. The rest of my favorite links are here.
SQL to Mongo Mapping Chart – MongoDB
Handy cheat-cheat of SQL / mongoDB correspondences.
Posted from Diigo. The rest of my favorite links are here.
MaxMind – GeoIP Javascript Web Service
A handy approximate IP-based geolocation that can be used as a fallback if the browser does not support proper geolocation.
scalaj/scalaj-collection – GitHub
Handy utility library for converting back and forth between Java and Scala collections.
The Great WebKit Comparison Table
Comprehensive table showing a lot of variation in degree of HTML5 support amongst the mobile Webkit browsers.
Posted from Diigo. The rest of my favorite links are here.
Calculating web design grid values.
An RDF-oriented Javascript library.
Posted from Diigo. The rest of my favorite links are here.
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.
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:
A nice-looking CSS framework for building grid-based web sites that are responsive to different screen sizes.
A way of testing web APIs that is more convenient than curl.
Posted from Diigo. The rest of my favorite links are here.
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.
(Thanks to Bob Mayo for the pointer.)
One Codebase, Endless Possibilities: Real HTML5 Hacking
joemccann/freebeernearme – GitHub
#hack5 code
#hack5 example
SXSW 2011 Presentation – One Codebase, Endless Possibilities – Real HTML5 Hacking
#hack5 presentation
Online phonegap build #hack5
Similar to phonegap #hack5
Like phonegap or sencha, but also with desktop bindings. #hack5
Write Javascript queries to screenscrape the web. #hack5
Posted from Diigo. The rest of my favorite links are here.
A nice looking JavaScript library for dynamically modifying web pages.
Posted from Diigo. The rest of my favorite links are here.
By example: Continuation-passing style in JavaScript
An explanation of continuation passing style and how you might use it in JavaScript. (Though not sure why it does not blow your stack.)
Posted from Diigo. The rest of my favorite links are here.
UPDATE: Thanks to Christopher for pointing out that JavaScript does a good job of handling tail-recursion, so that you won’t blow your stack.
Recursive data naming – Patent 7797359
Our invention for how to have a global naming system in a peer-to-peer aggregation of nodes.
Our invention of creating photo-books as a side-effect of people playing computer games.
Image dominant line determination and use – Patent 7751627
Simon’s invention for finding dominant lines in images.
Encryption of hierarchically structured information – Patent 7721085
Our invention for encrypting XML or JSON files, while preserving their structure.
Securely propagating authentication in an ensemble of devices using single sign-on – Patent 7620978
Our invention for peer-to-peer authentication.
Contact sheet based image management – Patent 7596751
Our invention for organizing photos by marking up a contact sheet and scanning it.
My One-Glance Video invention
Posted from Diigo. The rest of my favorite links are here.
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.
Posted from Diigo. The rest of my favorite links are here.
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:
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
propertiesIn addition to these classes and properties, RDF also uses properties
calledrdf:_1,rdf:_2,rdf:_3… etc.,
each of which is both a sub-property ofrdfs:memberand an
instance of the classrdfs:ContainerMembershipProperty. There is
also an instance ofrdf:Listcalledrdf:nilthat is
an emptyrdf:List.
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.)

Update: The documentation for the more recent is at Riak Client for Java 1.0.1 API
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.
᚛ᚔᚅ ᚐ ᚂᚔᚈᚈᚂᚓ ᚁᚔᚈ ᚑᚃ ᚏᚓᚉᚏᚕᚈᚔᚑᚅᚐᚂ ᚚᚏᚑᚌᚏᚐᚋᚋᚔᚍ ᚔ ᚈᚆᚏᚓᚒ ᚈᚑᚌᚓᚈᚆᚓᚏ ᚐ ᚒᚓᚁ ᚉᚑᚅᚃᚓᚏᚈᚓᚏ ᚈᚆᚐᚈ ᚈᚐᚉᚓᚄ ᚐᚅᚔ ᚈᚓᚕᚈ ᚐᚅᚇ ᚉᚑᚅᚃᚓᚏᚈᚄ ᚔᚈ ᚔᚅᚈᚑ ᚑᚌᚆᚐᚋ᚜
᚛ᚑᚌᚆᚐᚋ ᚚᚏᚑᚅᚑᚒᚅᚉᚓᚇ ᚑᚆᚓᚋ ᚔᚄ ᚐᚅ ᚐᚂᚚᚆᚐᚁᚓᚈ ᚃᚏᚑᚋ ᚕᚏᚂᚔ ᚋᚓᚇᚔᚓᚃᚐᚂ ᚔᚏᚓᚂᚐᚅᚇ ᚐᚏᚑᚒᚅᚇ ᚈᚆᚓ ᚈᚔᚋᚓ ᚕᚏᚔᚎᚘᚅᚔᚈᚔ ᚈᚑᚑᚉ ᚏᚑᚑᚈ᚜
᚛ᚔᚈ ᚒᚐᚄ ᚇᚓᚄᚔᚌᚅᚓᚇ ᚈᚑ ᚁᚓ ᚉᚐᚏᚃᚓᚇ ᚑᚅ ᚈᚆᚓ ᚃᚓᚏᚈᚔᚉᚐᚂ ᚉᚑᚏᚅᚓᚏ ᚑᚃ ᚐ ᚋᚑᚅᚒᚋᚓᚅᚈᚐᚂ ᚎᚑᚅᚓ ᚏᚕᚇ ᚃᚏᚑᚋ ᚁᚑᚈᚈᚑᚋ ᚈᚑ ᚈᚑᚚ᚜
᚛ᚐᚋᚐᚎᚔᚍᚂᚔ ᚈᚆᚓ ᚒᚅᚔᚉᚑᚇᚓ ᚕᚐᚏᚐᚉᚈᚓᚏ ᚓᚅᚉᚑᚇᚔᚍ ᚎᚐᚅᚇᚐᚏᚇ ᚔᚅᚉᚂᚒᚇᚓᚄ ᚓᚅᚈᚏᚔᚓᚄ ᚃᚑᚏ ᚈᚆᚓ ᚑᚌᚆᚐᚋ ᚐᚂᚚᚆᚐᚁᚓᚈ ᚈᚆᚑᚒᚌᚆ ᚈᚆᚓ ᚌᚂᚔᚚᚆᚄ ᚐᚏᚓ ᚏᚑᚈᚐᚈᚓᚇ ᚄᚑ ᚈᚆᚐᚈ ᚈᚆᚓᚔ ᚐᚏᚓ ᚏᚕᚇ ᚂᚓᚃᚈ ᚈᚑ ᚏᚔᚌᚆᚈ ᚏᚐᚈᚆᚓᚏ ᚈᚆᚐᚅ ᚁᚑᚈᚈᚑᚋ ᚈᚑ ᚈᚑᚚ᚜
᚛ ᚄᚑ ᚋᚔ ᚉᚑᚅᚃᚓᚏᚈᚓᚏ ᚄᚔᚋᚚᚂᚔ ᚉᚑᚅᚃᚓᚏᚈᚄ ᚃᚏᚑᚋ ᚅᚑᚏᚋᚐᚂ ᚂᚐᚈᚔᚅ ᚕᚐᚏᚐᚉᚈᚓᚏᚄ ᚈᚑ ᚈᚆᚓᚔᚏ ᚑᚌᚆᚐᚋ ᚓᚊᚗᚃᚐᚂᚓᚅᚈ᚜
᚛ᚆᚑᚒᚓᚃᚓᚏ ᚒᚆᚓᚈᚆᚓᚏ ᚈᚆᚔᚄ ᚇᚔᚄᚚᚂᚐᚔᚄ ᚉᚑᚏᚏᚓᚉᚈᚂᚔ ᚃᚑᚏ ᚔᚑᚒ ᚋᚔᚌᚆᚈ ᚇᚓᚚᚓᚅᚇ ᚑᚅ ᚒᚆᚐᚈ ᚁᚏᚑᚒᚄᚓᚏ ᚔᚑᚒ ᚐᚏᚓ ᚒᚄᚔᚍ᚜
᚛ᚔ ᚒᚑᚒᚂᚇ ᚐᚚᚚᚏᚓᚉᚘᚈᚓ ᚔᚑᚒ ᚐᚇᚇᚔᚍ ᚐᚅᚔ ᚉᚑᚋᚋᚓᚅᚈᚄ ᚈᚑ ᚈᚆᚔᚄ ᚚᚑᚎᚔᚍ ᚂᚓᚈᚈᚔᚍ ᚋᚓ ᚉᚅᚑᚒ ᚑᚅ ᚒᚆᚐᚈ ᚁᚏᚑᚒᚄᚓᚏᚄ ᚔᚈ ᚇᚔᚄᚚᚂᚐᚔᚄ ᚉᚑᚏᚏᚓᚉᚈᚂᚔ ᚑᚏ ᚅᚑᚈ᚜
᚛ᚈᚆᚓ ᚏᚓᚎ ᚑᚃ ᚈᚆᚔᚄ ᚚᚑᚎᚔᚍ ᚔᚄ ᚈᚆᚔᚄ ᚈᚓᚕᚈ ᚉᚑᚅᚃᚓᚏᚈᚓᚇ ᚔᚅᚈᚑ ᚑᚌᚆᚐᚋ᚜
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.
This was particularly useful when I was setting up my Latex environment — the various Ubuntu Tex package do not seem to manage dependencies very well and I kept on getting errors caused by missing files.
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.
This does require a modern browser HTML5 browser.
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”

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.
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.
QWebSettings::globalSettings()->setAttribute(QWebSettings::FrameFlatteningEnable, true);
It also has support for writing web apps in Scala, which is cool.
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.
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.
One thing I thought was a bit inelegant was the number of special reserved identifiers in the query language, such as "outE", "inE", "outV", and "inV". I understand this was necessary to stay compatible with XPath, but I think it would have been better to move away from XPath and put such special identifiers in the syntax of the language.
I did like was how easy it is to define computed edges in the graph, sort of like views in SQL. This can be considered a kind of reasoning. I particularly was struck by the clear insight in the presentation that "Graph-based reasoning is the process of making explicit what is implicit in lop co-developer the graph"
I never tried this before, but here is my first attempt at creating music. The words are from a poem by W.B. Yeats; the music and the performance are by me.
Come Gather Round Me, Parnellites
![]()