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


16631110-abstract-word-cloud-for-functional-programming-with-related-tags-and-terms.jpgSource

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

AIPodcast-key.jpgSource

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.jpgSource (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

clarify-text.jpg?t=1525825455883Source

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...

09-05-2017-why-coding-infographic-blog.pngSource

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

functional-programming-with-c-3-638.jpg?cb=1474926836Source

 

functional-programming-with-c-2-638.jpg?cb=1474926836Source

functional-programming-with-c-51-638.jpg?cb=1474926836Source

Imperative vs. Declarative Languages:

functional-programming-taxonomy.png?w=625Source

 

Popular Functional Programming Languages:

 

Functional-Programming-Languages.jpgSource

 

10 Reasons WHY I'm Learning Functional Programming

10RWSLogo-e1382051152413.pngSource

#1 - I Suck at other Programming Languages!

1*e5JzMEvpGA_qIMbpCRXqQA.pngSource

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").

51GUak%2B2ouL._SX379_BO1,204,203,200_.jpgSource

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

waterdrop.pngSource

...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

software-bug-web.jpgSource

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

maxresdefault.jpgSource

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

3-laziness.png?w=285&h=300Source

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

International-Society-for-Industrial-Ecology.jpgSource

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 -

 

haskell-logo.pngSource

WhatsApp uses Erlang -

1200px-Erlang_logo.svg.pngSource

Twitter uses Scala -

best-scala--training-in-bangalore.jpgSource

#7 - Functional Programming and Other Languages

4-functional-programming.jpgSource

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 -

378812-refcard-cover217.pngSource

B06400.pngSource

1*kUCC6Ikv-F35y3wG5edz9w.jpegSource

V07181_MockupCover.pngSource

func_prog_php.pngSource

#8 - Tailor Made for Cryptocurrency

20170419215700-GettyImages-597317523.jpeg?width=700&crop=2:1Source

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

spinUPspinDownSuperpisition.png?resize=768%2C162&ssl=1Source

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

225949.jpgSource

 

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

use-it-or-lose-it-300x225.pngSource

Functional Programming has its roots in Lambda Calculus.

1*iyuRMm3HC_Rq-1S344IEBQ.jpegSource

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

xkcd1312.pngSource

dilbert-dt970322_295.gifSource

 

By JaiChai

Thanks for stopping by.

Truly hope to see you again!

600800.jpgSource

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.

How do you rate this article?


0

0

JaiChai
JaiChai

I'm a single papa actively enjoying my varied passions (e.g., Writing, Disruptive Technology, Cryptocurrency, plus more hobbies too bizarre for most folk). I live on an island paradise with my teenage daughter, longtime girlfriend and three dogs.


(IJCH) Life, People, and Philosophy
(IJCH) Life, People, and Philosophy

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

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.