Notes from NH Ruby/Rails Group, 19-February-2009: Josh Nichols, Jeweler, Brian Turnbull, Rails 2.3

The New Hampshire Ruby / Rails group met as usual at the RMC Research offices in Portsmouth. Thirteen people attended the meeting, a suspicious number of them from Maine. We started, as we often do, with a round of introductions.

Josh Nichols presented RubyGems and You. A former Java developer, started working with Ruby about two years ago, got a “real” Ruby job about 6 months ago, laid off 2 months ago, currently “employment independent.” Josh presented an excellent overview of how gems work, how they fit into the logic of Rails apps, how they are distinguished from plugins, and how gems can be created. He went on to talk about the two primary repositories, RubyForge and GitHub, and talked about the benifits and liabilities of each. This was all pretty much background for his presentation of Jeweler, a set of scripts that can generate the framework needed to build a gem, with support for pushing it directly up onto GitHub, automating the bumping of version numbers (patch, minor and major versions). Josh made a very clear presentation of the skeletal files that were created and touched on issues with RSpec testing, rake scripts, how to tie in library paths, vendor-izing your gems. Whew! A great amount of material covered quickly and well. Thanks, Josh!

Brian Turnbull did a presentation on the new features of Rails 2.3: Engines, nested transactions, nested forms, nested attributes, dynamic and default scope, other changes (multiple conditions for callbacks, HTTP digest authentication, lazy loaded sessions, localized views, and more!)

Brian then did a short presentation on Rails Metal. Metal runs on top of Rack, and is a tool you turn to when the full Rails stack is too complex or too slow. There was some interesting discussion on how Metal can fit into the calling stack, short-circuiting calls that didn’t need the full Rails process.

Demo version: http://github.com/bturnbull/bturnbull-metal-demo

You can view their slides via SlideShare and also view a WebEx video of the event (see the post’s comments) at http://nhruby.org/2009/2/20/ruby-gems-jeweler-and-a-rails-2-3-preview

Thanks to Josh for the trip up from Boston and the great presentation. Thanks to Brian for two cool presentations. Thanks to Tim Golden and our hosts at RMC Research for the great facilities and for broadcasting the presentation via WebEx this month. Thanks to Nick for herding the cats and ordering the pizza and making the announcements and giving away a couple of cool O’Reilly books. Thanks to all for attending and participating!

Next month: Ted Roche presents an introduction to Cascading Style Sheets, Nick Plante presents Sinatra. Hope to see you there!

Notes from CentraLUG, 2-Feb-2009: Open Source Business Models

Fourteen people attended the February meeting of the Central New Hampshire Linux User Group, a chapter of the Greater New Hampshire Linux User Group. We held our meeting at the usual place and time: the first Monday of the month at the New Hampshire Technical Institute Library, Room 146. Formal meeting starts at 7 PM. Gathering and networking often starts a half-hour earlier.

A few of us met at Panera Bread in Concord before the meeting for dinner and geek talk. We’ll try to make this a regular thing, if people want to.

Before the main meeting, maddog showed off a video he had created, inspired by some recent demonstrations of Open Source software he had seen. Using nothing buy Open Source software, including Inkscape and Kino. maddog emphasized that he’s not an experienced cinematographer, nor had he much experience with the other packages, but that making the video was simple and straight-forward. And the results quite amusing. Look forward to a future post with a link to the video!

We were fortunate to have a variety of attendees to discuss the topic of “Open Source Business Models.” After a brief introduction of what the LUG was about and where to learn more, I opened the floor to the attendees for discussions, and discuss they did!

We talked about the Brazilian music scene, Microsoft EULAs, the difference between Free Software and Open Source software, some great Open Source success stories, like the Project.Net software. There were questions on the fine points of licensing, comments on the openness of the Java Development Kit and runtimes, and much good discussion.

At the end of the evening, two lucky attendees got to pick from the assortment of books we’d been provided by generous publishers. Using the formula of:

(14*rand()).to_int

in interactive ruby and counting off around the room (I started with zero and we went clockwise around the room, a surprisingly difficult process with cats). Mark and Bill each won a book, congratulations! The next CentraLUG meeting will be the 2nd of March. Stay tuned for an announcement of details. Thanks all for attending and vigorously participating. Thanks to Bill for bringing the projector, though we didn’t need it.

Notes from Python SIG, 22-Jan-2009

The twenty-second of the month was the fourth Thursday, the usual night for the Python Special Interest Group to meet at the Amoskeag Business Incubator in Manchester, New Hampshire. Thirteen attendees made it to the January meeting, making PySIG one of the more popular regional/topical meetings of the Greater New Hampshire Linux User Group.

As usual, coordinator Bill Sconce had a printed agenda with lots of news to go over. We had a round of introductions, though it was mostly a gathering of the regulars. We talked about Gotchas! — those little surprises that pop up while working through the day — and “reverse-gotchas!” — the ah-ha moments that bring enlightenment.

Kent Johnson presented his regular Kent’s Korner presentation on context managers and the ‘with’ statement. Kent’s notes for this and all past Kent’s Korners can be found on his web site. The with statement, along with decorators and generators (see how the KK sessions build upon each other!) can make a very powerful and very pythonic addition to writing Python code.

Arc Riley made the main presentation, on writing extensions in C. Arc was apparently one of the very first programmers to actually attempt to build an extension from scratch in Python 3.0, as he found that some of the key documentation was missing and some of the most important declaration about structures can only be found by reading the source code of Python itself. Arc documented his adventures for us, found a bug report to the Python folks, and provided the group with a very useful document of where the gotchas are, and some very useful bookmarks. The last link includes Arc’s notes as well as the C and Python code for the sample extension.

Thanks to Arc and Kent for great presentations, to Janet for the cookies and Ray for bringing the milk. Thanks, as always to Bill for running the meetings and to all for attending and participating!

Ideas worth repeating

“We reject as false the choice between our safety and our ideals.”

President Barack Obama, 20 Jan 2009

“They who would give up an essential liberty for temporary security, deserve neither liberty or security.”

Benjamin Franklin, 1775

Notes from NH Ruby Group, 15-Jan-2009: Jonathan Linowes

Jonathan Linowes was kind enough to drive from “the other side of the Notch” all the way down to the seacoast to present to the New Hampshire Ruby Group on the 15th of January (note that the NH Ruby group has moved their regularly scheduled meetings to the third Thursday of the month). Fourteen members attended the meeting, which started with a round of introductions. Pizza, soda and T-shirts were provided courtesy of EngineYard — thanks!

A typical scene at a Linux user group meeting for the first ten minutes of a meeting to be consumed with the speaker struggling to get his X windows display to sync up with the projector. I’m beginning to suspect that the Ruby group equivalent is for the speaker to discover he’s packed the wrong DVI-mini-DVI-HDMI-Video-VGA adapter and no one else has the right video adaptor for his MacBook despite a half-dozen machines present. I wonder if Apple made a mistake by changing this adaptor in every model.
ReviewRamp is Jonathan’s project – a SaaS web site for a group to bring in documents, route them through their own defined process, and approve/disapprove/select documents. Jonathan offered examples such as business plan reviews, marketing plans and job applications. Designed to look as much like a desktop application as possible, ReviewRamp has a simple GUI, with templates and wizards to make it a couple of clicks to process. Under the hood, Jonathan talked about the architecture, which includes RESTful protocols, and a design intended to scale to thousands of projects, hundreds of submissions and a handful of reviewers per project. Unlike many JavaScript-only sites, RevewRamp works well with JavaScript disabled; sweetened with JavaScript enabled. ReviewRamp is publicly in beta. Jonathan presented some slides of the models: reviewers, projects, pages, subpages, fieldsets. This last was a segue into the 3rd presentation: fields are generated via metadata for each project, but the database tables don’t change for each project, so each project has virtual tables vis Jonathan’s DynamicTable design.

Next, Jonathan had a presentation on “Cucumber: How I Slice It” Jonathan had worked PHP and other languages before, was very attracted by Ruby as a new language and the philosophy of testing, testing and more testing. Unit-testing, test-driven-design, behaviour-driven-design. Jonathan also pointed us to Brandon Keepers presentation as an excellent starting point.

Jonathan showed us some of his Cucumber scripts, which include a lot of pretty cool extensions to the base, like {show me} to actually end a test by launching a browser so he could visually verify a result. It was apparent that Jonathan really took to the testing regime, adding extensions like “He” or “She” instead of always including “The current logged in user” or “the current project”

Should you use RSpec or Cucumber? Both, according to Jonathan: each has strengths and weaknesses. RSpec is more tuned to unit-test individual functions where Cucumber is more tuned to describing behavior and outcomes.
Check out

cap deploy:features

to run Cucumber on the deployed app (typically, you’d do this on a staging server, not a production server)
Shows some example Cucumber scripts. They describe in English the point of the test, and use keywords (“GIVEN” “WHEN” “{actorname}”), an action and an expected result. This is actually parsable Ruby code that defines fixtures and features and processes defined within the story runner. It’s not just a requirement, it’s actually the test as well!

Finally, running out of time, Jonathan jumped into his DynamicRecord presentation, where he had developed a method that was ActiveRecord compatible so that it could be integrated in the rest of a standard rails app, but actually queried against virtual tables that were created on the fly rather than actual tables on disk. Interesting stuff, and I’m looking forward to seeing this code pushed into OpenSource, Jonathan’s eventual goal.

Thanks to Jonathan for the great presentations, to Nick for running the presentation, to Tim for hosting the facilities and attempting to webcast the presentation, to Engine Yard for the pizza and T-shirts, and to all the members who made it to the meeting!

You can download the 3 presentations from the NHRuby site here: ReviewRamp, Cucumber, DynamicRecord, or view them online (Flash/JavaScript required) here.

GNHLUG in 2008, a retrospective by the numbers

I’ve added a link to the GNHLUG PastEvents page that provides a comma-separated file listing all the events from calendar year 2008. Some interesting highlights:

  • Despite under-counting or -reporting of many events, we recorded attendance of 589 people, total, at GNHLUG events. This looks to be down a bit from last year, but I know I didn’t post as many numbers as last year. And it’s almost the same as 2006. Worth watching.
  • The best attended event of the year (30) was the GNHLUG cookout. Thanks to Bruce Dawson and Carole Soule for hosting the event!
  • Tied for second (at 22) were:
  • The bronze medal goes to Máirí­n Duffy’s Photographic Prowess (MerriLUG ,20)
  • Honorable Mentions:

In terms of cumulative attendance, MerriLUG was on top as usual:

This is certainly a measuring issue, too: I record CentraLUG’s numbers every time, but many groups only infrequently post their numbers. Finally, by average attendance, a few numbers change, pointing out the many unreported ??? posted to the web page, and also reflected the varied numbers of times each group met:

  • DLSLUG: 16.25
  • MerriLUG: 14
  • PySIG: 10
  • SLUG: 7.67
  • MonadLUG: 7.13
  • CentraLUG: 6.92
  • RubySIG: 5.33

If anyone would like to work with the data, you’ll find the CSV linked here (below the heading for each year, a link labeled “CSV format”) or linked directly off the bottom of individual year’s pages: 2008, 2007, 2006, 2005. And if anyone is really into it, I’ve got an OpenOffice.org spreadsheet I’d be glad to share.

Notes from Python Special Interest Group, 17-December-2008

Six folks attended the December meeting of the Python Special Interest Group, held on the irregular third Wednesday in December to allow for the festivities next week. (We normally meet the fourth Thursday, same place, same time.)

There wasn’t a formal agenda, and discussion was first the ice storms of last week and everyone’s power status.

I talked with Bill about setting up my new Sansa player with Rockbox and using gPodder in Fedora10 to sync music. The gPodder Podcast client can sync with using the standard file-based method or by using the Media Transfer Protocol popular in many players. To run with gPodder, I needed to install libMTP and PyMTP (there’s a Python connection!) I also discovered while importing RSS feeds that there’s a bug in Fedora 10’s version of Mark Pilgrim’s awesome feedparser, fairly easy to patch, documented here. It’s an arguable bug; it may be that feedparser throws an error instead of behaving more gracefully when hander RSS that might not be fully valid, in this case apparently a bad Unicode character. Perhaps not fully following Postel’s Law, paraphrased “be conservative in what you do and liberal in what you accept.” Is ignoring malformed Unicode too liberal? A philosophical question, perhaps. I noted that the RSS feed that fails in gPodder and from the Python command line actually passes the http://feedvalidator.org tests. Hmm.

Arc had sent a link, “If Languages were Religions,” which included the suggestion, “Python would be Humanism: It’s simple, unrestrictive, and all you need to follow it is common sense. Many of the followers claim to feel relieved from all the burden imposed by other languages, and that they have rediscovered the joy of programming. There are some who say that it is a form of pseudo-code. ” Read the whole post; there are some good ones!

Bill Freeman had an idea he’d like to float for a project to avoid name contention issues, using a naming scheme similar to Java’s com.sun…. namespace for individual projects. Kent dug around in the comp.lang.python archives for some previous threads on the subject to review what had been said on the issue before.

Kent wanted to talk about Python 3.0! Shawn had sent a link to the list for Python porting resources, but wasn’t able to make the meeting. We discussed some of the issues with porting 2.x Python code to Python 3.0 and tested out the 2to3 program. Arc and Matt arrived and joined in the conversation. We first converted the canonical “hello world” program and worked up to Bill’s telephone list program, Arc suggested jinja, and an unpublished project that Kent had been working on involving recognizing human languages, each of which had gradually more and more complex issues. The 2to3 program won’t always make working code, but it does a fine first pass in making all of the well-known changes in converting a 2.x program to 3.0. In running the programs through 2to3 and examining the results, the group had a good discussion about some of the syntax and structural changes in 3.0

Thanks to Bill Sconce for organizing the meeting and bringing the milk, to Janet for the wonderful airplane cookies, to the Amoskeag Business Incubator for providing us with the great facilities and to all for attending and participating.

Rails Launch Checklist

Robby on Rails posts a thoughtful “Launching Ruby on Rails projects, a checklist,” a handy list of things to be thinking of from day one in a project.

Notes from CentraLUG: 1-Dec-2008

Five members attended the December meeting of the Central New Hampshire Linux User Group, one chapter of the Greater New Hampshire Linux User Group, held as usual on the New Hampshire Technical Institute Library Room 146. (Note that there will not be a January meeting at NHTI, as the facility will be on break.)

A good time was had by all. We discussed and demonstrated the new Fedora 10, released on 25-November. Attendees were impressed with the depth and breadth of the Network Manager, version 0.7.0. We reviewed the dialogs with configuration for wireless, wired, broadband mobile (cell), DSL and VPN configurations. Bill Sconce did some Googling and reported that Network Manager, the application, was available for several other desktop managers, including his favorite, Fluxbox.

We also admired the updated “Monitor Resolution Settings” available off the System|Preferences|Hardware|Screen Resolution GNOME menu. In combination with the latest X.org, the interface gave us the ability to detect the projector and adjust the laptop’s screen display and arrange the geometry of the two outputs, either mirroring them or placing them side-by-side or top-to-bottom. Very slick!

We talked about the ease of upgrade: I had Fedora 9 installed on this laptop and used the Fedora-supplied “preupgrade” package to stage the laptop and perform the upgrade very easily. A restart into the new kernel and confirmation that the /etc/fedora-release version was correct, and I was upgraded! I have never seen an easier upgrade in a RedHat-family-based system.

We discussed the challenges in digging up solutions to more complex troubleshooting problems, not Fedora 10 related. Mark talked about a problem it took him months to track down that eventually pointed to remarking out a single module in rc.d. Dave referred us to A.P. Lawrence.com where he was able to come up with the magical incantation to correct the timezone settings on an SCO box.

Meanwhile, back at Fedora 10, we looked at the new OpenOffice.org 3.0 and talked about some of the compelling features in the new version. The ability to edit PDF files was something that generated a lot of interest. Bill pointed out that there is no concept of text flow within a PDF, so while you can correct a typo, you can’t expect the text to be reflowed.

There were questions on OO.o compatibility with other office packages, like MSOffice and WordPerfect. Novell has come out with a translator to read Office-BASIC macros and translate them into OpenOffice.org’s StarBASIC. Version 3.0 can apparently read the new proprietary Office DOCX documents. We talked about where to find good resources for OpenOffice.org (suggestions welcomed!). Bill mentioned that Jim Kuzdrall’s presentation on OpenOffice.org styles (see Sept 20, 2007 for links to notes and slides) was a real help in him getting OpenOffice.org working. We also mentioned that Solveig Haugland’s blog was a great resource for more information.

Thanks to Bill Sconce for bringing the projector, to all for participating and to the New Hampshire Technical Library for the great facilities. Note that there is no January meeting planned at the moment, but keep an eye out for a February announcement.

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.