What you'll learn:
- The essence of Functional Programming, without all the unneeded technical Jargon
- How to create applications, in a functional programming style
- Build sophisticated apps, with simple code
- What Pure Functions are, and why you should use them
- How to create new logic, without writing the logic, by using Function Composition
- What Currying And Partial Application are, and how they are helpful
- What Immutable Data Structures are, and why you should use them
- Why Eliminating and Controlling Side Effects is so important
- The benefits of Higher Order Functions
- How to write code in a style that minimizes the risk of difficult bugs
- The Beauty of Declarative Programming
- How the Ramda JavaScript library, makes functional techniques simple in JavaScript
"Whyshould I learnFunctional Programming?"
Most software written today, is overly complex, difficult to understand, challenging to test, hard to change and filled with hard find bugs.
Ouch!So how do we end up with these problems?
Here’s a few of the many reasons:
- Not using the simplest building blocks possible… If you start with something complicated, you’ll end up with something even more complicated.
- Programming in a style that is more susceptible to complex bugs
- Not properly respecting and handling Side effects(talking to servers, input / output, etc)
- “Sprinkling” Application State all throughout codebases
- Unnecessarily mutating data
- Code Duplication (particularly sneaky ones, likesimilar class methods in Object Oriented Programming)
- Writing more code than necessary
These are just a few of the many problems that lead to frustratingjobs, working on codebases that arehard to maintain and add features to.
Functional programming addresses the above problems in the following ways:
- Simpler apps, because functional programming uses the simplest building blocks possible, just plain old data and pure functions to transform the data (easier to understand and work with)
- Uses code styles that are simpler and less prone to complicated bugs (more time doing productive work)
- Eliminating Side Effects, as much as possible and controlling them when they are needed (reduces bugs)
- Avoids data mutation as much as possible (reduces bugs)
- Uses pure functions, that can work with many different types of data (improved code reuse)
- Uses generalized functions, that can be specialized to suit different needs (less code, same functionality)
- Creating new functions, without adding any new logic, using function composition (more functionality, no code added)
Functional programming, in my experience, is more productive than Object Oriented Programmingbecause there are fewer things to think about, so you don’t overwhelm your working memory. Usually your just thinking about plain old data, and data transformations, using functions. Additionally, in Functional Programming, there aren’t tons of competing ways of doing the same thing, so you don’t have to think about unnecessary things.Functional Programmingis constraining, and thats a good thing. You’re able to better focus, on the problem you’re solving, rather than the tools you’re using to solve the problem.
In Object Oriented Programming, you have to think about many different types of complicated, stateful objects that can be interacted with indifferent ways. You’ve got to think about more than just data, and data transformation… You’ve got to think about things like State and Side Effects, far more than you do in Functional Programming.
“What will Ilearn in this course?”
You'll learn how to create front end web applications in a Functional Programming Style, through hands on learning. You'll be building 5 significant web applications in this course, from the ground up.At the end of this course, you'll understand and appreciate the things that are important to Functional Programmers and odds are, you'll fundamentally change how you write programs.
“What frontend framework will Ilearn?”
I could teach you Functional Programming using a popular frontend framework like React or Vuejs, but frameworks come and go, and the principles I'll teach you are timeless principles that transcend frameworks... So Instead, you'll learn functional programming by just usingModern JavaScript, and a few helper libraries. The knowledge and skills you'll learn in this course can be used with the popular frameworks of today and tomorrow!
“Will this course be 100% JavaScript from scratch?”
We won't be using any frameworks, but we will use a few helper libraries where it makes sense as described below.
“What JavaScript Libraries are used in this course, and why even include libraries?”
The main focus of this course is teaching you Functional Programming concepts. Manually writing everything from scratch, could very well distract from the core concepts, so to stay focused, we'll use a few libraries where it makes sense.
Libraries used:
- Ramda- We'll use the awesome Ramda JavaScript Library, which similar to lodash and underscore, but it's built to leverage Functional Programming Concepts. In my opinion, this library is a must use library for functional programming in JavaScript.
- Hyperscript- We'll usethe hyperscript library to generate html and css. For example, we'll call hyperscripts 'div'function to generate html divs. ie div('hello') =>hello
- Tachyons - This is a css framework that embraces Functional Programming concepts like composition.
- Webpack/Babel - We'll setup a minimal build system using webpack,babel and a few related plugins. This is a onetime setup step.
- Virtual-Dom - We'll use a virtual dom library to efficiently update webpages. This is the technology used by modern frameworks like React and Vuejs. This is a onetime setup step.
“I'm a backend developer, but I'd like to learn Functional Programming... Should Itake this course?”
The knowledge and fundamental principles you'll learn in this course, can easily be translated to the backend. I'm teaching you Functional Programming for the frontend, because programming on the front end can be quite challenging and Functional Programming is a particularly good fit for the front end.It's important to note, this course focuses on Modern JavaScript and doesn't use a front end framework, so you won't have to learn frontend technologies that you may never use.
“Can I write Functional Programs in JavaScript?”
Yes, absolutely. JavaScript allows you to program in many different styles, and using functional programming is an excellent choice. You'll start by learning Functional Programming techniques using modern JavaScript ( ES2018 ), then later you'll learn about the excellent Ramda JavaScript library.You may have heard the phrase "JavaScript, the good parts". When you're programming in a functional style, you're simply using the good parts of the language, and you'll naturally avoid the bad and confusing parts (like thethis keyword ヽ(ಠ_ಠ)ノ).
“Isn’t Functional Programmingjust a small niche in Computer Science?”
This used to be true, butnot anymore. For decades Object Oriented Programmingwas the dominant force in software development, but in the last few years Functional Programming has had huge growth, and it’s used in big companies like Facebook, Twitter and even Walmart. But it’s not just the big companies that are using Functional Programming, small and medium sized companies all over the world are turning to Functional Programming.
In December 2017, Forrester research released a study titled “The New Dawn Of Functional Programming”, which asserts “Functional Programming is beginning to hit the mainstage… the software development world is outgrowing stateful, object-oriented development”.
It always makes sense to learn upward trending technologies, and Functional Programming is an excellent choice for this reason and many more.
“Don’t Ihave to be a Math genius to understand Functional Programming?”
Absolutely Not!For decades the primary adopters of Functional Programming, were largely academics and people interested in specialized areas of Math. During that time, most working programmers (myself included) didn’t really understand Functional Programming, and the people who did understand Functional Programming, didn’t do a great job explaining what it was, what the benefits were, how to do it… etc.
The truth is, you don’t need to be a Math genius to understand Functional Programming. The essence of Functional Programming, has little to do with Math, which you’ll see in this course.
“Won’t I have to learn a whole new vocabulary to understand Functional Programming?”
No!I won’t bombard you with unneeded technical Jargon, in fact I avoid it as much as possible, and when I do use new Functional Programming vocabulary, it’s usually just to associate a name, to somethingyou already learned with plain old spoken english.
“Will the knowledge I gain in this course be obsolete in a year or two, just like my Angular 1 knowledge is?”
No!What you’ll learn in this course will be relevant and useful for years and probably decades.
“How is that possible?”
Because, I’m not teaching you functional programming in the context of particular framework like React or Vue.js. Frameworks come and go, but the skills you’ll learn in this course transcend the popular framework of the day.
“How is it that Code written in a functional programming style, is less prone to have hard to find bugs?”
The most difficult to find and fix bugs, are related to code that allows Side Effects (talking to servers, state changes etc). Functional Programming puts a significant emphasis on Eliminating and Controlling Side Effects...So, it would make sensethat eliminating Side Effects where possible, and tightly controlling side effects when they are needed would result in fewer complicated bugs.
“You say Functional Programmingis simple, but I’ve tried Functional Programming and it was hard!?”
Ah, I didn’t say it was easy, I said it was simple. Writing simple code, isn’t easy, often it’s difficult. But sophisticated software built with a simple codebase is a thing of beauty, and it’s totally worth it.
If you know and loveObject Oriented Programming, you may be in for a challenge. Much of what you know about programming, must be re-evaluated and often disregarded. I suspect, it might be easier for a new programmer to learn functional programming vs an experienced Object Oriented Programmer, because Functional Programming is so different from Object Oriented Programming… But again,it’s totally worth it :)
“I don't understand some of the things your talking about like 'side effects' and 'pure functions'?”
Don't worry, in this courseI start with the very basics, so you should have no problem following along. Additionally, Ioffer some veryunique, free options for getting help, which I describe in the video, on how to get help.
“Is this course for me?”
This course is meant for 2 types of students:
- New programmers who have taken an introductory programming course
- Experienced programmers who are interested in learning Functional Programming *
* There might be a couple videos the Experienced programmer could skip, but I suggest re-familiarizing yourself with the basics, as they are presented from a Functional Programming Perspective.
If you’re not sure ifthis course is right for you, remember there is virtually no risk to you as you’ll have 30 days to return the course for a refund.
“Why should I take this course from you?”
My courses are different from most Instructors. I don’t believe a course should cover every single part of a language or technology.
I’ll explain why with an analogy.
Imagine you wanted to learn Spanish. One approach to learning Spanish would be to learn every single Spanish word. There are around 100,000 words in a Spanish dictionary...ouch!
Here’s the thing, 1,000 Spanish words that make up 80% of all spoken Spanish… 2,000 words makeup 95% of all spoken words.
Wouldn’t it be better to focus on learning the 1,000 or 2,000 most used Spanish words? You’d be fluent much quicker… In fact, trying to learn all 100,000 Spanish words, kind of sounds ridiculous, when you realize most of them are never used.
These same principles apply to Programming Languagesand Technologies. Many instructors make 10, 20 and +30 hour courses, jam packed full of stuff you could just avoid!
I don’t want to waste your time, so I’ll only be teaching you themost used parts of JavaScript and Functional Programming, so you’ll be fluent much faster.