8. Humans
• can’t observe much
• can’t store much in short term memory
• can’t solve moderately complex problems
• are not detail oriented
=> we cant handle “more”
we need simplicity
9. Word origin
• simplex (adj.)
• "characterized by a single part," 1590s, from Latin simplex "single,
simple, plain, unmixed, uncompounded," literally "onefold"
21. Which version is the best?
• for(int i = 0; i < a.length, i++)
vs
• for(int car = 0; car < a.length, car++)
vs
• for(int index = 0; index < a.length; index++)
23. Low Representational Gap
• The ”concept” being modelled should be mirrored by its software
representation.
• Keep the distance between concept and its representation low
46. Functional Programming
• Expression oriented programming
• Functions as first class construct
• Programming with values
• Function composition as a first class mechanism
49. Guess what this function does
• public static int m(int i) {
i = i - ((i >>> 1) & 0x55555555);
i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);
i = (i + (i >>> 4)) & 0x0f0f0f0f;
i = i + (i >>> 8);
i = i + (i >>> 16);
return i & 0x3f;
}
56. Functional Programming
• Expression oriented programming
• Functions as first class construct
• Programming with values
• Function composition
• Higher Order functions
62. Functional Programming
• Expression oriented programming
• Functions as first class construct
• Programming with values
• Function composition
• Higher Order functions
• Behavior rich containers
66. Procedural OO Functional
Reuse Low Low High
Time to Closure High Medium Low
Testability Low Medium High
Development time High Medium Low
# of Artifacts Low Medium HIgh