Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

《Composing SoftWare》 #34

Open
goldEli opened this issue Aug 29, 2019 · 8 comments
Open

《Composing SoftWare》 #34

goldEli opened this issue Aug 29, 2019 · 8 comments
Labels
Share about book

Comments

@goldEli
Copy link
Owner

goldEli commented Aug 29, 2019

Composing Software
author: Eric Elliott

@goldEli
Copy link
Owner Author

goldEli commented Aug 29, 2019

Composing Functions

Function composition is the process of applying the function to the output of another function.

Working Memory

Signal Noise To Ratio

Concise code can improve the signal-to-noise ratio of your code.

Surface Area For Bugs

less code = less the surface area for bugs = fewer bugs

@goldEli
Copy link
Owner Author

goldEli commented Aug 29, 2019

Composing Object

There are primitives:

const firstName = "gold"
const lastName = "eli"

This is a composite:

const obj = {
  firstName: "gold"
  lastName: "eli"
}

@goldEli goldEli added the Share about book label Aug 29, 2019
@goldEli
Copy link
Owner Author

goldEli commented Sep 3, 2019

The Dao of immutability

Dao: Data Acess Object

Immutability

erase history

Separation

Flow

@goldEli
Copy link
Owner Author

goldEli commented Sep 5, 2019

The Rise And Fall And Rise Of The Functional Programming

The rise of functional programming

lisp

The fall of functional programming

java c++ 1980~2010

inheritance hierarchies

The rise of functional programming

Javascript explosion

The array functions were like rocket fuel for function programming explosion in Javascript.

@goldEli
Copy link
Owner Author

goldEli commented Sep 6, 2019

App ate the world, The browser ate the app, JavaScript ate the browser.

By multiple measure, Javascript is one of the most popular languages in the world.

@goldEli
Copy link
Owner Author

goldEli commented Sep 9, 2019

At any given moment, there are close to a hundred thousand job openings in the united states and hundreds of thousands job in more world-wide.

@goldEli
Copy link
Owner Author

goldEli commented Sep 10, 2019

Function

Functions may serve the following purpose:

  • mapping
  • Procederg
  • I/O

Pure Function

  • process the input return the output. Given the same input, will always return the same output.
  • Produce no side effect

@goldEli
Copy link
Owner Author

goldEli commented Sep 17, 2019

We can grasp the meaning of functional programming:

  • Pure Functions
  • Function Composition
  • Avoid shared state
  • Avoid mutating state
  • Avoid side effects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Share about book
Projects
None yet
Development

No branches or pull requests

1 participant