Tag Archives | rails

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.

NH Ruby Group meeting video from 30-April-2009

Thanks to Tim Golden for arranging a WebEx recording of our meeting last Thursday. It’s nowhere near as good as being there, but it does leave more pizza for the rest of us!

https://rmcres.webex.com/rmcres/lsr.php?AT=pb&SP=MC&rID=12020837&rKey=948CB787A0A2E83B

See my notes from the meeting, here.

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.

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.

Voices That Matter, Professional Ruby Conference 08

Warning: Draft nonsense, needs spell-check, grammar and thought completion.

Voices That Matter, Professional Ruby Conference 08, Sheraton Boston, November 17-20, 2008. Beautiful facilities, good good. This is a brand-new conference, version 1.0, and Obie Fernandez was the lead at designing the technical content and format, rather radical schedule: 3-30 minute sessions with 10 minute breaks, long break, 2-30 minute sessions, lunch, 5-30 minute sessions. This means the sessions are tight: experts brain-dumping for 30 minutes

Pre-Conference Sessions

AM, Pat Maddox, RSpec and Behavior-Driven Development: excellent overview of BDD, leaped into RSpec with an expectation that users were familiar with Ruby and TDD, which might not be appropriate for a crowd at a pre-conference. Excellent use of a pre-cooked set of examples (coding a blackjack app) with the tests already written so devs only need to fill in code one test at a time to satisfy the requirements, “Red, Green, Refactor” Worthwhile session. Around two dozen attendees.

PM, Hal Fulton, Ruby Basics. Co-Author of “The Ruby Way” an excellent introduction to the language for folks not familiar with it. A few less attendees, as there was a parallel session by Russ Olsen, “Fluent in Ruby” Hal knows his stuff, was comfortable and receptive to questions. We did some ad-hoc coding. He had an excellent, and again, simple, example that let us concentrate on the code and not get stuck in the business problem: reading a table of text into a set of records, manipulating and sorting them. An incremental set of examples introduced a couple new challenges to each example, and then a couple of new ways to use Ruby, new commands or techniques, to solve those problems. Very clear. A very helpful session for getting comfortable with Ruby.

Day One: attendees 80
Keynote: Obie Fernandez: (http://blog.obiefernandez.com/) war stories of success at Hash Rocket. Pair programming with pairs of keyboards and mice. 14 people total. Keep small (14, boutique). No interviews (week work on site), Guest Star program. References: Agile Manifesto, 37 Signal’s “Get Real,” Rails Rumble 2007. Small Releases often. “Working software over comprehensive documentation ” from Agile Manifesto. “Visual Design First:” vs. Jakob Neilson recent blog complaining that agile was a threat to usability. Obie’s Orject mgmt: concepts and requirements, initial design, Phase one implementation (2-3 weeks), user acceptance, interation, release.

Stoires are Units of work, “storycarding” (SCRUM) estimate level of effort in points system, 1 -4 points (max a day or two), 15- 25 points per week for a team of 2-4 developers, summarize stories,

Master Services Agreement: general contract: billings, liabilities, copyright, trademarks ownership – this has to do with what?

Pivotal Tracker: free. tracks backlog and current iteration.

Standup meetings. for smaller projects. “Pivotal” standup for larger groups: what did you do yesterday? What did you do today? What…

Ben Koski, NYT Riding the Rails case study… bkoski@nytimes.com
Election feeds. AP supplied 153 text files, colon-separated, clomposite-key difficult to parse, used LOAD DATA INFILE, INSERT – REPLACE, survived onslaught by page aching, activeController page integration to generate all possible pages, they “baked it out” and lobbed files via ftp to the actual NYT web servers.

End game analysis: strengths: rapid start, tweak-friendly, activeRecord SQL customizations, web code works on command line, self-contained deploys. Weaknesses: rails vs. nytimes,com infrastructure (SUN), Solution: host on EC2! (eight instances!) , deployments, admin interfaces (vs. Django!),

Thomas Enebo, Sun Microsystems
You don’t have to be a Java programmer to use JRuby: It’s just Ruby! (maybe a tm!). Very, very compatible with 1.8.6, using Rubinius, continueing integration. Fixed 1500+ bugs last year. JRuby 1.1.5 released two weeks ago. improved caching, better performance. Downsides: native-threaded, arguably not a bug but a feature. No native ‘C’ extensions, started with porting popular libraries ported to native Java. No continuations (does anyone use them?) Foreign Function Inteface (FFI) portable across implementations, unlike extensions, most extensions just wrap a library. Started in Rubinius, then joint API discussions, supported in 1.1.4. Example. JRuby 1.8 bigger libraries done. M17N – multinationalizations. Why Java???!!!?!?! Tuned over a decade, generational, super-optimization, native on every platform. native threads, tools, libraries. java is Everwhere, Less political resistance (“JRuby is just another Jar file”), wider database suspport, Java-style deployment, bundle into WAR file, or Glassfish Gem – entire app server in a 4 Mb gem, Ruby-style deployment to GF Application server: gem install glassfish, glassfish . {Lame text” for an example: thread-safe JRuby on Glassfish v2

Mongrel, Matt Pelletier Partner/CTO EastMedia, web-mobile development shop, NYC, funded Mongrel dev for OpenID. Wrote Mongrel book. Zed Shaw, SCGI railsrunner, limited support, webrick slow. Translation (cgi) slow. Full HTTP server, play well with others. Design Goals: Security: Most security holes are due to human oversight, kludgy hand-written parses, gaping holes left in conditionals, HTTP spec does not limit sizes. Resources: site, mailing list, book. Using Mongrel: gem install. Use monit to monitor processes, restart/start new mongresls. How many? Serve static content from web server not mongrel.

Coby Randquist, The many facets of Ruby at YellowPages.com, now “AT&T Interactive”
Partner in Confreaks.com, founding member of LA Rubyl
Lots of small teams. 3-5 people plus functional manager for “socialization” can be a challenge to get things through the pipleline. Teams: HTML/CSS, development, sys admin, sys architecture, UI – user interaction,

Architecture 8415 LOC, 20 servers per data senter, 16 mongresl per server. almost no active record, All static content via CDN. Service tier: ~10kLOC, 8 servers, 30 mongresl/server, memcached running on each server, ruby wrapper to their FAST search engine, Oracle client for communication with Oracle clusters — user registration and personalization. Future changes: from rails to Merb. New code they are open sourcing:

“waves” – resource-oriented open source framework,
funtors – patterned-based dispatch for Ruby,
kablame – easily summarize who has done how much work on your code base,
crufty – find unused code,
hoshi – a library for creating real first-class htmlxml views, a DSL for creating HTML rather than Yet Another Template language www.debu.gs , live-console: a truby gem for providing irb over channels other than stdio
Waves uses bacon as its testing framework
They (R&D) are working on a ton of stuff: bacon for testing, rack handler for jetty, developing branded iPhone apps:
Speak 4 It – directory
Need 2 Pee – geo-location when you gotta go. No, really.
For sale at the iPhone App store. Hope you can pay in a hurry.

Lunch – Consulting table

Nick Plante, Demystifying Ruby Plugins, http://blog.zerosum.org/2008/11/18/demystifying-rails-plugin-development
Bravo to Nick for posting his slides on his website just before presenting! Nick squeezed a lot of information into the very small half-hour he was given: why write a plugin, what’s involved, how to do it, a case study, tools to use to do it, how to publish it, how to package a plugin as a gem (I didn’t know you could do that!) and where to find the tools to do it! Whew!

Ezra Zygmuntowicz, Four years of Ruby Development
Ezra runs the venerable and respected EngineYard shop and talked about the ten configurations of Rails-serving servers he’s wrestled with over the past four years with the pros and cons of each one. The recommendation du jour, with the caveat that the race is still on, is Mongrel for ruby dynamic content, nGinX for static content, but YMMV. The Ezra talked about using an AMQP service using RabbitMQ to create Nanites, a self-organizing set of Ruby applets. Rack is running over Nanite. Ezra announced “EYAAS” – Engine Yard As A Service, “Clouds are too low level for average humans” – use a dashboard to describe your application, what engines, plugins, gems and underlying OS services it needs. The EYAAS stores a JSON config file that can be used to fill in their set of recipes they use to generate S3 and AWS resources. Now, you no longer log in and make one-time changes to a server that get lost if the server is lost, but rather re-configure the recipe to upgrade components, etc. Very, very cool way to automate deployment.

Matt Jankowski , thoughtbot, Nature Network “Agile in the Enterprise”
Boston-based, 10 devs, coupla business people, distributed: NYC, Philly, etc.
Nature Network, publishers of the famous “Nature” journal
Nature Network, social networking for scientists, somewhat more formal than Facebook
Team: 28 people who worked for at least a month over two years
What is Enterprise? Dictionary Definition. Also, a bunch of meetings, weird spec documents, continuous re-organizations. Bureaucracy and internal politics, people who “just” want a job. Compared the impedence mismatch between the enterprise society and the RAD, cool, XP, scrumming agile Rubyists. Funny. Images hysterical.

Shane Harvie, Refactoring Domains in Ruby and Rails
Inheritance v. Delegation; Is Inheritance an “Is-a” relation
Ruby doesn’t allow you to “unmix” an included module, so if you started with delegration by mixing in a module, you’re stuck if then try to subclass the original object and don’t want the mixed in behavior.
Slide fonts are too small. Bummer. On the bright side, it lets me focus on what the speaker is saying and not get lost in the weeds o fthe code…

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
folks.

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 Ruby Rampage — 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.

Notes from Ruby/Rails SIG, 16-Sept-2008

We had a triple-header at the September meeting of the New Hampshire Ruby and Rails group, held as usual on the third Tuesday of the month at RMC Research in Portsmouth.

Brian Turnbull… spoke on the HTTP protocol, reprising a well-received presentation he did at the SeaCoast Linux User Group last week. At SLUG, he was able to talk for over two hours. Due to the schedule, Brian was far more restricted this time, but did a great job of covering the material and trimming it to fit the allocated time. RFC 2616 is the key document you want to read, and it is quite readable.

Scott Garman… spoke about the Virtual Private Server (VPS) that will be offered to contestants of the upcoming RailsRumble. He showed us the console and talked about the advantages of a VPS over some of the other shared hosting solutions. Scott had recipes for setting up the VPS with Ubuntu 8.04 and Rails in two configurations: one using Mongrel and the second using Passenger’s mod_rails plugin.

Nick Plante… spoke on the git version control system and the GitHub hosted services.

The doorprizes were many and generous. The big prize was a conference admission to the upcoming Voices That Matter Professional Ruby Conference, coming up in Boston November 17-20. I was lucky enough to win that. Nick Plante also brought three copies of his new book co-authored with David Berube, Practical Ruby Plugins, so many folks went home happy that night.

Tune in to the next meeting of NHRuby by keeping an eye on the website at http://www.nhruby.org

Professional Ruby Conference, Voices That Matter, Boston

Join Me at the Professional Ruby Voices That Matter Conference

Join Me at the Professional Ruby Voices That Matter Conference

Join Me at the Professional Ruby Voices That Matter Conference in Boston November 17 – 20! Fellow NHRuby SIG members (and reknowned book authors and gurus) Nick Plante and David Berube will be among the many knowledgeable speakers. There’s an early bird discount good through October 6th and members of Ruby groups should check with their leaders for an additional discount deal (hint, leaders: contact the conference organizers if they haven’t given you one, already). A good time should be had by all. I hope we don’t get any early-season blizzards, as I’ll be commuting.

FULL DISCLOSURE: I was the lucky attendee who won a free admission at last Tuesdays NH Ruby conference.

Ruby/Rails SIG tonight: tripleheader!

Scott Garman posts a reminder message that tonight’s Ruby/Rails SIG meeting will be a special meeting: three presenters on three topics, and some awesome door prizes: Brian Turnbull on HTTP, Scott Garman on VPS, and Nick Plante on git. There will also be discounts for Linode, a raffle for free admission to the Voices that Matter Ruby 2008 conference in Boston, and perhaps Nick will even bring copies of his new book (with David Berube), Practical Rails Plugins. A meeting not to be missed!

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.