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?
Advertisements

Cloud Computing Concepts, Technology and Architecture

31 May
Inline images 7

Cloud Computing

Concepts, Technology and Architecture

Inline images 5

To mark the official release of the book “Cloud Computing: Concepts, Technology and Architecture” the LJC Book Club is holding a special event.

It will be held on June 11th.  We are just finalising the details and this post will be updated with more information as it becomes available.

Cloud Computing is an important technology that we all need to get to grips with.  This isn’t easy when there is so much confusing hype.

The book is written by Thomas Erl, Ricardo Puttini and Zaigham Mahmood and published by Prentice Hall.

The meetup is organised and delivered by the LJC Book Club.  We are sharing an impartial overview of what promises to be an influential book.

We are hoping to find a clear answer to an important question: what, exactly, is the cloud?

 

What is the Cloud?

Inline images 1

What, exactly, is “The Cloud?”  Do you know?  Does anybody know?

According to Amazon it’s a CD rack, a photo album, and it’s made of elastic.  According to Microsoft it’s like a really rubbish bat cave that is full of “real opportunities for IT to deliver more efficiencies.”  (:|

And there are so many cloud services.  Infrastructure as a Service (IaaS), Platform as a Service (PaaS), Software as a Service (SaaS), Data as a Service (DaaS) and Pain in the as a Service (PitaaS).  :-p

What does it all mean?  How can any of us keep track of it all?

One thing we can say for certain about “The Cloud”: it is going to change the way we work.  According to Gartner it reached the apex of the “Peak of Inflated Expectations” back in 2009 and by 2012 it was maturing but still heavily hyped.

The Hype Cycle
 Cloud computing sat at the top of the peak of 
inflated expectations back in 2009.

With so many companies looking to expand the hype buzzword to cover their own products how is the developer to climb the Slope of Enlightenment?  How can we know what is worth learning and what will be left behind (in the recycling bin for the next fad)?

With his book “Cloud Computing: Concepts, Technology and Architecture” Thomas Erl is trying to help.  The author explains in his introduction:

Gaining a vendor-neutral understanding of cloud computing from an industry perspective empowers you with the clarity necessary to determine what is factually cloud-related and what is not… With this information you can establish criteria that will allow you to filter out the parts of the cloud computing product and service provider marketplaces to focus on what has the most potential to help you.

If the book is as successful as Erl’s previous SOA books then it could potentially provide a vital missing link: a ubiquitous language, a shared, unambiguous vocabulary that will let developers, managers and accountants talk intelligently about the the cloud.   It will end the frustration of failing cloud projects based on misconceptions.  The author again:

Cloud computing has much to offer but its roadmap is riddled with pitfalls, ambiguities, and mistruths. The best way to navigate this landscape is to chart each part of the journey by making educated decisions.

http://servicetechbooks.com/cloud

With this meetup we are hoping to help by sharing the books vendor-neutral perspective through presentation and discussion. 

The Cloud Computing Meetup

With the book’s official release on June 11th we are going to take the opportunity to reflect on Cloud computing; how it has progressed and how it affects our work as developers.

There is a dizzying array of terms that need to be understood.  In interviews you will need to be comfortable with terms like “hybrid cloud”, “multitenancy” and “threat agent.”  If you haven’t already encountered technologies like “hypervisors”, “resource replication” or “dynamic failure detection” then there is a good chance that you soon will.

In this event we will provide an overview of the ideas presented in the book.  It’s a big book, with 16 chapters and 7 appendices that contain 260 diagrams, 29 models and 20 mechanisms.  We will provide a guided tour of the contents so that you can see which parts are relevant to you.

If you are new to cloud computing then it will provided an invaluable overview of new technologies that are just beginning to disrupt the mainstream.

If you are already familiar with cloud technology you can see the models that are likely to frame your less technical colleague’s understanding.

We will also take a look at some of the specific technologies that are being used to implement cloud computing.

Stay tuned for more details.

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

27 May

“Only a fool tries to define something as nebulous as a style of programming. So here goes!”

“My solution will seem so inefficient as to border on professional malpractice.”

What did we read about?

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

We began on Page 78 at the start of Part II and read through to page 90.  There were three exercises.

In Part II we are going to learn about writing in a functional style in Clojure. 

It started by looking at what a functional style is, and how it is different from an object-oriented style.  It is summed up as follows:

  • Object oriented: stable relationships and varying paths.
  • Functional: Many specialised flows and shapes.

Unfortunately, it isn’t clearly explained what that actually means.

Hopefully working through the example problem, which involves matching students to courses, will make things clearer.  The solution involves annotating maps and then filtering them based on those annotations.  To help us create the solution sets, map annotations and the arrow operator were introduced.

What stood out?

  • We talked about avoiding conditionals back in week 2.  Section 7.2 shows how we are actually going to do this.  The approach sounds appealing.
  • On the group we felt the need to talk about sets several weeks ago.  Now the author has finally decided to introduce them in section 7.3.
  • The approach described in section 7.4 is rather clumsy.  Hopefully we’ll be shown a better way next week.

If you read nothing else this week…

  • Sets are introduced in section 7.3
  • The arrow operator is introduced in section 7.5

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)

Becoming Data Scientists – May’s Packt Publishing Competition

14 May

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 May the lucky winner will get a physical copy with an ebook for the runner up.

Data Science

Why Your Next HR Hire Should Be a Data Scientist @ Blogging4Jobs.com

Why Your Next HR Hire Should Be a Data Scientist @ Blogging4Jobs.com

The role of Data Scientist is new and important.  Big Data is seen as the key area for innovation, and the Data Scientist is a key role in putting Big Data to work.

So who are the Data Scientists, what do they do and does it include skills that we as developers may want to acquire?

The Data Scientist mines data for useful insights.  It’s a role that is closely related to the Computer Scientist, the role often fulfilled by developers like us.

Last month we looked at the tools used by the Computer Scientist, this month we look at the skills and tools needed by the Data Scientist.

The Data Scientist Role

In his Book “Data Visualisation – a Successful Design Process” Andy Kirk identifies the “Eight Hats” of data visualisation design:

  • The Initiator – The leader who is seeks a solution.
  • The Data Scientist – The data miner, wearing a miners hat, discovering nuggets of insight buried deep within the numbers.
  • The Journalist – the story teller who refines the insight with narrative and context.
  • The Computer Scientist – The person who breaths life into the project with their breadth of software and programming literacy.
  • The Designer – With an eye for visual detail and a flair for innovation they work with the computer scientist to ensure harmony between form and function.
  • The Cognitive Scientist – Brings an understanding of visual perception, colour theories and human-computer interaction to inform the design process.
  • The Communicator – The negotiator and presenter who acts as the client-customer-designer gateway.
  • The Project Manager – The co-ordinator who picks up the unpopular duties and makes sure that the project is cohesive, on time and on message.

These are hats, and we will probably find ourselves wearing several of them over time. As you can see, Data Visualisation requires us to pull together a range of disciplines in order to achieve something meaningful.

Last month we focused on the skills of the Computer Scientist, looking at the skills needed to pull the data out of the repository and put it in front of the audience.

Miner Willy

Data Scientists are Data Miners

This month we are looking at the skills of the Data Scientist. Here’s Kirk’s full description:

The data scientist is characterized as the data miner, wearing the miner’s hat. They are responsible for sourcing, acquiring, handling, and preparing the data. This means demonstrating the technical skills to work with data sets large and small and of many different types. Once acquired, the data scientist is responsible for examining and preparing the data. In this proposed skill set model, it is the data scientist who will hold the key statistical and mathematical knowledge and they will apply this to undertake exploratory visual analysis to learn about the patterns, relationships, and descriptive properties of the data.

From Chapter 2 of Data Visualisation – A Successful Design Process

Last month we talked about data being the new soil.  The data scientist is a miner who digs down deep.  It is a pivotal roll in the design process. Kirk elaborates further:

If we don’t have the data we want, or the data we do have doesn’t tell us what we hoped it would, or the findings we unearth aren’t as interesting as we wish them to be there is nothing we can (legitimately) do about it. That is an important factor to remember. No amount of 3D-snazzy-cool-fancy-design dust sprinkled on to a project can change that.

An incomplete, error strewn or just plain dull dataset will simply contaminate your visualization with the same properties. So, the primary duty for us now is to avoid this happening, remove all guessing and hoping, and just get on with the task of acquiring our data and immerse ourselves into it to learn about its condition, its characteristics, and the potential stories it contains.

From Chapter 3 of Data Visualisation – A Successful Design Process

This month we’re going to look at some of the tools we can use as Data Scientists to immerse ourselves in the data. Tools that will help us to interact with our data, drill down into it’s seams and discover what nuggets lie within.

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 May the lucky winner will get to choose a physical copy and the runner up can select an ebook.

Data Visualisation

Data Visualisation: a successful design process

For a second month we are going to look at Andy Kirk’s “Data Visualisation – a Successful Design Process.” It’s a great introduction to using Data Visualisation in your applications and the key text behind this series of competitions.

Kirk provides us with a structured approach to what can appear like a dark art. The task of data familiarisation, for example, is organised into the following steps:

  1. Acquisition – Getting hold of the data.
  2. Examination – Assessing the data’s completeness and fitness.
  3. Data Types – Understanding the properties of the raw material. (Not to be confused with Data Types in our code.)
  4. Transforming for Quality – Tidying and cleaning, filling in the gaps.
  5. Transforming for Analysis – Preparing and refining for final use.
  6. Consolidating – Bringing it all together, mashing it up with other sources.

From Chapter 3 of Data Visualisation – A Successful Design Process

Learning Highcharts for Javascript Data Visualisation

Highcharts allows the creation of sophisticated, interactive visualisations.

Let’s start at the ending: the consolidation of data to create an effective visualisation, like the one above.

Last month we looked at using HTML5 directly for producing our data visualisations. This month we’re going to look at Highcharts, a Javascript library built on top of HTML5 to provide stunning interactive charts with a lot less effort. It’s free for non-commercial use.

Highcharts provides interactivity, allowing the user’s to become data scientists and explore the data for themselves.

This is an easy approach for simple data mining needs, but the real value is in mining the rich seams of complex data through Data Analysis.  For this some powerful tools are needed.

Data Analysis

Data Analysis Cookbook

Chapter 5 talks about distributed processing with Hadoop

Anybody looking for a ‘real world’ use of Clojure should take a look at the Incanter libraries and the practical value they provide in the first phases of Data Science.  This is a Clojure cookbook that is full of solid, practical recipes for dealing with large datasets.  It shows you how to go beyond spreadsheets to deal with data on new scales of size and complexity.

The book is particularly strong on recipes for acquisition and transformation for quality and analysis.  The first chapter will show you how to pull in your data from a whole range of data sources, including JSON, XML, CSV, JDBC and Excel.  The second chapter will show you how to clean up your data with tools like regular expressions, synonym maps, custom data type parsers and the Valip validation library.

Eric Rochester’s Cookbook provides sound, practical recipes.  If you want to practical introduction to Data Analysis that will get you up, running and productive quickly then this is the place to start.

It also touches on a whole range of other related topics, such parallel programming, distributed processing and machine learning.

It isn’t so strong on the theoretical side of data analysis.  There’s a whistlestop tour of linear and non-linear relationships, Bayesian distributions and Bneford’s law in chapter 7.  Chapter 9 introduces Weka for machine learning.  In between chapter 8 shows you how to interface with Mathematica or R.

Statistical Analysis with R – Beginners Guide

A grouping of several plots displayed in the graphic window

If you want to learn more about the theory of data analysis you may want to consider working with R directly. R is the lingua franca of statistics and learning it will give you access to a wealth of resources available on the web.

In this Beginners guide the authors R John and M. Quick will show you how to get up and running with R.  The material is more abstract, with talk of standard deviations, linear models and ANOVA.  However, the authors make it more entertaining with a bit of role play.  Your are the lead strategist for a kingdom who must gather your intelligence, prepare the battle plans and brief the emperor and his generals.

When it comes to learning the mathematical theory the book doesn’t go much deeper than the Data Analysis Cookbook.  However, it does present the information in an entertaining way and by learning R you open the door to working directly with a tool used by mathematicians rather than programmers.

Big Data

Statistical analysis has been around for a long time, but it is now being performed with more data than ever before.  Companies like Google and Facebook are now working with data on an unprecedented scale and that is why there is so much buzz about Big Data.

If you want to work with Big Data, processing massive data sets measured in the terabytes, then the essential tool to learn is Map Reduce.

MapReduce Cookbook

 

More advanced MapReduce scenarios are described.

The authors are well qualified.  Srinath Perera is a Senior Software Architect at WSO2 and has a Ph.D.  Thilina Gunarathne is a Ph.D. candidate at the School of Informatics and Computing of Indiana University.  The have provided 90 recipes, presented in a simple and straightforward manner, with step-by-step instructions and real world examples.  These recipes guide you through the complex business of getting Hadoop up and running and then not only demonstrate what MapReduce is but how it can be applied to problems such as analytics, indexing, searching, classification and text processing on a massive scale.  Along the way you will be exposed to the tools and techniques that are fundamental to working with big data.

Infinispan Data Grid Platform

While Hadoop is implemented in Java, and offers a Java API it doesn’t reallly sit within the Java ecosystem.  Using Hadoop requires the learning of a whole new eco system.  To use it properly you’ll need to get to know complementary apache projects such as HBase, Hive, and Pig.

If you want to get to be able to experiment with MapReduce and distributed computing while staying firmly within the Java ecosystem then consider the Infispan data grid platform.  Installing Infinispan is as easy as installing jBoss AS7 and you can use it to provide persistance for your standard CDI applications without alteration.  The authors are Java people.  Francesco Marchioni has written several books on the JBoss application server and Manik Surtani is the specification lead of JSR 347 (Data Grids for the Java Platform).

The book offers practical guidence to get you up and running with Infinispan platform.  While none of them deal with MapReduce, they will leave you well equipped to follow the online documentation.

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!