Version 17, fully refactored, Hack Reactor, 2015-12-17
Laurie Voss
CTO,
@seldo
I may also include sarcastic remarks down here.
Twitter, America's most trusted source for unbiased facts.
More on Wikipedia: sel.do/dunningkruger
All hail Sir Tim, the great and powerful.
The entire web is just the <A> tag.
Descendant selectors: div ul li
Child selectors: div > ul > li
Sibling selectors: h1 + h2
Attribute selectors: input[type=radio]
Partial attributes: input[data~=bob]
Pseudo-classes: div:first-child
Pseudo-elements: p:first-letter
Media selectors: @media(max-width: n)
NO:
class="big red button"
YES:
class="button" id="buy-button"
Block, Element, Modifier convention:
http://sel.do/bem
http://www.filamentgroup.com/lab/weight-wait.html
http://sel.do/fallbackfont
because sometimes JavaScript never loads
http://www.nngroup.com/articles/designing-effective-carousels/
Nobody uses carousels:
Nobody scrolls horizontally:
http://www.nngroup.com/articles/horizontal-scrolling/
Links go places, buttons do things
Spatial memory is a thing
Remember the hashbang!
http://twitter.com/#!/ded/status/18308450276
is the same as
http://twitter.com/
http://sel.do/mobile
is not optional
Pick two.
Aside: SQL
It's really not that bad.
In defense of SQL:
http://sel.do/sql
ORM is an antipattern:
http://sel.do/orm
Lock them down
HttpOnly = true
Secure = true
Performance issues
Always use HTTPS.
Certs are free! letsencrypt.org
Salt and hash passwords
https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project
Cross Site Scripting
(because CSS, RSS and OSS were taken)
Hi, my name is <script>alert('evil')</script>
http://who.is/dns/jamiehankins.co.uk
SELECT id FROM users
WHERE name = 'someuser'
AND password = 'anything' OR 'x'='x'
password = anything' OR 'x'='x
bob.com/images/../../../mysecret.key
vs
Efficiency
vs
Throughput
vs
Latency
https://blog.kissmetrics.com/loading-time/
http://searchengineland.com/google-now-counts-site-speed-as-ranking-factor-39708
if you're huge
if you're dumb
is another type of speed
Trade storage for speed. Always.
Globals
function foo(x) {
return whereDidThisComeFrom + x
}
function foo(x, god) {
return god.universe.random.thing + x
}
function foo(a,b,doSpecialCase,leapYear,isPrime,isTuesday) {
...
}
function foo(a,b,options) {
...
}
instead
All hail UTC
YYYY-MM-DDTHH:MM:SSZ is your time format
aka W3CDTF
http://www.w3.org/TR/NOTE-datetime
UTF-8 or GTFO
Make the intern do it
is a bullshit term.
These are the hardest skills.
"people will forget what you said,
people will forget what you did,
but people will never forget
how you made them feel."
Maya Angelou
http://blog.ycombinator.com/yc-stats
http://sel.do/sleep
And share what you know
How to find and get a job (by @jewelia)
http://sel.do/findjobs
How to interview other people:
http://sel.do/interviewing
by ganging up
Holy crap it seemed like he would never shut up
Now would be good time to follow me on Twitter!
@seldo
Good questions get t-shirts!