Commons Functor
  1. Commons Functor
  2. FUNCTOR-4

[PATCH] Add easily accessible, user-friendly examples

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0
    • Labels:
      None

      Description

      Perhaps we could add some pages with examples to the project site?

      As pointed by Emmanuel Bourg, at moment the examples point directly to classes in the SVN. We could add some basic examples and also point to sample code in the SVN, something similar to what is done in DBUtils [1] and Commons-Pool [2].

      I'm reading FP for Java Developers, there are some basic examples that could be implemented using Functor and put in the Examples page (I believe grand part is already implemented in the tests classes).

      [1] http://commons.apache.org/dbutils/examples.html
      [2] http://commons.apache.org/pool/examples.html

      1. FUNCTOR-4.patch
        20 kB
        Bruno P. Kinoshita

        Activity

        Hide
        Matt Benson added a comment -

        This is probably possible, but based on the text in preface section 3 we should seek permission IMO, even if the code is not directly copied. Better safe than sorry.

        Show
        Matt Benson added a comment - This is probably possible, but based on the text in preface section 3 we should seek permission IMO, even if the code is not directly copied. Better safe than sorry.
        Hide
        Bruno P. Kinoshita added a comment -

        You're right indeed Matt. Thanks for the heads up.

        Perhaps we could then create just basic examples covering the basics (Functor, Predicate, Procedure, operations on data structures) without using the examples of the book, what would be simpler.

        Show
        Bruno P. Kinoshita added a comment - You're right indeed Matt. Thanks for the heads up. Perhaps we could then create just basic examples covering the basics (Functor, Predicate, Procedure, operations on data structures) without using the examples of the book, what would be simpler.
        Hide
        Bruno P. Kinoshita added a comment - - edited

        Added a patch with some examples for review.

        Also uploaded the site to http://www.kinoshita.eti.br/public_files/site/examples.html, so you can see it in your browser too.

        • Added links to javadoc, just like DBTUtils does
        • Added examples for Predicate, Function and Procedure, following the order that they appear in the main page
        • Added an extra example that combines the three functors with generator and composite functors
        • Removed the information on how to build
        • Moved the practical part (and more advanced) to the bottom of the page, so the reader may already have some notion on the basics before reading it

        Seems like the links to all the code katas are being redirected to http://pragdave.pragprog.com/. Not sure if they are available somewhere else or should be removed/updated.

        I'm learning functional programming to use Functor in another open source project, so forgive me in case there are any mistakes. Feel free to modify the patch, criticize or propose changes. No hard feelings

        Cheers, have a great WE.

        Bruno P. Kinoshita

        Show
        Bruno P. Kinoshita added a comment - - edited Added a patch with some examples for review. Also uploaded the site to http://www.kinoshita.eti.br/public_files/site/examples.html , so you can see it in your browser too. Added links to javadoc, just like DBTUtils does Added examples for Predicate, Function and Procedure, following the order that they appear in the main page Added an extra example that combines the three functors with generator and composite functors Removed the information on how to build Moved the practical part (and more advanced) to the bottom of the page, so the reader may already have some notion on the basics before reading it Seems like the links to all the code katas are being redirected to http://pragdave.pragprog.com/ . Not sure if they are available somewhere else or should be removed/updated. I'm learning functional programming to use Functor in another open source project, so forgive me in case there are any mistakes. Feel free to modify the patch, criticize or propose changes. No hard feelings Cheers, have a great WE. Bruno P. Kinoshita
        Hide
        Simone Tripodi added a comment -

        charming like a sunshine, patch applied, see r1344790

        thanks once again Bruno!

        Show
        Simone Tripodi added a comment - charming like a sunshine, patch applied, see r1344790 thanks once again Bruno!

          People

          • Assignee:
            Simone Tripodi
            Reporter:
            Bruno P. Kinoshita
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development