Saturday, October 16, 2010

Strangeloop Day 2

Opening Talk: NoSQL in the Enterprise (Billy Newport)


Came in halfway through this talk but really enjoyed what I heard. The talk pointed out how NoSQL datastores aren't a clean replacement for relational databases and that their use must be considered carefully because of inherent complexities that come with schema-less distributed data storage. This talk was video taped, look for it online when the conf talks are published.

Next talk: JavaScript Functions (Scott Bale)


Scott went through a number of function invocation patterns that Douglas Crockford describes in his book, "JavaScript, the Good Parts". This talk was also video taped, look for it. I am in the process of reading the book this talk is based on at the moment and I recommend it for anyone who has an interest in JavaScript.

He discussed the use of constructor functions to restrict scope and access to data as well as using modules to apply a namespace to JS functions.

Next talk: Classes are a Premature optimization (Justin Love)


What many people think of as object-oriented programming seems to be class-oriented programming.

Class-based inheritance introduces complexities because classes are objects that have metaclasses.

Prototypal inheritance is simpler because there isn't a distinction between concepts like classes vs. objects. With a prototypal system, nested contexts form chains of connected functions, where type identity is traded for extensible, inheritable behavior.

The lunch hour had a panel discussion on NoSQL was well moderated by Ken Sipe, but the discussion left me wanting more. This was followed by a "dream team" panel discussion that included Douglas Crockford, Alex Payne, Guy Steele, Josh Bloch, Bruce Tate and was expertly moderated by Ted Neward.


This was an often spirited discussion that ranged from topics like what languages new aspiring developers should learn, to whether programming languages will ever form to help make parallel problems more easy to address and understand.

Perl got a lot of hate in the languages panel. Bad show, panelists!

Next talk: Android Squared (Bob Lee & Eric Burke)


Eric explained how the Square reader decodes the wave form from the magnetic stripe on a credit card. They have to deal with peculiarities from different mobile devices interfering with the wave form from swiping a card as well as variations like swipe speed and other factors.

He also talked about how having a large database of swipe samples (containing phony numbers) allows them to write tests to examine holes in their decoding algorithms.

Square has released an open source library for Android that contains some Android and Java extensions (I believe):

Bob went into detail about how square queues metrics and server communication data on the device until it connects with the server. He also explained the API he wrote for reading and writing efficiently into flash file sectors on Android.

The queue file API and a shake API are included in retrofit. Bob later described a REST API that the android client uses to make network data exchanges.

Bob also shoed a POS app he wrote for Taste St. Louis in 2 hours that used the POS square API available for Android 3rd party apps. Very impressive!

Next talk: Dimensional Data in a distributed hash table (Mike Malone)


He spent the beginning of his talk describing CAP theorem and how at his company, their needs were better served by availability instead of consistency. They have implemented a distributed hash table implemented on top of Cassandra. The major points of his talk were: Integrity vs. Availability, Locality vs. Distributability, and Reductionism vs. Emergence.

Sadly, this talk was totally over my head.

Next talk: Outside-in TDD in Clojure (Brian Marick)


Brian contrasted Detroit-style TDD vs. London-style TDD (bottom-up vs top-down approach to designing systems guided by tests). He then played a pre-recorded coding example that showed the progressive implementation of an animal reservation system he previously created in Ruby.

Along the way, we got to see the mocking framework he is working on: Midje. In the coding example, we saw test definition, test execution result, and the code under test all within the same editor pane. This was interesting because it means that the eye doesn't have to move around the length and width of the monitor.

He explained why working with his mocking framework lets the course of development slice the problem domain into layers that can be tested totally independently.

Final Keynote: Douglas Crockford brought down the house



Strangeloop was an example of a brilliantly thought-out and executed conference. There was an excellent mix of well-known experts and new comers offering highly technical insight for a price within most developers reach. I'd say this was a conference that developers could ill-afford to miss and I can't wait to see what Alex Miller follows-up with next year.

Friday, October 15, 2010

Strangeloop day 1 (part 2)

After a great lunch with Jeff Barsciezski, Luigi Montanez, and Yehuda Katz, I listened to a standing room only talk on civic hacking which covered many examples of companies that build up around serving public (government collected) data.


Next talk: mobile HTML 5 (Michael Galpin)


Mobile browsing is being done on many different platforms (iOS, Android, Blackberry).

Frameworks like PhoneGap & Titanium are powerful ways to create apps for mobile platforms, but aren't what HTML5 is about.

Viewport, Geolocation, DOM storage (local storage vs session storage) became the replacement for the original proposal for database storage on the device. Web workers, and many other aspects of HTML5 were covered.

Next talk: nodeJS (Ryan Dahl)

At the start of this, it seemed to be the same talk Ryan gave at jsconf. Then he went into live coding examples, demonstrating dns resolution and streaming command-line apps.


Eventually, he started talking about scaling node deployment strategies, which included having node running in multiple processes communicating with each other via unix file handles (letting the kernel handle load balancing rather than using an explicit load balancing component). He also talked about clients using webworkers acting as actors for interacting with asynchronous node servers.

During Q&A, a question was asked about how node compared to other async servers (erlang). According to Ryan, they are comparable, but he didn't have numbers he could show.

Keynote: Guy Steele

(programming while the earth was still cooling, everyone knew math and was apparently insane)


He gave a long and detailed analysis of the worst code he ever wrote (card programming from 40 years ago). This had lots of humor and maddening complexity. But he transitioned well into Fortress, the research language he is designing for parallel execution problems. Heady stuff. I needed beer afterwards.

Thursday, October 14, 2010

Strangeloop talks day 1


Hilary Mason starts the day with a talk about machine learning and how the technology has evolved. Among the advances that have made machine learning accelerate:

  • Algorithms
  • On-demand (elastic) computing
  • Access to large amounts of data

Analyzing large amounts of data to find either patterns or to identify data trends requires algorithms to disambiguate data that is contextually unrelated.

Data classification through statistical modeling based on characteristics.


And then she went into math and Bayesian probability.

Bitly trick: <-- add a plus to the end of a link to see realtime metrics about a link (statistics about clicks and where they are coming from over time).

Next talk: Riak (Rusty Klophaus @rklophaus) Dynamo-inspired NoSQL key-value datastore

Nosql is being driven by narcissism, voyeurism, and materialism :)

  • Has same interface for single and multiple node deployment
  • Configurable replication for buckets
  • Data relationships can be defined for querying
  • Replicates data across nodes as they are added to a cluster
  • Supports map/reduce operations
  • Can have HTTP interface to introduce caching and streaming
  • Full-text search
  • Riak is slower in virtualized environments.
  • Multi-site replication is an enterprise feature

Upgrading instances doesn't support rolling upgrades, so non-multisite upgrades would mean bringing down the ring to change the software.

Next talk: supporting an open source community (Yahuda Katz)


Rails optimizes for developer happiness. The python community optimizes for explicitness. Focusing on happiness as a primary goal would draw developer attention faster than another more easily measurable metric. Performance or other kinds of optimizations can be attacked later.

Nothing beats adoption. Making your project easy to adopt (friendly licenses, support community) makes a big difference.

Business is good for the ecosystem; projects that allow independent businesses (training, consulting) to be built up around them will create the ecosystem that supports the viability of a project and the community involved in it.

Human beings underestimate the network effect.

MIT is a great license to promote a "network effect" for a project.

PDI (please do investigate): ask the community to fix a problem they care about and then incorporate the change if it makes sense for the larger community.

Market early with good propaganda.

Many, many other points (couldn't keep up). Outstanding talk! (Best talk of the day, actually.)

Saturday, October 02, 2010

Watchr is teh awesome

Autotest spoiled me for immediate feedback during the development cycle. So as I was going through the Relevance functional koans for Clojure, I had a little Watchr script continually re-running the tests from the exercise at every file save. This is what that script looked like:

There's barely anything there. All it does is run the "" script that comes with the koans whenever a ".clj" file in anywhere under the "src/koans" directory is saved. It's just a simple little thing, but so very useful.

I later discovered a fork of those koans (from David Laing) that adds JavaScript lessons. So I adapted my watchr script to start the KoansRunner file in Safari, reload the test page, and scroll to the bottom on every save of the JavaScript files.

I can't say enough about the value of rapid feedback from automated tests during the learning/development cycle. The absence of context switching to manually rerun the tests is great WIN.

Clojure sequence comprehensions

I am learning Clojure and I like it. Following the ThinkRelevance functional koans has given me a really good interactive playground for learning this language. Reading through examples in a book cannot compare to actually having to write code in order to solve a problem and in the process learn syntax and the rules of a language. What a concept!

I came across something in the sequence comprehensions section that I thought was interesting.

The "for" macro can loop over one (or more) groups of things and produce the vector combinations above. I was reminded while reading this of Ruby's Array#product method, which does the same thing (return the product of 2 or more arrays).