Archive | OpenSource

Open Source means that users have the freedom to see how software works, adapt it for the own needs, fix bugs and limitations and contribute back to the community.

PySIG Notes, 23-Sept-2010, Bill Freeman and Django

Seven folks attended the September meeting of the Python Special Interest Group of the Greater New Hampshire Linux User Group held as usual on the 4th Thursday of the month at the Amoskeag Business Incubator in Manchester. Bill Sconce, PySIG’s organizer, supplied milk and Janet supplied (excellent!) chocolate chip cookies.

Bill Freeman was the presenter for the night, and spoke about Django. Django is a web framework written in Python. It supports the WSGI web server gateway interface specification which allows a standard way of connecting to web servers and provides facilities to “stack” additional WSGI-compliant applications to act as filters, caches, security modules, etc. between the web server and your application. Bill walked through the flow of data through the application’s architecture from http request, through parsing, views and the template language, processing in the ORM and out as the http response. There are hooks galore where you can add your own code, modifying the flow of data and responses. Django is a world-class web framework, with facilities to plug in additional “engines” — mini-applications — and add your own template tags, customize the automated generate of the data schema, and of course, write your own application logic. It’s Open Source, it’s Python, and the code is there for you to mess with. Django’s most popular add-on provdes an administrative function that provides developers (and, optionally, their customers) with simple add/edit/delete forms. Django seems to be a platform well worth considering if you’re interested in web apps in Python. Bill’s slides are available on the GNHLUG wiki.

Thanks to Bill Freeman for a great presentation, to Bill Sconce for organizing the meeting, to Janet for the awesome cookies, and to the Amoskeag Business Incubator for providing the fine facilities.

Notes from ManchLUG’s Launch Meeting

Twenty-seven people attended the first meeting of the Manchester Linux User Group, held on August 24, 2010 at Wings Your Way, Elm Street, in Manchester, NH. Congrats to organizers Kenta Koga and Chip Marshall for taking the initiative to start a group, finding a location and publicizing the meeting!

The meeting was primarily a meet-up, more focused on finding out if people would come out than running a training session. Kenta and Chip made a few announcements at the beginning of the meeting, including mentioning the GNHLUG calendar at (on a Mac!), Leslie Poston’s efforts to bring together a lot of local tech and social media calendars on Google, activities happening at Float Left Labs and their Archimedes Space in Manchester, Jellies at Studio99 in Nashua.

Conversations were pretty local at that point, with a lot of people in a small space with good food and beers and apparently lots to say. What a joyous noise!

Thanks to Kenta and Chip for organizing the event, to Wings Your Way in Manchester for providing the space and to all who attended!

Notes from Ruby SIG, 16-Aug-2010

The New Hampshire Ruby/Rails group met as usual on the 3rd Monday of the month. We met at the New Hampshire Innovation Commercialization Center, a new space near the Pease airfield. Mark Galvin, NHICC’s Managing Director, was kind enough to offer the space for our meeting and tell us about the ICC. Eleven members attended the meeting.

As we often do, we started with a round of introductions. It’s always interesting to find out who’s there and what they’re up to. I mentioned the GNHLUG calendar and Nick plugged the upcoming Rails Rumble. Near the end of the meeting, we plugged the NorthEast RailsCamp, coming up on it’s third meeting, this one in Stowe, VT. 5 alums from previous camps were there, and all loved it. There may still be a ticket or two left, even though the site says zero – you’d better hurry!

We were lucky enough to have two presentations tonight.

Brian Turnbull presented “Interfacing Ruby with C.” He explained he needed to do some automation with a “black box” his company was using, and their documentation consisted of a C API and a DLL. Rather than developing an entire application in C, he used Ruby to interface to the C API and then could develop an easy-to-modify Ruby app. That turned out to be a good idea, as the final product he delivered turned out to be very different from the initial request, and having the ability to rapidly re-develop in Ruby was a success. To show us how to use C to access Ruby and vice-versa, Brian used a simple example of a “leaky bucket stack,” a fixed-length stack that would lose the oldest item as the stack was pushed. It was a great example in that it had enough complex behavior to be useful, while simple enough to explain and translate into C without too much effort. First, we reviewed the pure Ruby implementation. Brian proceeded to build up the equivalent code in C, calling Ruby array functionality and data types where appropriate. He then showed how to configure the C extension from from Ruby, build, compile, debug and run from the ruby command line.

See the example code and slides (I’ll update the URL when available). Also for his more advanced C example.

Brian Cardarella, @bcardarella,, presented his gem, client-side validation, which he developed while working on the “Raise Your Vote” site for the Democratic National Committee. The Raise Your Vote site is intended to assist in voter registration by collecting data online and generating matching PDFs of the voter application. Naturally, 50 states have fifty different forms, with different requirements. He wanted to avoid duplicating the server-side validations with hand-maintained client side code, as the regular changing of requirements and the difficulty of keeping business rules in synch across the two languages would doom the project. He wrote client-cisde_validations to use the declarative validations within the entity models to generate the equivalent Javascript code. Client-side_validations has remarkable depth and breadth, handling nearly all of the common and exceptional types of valiation (Brian notes the few difficult cases in his slides). You can find the code on GitHub (gem code, examples) and the slides here: client_side_validations.pdf

Thanks to Brian Cardarella for travelling all the way to Portsmouth and thanks to both Brians for their fine presentations. Thanks to Nick Plante and Brian Turnbull for organizing and promoting the meeting and the group. And thanks to Mark Galvin and the New Hampshire Innovation Commercialization Center for providing the fine facilities!

Notes from New Hampshire Ruby/Rails Group, 19-July-2010: Redis, Resque, Vanity, Mogotest, Nick Plante

The July meeting of the New Hampshire Ruby/Rails group was held as usual on the third Monday of the month at RMC Research in Portsmouth. Nick Plante was the featured speaker, talking about Redis, the NOSQL database, Resque and Vanity. Brian Turnbull ran the meeting and brought pizzas — thanks, Brian and Nick!

We started off with a round of introductions and speaking a little bit about who we are, what we do, why we’re there. There’s an interesting assortment of backgrounds: a few folks with deep Ruby experience, a number of people transitioning from other languages (Java was mentioned more than once) and some web design folks looking to get a little deeper into the workings. Brian mentioned that the RailsRumble was coming up fast – October 16th – and that seats went quickly once registration for the event was open. Keep an eye out for future announcements.

Nick Plante talked about Redis, Resque and Vanity. You can view the slides here: Redis ( is a NOSQL (“Not Only SQL”) database that has a simpler API (put/get/list keys) than the complex SQL needed for a relational database. It is a “key-value” store that stores flat values (and/or documents, arrays, lists, etc.) with a great deal of speed, high-performance, reliability and scalability. It is ideal as the primary means of access for data on a demanding web site, acting as a cache for underlying relational data or transient data. Nick talked about how he and his partner used Redis and the Resque
Ruby library ( to manage a job queue where the front-end servers posted jobs, many background workers processed the jobs, and the front end could display progress or completion. Nick also talked about A/B testing with Vanity, another package which uses Redis as its backend datastore. Vanity lets you present two different interfaces (hence the A/B) and monitor statistics on how the users react to the differences (do green buttons get better conversion than orange?). Nick wrapped up by showing us some of the code used in Mogotest and how they managed backend tasks.

As a bonus, we got the briefest of tours of what Mogotest can do: it will spider a web site, gathering the content, show you validation issues with the code (HTML and CSS), compare how the web pages look in a number of different browsers (side-by-side or a slick overlay). This can be really handy to include as part of testing a web site. Mogotest has just entered into public beta, during which you can test your site for free. Check it out!

Thanks to Nick for a very interesting presentation! Thanks to Brian for coordinating the event and getting pizza! Thanks to RMC for the great facilities.

Notes from Python SIG, 27 May 2010

The May meeting of the New Hampshire Python Special Interest Group was planned as an informal chat, and there was no dearth of topics! We met as usual (the fourth Thursday of the month) at the Amoskeag Business Incubator ( in Manchester, from 7 – 9 PM. Seven people attended the meeting.

We had a demonstration of a prototype of a video bulletin board system to be used for the community TV channel in Pepperell, MA. It was using a Python script to drive displays including slides in Impress and videos played in VLC. Interesting libraries in use include shlex for parsing command lines and a graphics library whose name I missed to generate the “crawler” at the bottom of the screen.

We discussed the licensing issues with video and audo codecs and the solution that’s provided by Fluendo.

We looked at the new photography management application Shotwell included in the most recent Fedora and Ubuntu distributions. Shotwell is written in the new Vala language that “aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C” and Bill noted another derivative language, Genie, which has a style far more similar to Python. (You wondered what all this had to do with Python, didn’t you?)

We looked for some solutions for accessing the output of Java classes from within a Python application., citing pages like this and discussing the pros and cons of the solutions available. We’re looking forward to a future meeting where we get a report on how it comes up.

As always, a good time was had by all. Thanks to Janet for yummy chocolate chip cookes and frosted brownies. Thanks to the Amoskeag Business Incubator for the use of the facilities, to Bill for organizing and moderating the meeting. and thanks to all for attending participating.

HowTo notes: installing REE, Passenger, Ruby on Rails on CentOS5

Recently, I installed Redmine, the Rails-based project tracker,  on an existing virtual private server, running CentOS 5 Linux and an assortment of LAMP applications and web sites using Apache, PHP and MySQL. I chose Ruby Enterprise Edition (REE), an optimized and high-performance version of Ruby, and Passenger, an Apache module to connect to Ruby. Here are the steps I followed, as a reference and in hopes it might help others:

  1. Log onto the box via ssh. As a good practice, I run as an unprivileged user, and use sudo only when superuser rights are needed. So, download the files and un-tar them and read the READMEs and run the processes as a regular user, switching to root via sudo only when the rights are needed.
  2. Download and install Ruby Enterprise Edition. Today, that’s:

    but follow the instructions you’ll find at for the latest. Those instructions will have you un-tar the file and then run the installer.

  3. Install the tools needed to build Ruby Enterprise Edition. If you run the installer, it will prompt you for missing tools. In my case, I needed to:
    sudo yum install gcc-c++ make patch zlib-devel openssl-devel readline-devel
  4. If you’ll be using mysql, you’ll need the native code to build the matching gem. REE attempts to build gems for MySQL, SQLite and PostgreSQL, so choose your flavor and issue the appropriate command like:
    sudo yum install mysql-devel

    or postgresql-devel or sqlite-devel as appropriate.

  5. Follow the instructions supplied by the REE installer. They did a nice job on that. To install Passenger when I was done, some additional source code files were required:
    sudo yum install httpd-devel apr-devel
    sudo /opt/ruby-enterprise-1.8.7-2010.01/bin/passenger-install-apache2-module
  6. Once again, follow the prompts to add the proper load module and path commands to your web server configuration, add a configuration file for your site, and you’re ready to start installing your site’s code.

NOTE: It wasn’t the case with my particular host, but you may need to adjust your SELinux settings, if you’ve got SELinux enabled. See the post at and look for “SELinux” for some ideas.

Git presentation, CentraLUG, 3 May 2010

The Central New Hampshire Linux User Group will meet at its usual place and time, NHTI Library, Room 146, 7 PM – 9 PM. Directions can be found at

In keeping with the tradition of 3-letter presentations (CSS, Vim, SQL, er, HTM), I’ll talk abut Git, the distributed version control system. Git was originally developed by Linus Torvalds for the Linux kernel and is licensed under GPL2. It’s become popular in Rails development as well, especially with the hosted site Similar to Mercurial [Updated link, Ed.] or Bazaar, Git is a DVCS – a distributed (or Decentralized) version control system or revision control system. DVCSes introduce an easier way to work on shared project. We’ll talk about how DVCSes work and Git in particular, look at some of the available references, handy cheatsheets, and sites to host your DVCS.

As always, we’ll have some time for introductions, job postings, folks looking for work, questions and hopefully answers.

Hope to see you there.

Some additional links, besides the ones I posted to the announcement above:

Scott Chacon is the authority on Git. Check out his book, his tweets, his online reference, his PDF, and Why Git Is Better Than X.

The Git wiki is a good source of reference materials.

A great diagram and discuss about using git branches in a real development and production environment.

PySIG notes, 25-Feb-2010: CSS

Six people braved miserably wet weather to attend the February meeting of the Python Special Interest Group, held as usual on the fourth Thursday of the month at the Amoskeag Business Incubator.

We had a brief set of introductions and announcements of upcoming meetings. We hope to host a discussion of PyCon 2010 presentations by PySIG members next month; details to be worked out, stay tuned.

I’ve seen this presentation seven times and I think this was the best. Along with the Introduction to CSS, I added a “sneak peek” preview of HTML5 and CSS3 and discussed the support (finally!) for CSS 2.1 in Internet Explorer 8 and how that meant the leading browsers all had support for some intriguing features as outlined in the SitePoint book, “Everything You Know About CSS is Wrong!” There was lots of give and take with the audience, and a few side trips off-script to cover an issue someone wanted to know more about, and a war story or two. Ben Scott was heckled in abstentia.

Slides can be found at

Thanks to Bill for arranging and promoting the meeting, to the Amoskeag Business Incubator for the fine facilities, to Laura and the Hopkinton High girls basketball team fundraiser for the M&M cookies, and to all who attended and participated.

Notes from NH Ruby/Rails group, 15-Feb-2010, Brian Turnbull and Object Oriented Programming

Despite being President’s Day, February 15th’s meeting of the NH Ruby group got 14 attendees. Held as usual at RMC Research in Portsmouth and hosted by Tim, a good time was had by all.

There was a round of introductions so everyone got to know each other. Announcements including Leslie Poston’s NHTweetup calendar, and the Rails Camp NE. Rails Camp is only a month away and down to a few last seats – don’t miss it!

Brian presented “Object Oriented Programming” — you can find the slides here. The presentation was a good high-level overview of OOP, as seen from the Ruby perspective. Brian noted ways in which Ruby differed from C++ and Java. There was some very good discussion and some teasers of future presentations: Mixins were thought too complex to try to squeeze into this presentation, and Brian is developing another talk, “The Complete Class,” which will include a discussion of all of the methods, properties and attributes a class should have to encapsulate best practices. I’m looking forward to both of those discussions.

Brian finished with two puzzles. Having covered the principles of OOP, Brian handed us an interesting problem to code: a 3×3 sliding tile puzzle. It’s great to see actual code being developed at the meetings, and it was a good challenge in that we all understood the problem domain. We broke into small groups and started modeling the problem. At the end of the evening Brian presented his model and code.

The bonus  challenge involved taking Brian’s model and solving a particular puzzle in the fewest steps possible. I worked with a team that took this one on, repeating the classic steps of invoking recursion, discovering the limits of Ruby on the Mac for stack overflows 😉 and failing to properly store and retrieve states and scopes diving in and out of the recursion. While we didn’t finish the solution, we had some great discussions on the various ways to solve the problem and all learned more about working with Ruby, which after all is the point. Brian also posted his solution to finding the shortest steps to solving this problem.

Thanks to Tim and RMC Research for hosting us in their fine facilities, to Brian for organizing, pizza and the presentation, and to all for attending and participating!

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.