Posts
16 April, 2018

Developer tools

Here's a collection of useful tools that you may reap productivity from. Last Pass Last Pass is a password manager that can help generate unique, complex, passwords for all of the services that you sign up to. It also has great mobile support. Tamper Monkey Tamper Monkey is great for running custom scripts on arbitrary websites. You can use it to either change the user interface, or functionality of a website. For instance, I have used it as part of my development cycle to: Provide auto…
03 June, 2017

Running react unit tests within docker

Docker is a great way to provide a consistent environment for running your development environment, test suite, as well as your production servers. It provides an easy method of specifying the environment requirements, dependencies, as well as your required linux distribution. For instance; If you are making use of automated tests as part of your Continuous Integration pipeline, it can be useful to know how to run your JavaScript tests within a docker container. Your application This post…
31 May, 2017

Feature testing with Capybara page objects

Page objects can be used as a powerful method of abstracting your tests from implementation. Importantly they can be used reduce fragile tests, and promote DRYness - via the encapsulation of common functionality within simple methods. In plain terms: A page object is an instance of a class which abstracts the underlying user interface from your tests, providing methods to interact with the UI, and extract any required information. Terminology Unfortunately page objects are an overloaded term…
28 January, 2012

JavaScript Fun

If there's one thing I like to do in life, it's have fun with JavaScript. Can you guess what this code does? Yep, you guessed it, it alerts hello world . Ah, the craziness that is JavaScript. As a quick explanation, this is briefly what's happening in the above code! Basically we just construct strings and get the chars that we need. What do we do with strings? Well, we then take advantage of one of the two methods of accessing fields members within JavaScript objects IE, we can construct the…
22 January, 2012

Implementing Finite State Machines using Java's enums

I often see a lot of java programs which make use of enums for finite state machines. They perform logic based on switch statements. For instance they may do: Sure, this is fine. But it's not exactly very flexible is it? It's not taking advantage of the fact that enums can offer logic within the enum itself. For instance enums can offer a public abstract void method, which all enum constants must override and implement logic to. For instance This means we can now execute our logic by doing…
04 May, 2011

Welcome

Hello, I am Alan Foster and I hope you enjoy reading my first blog post. Within this portfolio I hope to maintain a list of the things that I achieve to do with computers!