Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

40
Analyze and Visualize Git Log For Fun and Profit Raimonds Simanovskis @rsim

Transcript of Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Page 1: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Analyze and Visualize Git Log

For Fun and Profit

Raimonds Simanovskis @rsim

Page 2: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Ignite RailsConf 2012

Page 3: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Code Metrics...

Lines ofcode

Cyclomaticcomplexity

Testcoverage Duplication

Page 4: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Git Commit Log

Page 5: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Mining Rails — Learning from your

App’s Lifeline Michael Feathers,

Corey Haines RailsConf 2011

Page 6: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Multi-Dimensional Analysis

TimeFilesAu

thor

s Measures Commits Additions Deletions

Dimensions

File Extension Commit

Time Zone Hour

Week Day

Page 7: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Ruby on Rails Git Log

Page 8: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Changes in Ruby files

Birth of RailsGreat Rails 3refactoring

RailsConfis coming

Page 9: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

DHH contribution

Rails is mine

Let otherscontribute

tooCar racingtakes all

my time…

OMG! I shouldgive a technical

talk at RailsConf!

Don’t make thismistake anymore

Page 10: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Top contributors in 2015 by number of commits

Page 11: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Top contributors in 2015

Page 12: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

9-to-5 disciplined developer

Hours of day

warms up withsmall commits

eats lunchat 12pm

finishes workand socializes

Aaron Patterson

Page 13: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Don’t judge someone by their

appearance

Hours of day

@tenderlove

Page 14: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Don’t burn yourself!

Hours of day

José Valim

Why don’t yousleep?

Ruby on Rails contribution in 2012

Working onElixir?

Get angryand startdeletingcode?

Page 15: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Finding the best working pattern

Hours of day

Elixir contribution in 2015José Valim

Page 16: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Contributions by time zone in 2015

US Westcoast

BrasilEurope

JapanIndia

Page 17: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Changes per day of week in 2015

Page 18: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Changes per hour on Fridays, in 2015

Beertime

BDD

Page 19: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Linux

> 0.5M commits> 20M lines of code

> 70M lines of changes> 14K contributors

Page 20: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Changes over time

Jan 11970

Apr 252037

Page 21: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Changes over time

Jan 11970

Apr 252037

Apr 162005

Initial git repository build. I'm not bothering with the full history,even though we have it. We can create a separate "historical" gitarchive of that later if we want to, and in the meantime it's about3.2GB when imported into git - space that would just make the earlygit days unnecessarily complicated, when we don't have a lot of goodinfrastructure for it.

Let it rip!

Page 22: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Top changed files

Page 23: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

What is this largeC++, C, Assembler

project?

Page 24: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Changes over timeReally?

> 4M LOC?

Page 25: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Changes over timeReally?

> 4M LOC?

#### Dependencies

Node.js has several bundled dependencies in the *deps/* and the *tools/*directories that are not part of the project proper. Any changes to filesin those directories or its subdirectories should be sent to their respectiveprojects. Do not send your patch to us, we cannot accept it.

Page 26: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Without dependencies

Page 27: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Without dependencies

Page 28: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Top contributors

Page 29: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Ryan Dahl Creator of Node.js

Page 30: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Isaac Schlueter

Page 31: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Top contributors

Page 32: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

John Resig Creator of jQuery

Page 33: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Top contributorsAlexei

Vladishev

Page 34: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Huge Toad

Page 35: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Bonus WTF

Page 36: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Why duplicates?

Page 37: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

Oh, Unicode…

"Ja\u0304nis"

"J\u0101nis"

a + ̄

ā

Page 38: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

"Ja\u0304nis"

"J\u0101nis"

.gitconfig

as UTF-8

WHY???

Page 39: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

There are only 2 hard things in CS

Naming things

Cache invalidationOff by one errors

Time zonesUnicode special characters

Page 40: Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015

https://eazybi.com/help/git

@rsim