Becoming Functional
Steps for Transforming Into a Functional Programmer
Publisher: O'Reilly Media
Final Release Date: July 2014
Pages: 152

If you have an imperative (and probably object-oriented) programming background, this hands-on book will guide you through the alien world of functional programming. Author Joshua Backfield begins slowly by showing you how to apply the most useful implementation concepts before taking you further into functional-style concepts and practices.

In each chapter, you’ll learn a functional concept and then use it to refactor the fictional XXY company’s imperative-style legacy code, writing and testing the functional code yourself. As you progress through the book, you’ll migrate from Java 7 to Groovy and finally to Scala as the need for better functional language support gradually increases.

  • Learn why today’s finely tuned applications work better with functional code
  • Transform imperative-style patterns into functional code, following basic steps
  • Get up to speed with Groovy and Scala through examples
  • Understand how first-class functions are passed and returned from other functions
  • Convert existing methods into pure functions, and loops into recursive methods
  • Change mutable variables into immutable variables
  • Get hands-on experience with statements and nonstrict evaluations
  • Use functional programming alongside object-oriented design
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyBecoming Functional
 
3.3

(based on 9 reviews)

Ratings Distribution

  • 5 Stars

     

    (1)

  • 4 Stars

     

    (4)

  • 3 Stars

     

    (2)

  • 2 Stars

     

    (1)

  • 1 Stars

     

    (1)

75%

of respondents would recommend this to a friend.

Pros

  • Helpful examples (7)
  • Easy to understand (6)

Cons

    Best Uses

    • Intermediate (4)
    • Novice (3)
    • Student (3)
      • Reviewer Profile:
      • Developer (8)

    Reviewed by 9 customers

    Sort by

    Displaying reviews 1-9

    Back to top

     
    4.0

    A good starting point

    By ksnortum

    from Portland, OR

    About Me Developer

    Verified Reviewer

    Pros

    • Easy to understand
    • Helpful examples

    Cons

    • Some Code Example Errors

    Best Uses

    • Intermediate
    • Student

    Comments about oreilly Becoming Functional:

    This book is for a fairly small group of people: Java or C# programmers who are looking to add the functional style of programming to their repertoire. It takes you through functional styles that apply to Java, then transitions to Groovy, a Java-like language, then to Scala. It is not a complete discussion of the subject but more of a "get your feet wet" navative.

    I got a lot from the book and I appreciated its "write and refactor" style. Some of the less glowing reviews probably come from people who didn't know (or didn't like) the scope and purpose of the book.

    (1 of 1 customers found this review helpful)

     
    2.0

    Not Very Helpful

    By Craig, Programmer

    from Ithaca, NY

    Verified Reviewer

    Comments about oreilly Becoming Functional:

    I didn't find this book terribly useful. Functional programming is supposed to be hot, but after reading this book I found myself asking "Why?" It doesn't make the code any shorter, easier to read, faster, ... at least that we could see from the examples given.

    I had two big problems. First is this looming figure of "the pointy haired boss" who tells the author to do nonsensical things with code. That's a pretty lame attempt to weave this into a narrative. But it also makes you think, "Doing stupid things with functional programming ... is still stupid."

    The second is using any sort of Java to teach functional programming. It ends up being extremely painful (basically you end up writing one class for every first-class function). And any Java programmer would've just given up and done the work with introspection and reflection. I mean, any programming concept could be taught in any Turing-complete language ... hell, you COULD teach OOP in Assembler. But the plumbing you have to write is so vast that it obscures the real point.

    I found "7 Concurrency Models in 7 Weeks" more helpful in understanding both the WHY and the HOW of functional programming.

    (4 of 5 customers found this review helpful)

     
    1.0

    Unreadable

    By Tired Old Queenslander

    from Toowoomba Queensland

    About Me Designer, Developer

    Verified Buyer

    Pros

      Cons

      • Difficult to understand

      Best Uses

        Comments about oreilly Becoming Functional:

        Why would anyone choose Java to demonstrate functional programming. The very low "signal to noise" ratio of Java code makes it a bad choice to illustrate any programming concept especially in an e-book but its OOP emphasis makes it even more inappropriate for promoting functional programming.

        (1 of 1 customers found this review helpful)

         
        5.0

        Great Intro into Functional Style

        By The Professional Heretic

        from Independence, MO

        About Me Developer

        Verified Reviewer

        Pros

        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

        • Few Editing Errors

        Best Uses

        • Expert
        • Intermediate

        Comments about oreilly Becoming Functional:

        I was interested in this book, primarily because I have always been of the opinion that some of the code I've written for a couple of programs I've developed could be better written using a functional model as opposed to the traditional declarative programming model I learned in school. After reading this book, I've realized my instincts are better than I thought and that I'm right in that belief.

        Mr. Backfield does a very good job stepping the reader through a fictional company where, as a developer, you're trying to make some of their back end programming more efficient and more responsive to the user. He starts by walking you through the company's code and then refactoring it step-by-step to more and more functional paradigms. Along the way, he does a good job of explaining functional programming in brief and how factoring the functions can make everything work more efficiently.

        When I read the book for review, I only had the first six chapters available, but the chapters on immutable variables and recursion were enough for me to be sufficiently impressed and to have some ideas on where to take my own code. I am certainly going to go back and finish the book and work my way through the code.

        Even though the code examples are in Java and Groovy, it's not difficult to see how to change them over to C# and possibly F#. (For programmers like myself in the ASP.NET world.) With this in mind, it won't be hard at all to work out the refactoring method by method.

        Overall, for an experienced declarative programmer, this is a great introduction and a good guide to adding in functional concepts where they are called for. For less experienced programmers, this is a great way to look at a new paradigm while gaining a good understanding of how it can work in the real world. I heartily recommend the book for anyone interested.

         
        3.0

        For functional newbies coming from Java

        By Samuel Bosch

        from Gent, Belgium

        About Me Developer

        Verified Reviewer

        Pros

        • Easy to understand
        • Helpful examples

        Cons

        • Not comprehensive enough

        Best Uses

        • Novice
        • Student

        Comments about oreilly Becoming Functional:

        Keeping in mind the public this book is written (Java developers) for it is a rather good book if you like the style of writing. The book is written from the perspective of a java business programmer writing for company XXY so all examples involve customers and contacts and things like that. There are lots of examples and decent explanations of these examples but you have to be patient because the best way to do something is sometimes only introduced after multiple in between solutions. The switch from Java to Groovy and Scala throughout the book was a great idea.

        (1 of 1 customers found this review helpful)

         
        4.0

        Good book for Java developers

        By Andrei Maxim

        from Bucharest, Romania

        About Me Developer

        Verified Reviewer

        Pros

        • Accurate
        • Easy to understand
        • Helpful examples

        Cons

          Best Uses

          • Novice
          • Student

          Comments about oreilly Becoming Functional:

          I'm reviewing the "Early Release" version of the book, so I'm assuming that all the grammar errors or typos will be fixed in the final version. I've seen the other reviews touch this point, but I think it's unfair to do that at the moment.

          I'm guessing that the contents of the book are great for regular Java developers that want to get quickly up to speed with functional programming and some introductory information regarding two JVM-based languages like Scala and Groovy that are easier to use when transitioning to the functional paradigm. Probably I would have given it five stars if I was a Java programmer, but I'm not and that slight requirement is not obvious from the book description.

          The content is quite good. It tries to refactor a small Java class that's written quite poorly using functional techniques, bit by bit, explaining along the way why things should be done like that or what is the problem with the current code.

           
          4.0

          Great knowledge - bad spelling/grammar!

          By mrj2

          from Scotland, UK

          About Me Developer

          Verified Buyer

          Pros

          • Helpful examples

          Cons

          • Bad Spellinggrammar

          Best Uses

          • Intermediate

          Comments about oreilly Becoming Functional:

          I like the way the book evolves moving from Java to Groovy. I can see where functional programming will be useful and how this could be done using Java/Groovy. The book contains spelling and grammar mistakes which should be taken out before being published.

          (1 of 1 customers found this review helpful)

           
          4.0

          Becoming Functional

          By Ed

          from Texas

          About Me Developer, Educator

          Verified Buyer

          Pros

          • Easy to understand
          • Helpful examples

          Cons

            Best Uses

            • Intermediate

            Comments about oreilly Becoming Functional:

            I like it. I'm a .NET developer but so far samples are easily converted to C# & then F# as I go though the book. I'm not done yet but really like the approach.

            (3 of 6 customers found this review helpful)

             
            3.0

            A bit short, early release needs editing

            By Dr. Curmudgeon

            from Cow Hampshire

            About Me Developer

            Verified Reviewer

            Pros

            • Easy to understand
            • Good Functional Primer
            • Helpful examples

            Cons

            • Pre-java 8 Is A Bad Fit
            • Too many errors

            Best Uses

            • Novice

            Comments about oreilly Becoming Functional:

            I think the two main things that hurt this book are that the pre-release version obviously hasn't been edited yet (meaning some formatting issues and loads of spelling and grammatical errors), and that Java 8 isn't included (albeit for good reasons).

            Functional programming pre-Java 8 looks to make your eyes bleed, which only obscures the overall important concept of this book and the ideas it attempts to convey.

            Displaying reviews 1-9

            Back to top

             
            Buy 2 Get 1 Free Free Shipping Guarantee
            Buying Options
            Immediate Access - Go Digital what's this?
            Ebook: $23.99
            Formats:  DAISY, ePub, Mobi, PDF
            Print & Ebook: $32.99
            Print: $29.99