Sunday, December 11, 2011

New England Clam Chowder

(preparation time 40 minutes)

This is what you'll need for 4 servings (though Anna doubles the recipe):

  • 4 slices bacon or salt pork
  • 1/2 cup finely chopped onion
  • 4 medium potatoes, peeled, diced
  • 1 Tbsp. all-purpose flour
  • 2 cans (6 oz. each) minced clams with liquid
  • 1 cup bottled clam juice
  • 1 cup half-and-half
  • Salt and pepper to taste
  • 1/2 cup whipping cream (optional)
  • 2 Tbsp. finely chopped parsley (very optional)

Preparation:

  1. In a large heave saucepan, sauté bacon or pork until brown and crisp. Remove. Drain on paper towels. Dice or crumble.
  2. In same skillet, sauté chopped onion and potatoes for a couple of minutes. Sprinkle with flour.
  3. Add clam juice from cans and from bottle. Stir to combine. Bring to a boil. Simmer, stirring from time to time, until potatoes are soft (about 15 minutes).
  4. Add half-and-half and season to taste with salt and pepper.
  5. Add minced clams. Heat until simmering. Do not boil. Add whipping cream, if used. Sprinkle with parsley or diced pork or bacon. Serve immediately.

New England Clam Chowder

Good served with croutons or small crackers, hearty bread and beer, red wine or beverage of your choice.

Thursday, September 22, 2011

The Teacher

I was fortunate enough to help organize the Strange Loop 2011 conference, but this post is not specifically about that. During the conference, I had the privilege to talk to several of the speakers, and one stood out for me in a way I won't forget. Professor Gerald Sussman is the Panasonic Professor of Electrical Engineering at MIT and is perhaps best known (at least among the people that might read this blog) for inventing the Scheme programming language and co-writing Structure and Interpretation of Computer Programs (also known as "SICP" and the "Wizard Book"). Though this textbook is nearly 30 years old, it continues to be recommended reading for hackers who seek a deep understanding of computer programming.


Mario and Prof Sussman


During the conference, I had several occasions to speak with Professor Sussman about a great range of topics. Professor Sussman is fantastically knowledgeable about many things. If you ever get a chance to have a conversation with the man, I highly recommend dropping everything to do it. At one of the session breaks, I caught the Professor at a coffee station and asked him about something I had heard, which was that in addition to being an expert in electrical engineering he was also a watchmaker. He told me that he had received a Rolex watch as a gift after earning his doctorate (in 1973) and that at some point the watch needed to be cleaned. He sent the watch (which he still wears) to Rolex and noticed upon its return that they had been careless in cleaning it and had either smudged the inside of the crystal or damaged the watch face (I unfortunately don't recall exactly the detail of the blemish). His abundant curiosity lead him to taking it apart to fix the mistake made at the factory. This was apparently Professor Sussman's introduction to the fine art of watch making.


Since that time, the Professor has been pursuing experience in the art of watch making. He told me that he travels weekly to the shop of one of the few Master Watchmakers in Massachusetts (somewhere in Stoneham) to do work in exchange for guidance in an art that only a master watchmaker can provide. I couldn't get this story out of my head. Here I was, talking to one of the most revered computer scientists of our time and listening to him recount his own journey toward mastery in a field other than what has been his life's work. It was both humbling and inspiring to hear that the man still lives the life of a learner.


Dr. Sussman doesn't have a cell phone and he doesn't watch television. Free time is too valuable to him to waste on such things. He occupies himself pursuing new understanding and sharing his panoptic knowledge with his own students. This man is a nerd. He is a nerd's nerd. I might say he wears his nerd on his sleeve, but he wore short-sleeve shirts during the conference and instead wore his nerd where it belongs: on his shirt pocket. (Below is a pocket protector generously given to me by Julie Sussman, Professor Sussman's wife and co-conspirator in the pursuit of awesome).


Nerd Pride


As we were chatting casually, I mentioned that I have trouble getting more than five hours of sleep a night. He only smiled and said I was "winning" because it gave me more hours to be alive. This perspective reflects an attitude that recognizes how many things there are in the world to learn, and more than that to relish in understanding. It was one of the most inspiring, personal experiences that I can remember.




The lecture above was taken from MITWorld.


Professor Gerald Sussman | Speakers | MIT World


Thank you Scott Bale, for capturing the shot when Professor Sussman was teaching me a great lesson.

Saturday, January 01, 2011

Test-Driven Learning (with Koans)

I wrote a piece on my employers tech article site about learning programming languages by fixing broken unit tests meant to expose little nuggets of wisdom. The article covers projects that provide programming exercises for 3 languages: Ruby, JavaScript and Clojure. Please read and let me know if you like it: http://sett.ociweb.com/sett/settJan2011.html

Saturday, October 16, 2010

Strangeloop Day 2

Opening Talk: NoSQL in the Enterprise (Billy Newport)

IMG_0026

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)

IMG_0027

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)

IMG_0028

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.

IMG_0029

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)

IMG_0030

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): http://github.com/square/retrofit

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)

IMG_0031

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)

IMG_0032

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

IMG_0035

Epilogue

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.

IMG_0020

Next talk: mobile HTML 5 (Michael Galpin)

IMG_0022

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.

IMG_0023

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)

IMG_0024

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

IMG_0017

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.

IMG_0018

And then she went into math and Bayesian probability.

Bitly trick:
http://bit.ly/3ert+ <-- 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.

http://hg.basho.com

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

IMG_0019

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 "run.sh" 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).