Posts

  • FullStack 2016 - the conference on JavaScript, Node & Internet of Things

    TL;DR: FullStack 2016 rocked, and OMG progressive web apps

    I spent the last three days immersed in the world of FullStack 2016 - the conference on JavaScript, Node & Internet of Things. Broadly speaking, the sessions I attended covered new and future JavaScript features,...

  • A Moment in Timezone

    I noticed recently that an application in production was failing acceptance tests which checked that a user’s selected journey date was correctly displayed (and logged to the database). The root cause of this was that the BrowserStack server the tests were running on was an...

  • Why isn’t mocha running all my tests?

    I noticed earlier that only 3 of my tests were running :(

    Here is my npm test script:

    "scripts": { "test": "babel-node --recursive test/**/*.spec.js" } 

    This bit: —-recursive test/**/*.spec.js is supposed to pick up all files ending in spec.js in...

  • Redux Notes

    Principles of redux

    Use pure functions (those which rely only upon the input args, do not mutate the input args and do not do anything else such as make a database call)

    State is kept in a single store

    State is read-only and can...

  • Refactoring to ES6 and back again

    I’ve been doing a lot of linting on a repo that recently got upgraded to Node. This mainly involves changing things to the ES6 syntax since the code was written in ES5. I used airbnb eslint to help me flag stylistic errors and remaining ES5...

  • Render Testing and Debugging on Mobile Devices

    As featured on the Trainline engineering blog :D

    Debug all the things!

    I’ve been spending quite a lot of time render checking and debugging various features recently. Unit and acceptance tests are essential for assessing the functionality of your application, but rendering is...

  • iframe iPhone 6 bugs and quirks

    A lot of my time over the past couple of days has been spent trying to work out why a Google DoubleClick for Publishers (DFP) banner was rendering perfectly and responsively on desktop browsers and most mobile phone devices but not on the...

  • I love it when a plan goes completely wrong!

    I’ve spent the last few days working through a MEAN tutorial I started months ago but never made that much progress on. I remember my poor pair partner David’s face when I exclaimed ‘oh, looks like I don’t have Node or Java installed on this...

  • New years resolutions

    • Blog more
    • Mentor at Codebar
    • Attend meetups that provide pizza, beer and JavaScript

    Nat x

  • Node Streams

    Streams are a way of inputting and outputting data. They can be readable or writable (or both) and can be paused and resumed.

    Using the filesystem module we just saw, we can create a stream to read data as below. The data is read in...

  • Node fs Module

    File System (fs) is a very useful module that comes with the node installation by default. It can be used to read and write data from the file system on your computer.

    Below is an example of how it can be used in an asynchronous...

  • Node Events

    Callbacks are great, but when there are more than two events and/or they need to be called multiple times, events are used. They’re more flexible and more powerful… Plus you can kind of switch them on and off as you please.

    Instead of using asynchronous...

  • The wonderful world of Node

    I’ve been having a lot of fun learning about Node.js this week. I’m excited to be finally working with JavaScript on the server side, after doing quite a lot of JavaScript things on the front end recently. (Blog post on React.js coming soon...

  • Day 55 | Thanks for the memories

    16 of the 24 amazing people I spent my summer with

    I am feeling a mixture of emotions today. June 2015 have now officially graduated and I’m so immensely proud of what all the groups produced for their final projects and of...

  • Day 50 | Final Project week 1 summary

    It’s been a funny old week. The reason these blog posts are getting so few and far between is that I am spending every waking moment planning, coding, testing, researching or at the very least thinking about this project.

    We’ve had a number of setbacks...

  • Day 47 | Issue central

    All hell has broken loose. We’ve now started our final projects.

    Day 1 was pretty much a disaster. Based on our initial discussions and research, not knowing if one team member was in or out and a general lack of excitement about the project theme...

  • Day 45 | Week 9 learning plan

    Most Important Things I Learned:

    • Good communication in the most important thing in group project work
    • It’s often better to implement a sub-optimum solution to a difficult problem (e.g. database associations) and then let it lead you to a better solution to...

  • Day 44 | I actually need to write a todo list...

    Today we’ve been working on the Pairing Matrix project again, with all teams operating with skeleton staff. In a way it’s easier with less people to cause merge conflicts, but it meant we couldn’t move ahead with any extra features. We implemented a blacklist, and...

  • Day 43 | Penultimate Projects

    So.. this week we’ve been working in groups on a ‘Pairing matrix website’ project. I think one of the reasons for this is so that the coaches can point and go ‘See, it’s actually bloody hard to organise you guys into pairs every day!’. The...

  • Day 41 | Many things todo

    This weekend I made a super cool todo list app. It does everything it’s supposed todo and more, but I’m slightly worried about how big my HTML page is now. It’s stuffed full of angular directives and looks like Bootstrap has thrown up on it....

  • Day 40 | Week 8 learning plan

    Most Important Things I Learned:

    • Protractor and karma testing
    • Angular setup

    Things I Struggled With The Most:

    • Server setup issues
    • Making a second API call to Github to retrieve number of repos for each user displayed in search results....

  • Day 39 | Testing times

    My brain is hurting again. I’ve spent a lot of today debugging server setup issues and getting in the middle of a debate about Rack vs Sinatra as a method of serving up Single Page Applications. In the middle of all this my server file...

  • Day 37 | Are you .gitignoring me?

    Today I worked on a mix of AngularJS and some previous challenges. I’ve done a little bit of Angular before, at a time that now seems like forever ago. I like to call that period the ‘pre-Rubyist era’. It was in March 2015, or thereabouts....

  • Day 36 | Welcome to Natstagram! (1 like)

    I think these weekend challenges are getting longer y’know… They’re also getting more and more interesting, and more satisfying to complete. Our weekend challenge this week was to recreate Instagram, an immensely popular but strangely simple site. I use ‘simple’ in a rather loose sense....

  • Day 35 | Week 7 learning plan

    Most Important Things I Learned:

    • Rails! I am feeling a lot more familiar with rails after the weekend challenge
    • Stuff about databases - how tables are joined and accessed

    Things I Struggled With The Most:

    • Active records associations part of the...

  • Day 34 | Off the Rails II (the sql)

    The entire cohort have been totally confused by database associations for the last two days. The principle of what we’re trying to do makes sense, but accurately setting up relationships and expressing them or their related methods in Ruby - in the correct model or...

  • Day 32 | Off the Rails

    This week is Rails week. Everyone has an opinion on Rails, ranging from ‘Easier and better than Sinatra’ to ‘I don’t understand how it’s doing stuff for me’ to ‘I don’t like this Rails Voodoo magic, make it stop!’. There are some very nice features...

  • Day 31 | How to: Host your static site on Heroku

    Hello blog fans. I’ve spent the last couple of days working on the bowling challenge again, and it now includes an interface (HTML, CSS & jQuery). It’s pretty much done at last, so I decided to host it on Heroku here. Heroku is...

  • Day 30 | Week 6 learning plan

    Most Important Things I Learned:

    • Constant communication is really important in a group situation, to make sure the project is moving in the right direction and to make sure bad merge conflicts don’t happen
    • How to be agile and cut features/change plans...

  • Day 28 | Makerthon part 1

    A makerthon is basically a mini hackathon, except there’s no prize at the end. The aim is to build a fully tested product in an agile way, using kanban and ensuring regular team stand ups are held. It’s better to create something that works and...

  • Day 27 | Spring cleaning a database and freezing time

    Today we resumed work on the extended Chitter challenge. We created a nice interface and sorted out some of the navigation issues, so the whole thing looks like more of a working product now. We definitely learnt a lot from the project, even if it...

  • Day 26 | Error: Floor has already been spied upon

    I spent most of Sunday working on the Bowling Challenge, which was essentially a day long logic problem. So I had a very nice day :) The challenge is to model a bowling game which I took to mean a game with random inputs. The...

  • Day 25 | Week 5 learning plan

    Most Important Things I Learned:

    • Hoisting
    • API calls/JSON files
    • CSS transitions

    Things I Struggled With The Most:

    • Google maps geolocation
    • Working with Ruby and JavaScript at the same time. Working out what will be passed...

  • Day 24 | API days

    The tube strike threw a bit of a spanner in the works today by preventing a third of the class from getting in. A lot of the people who did make it in had to get up really early and leave early, but we managed...

  • Day 23 | AJAX.. but not then bathroom cleaner or the football team

    This week has involved a couple of famililar topics in the shape of HTML and CSS, so I’ve been able to give myself a bit of time off in the evenings! I’ve been showing a couple of people how to make pages more presentable and...

  • Day 21 | Chitter chatter & JavaScript

    Hellooo week 5! We’re really in the thick of it now. In less than two weeks we will lose the ‘juniors’ label and be fast approaching our final projects. This is going way too quickly! I am having the time of my life and in...

  • Day 20 | Week 4 learning plan

    Most Important Things I Learned:

    • Lots of datamapper configuration details!
    • Testing with databases using factory girl and database cleaner
    • How passwords work
    • How controllers should be organised (e.g. users/new structure as a convention for creating something, delete methods...

  • Day 19 | Factory Girls working overtime

    I had a great time today. Thursdays are fast becoming my favourite day of the week at Makers. We usually spend the first day or two of the week getting stuck into a new topic, Wednesday making some good progress and Thursday marvelling at the...

  • Day 18 | Salty hashes

    Today we mainly focussed on implementing user sign ups and password security. It’s kind of scary building things that actually require a layer of security and I’m trying to pay extra attention to that element.

    I found out about how passwords are encrypted (or hashed),...

  • Day 17 | Building a real thing

    This week I was excited to start learning about databases. The last two days have been spent getting to grips with the setup and using Heroku, a super awesome tool that takes about 2 minutes to set up and gets your app online just as...

  • Day 16 | Plane.exit returns false

    I spent the weekend having a lovely time in Copenhagen. The only non-lovely thing about it was that I spent several hours on a plane home that was going nowhere with no wifi or place to charge my laptop. Unable to look anything up, I...

  • Day 15 | Friday learning plan

    Most Important Things I Learned:

    • How the internet works!
    • How to use BDD, controllers, views and sessions
    • Debugging is awesome. The alumni helpers helped me a lot with this and I’m now a lot more able to identify the cause...

  • Day 14 | Why is my test like an NHS ward? It's full of bugs

    Today was another great day. Kate and I were super excited to combine forces and create a game which allowed the placement and striking of battleships. That probably doesn’t sound very exciting but every little win not only resulted in tests going green and passing,...

  • Day 13 | Looking up

    Today was a pretty good day. For the last week or so I’ve been a bit worried about whether I’ve been understanding enough and whether I’ve been implementing the concepts correctly but today I feel pretty good about everything! The three things that really pleased...

  • Day 12 | What is the internet?

    This week we’re learning about a newfangled invention called… the ‘internet’. We played a game in our stand up to help illustrate how http requests are sent out to servers, what controllers and views do to build pages and retrieve app logic, and how responses...

  • Day 11 | Takeaway injection

    I spent a lot of this weekend working on the TWO challenges we were set. Do you know how long it took me to write the bit of code below? This code is most of the answer to the ‘inject challenge’ (the other bit of...

  • Day 10 | Summing up the week

    Most Important Things I Learned:

    • Pairing is really hard! Tansaku, thanks for your advice on this
    • It’s not about finishing the task, it’s about how much you learnt on the way
    • The seniors struggled too, and most of my cohort...

  • Day 7 | A new approach

    A minimum viable product (MVP) is the simplest system you can build to validate the fundamental concept of what you want to build. An MVP sequence is a series of systems of gradually increasing complexity that take you slowly towards a more complex system that...

  • Day 6 | Uphill Battleships

    Week two already? My how time flies! Speaking of flying, this weekend I completed the Airport Challenge which was our cohort’s weekend homework. At first I massively overcomplicated it by adding in methods that I later realised might not be necessary to satisfy the user...

  • Day 5 | Double Trouble

    Since there are an odd number in our cohort, today I ended up in a three instead of a pair for the day’s activities. I was a little aprehensive about this because I’d been told it was quite difficult. In actual fact it turned out...

  • Day 4 | BROKEN Boris Bikes

    Today was a day of ups and downs. I’ve discovered that it’s incredibly difficult to switch pairing partners part way through a project. It’s all good experience and practice of course, as there will be plenty of times in our future jobs when we have...

  • Day 3 | Boris Bikes

    Today started by being locked out of the building and catching up with the rest of the cohort and seniors while stuck in the stairwell. I met my mentor in person for the first time and found out about which bits of the course are...

  • Day 2 | TDD. Success == Failure

    Today was our first ‘proper’ day as Makers students. I feel like the day flew by, but when I look back at what we’ve actually achieved today I know the reason I am so tired now is that we did a hell of a lot....

  • Day 1 | And we're off!

    Today was the day I had been waiting for for… several weeks since I passed my interview. The good people at Makers decided to be nice to us and ease us in gently, which wasn’t what I was expecting considering that with the pre-course material...

  • Pre-course Summary | T minus 2 days!

    Wow. That 4 weeks went really quickly! It scares me to think that we’re a quarter of the way through the journey in effect. Other statistics that scare me are: in 2 weeks I’ll be mentoring a newbie, in 6 weeks I’ll be a ‘senior...

  • The calm before the storm

    Calm? There was no calm! I was expecting the weeks leading up to our first day to consist of a bit of light reading and a few challenges here and there, but 3 days into the pre-course we seem to be in the thick of...

subscribe via RSS