Lessons Learnt From Working With Rails

100 %
0 %
Information about Lessons Learnt From Working With Rails

Published on April 16, 2008

Author: martinbtt

Source: slideshare.net

Description

As given at Scotland On Rails 2008.

(note: the highlighting and layering hasn't come through so well in Slideshares conversion process. I'll probably put a version to download from my site to solve this)

Lessons Learnt fromWorking With Rails Martin Sadler workingwithrails.com

HAZ HACKF EST This Talk I CANOverview The Scene Strategy Popularity RUBY1Contests vs Launch AuthorityFeatures Performance Stats http://flickr.com/photos/intangiblyawesome/12593056/

But First

In The Beginning

In The Beginning (Autumn 2006)

Current Release 1.1.5

O’Reilly - State of the book market

The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. TIOBE Programming language popularity

Rails Resources ROR Forums / Newsgroup Blogs Official ROR wikiPlugin directory More blogs Rubyforge

Frustrated?

Ouch!

Ouch!

Ouch!

Ouch!

http://flickr.com/photos/zachklein/54389823/

http://flickr.com/photos/zachklein/54389823/

Ouch!http://flickr.com/photos/zachklein/54389823/

Ouch!http://flickr.com/photos/zachklein/54389823/

Issues

Issues• Limitations of wiki page length

Issues• Limitations of wiki page length• Spam

Issues• Limitations of wiki page length• Spam• No ability to cross reference data

Issues• Limitations of wiki page length• Spam• No ability to cross reference data• Tricky to navigate

Issues• Limitations of wiki page length• Spam• No ability to cross reference data• Tricky to navigate• No one had ownership

Issues• Limitations of wiki page length• Spam• No ability to cross reference data• Tricky to navigate• No one had ownership• More Spam!

Solution? Strategy?

Putting it together http://flickr.com/photos/laffy4k/166300185/

Putting it togetherSources http://flickr.com/photos/laffy4k/166300185/

Putting it together Sources WikiNewsgroup http://flickr.com/photos/laffy4k/166300185/

Putting it together Extract Sources WikiNewsgroup http://flickr.com/photos/laffy4k/166300185/

Putting it together Extract Map Sources and Combine WikiNewsgroup http://flickr.com/photos/laffy4k/166300185/

Putting it together Rails Models Extract Map Sources and Combine WikiNewsgroup http://flickr.com/photos/laffy4k/166300185/

Putting it together Rails New Interface Models Extract Map Display Sources and Filter Combine Manage WikiNewsgroup http://flickr.com/photos/laffy4k/166300185/

Principles create a web application to...• Improve the usability and accessibility of the content.• Increase reliability - give back control and ownership to the individuals whose information is being displayed• Add value

Early Concept Text Early proof of concept wireframe design

BonusDatabase would already be populated with everyones records!

BonusDatabase would already be populated with everyones records! Good Idea?

Hey, I didn’t give you permission to copy my data!http://flickr.com/photos/dvusd/2213212393/

But...• No need for people to enter their details again. (DRY)• Great kick start - site looks active before any users had really started using it• Users got a chance to see how it worked straight away• Data already in public domainCover the bases : Have an opt-out for users

Add Value• Additional profile information e.g. • How long have you been using Rails? • How long have you been using Ruby? • Rails Core contributor Added extra attributes to profiles that created new data streams e.g. rank by authority

ManagementGive as much freedom as a Wiki using a structured database. Give control and ownership to the individuals whose information is being displayed How?

Reporting• Needed side effect• Self policing http://flickr.com/photos/chrisjohnbeckett/442682895/

Detour Extracting from the source

Profile Attributes• First name • Email• Last name • Job title• Country• Location• Company• Company url

Using HPricot with XPathLooking for patterns .. and finding edge cases

Using HPricot with XPathLooking for patterns .. and finding edge cases

Using HPricot with XPathLooking for patterns .. and finding edge cases

Using HPricot with XPathLooking for patterns .. and finding edge cases

Using HPricot with XPathLooking for patterns .. and finding edge cases

Using HPricot with XPathLooking for patterns .. and finding edge cases

Using HPricot with XPathLooking for patterns .. and finding edge cases

Using HPricot with XPathLooking for patterns .. and finding edge cases

Using HPricot with XPathLooking for patterns .. and finding edge cases

Using HPricot with XPathLooking for patterns .. and finding edge cases

Using HPricot with XPathLooking for patterns .. and finding edge cases

An operation in data cleansing

ResultAbout 90% Success rate in porting the data Edge cases proved to be challenging Spam was a continued annoyance

Detour end? Almost

In Sync?WWR - Keeping records in sync with the Rails Wiki

In Sync? CrAZY!WWR - Keeping records in sync with the Rails Wiki

Back to the plan....

1st Iteration• Set (limited) scope of project• Knocked together a basic proof of concept.• Scraping and validity, versioning of the data extracted.• Dev work in 2 - 3 Days• Put out a version to get feedback from the community.

The Launch

“So this is basically a facebook for hiring? Looks cool.” - DHHFlickr Credit: http://www.flickr.com/photos/rooreynolds/243058018/

Release Strategy• Ask DHH• Notify Ruby Inside• Send mail out to initial beta testers• Post Announce on Rails newsgroup

Release Strategy Continued...• Released on a Thursday • End of week - People are more open to trying things out. • Released in the AM (before America went online) • Any issues could be ironed out before the larger rush of folks

Ruby InsideNov 17th 2006 http://www.rubyinside.com/worlds-largest-index-of-rails-developers-workingwithrails-launches-303.html

Ruby on Rails Weblog Text http://weblog.rubyonrails.org/2006/12/3/working-with-rails-tell-the-world

Keeping Track http://flickr.com/photos/andropolis/• Direct emails 1121113459/• Technorati• Google Stats (referrers)• Google & Google Blog Search

Authority VSPopularity

Authority vs Popularity Provide by the By other users user

Where are they used?

Where are they used?

Where are they used? Data Streams & Filters

Where are they used? Data Streams & Filters

Where are they used? Data Streams & Filters

Useful for?Reputation Marketing CV Kudos Endorsements

When will I be famous?

When will I be famous?

I Can Haz Internetz

I Can Haz Internetz

Authority, Popularity, and Experience are metrics by which to compare Rails developers.It’s up to the visitor to decide what weighting they give to them.

Contests(aka Hackfests)

January 2007 Rails Coding FTW• First ever global Rails Hackfest• 20 tickets to RailsConf inc hotel• 24 days• 263 participants

Rails Coding FTWKick-off • Jeremy Kemper (Core Team) • Derek Sivers (CD Baby) • Coded over a weekend • Lots of emails ..time diff!

Rails Coding FTWIn practice• Queried a custom Trac activity report (RSS)• Generated ‘votes’ per contributor• Re-factored popularity chart ranking code

Prize Stats Oakleys32+ Rails Conf tickets $$$ 50 USB Hubs • Lots of them PlanHQHosting 40 Make Magazines

Under the hood

Chart Infrastructure Chart RankSet VoteSet Ranks Votes

Generation• Chart Scheduler (background daemon)• Uses OpenWFEru scheduler gem• Generates a RankSet and ranks for a given set of votes Summary Votes fetched at Midnight Ranks generated once a day at 8am http://openwferu.rubyforge.org/scheduler.html

Generation• Chart Scheduler (background daemon)• Uses OpenWFEru scheduler gem• Generates a RankSet and ranks for a given set of votes Summary Votes fetched at Midnight Ranks generated once a day at 8am http://openwferu.rubyforge.org/scheduler.html

Has Many Charts? Overall Popularity | Blog Popularity | CodePopularity | Training Popularity | Speaking Popularity | Publications Popularity | Overall Activity |Hackfest 2007 | Rails Activity Weekly | Rails ActivityMonthly | Rails Activity Yearly | Monthly: June 2007 | Monthly: July 2007 | Monthly: August 2007 | Monthly: September 2007 Uses STI: Chart::Contribution, Chart::Base

How many records? *this figure is actually now much higher so these figures will be even higher!

How many records?• 12 Charts *this figure is actually now much higher so these figures will be even higher!

How many records?• 12 Charts• 10,000 users* *this figure is actually now much higher so these figures will be even higher!

How many records?• 12 Charts• 10,000 users*• 12 * 10, 000 = 120000 votes a day *this figure is actually now much higher so these figures will be even higher!

How many records?• 12 Charts• 10,000 users*• 12 * 10, 000 = 120000 votes a day• 12 * 10, 000 = 120000 ranks a day *this figure is actually now much higher so these figures will be even higher!

How many records?• 12 Charts• 10,000 users*• 12 * 10, 000 = 120000 votes a day• 12 * 10, 000 = 120000 ranks a day• 240,000 records generated a day *this figure is actually now much higher so these figures will be even higher!

How many records?• 12 Charts• 10,000 users*• 12 * 10, 000 = 120000 votes a day• 12 * 10, 000 = 120000 ranks a day• 240,000 records generated a day• 1,680,000 a week *this figure is actually now much higher so these figures will be even higher!

How many records?• 12 Charts• 10,000 users*• 12 * 10, 000 = 120000 votes a day• 12 * 10, 000 = 120000 ranks a day• 240,000 records generated a day• 1,680,000 a week• 50,400,000 a month *this figure is actually now much higher so these figures will be even higher!

Lots of records what to watch out for?

Lots of records what to watch out for?• (Careful) Indexing

Lots of records what to watch out for?• (Careful) Indexing• Archiving

Lots of records what to watch out for?• (Careful) Indexing• Archiving• Joins

Benefits• Versatile - can rank pretty much anything• Ability to scale• Keeps vote and rank history

Feature after Feature• Busy few months• Groups, Sites, Gems, Plugins... Hackfests, lots of updates

Development Strategy• Short iterations of developments• Mainly FDD• Try out features in branches• Used Edge Rails to stay ahead of the game• SVK is your friend* * the cooler kids now use git

Enter the BlogsphereThe WWR Feed Aggregatorhttp://www.slideshare.net/martinbtt/getting-distributed-with-ruby-on-rails/

Enter the BlogsphereThe WWR Feed Aggregatorhttp://www.slideshare.net/martinbtt/getting-distributed-with-ruby-on-rails/ In Summary

Enter the BlogsphereThe WWR Feed Aggregatorhttp://www.slideshare.net/martinbtt/getting-distributed-with-ruby-on-rails/ In Summary Uses AP4R gem async messagingDistributed fetching and processing of feeds

Behind the scenes• STI for many of the resources• Global filters for all• Custom filters available for specific resources

Performance

Performance• Typically 8 db queries per page• fragment caching for long running tasks• extensive use of db query cache• optimised queries - indexes etc• lots of ram• avoid db joins where possible

Ranksfor the hackfests)(before being re-factored Use of MYSQL variables for ranks

Back to the stats Where next?

Adoption of Rails amongst users 1.0 0.5This chart was created by tallying up the number of people using Rails based on when they said they started using Rails on WWR Rails 0.5 and 1.0 release dates are also shown for reference

Adoption of Rails amongst users 1.0 0.5 Old skool After Fan Boys?! Rubists partyThis chart was created by tallying up the number of people using Rails based on when they said they started using Rails on WWR Rails 0.5 and 1.0 release dates are also shown for reference

Adoption of Rails amongst users 1.00.5 Text Trend shows steady growth

What about Ruby?WWR users Ruby experience

Rails Experience 1.00.5 Ruby Experience

Rails Experience 1.00.5 Ruby Experience

Rails Experience 1.00.5 ROR web site, Log, Wiki Launched Ruby Experience

Rails Experience 1.00.5 ROR web site, Log, Wiki Launched Ruby Experience

Rails Experience 1.00.5 ROR web site, Log, Wiki Launched Ruby Experience

Where next? (For Rails)

Where next? (For Rails)• Corporate experimentation with Rails. These have largely started to pay off and large scale developments are starting to happen.• A heap of books for new developers to pick up and learn.• Rails matures

Where next? (For Rails)• Corporate experimentation with Rails. These have largely started to pay off and large scale developments are starting to happen.• A heap of books for new developers to pick up and learn.• Rails matures Big name companies using Rails http://blog.obiefernandez.com/content/2008/03/big-name-compan.html

http://radar.oreilly.com/archives/2008/03/state-of-the-computer-book-mar-22.html

http://radar.oreilly.com/archives/2008/03/state-of-the-computer-book-mar-22.html

See Also: http://blogs.zdnet.com/enterprisealley/?p=122

And WWR?

The sites usage is continuing to grow - the number ofvisitors is now roughly double what it was 6 months ago. O’Reilly will be continuing it’s support through the rest of 2008 New features coming soon...

With Thanks to & YOU!

beyondthetype.comtwitter.com/martinbtt

Add a comment

Related presentations

Related pages

10 Lessons Learned From Past Rail Accidents

10 Lessons Learned From Past Rail Accidents The death toll from Monday's terrible rail accident in ... The Lesson /// Kathryn O'Leary ...
Read more

Learning Rails - BuildingWebApps.com | A Resource for Web ...

Audio Lessons. In less than three hours, these audio lessons will lead you through all the key concepts you need to know to begin working with Ruby on Rails.
Read more

Rails-with-Trails: Lessons Learned - Home | Federal ...

Rails-with-Trails: Lessons Learned ... Rail-with-Trail Studies ... With many railroads actively working to clo se existing at ...
Read more

Lessons Learned from Evaluation - United Nations ...

Lessons Learned from ... lesson learned is ... professionals reviewed the contents of the UNEP EOU lessons database; applying a working definition of ...
Read more

Rails Engines - Lessons Learned // Speaker Deck

It covers the lessons that I've learned ... Rails Engines - Lessons Learned ... It covers the lessons that I've learned from building engines and working ...
Read more

Rails-with-Trails: Lessons Learned - Home | Federal ...

Rails-with-Trails: Lessons Learned. U.S. Department of Transportation. ... Rails-to-Trails Conservancy Suzan Pinsof. PRODUCTION SUPPORT: Architecture 21
Read more

Lessons Learnt from a Formal Investigation

Lessons Learnt from a Formal Investigation Date: 23 June 2014 ... rail tester and lookout were required to ... Visio-Lessons Learnt NRRP13 Newark Northgate ...
Read more

Learning to Code: Lessons from Building a Rails App with ...

Learning to Code: Lessons from Building a Rails App with ... When I tried to learn Rails a few years ... This lesson is one I’m still trying to learn.
Read more

Rails with trails - Wikipedia, the free encyclopedia

... there were 1,000 rail trails in operation nationwide, ... These guidelines were developed in the form of Rails-with-Trails: Lessons Learned, ...
Read more

Resources - FHWA Rails-with-Trails: Lessons Learned ...

Resources. Resources. ... FHWA Rails with Trails Lessons Learned Study Alta creates active communities where bicycling and walking are safe, ...
Read more