Prof Ninja's How-To List
Learning to Code
Mindset for Beginners:
- The only thing between here and there is simply logging focused hours
- Make lots of little deliverables
- Whenever you're wondering how to do something, just try it, quickly
- That is, don't expect to know everything before you start to code
- Accumulate experience with every possible error message you can
- The speed of your iteration loop has exponential impact on how quickly you progress
- BUT pause to reflect and refine your mental models of what is happening, why, and how
- because at some point you can code in your mind which disconnects you from the keyboard and accelerates your ability to log those hours
- More Learning Code Philosophy: my pedagogy
- Ideas for being generally productive in life
Coding concepts to master:
- displaying something to the screen
- defining and declaring variables
- basic arithmetic
- making arrays of values
- loops: for and while
- conditional statements: if and switch
- defining functions and calling those functions
- work with strings and text (e.g. concatenate, substring, search inside a string)
- reading from a file and writing to a file
- dictionaries/associative arrays/objects that is
x["key"] = value
Python
- py.prof.ninja maybe
- Solve the first 10 project Euler problems
- Learn the 3 args to range and indexes:
range(2, 23, 7) == [2, 9, 16]
"abcdefghijklmnopqrstuvwxyz"[2::7] == "cjqx"
range(10)[::-1] == [9,8,7,6,5,4,3,2,1,0]
- Learn List Comprehension:
[i**2 for i in range(20)]
[x.upper() for x in ["some","words","here"]]
[[] for _ in range(10)]
- Learn the lambda stuff (nameless functions):
map(lambda x: x*x, range(20))
filter(lambda x: x % 2, range(10))
reduce(lambda x,y: x+y, range(10), 0)
somearrayofdicts.sort(lambda x,y: y["value"] - x["value"])
Javascript
Crypto
PWNing
Web Exploits
Firebase