Monday, March 26, 2012

Trail running in Muir Woods like an ape

Rise of the Planet of the Apes - Concept Art

Every now and then I like to beat my body to pulp with a good workout, take things a step further than I have ever before. This Sunday I did just that, in preparation now for Tough Mudder, which is described as a 10-12 mile endurance event obstacle courses designed by British Special Forces to test all around strength, stamina, mental grit, and camaraderie that are billed as “probably the toughest event on the planet". Whether or not the marketing hype is real, I need to train for it somehow. I started the day with bouldering until my hands couldn't take it anymore, working primarily on V2s and then I decided to try trail running at Muir Woods, on my own.

From I am mcgrof's smirking revenge

I had only tried trail running twice before and both times it was by mistake. One time I had gone climbing outdoors and finished climbing late, the hike to the routes we climbed was far from the parking lot so we had to get out before the sun set and before the park closed. Me being the only guy was tasked to carry the rope equipment and we booked it out of the park as fast as possible. It was fun. My neurons are failing me at remembering the other time but I do recall it being a mistake as well. This time I was actually intentionally trying trail running. I wanted mud, and hoped for rain.

From I am mcgrof's smirking revenge

I got tons of mud and a bit of rain, and a large unexpected set of tourists in my damn way. Why were all these folks coming to see the woods on such a cloudy day? Meh. I ran and ran, it seems only me and another person had the same idea. Tourists were nice and would make room for me as I passed, other times I scared folks as I jumped onto the floor as they were taking pictures. At one point I started feeling like one those apes from Rise of the Planet of the Apes (2011), specially since I forgot to wear deodorant. Plot Spoiler warning: in the movie the apes cross over the SF Golden Gate bridge and head over to Muir Woods to start their own lives as humans perish through some kind of self inflicted virus.

From I am mcgrof's smirking revenge

I felt great for the first maybe 3 miles, once I arrived to the Ocean View Trail, which was all uphill, I started accepting the fact that I was no ape. I tried running up all the stairs on Ocean View trail and quickly I started getting flashbacks of hiking up Vancouver's Grouse Grind during the 2011 Vancouver LinuxCon. Grouse Grind is considered mother nature's StairMaster (TM)... I gave in and walked quite a bit of the trail that had stairs, and started cursing apes away, and scaring even more tourists.

From I am mcgrof's smirking revenge

I made it up. I remember last time I tried hiking just the Ocean View I never even made it up, and this time I was trying to run through all the open trails. Funny how things work. At the top there is a large boulder, I wanted to climb it! No picture of the boulder though as tourists were rubbing themselves all over it as they rested on it. The view was... meh. But at least the sun was out. When in the woods though it was really chilly so I'm glad I brought a training jacket. Unfortunately the shirt I brought was cotton and with the training jacket didn't help much, nipple burn. Ouch.

From I am mcgrof's smirking revenge

All in all, I think it was about 6 miles. I really gotta get a pedometer, or something, this Google Maps trail thingy doesn't work so well at times. Not that far but I don't suspect Tough Mudder will require a crazy Grouse Grind like trail. I need to remember to get myself a CamelBak and something to snack on. All I brought this time was one measly Apple, not even water. Next time I'll come better prepared, wear deodorant and all. I'll tell my other fellow Tough Mudder buddies I signed up with (I think we have about 15 now) about the fun new trail, I hope they're up to go train there a few times. Its $7 for the day, $20 for the year pass. Trail running at Muir Woods was one of the funnest things I've ever done in a long time. I highly recommend it! Be sure to try it as an ape though.

Saturday, March 17, 2012

V-scale and YDS conversion chart

From I am mcgrof's smirking revenge

If you're starting to rock climb chances are you are starting at an indoor rock climbing gym. Indoor rock climbing gyms have two types of rock climbing available, bouldering and sport climbingBouldering is a bit different than some other forms of rock climbing and it has its own grades, the V-scale, for defining the difficulty of the climb. In the United States for sport climbing and other forms of rock climbing we use the Yosemite Decimal System. As I started to rock climb I got confused by these different rating systems and their relationships.

At one of my visits to Planet Granite in SF, the indoor gym I typically go to, I finally saw a conversion chart. I'm sharing that with you all and blogging about this given that I am unable to find anything like this online. Its very curious to me that a V2 is similar to what a 5.11b or 5.11c... At least for me in terms of difficulty, the chart seems to be spot on. V2 is my current bouldering top level and 5.11b is the highest I've been able to climb so far as well. Bouldering has a different feel to it though and for me if you do not boulder often enough -- you loose it.

Friday, March 16, 2012

What have you done for me lately?

I've been asked for an idea of what Atheros, now known as QCA (Qualcomm Atheros) has done on Linux, the kernel, upstream. I wanted to get stats before and after the Qualcomm acquisition. At first I tried git diff --stat --author, but that doesn't do the job, but Greg pointed me to Chris Mason's python gitstat utility. I had to hack it a bit to work (patch sent):
--- gitstat.orig 2012-03-16 18:01:42.719510143 -0700
+++ gitstat 2012-03-16 18:02:40.089510169 -0700
@@ -8,6 +8,7 @@
 import sys
 import os
+import re
 from optparse import OptionParser
 VERSION="gitstat 0.18"
@@ -241,7 +242,7 @@
         if last:
             words = last.split()
             if '+' in words[-1] or '-' in words[-1]:
-                val = int(words[-2])
+                val = int(re.sub("\D", "", words[-2]))
                 val = int(words[-1])
But after that I got some stats and I figured I'd share. These are the stats of Atheros' contributions prior to the Qualcomm acquisition. These are the stats since Atheros ever started hacking on the kernel up to v3.3-rc7. To generate these I did respectively:

gitstat -d -e v2.6.26-rc3~65^2~14^2~19..v3.1-rc1~24^2~10^2^2~398
gitstat -d -e -e v2.6.26-rc3~65^2~14^2~19..HEAD 

v2.6.26-rc3~65^2~14^2~19 happens to be Atheros' first contribution to the Linux kernel, and v3.1-rc1~24^2~10^2^2~398 our last one, after that our contributions went out under QCA.

The shortstat version, before the acquisition:

 531 files changed, 317748 insertions(+), 140965 deletions(-)
After the acquisition:
 593 files changed, 362457 insertions(+), 293184 deletions(-)
We keep chugging along. Most impressive to me of all these stats were Kalle Valo's stats, which show he has deleted a lot more code from the kernel than actually add:

Kalle Valo (120) commits (+23070/-102518)

Rock climbing infatuation

From I am mcgrof's smirking revenge

I tried rock climbing for the very first time on August 28, 2011. Two of my friends, Nakeyshia and Leigh had told me about and it sounded interesting. After going only two times I knew I had to buy  my climbing shoes and my harness, I was hooked... There is no other sport or activity that I had tried up to that point that in such a short period of time demanded so much out of my body that got me completely tired. Prior to rock climbing I had tried running, bootcamp boxing, tennis, squash, biking... nothing was allowing me to run out of juice as fast as I wanted to, but rock climbing really was pushing my limits.

From I am mcgrof's smirking revenge

Rock climbing is not just about physical strain on your body, it also demands quite a bit from your brain. If you cannot think clearly you're not going to climb well. One type of rock climbing called bouldering calls "problems" the routes you to climb. A "problem" in the bouldering world is a small route. With bouldering you climb without a harness given the small height of the route. After glancing at a boulder "problem" for a while from the ground, you give it a shot, and if you figure it out its called "solving the problem". Pretty sweet eh? This is another reason I love it so much. I hate typical indoor gym workouts, specially those involving weights, and really passionately hate running on a treadmill (although trail running rocks), what a fucking bore. I also love the outdoors, and the thought of being able to combine both the outdoors, awesome views and a huge physical and mental workout seemed like a perfect fit for me.

From I am mcgrof's smirking revenge

I've been keeping a log of of my climbs and its pretty fun and rewarding to go back and see your progress. If you stick to it, you'll see it. The other fun aspect of it is growing appreciation for other people's work and doing that is a key part of learning. Just watching someone climb well can really help you with your progress. I think even watching videos online can help. In hopes to get folks out there excited on climbing let me give you a few videos you can watch. Here Daniel Woods solving some v13 level problem on his first attempt. When you climb a route on your first try without stopping its called on-sight so he solved this v13 on-sight. You can read up on bouldering levels. If you're new to a rock climbing and want to grow an appreciation for this I recommend to go to a rock climbing gym and try to boulder a v2. Here is Chris Sharma climbing a "Dreamcatcher", a 5.14 route. The 5.14 is a Yosemite Decimal System grade used to categorize routes. I particularly enjoy learning what it takes for a climber to complete and get routes completed, it gives me perspective as to how hard someone has to work to complete a route. And to get an idea of the level of training a professional goes through check out Sonnie Trotter's campus boarding training video. To get an idea of what it looks like indoor, but by a crazy mother fucker pushing the limits, check out Paul Robinson's PlasTic'n.

Despite the internet providing us with a wealth of resources to help educate on rock climbing there is surprisingly not that much available. Which is why I give a lot of credit to Steph Davis for her blog, and her book, High Infatuation, in honor of which I make this blog post. I read her book in two sittings, and its been a while since I finish a book. Reading her book has given me insight into a lot of the language used in outdoor rock climbing, given me an idea of the preparation required to work on projects, insights into the lifestyle of a professional rock climber, the community, confirming my suspicion about being able to keep a vegetarian diet (in Steph's case Vegan) and still being able to push your body's limits, fun philosophical brain farts, passion, and places to consider going to disappear for a while. Steph is a beast, just to give you an idea she ran an ultra marathon just for training for her free climbing of El Capitan in Yosemite, which she free climbed in a day... Oh yeah. Steph also likes to free solo climb routes, which means she sometimes climbs without a rope. That's not all, she sometimes will free solo a climbing route and then... base jump off. And all of this is why Steph is one of my top heroes.

Wednesday, March 14, 2012

The importance of the GPL

The GPLv2 was masterpiece for its time. It did to software the inverse of the extent to which copyright had been extended for and its effect on software freedoms, which at that point we didn't even know we had. In fact, I'm pretty confident users to this day do not realize they have software freedoms. Its a complete revolution in terms of paradigm shift on licensing and copyright practices. It has had far reaching consequences to the software industry and has motivated dozens of new projects such as Wikipedia, the Creative Commons, the Open Hardware movement. Its impossible to estimate the impact of the influence of the GPLv2 today on other realms.

Free Software was not invented by Richard Stallman but I certainly consider him as the founding father of Free Software Philosophy. How you use this philosophy is up to you, but the moral arguments are clear.  Although the GPLv2 was released on 1991 Stallman wrote GPLv1 in 1989. But we already had free software before that, the 4.3BSD-Tahoe release was made in 1988 and that's when we at least have some record of the BSD license first being used. The BSD license is what we now know as a "Permissive license". Its a Free Software license but its not Copyleft. The idea of copyleft was the hack that Stallman introduced to licensing with the GPLv2. The rest is history.

One of the most successful software projects to embrace the GPLv2 was Linux. One can certainly enter into a debate as to what contributes to success of Linux, but one cannot dispute that the GPLv2 helped. Whether or not it was the element that set it apart from the BSDs is hard to prove, the BSDs lacked wide adoption for  long period of time to Fear, Uncertainty and Doubt over the legality of the BSD releases. That itself may have been the pivotal factor that really pushed people on the shiny legally clear new kernel on the block, Linux.

It does not matter. Linux is here to stay, but we need to highlight that a lot of developers chose to contribute to the Linux kernel under the GPLv2 to ensure their freedoms are not taken away. That makes sense. The GPLv2 has broad implications and it does include clauses which require even the re distributor of GPLv2 software to provide installation scripts and/or instructions. I'm not going to get into the details of this but to explain this a little better I'll demonstrate the importance with an example.

I purchased an LGE 42LG50 TV a while ago, in it in the manual was a copy of the GPLv2! It said I could get the source code for my own TV. Pretty cool right? I asked for the source code to the e-mail address listed on the booklet and I had a huge delay in getting a response. Eventually I got some instructions on how to get the source code and I followed them but the process sucked, so much I had to record it and post it on YouTube for my own due diligence on proving I am trying to follow the instructions properly and am not able to get the code I am entitled to. In the end I got the code and I started my own OpenTV. Unfortunately I was unable to get the scripts or instructions on how to install this damn thing on to my TV. I legally entitled to it, but LGE was not giving me these instructions or scripts. I poked Bradley Kuhn again but unfortunately he had other bigger fish to fry. Oh well. This sucked.

What this goes to prove is that without GPLv2 enforcement we are shit out of luck on our freedoms. This time it certainly was just the install scripts / instructions but how many projects do you think exist that are using the GPLv2 but the license is being violated for? A lot! This sucks too. This is why I support GPLv2 enforcement.

From I am mcgrof's smirking revenge

I also think we can do better too though, but more on that dot later, for now I just want to highlight and reiterate that the GPLv2 was a masterpiece, I highly respect Stallman for authoring that and I also suspect that the FSF evolution and stewardship on the evolution of Copyleft licenses is silly to undermine and I would highly recommend for any new Free Software project to seriously consider embracing the newer GPLv3 if what you believe in is in Free Software and you do believe our freedoms are important to maintain. If you are concerned over the GPLv3 then I invite you to reflect upon the not so publicized fact that the GPLv3 had a proposed edit and revision from 4 major corporations: IBM, Red Hat, Novell, Intel. I supply the proof above. I will remind you that if you violate the GPLv2 there is something called the "GPLv2 death penalty", GPLv2 section 4, by which the violator can no longer use or redistribute that software, ever again. The GPLv3 addresses a much less harsh sentence. There are a lot of other reasons to consider the GPLv3, but for more details see the LF Collab slides on why the SAMBA team chose to move to the GPLv3.

I know.. die-hard GLv2'ists may cringe reading all this blasphemy, but I don't care. I also think we can do better, but more on that dot later...

Tuesday, March 13, 2012

Connecting the dots...

As much as I hate to reference Steve Jobs there is one thing that I will remember him for that I thought was good, his famous 2005 Stanford Commencement Speech. Central to the first part of his speech is the idea of "connecting the dots", living your life loosely, following all your interests, not worrying too much, with the dots eventually connecting somehow. I remember sending this speech to friends concerned about  being undecided about school and feeling pressure. I am not sure if it ever got through to them but truth is there is there should be no rush, and I agree one should follow one own's interests, what makes us happy. Eventually these things may come in handy as the dots start connecting in your life.

The dots are starting to connect for me and I find myself now understanding why I tick the way I do, what motivates me and why I am passionate about the things I am passionate for. Mind you, I'm still young, only 31, but yet the dots are connecting fast and I think its good to reflect and realize what these dots are and how they make you tick. I'll reveal a few of these and I think that can also help my friends understand  why I tick the way I do and what I am passionate about some of the few things I am so passionate for.

As far as technology is concerned for me so far, the dots began with hacking. I was intrigued by the idea of hacking and naturally I started hacking on Linux circa v2.6.5 purely as a challenge, interest, and being intrigued as to how this crap all worked. It took a long time to learn to work upstream and I remember having heated debates with upstream maintainers, particularly Jeff Garzik who at that time maintained networking drivers and accepted 802.11 drivers as well, over random stupid things. At that point things were pretty simple though and frankly 802.11 sucked, mainly due to its infancy and as far as the kernel is concerned netlink wasn't being used yet t help improve APIs.

RUSLUG grub rutgers-winter

After gaining some experience with Linux kernel hacking I then graduated college with a Computer Science degree, mainly because it just made sense at that point, but I had a lot of other interests. One of my other interests was philosophy and it just so happens that part of the Linux kernel hacking dealt with dealing with licensing, something that typical proprietary programmers do not have to even consider when working for typical companies. At school I also had a hard time finding interested geeks in kernel hacking when I started and I figured starting a Linux Users' Group, RUSLUG, would help with that. It didn't. But I did get to meet fun interesting folks, some of which I still remain in contact with.

To start RUSLUG we needed an organization mentor, and that allowed me to meet Joseph F. Miklojcik III who unfortunately passed away at only age 41 last year. Joe ended up becoming my boss for a while as a student programmer making RPMs out of all things for Solaris. But Joe became more than that for me, he became a mentor. It was as close to as a real hacker as I had ever met in person. He had good stories too. One example was that of how after school he started working for a proprietary software company writing tons of code to write an editor which competed at that time with good 'ol GNU Emacs. The company worked really hard at writing and competing with GNU Emacs and never imagined any pesky open project may seriously compete with their own software. Heck, they even sold the editor to NASA! Why in the hell would NASA, of all organizations, use an open editor such as this thing called "GNU Emacs". No way. Obviously they were wrong, you see Richard Stallman, as crazy as he may seem is one hell of a programmer and the shit he did to this day is likely not appreciated by many. Joe did try to explain to me his capability as a programmer and I believed him.
There was one thing that one famous programmer disagreed with Stallman on -- style. Linus Torvalds writes on the Linux kernel's CodingStyle guidelines:
First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture.
Angry? Heh. Wrong or not -- it did not matter. Linus also happens to be one of the best programmers the community has seen and he wrote one piece of code that Richard did not have as part of his GNU Operating System, but it was very important, the kernel. With Linux, the GNU Operating System was a complete free and open Operating System. As it turned out Linux picked up traction -- and fast. It is now the fastest growing software project in the world. Don't believe me? A few stats for the v3.2 kernel release by which Greg Kroah-Hartman has put together on his kernel development slides:
37,617 files
14,998,000 lines of code
3,160 developers
439 companies

12,300 lines added
  8,800 lines removed
  2,300 lines modified
per day for all of 2011

5.77 changes per hour 24x7
No one can compete with this pace of development. Not even Stallman. But being at RUSLUG also pushed me to learn and talk about other things than just kernel stuff. In fact at one point we invited Stallman to come give a talk, he refused given that our user group's name did not include the word "GNU" in it. He indicated that this was not acknowledging a huge amount of history and effort that went into completing a full open Operating System. We didn't know what to do so we discussed it among ourselves through our mailing lists, and IRC. The verdict was we would not change our name. Stallman refused to come but instead Bradley M. Kuhn came for a talk. Bradley struck us a not crazy, very easy going and not an extremist. I don't even remember what his talk was about but I remember it being great. That was when I first met Bradley.

But RUSLUG also taught me to think about the Free Software Philosophy and the moral claims that Stallman preached about through his Free Software movement. The moral obligations that he feels we are entitled to are all reflected neatly in the license he authored the GPLv2. Stallman would be very pleased to find out that good 'ol Linus ended up embracing the GPLv2. Despite that the RUSLUG was already decided on the simple group name title change I was still philosophically at ends with the moral requirements claim on software. I decided my goal was to come to a decision on a position on this by the time I graduated. I did graduate but -- I was unable to come to a conclusion by that time. I did pick up a lot of interest also in Business Ethics and took a few courses on that. It was a lot of fun. I passed the final exam without studying (due to time), the exam covered one case study I knew very well -- Microsoft imposing their own Java virtual machine onto the world on their Internet Explorer web browser. I like to believe I vented eloquently on the exam.

After graduation I hopped around random CS related type jobs, customer support for some Unix crap software, Web Developer, NOC Engineer, Systems Engineer, Security Engineer, in the end it didn't matter. All I wanted to do was hack on the kernel and I found any excuse to make any issue I found a kernel related issue. But it also helped me become a better engineer all around as it meant I wanted to understand the kernel well. After having a great career moving up fast I ended up working for the financial industry and landed a gig at Merrill Lynch. It sucked. It didn't work out, and I got fed up with those sorts of jobs. I wanted to only do Linux kernel development. I took a huge paycut and went to my alma mater and joined the Orbit-lab project and did Linux kernel hacking for shits and giggles, one of the only places in New Jersey that I was aware of that was hiring hackers, and curiously for 802.11.

That was fun :) but they had me work on a Linux kernel driver I told everyone I would always avoid: MadWifi. The MadWifi story is long, in what I call the ath5k wars involved legal issues, about 3 slashdot articles that I remember, huge flamewars and a lot of rants. The story endup up well though and the community managed to jump ship on MadWifi and we finally got a proper replacement in the Linux kernel, through the ath5k driver. But through the ath5k wars we dealt with a lot of legal issues and concerns, and it just so happened that Bradley M. Kuhn had started a non-profit organization, SFLC, to help represent Free Software developers with legal issues, the core idea was to bring some of the sanity that the good 'ol GNU project had to other larger FOSS projects. It worked out pretty well for us and if it was not for the SFLC I doubt we would have good open Linux 802.11 drivers. This was the second time working with Bradley somehow.

One thing happened during the ath5k wars though -- as a consequence of dealing with SFLC so much, I also learned quite a bit of licensing legalese. I'm certainly no attorney -- but what I learned during this time to this day remains priceless. I always have avoided drama and politics, and I hate legalese, but somehow I keep being drawn to it like a magnet.

After the ath5k wars I needed cash for my mortgage and I was in serious denial about not needing to find another job for a long time. Of all offers I took Atheros' and started working on the first properly company sponsored Linux upstream 802.11 driver, ath9k. All the lessons I had learned before on legalese, how to properly work upstream on the Linux kernel had all paid off for this project. The project was successful despite the huge major challenges we faced. To this day I consider it one of the most complicated drivers we have and the legal questions could easily have doomed it, particularly in regards to regulatory and the challenge of finding a solution for regulatory for open platforms. I should mention though that one of the things that particularly hurt from the work we did was that although we had upstreamed the first complete ISC licensed driver into the Linux kernel we, Linux wireless developers, for silly reasons were still at odds with OpenBSD, despite our original reuse of code from OpenBSD's ar5k for ath5k... Despite the success of the driver its perhaps probably alarming to think that such a thing would bug me, but it does and I wish we would work better together with other communities.

Joe had passed away in 2011, only a few months ago, and found it amazing that his obituary stated, "In lieu of flowers, please consider memorial contributions to the Electronic Frontier Foundation". I my jaw dropped, but not at being surprised, this was certainly how Joe would have liked it, I was happy. I decided I was not sending any flowers nor would I contribute yet to the EFF. Instead I promised to work harder in spirit of what I believe is right, and I would use my own philosophical principles that I have concluded on Free Software, but I would also accept no compromises on shit engineering anymore, Joe knew at certain point his company would not compete with GNU Emacs, I promised myself I would go beyond the call of duty and would not let any piece of crap code get in the way anymore, ever. If you know something is right -- fight for it. But I am also going to focus on this with proper business ethics in mind. Its easier said than done. So we'll see.

And here I am now, connecting more dots. I'll just say the next few months are going to be interesting. I'll be blogging about more dots and how they connect as time goes by. Understanding intent and motivation though is very key to understanding community development, and I hope I've made my intent and motivation clear.