Variable Hoisting in Javascript

To hoist is to raise, to lift up according to the Merriam Webster dictionary. When I first encountered the term JavaScript Hoisting I thought that it should raise up something but I did not know what. Now I know and I would like to share it with you. JavaScript has the ability to hoist variables that is to say to lift them to the top of a particular scope.
Continue reading “Variable Hoisting in Javascript”

Recruiter’s Disgrace

Often times recruiters send emails to me or email lists that I am subscribed to about job opportunities. Some are decent requests about helping out a non-profit, others are start-ups asking if anyone has extra time to work with them, but once in a blue moon one comes across the outright outrageous job post spams.
Continue reading “Recruiter’s Disgrace”

Functional Programming in JavaScript- Currying

Currying is used to transform a function with many parameters to a function with less parameters. This is accomplished by binding some arguments of the main function so it can be reused when the function is called again.

This technique is helpful when you want certain arguments to be fixed for a series of functions.
For example if you write a function that prints that a group of people are good at things. You can set it up like this:

Continue reading “Functional Programming in JavaScript- Currying”

Delegating Dependencies Among Ruby Objects

Recently I picked up Sandi Metz’s Practical Objected Oriented Design in Ruby once more. It was great reading it again because as you become more experienced in programming you understand the why of many design techniques she elaborates on her book.

In this blog post, I would like to jot down my notes from chapter 3: Managing Dependencies. Once I got in to the habit of creating singly responsible classes and methods in Ruby, the consequence was that my objects became more interdependent (a natural consequence). Overdependency is perilous because as the application grows and accommodates changes it is prone to breaking. As Metz puts it, “If not managed carefully, these dependencies will strangle your application.”
Continue reading “Delegating Dependencies Among Ruby Objects”