Transcript
Page 1: Software archaeology for beginners: code, community and culture

Software Archaeology For Beginners

Code, Community and Culture

Page 2: Software archaeology for beginners: code, community and culture

who

engineer and operations chapopen source chapfunny accent

(photo by Jennie Rainsford)

Page 3: Software archaeology for beginners: code, community and culture

other mattersauthor

http://www.jamesturnbull.nethack-n-slash developer

https://github.com/jamtur01pontification

http://www.kartar.net

Page 4: Software archaeology for beginners: code, community and culture

The LogStash Book

www.logstashbook.com

Page 5: Software archaeology for beginners: code, community and culture

The Docker Book

www.dockerbook.com

Page 6: Software archaeology for beginners: code, community and culture

Who are you?

Page 7: Software archaeology for beginners: code, community and culture

Why?

Page 8: Software archaeology for beginners: code, community and culture

Three themesA bit of culture

Some things about communityQuite a lot about code,documentation and tests

Page 9: Software archaeology for beginners: code, community and culture

But I thought thistalk was justtechnical?

Or ... Why do I give a crap aboutculture and community?

Page 10: Software archaeology for beginners: code, community and culture

Culture

Page 11: Software archaeology for beginners: code, community and culture

What's culture?Why is culture important?

Page 12: Software archaeology for beginners: code, community and culture

Read & ListenPatience is a virtue

Page 13: Software archaeology for beginners: code, community and culture

Community

Page 14: Software archaeology for beginners: code, community and culture

CommunicationUse the mechanisms the project use

Ask questionsOver-share

Be polite, be upbeat

Page 15: Software archaeology for beginners: code, community and culture

CollaborationEarn trust through little steps

Page 16: Software archaeology for beginners: code, community and culture

But it's broken!

Page 17: Software archaeology for beginners: code, community and culture

You catch moreflies with honey

Page 18: Software archaeology for beginners: code, community and culture

Code,Documentation

and Tests

Page 19: Software archaeology for beginners: code, community and culture

What is SoftwareArchaeology?The fine art of software

dumpster diving

Page 20: Software archaeology for beginners: code, community and culture

DocumentationVisualization

Testing & TruthDesign & StylePerformance

Page 21: Software archaeology for beginners: code, community and culture

Read all thedocumentation

Page 22: Software archaeology for beginners: code, community and culture

Run all thedocumentation

Page 23: Software archaeology for beginners: code, community and culture

(Re-)Writedocumentation

Page 24: Software archaeology for beginners: code, community and culture

Is there a design?

Page 25: Software archaeology for beginners: code, community and culture
Page 26: Software archaeology for beginners: code, community and culture

Draw picturesand write down

the story

Page 27: Software archaeology for beginners: code, community and culture
Page 28: Software archaeology for beginners: code, community and culture

Build adevelopmentenvironment

And yes document it.

Page 29: Software archaeology for beginners: code, community and culture

Run the tests

Page 30: Software archaeology for beginners: code, community and culture

Fix the brokentests

Page 31: Software archaeology for beginners: code, community and culture

You fixed thetests?

Page 32: Software archaeology for beginners: code, community and culture

What do the testscover?

Page 33: Software archaeology for beginners: code, community and culture

# go test -coverPASScoverage: 9.7% of statementsok github.com/dotcloud/docker 0.444s

Page 34: Software archaeology for beginners: code, community and culture
Page 35: Software archaeology for beginners: code, community and culture

Wow do we suck

Page 36: Software archaeology for beginners: code, community and culture

Write new tests

Page 37: Software archaeology for beginners: code, community and culture

Tests asdocumentation

Page 38: Software archaeology for beginners: code, community and culture

Run Metrics

Page 39: Software archaeology for beginners: code, community and culture
Page 40: Software archaeology for beginners: code, community and culture

Metrics revealCode smells

Troubled subsystems

All good places to start coding

Page 41: Software archaeology for beginners: code, community and culture

Style & Linting

Page 42: Software archaeology for beginners: code, community and culture
Page 43: Software archaeology for beginners: code, community and culture

# 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

Page 44: Software archaeology for beginners: code, community and culture

Profiling

Page 45: Software archaeology for beginners: code, community and culture

# 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. . .

Page 46: Software archaeology for beginners: code, community and culture

Performanceproblems areoften tied tocode smells

Page 47: Software archaeology for beginners: code, community and culture

So what have welearnt?

Page 48: Software archaeology for beginners: code, community and culture

Understand all ofculture,

community andcode

Page 49: Software archaeology for beginners: code, community and culture

Little things canhave big impacts

Page 50: Software archaeology for beginners: code, community and culture

Leave thingsbetter than youfound them.

Page 51: Software archaeology for beginners: code, community and culture

Questions?

Page 52: Software archaeology for beginners: code, community and culture

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


Recommended