10 Reasons Why I'm Learning Functional Programming (or How Understanding Functional Programming Represents An Investment In My Future)

in #technology6 years ago (edited)

10 Reasons Why I'm Learning Functional Programming (or How Understanding Functional Programming Represents An Investment In My Future)

Source

IJCH - Inside JaiChai's Head (Meaning: My Warped, Personal Opinions and Musings)

Source

From the Author:

Salutations.

I am JaiChai.

And if I haven't had the pleasure of meeting you before, I'm delighted to make your acquaintance now.

business-handshake.jpg
Source (Base Source)

I invite you to interact with everyone, learn, and have as much fun as possible!

For my returning online friends, "It's always great to see you again!"

Important Clarification

Source

It's important for me to make this clear up front:

This article IS NOT a tutorial on Functional Programming.

Yes, a basic definition of Functional Programming will be submitted, but that is the extent of it.

I will not be debating for or against Functional Programming.

Stated differently, I will not be proselytizing, nor will I be attempting to recruit converts from other programming communities.

Nor will I discuss ALL the differences between Functional Programming and the universe of other computer languages.

The only comparisons and contrasts I submit relate directly to my motivation for learning Functional Programming.

To reiterate, this article IS NOT about the "WHAT" of Functional Programming.

It is about the "WHY"; that is, my personal reasons for learning Functional Programming at this point in my life.

That said, let's charge on...

Everyone a Coder...

Source

I strongly believe that everyone should learn to code - whether or not you plan on being a professional programmer.

Why?

Here's just a few significant benefits of learning to code:

  • Teaches Logic and Critical thinking

  • Builds Problem Solving Skills

  • Introduces Development, Execution, and Process Evaluation

  • Increases Identification, Interaction and Syntax Capabilities

  • Enhances Creativity

  • Encourages Collaboration

  • Demystifies Computers

  • Often morphs from a Hobby to a Profession

In short, learning to code - in whatever language - teaches people "How to Think More Effectively" and builds tangible, important Life Skills.

Brief Description of Functional Programming

Source

Source

Source

Imperative vs. Declarative Languages:


Source

Popular Functional Programming Languages:

Source

10 Reasons WHY I'm Learning Functional Programming

Source

#1 - I Suck at other Programming Languages!

Source

By far, the biggest complaint about learning Functional Programming is it's perceived "Almost Vertical Learning Curve"!

The fact that I'm basically ultra-lame at most of the popular languages is actually a positive thing.

How can that be?

First off, let me explain why I suck at other programming languages.

I am shamelessly disloyal. The decision to use a certain language in the past was solely based on the type of problem I needed to solve.

Different languages provide different benefits.

For example, Java/JavaScript is good for cross platform/web oriented projects, C is popular among engineers, C++ is good for programs needing speed (think Gaming); while Python and Ruby are the languages recommended for beginners, etc.

Being a computer language whore and project mercenary, I have never "imprinted" onto any single language.

I'm lazy and vehemently avoid re-inventing the wheel. If I can find an open source example of what I need, I have no qualms about using it (aka "GitHub Hound").

Source

Consequently, I have never bothered to memorize a lot of the jargon, syntax and idiosyncratic properties of those languages; hence, I am far from an expert in any single language.

Since the popular Imperative (tell the program "what" to do) programming languages and Functional (tell it "how" to do) Programming style have totally different paradigms, proficiency in other languages is actually a detriment.

In other words, if a person's legacy programming paradigms and coding habits are deeply ingrained, the paradigm shift required to learn Functional Programming is a major obstacle in the learning process.

In contrast, I am basically Tabula Rasa; therefore, I have virtually nothing to unlearn.

In other words, my historically non-committal attitude towards any one language makes it much easier to accept and learn the unique paradigm and syntax of Functional Programming.

#2 - Purity

Source

...pure functions are easier to reason about because you know that they can’t do certain things, such as talk to the outside world, have hidden inputs, or modify hidden state.

Because of this, you’re guaranteed that their function signatures tell you (a) exactly what’s going into each function, and (b) coming out of each function.

Source

In short, Referential Transparency (same in, same out) is a built-in property of Functional Programming.

This makes programming to purpose MUCH EASIER because there are no side-effects or state management to deal with.

#3 - Less Bugs, Cool Compiler

Source

Debugging sucks and is frustrating as Hell!

In Functional Programming, bugs are found during compile time, not runtime (translated: A whole lot of time saved and anguish prevented).

Furthermore, debugging is very costly in terms of man hours and severely impacts a company's bottom line.

#4 - Pararellism

Source

Parallelism represents a huge increase in speed and efficiency.

Traditional languages are always vulnerable to a host of problems when programming for parallelism. There are just too many dependencies, strict sequencing schemes, and changes of state.

The modularity of Functional Programming guarantees no interference and side-effects; making it perfect for parallel computing.

The take-away from this is simple:

Functional Programming is able to safely exploit all the cores of today and tomorrow's computers.

#5 - Laziness

Source

In programming language theory, lazy evaluation, or call-by-need is an evaluation strategy which delays the evaluation of an expression until its value is needed (non-strict evaluation) and which also avoids repeated evaluations (sharing).

Source

This property of Functional Programming translates into tremendous improvements in the efficiency of developing, testing and deploying software; as well as saving millions (if not billions) of dollars of computing resources.

#6 - Industrial Strength and Use

Source

Functional Programming languages are considered "high-assurance" (dependable and robust enough for enormous, billion dollar, high tech global business, dangerous scientific projects, etc.).

That is why many industries and corporations are now turning to Functional Programming languages for their high-risk, high-scale and high-cost operations.

For example:

Facebook uses Haskell -

Source

WhatsApp uses Erlang -

Source

Twitter uses Scala -


Source

#7 - Functional Programming and Other Languages


Source

Functional Programming is language agnostic because it is a paradigm and style.

Consequently, Functional Programming is already seeping into many other computer languages.

Here's just of few of them -

Source

Source

Source

Source

Source

#8 - Tailor Made for Cryptocurrency

Source

One error in a cryptocurrency's code can result in an avalanche of loss.

Just look at the history of major hacks on cryptocurrency to see that patching current code is not a viable longterm solution.

That's why more and more cryptocurrency developers and smart contract platforms are seriously looking at Functional Programming languages to solve their safety, scalability, and reliability issues.

In fact, Cardano is totally programmed in a Functional Language called Haskell.

#9 - Choice for Quantum Computing

Source

Quantum Mechanics and Quantum Computing are a of couple subjects I am very interested in.

I see learning Functional Programming as a solid method for understanding Quantum Computing better.

Functional Programming is obviously well suited for the abstraction level needed for quantum computing because the language is based on Lambda Calculus.

There's been a lot of Quantum Computing modeling using Haskell.

And Lisp is a popular language among Quantum Computer programmers.

#10 - First Class Mental Exercise

Source

Whether it be muscles or brain cells, non-use equals atrophy.

Source

Functional Programming has its roots in Lambda Calculus.

Source

Lambda Calculus is elegant and powerful.

It can encode ANY COMPUTATION using mathematical expressions.

Once you wrap your mind around the basic concepts of abstraction, you quickly realize that its simplicity is the key to its reliability and flexibility.

Parting Shots

Source

Source

By JaiChai

Thanks for stopping by.

Truly hope to see you again!

Source

About the Author

Believing that school was too boring, he dropped out of High School early; only to earn an AA, BS and MBA in less than 4 years much later in life – while working full-time as a Navy/Marine Corps Medic.

In spite of a fear of heights and deep water, he performed high altitude, free-fall parachute jumps and hazardous diving ops in deep, open ocean water.

After 24 years of active duty, he retired in Asia.

Since then, he's been a full-time, single papa and actively pursuing his varied passions (Writing, Disruptive Technology, Computer Science and Cryptocurrency - plus more hobbies too boring or bizarre for most folk).

He lives on an island paradise with his teenage daughter, longtime girlfriend and three dogs.

busy animated gif.gif
Source

(More articles by JaiChai can be found on the Busy.org website. Use this link to visit Busy.org. Better yet, come join the Busy.org community!)


CLICK HERE TO JOIN THE STEEMIT BLOGGERS ON DISCORD

Animated Banner Created By @zord189 [Creatives]

asapers.png
("Join the A.S.A.P.ers Discord Channel")

JC320 black line frame.jpg
Source

"My mind was a terrible thing to waste..." - JaiChai

400.jpg
Source

If you enjoyed my post, kindly: Upvote, Follow, Comment and Resteem.

"I appreciate all your support!"

Sort:  

Hi @jaichai

Great piece of work buddy,

In short, learning to code - in whatever language - teaches people "How to Think More Effectively".

My gf would say "How to think like a robot" :)

I am shamelessly disloyal.

Disloyal toward what? people? or programming languages?

ps. arent you worried that programmers will be soon replaced by AI? that's very possible scenario.

ps. 2. have you been receiving any of my emails lately?

big fat upvote on the way :)

yours
Piotr

Disloyal to any one programming language.

All AI requires "the God template"; that is, the "Creator's" setting and set of rules from which to base future learning upon.

So, in essence, whoever provides the original reference point (aka the Lambda Identity in Lambda calculus) determines an AI's style/flavor of subsequent learning; hence its future behavior.

Namaste, Jaichai

FP is Great!
The more I practice it and teach it, the more I believe it is the only serious way to get a proper understanding of whatever it is that we're doing with computer programs.

Programming in the other disciplines is a mess of adhoc conventions, blindly following "patterns", and arbitrary "best practices".

(BTW I just wrote an FP+CT introductory post earlier today! https://steemit.com/steemstem/@noriega/mathematics-for-software-design-functions-categories-and-functors)

Cheers!

As a follower of @followforupvotes this post has been randomly selected and upvoted! Enjoy your upvote and have a great day!

Was that a figure of speech... that everyone should learn coding?
It got me curious, probably something to think about after I "get" steemit and blockchain
Thanks for sharing your "why" @jaichai

I'm afraid I'm going to disappoint you. I have no interest in learning programming. I am incredibly proud of myself for learning some very basic formatting HTML and markups, but that's as close as I'll ever get.

My son and my husband are well versed in some of this (I recognized the C++ thing, I think), but honestly, it all sounds foreign to me.

I agree with what you've said, really. Maybe I'm just too old. I don't know, but I can not imagine trying to find the time to wrap my brain around any of it. At least not right now. I can barely find the time/motivation to make food and eat or learn the basics of the chatrooms that I'm supposed to be socializing in.

Maybe learning coding would mean that I didn't have to actually talk to real life humans though, so maybe I should learn that language. Maybe I'd be better at that.

Can you tell that I'm confused by all of this? :)

The key word is "language".

Just like learning another spoken language provides insight into another culture, learning a computer language helps you understand "why" something behaves in a certain way (e.g., why Bitcoin take so long to process, etc.).

But learning any new language takes time and isn't easy for most; especially as we get older.

Nevertheless, every little bit of new knowledge adds to each person's pile of raw material for building their own opinions of the world...

Namaste, JaiChai

I love to see how responsive you are @jaichai

Although it's really not something I "dust off" and use very often, I have to say that I am grateful for having learned what was called "structured programming" back when I was in college in the early 80s. I have NO idea how to code anything using current protocols, BUT... simply understanding the roots of how to lay out a piece of software, the logic and so forth... that has been hugely helpful.

So two thumbs up!

Thanks much for visiting, commenting and of course, your very kind words.

Namaste, JaiChai

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 64455.55
ETH 3147.84
USDT 1.00
SBD 3.94