Filed Under: bookmarks

links for 10/11/2014 (p.m.)

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

Filed Under: bookmarks

links for 07/10/2014 (a.m.)

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

Filed Under: bookmarks

links for 05/12/2014 (p.m.)

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

Filed Under: bookmarks

links for 06/24/2013 (p.m.)

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

Filed Under: bookmarks

links for 06/14/2013 (p.m.)

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

Filed Under: bookmarks

links for 04/26/2013 (p.m.)

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

Filed Under: bookmarks

links for 11/11/2012 (p.m.)

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

Filed Under: bookmarks

links for 06/16/2012 (p.m.)

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

Filed Under: bookmarks

links for 06/13/2012 (p.m.)

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

Filed Under: bookmarks

links for 06/12/2012 (p.m.)

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

Filed Under: bookmarks

links for 06/11/2012 (p.m.)

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

Filed Under: bookmarks

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

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

Filed Under: bookmarks

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

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

Filed Under: bookmarks

links for 05/31/2012 (a.m.)

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

Filed Under: Uncategorized

Announcement: This blog is moving.

There is now a beta location new location for this blog. Once I sort out some remaining formatting issues on so of the old articles on the new location, I am going to retire this location.

I finally decided that WordPress installation on a shared Dreamhost server was just too slow. So I made the leap to the Jekyll platform.

Instead of hacking around in WordPress’ PHP I can now customize my blog in Ruby and Coffeescript. And because the blog is statically served I am hosting it out of S3, giving much faster, scalable performance.

For those that care, you can see the source behind the blog, which started as a template by Kris Brown.

Filed Under: bookmarks

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

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

Filed Under: bookmarks

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

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

Filed Under: Programming

JavaScript code to make your website comply with the new EU Cookie Law

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

Filed Under: Programming

Simple, clean pure-CSS tooltips

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

Filed Under: Programming

Feeling like JQuery is too bloated?

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

Filed Under: Programming

A couple of interesting JavaScript libraries …

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

Filed Under: Programming

Nice simple and complete example of how to implement collaborative filtering using the Mahout Java library.

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

Filed Under: Programming

Conveniently-formatted data files with Wikipedia page linking data. It is a bit out of date, but still good for testing algorithms.

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

Filed Under: bookmarks

links for 02/13/2012 (a.m.)

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

Filed Under: Programming

Scala resources from the people who built Twitter

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

Filed Under: Programming

Using JavaScript to scroll sideways

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

Filed Under: Programming

You used to need flash to do this. Now you can do it in HTML5.

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

Filed Under: Programming

It is easier to write clean code in Coffeescript than in JavaScript, but still it is good to check that you are not doing anything stupid.

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

Filed Under: Programming

Coffeescript classes: Coffeescript-style or Crockford-style?

Here are two different ways of defining a class in Coffeescript:

class Container

  constructor: (@member) ->

  secret = 3

  dec = ->
    if secret > 0
      secret -= 1
      true
    else
      false

  service : ->
    if dec() then @member else null

Container::stamp = (string) ->
  @member + string
Container = (param) ->

  @member = param
  secret = 3

  dec = ->
    if secret > 0
      secret -= 1
      true
    else
      false

  @service = ->
    if dec() then @member else null

  null

Container::stamp = (string) ->
  @member + string

Both of these define a class called Container with

  • a public field member initialized by a constructor parameter
  • a private field secret
  • a private method dec
  • a privileged method service
  • a public method stamp

We can use both in the same way:

myContainer = new Container 'abc'

console.log  myContainer.member      # abc
console.log  myContainer.stamp 'def' # abcdef
console.log  myContainer.service()   # abc
console.log  myContainer.service()   # abc
console.log  myContainer.service()   # abc
console.log  myContainer.service()   # null

The version above on the left is the special class syntax that Coffeescript provides. However, to me, this extra layer of syntax seems to depart a bit from the “Coffeescript is just JavaScript” philosophy.

The version above on the right is a translation of Douglas Crockford’s pattern, using his example.

Which is better? The left is a bit easier to read for a newcomer to the language, but I find the right more elegant because there is less “magic”.

And there is another advantage to the Crockford style. Consider this small modification:

Container = (param, decrementBy) ->

  @member = param
  secret = 3

  dec = ->
    if secret > 0
      secret -= decrementBy
      true
    else
      false

  @service = ->
    if dec() then @member else null

  null

Container::stamp = (string) ->
  @member + string

Here we have generalized the class by adding a decrementBy parameter to the constructor. We do not copy this to a property, but any of the private or privileged methods in the class can use it. (Don’t you love closures!). There is no way to do this using the Coffeescript class syntax in a way that would prevent the decrementBy value being modified from outside the object.

I think I might switch to using the Crockford-style classes.

Filed Under: Programming

Handy reference for all the JavaScript event types as supported by the different browsers.

  • Handy reference for all the JavaScript event types as supported by the different browsers. However it does not cover the touch events in mobile browsers.

    tags: javascript reference

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

Filed Under: Consumer Media

For sorting user ratings the best algorithm is lower bound of Wilson score confidence interval for a Bernoulli parameter (via +Christopher Hoover)

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

Filed Under: Programming

Very useful comparison of different JavaScript MVC frameworks. (Spoiler: the article concludes Ember.js is best.)

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

Filed Under: Consumer Media

Nice survey of the various social-network influence sites

  • Nice survey of the various social-network influence players, including some interesting math on how one of them calculates “influence” in terms of probabilities that others have read your postings. (Note however, that this article is more than a year old, which is ancient in Internet-time.)

    tags: social algorithm

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

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.

  —   Older Posts »