robinadr

Tagged coding

Andrew Nacin, lead developer of WordPress, wrote an interesting post about how they decide to give commit access:

A committer is a contributor with the ability to modify the main WordPress repository. If you’re used to a decentralized model, this would be those with push/write access. There have been around three dozen committers to WordPress over the last decade; almost twenty currently have access. But in 2009, there were just five.

I’ve always been proud to count myself as one of the people on that list. I still remember the incredible rush I felt when Ryan Boren pulled me aside in IRC and set me up with it. Unfortunately, my reign came to an end a few months later, but I still learned a lot from the experience. It continues to amaze me that I had direct access to the source code of such an important project, and I was only 14 at the time.

When I posted that I wasn’t going to be working on WordPress anymore, I never gave a reason or an explanation for why I left. Perhaps I felt bitter about the way they made the decision to revoke my access, but I didn’t want to air my dirty laundry. I’m glad I made that decision at the time.

The fact of the matter is that I was 14 years old at the time. I thought I knew everything, that my way was the best way, and that I didn’t have much more to learn. In the 8 years and counting since then, I’ve thought a lot about the experience. It has taken years of maturing and just growing up to realize this.

I used to argue with Matt about topics like converting WordPress to PHP 5 and write cheeky posts trying to call him out. I never thought to consider I may have been wrong. I wrote patches and pushed code into the trunk that I didn’t test or run by anyone else. I used to be a terrible developer, because I thought I was 14 and invincible.

I left for a summer in Italy in June of 2007. While I was there, I ended up using my host family’s computer and the urge to work on WordPress struck. I tried committing a patch to the repository, but I kept getting an error denying me access. I went onto IRC and tried to find out what was going on.

Ryan pulled me aside in a private message and let me know that Matt had decided to revoke my access. No one told me, though they were supposed to, and I found out this way in a country across the world. I took the hit, felt back stabbed, and declared my departure from WordPress.

In the following time, I harbored a secret grudge against Matt. This incident had taken the wind from my sails, and I ended up giving programming up for the most part. I blamed Matt for this, but after a few years I realized I only had myself to blame. I let myself give a passion up because I was too prideful to continue after what had happened. At the time, I even said that the decision “been floating around in my mind for a long time.”

I still don’t like the way they treated me in the end, but I’ve come to understand why I lost commit access. I wish I had only been a few years older for this experience, and I’m certain things would have worked out differently.

I’ve thought about writing this post many times in the past 8 years, and I always decided against it. Reading Andrew Nacin’s post about commit access brought back memories, and I finally felt ready to compose my thoughts about what happened so long ago. You live, make mistakes, and through reflection learn how to build a better future.

I’ve switched to Sublime Text 3 as my text editor for coding on both Mac OS X and Windows. It’s a bit of a pain to set up in that all the preferences are in JSON files, but I’ve managed to put this config together:

The names of the settings should explain themselves. I’m using the Soda Dark theme with the Tomorrow Night color scheme. I highly, highly recommend installing Package Control as it will make your life a lot easier when it comes to finding and installing packages.

Here’s what my editor looks like right now:

Sublime Text 3

I came across an article on Learning jQuery about animating the scrolling between same-page links (i.e. anchors). Basically one block of code does this automatically, but I came across a problem that it was trying to do the same for anchors on other pages, which obviously wouldn’t work.

The line in question:

~~~ .prettyprint $(‘a[href*=#]’).click(function() {


This line selects all `a` elements with a hash (`#`) in its `href` attribute, but this also selects links to anchors on other pages. I changed it to this:

~~~ .prettyprint
$('a[href^=#]').click(function() {

So instead of matching a hash anywhere in the href attribute, this code only matches the hashes at the beginning. Other than that, the rest of the code is the same as in the article. You can see the effect here by clicking on the link in the footer to go back to the top of the page.