Tag Archives: opensource

Getting Involved in Open Source

The first week of 2012 was pretty jam packed for me, which is a good thing. One of the many things that made this week busy was my talk, entitled “Getting Involved in Open Source” at MHVLUG.

This presentation was one of the hardest I’ve had to pull together, as well as one of the most fun to give. I had 3 entirely different slidedecks, each with their own narratives, each with their own dry runs, before I found something I felt would keep everyone engaged, not be too abstract, and time in at 1 hour. (The final dry run was 1:03, the live presentation came in at 1:05). That left plenty of time for questions, and still the ability to end the meeting by the advertised 8pm.

The focus on this talk wasn’t building your own open source project, but really about interacting with various communities. I told stories about reporting bugs, fixing small features in projects, getting into flame wars, getting ignored, and becoming the accidental maintainer of projects. The core center of the talk was a tale of 3 projects: 3 drupal modules that I’ve submitted issues and code to, that have gone in completely different directions. This was to make the most important point of the talk:

Open Source, it’s made of people!

When folks get involved in Open Source, they think that it’s all about code. My experience has been that while the code is very important, the people are just as important. Understanding how to interact with a wide range of personality types is one of the most important skills for an open source developer. How do you get conversations rolling? How do you get your ideas listened to? When do you know it’s not going to work, and a new approach is required? When do you just walk away from an idea, because it won’t fit in this community?

With 37 folks in attendance, this was one of the larger MHVLUG meetings. The fact that it was also in our new location, made me really happy with those numbers. A very good way to kick off the new year.


Upcoming Talk: Getting Involved in Open Source

We’re circling around on January again, which means it’s time for my annual talk at MHVLUG. One thing that’s really fascinated me over the last year is recovering and revitalizing open source projects whose maintainer has wandered off. The talk was mostly going to be about that, but after a bunch of conversations, I realized that I probably needed a talk of more broad appeal.

The new talk is going to be: Getting Involved in Open Source. This is going to be both a personal journey, as well as a list of lessons along the way. The successes and failures are going to be basically mine alone. After over a decade working in open source, I’ve got bumps and bruises all over the place, but fortunately no mortal wounds.

I’ve already got slides and talking points spinning in my head, things I haven’t thought about in years. This is going to be a really fun talk, and should be very educational to people with all levels of open source development.

Revitalizing a software project

I became one of the co-maintainers of the epublish drupal module this year, as we are an active user of it at the Poughkeepsie Farm Project, where we use it for our newsletter. I had about 6 big fixes to it that we needed, and so I was eventually just added to the project so I could commit them myself. Since then I’ve tried to clear out some of the backlog of issues, and added a few features.

In doing so I realized how fragile some pieces of the code were, as I broke things pretty regularly. Fragile code is the biggest inhibitor to innovation, because no one wants to try anything exciting and new when just keeping things working after simple patches is so exciting (and not in a good way).

So I decided to take on the project of revitalizing the code, in a couple of steps.

Add Automated Tests

Drupal has a framework called SimpleTest that lets you include automated tests in your code. These tests simulate a non javascript browser, much like using mechanize in ruby. There are also a lot of convenience functions for testing the results. In Drupal 7 this is a built in, in Drupal 6 it’s an add on module that requires a small patch to core.

Before actually making any substantial changes, I wanted to actually nail down current behavior, so that I know if I’m going to break anything. Over the past three weeks I’ve been figuring out how SimpleTest works, and writing tests for the code. I’m now up to 798 assertions, and have covered a lot of basic workflow, creating / deleting / updating publications and editions. I’d say I’ve probably got 1/3 of the coverage I should have, but I’ve ensured I’ve covered the goofy bits around article ordering that I broke multiple times in the last six months. I consider this a pretty good start.

As with all testing, the hardest part is the first test. That takes about eight hours to understand the system, and build and run a test that makes sense. I did that on a rainy Saturday before vacation. After that adding tests is easily done in 30 minute increments, which I puttered on in the mornings before Susan woke up during our vacation. In the process of getting these tests to work, I found and fixed a few critical bugs as well (when things didn’t work like they really should). Epublish 1.13 reflects these changes.

Extract the Database Layer

Step 2, which I’m starting on now, is to remove the database layer from the core epublish.module. My goal is to have no SQL statements in the core module file, and instead have those all in an epublish_api.inc file. They can be replaced with functions like “epublish_list_publications” and “epublish_add_publication($pub)”.

Again, this can be done in small increments, mornings while sipping coffee, or after work. I’m mostly looking for the kinds of SQL statements currently used, and trying to come up with the sane and well understood function name that they would map to.

Additional possible refactoring

One thing I found in doing the lending module is that it’s actually pretty nice to isolate the 3 form functions (display, validate, submit) for a specific form into it’s own include file. This makes it easy to know you are looking at everything about a transaction in one place. I’m going to see if this makes sense after the database pull out.

Theming functions also make sense to have in a separate place, they are logically quite different than other code in a drupal module, as they are the one place you’ll get markup included in the file.

New Features

All of this is really about adding a new and better interface for managing the articles in an edition, as the current interface leaves a lot to be desired, especially because of the automatically imported calendar entries we’ve got on the PFP site. It will also mean that a port to Drupal 7 can really happen. There are lots of other things holding the PFP site back on Drupal 6, but this is one of the bigger ones.

Brownfield Development

When you are a young and eager developer you always want to start from scratch on projects. The assumption is you can write a replacement in less time than it takes to figure out what the existing code does.

I’m now of the opinion that a whole sale rewrite is almost always the wrong thing to do. It means a very long period of time where you have nothing working, which means there is a good chance you give up on the project all together, with a lot of wasted effort.

This kind of incremental refactoring, adding tests along the way, lets you make pieces of the code better, and continue regular releases on existing function (even finding some bug fixes as you go). If this becomes uninteresting to me at any point, I’ll still have made the code easier to read, created a solid battery of tests, and handled edge conditions much better.

And this is how the majority of real software projects work. You aren’t there at the beginning, you aren’t there at the end. Your impact is really whether you can leave things better for the guy or gal that comes after you.

Kindle Interupted

I broke down and bought myself a Kindle this past week. I will say that I am definitely in like with the device, but not really in love with it yet. The major reason for that is because in the kindle I can see so much more potential, which Amazon clearly has no interest in. Sadly, their main competitor, the Nook, has fully abandoned e-ink for the glossy shiney promiss of interactive CD-ROM… oh, sorry, wrong decade. I think they are now calling it interactive magazines.

E-ink is beautiful. Just beautiful. It is a pleasure to read, creates no eye strain, it’s paper, but better.

The missing potential is around how completely locked down development is, and looks like forever will be, on the Kindle. I recently tried to get access to the KDK to play around with astronomy code on the Kindle. E-ink represents a unique value in astronomy, because it is a dynamic screen that generates no light. I’ve got 15 lbs of books that I take to every star part (and another 15lbs I leave at home) to look up targets, facts and figures, when in the field. Replacing that with a Kindle would be amazing. Having Where Is Io run on the kindle would just kick some serious butt.

But that’s not in the cards. While this time I actually did get a response from the KDK folks, the tone was clear. They don’t want a homebrew market on the kindle, they only are going to let folks in with a product plan in place. Kindle active content is going to be extremely limited because of this, which I think is Amazon’s intent. Given that they are the ones paying for the wispernet cellular connection in every device, they’ve got some incentive to keep very tight control on what people can do. I get that, but as an open source developer, I still don’t like it.

It does sadden me, because I can see so much more potential for this device. Maybe Amazon will have a change of heart in the future. For now I’ll just have to live with this being a really great reader, and possibly play with some custom authoring myself.

Drupal Hacking

My typical morning blog writing time has gotten taken over by morning code writing recently, which I’m quite happy about, as I’ve been making very reasonable progress on a new drupal module: lending. This is still in the sandbox as I’m still in the project approval queue, but you are welcome to check out the code if interested.

The basic idea is an informal lending library designed to support the astronomy club. We at the club have a lot of DVDs and other things that club membership gives you access to. Up until now this was handled with index cards and crates. Someone suggested that we have a way to request items to lend so the full set of crates doesn’t have to be dragged around by our librarian at every meeting.

Most of the drupal modules in this space were really about reservations, and were really more complicated than I thought I could get people to consistently use. So I broke down and started building the module to just meet our needs. Some time spent with Pro Drupal and the drupal website, got me most of the way there. My hope is to have the 1.0 version of this out for next Tuesday’s astronomy meeting.

Once the project is official approved, I’ll throw up some screenshots to show the walk throughs of using it. Now, back to hacking in emacs.

My Thoughts on the Central PA Open Source Conference

I love this new movement of small regional open source conferences that seem to be springing up everywhere. Democratizing the conference space by making it local and affordable is a wonderful thing. When I was at Ohio Linux Fest last year, I got told I should really check out what the folks in Harrisburg were doing with the Central PA Open Source Conference. Given that a trip to Harrisburg would also mean a good chance to visit friends in York as well, I submitted once their call for papers opened up. Having just gotten back from CPOSC, I can tell you they are doing some really great awesomeness there.

First off, the quality of the people at CPOSC is just really amazing. Every random conversation I ended up in was really compelling, and made me wish there was more time between sessions to have even more of those. I learned some very interesting things about mobile web development when I didn’t know, I learned quite a few interesting Drupal tricks that are invaluable, and I found a really vibrant and welcoming open source community in Central PA.

The facilities were brilliant. We were in the Technology Building for Harrisburg University, on the 12, 13, 14th floors, which were truly state of the art. Touch screen controls for all the rooms, power wired to all the desks, really good chairs… just all around brilliant. The flat screen displays in the hallway we even flipping through Linus quotes all day, which while a little detail, really helped set the atmosphere.

The organization was really tight, which I always appreciate as a speaker. The speaking blocks were 50 minutes, with 10 minutes in between. The organizers ensured every session started on time, and ended on time, giving 10, 5, and 1 minute warning cards. The graphics on these included Veloceraptors and Wolves, which I didn’t even realize until after my talk. A well run event is one that seems like no one is running it but, mysteriously, everything is just where it needs to be when it needs to be there. That’s was CPOSC to a T. To everyone that made CPOSC happen behind the scenes, I applaud you greatly.

The schedule at CPOSC was great. The speakers and content were top notch. I’ve now learned that on the presentation win scale there is something even better than a perfectly in context xkcd comic to make your point: using video from Indiana Jones and the Temple of Doom to explain software architecture. My only regret on the speaker front is that by consuming one of the slots with my own talk, I inevitably collided with a talk I actually really wanted to see.  Oh well, thems the breaks.

Finally, my audience was great. I had somewhere between 50 – 60 people in my talk, all were very engaged, and really focused on what I was saying. I felt really good about how the presentation went (though I’ve of course got my mental list of things I’d change afterwards, it’s never a good talk without that), but I did feel that I was on my game. I got a number of great questions at the end of the talk, and people coming up to me later in the day asking more questions and just striking up conversations that followed from there (see point 1 about the quality of the people being excellent).

I can’t wait until CPOSC 2011, and will definitely do my darnedest to get down to it. Knowing how good the speaker pool is now, I’m going to have to make sure I keep my game up to play there.

Twitter vs. Open Source Clients

Apparently you can no longer legitimately use Twitter with open source clients, Ars has a lot of details around the implications of the way Twitter just rolled out OAuth.

Twitter’s OAuth implementation and open source clients

Requiring third-party developers to embed a consumer secret key in the source code of their Twitter client applications potentially puts free and open source (FOSS) client software at greater risk of key exposure than closed-source client software. The key would be visible as plain text in the source code, where anybody could find it and use it for their own purposes. Indeed, one can already easily find dozens of OAuth consumer secret keys by using Google’s code search engine.

Twitter felt that allowing FOSS Twitter clients to use OAuth posed an unacceptable risk. The company warned that it would invalidate any OAuth keys that it found published in the source code of FOSS client applications. This was deeply troubling to the developers who maintain such software, including me. I am the developer behind Gwibber, a GPL-licensed microblogging client that is used in Ubuntu and other Linux distributions.

This is a damn shame.  I just fixed up my little script that talks to twitter, and I’ll be publishing keys out to github later this week because it’s asinine that they would build an interface which makes it overly burdensome to use open source clients.  OAuth has some neat ideas in it, but making it fundamentally Free and Open Source hostile seems like a bad direction to go.

Central PA Open Source Conference open for registration

CPOSC is now open for registration.  It’s in Harrisburg PA on October 16th (a Saturday), which makes it about a 4 hour drive from here in Poughkeepsie, NY.  This will be my first year there, but based on the list of talks they’ve got posted I’m sure it’s going to be great, and not just because I’ll be talking ;).

If you are in the mid Atlantic area, and are interested in Linux and Open Source, you should check it out.

Isn’t this what we were afraid Microsoft would do?

There is one main reason people in the open source community get so violent over Mono (the open source .NET implementation): the fear that Microsoft could shut everything.  There is long standing fear that MS has patents on core parts of the system.  People were afraid their investments in software written on top of it would be at risk.  Java was always held up as the much safer choice, with a longer legacy, being more open source friendly, with a company behind it that everyone trusted.  Of course, companies change hands some times….

Oracle sues Google for patent, copyright infringement

Oracle filed a complaint in federal court in California, alleging the infringement of seven patents and copyrights by Google’s Android mobile operating system software.

I was once told that Sun actually made money off Java, and one of the big sources of revenue was the J2ME market, which is what all those dumb little snake games are written in.  Google has undercut that by making a really popular cell phone platform with a version of Java they wrote themselves.

It’s still not a good world to be in, where innovation comes with a 10% patent tax.

Scratching an itch

Apparently I’m now writing a drupal drush module for patch management, and slowly understanding what that entails.  I’ve looked around and surprisingly there really isn’t a good solution for this yet.  There are a number of solutions for applying other people’s patches that are posted somewhere, but what I really care about is being able to easily keep, and reapply the dozen or so patches I’ve made to drupal modules to make mhvlug.org work.  Some of these were due to bugs that don’t seem to be getting fixed any time soon.  Some are due to lost of drupal modules not working with PHP 5.3.

Regardless of the reason, I’ve apparently found a new itch to scratch, which hopefully isn’t going to take me too long, because I really need to get back to android hacking.