Functional Programming For Beginners With JavaScript

Functional Programming For Beginners With JavaScript

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 5.5 Hours | 762 MB

A practical guide that teaches you Functional Programming With JavaScript. Optimally paced, No-nonsense. Learn quickly!

“Why should I learn Functional 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, like similar class methods in Object Oriented Programming )
Writing more code than necessary
These are just a few of the many problems that lead to frustrating jobs, working on codebases that are hard 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 Programming because 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 Programming is 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 in different 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 I learn 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 I learn?”
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 using Modern 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 use the 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.

What Will I 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
Table of Contents

Introduction
1 What Is An Application
2 What we ll be building in this course
3 What technologies will we be using
4 Who should take this course
5 How to get help
6 You re probably doing it wrong

JavaScript The Basics
7 Getting Started With JavaScript
8 Primitive Data Types
9 Object Type
10 Arrays
11 Functions

Immutable Data Structures
12 Immutable Data
13 Updating objects, in an immutable way
14 Updating arrays, in an immutable way
15 Summarize information in an array

Types of Functions
16 Introduction to Currying
17 Currying and Partial Application
18 Pure Functions
19 Function Composition

Html and CSS
20 Html Introduction
21 CSS Introduction
22 Tachyons CSS Library
23 Generating Html and CSS
24 Transforming Data into Html and CSS
25 Html CSS Exercise Review

Functional Concepts
26 Declarative Programming
27 What Is Functional Programming

First Functional App From Scratch (Simple Counter)
28 Development Environment Setup
29 Planning The App
30 View Functions
31 Update Functions
32 App Function
33 Counter Improvements
34 Adding A Virtual Dom

Calorie Counting App
35 Planning
36 Calorie Counting App – Tableview challenge review
37 Calorie Counting App – Delete Meals
38 Calorie Counting App – Edit Meals
39 Planning – Data Model
40 Planning – View Functions
41 Planning – Update Functions
42 Starter Boiler Plate
43 Calorie Counting App – Form View
44 Calorie Counting App – Updates
45 Calorie Counting App – Input Updates
46 Calorie Counting App – Form Save

Temperature Unit Conversion Application
47 Application Introduction
48 Data Model
49 View Functions
50 Update Functions
51 Automatic Temperature Conversions

Tip Calculator Application
52 Tip Calculator

Flashcard Study Application
53 Flashcard Application

Weather Application
54 Application Introduction
55 Talking To Servers
56 Where to allow Server Side Effects In Functional Programs
57 Implementing Server Side Effects, in a Functional Programming Style

Final Thoughts
58 Final Thoughts