Year: 2018

My Blog. Full Stack Software Engineer. Ex-Growth Hacker.

eval() function javascript, what to use instead

What’s the deal with the eval() function in Javascript?

I can across the eval function today when looking for an alternative to a multiple, nested if statement. This if statement would check what a certain key’s title was and invoke the function which  corresponded to that key name. We thought about listing this out as key value pairs (with the function as the value) in…
Read more

error handling Javascript

Gotchas of error handling and testing, Javascript

Recently I have been mainly working with Node JS and have been tripped up by a few things while trying to handle errors. I noticed other people were also experiencing some problems handling errors and unit testing them correctly. I thought I would make this post in case there are others out there struggling through…
Read more

Live Element Lists vs Static Ones, Why document.getElementsByClassName is different to document.querySelector(‘.className’) : Bitesize JS

Bitesize Javascript series I was working on a bug in our code base with a colleague, when he noticed something strange about the behaviour of document.getElementsByClassName. In our code base it had been implemented as if it acted like document.querySelector, ie. you could save a list of elements to a variable, then mess with those…
Read more

html element root element

Document.documentElement: BiteSize JS and web performance

I was recently advised to use Document.documentElement when querying the DOM to get the html element. This came about because I was refactoring an old code base to swop JQuery for vanilla JS. Doing this I saw: $(‘html’) This is JQueries way of selecting the whole Html element. Since I am relatively new to javascript…
Read more

Want to start a company but not sure where to begin? A guide to doing it the Agile way

I spent a few years as a growth hacker for tech start-ups in Asia. During this time I worked with many startups, both successful and not. I spoke to many start-up founders and learnt about their successful and less successful ventures. I tested what they said and watched which results worked and which did not.…
Read more

The future of google's AMP technology. Javascript off the main thread?

The Future of AMP : JavaScript which doesn’t block the main thread?

At ComparetheMarket.com we are constantly optimising the speed of our site. We were an early adaptor of Google’s AMP technology, sold on the mobile page speed win’s it promised. Due to how early we were in using this technology we have faced many challenges on the way. I wanted to look at if the future…
Read more

learning javascript eventloop

Events, EventListeners and their relation to JavaScript, the Browser and the DOM

  Notes on things I have learnt about events and their listeners and JS while working through Wes Bos’s JS30 and talking to colleague at Compare the market. (Beware this is not a coherent article just random scribbles which i took down through a conversation). Events/ Events/ Events The DOM Is an event based system. The…
Read more

connecting to Moz's API url request

How to connect to the MOZ API with a C# Application

An API is basically just a website. A website which only contains data (usually in the form of JSON), no html, CSS or java-script. To call MOZ‘s API we have to make up a URL string which will be posted to the MOZ server. The server reads this Url (request) and decided which information you want. It send this information back…
Read more

system architecture of a MVP tech startup

System Architecture – Designing A Data Security App Which Speaks To A Number of APIs

I recently took part in the London Business Schools Hackathon, HackLBS. A weekend event, ran by London Business School with the premise of creating products to solve future needs. We organised into teams and spent the time designing a product and action plan for starting a company. My team decided to create a tool which shows users a map of…
Read more

How to set up a virtual machine on your mac

A virtual machine is essentially a new machine on your current one. A new environment (area(in memory)) which is separate to your current. Why would one do this you ask? Simplezz, to create a windows operating system on a mac computer. This would mean you no longer use an IOS environment but have what is basically a…
Read more