fpjs

所属分类:快速开发平台
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2022-12-07 13:07:52
上 传 者sh-1993
说明:  带Javascript的初学者函数编程的配套报告,
(Companion repo for Functional Programming for Beginners with Javascript,)

文件列表:
DEVSETUP.md (910, 2018-03-26)
caloriecounter/ (0, 2018-03-26)
caloriecounter/PLAN.md (417, 2018-03-26)
caloriecounter/package-lock.json (187818, 2018-03-26)
caloriecounter/package.json (533, 2018-03-26)
caloriecounter/src/ (0, 2018-03-26)
caloriecounter/src/index.html (496, 2018-03-26)
caloriecounter/src/index.js (27, 2018-03-26)
caloriecounter/webpack.config.js (546, 2018-03-26)
caloriecounter_challenge/ (0, 2018-03-26)
caloriecounter_challenge/PLAN.md (417, 2018-03-26)
caloriecounter_challenge/package-lock.json (187818, 2018-03-26)
caloriecounter_challenge/package.json (533, 2018-03-26)
caloriecounter_challenge/src/ (0, 2018-03-26)
caloriecounter_challenge/src/App.js (547, 2018-03-26)
caloriecounter_challenge/src/Model.js (155, 2018-03-26)
caloriecounter_challenge/src/Update.js (1404, 2018-03-26)
caloriecounter_challenge/src/View.js (1795, 2018-03-26)
caloriecounter_challenge/src/index.html (496, 2018-03-26)
caloriecounter_challenge/src/index.js (198, 2018-03-26)
caloriecounter_challenge/webpack.config.js (546, 2018-03-26)
caloriecounter_completed/ (0, 2018-03-26)
caloriecounter_completed/PLAN.md (417, 2018-03-26)
caloriecounter_completed/package-lock.json (187818, 2018-03-26)
caloriecounter_completed/package.json (533, 2018-03-26)
caloriecounter_completed/src/ (0, 2018-03-26)
caloriecounter_completed/src/App.js (547, 2018-03-26)
caloriecounter_completed/src/Model.js (155, 2018-03-26)
caloriecounter_completed/src/Update.js (2633, 2018-03-26)
caloriecounter_completed/src/View.js (3371, 2018-03-26)
caloriecounter_completed/src/index.html (496, 2018-03-26)
caloriecounter_completed/src/index.js (198, 2018-03-26)
caloriecounter_completed/webpack.config.js (546, 2018-03-26)
counter/ (0, 2018-03-26)
counter/package-lock.json (210429, 2018-03-26)
counter/package.json (536, 2018-03-26)
counter/src/ (0, 2018-03-26)
counter/src/index.html (265, 2018-03-26)
... ...

# Companion Source for Functional Programming for Beginners with 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! **“I'm a backend developer, but I'd like to learn Functional Programming... Should I take 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 the*this* 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 something you 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 sense that eliminating Side Effects where possible, and tightly controlling side effects when they are needed would result in fewer complicated bugs. **“You say Functional Programming is 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 love Object 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 course I start with the very basics, so you should have no problem following along. Additionally, I offer some very unique unique, 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 * Experience 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 if this 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 Languages and 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 the most used parts of JavaScript and Functional Programming, so you’ll be fluent much faster.

近期下载者

相关文件


收藏者