Deeper.js - Advanced JavaScript 🇵🇱 🇬🇧 3 days
Why this course?
Who is this course for?
You're a JS practitioner who wants to use JS proficiently.
Learning outcomes
- You will critically look at object-oriented programming with new, prototype and this
- You will appreciate the simplicity of functional programming
- You will consciously choose async programming patterns to a problem
- You will better understand coercion rules
- You will increase your expressive power with new language features
- You will start looking at JS in higher resolution
Training method
We do TDD (Test-Driven Development) of the most interesting language features
and idioms. In addition to that we build conceptual models, run performance
benchmarks and have group discussion in a safe environment.
Tens of carefully designed exercises will prepare you to write not only
simple web applications, but also library code that can be used by others.
Main assumption: to better understand things, implement it yourself.
NOT list
This course is NOT a:
Module 1 - Types
Main Theme: why most advice on type coercion is too simplistic
- We implement conversion algorithms such as ToBoolean or ToPrimitive
- We build intuition when to use type coercion and when to avoid it
- We build a generic type conversion model
- We learn the internals of the infamous ==
- We decompose deeply nested data structures with advanced destructuring
Module 2 - OO in JS
Main theme: why classical OO in JS is overly complicated
- We create advanced conceptual/under the hood models for the programs based on constructor functions and classes
- We create advanced conceptual/under the hood models for the programs based on object linking
- We learn the differences between: .prototype, [[Prototype]],
__proto__
- We build our own version of the new and instanceof operators
- We discover nuances of the mixin mechanism with Object.assign()
- We find the situations where the class abstractions leaks
Module 3 - Functions and scope
Main theme: we fully utilize everything functions can give us
- We build a more detailed representation of what hoisting really is, by modelling the execution context
- We build a more detailed representation of the functional scope based on the stack of execution contexts
- We dissect a function: parameters vs arguments, default values, variable arguments
- We compare 4 ways of dynamic this binding
- We test and compare performance and memory utilization of the code based on closures and prototypes
- We find cases where the new language features like arrow functions should not be a replacement for ES5 functions
Module 4 - Functional Programming I
Main theme: we start using pragmatic FP toolkit to make our code simpler and more reusable. PhD in maths not required.
- We implement higher order functions available in the standard library (map/filter/reduce/flatMap)
- We implement higher order functions unavailable in the standard library (e.g. takeWhile)
- We solve advanced real world data processing problem with a chain of higher order functions
- We optimize function invocation with memoization
- We prevent object modifications with deep freeze and immutable coding patterns
Module 5 - Asynchronous JS
Main theme: we learn to choose among various async options available in core JS
- We analyze a concurrency model based on the event loop
- We find common issues with callbacks (other than code nesting)
- We add missing capabilities to Promises: timeout, first, retry
- We implement custom Observable to understand push-based streams
Module 6 - Modularity
Main theme: modern JS environments don't need modularity hacks anymore
- We analyze testable code following dependency injection pattern
- We use native ES6 modules in Node.js and in a browser without tooling
- We implement custom Event Emitter to better understand the Observer pattern
- We compare orchestration based approach with choreography based approach to communication
Module 7 - Functional programming II
Main theme: fun exercises for the FP fans, pushing boundaries of what’s possible in JS
- We learn differences between partial application and currying
- We replace Dependency Injection with currying
- We learn the pros and cons of the point-free style
- We build abstraction for joining functions together into reusable blocks with compose and pipe
- We apply Functors and Monads to solve practical problems
- We replace null/undefined with more composable Maybe/Optional
Module 8 - Metaprogramming
Main theme: enhancing language capabilities with advanced language mechanisms
- We add iteration capabilities to objects
- We build more capable async/await with generators
- We enhance native language capabilities with proxies
- We implement custom DSL with tagged template literal