Thinking Like a Hacker Workshop
-
Upload
bowen-wang -
Category
Documents
-
view
5 -
download
0
description
Transcript of Thinking Like a Hacker Workshop
-
Bill Mei@Kortaggio
Thinking Like a Hacker
-
What is a Hacker?
-
Bill Mei@Kortaggio
hacker /hkr/ noun1. a person who uses computers to gain unauthorized access to data.
2. an enthusiastic and skillful computer programmer or user.
3. a person who engages in an activity without talent or skill.
4. a person who subverts an established system to his/her personal advantage.
What is a Hacker?
-
Bill Mei@Kortaggio
Hack your diet
Hack your sleep
Hack your education
Hack your brain
Hack your life
Hack your refrigerator
Hack the kitchen sink
Close, but no cigar
-
Bill Mei@Kortaggio
For now, just assume a Hacker refers to someone who is passionate about using computers.
Ill tell you the answer later
-
Why do Hackers salivate to the words Open Source?
-
Bill Mei@Kortaggio
And the food tastes awful.
What can you do? Walk away
Dont tip your server
Leave a bad review on Yelp
Complain to your friends
Turns out, a container labelled sugar is actually filled with salt
Imagine sitting at a restaurant
-
Bill Mei@Kortaggio
But You cant fix the problem because the restaurant is closed source.
-
Bill Mei@Kortaggio
What if the restaurant wasopen source?
-
Bill Mei@Kortaggio
What can you do? Walk away
Dont tip your server
Leave a bad review on Yelp
Complain to your friends
Fix the problem yourself
Imagine sitting at a restaurant
-
Bill Mei@Kortaggio
Open Source means that you can take action to make things better
-
Whats the best programming language?
-
Bill Mei@Kortaggio
Fastest?
Most reliable?
Easiest to write?
Easiest to read?
Has the largest libraries?
Most powerful?
Define Best
-
Bill Mei@Kortaggio
Power = Leverage
-
Bill Mei@Kortaggio
High leverage
Less code doing more stuff
Low leverage
More code doing less stuff
Example:
Lets say a program in C takes 50 lines
The same program in Haskell takes 10 lines
Therefore, Haskell is 5x more powerful than C
What is Leverage?
-
Bill Mei@Kortaggio
Smaller amount of code means:
Program takes less time to read (easier to scan)
Program takes less time to write (fewer things to memorize)
Program occupies less space in your head
Program is more poetic
Do more stuff with less code
Why count lines of code?
-
Bill Mei@Kortaggio
Example: Leverage
-
Bill Mei@Kortaggio
Give me all the even square numbers that are smaller than 100JAVA
import java.util.*;
public class ListComprehension {
public static void main(String[] args) {
ArrayList s = new ArrayList();
ArrayList result = new ArrayList();
for (int i = 0; i < 10; i++) {
s.add(i * i);
}
for (Iterator i = s.iterator(); i.hasNext(); ) {
int j = (int) i.next();
if (j % 2 == 0) {
result.add(j);
}
}
System.out.println(result);
}
}
PYTHON
s = [x**2 for x in range(10)]
print [x for x in s if x % 2 == 0]
-
Bill Mei@Kortaggio
Succinct code is like poetry
ENCYCLOPEDIA
Unskilled individuals suffer from illusory superiority, mistakenly rating their ability much higher than average. This bias is attributed to a metacognitive inability of the unskilled to recognize their mistakes. Actual competence may weaken self-confidence, as competent individuals may falsely assume that others have an equivalent understanding.
SHAKESPEARE
The fool doth think he is wise, but the wise man knows himself to be a fool.
(DunningKruger effect)
-
Bill Mei@Kortaggio
Dont tell hackers which language to use!
-
Bill Mei@Kortaggio
I want you to use C++
Instead of Ruby
-
Bill Mei@Kortaggio
1. http://www.lowes.com/images/LCI/Planning/BuyingGuides/bg_PowerNailerBuyignGuide_stick.jpg2. http://static.ddmcdn.com/gif/hammer-1.jpg
I want you to use a
Instead of a
-
Whats next for technology?
-
Bill Mei@Kortaggio
Whats next? or Whats popular?
-
Bill Mei@Kortaggio
Do more with less Reach more people with less effort
Make more features with less time
Produce more products with less resources
Etc.
Leverage: Another way of thinking about technology
-
Bill Mei@Kortaggio
By definition: Technology is Leverage!
-
Bill Mei@Kortaggio
Agriculture: Your Hands
Shovels
Ox plows
Tractors
Transportation: Horses
Trains
Cars
Airplanes
The history of technology is ahistory of leverage
Communication: Mail
Telegraph
Telephone
Internet
Education: Grandpas stories
Books
Brick and Mortar Schools
Virtual Schools
-
Bill Mei@Kortaggio
To think about the future of technology, think about how to increase leverage
-
Bill Mei@Kortaggio
Increasing Leverage
Decreasing Mass
-
Bill Mei@Kortaggio
An unanswered question
-
What is a Hacker?
-
Bill Mei@Kortaggio
hacker /hkr/ noun1. a person who uses computers to gain unauthorized access to data.
2. an enthusiastic and skillful computer programmer or user.
3. a person who engages in an activity without talent or skill.
4. a person who subverts an established system to his/her personal advantage.
What is a Hacker?
-
Bill Mei@Kortaggio
Hack your diet
Hack your sleep
Hack your education
Hack your brain
Hack your life
Hack your refrigerator
Hack the kitchen sink
Close, but no cigar
-
Bill Mei@Kortaggio
What is a Hacker?
-
Bill Mei@Kortaggio
Someone who makes a big impact with relatively small effort
-
Bill Mei@Kortaggio
Thank you!QUESTIONS?
-
Exercises
-
Bill Mei@Kortaggio
Automation
Black Box thinking, or reductionism
Functional thinking
Forms of Leverage