Tuesday, July 12, 2011

Pointfree

http://www.haskell.org/haskellwiki/Pointfree

it is clearer to write
let fn = f . g . h
than to write
let fn x = f (g (h x))

The term originated in topology, a branch of mathematics which works with spaces composed of points, and functions between those spaces. So a 'points-free' definition of a function is one which does not explicitly mention the points (values) of the space on which the function acts. In Haskell, our 'space' is some type, and 'points' are values.

Pros
This style is particularly useful when deriving efficient programs by calculation and, in general, constitutes good discipline. It helps the writer (and reader) think about composing functions (high level), rather than shuffling data (low level).
It is a common experience when rewriting expressions in pointfree style to derive more compact, clearer versions of the code -- explicit points often obscure the underlying algorithm.


Cons
Point-free style can (clearly) lead to Obfuscation when used unwisely. As higher-order functions are chained together, it can become harder to mentally infer the types of expressions. The mental cues to an expression's type (explicit function arguments, and the number of arguments) go missing.
Point-free style often times leads to code which is difficult to modify. A function written in a pointfree style may have to be radically changed to make minor changes in functionality. This is because the function becomes more complicated than a composition of lambdas and other functions, and compositions must be changed to application for a pointful function.
Perhaps these are why pointfree style is sometimes (often?) referred to as pointless style.

eta conversion

http://www.haskell.org/haskellwiki/Eta_expansion

eta conversion (also written η-conversion) is adding or dropping of abstraction over a function. For
example, the following two values are equivalent under η-conversion:
\x -> abs x
and
abs
 
Converting from the first to the second would constitute an eta reduction, and moving from the second to the first would be an eta abstraction. 

Friday, June 24, 2011

Language Classifications

Strict (call-by-value)
Lazy (call-by-need)
Pure
Static
Dynamic
Duck-typed
Functional
Object-oriented













LanguagePureStrictNon-Strict (Lazy)
HaskellYesNoYes
ML
Erlang
Scheme
Java
C#
Scala
Ruby
F#
SQL
Regex

OCaml notes

Functional core of Objective CAML:

http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora015.html

Variables are variable:
# let p = 10 ;;
val p : int = 10
# let k x = (x, p, x+p) ;;
val k : int -> int * int * int =
# k p ;;
- : int * int * int = 10, 10, 20
# let p = 1000 ;;
val p : int = 1000
# k p ;;
- : int * int * int = 1000, 10, 1010
 
http://caml.inria.fr/pub/docs/manual-ocaml/expr.html

Looping:
while expr1 do  expr2 done
for name =  expr1 to  expr2 do  expr3 done
for name =  expr1 downto  expr2 do  expr3 done 
Exceptions: try ... with ... -> ...
Objects
Coercion (casting to superclass): subobject :> superclass
Message sending (calling method on object): object # method
Object duplication: Oo.copy
Recursive functions: rec
String concatenation: ^
 
Characters delimited by ` not ': `a`
 
http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora016.html#toc21 
Tuples
Records
Sum Types
Constant Constructor: type suit = Spades | Hearts | Diamonds | Clubs ;; 
  Constructor with Args: type card = King of suit | Queen of suit | Knight of suit | Knave of suit | Minor_card of suit * int | Trump of int | Joker ;;
Recursive Types
Parameterised Types: type ('a, 'b) list2 =

Monday, June 13, 2011

Yow Night - Cloud

Cloud
8/6/2011

Tim Buntel – MS SQL Azure
www.windowsazurepass.com
Promocode: Azurecloud

Clayton Brown – SalesForce
IaaS, PaaS, Saas

Hardy – Ninefold
Iaas
5 key concerns
• Latency
• Self-service
• Data jurisdiction
• Solid financial backing
• Local support
XenServer or VMWare
CentOS, Open SUSE, Ubuntu, Windows 2003/08
Upload ISO
Don’t pay if don’t use
Starts from 2.2c/hr ($30/m) 1 CPU, 384Mb RAM, 80Gb HDD


James Durell – SpringSource Cloud Foundry
Open PaaS
github.com/cloudfoundry


Security?
Risk?
Insurance?
DR?

Yow night – 12 Agile Adoption Failure Modes


Jean Tabaka
9/6/2011

Rally: Tim Miller, Ryan Martins

pm.stackexchange.com
Most orgs have suicidal tendencies
It’s about caring for your world
David Snowden sense making – failure stories are most powerful
Agile helps me be a better me/artist – create your own reality

  1. Checkbook commitment
    1. Unengaged – just do it
  2. Culture that doesn’t support change
    1. “Follow the plan”
    2. Need to change the metrics
    3. Best practices… good practices… emergent practices
    4. Standard of work enforced
                                                               i.      Governance = conformance
                                                             ii.      Standard of work is static
                                                            iii.      Cross-org uniform
                                                           iv.      Detailed documentation security blanket
                                                             v.      PMO as enforcers
  1. Ineffective use of retrospectives
    1. “This sucks” threshold  – if nothing’s gonna change, why bother?
    2. Should ask:
                                                               i.      What are we doing well?
                                                             ii.      What’s not serving us as a team?
                                                            iii.      What would we change to improve?
    1. No retrospective
    2. There is absolutely nothing wrong
    3. No action
  1. Stable environment?
  2. TANSTAAFL – There ain’t no such thing as a free lunch
    1. Will work for infrastructure
  3. Lack of full planning participation
    1. Waiting for decisions = waste
    2. Conversation
    3. Unavailable product owner
    4. Too many product owners
    5. Too busy for all the communicating
    6. Product owner = hardest role. What does product owner get out of it?
    7. Commitment with team
  4. Bad scrum masters
    1. Command and control
                                                               i.      Telling people what to do = Low morale and lower IQs
                                                             ii.      Cognitive abilities approve the more decisions we make
    1. Servant Leader
                                                               i.      Serve and facilitate
                                                             ii.      Remove impediments
  1. Not having an onsite evangelist
  2. Team lacking
    1. Red tape decisions
    2. Not forming, storming, norming, performing
  3. Testing not pulled forward
    1. Pushed to deliver
    2. Increased defects
    3. Failure-demand work vs value-demand work
    4. Piled up trash
    5. Stop the line
  4. Traditional performance appraisals
    1. Manager’s yearly evaluation
    2. Individual heroics rewarded – holds back agile success
    3. Frequent team evaluation
  5. Reverting to form
    1. Change is hard

“Drive” Daniel Pink

Saturday, June 11, 2011

Monads for Java Programmer

http://irekjozwiak.com/entry/2009/06/13/Monads-for-Java-C---programmers.html

(>>=) bind
a1 >>= a2 = join (fmap a2 a1)
 
fmap _            Nothing       = Nothing
fmap someFunction (Just a)      = Just (someFunction a)
 
> fmap (+ 2) (Just 4)
Just 6
> fmap (+ 2) (Nothing)
Nothing
join Nothing         = Nothing
join (Just Nothing) = Nothing
join (Just (Just x)) = Just x