hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Monday, 10 February, 2020 UTC

Search for posts on Jekyll blog

Now that I’ve written a lot of posts I thought it would be good to add search functionality. I have created the first iteration of my search, give it a try. You should be able to find it on the left hand side. For context my blog is statically generated ... more


Sunday, 12 January, 2020 UTC

No app bundler needed for your next project?

The browsers are rolling out updates to support more of the latest features of JavaScript defined by ECMAScript technical committee 39. Have you thought about how much can we write today without using an app bundler like Webpack, Rollup.js or Parcel? ... more


Monday, 18 November, 2019 UTC

JWT tokens for authentication using Apollo GraphQL server

This will be part one of two posts looking at using JSON Web Tokens (JWT) for authentication and authorisation. I’ll be integrating tokens into NodeJS Express and Apollo GraphQL server. It will help if you are familiar with Express and Apollo GraphQL ... more


Tuesday, 29 October, 2019 UTC

Install Bcyrpt in Docker image and exclude host node_modules

This post will be covering two topics, installing Bcrypt NodeJS as a dependency and prevent linking node_modules from host machine to your docker container. Using Bcrypt package to encrypt passwords comes with a minor challenge: when installed it needs ... more


Tuesday, 10 July, 2018 UTC

Async Iterators and Generators in JavaScript

Async iterators will enable JavaScript engineers to read steams like lines of text from a web service or a file. It will be worth reading my previous post understanding sync iterators first before carrying on. It may seem plausible for a for-of loop ... more


Monday, 18 June, 2018 UTC

Iterators and Generators in ES6 JavaScript

For an object to become an iterator it needs to know how to access values in a collection and keeping track of its position in the list. This is achieved by an object implementing a next method and returning the next value in the sequence. This method ... more


Wednesday, 2 May, 2018 UTC

Using promises, async/await and testing

This post has lots of code examples showing promises , async/await and unit testing async functions. There is a coding challenge at the end to test your learning. What do promises solve in our code? Whenever you wanted to resolve some data asynchronously ... more


Sunday, 8 April, 2018 UTC

Understanding render props

In this post I will discuss the why and how to use render props with ReactJS. Why use render props: Promote reuse of behaviour across React components. This sounds similar to higher-order components, however we will focus on render props and discuss ... more


Tuesday, 20 March, 2018 UTC

Composition in JavaScript

Let’s look at using composition instead classical inheritance in JavaScript. JavaScript is an expressive language and is one reason I enjoy using it. An interesting feature is the ability to compose objects from simple objects without inheritance . ... more


Saturday, 20 January, 2018 UTC

Understanding higher-order components

In this post I will discuss the why and how to use higher-order components (HOC) with ReactJS. Why use HOC: Promote reuse of logic across React components. Components are the typical element for reuse in React but sometimes features don’t fit into this ... more


Sunday, 12 February, 2017 UTC

Understanding React Relay

As with any new tech it can be overwhelming and confusing how all the parts work together. Especially with the combo of Relay and GraphQL. Hopefully this post will help demystify some things in Relay. What is Relay: Data driven JavaScript framework used ... more


Sunday, 12 February, 2017 UTC

Understanding React Relay

As with any new tech it can be overwhelming and confusing how all the parts work together. Especially with the combo of Relay and GraphQL. Hopefully this post will help demystify some things in Relay. What is Relay: Data driven JavaScript framework used ... more


Tuesday, 24 January, 2017 UTC

Should-enzyme: Useful functions for testing React Components with Enzyme

What is should-enzyme: A library of extension functions on ShouldJS and a wrapper round Enzyme. Why use it: It should help make it easier to test ReactJS components, improve readability of asserts and provide better error messaging on failing tests. ... more


Tuesday, 24 January, 2017 UTC

Should-enzyme: Useful functions for testing React Components with Enzyme

What is should-enzyme: A library of extension functions on ShouldJS and a wrapper round Enzyme. Why use it: It should help make it easier to test ReactJS components, improve readability of asserts and provide better error messaging on failing tests. ... more


Sunday, 11 September, 2016 UTC

JavaScript Singleton pattern

The Singleton pattern is to ensure there is only one instance of the class that exists. In the case it does exist it returns a reference to that object. This is normally achieved by a method belonging to the class to create an instance. ... more


Sunday, 11 September, 2016 UTC

JavaScript Singleton pattern

The Singleton pattern is to ensure there is only one instance of the class that exists. In the case it does exist it returns a reference to that object. This is normally achieved by a method belonging to the class to create an instance. Singleton in ... more


Saturday, 30 July, 2016 UTC

Joinable - Join strings with built in control flow

What is Joinable: A library to join strings together without the need to check if a value is a falsy like undefined . Why use it: Keep your code base clean by removing the if else statements and improve the readability. Joinable API in the read me on ... more


Saturday, 30 July, 2016 UTC

Joinable - Join strings with built in control flow

What is Joinable: A library to join strings together without the need to check if a value is a falsy like undefined . Why use it: Keep your code base clean by removing the if else statements and improve the readability. Joinable API in the read me on ... more


Monday, 20 June, 2016 UTC

Composition in JavaScript

JavaScript is a very expressive language and is one of the main reasons I enjoy using it. One amazing feature is the ability to create and inherit from objects without classes and class inheritance. Using compositional tactics we can piece together multiple ... more


Wednesday, 4 May, 2016 UTC

Elixir task file watch with Eye Drops

Eye drops is an Elixir mix task used to watch file changes and run tasks in the command line for those files. You can read more about how to use it on my Github repository read me documentation. The reason for doing this project was to get faster feedback ... more


Thursday, 28 April, 2016 UTC

Redux, keeping it immutable

Redux has reducers tasked with transforming the state across the application. They are pure functions, which is a function that does not modify variables outside of its scope or depend on them. They are given the same parameters and the output should ... more