create account

The Power of Functional Programming (and why we'll be exploring it in Java) by five34a4b

View this thread on: hive.blogpeakd.comecency.com
· @five34a4b ·
$46.13
The Power of Functional Programming (and why we'll be exploring it in Java)
I dislike Java as a programming language.

I learned C++ at <a href="https://www.usu.edu/">Utah State University</a> (not that I like C++ any better), we were required to take a Java course to supplement the C++ knowledge, but I had studied Java in my free time before going back to school anyway.  I am grateful to Java as it was my first experience with Object Oriented Programming (<a href="https://en.wikipedia.org/wiki/Object-oriented_programming">OOP</a>).  C++ is less verbose than Java, but I don't necessarily like C++ more than Java.  In all honesty, I'm not much of a language snob.  I'm firmly in the "choose the language that's best for the job" camp.  Which is why I haven't complained about using Java.  It really is the right tool for what I'm doing at Amazon.

This is why after school I focused heavily on learning JavaScript.  In my opinion JavaScript is an absolute mess of a language, however, in many cases, particularly the projects I'm interested in building, it is the best tool for the job.  One thing in particular I like about programming in JavaScript is it's functional aspects.  I'm not one for details or pedantry, so I'll stay out of defining functional programming or using any programming language buzz words.  Here is the wikipedia to <a href="https://en.wikipedia.org/wiki/Functional_programming">Functional Programming</a> though, and if there is interest, I'd be more than happy to dive into other details of functional programming not discussed here (we'll only be covering a very small subset).  For now, I'll take a very simple definition of functional programming: functions can be treated as variables in functional languages, as this is the most advantageous aspect the paradigm possesses over <a href="https://en.wikipedia.org/wiki/Procedural_programming">procedural languages</a> (C++, Java, etc).

I remember when I first heard of functional programming.  I thought "great, so what? I can accomplish anything I need to in a procedural language, why bother learning another paradigm and confusing myself?".  In fact, although I'd dabbled in Haskell, this was more out of curiosity about all the hype surrounding functional programming than anything else.  It was really certain frameworks in JavaScript (looking at you <a href="https://facebook.github.io/react/">React.js</a>) that naturally lend themselves to the functional paradigm that introduced me in a pragmatic way.

<h2>Higher Order Functions</h2>
So functions can be treated as variables, what does this really mean?  Here's a contrived example to illustrate the point:

<pre>
var addOne = function(number){
    return number + 1;
};
var squareNumber = function(number){
    return number * number;
}
var composeFunctions = function(func1, func2, input){
    return func2(func1(input));
};
</pre>

Calling composeFunctions(squareNumber, addOne, 100) will square 100, pass the result into addOne, and add 1 to 10000.  Here's the equivalent Java code:

<pre>
public static Integer addOne(Integer number){
    return number + 1;
}
public static Integer squareNumber(Integer number){
    return number*number;
}
public static Integer composeFunctions(Integer input){
    return addOne(squareNumber(input));
}
</pre>

If you've studied functional programming in any small sense, you'll be able to spot a limitation with this Java code (hint: notice how in the JavaScript we've got three function parameters to composeFunctions, but only 1 in the Java code).  What happens if we want the ability to call the addOne function first, and then the squareNumber function after that?  We'd have to add a second Java method for this and explicitly call these functions in the reverse order:

<pre>
public static Integer composeFunctionsReverse(Integer input){
    return squareNumber(addOne(input));
}
</pre>

This is because in the past, Java couldn't treat functions as variables, and because of this, you can't pass a function into another function as a parameter.  In the case of the JavaScript, if we wanted to change the order the functions executed in, it's as simple as swapping the parameters to the function (calling composeFunctions(addOne, squareNumber, 100) instead of composeFunctions(squareNumber, addOne, 100)).

<h2>So What?</h2>
I remember when I was looking into functional programming initially, I saw examples like this and thought "great, so what? I'll just write another one line function, what's the big deal?".  I'll admit, in this contrived example it doesn't seem like much.  However, when you start adding things like networking code to make API calls, or threading, the power of this small abstraction becomes enormous.  Not to mention the cleanliness of the code (we <em>didn't</em> have to write the second function in the JavaScript case).

<h2>First Class Functions</h2>
Another powerful aspect of this paradigm is, the functions can be written inside of other functions, and executed whenever the programmer dictates:

<pre>
var testFunction = function(name){
        var innerFunction = function(){
            //ignore the process.stdout.write, it's just console.log
            //without the newline
            process.stdout.write("hello! ");
        };
        var lateExecution = function(inputFunction, name){
            inputFunction() + console.log(name);
        }
        var lateNoExecution = function(inputFunction, name){
            inputFunction + console.log(name);
        }
        lateExecution(innerFunction, name);
        lateNoExecution(innerFunction, name);
}

</pre>

Here is yet another contrived example, however, it illustrates the point quite well, particularly because there is no equivalent Java code to do the same thing (until recently of course, check out the <a href="http://sjkelleyjrblog.wordpress.com/2017/08/07/functional-programming-in-java/">next tutorial</a> for this).

When we call testFunction("Jackson"), the innerFunction is created at the time of calling, we then pass this variable into both our lateExecution and lateNoExecution variables (also both created at the time of calling testFunction).  The lateExecution function receives this innerFunction, immediately calls it, then console.log's the name passed into it.  However, in lateNoExecution, we don't ever execute the function passed to us, so nothing happens, other than "Jackson" is printed to the screen, even though we still have access to the function as a variable.

I know if you've come from procedural programming, you'll read the above paragraph and thinking "man, that's a lot of this calling that, calling this, but maybe not calling that, and only when the function is executed".  I know because I thought the same thing.  But now that I'm on the other side of the fence I'm realizing the writers of posts I'd read previously were simply struggling to come up with succinct examples motivating the paradigm.  It just isn't easy to motivate functional programming in small examples.  The paradigm really shines when code starts to grow very large, because functions can be chosen or removed at will and modularized with one simple key stroke rather than redesigning the software from the ground up (looking at you <a href="https://en.wikipedia.org/wiki/Class_diagram">class hierarchy diagrams</a>).

As an example, in the composeFunctions portion of this post, what would happen if we needed to do some preprocessing on the number passed into us before calling the other two functions, based on whether the number was even or odd?  We'd do the check on the number, and add the preprocessing.  Well next month, a customer has decided the preprocessing needs to be done in another way.  Between now and then, we've added a bit more logic in that if statement block.  Now we need to unravel the entire mess and change whatever preprocessing we were doing, which may effect logic (aka mutate state) later in the scope without us noticing.  If we were using functional programming, we'd have simply added a third preprocessing function as a parameter to composeFunctions, and called it inside the if statement.  When the customer changes the preprocessing requirements, we simply pass in the new function.  And, not only that, we can pass the predicate to be evaluated in the if statement as a parameter as well, in case the customer decides they want to check for prime numbers instead of odd ones.

Another possibility: what if we wanted to reuse this composeFunctions method for a succession of two different function calls, rather than squareNumber and addOne?  (perhaps cubeNumber and addTwo?) without removing the functionality gained from the original code?  In Java you'd have to write a new function, calling cubeNumber and addTwo specifically, whereas here, we need only call composeFunctions with the newly written cubeNumber and addTwo (or hell, even cubeNumber and addOne, or addOne and addTwo).

This paradigm lends itself to modularity in a way procedural programming does not.  I'm not saying you couldn't accomplish the same things in a procedural language, but what I <em>am</em> saying is, it's much easier to do in a functional language, making a programmer much more apt to reach for it.


<h2>Conclusion</h2>
Hopefully I've managed to motivated the power of functional programming (although after reading the above paragraphs, I'm not sure sure I have! ha ha!).  This is a very small piece of the larger paradigm, and in fact, the power isn't done justice by these contrived examples, the power lies in the completely new way of looking at code, rather than specific use cases or academic ammunition for water cooler arguments over which language is better.  As we'll see in the <a href="http://sjkelleyjrblog.wordpress.com/2017/08/07/functional-programming-in-java/">tutorial</a>, even traditionally procedural languages are adding functional aspects because of it's power.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 73 others
properties (23)
authorfive34a4b
permlinkthe-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java
categoryblog
json_metadata{"tags":["blog","technology","programming","minnowsunite","tutorial"],"links":["https://www.usu.edu/","https://en.wikipedia.org/wiki/Object-oriented_programming","https://en.wikipedia.org/wiki/Functional_programming","https://en.wikipedia.org/wiki/Procedural_programming","https://facebook.github.io/react/","http://sjkelleyjrblog.wordpress.com/2017/08/07/functional-programming-in-java/","https://en.wikipedia.org/wiki/Class_diagram"],"app":"steemit/0.1","format":"markdown"}
created2017-12-16 17:50:27
last_update2017-12-16 17:50:27
depth0
children57
last_payout2017-12-23 17:50:27
cashout_time1969-12-31 23:59:59
total_payout_value42.377 HBD
curator_payout_value3.749 HBD
pending_payout_value0.000 HBD
promoted0.026 HBD
body_length9,841
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,778,756
net_rshares7,365,799,296,395
author_curate_reward""
vote details (137)
@bikash-tutor ·
Good informations
properties (22)
authorbikash-tutor
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171216t181316605z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-16 18:13:18
last_update2017-12-16 18:13:18
depth1
children1
last_payout2017-12-23 18:13:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length17
author_reputation4,579,993,214,824
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,781,252
net_rshares0
@five34a4b ·
Thanks for reading!
properties (22)
authorfive34a4b
permlinkre-bikash-tutor-20171216t10185799z
categoryblog
json_metadata{"tags":"blog","app":"esteem/1.4.7","format":"markdown+html","community":"esteem"}
created2017-12-16 18:18:09
last_update2017-12-16 18:18:09
depth2
children0
last_payout2017-12-23 18:18:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,781,693
net_rshares0
@dhaneshpk ·
Informative post
properties (22)
authordhaneshpk
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171216t191622749z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-16 19:16:24
last_update2017-12-16 19:16:24
depth1
children1
last_payout2017-12-23 19:16:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length16
author_reputation621,529,594,247
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,787,058
net_rshares0
@five34a4b ·
Thanks for reading!
properties (22)
authorfive34a4b
permlinkre-dhaneshpk-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171216t193107958z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-16 19:31:09
last_update2017-12-16 19:31:09
depth2
children0
last_payout2017-12-23 19:31:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,788,454
net_rshares0
@dwinblood ·
I dislike Java a great deal these days.   It causes more problems than it used to solve.   Oracle really dropped the ball when it took over.   Many things that once worked are now broken.    The language as a LEARNING tool is still useful, but there are other object oriented languages so other than LEARNING I don't see java as particularly useful in an actually applied fashion.

I first started learning Java before the first VM that could run it was completed and out of alpha....  I saw some bizarre things.   Then it got good for awhile and dominated.   Then oracle acquired it, and it has been consistently downhill since then.
👍  
properties (23)
authordwinblood
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171229t191615591z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-29 19:16:15
last_update2017-12-29 19:16:15
depth1
children0
last_payout2018-01-05 19:16:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length634
author_reputation383,232,067,634,988
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id25,927,583
net_rshares1,154,689,016
author_curate_reward""
vote details (1)
@edge-note ·
Awesome post.
properties (22)
authoredge-note
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171222t203525852z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-22 20:35:24
last_update2017-12-22 20:35:24
depth1
children0
last_payout2017-12-29 20:35:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length13
author_reputation20,959,202,786
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,753,638
net_rshares0
@givonwayne ·
When I grow up I want to be just like you.  Genius.
properties (22)
authorgivonwayne
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171218t193036259z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-18 19:30:36
last_update2017-12-18 19:30:36
depth1
children1
last_payout2017-12-25 19:30:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length51
author_reputation581,506,719,227
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,070,416
net_rshares0
@five34a4b ·
You're too kind @givonwayne!
👍  
properties (23)
authorfive34a4b
permlinkre-givonwayne-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171219t015026633z
categoryblog
json_metadata{"tags":["blog"],"users":["givonwayne"],"app":"steemit/0.1"}
created2017-12-19 01:50:27
last_update2017-12-19 01:50:27
depth2
children0
last_payout2017-12-26 01:50:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length28
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,109,780
net_rshares635,934,662
author_curate_reward""
vote details (1)
@hamidul ·
good post & thank you.
properties (22)
authorhamidul
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171230t004810105z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-30 00:48:24
last_update2017-12-30 00:48:24
depth1
children0
last_payout2018-01-06 00:48:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length22
author_reputation19,142,420,254
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id25,965,490
net_rshares0
@jie28 · (edited)
Keep going to your  very informative post my friend @five34a4b
properties (22)
authorjie28
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t094206412z
categoryblog
json_metadata{"tags":["blog"],"users":["five34a4b"],"app":"steemit/0.1"}
created2017-12-17 09:42:09
last_update2017-12-17 09:42:27
depth1
children1
last_payout2017-12-24 09:42:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length62
author_reputation3,564,166,997,506
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,858,108
net_rshares0
@five34a4b ·
Thanks for reading!
👍  
properties (23)
authorfive34a4b
permlinkre-jie28-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t171834943z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 17:18:33
last_update2017-12-17 17:18:33
depth2
children0
last_payout2017-12-24 17:18:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,906,227
net_rshares252,314,745
author_curate_reward""
vote details (1)
@kaleem345 ·
Great brother
properties (22)
authorkaleem345
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171220t033245748z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-20 03:33:45
last_update2017-12-20 03:33:45
depth1
children0
last_payout2017-12-27 03:33:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length13
author_reputation9,849,577,612,331
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,287,151
net_rshares0
@monirulislam777 ·
good post & thanks to share
👍  
properties (23)
authormonirulislam777
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171225t072912737z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-25 07:28:57
last_update2017-12-25 07:28:57
depth1
children0
last_payout2018-01-01 07:28:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length27
author_reputation543,971,962,852
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id25,129,855
net_rshares589,239,721
author_curate_reward""
vote details (1)
@nazmul82 ·
Give a great deal today. I'm really very glad.
properties (22)
authornazmul82
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171220t020552378z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-20 02:05:54
last_update2017-12-20 02:05:54
depth1
children0
last_payout2017-12-27 02:05:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length46
author_reputation2,261,402,362,457
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,278,624
net_rshares0
@nikosnitza ·
Great info...resteem..
properties (22)
authornikosnitza
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t074421931z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 07:44:27
last_update2017-12-17 07:44:27
depth1
children1
last_payout2017-12-24 07:44:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length22
author_reputation46,428,541,625,622
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,848,248
net_rshares0
@five34a4b ·
awesome! thank you for the resteem!
properties (22)
authorfive34a4b
permlinkre-nikosnitza-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t171813237z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 17:18:12
last_update2017-12-17 17:18:12
depth2
children0
last_payout2017-12-24 17:18:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length35
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,906,189
net_rshares0
@okja ·
Fab post! I can see you have put lots of effort into the blog. I would like to invite you for the 7 day black and white photo challenges. It would be great if you can take part in the event :)

https://steemit.com/kr/@okja/7-day-black-and-white-photo-challenge-okja-day-6
properties (22)
authorokja
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171222t183821577z
categoryblog
json_metadata{"tags":["blog"],"links":["https://steemit.com/kr/@okja/7-day-black-and-white-photo-challenge-okja-day-6"],"app":"steemit/0.1"}
created2017-12-22 18:38:21
last_update2017-12-22 18:38:21
depth1
children1
last_payout2017-12-29 18:38:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length271
author_reputation10,799,936,784,107
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,739,603
net_rshares0
@five34a4b ·
I'm not much of a photographer.  sorry!
properties (22)
authorfive34a4b
permlinkre-okja-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171224t041349337z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-24 04:13:48
last_update2017-12-24 04:13:48
depth2
children0
last_payout2017-12-31 04:13:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length39
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,958,169
net_rshares0
@premraval010 ·
Hey @five34a4b

I am completely new to Functional Programming, thus this post gave me some clarity.

Since you are into Programming, would you mind sharing your Opinion about this post.
https://steemit.com/art/@premraval010/the-art-of-computer-programming-or-donald-knuth
properties (22)
authorpremraval010
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t070603013z
categoryblog
json_metadata{"tags":["blog"],"users":["five34a4b"],"links":["https://steemit.com/art/@premraval010/the-art-of-computer-programming-or-donald-knuth"],"app":"steemit/0.1"}
created2017-12-17 07:07:00
last_update2017-12-17 07:07:00
depth1
children3
last_payout2017-12-24 07:07:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length271
author_reputation1,053,968,014,976
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,844,974
net_rshares0
@five34a4b ·
Great post! I love have you tagged it under art.  I feel programming really is an art and a craft that's perfected over a lifetime.  I just finished "Clean Code", highly recommend it if you haven't read it already.
properties (22)
authorfive34a4b
permlinkre-premraval010-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t171713141z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 17:17:12
last_update2017-12-17 17:17:12
depth2
children2
last_payout2017-12-24 17:17:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length214
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,906,048
net_rshares0
@premraval010 · (edited)
Oh Yeah, I will surely read it.
Would you mind sharing the link to it.
properties (22)
authorpremraval010
permlinkre-five34a4b-re-premraval010-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t180006114z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 18:01:03
last_update2017-12-17 18:01:54
depth3
children1
last_payout2017-12-24 18:01:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length70
author_reputation1,053,968,014,976
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,911,218
net_rshares0
@roooster ·
my friend of the king :D keep going like this :D
👍  
properties (23)
authorroooster
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t205838666z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 20:58:39
last_update2017-12-17 20:58:39
depth1
children1
last_payout2017-12-24 20:58:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length48
author_reputation10,397,639,844
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,929,648
net_rshares233,497,362
author_curate_reward""
vote details (1)
@five34a4b ·
I'm not sure I follow, but thanks for reading!
👍  
properties (23)
authorfive34a4b
permlinkre-roooster-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t230101666z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 23:01:03
last_update2017-12-17 23:01:03
depth2
children0
last_payout2017-12-24 23:01:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length46
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,940,634
net_rshares184,194,310
author_curate_reward""
vote details (1)
@shakirchy ·
Very well posted by you, good work,i like it,
properties (22)
authorshakirchy
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t063229204z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 06:32:30
last_update2017-12-17 06:32:30
depth1
children1
last_payout2017-12-24 06:32:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length45
author_reputation406,567,222,185
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,842,086
net_rshares0
@five34a4b ·
Thanks for reading!
properties (22)
authorfive34a4b
permlinkre-shakirchy-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t171555746z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 17:15:54
last_update2017-12-17 17:15:54
depth2
children0
last_payout2017-12-24 17:15:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,905,882
net_rshares0
@steemcleaners ·
$1.79
Hello!

In order to prevent identity theft, identity deception of all types, and content theft we like to encourage users that have an online identity, post for a website or blog, are creators of art and celebrities of all notoriety to verify themselves. Verified users tend to receive a better reception from the community.

Any reasonable verification method is accepted. Examples include:

- A post or tweet on an established Facebook, Twitter, Instagram or other social media account with a link to your contribution on Steemit.
- A reference or link to your Steemit account on your website or blog.

In order to confirm your authorship of the content. Please make a mention about Steemit or add a hyperlink to Steemit on your Wordpress blog: 

https://sjkelleyjrblog.wordpress.com/

Thank you!

More Info: <a href="https://steemit.com/steemcleaners/@steemcleaners/introducing-identity-content-verification-reporting-and-lookup">Introducing Identity/Content Verification Reporting & Lookup</a>
👍  
properties (23)
authorsteemcleaners
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t123334805z
categoryblog
json_metadata{"tags":["blog"],"links":["https://sjkelleyjrblog.wordpress.com/","https://steemit.com/steemcleaners/@steemcleaners/introducing-identity-content-verification-reporting-and-lookup"],"app":"steemit/0.1"}
created2017-12-17 12:33:36
last_update2017-12-17 12:33:36
depth1
children11
last_payout2017-12-24 12:33:36
cashout_time1969-12-31 23:59:59
total_payout_value1.561 HBD
curator_payout_value0.225 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length997
author_reputation2,789,224,428,782,668
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,874,010
net_rshares276,224,618,044
author_curate_reward""
vote details (1)
@five34a4b ·
This doesn't seem like a good way to treat content providers on your platform.  Assuming I'm a plagiarist without any evidence to back the claim up?
👍  ,
properties (23)
authorfive34a4b
permlinkre-steemcleaners-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t172257445z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 17:22:57
last_update2017-12-17 17:22:57
depth2
children10
last_payout2017-12-24 17:22:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length148
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,906,722
net_rshares1,051,256,181
author_curate_reward""
vote details (2)
@dwinblood ·
They actually did catch some people getting large portions of the reward pool in the past that it did turn out were fake and stealing other people's works.    It's been awhile, but really though this is uncomfortable TRUST ME if you would that it is a far better place with them putting forth challenges than it was without them.    So, yes to be challenged is uncomfortable but they don't know you.   If they assume that everyone is legit then we'd have the top posts being scam artists, as that is what it was for awhile.
properties (22)
authordwinblood
permlinkre-five34a4b-re-steemcleaners-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171229t191824737z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-29 19:18:24
last_update2017-12-29 19:18:24
depth3
children0
last_payout2018-01-05 19:18:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length523
author_reputation383,232,067,634,988
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id25,927,836
net_rshares0
@patrice ·
Should we wait until someone has cashed out hundreds or thousands of dollars in rewards for someone else's work?
properties (22)
authorpatrice
permlinkre-five34a4b-re-steemcleaners-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t172823357z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 17:28:21
last_update2017-12-17 17:28:21
depth3
children8
last_payout2017-12-24 17:28:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length112
author_reputation26,522,961,289,339
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,907,370
net_rshares0
@tensor ·
Very nice.  I prefer functional programming to OOP and Imperative styles.  While I am not the largest fan of Java, I can see how using these patterns could be powerful.
👍  
properties (23)
authortensor
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t053352605z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 05:33:48
last_update2017-12-17 05:33:48
depth1
children13
last_payout2017-12-24 05:33:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length168
author_reputation87,856,203,149,624
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,837,133
net_rshares0
author_curate_reward""
vote details (1)
@five34a4b ·
Yeah, I don't particularly like Java either, and it's procedural.  But I'm glad these well-known procedural languages are starting to pick up functional aspects, as we'll see in the next post.
properties (22)
authorfive34a4b
permlinkre-tensor-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t171525932z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 17:15:27
last_update2017-12-17 17:15:27
depth2
children12
last_payout2017-12-24 17:15:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length192
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,905,811
net_rshares0
@tensor ·
$0.03
Imperative is procedural and Java primarily follows the object oriented paradigm(hence OOP).     My problem with Java is that it is too verbose when compared with the alternatives like Kotlin, Scala or even Dart.  Java's implementation of things is fairly bad in most cases as well.  

I am glad that some of the most popular languages are starting to get functional features but Java's functional features are fairly flimsy and not well implemented.  Java streams are mutable for instance which is actually a really bad design decision.  There are plenty of other things that really make no sense with Java 8 which was the main version where they added all these functional patterns.
👍  
properties (23)
authortensor
permlinkre-five34a4b-re-tensor-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171217t173054570z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-17 17:30:54
last_update2017-12-17 17:30:54
depth3
children11
last_payout2017-12-24 17:30:54
cashout_time1969-12-31 23:59:59
total_payout_value0.021 HBD
curator_payout_value0.006 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length684
author_reputation87,856,203,149,624
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,907,664
net_rshares4,905,545,790
author_curate_reward""
vote details (1)
@vikaskaladharan ·
Yes true to your words.
properties (22)
authorvikaskaladharan
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171218t053050617z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-18 05:30:54
last_update2017-12-18 05:30:54
depth1
children1
last_payout2017-12-25 05:30:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length23
author_reputation77,747,401,501
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,974,306
net_rshares0
@five34a4b ·
Thanks for reading!
👍  
properties (23)
authorfive34a4b
permlinkre-vikaskaladharan-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171218t054543039z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-18 05:45:42
last_update2017-12-18 05:45:42
depth2
children0
last_payout2017-12-25 05:45:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,975,641
net_rshares0
author_curate_reward""
vote details (1)
@yehtetaung ·
Good Post Dear bro.I. vote your post.Nice to meet you.
properties (22)
authoryehtetaung
permlinkre-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171221t010511839z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-21 01:05:42
last_update2017-12-21 01:05:42
depth1
children2
last_payout2017-12-28 01:05:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length54
author_reputation292,364,227,390
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,439,490
net_rshares0
@five34a4b ·
Thanks for reading!
properties (22)
authorfive34a4b
permlinkre-yehtetaung-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171221t050025745z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-21 05:00:24
last_update2017-12-21 05:00:24
depth2
children1
last_payout2017-12-28 05:00:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation1,119,681,610,239
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,465,538
net_rshares0
@yehtetaung ·
No Problem dear bro.fighting.
properties (22)
authoryehtetaung
permlinkre-five34a4b-re-yehtetaung-re-five34a4b-the-power-of-functional-programming-and-why-we-ll-be-exploring-it-in-java-20171221t061509705z
categoryblog
json_metadata{"tags":["blog"],"app":"steemit/0.1"}
created2017-12-21 06:15:42
last_update2017-12-21 06:15:42
depth3
children0
last_payout2017-12-28 06:15:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length29
author_reputation292,364,227,390
root_title"The Power of Functional Programming (and why we'll be exploring it in Java)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,473,623
net_rshares0