Tag: oop

  • Functional Programming Unit Testing in Node – Part 3

    Functional Programming Unit Testing in Node – Part 3

    OOP, Compose, and Curry

    Welcome to Part 3 where we’ll show you how to navigate class based code using FP, go over composing all these asynchronous functions we wrote, and continuing to define our dependencies in curried functions to make them easier to test.
    (more…)

  • Functional Programming Unit Testing in Node – Part 2

    Functional Programming Unit Testing in Node – Part 2

    Predicates, Async, and Unsafe

    In part 2, we’ll validate our inputs using predicates, show how to make asynchronous pure functions, and show various techniques on how you call unsafe code from Functional Code.

    (more…)

  • Functional Programming Unit Testing in Node – Part 1

    Functional Programming Unit Testing in Node – Part 1

    Functional Programming Unit Testing in Node

    Writing Functional Programming in Node is one challenge, but unit testing it is another. Mainly because many middlewares in Node use the connect middleware approach, and libraries in Node are not written in a pure function way.

    This six part series will go over how to make the unit testing part of easier, some strategies to tackle common impurity problems, and hopefully enable to make 100% test coverage a common part of your job vs. the “not worth the client investment” people commonly associate with it.

    (more…)

  • Thoughts on Teaching Object Oriented Programming in JavaScript

    Thoughts on Teaching Object Oriented Programming in JavaScript

    I’ve been doing a series of JavaScript videos on YouTube as part of a larger effort teaching Software Development. I find that I create a video 2 to 4 times before actually recording the real one. When describing something, when I find I have to reference a basic concept, I instead stop, and record a video around that basic concept first. This has worked well, and similar to blogging/writing books, it forces you to plug all holes no matter how minute in your knowledge of a subject so you can succinctly describe it in a way that makes sense.

    From a programming perspective, teaching advanced JavaScript is quite challenging because it wasn’t designed for traditional OOP concepts and large application design. Many of the more popular languages today are either built on, or support and promote OOP usage. On the same token, once you know OOP you better appreciate Functional languages, parametric polymorphism, and other dynamic language features.

    (more…)