Redux, keeping it immutable

Published

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 be the same every time.

Git and Putty on Windows in command line

Published

I’ve moved away from using a Git GUI to command line, I typically used GitExtensions. The reason being, it’s a little slow having to open any GUI to make a commit and push. It is quicker to use the command line and a side benefit you learn more about how Git works.

Building London Traveller app

Published

This project was about using Ionic Framework to build a mobile app and publish it to the Android play store.

Useful JavaScript snippets

Published

I have picked a few useful features of JavaScript which you might find helpful and I will explain how to use them.

A faster web Delay JavaScript loading to last

Published

The speed of a website is important to most users especially when they are looking for specific information. They won’t wait around long for your website to load for that information and will try find it somewhere else. One way to motivate the user to stay is to get some content showing that they can consume as soon as possible to give incentive that the rest will be arriving shortly. The common blockers that cause the long wait from a blank page to all of a sudden everything shows are CSS and JavaScript files.

@font-face throwing a 404 on woff file

Published

I’ve noticed that in Google Chrome and FireFox console the font file resources .woff throws a 404 when using @font-face CSS feature.

You will need to add a configuration to allow IIS to serve the font. In your web.config you can add the follow lines in the system.webServer block:

<system.webserver>
     <staticcontent>
            <mimemap fileextension=".woff" mimetype="application/x-font-woff">
     </mimemap></staticcontent>
</system.webserver>

By applying this mimeType: application/x-font-woff for .woff will should fix this issue in Chrome and Firefox. This is the mimeType they request and IIS can’t work out which file type is should serve until it registered in the web.config or IIS.

Mobile website or responsive design

Published

How do you go about choosing whether to develop a mobile site or responsive website? I would say its depends on what you are trying to achieve and with all the hype over responsive design you might sway in favour of that. In this post I discuss some benefits and negatives about both options which hopefully will help you come to a better decision.