One of the really cool features of JavaScript is that you can pass functions around your code. One of the ways you can pass around a function is to set it as the argument of another function. A function that takes another function as one of its arguments is called a Higher Order Function.
A function that returns another function is also called a Higher Order Function. But today we’ll focus on passing functions as arguments.
Read more...
As a developer, and a hockey fan. I spend a lot of time thinking about how to combine two things I love. Recently I had a cool NHL related app idea I’d like to turn into a Progressive Web App. The first step was finding a way to get the NHL related data I needed for the app. I needed an API.
If you do a quick web search for an NHL API, you’ll likely find a few random Reddit threads linking to abandoned Github projects.
Read more...
A few weeks ago I decided to pick up a new programming language. I’ve always sort of had my eye on Python. Until recently I hadn’t taken the time to try it out. I’m very happy I did. So far it’s been a great experience.
I have to admit, I didn’t know a lot about Python going in. So I was surprised by what I’ve learned about the language. I thought I’d share a few of these things.
Read more...
Arrow functions are a newer feature in Javascipt. They are very handy, often creating cleaner, more concise code. They do come with some gotchas. One of these gotchas being how the this keyword is handled.
Before we get to this. Lets take a quick look at what an arrow function is. Traditionally in Javascript you would define a function like so:
function oldSchool(){ return "The way we've always done it"; } …and the arrow function equivalent
Read more...
This blog runs on Ghost. So far I’m really loving it. It’s a blogging platform, pure and simple. Everything you need. Nothing you don’t. Ghost is built on Node.js.
I develop and write on a Windows machine. A Surface Pro 4 to be exact. Windows runs Node.js applications pretty well on it’s own. But with the release of Bash on Ubuntu on Windows, I also have the ability to run Node.
Read more...