Archive by Author

Skimmers Guide for Week 15 of Functional Programming for the Object-Oriented Programmer

21 Jul

“…today’s commonplaces of object-oriented programming were mysterious and brain-bending twenty or thirty years ago… Monads and other higher-higher-higher-order abstractions may follow the same trajectory. I hope they do.

What did we read about?

This was our fifteenth week of ‘Functional Programming for the Object-Oriented Programmer‘ by Brian Manick.

We start from Page 141 at section 10.10 Lifting Functions with Monads, finishing at Page 146 at the end of chapter 10!

Only 6 pages to read this week but they are absolutely rammed packed with information and examples.

What stood out?

  • Page 142 – The m-lift monad is introduced which is a concise way to do short-circuiting.
  • Page 144 – The sequence-m monad is introduced as a way of transparently doing looping.

If you read nothing else this week…

  • Page 146 – 10.13 Choose your own adventure – A succinct summary of monads, which bestow upon programmers both great power and great responsibility 😉

Skimmers Guide for Week 14 of Functional Programming for the Object-Oriented Programme

21 Jul

“…functional programming terminology is perhaps slightly less than optimal for novice understanding. That is the case with monad terminology.”

What did we read about?

This was our fourteenth week of ‘Functional Programming for the Object-Oriented Programmer‘ by Brian Manick.

We start from Page 132 at the start of section 10.6 Monads as Data-Driven Extended Continuation-Passing Style. Finish at Page 141 at the end of section 10.9 Exercises

We continue looking at monads and delve into them further. We work on a simplified version of the truth and gradually form a concrete appreciation of the complexity and power of monads!

What stood out?

  • Page 139 – 10.8 Cond is all about “a multi-way” if, appearing much like a switch statement.
  • The exercise at the end of our reading is amusing and gives us our first chance in writing our own monad!

If you read nothing else this week…

  • Page 133 – “The lie” gives you a working understanding of monads, which is absolutely critical.

Skimmers Guide for Week 13 of Functional Programming for the Object-Oriented Programme

8 Jul

“A monad is a collection of functions that can be used to modify stepwise calculations.”

What did we read about?

This was our thirteenth week of ‘Functional Programming for the Object-Oriented Programmer‘ by Brian Manick.

We start from Page 121 “10 Branching and Looping in Dataflow Style” and read all the way through to Page 131 stopping at “10.5 Extending continuation-passing style”.

Going over the “->” and “let” functions again, we compare the linear/non-linear calculation of them both. We look at removing explicit branching through “monads”, which allow us to insert code after the computation steps in the normal flow of our code.

Finally we are introduced to the “continuation-passing style”, revolving around the idea of “flowing the result” of each step of our computation into the next. There are some Exercises to get you to grips with it and then we elaborate on how the style gets evaluated.

What stood out?

  • “10.1 That pesky nil again” (Page 124) – A well worked example of doing nil checking automagically via the “with-monad” and “domonad”.
  • “10.2 Continuation-passing style” (Page 126) – An interesting use of the “->” function which actually makes computation steps clearer.

If you read nothing else this week…

  • Practice the continuation-passing style in Exercises 1 – 3 (Page 127).
  • “10.4 Expansions in Evaluation” (Page 128) gets under the covers of continuation-passing style and how it gets evaluated. We compare this to how the “domonad” gets evaluated and how understanding both is critical to understanding how monads in general work.

Skimmers Guide for Week 12 of Functional Programming for the Object-Oriented Programme

29 Jun

“With loosely-coupled objects that communicate only by passing behaviors (functions) around (rather than entire bundles of state and behavior in the form of objects), the early part of design may become easier.

What did we read about?

This was our twelfth week of ‘Functional Programming for the Object-Oriented Programmer‘ by Brian Manick.

We begin on Page 115 at the start of section 9.4, picking up the exercises from last week’s reading. We finish at Page 120 at the end of chapter 9.

The exercises revolve around putting into practice what we have learnt about “Point-Free Programming”. We are introduced to the new juxt function before being tasked with a diverse set of exercises to test understanding on various topics so far.

Finally we look at higher order functions from the perspective of object orientated programming and how we can decouple our design using “function passing” (either directly in Ruby or via single abstract method interfaces in Java).

What stood out?

  • Exercise 2 introduces the neat little function juxt, definitely a good tool to know about and not a bad exercise either.

If you read nothing else this week…

  • Exercise 7 – 10 are brilliant practice of the Clojure we have learnt so far. Highly recommend everyone gives it a try as they are great for working on your code style and thinking about reducing duplication.
  • “9.5 Higher-order functions from the object-oriented perspective” – only two pages but makes you think about how you should handle your dependencies (on functions or on objects).

Behaviour Driven Development with JavaScript Give Away

20 Jun

“BDD has many different aspects. Which of them are important depends on your perspective.”

We are teaming up again with developer.press, a fledgling book publisher that is changing the way books for software developers are produced.

They specialise in digital books, written by leading experts from across the software development ecosystem. The short format books they produce give you access to key technical know-how for less than the price of a cup of coffee!

This time around we are giving away a mature and enlightening insight into “Behaviour Driven Development with JavaScript” by Marco Emrich (winners will be able to request their desired e-format). Absolutely rammed full of excellent information, the book is nevertheless extremely well paced and reads very easily.

Behaviour Driven Development With JavaScript by Marco Emrich

TO WIN: Simply jump onto the competition section the LJC Book Club Google+ community and +1 the corresponding post!

2 lucky winners will then be picked on Thursday 27th June 2013!

This book is really rich with content (catch the Skimmer’s Guide here) and we are really excited for this and future give-aways with developer.press! Watch this space and check out more from this fantastic new publisher on FacebookGoogle+Twitter and their blog: http://developerpressebooks.wordpress.com/

Skimmers Guide for Week 10 of Functional Programming for the Object-Oriented Programmer

10 Jun

“…I think you could say “There is a thing that we’re justified in saying is an object-oriented architectural style.” We’re not at that point for the functional style yet, so far as I can tell.

What did we read about?

Our tenth week of ‘Functional Programming for the Object-Oriented Programmer‘ by Brian Manick.

We pick up on a new chapter on Page 99, “8 Embedding Functional Code in an OO Codebase”. No exercises this week and we blitz through until the end of the chapter on Page 107.

To be honest, a lot of this chapter is irrelevant or uninteresting, revolving around boilerplate code or SQL. Skimming/skipping through is recommended!

What stood out?

  • Concept of “functional nuggets” in OO code, Page 100. An interesting theory, sadly demonstrated in a rather tedious fashion.

If you read nothing else this week…

  • The big picture, Page 108.  Talking about the evolution of functional programming and looking forward to “Functional Patterns for Enterprise Application Architecture.”

Skimmers Guide for Week 9 of Functional Programming for the Object-Oriented Programmer

8 Jun

“…don’t read Lisp functions from top to bottom… look for the most important code (typically closer to the bottom of the function, often the most visually dense) and read it first.

What did we read about?

This was our ninth week of ‘Functional Programming for the Object-Oriented Programmer‘ by Brian Manick.

We began on Page 90, at the start of section “7.6 Processing Sequences of Maps”. We did the two exercises, starting on Page 94, and then continued reading through to Page 98 at the end of chapter 7.

Continuing with the student courses example, we work through how to manipulate the course data. New and powerful features of Clojure are introduced, such as destructing and external binding.

Rather interesting we finally touch upon design at a high level within functional programming. Brian discusses his thoughts on how to handle encapsulation within a dynamic language as well.

What stood out?

  • Destructuring arguments, Page 92, is an incredibly useful tool that reminds me a lot of pattern matching. Brian covers it very well succinctly, although there promises to be an entire chapter on it later!
  • Avoiding argument passing by using external binding is a very interesting topic (starting on the bottom of  Page 94). Again it will be covered in a later chapter but is raises the interesting design question on where and when to “nest functions”?

If you read nothing else this week…

  • Information Hiding, Page 98, brief but thought provoking section on encapsulation. Do you think using private helper functions and file based modularity is enough?
  • Discussion of the pros and cons of nesting functions, bottom of Page 96. In functional programming, does deciding on the number of higher level functions to use and their responsibilities reflect the design of classes in imperative programming?

Skimmer’s Guide for Week 6 of Functional Programming for the Object Oriented Programmer

13 May

“I picked the rather odd name method-cache to give me an excuse to point out that this implementation isn’t completely silly.”

What did we read about?

This is our sixth week reading Functional Programming for the Object Orientated Programmer.

  • Begin on page 56 at the start of the chapter, read until page 73,  leaving exercises for next week.

This week we finally start learning about Recursion and how it can be used to implement Inheritance in our object system. We touch on using assert for pre-conditions and define a superclass “Anything”. In a rather round-about fashion, we look at how we can do method overriding.

Although rather slow and slightly patronising at times, the book covers different patterns for recursion and visits the problem of tail recursion.

What stood out?

  • The use of a method-cache to do method overriding is very silly but somewhat interesting.

If you read nothing else this week…

  • Try to get to grips with all the types of Recursion, this will stand you in good stead to do the exercises next week.

Skimmer’s Guide for Week 5 of Functional Programming for the Object Oriented Programmer

5 May

What did we read about?

This is our fifth week reading Functional Programming for the Object Orientated Programmer.

  • Begin on page 54, doing all five exercises from the last chapter “Moving the Class Out of the Constructor”.

Very straight forward this week, we are using all the knowledge we have been building up to complete these fairly straightforward exercises. A good chance for people to catch up as well!

What stood out?

  • The first exercise is excellent for practicing refactoring Clojure functions and making them more manageable through helper functions.

If you read nothing else this week…

  • Exercise 4 introduces a neat trick which isn’t intuitive, kudos if you complete it without hints!

Presenting For Geeks Give Away

3 May

“A presentation is not about the content or about you – it’s about the audience.”

We are continuing our partnership with developer.press, a new kind of book publisher that is changing the way books for software developers are produced.

They specialise in digital books, written by leading experts from across the software development ecosystem. The short format books they produce give you access to key technical know-how for less than the price of a cup of coffee!

This time around we are giving away the wonderful and concise “Presenting for Geeks” by Dirk Haun (winners will be able to request the e-format). Reassuringly well presented, he takes us on a journey on how to convey a memorable message.

Presenting for Geeks by Dirk Haun

TO WIN: Simply jump on our Google+ community and post a comment in the corresponding post! (e.g. “I want to win Presenting for Geeks”)

2 lucky winners will then be picked on Friday 17th May 2013!

We’re really like this book (catch the Skimmer’s Guide here) and excited for future give-aways with developer.press! Watch this space and check out more from this fantastic new publisher on FacebookGoogle+Twitter and their blog: http://developerpressebooks.wordpress.com/