Tag Archives | nhruby

Notes from NH Ruby/Rails, 17-Jan-2011: Brian Turnbull, OmniAuth, Nick Plante, Mirah

Seven members attended the New Hampshire Ruby / Rails group meeting held on 17-January-2011 at the New Hampshire Innovation Commercialization Center (NH-ICC). We had two presentations: Brian Turnbull talked about OmniAuth and Nick Plante showed a project he’s doing with Mirah on the Android platform.
Brian Turnbull is an engineer working for ARRIS and injects Ruby into his build tools whenever he gets the chance. A recent project required authentication against multiple providers and he did some research on OmniAuth. Brian presented a slideshow explaining the basic concepts of authentication and how they’re implemented in OmniAuth. Apparently, OmniAuth was the authentication method of choice during the most recent RailsRumble, used by most of the contestants. Brian outlined the process needed for working with an existing provider and demonstrated it with clear and simple code. He followed that up by showing how to build your own custom provider and authentication strategy. Brian’s sample code can be found on his github account.
Nick Plante has been working on an Android rich client app as part of a web-based social application that’s soon to launch. Nick told us that working on Java for Android has reinforced his love of Ruby. There’s not yet a good port of Ruby to the Android platform, but he has been impressed with the Mirah language, a hybrid solution that compiles to bytecode and runs natively on the JVM. He has developed a Ruby generator called protoform to construct the skeletons of a Mirah app. He gave us a tour of the components and built a simple “Hello, World” app, deployed and ran it on his Android VM.
Thanks to Brian for organizing the meeting and for the OmniAuth presentation, to Nick for talking about his Mirah project and to the NH-ICC for providing the fine facilities.


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 http://github.com/bturnbull/padpaws for his more advanced C example.

Brian Cardarella, @bcardarella, http://bcardarella.com, 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: http://www.scribd.com/doc/34712184/A-Quick-Introduction-to-Redis-NH-rb. Redis (http://github.com/antirez/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 (http://github.com/defunkt/resque) 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.


NHRuby, 17 September: Games in Ruby

The New Hampshire Ruby / Rails Group announces the topic of their September meeting: Games. It sounds like the games are just an excuse for us to have problems to solve by actually writing code in Ruby. Not a bad idea — trick us into coding by having fun? Radical.


More links from NHRuby.org’s August dinner meeting

I was finally able to decode some of the scrawling notes I took at the NHRuby.org August dinner meeting, and found a couple more resources worth looking at. With our theme of “Where’d you learn that?” I’d recommend you check out these resources:

Dave Thomas, co-author of the original Pragmatic Programmer and proprietor of the same-named shop, has a series of videos called “The Ruby Object Model and Metaprogramming” that one attendee thought was well worth watching.

Another recommendation was to check out Topher Cyll’s book, “Practical Ruby Projects: Ideas for the Eclectic Programmer” for some interesting insights into Ruby.


Notes from NH Ruby group, 20-Aug-2009, “Where’d you learn that?”

Eight folks enjoyed an excellent dinner at The Rosa Restaurant. We had a private room upstairs where we could woot and yell over each other and tell geek jokes without inhibitions, not that that has ever stopped us before.

Nick Plante mentioned Rails Rumble coming up this weekend. Watch for some incredible apps coming from the Rumble. Can’t wait to see the winners.

Adam Bair brought along two books, Kent Beck’s “Smalltalk Best Practice Patterns” (ISBN 978-0134769042) and Martin Fowler’s “Refactoring” (978-0201485677). Adam credit both books as being very helpful for his practice in the past several years where he has had to refactor a lot of code in rescuing lower-quality Rails projects.

Adam also mentioned an inspirational presentation by Marcel Molina, Jr. at Ruby Hoedown 2007 called “Beautiful Code” (http://rubyhoedown2007.confreaks.com/session09.html) – Adam recommends the higher quality videos as they include video/slides side by side – and also browsing much of the confreaks.com site for some great videos.

Russ talked about Peepcode videos (http://peepcode.com), which he really appreciates. In particular, he mentioned the most recent, Advanced Command Line, helped him debug an unusual problem he was having with one remote client whose shell behaved incorrectly. He’s used inspiration from that video to reconfigure the way he uses his shell. Russ also mentioned Ryan Bates “RailsCasts” (http://railscasts.com/) as very useful, and in particular, thought that the three part series on forms (link updated; thanks, Russ!) changed the way he developed Ruby apps.

I talked a little bit about “The Well Grounded Rubyist” (ISBN 979-1933988658) by David Black, which has helped me fill in some of the background of how and why Ruby behaves the way it does. I also passed around Jason Clinton’s “Ruby Phrasebook” which is a handy book of recipes on how an experienced Rubyist is likely to solve common problems like parsing config files or processing XML.

Nick mentioned that he’s using the unix screen command to do screen-sharing for remote pair-programming and you could see the lightbulbs go off over people’s heads (“That’s my payoff for tonight!” one attendee exclaimed.) He’s also working with EC2 instances and is fired up over how simple and powerful they are. Nick promised a followup, perhaps a demo at a future NHRuby meeting, and Casey mentioned that there’s someone local who’s been doing demos on the Amazon Web Services offerings – we hope to come up with some contact info and see if we can schedule a presentation.

The group also talked about how, as a group, we might contribute to one particular open source project. A couple of ideas were batted around. I look forward to hearing more about this idea.

The night’s theme was “How do you know that?” and I asked about how people are keeping up on all the news about what’s happening. We didn’t really come up with a list of links or blogs or news sites, so if you think of any now (or have your bookmarks handy for sharing), I’d appreciate you passing them on and I’ll include them in the meeting notes.

Thanks all, for a fun dinner amongst friends and some inspiring ideas!


NHRuby, August 20th, The Rosa Restaurant

Some of the best user group meetings I have attended have been those with the most relaxed format, where the group pretty much steers the conversation to whatever is most interesting to them.While the formal presentations by experts are great for getting some deep and rich information across, the wide-ranging discussions of an informal meeting can stretch the breadth of your knowledge.

So it is that the August 20th meeting of the New Hampshire Ruby group will take place at 7PM at The Rosa Restaurant on State Street, Portsmouth, NH. We’ll have a good meal and swap ideas about where to learn more about Ruby. The announcement. more details and directions can be found on the NHRuby.org web site. Hope to see you there!


Notes from New Hampshire Ruby User Group, 25 June 2009: Pat Allen, Thinking Sphinx and Casey Rosenthal SASSiJS

Twelve people attended the June meeting of the New Hampshire Ruby / Rails User Group , held on the 4th Thursday of the month ( we usually meet on the 3rd Thursday) at RMC Research in Portsmouth (Thanks to RMC and to John for hosting the meeting!)

Nick Plante was our master of ceremonies. As is the custom, we made a round of introductions to find out the most of the folks were “from away.”

Pat Allen put on the first presentation, on Thinking Sphinx. Thinking Sphinx is a Ruby library (not just for Rails) that allows Ruby applications to work with the Sphinx full-text search engine. Pat presented a slightly shortened version of the presentation he gave at RailsConf, and the presentation was clear, engaging and interesting. Participants had lots of questions to ask on search technology, word stemming, project status, what it’s like to be a Freelancing God, what being the lead on a popular Open Source project is like, what’s a kilometer, and more, and Pat’s answers were insightful. Check out (pun intended) the source on github, the support on Google Groups and Pat’s guide to using Thinking Sphinx on Peepcode.

Pat also took a moment out to plug his upcoming Rails Camp, a not-going-to-make-a-profit weekend get-together in BarCamp/Unconference format for 30-ish people at Bryant Pond, Maine. It sounds like a great event and a nice location and a price that can’t be beat: $120 for 3-nights, 3-days food, lodging and conference. Get details and consider signing up at http://railscamps.com/#ne_july_2009

Casey Rosenthal asked us, “What are style sheets for?” a number of times during his presentation, for good reason. Casey talked about SASS, Syntactically Awesome Style Sheets, a part of HAML and his reimplementation of SASS in Javascript, SASSiJS, sounds like “sausages” leading to all kinds of predictable jokes. But the topic was thoughtful, intriguing, interesting, and controversial. SASSiJS actually allows a .sass file to be downloaded as part of the HTML file, with similar syntax to a stylesheet link, and a JavaScript file that interprets the .sass file into CSS and applies it to the HTML document. Discussion was far-ranging and insightful: “What’s this good for?” “Would designers use this to make their CSS DRY?” View the source on GitHub at http://github.com/clr/sassijs/tree/master.

Thanks to Pat and Casey for their great presentations, to Nick for organizing, and to John and RMC for the facilities.


Notes from NH Ruby/Rails, 21-Oct-2008: REST, Atom and Plugins

Eight people attended the October meeting of the NH Ruby/Rails group, held as usual at RMC Research in Portsmouth on the third Tuesday of the month.

The meeting started with a general chat session where a range of issues
were covered. Quite a discussion about computer industry trade books was
a notable item. A round of introductions followed, including several new

Brian Turnbull made the first two presentations. REST, the Representational State Transfer mechanism (slides), is based on a PhD dissertation by Roy Fielding, and describes a URI-naming technique that “REST emphasizes scalability of component interactions, generality of interfaces, independent deployment of components, and intermediary components to reduce interaction latency, enforce security, and encapsulate legacy systems.” (from Fielding) Cool stuff, and essential to understand for those developing modern web apps.

Brian also talked about the Atom Publishing Protocol (slides), which describes a scaleable way of managing and distributing documents using RESTful interfaces.

Nick Plante had the next presentation, on Demystifying Ruby Plugins. Nick and Brian had spent the past several weeks putting together the very successful RailsRumble — which I hope they’ll post some more about soon – and so were a bit hard-pressed to have fully-baked presentations ready for the SIG, so this presentation was more of an open conversation on “what should we say about building plugins,” a perfectly acceptable topic for a user group meeting, btw, imo. (Nick will be giving the full presentation at next week’s “Voices That Matter” conference in Boston – good luck, Nick!) Nick talked about how plugins differ from gems, the history of “add-ons” in general for Ruby and Rails, and what design considerations went into building a plugin. Then, we ran some basic code to show how a plugin would work. Excellent overview!

Thanks to Scott and Tim for promoting and hosting the meeting, to Nick and Brian for their presentations, 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.