> the hardest problems
in computer science
> @AnjanaVakil
> AlterConf Berlin 2017
Slide 2
Slide 2 text
there are two hard things in
computer science:
Slide 3
Slide 3 text
there are two hard things in
computer science:
[1] cache invalidation
Slide 4
Slide 4 text
there are two hard things in
computer science:
[1] cache invalidation
[2] naming things
Slide 5
Slide 5 text
there are two hard things in
computer science:
[1] cache invalidation
[2] naming things
[0] off-by-one errors
Slide 6
Slide 6 text
there are two hard things in
computer science:
[1] cache invalidation
[2] naming things
[0] off-by-one errors
- Phil Karlton via Tim Bray via Jeff Atwood
https://twitter.com/codinghorror/status/506010907021828096
Slide 7
Slide 7 text
[1] cache invalidation
> the problem
Slide 8
Slide 8 text
caching data improves performance
but stale data must be removed
from the cache (invalidated)
Slide 9
Slide 9 text
amazon.com/Thinking-Fast-Slow-Daniel-Kahneman/dp/0374533555
we think with 2 systems:
1: fast, intuitive,
emotional
2: slow, deliberative,
logical
- D. Kahneman, Thinking Fast and Slow
Slide 10
Slide 10 text
quick!
picture a software engineer
Slide 11
Slide 11 text
- Ola Gasidlo, engineer at Mozilla
https://twitter.com/defunkt/status/426104782894284800
Slide 12
Slide 12 text
[1] cache invalidation
> solutions
Slide 13
Slide 13 text
“Instead of assuming what someone’s
position or career is, ask, ask
politely, and don’t act surprised
at the answer.”
- Sailor Mercury, “Coding like a girl”
https://medium.com/@sailorhg/coding-like-a-girl-595b90791cce
Slide 14
Slide 14 text
“No feigning surprise”, from the Recurse Center social rules
https://www.recurse.com/manual#sub-sec-social-rules
Slide 15
Slide 15 text
[1] cache invalidation
> your thoughts?
Slide 16
Slide 16 text
[2] naming
> the problem
Slide 17
Slide 17 text
70%
“of the source code of a software
system consists of identifiers”
- F. Deißenbock & M. Pizka, “Concise and Consistent Naming”
via P. Hilton & F. Hermans, “What science says about naming”
http://hilton.org.uk/blog/science-on-naming
Slide 18
Slide 18 text
“the names chosen as identifiers
are of paramount importance”
- F. Deißenbock & M. Pizka, “Concise and Consistent Naming”
via P. Hilton & F. Hermans, “What science says about naming”
http://hilton.org.uk/blog/science-on-naming
Slide 19
Slide 19 text
# what do these names assume?
def foo():
bar = “hello, world!”
print(bar)
Slide 20
Slide 20 text
J. Terrell et al., “Gender differences and bias in open source: Pull
request acceptance of women versus men”, via The Guardian
https://www.theguardian.com/technology/2016/feb/12/women-considered-better-coders-hide-gender-github
“continuing to publicly present
as a woman is important for
solidarity”
- developer/GitHub contributor Heather Booker,
“I applied to Outreachy, and I didn’t use my name”
heatherbooker.github.io/blog/code/life/2017/03/14/i-applied-to-outreachy-and-didnt-use-my-name.html
Slide 24
Slide 24 text
[2] naming
> your thoughts?
Slide 25
Slide 25 text
[0] off-by-one errors
> the problem
Slide 26
Slide 26 text
you want a fence 30 meters long
with posts spaced 3 meters apart
how many posts do you need?
- the “fencepost error” via Wikipedia
https://en.wikipedia.org/wiki/Off-by-one_error#Fencepost_error
Slide 27
Slide 27 text
you want an engineering team
with “diverse” members
how many do you need?
- the “token hire error” via me, just now
Slide 28
Slide 28 text
- Kelly Ellis, engineering lead at Medium
https://twitter.com/justkelly_ok/status/854030175410864128
Slide 29
Slide 29 text
Photo of Gloria Kimbwala via TechCrunch
tctechcrunch2011.files.wordpress.com/2016/01/gloria_kimbwala.jpg
“My path through technology and
through computer science —
I was always very aware I was
the only minority and the only
woman in all of my classes.”
- Gloria Kimbwala, engineer at
Square, via TechCrunch
https://techcrunch.com/2016/01/12/meet-squares-gloria-kimbwala-an-engineer-
dedicated-to-advancing-diversity-in-tech/
Slide 30
Slide 30 text
- Khalid, “Barriers to entry in the JavaScript
community”, JSConf EU 2017
http://2017.jsconf.eu/speakers/khalid-barriers-to-entry-in-javascript-communities.html
Slide 31
Slide 31 text
[0] off-by-one errors
> solutions
Slide 32
Slide 32 text
- Amy Nguyen, engineer at Pinterest
https://twitter.com/amyngyn/status/785532779106754560
Slide 33
Slide 33 text
“Hire more damn women” - Christina Sass, CEO of Andela, via TechCrunch
techcrunch.com/2017/03/08/theres-a-simple-solution-to-techs-gender-imbalance-hire-more-damn-women/
Slide 34
Slide 34 text
[0] off-by-one errors
> your thoughts?
Slide 35
Slide 35 text
> thank you!
> @AnjanaVakil
> AlterConf Berlin 2017