Hi, I'm Nicholas Johnson!

software engineer / trainer / AI enthusiast

Nick Johnson

Hi, I'm Nick Johnson!

Previously Front End Lead at Beamery. Currently Principle Front End at Cencora.

If you have an interesting project, possibly AI related, please feel free to get in touch at hello@nicholasjohnson.com. I'll be glad to have a chat.


  • What is Terraform? A Quick Devops Overview

    Terraform is an infrastructure provisioning tool. It’s open source, made by Hashicorp, and has integrations with dozens of cloud platforms including AWS, Azure and GCP, anad many others.

    Terraform allows you to automate and manage your infrastructure using declarative language. You say what you want to be true and terraform works out how to make it so.

    Last updated: November 2, 2023 - 2 minute read - 393 words - Read more

  • What is Conda? What Can It Do?

    Anaconda gives you three things:

    1. It’s a Python dependency management tool, like NPM.
    2. It’s a environment namagement tool like NVM or RVM.
    3. It’s a curated repository of a few thousand hand-verified libraries that you can rely on.

    In this short article we look at Conda, how to use it, how it works with Pip, how to work with environments, and how to load, save, and share environments in a requirements.txt.

    Last updated: September 25, 2023 - 3 minute read - 710 words - Read more

  • Passing additional props to React children with React.Children.map

    React components are supposed to be modular and stackable, just like html. We achieve nesting in React components by passing children as an implicit prop to our component, but what if we want to do more than simply dump those children on to the page? What if we want to manipulate them in some way? Enter React.Children.map

    Last updated: September 13, 2023 - 4 minute read - 884 words - Read more

  • Astro vs. Next vs. Eleventy

    A Static site generator is a piece of software that lets you write pages, ideally in Markdown, then press a button to create a nested folder full of HTML that you can drop onto any old hosting environment. Static sites are fast, just HTML and CSS. They are trivial to make accessible, you actually don’t need any JavaScript at all.

    My criteria for selecting a static site generator were as follows…

    Last updated: September 11, 2023 - 5 minute read - 1201 words - Read more

  • What is Babel, and how will it help you write JavaScript?

    Babel is a JavaScript transpiler that converts edge JavaScript into plain old ES5 JavaScript that can run in any browser (even the old ones).

    It makes available all the syntactical sugar that was added to JavaScript with ES6 and ES7, including classes, fat arrows, multiline strings, generators, and many more.

    You can convert prety much any modern JavaScript features into code that will run on any browser, even the really old ones. This is fantastic news if you need to support older browsers, mobile browsers, Safari, IE11, or anything other than edge Chrome.

    Last updated: April 8, 2016 - 4 minute read - 1063 words - Read more

  • React Fundamentals For AngularJS Developers

    TL;DR: AngularJS is a complex, monolithic framework that makes lots of choices for you. React is a DOM manipulation library that fits into a dynamic evolving ecosystem. Both are actually rather good.

    Last updated: April 5, 2016 - 8 minute read - 1957 words - Read more

  • How to do transclusion in Angular (ES5)

    Last updated: March 24, 2016 - 4 minute read - 1109 words - Read more

  • How does the TypeScript Angular DI magic work?

    Last updated: February 26, 2016 - 6 minute read - 1569 words - Read more

  • How to do Everything in Angular 2 using vanilla ES5 or ES6

    Last updated: February 26, 2016 - 4 minute read - 1065 words - Read more

  • What's the difference between annotations and decorators in Angular?

    Last updated: February 21, 2016 - 6 minute read - 1581 words - Read more

  • Today's Rails is the button_to helper

    This little rockstar will make a whole RESTful form for you containing just one button, so you can make put, post and delete requests without relying on JavaScript.

    A regular a link can only submit via get. To delete a resource you would usually submit a request via delete.

    You can submit a delete request in two ways, either via JavaScript, or as a form submission. You don’t want an errant search engine spider hitting all your URLs and deleting all your data, so hiding delete links in this way is a good idea, since spiders generally won’t parse JavaScript or submit forms.

    Last updated: February 15, 2016 - 2 minute read - 388 words - Read more

  • Using alias_method to preserve compatibility

    The alias_method method allows us to alias call a method by a different name. If we change our API, we can still allow access using the old methods. This can save us a heavy refactoring job.

    Last updated: February 15, 2016 - 0 minute read - 82 words - Read more

  • AngularJS vs. Angular

    AngularJS and Angular are philosophically different. Angular 1 is at heart a DOM compiler. We write HTML, and the Angular compiler takes care of compiling it into a web application. It was a tidy little thing, and very small.

    Over time Angular 1 was used to create larger and larger applications. We started arranging our code into components. We repurposed directives to make them serve as components, then used isolate scope to separate them one from another.

    Angular 2 is the logical endpoint of this transformation. It is no longer a DOM compiler. Instead, it’s an component driven architecture with batteries included.

    Last updated: February 15, 2016 - 2 minute read - 506 words - Read more

  • Using dup to dry up bang methods. Bang bang!

    Hello, and today we’re going to take a dip into Active Support to look at how we can use Object#dup to dry up bang methods. As you probably know, most methods are non destructive, but a bang method modifies an object in place. Here’s a non-destructive method, it returns a modified copy of the object. The original object is not changed. This is what we want to do most of the time.

    Last updated: February 15, 2016 - 1 minute read - 131 words - Read more

  • Using Object#blank? to check for whitespace

    The blank? method is defined on object, and is not Rails specific. An object is blank if it is false, empty or a whitespace string.

    Last updated: February 15, 2016 - 0 minute read - 89 words - Read more

  • Checking if an object is a subclass

    Short tip today, checking if a class is a subclass of another object.

    Last updated: February 15, 2016 - 0 minute read - 98 words - Read more

  • Delegating methods using extend

    A change from Rails today, we’re dipping into Sinatra to look at how we can use extend to implement a Delegator. A delegator is an object which delegates responsibility to another object. Sinatra uses it to delegate methods called on the global scope to another object which can handle them.

    Last updated: February 15, 2016 - 1 minute read - 374 words - Read more

  • Include vs. Extend

    Include and Extend allow us to take methods from a module and add them to an object. They work slightly differently from each other though. Let’s take a look…

    Last updated: February 15, 2016 - 1 minute read - 213 words - Read more

  • Using is_a? to vet method params

    In Today’s Rails we’re inside the button_to helper once again. You may remember that this helper will make a whole RESTful form for you containing just one button.

    Last updated: February 15, 2016 - 1 minute read - 354 words - Read more

  • Shuffling up method params with parallel assignation

    This little rockstar will make a whole RESTful form for you containing just one button, so you can make put, post and delete requests without relying on JavaScript. In this section, we’re going to look at how parallel assignation gives us two clean and simple ways to call the helper.

    Last updated: February 15, 2016 - 2 minute read - 377 words - Read more

  • Creating Read-Only & Virtual Attributes with JavaScript Getters and Setters

    Last updated: January 10, 2016 - 2 minute read - 580 words - Read more

  • Why you should (sometimes) use MongoDB

    Last updated: July 17, 2015 - 2 minute read - 612 words - Read more

  • How does ng-app work?

    Last updated: June 2, 2015 - 1 minute read - 370 words - Read more

  • Organising your AngularJS code with Browserify

    Organising JavaScript in a larger app becomes quite painful quite quickly. The issue is that order of inclusion matters. If I write a service that belongs to a module, I’d better make sure I have created my module before I try to append the service to it or my code will collapse in a messy heap. As we get more and more modules and more and more files, this becomes progressively harder.

    Last updated: April 1, 2015 - 6 minute read - 1385 words - Read more

  • BackboneJS - Step by Logical Step

    Backbone is a the grand-daddy of all the JavaScript MVC frameworks. It’s the progenitor of frameworks like Ember, Angular, even Meteor. It’s a sensibly put together library full of tools to help you organise your web application, a toolkit for tidy JavaScript.

    Last updated: June 30, 2014 - 10 minute read - 2470 words - Read more

  • The JQuery Book,

    JQuery is a library written in JavaScript which is primarily about DOM manipulation. It lets you find parts of a web page and make changes to them with very little code. It’s wildly popular and is used extensively across the Internet. It also forms the basis of other larger frameworks. If you’re serious about web development you need to know jQuery.

    Last updated: June 30, 2014 - 37 minute read - 9196 words - Read more

  • The Angular Book

    Angular gives you super powers. You will be able to see through walls, climb tall buildings with your hands and shoot laser beams from your eyes.

    With Angular you will be unstoppable. You will be able to pull in live streams of data from across the Internet and mash them into your page like a ninja. You will be able to construct your page in modules that download asynchronously. You will be able to create tabs, dynamic forms, live comment streams and other features in a fraction of the time you might have spent using jQuery. You will be able to handle events with NO WIRING CODE. You will be able to AJAX in content and integrate it onto your page with stealth and grace.

    Last updated: February 20, 2014 - 17 minute read - 4337 words - Read more

  • MVC JavaScript without a Framework

    Looking at Rails or Angular there’s a tendency to think of MVC as something rather complicated and difficult to achieve, something that really demands a framework.

    In fact, MV* style JavaScript really is trivially easy to write. It’s a pattern I’ll often drop into if I need to make anything beyond the basics, but I don’t want to break out Angular’s big guns.

    In this post, we’ll create a simple MV pattern. We’ll build a Model and a View and wire these together using events.

    Last updated: July 10, 2013 - 3 minute read - 865 words - Read more

  • Using a Rails concern to dry up Paperclip Attachments

    Rails concerns have come in for a bit of a kicking lately, service objects clearly being a better solution in many instances, but I think there are valid use cases.

    Concerns address the bloated model problem that plagues older Rails instances, where more and more methods are added to your fat models until they become huge and unwieldy. This slows your development as you now need to spend longer reading through code in order to get work done.

    Last updated: June 10, 2013 - 2 minute read - 415 words - Read more

  • Last updated: Invalid Date - 0 minute read - 22 words - Read more

  • Last updated: Invalid Date - 0 minute read - 12 words - Read more