Archive | Book Club RSS feed for this section

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

20 May

“Pat yourself on the back! You have both used and implemented the built-in function reduce, perhaps the most dreaded of all sequence functions.”

What did we read about?

It’s our seventh week of ‘Functional Programming for the Object-Oriented Programmer‘ by Brian Manick.

We come to the end of the “Embedding and Object Oriented Language” with some exercises and a bit of wrap up.

  • Begin on Page 73 at section 6.4 Exercises

    • Exercise 1 (Page 73)
    • Exercise 2 (Page 74)
    • Exercise 3
    • Exercise 4 (Page 75)
    • Exercise 5
    • Exercise 6
  • Finish at Page 77 at the end of chapter 6

Screenshot_14_05_2013_12_56

What stood out?

  • Anybody playing the functional tutorial drinking game can take two drinks: one for recursion and the other for factorial 😉
  • The answer for each exercise feeds into the next, building up the complexity to use increasingly sophisticated forms of recursion.
  • The exercises conclude by introducing the powerful reduce function.

If you read nothing else this week…

  • Whatever you do make sure you complete exercises 1 to 6.
  • Exercise 5 is partially tricky, kudos if you complete it without hints! (note the result doesn’t have to be in-order)

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/

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

1 May

“This reality is usefully obscured by the language so that programmers can, without thinking, do wonderful things, blissfully pretending that the pictures in their head are what the computer is really doing.”

What did we read about?

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

  • Begin on page 47 (“All the Class in a Constructor”) and read until page 54, leaving the exercises for next week.

The bare believable object from week three is developed further by moving the Class out of the constructor and introducing object instantiation and message dispatch.

What stood out?

  • The Let special form was introduced.

If you read nothing else this week…

  • Make sure you read about the Let special form.

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

25 Apr

“Given a large enough dos elf magic mushrooms, we can hallucinate that the class-of, x and y callables are instance methods of Point”

What did we read about?

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

  • Begin “I Embedding an Object-Oriented Language”, read until p. 46 (“All the Class in a Constructor”)

We delve into writing a pseudo object-orientated language within Clojure. Firstly we cover the semantic/definitions of everything we will be dealing with (i.e. objects, instances). Whilst a bit verbose, it helps to establish a common ground for which we can all work off.

With all that out of the way, we dive into implementing a basic geometry. We gradually build up Point objects, adding methods until we have reached Triangles!

As always, the exercises at the end serve as excellent tests of your understanding on the topic. Although the material covered may not be vast, it is important to practice programming functionally to make the next part of the book easier to grasp.

What stood out?

  • The introduction explains this chapter well as a section focussing on giving us the “opportunity to practice programming in a functional language”. This experience will “make the topics in the next part of the book easier to grasp”.
  • Exercise 3 & 4 are actually fairly involved and challenge you to think in the functional way.

If you read nothing else this week…

  • Jump straight to “A Barely Believable Object” to get into the implementation details!

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

14 Apr

“How do you write loops in Clojure? You don’t (mostly).”

What did we read about?

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

  • Finish Chapter 1 – from 1.11 Vectors

After discussing vectors and how they differ to lists we finally discuss what we might consider the basic elements of a programming language: loops, conditionals and different methods for passing parameters.  The chapter concludes with four pages of exercises.

In a language like Java we are usually introduced to the control flow first and the data structures come later.  Here the reverse approach is taken: with a discussion on data structures coming first and the control flow following.  The chapter is then disparaging about both conditionals and loops.

What stood out?

  • In structured programming there are three basic constructs: sequence, selection and repetition.  In functional programming sequence is achieved using lists.  Conditionals are introduced with a reference to the Anti-IF Campaign and regarding repetition we are told that we dont write loops (mostly).  This book is forcing us to think about programming in a new way.
  • Rather than walking through the common functions the reader is given an exercise (5) with a list and told to think of a problem it could solve and then solve it.  The reader is not being spoon fed.

If you read nothing else this week…

  • Work through the exercises in section 1.18.

Further research

  • If you’re new to Clojure then I would strongly recommend Clojure Made Simple.  It will provide you with many essential tips that will help you stay sane.  In section 2.8, for example, you’ll find out how to access the built in docs are referred to in exercise 5.  Type “(doc take)” at the  REPL and you’ll quickly discover that it “returns a lazy sequence of the first n items in coll,”  That will definitely help you keep your sanity.
  • Take a look at the Anti-IF Campaign.
  • The classic book Thinking Forth has an excellent chapter on “Minimizing Control Structures:”  “The use of control structures adds complexity to your code.  The more complex your code is the harder it will be for you to read and maintain. The more parts a machine has, the greater are its chances of breaking down.  And the harder it is for someone to fix.”  The principles explained are good for any language.

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

7 Apr

“hold off on thinking that programming without an assignment statement has to be crazy hard–it’s part of this book’s job to show you it’s not.”

What did we read about?

This week we started our second book, Functional Programming for the Object Orientated Programmer.

  • Chapter 1 – Up to 1.10 Lists

After the rapid pace of our last book, we are taking things slow and steady as we get to grips with Clojure and functional programming. As you would expect, the opening chapter of the book introduces Clojure and the options you have for setting it up on your machine (IDE or command line tools like Leningen).

Following this the author covers all the basics, including defining functions and handling the list data structure. The exercises at the end are very basic but help to ensure you have a good grip of everything that was covered so far.

The Lazy REPL Bird

In start contrast to the approach taken in the “Well Grounded” chapter this short introduction focuses more on how the REPL is implemented than how it is used.  It talks about evaluator is anthropomorphised as a lazy little bird eating up parentheses, tokens and symbols.  There are many pictures but it doesn’t seem to cover a lot of ground.  The exercises seem rather simplistic – returning the second and third elements in a list.  The introduction is focusing on how the functional code’s execution style is different to the object oriented apporach the reader is used to.

What stood out?

  • The Clojure REPL (Read-Eval-Print Loop) walkthrough, including an easy explanation on how it actually works.
  • Thinking of functions as ‘values’ and embracing pure immutability.

If you read nothing else this week…

  • Check out Light Table which has an excellent ‘Instarepl’ feature which is great for beginners and experts alike (neat video demo here)
  • If you already know the functional basics you can skim most of this weeks content.  It’s just a simple introduction to the REPL.
  • If you’re new to functional languages then you need to work through this text carefully.  The ideas being introduced are simple but fundamental to understanding the rest of the book.

Further research

  • If you need to take more time learning the Clojure Language then check out Clojure Made Simple.  It was written by our very own John Stevenson.  He knows a thing or two about real world Clojure.  John’s approach to introducing Clojure is far more practical than this weeks chapter.
  • Rich Hickly, the creator of Clojure, has an excellent presentation on InfoQ called “Simple Made Easy.”  In it he talks about the design philosophy behind the language.

Well Grounded: February’s Packt Publishing Competition

13 Feb

If you want to have a chance of winning one of this months books then please sign up on the Meetup page.  

At the end of February the lucky winner will get a physical copy with an ebook for the runner up.

The Well Grounded Java Developer

February sees the start of our regular reading schedule.  Our first book, the Well Grounded Java Developer, provides a whistle-stop tour of everything that is important right now in the world of Java Development: new language features, the underlying JVM, alternative languages and continuous integration.

After these brief introductions readers will want to dig deeper, and this month we’ll be looking at a selection of books offered by Packt Publishing that will be perfect for taking things further.

You can win any one of these books again this month by signing up on the Meetup page.  First prize is a physical copy the second prize is an electronic version.

Vital Java

In the first part of their book Ben and Martijn help us to understand the difference between the Java language and the Java platform.  These are the tools of our trade and as craftsmen we need to know them well.

Java 7 New Features Cookbook

Father and daughter team Richard and Jennifer Reese provide a well considered set of recipes for the new feature that were introduced in Java 7.

Oracle JRockit: The Definitive Guide

Marcus Hirt and Marcus Lagergren book is not for the beginner.  The second chapter explains why adaptive code generation is harder in a JVM than a static environment.  After that they go deep.  The book covers memory mangement, threading and other fundamental building blocks of the Java platform.  Some of the tooling is starting to date a little (the book is three years old) but the insights it provides are timeless.

The Groovy Polyglot

While java isn’t ideal for solving problems in the dynamic layer Groovy most certainly is.

Groovy for Domain-Specific Languages

Author Fergal Dearle shows us the power of Domain Specific Languages.  He shows us how we can open up the development process to other stakeholders and improve our own productivity.

Grails 1.1 Web Application Development

Developing web applications is a dynamic activity and Jon Dickinson shows us how to conquer it using the Grails framework.  Along the way you will achieve a great deal without have to write much code.

Well Crafted

A good build environment is essential for a craftsmanship based approach to development.  If you are to get the immediate feedback that you need to improve yourself and your code you need it built, deployed and tested quickly and automatically. Maven and Jenkins help you to achieve this.

Apache Maven 3 Cookbook

Maven is popular but polarising.  If you are to be one of those people who loves Maven then you will have to get to know it well.

This cookbook by Srirangan shows how Maven can be used as part of an Agile team environment, favouring quick practical examples over the lengthy discussion and long property lists of some other Maven books.

Jenkins Continuous Integration Cookbook

Author Alan Mark Berg has a degree, two masters and a teacher qualifications.  He has also written two books on Sakai.  On top of that he has found time to write this practical guide to Jenkins.  Here is a man who clearly knows a thing or two about productivity.

As well as an introduction to Jenkins the book is also an introduction to the Jenkins community.  This adds an extra, important dimension that is often overlooked.

Our First Book: The Well Grounded Java Developer

23 Jan

The Well Grounded Java Developer

After conversations on our Google+ community we’ve decided to kick off our reading with “The Well Grounded Java Developer.”  It’s a book written by LJC members Martijn and Ben and published by Manning.

It’s the perfect starting book because it covers so much.  In just a couple of months we’ll have read and talked about everything that matters.  It’s ideal for both the beginner and the experienced developer who needs to catch up.

Every monday I’ll do a kick off post to help everybody pace themselves.

The Schedule

  • Week 1: Developing with Java 7 
    • Chapter 1. Introducing Java 7
    • Chapter 2. New I/O
  • Week 2: Vital Techniques
    • Chapter 3. Dependency Injection
    • Chapter 4. Modern concurrency
  • Week 3: Going Deeper
    • Chapter 5. Class files and bytecode
    • Chapter 6. Understanding performance tuning
  • Week 4: Polyglot Programming on the JVM
    • Chapter 7. Alternative JVM languages
    • Chapter 8. Groovy: Java’s dynamic friend
  • Week 5: Functional Programming on the JVM
    • Chapter 9. Scala: powerful and concise
    • Chapter 10. Clojure: safer programming
  • Week 6: Crafting the polyglot project
    • Chapter 11. Test-driven development
    • Chapter 12. Build and continuous integration
  • Week 7: The End is Near
    • Chapter 13. Rapid web development
    • Chapter 14. Staying well-grounded

Slow and Steady

This is probably slower than most of us usually take to finish a book this size.  Taking it more slowly will give us a chance to try all the examples and go off on some tangents.