Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Aggressively Probing Ruby Projects

Aggressively Probing Ruby Projects

So we built an employee-driven, geographically-distributed, multi-client, HTML5-based, API-centric, bathroom-enabled, buzzword-embracing music server for the GitHub offices. It's been a fun project to explore company culture, CSS frameworks, JavaScript methodologies, native clients, outside contributions, and to discover who gets really angry when Garth Brooks starts singing on the speakers. It's one of those projects that ended up far more nutty than the original idea. Come steal some ideas for your own projects.

Zach Holman

April 19, 2012
Tweet

More Decks by Zach Holman

Other Decks in Programming

Transcript

  1. REPOSITORY PROBES REPORTS b s n b b b b

    b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b bbbbbbbbbbbbbbbbb 15,698
  2. REPOSITORY PROBES REPORTS b s n b b b b

    b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b bbbbbbbbbbbbbbbbb 15,698 s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s 17 FILES, 41 TESTS sssss sssss s
  3. 10 REPO SLICES REPOSITORY PROBES REPORTS b s n b

    b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b bbbbbbbbbbbbbbbbb s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s sssss sssss s n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n 15,698 17 FILES, 41 TESTS
  4. GOAL: Index projects, see how they change over time, and

    compare them against all indexed projects
  5. OTHERWISE, everything else in this is 100% ACCURATE and won’t

    generate an INTERNET FLAMEWAR maybe probably.
  6. class Loc < Probe exposes :lines def lines repository.files.map do

    |file| repository.read(file).to_s.lines.count end.sum end end APP/PROBES/#{PROBE}.RB
  7. class Loc < Probe exposes :lines def lines repository.files.map do

    |file| repository.read(file).to_s.lines.count end.sum end end APP/PROBES/#{PROBE}.RB
  8. class Loc < Probe exposes :lines # Report on these

    methods def lines repository.files.map do |file| repository.read(file).to_s.lines.count end.sum end end APP/PROBES/#{PROBE}.RB
  9. class Loc < Probe exposes :lines def lines repository.files.map do

    |file| repository.read(file).to_s.lines.count end.sum end end APP/PROBES/#{PROBE}.RB
  10. class Loc < Probe exposes :lines def lines repository.files.map do

    |file| repository.read(file).to_s.lines.count end.sum end end APP/PROBES/#{PROBE}.RB
  11. class Loc < Probe exposes :lines def lines repository.files.map do

    |file| repository.read(file).to_s.lines.count end.sum end end APP/PROBES/#{PROBE}.RB
  12. class Repository def lines def read def revisions def commit_messages

    end APP/MODELS/REPOSITORY.RB COMMON HELPER METHODS CAN BE ABSTRACTED TO SVN, HG, ETC.
  13. A QUICK ASIDE: RUGGED IS COOL - Faster than shelling

    out (naturally) - Write or stage new commits - Multi-platform, permissive license, bindings for all major languages Ruby: gem install rugged - Faster than any other Git library
  14. FROM THIS, WE CAN SEE: Popular projects tend to have

    more non-Ruby code Inline documentation is sparse (11%)