Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Computer Science: The Good Parts
Search
Jeff Cohen
August 04, 2017
Programming
0
130
Computer Science: The Good Parts
Kansas City Developers Conference
Jeff Cohen
August 04, 2017
Tweet
Share
More Decks by Jeff Cohen
See All by Jeff Cohen
Modern Cryptography for Absolute Beginner
jeffcohen
0
170
(RubyConf 2016) Computer Science: The Good Parts
jeffcohen
0
310
Computer Science: The Good Parts (2016)
jeffcohen
3
200
Computer Science: The Good Parts
jeffcohen
1
190
Secrets Revealed: Web Development is for Everyone
jeffcohen
0
440
Coding for MBA's
jeffcohen
0
73
Other Decks in Programming
See All in Programming
GAEログのコスト削減
mot_techtalk
0
130
バッチを作らなきゃとなったときに考えること
irof
2
500
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
840
GoとPHPのインターフェイスの違い
shimabox
2
210
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
8
2.3k
PEPCは何を変えようとしていたのか
ken7253
2
120
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
200
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
170
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
240
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
1
110
Software Architecture
hschwentner
6
2.1k
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
230
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.3k
4 Signs Your Business is Dying
shpigford
182
22k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Typedesign – Prime Four
hannesfritz
40
2.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
BBQ
matthewcrist
87
9.5k
It's Worth the Effort
3n
184
28k
Thoughts on Productivity
jonyablonski
69
4.5k
Transcript
Computer Science: The Good Parts csthegoodparts.com @jeffcohen
None
None
1. Encoding All The Things 2. Containers for Things 3.
Doing Things 4. Building Big Things 5. Thinking About Things
Data Structures
Data Structures
Linked List 60 31 5 45 70 head
Queue New elements are appended to the end of the
list 60 31 5 45 70 head
Stack 60 45 70 31 5 head New elements are
inserted at the front of the list
60 31 5 45 80 70 74 99 87 68
Binary Tree root
Graph
None
None
None
Algorithms
Babbage and Lovelace
Apollo 11
Margaret Hamilton Source code of the Apollo Guidance Computer
Complexity
Complexity Some computer programming implementations are more complex than others.
Complexity A "green" test suite is not an indicator of
sustainability nor is it a guarantee of an optimal solution.
Complexity Science relies on standard systems of weights and measures.
For software, we measure resources, which are typically time and space.
O(n) def search(name_to_find, names) for name in names if name
== name_to_find return true end end return false end
def search(name_to_find, names) for name in names if name ==
name_to_find return true end end return false end O(n) 0 100 200 300 O(n)
O(log n) def search(name_to_find, sorted_names) return false if sorted_names.size
== 0 midpoint = sorted_names.length / 2 if name < sorted_names[midpoint].name search(name_to_find, sorted_names[0, midpoint]) elsif name > sorted_names[midpoint].name search(name_to_find, sorted_names[midpoint, -1]) end return true end
def search(name_to_find, sorted_names) return false if sorted_names.size == 0
midpoint = sorted_names.length / 2 if name < sorted_names[midpoint].name search(name_to_find, sorted_names[0, midpoint]) elsif name > sorted_names[midpoint].name search(name_to_find, sorted_names[midpoint, -1]) end return true end O(log n) 0 100 200 300 O(log n) O(n)
Atom.io blog post
O(n2) def all_permuations(items) items.map do |item| items.map { |inner_item| [item,
inner_item] } end end [1,2,3] => [[1,1], [1,2], [1,3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]]
def all_permuations(items) items.map do |item| items.map { |inner_item| [item, inner_item]
} end end O(n2) 0 100 200 300 O(n2) O(n) O(log n)
Cryptography
Cryptography
Cryptography
Cryptography
The Future
Traditions We know our history. We value progress over reinvention.
We seek solutions to meaningful problems.
Alan Turing
Alan Turing Computer science is not computer programming
Alan Turing It's a way of thinking
Grace Hopper
Grace Hopper
Grace Hopper Humans are allergic to change. They love to
say, "We've always done it this way." I try to fight that. That's why I have a clock on my wall that runs counter-clockwise.
Grace Hopper A ship in port is safe; but that
is not what ships are built for. Sail out to sea and do new things.
Questions? Thoughts? Find me on twitter @jeffcohen Notes, Links, Resources:
csthegoodparts.com