The goal and the game rules

The goal I have in mind is Higher-Order Java parallelism. OK, I admit; there’s one thing I tried in Java and abandoned: parallel programming. Why? Because it was more pain than what it was worth, at least for my day job.

Now I hear the promise that using functional programming it’s possible to take basic programming tasks (like opening files in a directory, working on list elements, querying a db, retrieving stuff from the web) and make them safely parallel using plain (albeit verbose) Java 1.5 syntax. This is something I can use in my day job. This is something that will speed up my programs on the back-end server I’m developing. This is …interesting, don’t you think!?

The downside is that I am asked to think along a different paradigm and use new components to build my program. Functions take center stage now; function manipulation becomes the new core business of the algorithm. We all can use intuition and imagine what it means to concatenate two strings, but what does it mean to bind two functions? How can I do this regardless of the data that will get processed afterwards? Can I always do this juggling in the first place, or are there operations with functions that are not allowed?

I wonder how can I reach the minimum to get going without having to become an academic. I’ve spent my spare time in the last two months researching on my own, and it’s really hard. I reckon outside help is more than welcome. And finding some company in this travel will make the trip more enjoyable.

The game rules I’m giving myself are as of today (100622):

  • use pure Java 1.5 syntax: this means generics and atomics; preferably no annotations
  • use Functional Java, as long as I understand exactly what it’s doing for me; no cheesy new operators, even if they’ll surely be in Java 7/8/9/whatever
  • always keep in mind real world tasks: no Fibonacci, no factorials
  • put many examples, except Hello World
  • put many exercises, which will become examples once solved
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s