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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jeff Cohen
August 04, 2017
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Computer Science: The Good Parts
Kansas City Developers Conference
Jeff Cohen
August 04, 2017
More Decks by Jeff Cohen
See All by Jeff Cohen
Modern Cryptography for Absolute Beginner
jeffcohen
0
200
(RubyConf 2016) Computer Science: The Good Parts
jeffcohen
0
370
Computer Science: The Good Parts (2016)
jeffcohen
3
240
Computer Science: The Good Parts
jeffcohen
1
230
Secrets Revealed: Web Development is for Everyone
jeffcohen
0
460
Coding for MBA's
jeffcohen
0
100
Other Decks in Programming
See All in Programming
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
130
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
170
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
170
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
330
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
150
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
130
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
230
1年で人数1.5倍、PR数5.5倍増。 品質とアウトカムはどうなったか、 何が効いたか
ike002jp
0
130
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
260
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
360
Featured
See All Featured
Building AI with AI
inesmontani
PRO
1
1.1k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Ruling the World: When Life Gets Gamed
codingconduct
0
280
Designing for Timeless Needs
cassininazir
1
350
エンジニアに許された特別な時間の終わり
watany
107
250k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.8k
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