Archive | Web Development

Technologies, techniques and neat stuff on the www

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.

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!

EBM better than ABM!

I was listening the FLOSS weekly podcast of Perl monger extrodinaire Randal Schwartz interviewing Jan Lehnardt about CouchDB, a free-form, non-relational database. CouchDB is built by Damien Katz, one of the originators of Notes and a developer currently employed by IBM. The CouchDB project is hosted by the Apache Foundation. Jan mentioned that his projects include “Everything But Microsoft” meaning that his software was running on Linux and BSD, Debian and RedHat and Ubuntu and CentOS and the Unixes and OS X. I found that a much more inclusive and open way of looking at development than “Anything But Microsoft” that’s often portrayed as a irrational and zealous rejection of anything Microsoft. For those who like to put a positive spin on things, I think that EBM beats ABM by a long shot.

Notes from MonadLUG: David Berube, Ruby on Rails

Eleven members attended the August 14th meeting of the MonadLUG, Monadnock Linux User Group, held as usual on the second Thursday of the month at the SAU1 offices in Peterborough. David Berube was the main presenter.

We had the usual announcements (check upcoming events at http://www.gnhlug.org) and also some time for Q&A while waiting for the main speaker and had the ceremonial struggling with the laptop and the projector. One fellow was looking for help understanding how to install drivers for a scanner not supported by SANE, another had questions on what the keyring was and how he could get it to stop demanding a password from him.

David’s been a fixture in the groups for some years. He served as Fearless Leader of GNHLUG for several years, and took a stint as coordinator of the CentraLUG group. He has written a number of magazine articles and authored or co-authored several books, the most recent, Practical Ruby Plugins, due out later this month.

David gave us a brief history of web development, focusing on the incremental improvements made from scripts to cgi-bin to modules to long-running processes in terms of responsiveness, latency and the ability to scale to larger and quicker demands. He briefly compared Ruby with Perl, Python and Lisp, and then dove into the demo.

David had an Ubuntu laptop that he hadn’t previously done Ruby on Rails development on before, so he showed us the basics of installing Ruby, using Ubuntu’s package manager, and cautioned us against using the OS package manager to install gems: The gem system is a package manager in its own right, and it does things in a somewhat different way than most of the OS package manager tools. Instead, he recommended using ruby to install gems. As is often the case, there were some glitches, so we had a small distraction while we worked through creating the /usr/bin links for rake and rails that somehow hadn’t been created automatically.

David then created a new project, and walked us through the directory structure and the significance of files in each folder. He created a model that defined the wiki example we were creating, a controller to answer requests from the web server, and a view that would render the response from our application. He used the built-in rails and rake scripts to create the example database (SQLite3 is built in and used by default if nothing is specified, new in RoR 2.1), showed how the rails console could be used interactively to create model objects (implicitly saving them to disk) and that the console could be used to add, edit, query and delete objects. He then ran the application, after explaining the logic of URLs constructed in a “RESTful” fashion as http://yourwebserver/controller/action/parameter addresses. David started the built-in Webrick webserver and navigated his browser to http://localhost:3000/page/show/bob to show us Bob’s wiki page entry. Whew!

There was some good Q&A during and following the presentation.

I asked some questions on how a team of developers could insure that they were maintaining the same versions of gems when developing, as the gems are usually installed globally and are not in the main application source code tree. David suggested either creating a local team gem repository, or hardcoding the exact versions you want to freeze the target application at, directly within the code.

Charlie had some questions on how to keep up. While he’d read through the “PickAx” book and the “Skateboard” book, those are already a version out of date. David booted up Pidgin and we chatted with a couple of his fellow authors on what they recommended. Here’s a few links I noted from the meeting:

David also mentioned he was running Gnome-Do, a QuickSilver-clone that lets you launch applications or perform functions with a keyboard shortcut and your keywords. And David also showed off the Vimperator, a Vim-like interface for the FireFox browser. David noted you might find some troubles with Javascript-intensive pages:

Thanks to Charlie Farinella for organizing and running the meeting, to Ken and the SAU for providing the fine facilities, to David for an informative presentation and to all for attending and participating!

Notes from PySIG, 24-July-2008: Improv Intro

Seven attendees made it to the July 2008 meeting of the Python Special Interest Group of the Greater New Hampshire Linux Group, despite the heavy rains. Due to some last-minute conflicts, our planned speaker, Ray Côté, had to take a rain check for a future meeting, but cookies were made and we resolutely carried on.

There were two first-time attendees, one with a novice level of knowledge of Python and the second very little. Lead by the PySIG leader, Bill Sconce, we launched into an improvised session introducing Python and talking about its power, range and flexibility, comparing it with other languages, heckling Ben Scott, demonstrating several IDEs, talking about procedural scripting and object-oriented programming, showing off some working code, migrating database applications from proprietary platforms, and much, much more. A good time was had by all.

Prominently mentioned were the great tutorials available directly off the Python web site and the Tutor mailing list.

Great thanks to Janet for a delightful variety of cookies, to Bill for not only running the meeting and providing the projector but also bringing the milk, to all for participating, and to the Amoskeag Business Incubator for providing the fine facilities.

(Note: despite the organizational support of the GNHLUG, members running all sorts of OSes are welcome. A typical meeting has people running Python on OS X, Linux and Windows. All should expect equal-opportunity heckling.)

Catching up…

It’s been busy, busy month, and blogging was one of many things put off. Now, it’s time to start catching up.

I had an awesome month of June. Working on my main client project, we released yet another update on 12 June. After that, I took two weeks “off” — at least away from billing — to do some professional upkeep.

I spent a few days studying and then took the two MySQL 5.0 Developer certification exams on Tuesday the 17th. I went to the Blended Solutions facility in the Mall of New Hampshire, adjoining the PSNH building on Elm Street in Manchester, NH, and took the two exams, back-to-back. The first exam was the simpler of the two. Reviewing all the questions a couple times, I was still done in under an hour. The second exam, though, was a bear! The material was the more advanced stuff, some of the questions were trickier, some of the topics were material I had only book knowledge on. I marked a bunch of questions for review, went back and filled in all the answers, reviewed and debated and over-thought a bunch of questions and then, with three minutes left, decided any answers I changed in a panic were more likely wrong than right, and stopped. I passed both exams with acceptable scores, but nothing I’d brag about. “What do they call the man who graduates at the bottom of his class in med school?” “Doctor.” So, I’m pleased to have the opportunity to establish my level of knowledge, flag a couple of areas I need to learn more about, earn a logo I can display as part of my marketing and gain a listing as a MySQL Enterprise Ready Partner.

Wednesday the 18th of June was the first day of the Red Hat Summit in Boston. I attended all three days, commuting from Contoocook to the Anderson Rail Center in Wilmington and taking public transportation from there. While it made for a lot of hours on the road, the savings over staying in town were significant (total parking and rail for the week: $84 for 6 days), and sleeping at home in my own bed very much appreciated. The Red Hat Summit was a fascinating event. I wasn’t that familiar with the corporate structure or the market focus of Red Hat and I got much better insights into who they are and what they do. Here’s a slew of links on what went on, Red Hat announcements, and links to presentations.

Parallel to the Red Hat Summit was the Fedora Users and Developers Conference, FUDCon10 for short, that shared the Hynes Auditorium facilities on Thursday and Friday, and met at the Photonics Center at Boston University on Saturday. Even though many Fedora participants are Red Hat employees, the tone and structures of the groups are dissimilar. I missed a lot of the last-minute organizational notes the FUDCon’ners put together to organize their HackFest, so I tended to attend the Red Hat sessions instead. In the future, I’m more likely to put more effort into the HackFest side of things. Saturday was a BarCamp, a one-day self-organized conference. As I noted at last year’s conference, the means of pitching sessions, voting, scheduling and running the show are put together on the fly, and the results are startlingly good. Having pretty much had my brain filled of tech at the Red Hat Summit, I chose instead to focus more on process sessions, and learned about bug triaging, web site usability issues, and Fedora structure. A great use of a day, and a great chance to attach faces to the name and shake a few hands.

Sunday was a day of rest for me, and a day of washing laundry for Laura. Thank you!

Monday found me back on the Commuter Rail, this time attending An Event Apart just across the street from the Prudential Center where the Summit had been. Two long days of sessions were focused on the web, primarily design and usability, very different aspects from the two previous conferences. Like the Red Hat Summit, this conference was a little outside my comfort zone, in this case, designers rather than developers. Jeffrey Zeldman puts on an incredible show; facilities were superb, speakers knowledgeable, swag cool. Eric Meyer is the authority in the field of CSS, and it was his sessions I got the most practical tools from, but all of the sessions were well-presented, informative and thought-provoking. Jared Spool of User Interface Engineering had a very funny and very insightful session on analyzing clickstreams for success that will have me restructuring some of my client’s web sites. All of the speakers had great observations on the state of the art and future directions. Great stuff! Several other people took great notes I can share with you.

Arriving back to work on Wednesday, there was no time to decompress; a day of meetings lead to a couple frantic days of shipping yet another release and picking up another couple of projects. Thirty billable hours later, my super-contractor did a high-five tag-team tag and was off on his own adventures, while I took over sheparding a release out the door on Friday with some new features, new team members, new procedures and new prototcols. Whew!

It’s been an exhausting three weeks, but an exhilarating time, too. Hope to blog more details as I catch up on all the other projects.

Notes from NH Ruby/Rails Group, 20-May-2008

Five members attended the May meeting of the New Hampshire Ruby / Rails group, held as usual at the offices of RMC Research in Portsmouth.

Nick Plante entertained and educated the group on Rack, a foundation layer that interfaces between the web application handler (like Mongrel or FastCGI) and the actual web application framework adaptor (like Merb or Camping or Halcyon or Sinatra) in a manner similar to the Python WSGI layer. It allows for the creation of custom web frameworks while removing a lot of the grunt work. Nick had a sample application whipped up where a few lines of code could define the routing of various requests and cleverly answered “Hello, World” to the correct RESTful query.

For those for whom Rails isn’t the complete answer or those who want to build their own web functions with components other than those used by the Rails framework, Rack is a foundation on which you should be plugging together your building blocks.

Brian Turnbull volunteered to fill in for Scott Garman, who had to cancel at the last minute. Brian had been using NetBeans only a brief while, but had a great story to tell on using the built-in debugger to trace out a problem with Rails-generated CSS meta tags always getting a cache-breaking URL. While a feature in development, when the CSS was being served from a caching store like Amazon’s S3, the ever-changing URL defeated the point of caching. Brian showed how breakpoints could be applied to the code and step-by-step tracing (why is it that all debuggers have Step-In, Step-Once, Step-Over, Step-Out icons that all look the same and can’t be told apart?) and walked from his code into the Rails framework down to the mis-behaving component.

Having identified the problem, our discussion took a tangent into a discussion about monkey-patching, and how this ‘feature’ was a bug deserving of an optional switch to disable, and ought to be submitted upstream to the Rails maintainers. To confirm, we went through the steps to grab the latest version of rails as a plug-in (gem? I’m not sure.) so that we were working with the latest ‘edge’ code to confirm the problem hadn’t already been fixed. By installing this way, we were overriding the Rails framework only for this application, and could easily revert to the stable version, without disturbing the main shared code on the machine. We talked about how this was a Best Practice when bringing an app under development up to production, so it was isolated from changes outside of the app’s control.

Plenty of time was available for discussion, and we talked with Tim a bit about configuring a new machine with all the tools he’d need to develop a Rails app with NetBeans: Ruby, Rails, a couple good gems, the Java runtime. Nick and Brian noted that the default Rails environment within NetBeans is JRuby not MRI (Matz’ Ruby Interpreter) and how you might want to reconfigure NetBeans to use MRI instead if you weren’t planning on deploying to a JRuby environment.

Thanks to Nick and Brian for their presentations, to Scott for arranging the meeting, to Tim and RMC for providing the great facilities and to all for attending the meetings! Discussion is ongoing now on the topics for the June meeting; join the mailing lists at http://mail.nhruby.org/mailman/listinfo/ and keep an eye on the new meeting plans at http://wiki.nhruby.org/index.php/Upcoming_meetings.

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.