Filed Under: bookmarks

links for 01/26/2012 (p.m.)

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

Filed Under: Programming

Generalized continuous compiling (like sbt or coffeescript)

One of the really nice things about the sbt build system (for building Scala projects) or the coffeescript compiler is that they have a “watch” mode.

When you invoke a command in that mode (prepending with “~” (tilde) in sbt or adding the “–watch” argument to coffee) they continuously monitor your files and execute the compile or build action as soon as you save one of your source files to disk. Some IDEs, such as Eclipse, have that feature too — saving a file triggers an immediately compile.

But what if you are using an older build system like make, ant, or maven?

Well, if you are working on Linux, you can add this continuous build mode to any build system.

First, install inotify-tools, which on Ubuntu and similar distributions means doing:

sudo apt-get install inotify-tools

Then, for make, create an executable script called “~make” somewhere in your path with the following contents

#!/bin/sh -x

make $*
while inotifywait -e modify .
do
  make $*
done

Now where you would normally type make something you can type ~make something and start editing files. Every time you save a file the make will execute.

For ant, maven, or any other command-line build system, just modify the script to replace “make” in the two places it occurs.

Filed Under: Consumer Media

Ambitious project to create a universal graphical language, available as free icons (via @kohlschuetter)

  • Ambitious project to create a universal graphical language, available as free icons (via @kohlschuetter)

    tags: web

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

Filed Under: Consumer Media

Interesting data on Facebook and iOS apps.

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

Day after Occupy protest: Bank Modification

Walking down Montgomery Street in San Francisco, the day after an Occupy march, we saw that Bank of America had been subject to some modification.

Filed Under: Programming

Java library to find main text from web pages

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

Filed Under: Programming

JavaScript snippet for a shim to do cross-domain Ajax in IE

  • Includes JavaScript snippet for a shim to do cross-domain ajax in IE

    function createCORSRequest(method, url){
        var xhr = new XMLHttpRequest();
        if ("withCredentials" in xhr){
            xhr.open(method, url, true);
        } else if (typeof XDomainRequest != "undefined"){
            xhr = new XDomainRequest();
            xhr.open(method, url);
        } else {
            xhr = null;
        }
        return xhr;
    }
    
    var request = createCORSRequest("get", "http://www.nczonline.net/");
    if (request){
        request.onload = function(){
            //do something with request.responseText
        };
        request.send();
    }
    

    tags: javascript

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

Filed Under: Programming

Some useful tips for optimizing Rails for a simple JSON REST service

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

Filed Under: Programming

Using JCoffeescript can mean for simpler setting up of a coffeescript development environment because it does not have dependencies on node.js and npm

  • Using jcoffeescript (Java/Rhino implementation coffeescript) can mean for simpler setting up of a development environment because it does not have dependencies on node.js and npm, which can be difficult to install. However jcoffeescript is missing some features such as the –watch option or the ability to compile multiple files.

    tags: javascript

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

Filed Under: Programming

JavaScript templates

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

Filed Under: Consumer Media

When the worm turns: will consumers rebel against large-scale collection and analysis of their data?

Interesting point of view on possible push-back from consumers on the massive collection of data about them. One particular quote:

no one had yet found a way to articulate the value proposition of aggregate data analysis to end consumers because there wasn’t one yet

In other words, while there is a lot of value to companies of the data gathered about consumers, but there is not much value to the consumers themselves.

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

Filed Under: Consumer Media

Don’t confuse Users with Customers

If your users are also your customers, then you are lucky. It makes a lot of design and marketing decisions a lot simpler. You can focus laser-like on providing features that your users are willing to pay for.

However the user is not always the customer. For example, if you are selling software to a large enterprise then the person making the buying decision is not the user, which is why so much software used internally in large companies is so crappy.

And many of you working in the consumer Internet space have the same business model that broadcast television has had for more than half a century: give the service for free to users and get money from advertisers. To be successful you need to simultaneously keep your users (consumers) happy while keeping your customers (advertisers) willing to pay you. This is often hard.

Filed Under: bookmarks

links for 01/06/2012 (a.m.)

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

Filed Under: bookmarks

links for 01/04/2012 (a.m.)

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

Filed Under: bookmarks

links for 12/22/2011 (a.m.)

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

Filed Under: Consumer Media

Easy-to-use text summarization that comes as a standard Ubuntu package.

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

Filed Under: Programming

Interesting framework for machine learning using Scala

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

Filed Under: Programming

Calling Octave (the Matlab clone) from Java.

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

Filed Under: Programming

Nice step-by-step tutorial for using Capistrano to deploy a rails app.

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

Filed Under: Programming

How to avoid being blocked by a pop-up blocker.

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

Filed Under: bookmarks

links for 10/20/2011 (a.m.)

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

Filed Under: Programming

Headless JavaScript using webkit.  Includes rendering to image and PDF.

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

Filed Under: Futzing

I think I need to get some more memory for my laptop so that I can run Windows and Ubuntu simultaneously (using a virtual machine).

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

Filed Under: Programming

A fast, flexible HTTP client library

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

Filed Under: Programming

An easy-to-deploy configuration of ActiveMQ messaging, that seems good for modest levels of scaling.

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

Filed Under: Programming

Maven has an annoyingly verbose and difficult-to-remember command line. Here is a handy little reminder of the most common commands and options.

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

Filed Under: bookmarks Travel

Health Information for Travelers to India – Travelers’ Health – CDC

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

Filed Under: Programming

Some nice JavaScript code for rendering JSON onto HTML using a template cloaked in a bad-data-type script element.

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

Filed Under: Programming

Nice easy-to-use lazy-loading JavaScript library

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

Filed Under: Programming

Comprehensive guide to the various ways of sharing Git repositories.

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

Filed Under: Programming

Puppet and Chef are two popular tools for automating the deployment of large scale applications in data centers servers and elastic cloud.

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

Filed Under: Programming

Seminal noSQL papers

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

Filed Under: HP Programming

REST, noSQL, Capability Security, and a Unified Document-Creation Data Model

This is a presentation I gave earlier this year at the Electronic Imaging conference. There are more details in the paper that went along with the presentation.

Filed Under: bookmarks

links for 06/16/2011 (a.m.)

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

Filed Under: Programming

How to add language translation to your web page.

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

Filed Under: Consumer Media

This crocodoc site has impressive document manipulation technology.

  • This crocodoc site has impressive document manipulation technology.  It converts PDF to HTML5, which the user can annotate and then downloaded as a modified PDF.

    tags: html5 webservices

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

Filed Under: bookmarks

links for 05/25/2011 (a.m.)

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

Filed Under: bookmarks

links for 05/17/2011 (a.m.)

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

Filed Under: Programming

Some tricks here that I had to use when using Java to connect to a Jira server with a self-signed SSL certificate.

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

Filed Under: Programming

Lots of interesting examples of how to do flashy stuff in CSS.

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

Filed Under: bookmarks

links for 04/25/2011 (a.m.)

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

Filed Under: bookmarks

links for 04/24/2011 (a.m.)

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

Filed Under: Programming

Lots of interesting data, available via a convenient API.

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

Filed Under: bookmarks

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.

Filed Under: Programming

A nicely organized tool to measure your web site performance, prioritizing the actions you should take.

  • 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.

    tags: tool web javascript

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

Filed Under: Programming

API doc for scala API to MongoDB

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

Filed Under: Programming

Handy cheat-cheat of SQL / mongoDB correspondences.

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

Filed Under: bookmarks

links for 03/27/2011 (a.m.)

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

Filed Under: bookmarks

links for 03/26/2011 (a.m.)

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

Filed Under: Consumer Media

Social Photo Sharing Sessions at SXSW

Promiscuity or Private Groups: Mobile Photo SharingThere 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.

Filed Under: Programming

Minimalism is good: programming lessons from music and writing

Programming and Minimalism: Lessons from Orwell & The ClashIn 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.
Filed Under: bookmarks

links for 03/22/2011 (a.m.)

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

Filed Under: Science

What levels of radiation you should worry about

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.)

Filed Under: Programming

Links for SXSW talk “One Codebase, Endless Possibilities: Real HTML5 Hacking”

One Codebase, Endless Possibilities: Real HTML5 Hacking

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

Filed Under: Programming

A nice looking JavaScript library for dynamically modifying web pages.

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

Filed Under: Programming

An explanation of continuation passing style and how you might use it in JavaScript.

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.

Filed Under: HP

Some of my patents over the years

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

Filed Under: Programming

This is a nice solution for creating live HTML pages by “welding” JSON data onto HTML prototypes.

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

Filed Under: Programming

RDF Schema Diagrams

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 href="http://www.w3.org/TR/2004/REC-rdf-primer-20040210/#example16">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.

Filed Under: Programming

HP Labs seeking an agile Java contract web programmer to Do Amazing

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.)

  —   Older Posts »