January 3, 2018

JavaScript asynchronous functions and error handling

Filed under: Technical — Tags: , — James Bunton @ 9:37 pm

What is asynchronous I/O?

The web services I build spend most of their time doing one of these two classes of things:

  • Processing – Burning CPU cycles calculating things. For example JSON parsing, HTML rendering, image processing, etc.
  • I/O – Waiting for some event external to the CPU/RAM system to finish. For example an HTTP request or DNS request.


August 15, 2016

Quickly remove read-only web page form fields with a bookmarklet

Filed under: Technical — Tags: , , , — James Bunton @ 9:11 am

It’s somewhat common for some web pages to require that you enter your password by clicking buttons instead of using a regular form input field. For example the loans.com.au login screen does this.

The stated reason is usually security. However we should all be using password managers anyway, so this is quite annoying.


July 14, 2016

Understanding ‘this’ in JavaScript

Filed under: Technical — Tags: , , — James Bunton @ 10:27 pm

I believe the behaviour of the this keyword in JavaScript is one of the most confusing and poorly thought out parts of the language. If you understand how objects and classes work in some other language, but don’t understand why JavaScript behaves weirdly, this blog aims to help you out. By the end you’ll understand how this works and how to make it work for you.