Software Archaeology For Beginners
Code, Community and Culture
who
engineer and operations chapopen source chapfunny accent
(photo by Jennie Rainsford)
other mattersauthor
http://www.jamesturnbull.nethack-n-slash developer
https://github.com/jamtur01pontification
http://www.kartar.net
Who are you?
Why?
Three themesA bit of culture
Some things about communityQuite a lot about code,documentation and tests
But I thought thistalk was justtechnical?
Or ... Why do I give a crap aboutculture and community?
Culture
What's culture?Why is culture important?
Read & ListenPatience is a virtue
Community
CommunicationUse the mechanisms the project use
Ask questionsOver-share
Be polite, be upbeat
CollaborationEarn trust through little steps
But it's broken!
You catch moreflies with honey
Code,Documentation
and Tests
What is SoftwareArchaeology?The fine art of software
dumpster diving
DocumentationVisualization
Testing & TruthDesign & StylePerformance
Read all thedocumentation
Run all thedocumentation
(Re-)Writedocumentation
Is there a design?
Draw picturesand write down
the story
Build adevelopmentenvironment
And yes document it.
Run the tests
Fix the brokentests
You fixed thetests?
What do the testscover?
# go test -coverPASScoverage: 9.7% of statementsok github.com/dotcloud/docker 0.444s
Wow do we suck
Write new tests
Tests asdocumentation
Run Metrics
Metrics revealCode smells
Troubled subsystems
All good places to start coding
Style & Linting
# go tool vet .commands.go:567: arg s for printf verb %d of wrong typeengine/streams_test.go:168: arg expectedOutput for printf verb %d engine/streams_test.go:228: possible formatting directive graphdriver/aufs/aufs_test.go:389: arg change.Kind forgraphdriver/aufs/aufs_test.go:429: arg change.Kind forgraphdriver/devmapper/deviceset.go:35: struct field tag ̀json:devices̀ not compatible
Profiling
# go tool pprof api api.profWelcome to pprof! For help, type 'help'.(pprof) top10Total: 2525 samples298 11.8% 11.8% 345 13.7% runtime.mapaccess1_fast64268 10.6% 22.4% 2124 84.1% main.FindLoops251 9.9% 32.4% 451 17.9% scanblock178 7.0% 39.4% 351 13.9% hash_insert. . .
Performanceproblems areoften tied tocode smells
So what have welearnt?
Understand all ofculture,
community andcode
Little things canhave big impacts
Leave thingsbetter than youfound them.
Questions?
referencesDig - Copyright University of California Santa Cruz 2009Culture - Copyright Charles EbereonwuCommunity - Copyright Storm CryptFlies and Honey - Copyright Kent WangHappy Kids - Copyright LighttruthA Picture is worth a thousand words - Copyright Jessica Hemrick
Top Related