Friday, October 29, 2010


Siesta! Nap time! Plenty of studies show that people who nap are more productive and more creative. We all napped in kindergarten. Why is it that adult naps are dismissed by corporate and polite society? Rather, we feed the endless caffeine addiction that powers the modern factory mentality. Drucker shows us that knowledge workers are paid for their thought, insight and productivity not for their time.

It's time to let them nap and see if effectiveness improves.

"Knowledge worker productivity is the biggest of the 21st century management challenges. In the developed countries it is their first survival requirement. In no other way can the developed countries hope to maintain themselves, let alone to maintain their leadership and their standards of living."
---- Peter Drucker, Management Challenges for the 21st Century (1999)

"We know now that the source of wealth is something specifically human: knowledge. If we apply knowledge to tasks we already know how to do, we call it 'productivity'. If we apply knowledge to tasks that are new and different we call it 'innovation'. Only knowledge allows us to achieve these two goals."
---- Peter Drucker, Managing for the Future (1992)

Simba (my dog) is on his second nap of the day. I think I'll join him for this 2pm siesta and see how it affects the rest of my day and outlook. Night night!

Wednesday, October 27, 2010

Announce: Net::HTTP::Factual

Factual hosts community editable data on a variety of topics, and hopes to be your one-stop-shop for wiki-data. They provide an element of "truthiness" for rows to show if the data is verified and some other interesting ideas.

They hosted a contest at Startup weekend LA last week, with the top team winning kindles for each member. I didn't win the contest[*], since I got pulled onto a different team and didn't finish my factual thingy (clearly I didn't define my factual thingie either). I did create a quick cpan module to wrap the factual ReST interface, Net::HTTP::Factual. I built it using Spore.

All I needed to do was translate the API documentation into json for spore to load. I also needed to work out the differences between Spore v0.2 spec format the v0.1 documentation. The demonstration spec files in the spore github are in the v0.1 format. These are the problems of using bleeding edge alphaware -- Spore v.01 came out Oct 12, v0.2 on Oct 14 and I was using them Oct 16.

* : I didn't win the contest, but it did remind that I wanted a kindle. So I went home and ordered one. It arrived two days ago, and I'm 80 pages into my first book. The screen is gorgeous. I'm reading a PDF of the Mythical Man-Month, and while the pdf handling isn't perfect it works well -- flows quite nicely reading from a rotated screen. Props! November meeting: Wed Nov 17 @Media Temple

Dearest Mongers,

See you in a few weeks at the November meeting, generously hosted by Media Temple. With our early October meeting it feels like it's such a long time in between, I'm missing you all.

I hope you can make it!

What:     Los Angeles Perl Mongers meeting
Date:     Wednesday, November 17
Time:     7-9pm.
Location: Media Temple.

topics and directions will be posted at


your data is your program.

Much more often, strategic breakthrough will come from redoing the representation of the data or tables. This is where the heart of a program lies. Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowchargs; they'll be obvious.
--The Mythical Man-Month

In theory, I read The Mythical Man-Month almost 20 years ago for CS1. At the time, his historical examples seemed so dated, talking about monthy rental of kilobytes of ram and OS360 and PDP8 and PDP11 design. What could that teach me about cranking out modern C code?

As I reread it know, I realize how timeless are his examples of software as engineering discipline. Problems we still haven't solved -- how to maintain the vision of a small number of minds over a project that requires many, many hands.

I wish I could have understood his words back then, but wisdom is not so easily gained.

Experience is a dear teacher, but fools will learn at no other.
-- Benjamin Franklin

Dost thov love life? Then do not sqvander time
[ for that is what life is made of ]
-- Benjamin Franklin, as inscribed in Blacker Hovse

Friday, October 8, 2010

GRT : Guttman Rosler Transform

The Guttman-Rosler Transform is a technique from Uri Guttman and Larry Rosler for improving sort speed in perl.

The Guttman-Rosler transform runs faster than the orcish or Schwartzian transforms by avoiding the use of custom search subroutines. This is accomplished via pre and post transformation of the list. This allows the native optimizations of the perl sort function to shine.

Sort::External has a special affinity for the GRT or Guttman-Rosler Transform, also known as the "packed-default" sort. The algorithm is examined at length in "A Fresh Look at Efficient Perl Sorting", a paper by Uri Guttman and Larry Rosler, located as of this writing at

For many applications, the GRT is the most efficient Perl sorting transform. This document explores how to use it to solve common coding problems in conjunction with either Perl's built-in sort() function or Sort::External.

-- Sort::External::Cookbook

  1. prefix each element with a synthetic key (string or numeric).
  2. sort.
  3. remove the prefix key from each element.


    my %colors = (
        "Granny Smith"     => "green",
        "Golden Delicious" => "yellow",
        "Pink Lady"        => "pink",

  #A) standard sort:
    my @sorted_by_color = sort { $colors{$a} cmp $colors{$b} } keys %colors;

  #B) GRT sort:
    # 1. Encode
    my @sortkeys;
    while ( my ( $variety, $color ) = each %colors ) {
        push @sortkeys, sprintf( "%-6s%-16s", $color, $variety );
    # @sortkeys = (
    #     "green Granny Smith    ",
    #     "yellowGolden Delicious",
    #     "pink  Pink Lady       ",
    # );

    # 2. Sort
    my @sorted_by_color = sort @sortkeys;    # no sortsub!

    # 3. Decode
    @sorted_by_color = map { substr( $_, 6 ) } @sorted_by_color;


Research Paper from Uri Guttman and Larry Rosler:
Sort Sort::Maker on cpan:

Thursday, October 7, 2010

Aloha Rubicon!

From:    Andrew Grangaard
To:      Rubicon Project
Subject: Aloha Rubicon

Dearest Rubicon Coworkers,

I have moved on from the Rubicon Project, saddened that opening new doors requires closing old ones. A closing of two wonderful years at tRP -- challenges bested, bonds forged and friends earned.

I will miss you all and our shared sense of wonder and excitement at preparing to attack the sleeping google giant. I hope my two years of improvements to infrastructure and fundamentals will aid you in the days and years ahead.

Pacing, RTS, click tracking, proration, scheduling, scheduler v2, scheduler v3, aggregation, merging, hadoop, datacube, svn branch maintenance and svnmerge merging, TDD, unit testing, jira tickets and wiki pages, reproducability, deployment, quality assurance ... I'll miss all my initiatives and projects (I won't miss you, !!)

Thanks and adieu to my wonderful teammates from my two years on the core team Masao, Bill, Peter, Ian, Subash, Damien, David, Jonathan, Willis, Yushik and my core team leads: Mark Douglas, Damien, Mon-Chaio,, Damien(x2), Mon-Chaio(x2), Karim, Duc(x2) and most recently Sam. Core work is challenging and difficult. I salute the dedication and devotion you have all shown to our team to battle the twin complexities of our problem domain.

James, thanks for working with me during my first week when I was pitching out to help the UI team. Subash, you were a wonderful first week buddy. I hope I was able to help other newRubies the way you helped me. Jonathan, you've been a great desk neighbor and programming pair, even when frustrated you're still unassailably upbeat.

RI team, thanks for fighting to put me your squad and then graciously loaning me back to core for the okanagan push.

Mallory, our Den Mother and Cruise Director, you've done an impressive job of adapting the culture over the two-and-a-half population doubles we've seen in my two years.

Frank and Craig, thanks for always telling it like it is and welcoming my questions. I've never seen this level of internal transparency. I know you'll keep the ship on a steady course.

To my many friends and acquaintances on the other teams: you are family. Look me up any time. Life is so different without you all around everyday. Thanks for always bringing a smile to my face.

Thanks to the many of you that I leaned over the past 13 months through my divorce. Especially to those who did not know the circumstances, yet supported me anyways because that's just what awesome people do. Your strength and support have been invaluable.


PS. "woof :(" -- Simba

Reading is FUNdamental

I am currently reading three CS books. The differences in styles and approaches are striking, but they are all effective in teaching.

Structure and Interpretation of Computer Programs aka SICP.
Classic text computer science and functional programming using Scheme as the implementation language. Used in 6.001 at MIT.
Related links:
Programming Collective Intelligence
Interesting algorithms for mining the huge datasets available in the web era. Uses python as the implementation language. Working through the first three chapters, the first thing I did was rewrite the examples in perl. Then I found I wasn't the only one to do so.
Modern Perl
chromatic has written a lovely book on Modern Perl, and shared the review copy for comments/editing. It was pretty sweet to email in some typos and receive a link back to an updated git repository with my changes applied.

Friday, October 1, 2010

LA.PM hits the road for October meeting

Los Angeles Perl Mongers meeting for October will be held downtown hosted by Randall Schwartz is gathering speakers and handling the Oversee details. We are meeting early too, second Wednesday. see you October 13th!

send email to the list if you are interested in carpooling from the westside.