Monday, June 29, 2009

July LA Perl Mongers Meeting.

Next LA perl mongers meeting: Thursday, July 16, 2009.

Open call for presenters:


What have you done recently with Perl? Come tell your friends and lets all learn together.


What: LA Perl Mongers Meeting
When: 7-9pm
Date: Thu, July 17, 2009
Where: The Rubicon Project HQ - 1925 S. Bundy, 90025
Theme: Perl!
Food: Pizza and beverages provided.
RSVP: Responses appreciated.

June Perl Mongers recap

"Thank you!" to all who came out to the June meeting. We had nearly 20 people and two excellent presentations.

David's talk challenged the common belief that "Perl is Slow" and sparked an excellent discussion that ranged from data models, snowflake schemas and pure perl olap cubes and off to Bloom filters, scaling horizontally vs vertically, hadoop/hbase and onwards. To paraphrase: Make it as simple as possible (elegance) and think about every speed consideration (diligence).

Matt's presentation was packed as he demonstrated the technologies and ideas behind his latest project. We got to see a lot of live code and patterns in action. Touching on Moose, MooseX::Storage, KiokuDB, Coro, Continuity, Mason, JSON, AnyEvent, Moose::Object::Pluggable, Process, HTML::Seamstress, HTML::Tree, HTML::Element, Net::Server, IPC::Cmd, jquery and Joose. Then gluing it all together and testing it. Here's the pdf cheatsheet from his talk.

In between speakers we continued the discussion while we munched pizza and raided the beer fridge. We had a fun cross section of people, those who signed in to show support: Gray, HSiegel, Jordan, David, David, Matt, Allen and others). Eric and his coworkers from Campus Explorer even drove to Santa Monica on their work-from-home-Wednesday. Rubicon Project, thanks for the support, location, food and vibe.

Can't wait to see you all in July.

Friday, June 19, 2009

Using Apache::Test with Test::Class

I've recently switched from simple Test::More scripts to trying Test::Class. I'm also revisiting some apache module testing with Apache::Test and friends. Today I tried to merge the two.

With Test::Class, you make a test runner script that imports modules and then executes tests. The tests are defined in modules, and then run in module import order by the Test::Class test harness. Test::Class has some nice convenience methods and sugar. You defined test subroutines by adding :Test(n) where n is the number of tests run in the method. Methods can be tagged to run at the start and finish of each test as well as at startup and shutdown, and you get a handy $self object passed around to the methods that you can use to store configuration and etc.

With Apache::TestRun, the standard boiler plate is to create a TEST.pl script which isa Apache::Test and calls __PACKAGE__->run_tests, which then runs all the .t tests in the directory.

To get them working together, I've created two wrappers. TEST.pl uses Apache::TestRun and then I have a test_wrapper.t which uses Test::Class and loads my tests where are defined in modules.

As I get this smoothed out a bit, I'll update. I've been planning to write a talk on "Using Apache::Test to test Apache modules" talk to have handy in case I need something for perl mongers or similar. I think adding Test::Class to the mix will nicely improve the signal-to-noise, assuming I can get it worked out in a non-cludgey manner.

#!/usr/bin/perl

use strict;
use warnings FATAL => 'all';

use FindBin;
use lib "$FindBin::Bin";

package My::TestRun;
use base 'Apache::TestRun';
use Apache::TestConfig;
__PACKAGE__->new->run(@ARGV)

Monday, June 15, 2009

Smart::Comments

Here's a quick example of Smart::Comments. I originally planned to have a Getopt::Long flag to turn smart comments on-and-off, but that doesn't work due to the way Smart::Comments uses filters and where that happens in the compile&run cycle.

This example code still serves as a nice boilerplate for Getopt::Long and Pod::Usage.

The following script shows debugging behavior if the environment variable Smart_Comments is set to a 1.

Ex: Smart_Comments=1 ./smart-comments-example.pl
### Base Smart Comments - Show variables
### $help: 0
### $man: 0
### $DEBUG: 0

### @array: [
###           1,
###           2,
###           3,
###           4,
###           5,
###           6,
###           7,
###           8,
###           9,
###           10
###         ]
Debug output of variables is neat and worth the price of admission. "### $help" in the code turns into "### $help: help_value" during output. Arrays get dumped via Dumper. And all of this code output is on STDERR and prefixed with three hashes -- so it'll get ignored by the Test Any Protocol if it gets triggered by your unit tests.

Add to that cute progress bars that are only around when people want them? Sweet.

It sure would be nice to have an explicit flag to set/unset the smart comment level, but I don't think that's possible the way it smart comments is implemented as a filter.

Fun for personal code and scripts, but I don't think I'd use it in production, without looking a bit closer under the hood to see what (if any) affect it has when used with -ENV and with the ENV variable not set.

#!/usr/bin/perl

use strict;

use warnings;

use Getopt::Long;
use Pod::Usage;
use Smart::Comments -ENV;

my $help  = 0;
my $man   = 0;

my $DEBUG = 0;

my $result = GetOptions(
 'help|?' => \$help,
 'man'    => \$man,
 'debug'  => \$DEBUG,
);
pod2usage(1) if ( $help or !$result );
pod2usage( -exitstatus => 0, -verbose => 2 ) if $man;


my $quiet = $ENV{Smart_Comments} ? 0 : 1;

#### Base Smart Comments - Show variables
### $help
### $man
### $DEBUG
my @array = ( 1 .. 10 );
### @array

print "Now running 4 runs through the slow loop\n" if $quiet;

#### <now> Slow Array 1 at <line>...
for my $num (@array) {    ### Slow array1...       done
 ### $num
 sleep 1 if $num % 4;
}


#### <now> Slow Array 2 at <loc>...
for my $num (@array) {    ### Slow array2--->       done
 sleep 1 if $num % 4;
}


#### <now> Slow Array 3 at <place>...
for my $num (@array) {    ### Slow array3 [===|   ] [%] done
 sleep 1 if $num % 4;
}


#### <now> Slow Array 4 at <where>...
for my $num (@array)
{                         ### Slow array4===[%]       done
 sleep 1 if $num % 4;
 print "$num\n";
}

__END__

=head1 NAME

smart-comment-example - Using Smart::Comments with Getopt::Long (and Pod::Usage)

=head1 SYNOPSIS

smart-comment-sample [options]
 
 Environment
  Smart_Comments  Set the environment variable Smart_Comments = 1 to enable comments.

 Options: 
  --help         brief help message
  --man          full documentation
  --DEBUG        increase debug level

=head1 OPTIONS

=over 4

=item B<--help>

Print a brief help message and exit.

=item B<--man>

Print the manual page and exit.

=item B<--DEBUG>

Affect the DEBUG/verbose level

=back

=head1 DESCRIPTION

B<This program> will demonstrate smart comments (Smart::Comments) as well as
boilerplate for setting up Getopt::Long with Pod::Usage

=cut

organizing: less fun than coding.

I finally emailed the Thousand Oaks perl mongers list about the June LA Perl Mongers Meeting. We crossed wires and it didn't get announced at TO.PM last Wednesday.

I just talked with Matt Burns and he assures me his presentation is coming along nicely. Now it is time to follow-up with David about the other presentation.

Maybe after all this organizing I'll get to write some perl?

Saturday, June 6, 2009

June Perl Mongers Meeting.

Hello Los Angeles!
I am pleased to announce a Los Angeles Perl Mongers Meeting:

What: Perl Mongers Meeting
When: 7-9pm
Date: Wed, Jun 17, 2009.
Where: The Rubicon Project HQ - 1925 S. Bundy, 90025
Theme: Perl!
Food: Pizza and Pop provided. Responses appreciated.

Speakers:

  1. Data processing and Numerical Analysis in Perl (David Williams)
  2. Moose and Joose -- Programming is (more) fun again. (Matthew Burns)

About our speakers:
David Williams is a Senior Software Engineer and Researcher at the Rubicon Project, formerly of RAND. He's a mathematician, puzzle solver and perl lover.

Matthew Burns is a Senior Software Engineer at ValueClick / Search123. He has modernized and revitalized the S123 team and product over the past year. He's a magician and great at finding creative ways to plug things together.

About your host:
* Andrew Grangaard is a Senior Software Engineer at the Rubicon Project, and long time Perl Monkey. A Caltech EE, he made the switch from Hardware to Software in 1998 and hasn't looked back.

* The Rubicon Project (http://www.rubiconproject.com)
The Rubicon Project is an Advertising Technology Company headquartered in Los Angeles. Their mission is to automate the selling and buying of online advertising.

See you at 7 on the 17th.


View Rubicon Project in a larger map

Thursday, June 4, 2009

Non-stick is the new sticky

Here at Rubicon Project I've heard the complaint "we have to be more sticky!" The fear being that clients can turn us off very easily just by adjusting tags on their sites. Some people think this means they want a higher barrier to exit.

It's time to turn that idea on its head.

Now, it may be that I'm just a F.O.S.S. junkie, but I tend to avoid software that has strong lock in because I know that I'm going to be trapped if it doesn't live up to the hype. So having lowered perceived stickiness will lower the barrier to entry.

Secondly, if I see a product with low barrier-to-exit and yet it is popular and clients renew and stick with it, I know the clients are staying for quality and not due to a technical lock-in. For me, that is the real stickiness.

When I talked to Damian (Hogan) about this last month, he agreed and expanded to say how true stickiness comes from providing a value proposition where it's worth more for clients to stay than to leave.

And when it comes to that kind of stickiness, we are very, very sticky.

Tuesday, May 26, 2009

Reviving Los Angeles Perl Mongers

The most recent meeting of the Los Angeles Perl Mongers was in April -- of 2008.

I'm planning to start this back up. I was at the Thousand Oaks meeting earlier this month, and it was so nice to be back at a meeting. I've contacted the current head of the email list to get the ball rolling.

There was an impromptu meeting in Burbank a couple of weeks back (the day after the TO meeting, actually). I couldn't make it over there, but it sounds like everyone had a fun time.

But watch this space for details! (or the la.pm.org mailing list, of course).

LA Perl Mongers Meeting
When: TBD (7-9pm)?
Date:  TBD (4th Wednesday)?
Location: The Rubicon Project, 1925 Bundy.  At the interchange of the 405 and the 10.
Speakers/Topics: 
  1) Data processing and Numerical Analysis in Perl (David Williams)
  2) Moose and Joose -- Programming is (more) fun again. (Matthew Burns)
Catering: working on it.

Edit: June 17, 2009 seems to be the front runner in voting, with 100% of the vote.

Friday, March 6, 2009

With all these books, maybe I should just give in and get a Kindle 2.0. I'm torn between the Kindle and a Sony 505, the Kindle has so many buttons, which seems like a downside. But it does bring its own network...

Thursday, March 5, 2009

Reading List

A backlog of books that I've added to my "to-read" list.

Saturday, January 10, 2009

A look inside the Rubicon Project

In late November / early December I was in an interview room with Karim and a potential hire. This was the end of a long day for everyone* and when we asked the candidate if he had any questions for us, he asked an excellent question, "What don't you like here?"

I was a bit taken aback. I really like that style of question, but that's not what surprised me. What surprised me was that I didn't have a ready answer. And then I thought about it, and looked at Karim, and realized my only answers were, "Everything that I've been annoyed with, I've brought up and we are in the process of fixing," and then a weak answer of "We do a lot of interviews, and they take a lot of time that I could be spending coding." That's an excellent question and it felt really great to not have anything to complain about.

I realized that if the worst part of my job was talking to talented candidates to find awesome coworkers, I must have a pretty sweet gig. And I do.

Footnote:

* Our interviews are long and involved.

Now, they're not at the Microsoft or Google multiday level, but they are about half a day of heavy questioning. I'd say three rounds of interviews from your peer engineers, one from head of Development, and lastly a "culture interview" which is traditionally with the CEO or COO.

We want to find good coders who are also team players with good attitude. And they should have a basic vocabulary of design patterns and deep language knowledge of their preferred coding language.

Tuesday, November 4, 2008

NYC Marathon 2008

Dear Andrew Grangaard

Congratulations! You persevered through all five boroughs and finished 26.2 miles by crossing the most famous finish line in the world. You're an ING New York City Marathon finisher!

We celebrate you and your accomplishment. We're proud to be the city where you and the rest of the world come to run.

Here are your unofficial results:

Finish time: 6:42:28
10K split: 1:30:56
Half-marathon split: 3:19:11

Relish this victory; it's a memory you'll have for a lifetime. Take time to rest and recover, and then get back out there for more!

All my admiration,

Mary Wittenberg
Race Director, ING New York City Marathon
President and CEO, New York Road Runners

I'm a marathoner!

My thanks go out to the people of New York who came out to cheer along the entire length of the course, my wife who snuck in and ran 10 miles with me from 16 to the finish, to JJ & Tara for putting us up (and putting up with us) for the weekend, and to Neil and Rodney and everyone at Woodland Hills Physical Therapy for patching me up to get me back out there!

It's a long path from Good Intentions to finished reality. Only by trying the impossible can we find our limits.

Saturday, October 25, 2008

Good Intentions

"In fact, no decision has been made unless carrying it out in specific steps has become someone’s work assignment and responsibility. Until then there are only good intentions."
Peter Drucker in The Effective Executive.

First two weeks

I've been at the Rubicon Project for two weeks now.

Jumping back into the Start Up World is quite a trip. There are the pluses -- excited peers, interesting projects, free food & beer, freedom to improve process. And the minuses -- what process? code that has all been written in a hurry and extended in unexpected ways, and all the other problems that creep in when hurrying becomes rushing.

The first few weeks at a new job are a unique opportunity. As "the new guy" everything is new and strange. We get a lot of leeway to ask questions -- so ask lots of questions! Of course, we need to do some digging beforehand so we can understand the responses. Keep track of which processes or interfaces are confusing. Everyone else is used to them, warts and all, and will need your insight to smooth out the rough edges.

Meet as many people as you can. Ask them what they do and how it interacts with what you'll be doing. You'll be asking these people for favors soon enough! Use this relatively unstructured time to integrate professionally and socially into the new culture. Now is the time to build a solid base -- from here we will expand our area of competency and influence.

"Hi, I'm [your name], I'm new in [your department]" this is where you'd offer to shake hands If they didn't introduce themselves, follow with "What is your name?" If you've been introduced, but can't remember their name, be honest about it and apologize. "I know we've been introduced, but I can't recall your name. I apologize. What is your name?"

Follow with "Nice to meet you [their name]. [their name], What do you do and how does your department interact with mine?"

I'm glad I got the chance to start on a smallish project with a buddy. This gave me one person to pester instead of annoying the whole team. I was able to jump into the code and make my first SVN commit about a week in. The parts that were too large conceptually for me to figure out I was able to push back to my buddy. It's great to have a project that directly affects the product. I've seen plenty of new hires toiling away on an initial project that will be stand-alone -- this doesn't tie them into the main product and they're essentially still just the new guy when they're done.

Hey, don't kill yourself in the first weeks. Realize that you'll need extra down-time for all these new experiences to sink in. Let the new grooves form.

I'm really excited to be back around excited people. I've spent much of today (Saturday) reading through our code base and browsing software books for related patterns.

Monday, October 13, 2008

Good Bye to ValueClick

From: Andrew Grangaard
Sent: Thursday, October 02, 2008 11:24 PM
Subject: Good-bye dear coworkers!

To my ValueClick family,

Friday is my last day at ValueClick. I've had a great two years working here in the Westlake Village office (with visits to SF). I will miss seeing my many friends across the ValueClick departments. You are an excellent crew of hard working, dedicated people. Running the MOJO Publisher Development team was a wonderful opportunity and a fun ride. Sean, Rodney and Joe, thanks for your guidance and leadership with the Publisher product.

The MOJO Publisher layoffs in August were emotionally draining: suddenly separated from a crew and product I'd worked hard building and defending. My thanks go out to Peter Wolfert for working hard to find positions for myself and my team. Kelly Harrel and Mike Mikowski really went to bat to find the funds to bring Noel and I into Search123. Thank you. I'm happy to see Kevin Tam and Mike Heckman continuing with new roles at Mediaplex. I was truly blessed to have such a wonderful hardworking development team.

With my team safely transitioned, it is now time for me to take on a new opportunity. I'll be starting at The Rubicon Project next week. I can only hope that I'll find the same standards of excellence in my new teammates. I'm looking forward to the change of joining a young, small company -- and shortening my commute from a 35 mile drive (each way) to a 3 mile bicycle ride is too hard of a prospect to pass up. I'll miss you all. Stay Classy!

Thank you,
Andrew

manager-tools

To Mark and Mike at Manager Tools,

Thank you for all you've done for the management community. I've learned so many skills from you guys but more importantly your attitude is infectious. Improve! Improve your directs, what better way for you to be acknowledged as a manager than to have your directs promoted? Be true to yourself and your ideals! Help others to help the world! The Manager Tools website and podcast are incredible resources for both the new manager and the seasoned professional.

Mark and Mike are flying to NYC this weekend (Oct 18) for a free career-crisis skills conference. First-come-first-served. I've forwarded this directly to some friends in the NY job market. This is an amazing gift from them. If you're able to get there, I'd recommend it. Find out more about this Free Career Crisis Skills Conference - Oct 18,2008

The Effective Managers conference in San Antonio (September 2007) was amazing. It was overwhelmingly frightening to introduce myself to the group as a whole. Going through the feedback drills was almost as hard! This first hand experience is just what I needed to get over the twin fears of failure and success. I don't have it all down, but I'm moving forward.

I liked the conference so much I became a full-premium member of the website, which included the "How to Interview" series. This series is incredibly useful on both sides of the interviewing process. I definitely leaned on it while doing interviews for new hires at ValueClick and used it for preparation for the interviews that lead to my current job at The Rubicon Project. Quick take-away: be upstanding, be polite, be prepared, be yourself. Perhaps the most important tip: There are two parts to the job search: getting offers and taking offers. These are separate phases!

Mark and Mike, thanks again for all your hard work and inspiration.

Andrew

http://www.manager-tools.com/2008/10/free-career-crisis-skills-conference-nyc-18-october/#comments

So it begins

Hello World.

Welcome to Low Level Manager.

I'm your Host, Andrew Grangaard. I'm a software developer and first time manager. I've learned a lot so far (starting at zero will do that) and I'd like to share. And here we go!