Focus, SCNA 2011

50

description

This was a talk that I gave at SCNA 2011. It's a bit old but recently requested.

Transcript of Focus, SCNA 2011

Page 1: Focus, SCNA 2011
Page 2: Focus, SCNA 2011

Mastery

Page 3: Focus, SCNA 2011

Local Maximas

Page 4: Focus, SCNA 2011

Focus

Page 5: Focus, SCNA 2011

Masters can melt people with their minds

Page 6: Focus, SCNA 2011

We spend most of our time here

Page 7: Focus, SCNA 2011

Mihaly Csikszentmihalyi on flow

Page 8: Focus, SCNA 2011

What is flow?

Page 9: Focus, SCNA 2011

I’ll give you a hint...

Page 10: Focus, SCNA 2011

?

Page 11: Focus, SCNA 2011

Flow != meditation

Page 12: Focus, SCNA 2011

The mental states are remarkably similar

Page 13: Focus, SCNA 2011

The flow of a master is much more effective

Page 14: Focus, SCNA 2011

Our nervous system can only process 110

bits of information per second

Page 15: Focus, SCNA 2011

Effects

• Completely involved (no notion of self)

• A sense of ecstasy

• Inner Clarity

• Confidence in skills to solve the problem

• Serenity

• Timelessness

• Intrinsic motivation

Page 16: Focus, SCNA 2011

Focus has an enemy

Page 17: Focus, SCNA 2011
Page 18: Focus, SCNA 2011

25

Page 19: Focus, SCNA 2011

When you over caffeinate, your nervous system can’t funciton

properly

Page 20: Focus, SCNA 2011

You can’t enter proper flow when in this state

Page 21: Focus, SCNA 2011

BS!

Page 22: Focus, SCNA 2011

We spend most of our time here

Page 23: Focus, SCNA 2011

Achieving mastery requires proper focus

Page 24: Focus, SCNA 2011

How do we get there?

Page 25: Focus, SCNA 2011

Power

Page 26: Focus, SCNA 2011

Power comes in multiple forms

Page 27: Focus, SCNA 2011
Page 28: Focus, SCNA 2011

Locality

Page 29: Focus, SCNA 2011

Know when to apply what kind of power

Page 30: Focus, SCNA 2011

Sometimes power > elegance

Page 31: Focus, SCNA 2011

Work in tools that allow flexible

application of power and elgance

Page 32: Focus, SCNA 2011

Simplicity

Page 33: Focus, SCNA 2011

example: refactor apache

commons isBlank

���33

Page 34: Focus, SCNA 2011

public class StringUtils { ! public static boolean isBlank(String str) { ! int strLen; ! if (str == null || (strLen = str.length()) == 0) { ! return true; ! } ! for (int i = 0; i < strLen; i++) { ! if ((Character.isWhitespace(str.charAt(i)) == false)) { ! return false; ! }! }! return true;! }!}

initial implementation

���34

Page 35: Focus, SCNA 2011

public class StringUtils { ! public isBlank(str) { ! if (str == null || (strLen = str.length()) == 0) { ! return true; ! } ! for (i = 0; i < strLen; i++) { ! if ((Character.isWhitespace(str.charAt(i)) == false)) { ! return false; ! }! }! return true;! }!}

- type decls

���35

Page 36: Focus, SCNA 2011

public isBlank(str) { ! if (str == null || (strLen = str.length()) == 0) { ! return true; ! } ! for (i = 0; i < strLen; i++) { ! if ((Character.isWhitespace(str.charAt(i)) == false)) { ! return false; ! }! }! return true;!}

- class

���36

Page 37: Focus, SCNA 2011

public isBlank(str) { ! if (str == null || (strLen = str.length()) == 0) { ! return true; ! } ! every (ch in str) { ! Character.isWhitespace(ch);! }! return true;!}!

+ higher-order function

���37

Page 38: Focus, SCNA 2011

public isBlank(str) { ! every (ch in str) { ! Character.isWhitespace(ch);! }!}

- corner cases

���38

Page 39: Focus, SCNA 2011

(defn blank? [s] ! (every? #(Character/isWhitespace %) s))

lispify

���39

Page 40: Focus, SCNA 2011

public class StringUtils { ! public static boolean isBlank(String str) { ! int strLen; ! if (str == null || (strLen = str.length()) == 0) { ! return true; ! } ! for (int i = 0; i < strLen; i++) { ! if ((Character.isWhitespace(str.charAt(i)) == false)) { ! return false; ! }! }! return true;! }!}

initial implementation

���40

Mutable state

Exit point

Exit point

Exit point

Condition

Condition

Loop

Page 41: Focus, SCNA 2011

Ok, i’m confused, how does this apply to

mastery?

Page 42: Focus, SCNA 2011

Focus and flow let us realize our potential

Page 43: Focus, SCNA 2011

We learn by stretching beyond our limits

Page 44: Focus, SCNA 2011

Entering flow helps us become more self

aware

Page 45: Focus, SCNA 2011

We should be tactically moving hereAnd sometimes here

Page 46: Focus, SCNA 2011

Effective focus helps you level up faster

Page 47: Focus, SCNA 2011

You need to work with tools and languages that

allow proper focus

Page 48: Focus, SCNA 2011

Choose sleep over caffiene

Page 49: Focus, SCNA 2011
Page 50: Focus, SCNA 2011

Thank You!

[email protected]

• @abedra

• thinkrelevance.com