forked from yang/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSoftware Engineering.page
More file actions
84 lines (65 loc) · 2.99 KB
/
Copy pathSoftware Engineering.page
File metadata and controls
84 lines (65 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
TODO merge in notes from sweng class
game development
- asm is still freq used
- c++ is the de facto std bc of physical memory control (rather than raw perf)
- often have heavy duty scripting infrastructure
- equal numbers of engineers/artists, with slightly fewer designers (scripters)
concepts
- scrum
- dependency injection: a way of structuring your code for testability
- banish global state/singletons
- explicitly pass objects/object factories around to ctors
- ctors are very simple
- initialize object/object factory graph at startup
- easy to substitute different implementations for testing
characterizing and predicting which bugs get fixed: emp study of ms win (philip guo)
- bug fixing is imp; triaging is hard
- ms emp data on vista/7: bug lifetime, employee info
- qualitative survey to win devs with 20% response rate
- main question: how do factors related to ppl and bug report edits affect whether bug is fixed?
- reputation, interest, reassignments, distance
- prev paper on bug triaging: bug opener reputation = |opened cup fixed| / (|opened| + 1)
- +1 encourages more bug reports
- built predictive model: logistic regression with 7 factors
- source, rep of opener, rep of first assignee, severity, opened by temp?, opener/assignee in same team?, same bldg?
- 68% prec 64% recall (.5 cutoff)
anecdotes
- oopsla09: nasa jpl uses model checking (heavy duty theory) and static analyses (less theoretical but still highly useful)
Exploding Software-Engineering Myths
- <http://research.microsoft.com/en-us/news/features/nagappan-100609.aspx>
- code coverage is not a good metric
- TDD team 60-90% better in terms of defect density than non-TDD
- assertion/verification count negatively correlated with bug count
- org structure matters a lot: org metrics can predict SW failure-proneness
with precision & recall of 85%
- geo distance doesn't matter much
writing solid code
- use warnings, static checkers, unit tests
- use assertions and debug-only backup algos
- use subsystem integrity checks: dangling ptrs, lost mem blocks, use of uninitialized mem
- use debugger and step
- use good design to create simple single-purpose functions
- use safer alternatives to risky algos/lang idioms
- avoid bad practices
- attitude & habits
companies
---------
facebook software engineering
- minimze downtime, scale fast, rapid deployment
- limited QA but many code reviews
- A/B testing, gradual/staged (geo) deployment
- PHP, memcached, mysql, hadoop, scribe, hive, hipal, haystack, thrift
- user:dev ratio is ~1.1M
- <http://cacm.acm.org/blogs/blog-cacm/51564-extreme-agility-at-facebook/fulltext>
google chrome
- trybot farms; can submit your changelists
- use gtest, gmock, valgrind, thread sanitizer
linux
-----
- mostly-hierarchical graph of development trees
- tree per subsystem
- staging trees: -mm, linux-next
- <http://ldn.linuxfoundation.org/book/24-staging-trees>
- maintainers
- david miller, greg kroah-hartman, andrew morton, ingo molnar
- stats: <http://lwn.net/Articles/385949/>