I finally understand open source software

What does Google stand to gain from having so many open source projects? What about Twitter or Facebook? Why would companies freely give away software that cost them time, money and may help their competitors? Why is Github growing at an absurd rate, with over 2 million repositories? Why are developers world-wide giving their time and work away for free?

I've used a TON of open source software (e.g. see the "what technologies were used section" of the Resume Builder) and am a very strong believer in using open libraries and standards whenever possible. However, until just recently, the full motivation behind open source software - why so many individuals and companies contribute - never really clicked in my head. As soon as it did, I created my first open source Github project.

I realized that open source isn't about doing the world a favor, sharing, or acting charitable. It's not about freedom, choice, human rights, standardization, or any of that. Sure, all of these play a role, but none of them are enough to explain how the open source movement got to where it is today. What I think really drives open source are three major benefits to the project creator: free labor, cleaner code and portfolios.

Free labor

The benefits of open source software to an end-user are obvious: you get to use amazing libraries, operating systems, standards, and tools, for free. You can take advantage of projects that have been built and tested by hundreds or thousands of developers, learn from the source code, customize it for your needs and build bigger, better things in less time. You get to stand on the shoulders of giants.

What wasn't as obvious to me was just how much the project owner benefited from me using it. Every time I ran the code, found a bug, or tried out a benchmark, I was performing QA and performance testing - for free. Every time I asked questions online or posted a tutorial, I was writing documentation - for free. Every time I used the project in my codebase and told others about it, I was advertising the project - for free. If I created a patch, or added a new feature, or made suggestions for improvements, I was helping to design and develop the project - all for free.

In other words, the open source community using your projects is, quite literary, a totally free and incredibly effective workforce. Google open sourcing snappy may help everyone in the community do fast compression, but if they can get enough people interested in the project, it helps Google even more when that community finds bugs, fixes them, builds new features and contributes it all back to snappy. The cost of hiring a few hundred developers and QA to work on a project like snappy would be prohibitively high, even for a big company; for a lone developer, totally impossible. But open source it, and you get a huge pool of labor for free.

Cleaner code

It turns out that knowing that other people will scrutinize your code, tear apart your design, and use it in ways that you didn't expect is a superb motivation to keep things clean. The very act of taking some code and making it a "project" will encourage you to make things more modular and reusable, write documentation, use source control, track bugs, all the good stuff. It's just human nature to clean the apartment more for guests than yourself; as such, open source projects tend to be cleaner than proprietary ones.

Portfolios

Open source projects are the best portfolio a software developer or company can have. It's hard to learn much from just seeing the end product (if it's even publicly visible); interviews are sadly not too revealing either (a topic for another blog post); resumes and "about me" pages are all but useless. But when I can see every line of code, the design decisions, and the technologies involved, I can get a very good idea of the type of person or company I'm dealing with. It's the ultimate branding play: show, don't tell.
When it comes to hiring, I'll take a Github commit log over a resume any day. - John Resig
I'm a believer

I've been an open source end user for a long time. It's about time I actively start contributing. Not because it's good for the world or because I want to better humanity - it is, and I do, but that hasn't been enough motivation before. No, I'm going to contribute to open source because I finally see how it'll directly benefit me. No reason I can't be selfish and save the world at the same time.

This is where I work

LinkedIn just had a "pimp your row" competition where each row of cubes got money to spend on decorations. The results were astounding. As I walked around, I had to remind myself this was an office. This is where I work.


The Platform Team

Core team

The LinkedIn Zoo
Gotta love the aquarium




Funneling red bull?


Corporate IT totally blew me away

They turned their office space into a night club

With beer on tap

Awesome shirts


Crazy lights



The photos do it no justice, so definitely check out this video







Our university recruiting team, making college students feel right at home


Content and community




Enterprise hiring solutions


Hooka bar








(My apologies for the quality of the photos: I only had my iPhone on me).

Java's String.split()

Just ran into a "gotcha" in Java that had me scratching my head. I had a string of the form "abc.def.ghi" and I wanted to split it on the dot (".") character. So I had the following code:

String test = "abc.def.ghi";
String[] parts = test.split(".");

Pop quiz: what does the parts array contain?

  • Did you say {"abc", "def", "ghi"}? Sorry, no. 
  • Maybe {"abc.def.ghi"}? Nope. 
  • "Oh, I got it!" you think, and happily announce the solution is {"a", "b", "c", "d", "e", "f", "g", "h", "i"}. Bad news, friend: you are still wrong.
The real solution? parts = {}. That's right, parts is an empty array.

Huh?

Let's start by looking at the API Docs for String's split function. The first thing to realize is that the parameter it takes is a regular expression, and in regex syntax, the dot matches any non-whitespace character. So instead of matching the dots like I wanted, I was matching everything in the string. To actually match a dot character, I needed to escape it with backslashes: test.split("\\."). 

That's a simple enough error, but why would it result in an empty array? If the dot matches every character, shouldn't I have gotten an array where each character is a separate entry? That certainly feels like the right answer for anyone used to matching things with regex, but we have to remember the regex plays a slightly different role in the split function: it's the delimiter. It's the value on which to split the String and is NOT included in the resulting array. 

So my delightful code snippet ended up matching every character in the input ... and then throwing it away. A fun example of simple code that looks right, but isn't.  

2011 Goals

The reason most people never reach their goals is that they don’t define them, or ever seriously consider them as believable or achievable. Winners can tell you where they are going, what they plan to do along the way, and who will be sharing the adventure with them.
Denis Watley
I'm going to use this post to list and track my goals for 2011. The list is ambitious, possibly just beyond reach, just like every list of goals should be. I had lots of fun looking back at my life goals from time to time and contemplating which of them I could attempt this year.

A journey of a thousand miles...
General goals
  • Launch at least one "product" (most likely a website) of my own, outside of work.
  • Write at least one short story.
  • Learn at least two new programming languages/technologies. Likely candidates: Scala, Python, HTML5.
  • Visit at least 5 new places. Likely candidates: Thailand, Lake Tahoe, Yosemite, Ano Nuevo, Sequoia National Park
  • Get better at remembering birthdays and getting gifts.
  • Pick up a new sport.


Fitness goals

Strength/Power

  • Squat: 455lbs (current: 405lbs)
  • Deadlift: 500lbs (current: 495lbs)
  • OH Press: 225lbs (current: 205lbs)
  • Crossfit Total: 1180lbs (current: 1055lbs)
  • OH Squat: 255lbs (current: 245lbs)
  • Snatch: 225lbs (current: 203lbs)
  • Clean: 315lbs (current: 288lbs)
  • Jerk: 275lbs (current: 258lbs)

Gymnastics

  • Consecutive ring muscle-ups: 10 (current: 4)
  • Consecutive full ROM HSPU: 10 (current: 2)
  • Consecutive pistols (per leg): 15 (current: 10)
  • L-sit: 1:00 (current: 0:20)

Speed/Endurance

  • Run 40 yards: 4.5 seconds (current: ?)
  • Run 100m: 12.0 seconds (current: ?)
  • Run 400m: 1:00 (current: 1:10, track)
  • Run 800m: 2:30 (current: 2:50, track)
  • Row 500m: 1:25 (current: 1:29)
  • Run 1600m: 5:45 (current: 5:53, treadmill)
  • Run 5000m: 21:00 (current: 22:38, track)
  • Run 10000m: 50:00 (current: 51:43, track)
  • Row 2000m: 7:00 (current: 7:17)

CF WoD

  • Fran: 2:30 (current: 3:20)
  • Cindy: 30 rounds (current: 28)
  • Mary: 14 rounds (current: 10)
  • Angie: 14:00 (current: 16:08)
  • Filthy Fifty: 20:00 (current: 23:20)
  • Helen: 8:00 (current: 9:01)
  • Murph: 30:00 (current: 32:29)
  • Eva: 42:00 (current: 49:32)
  • Grace: 2:00 (current: 2:47)
  • Isabelle: 6:00 (current: ?)
  • Fight Gone Bad: 400 (current: 364)
  • King Kong: complete it (current: ?)

It's going to be a very busy year. I can't wait.

The world makes way for the man who knows where he is going.
Ralph Waldo Emereson