Tag: code

  • Mutation === 💩

    Mutation === 💩

    One of the many things I’ve picked up from the excellent Syntax podcast over the years is mutation should be avoided. Today a came across a great example of this with the reverse array method. I had some code that looked something like this: To my surprise the resulting output of the console logging was…

  • Coding on a plane… on an iPad

    Coding on a plane… on an iPad

    The project In my ongoing efforts to up my development game, I’m currently working on learning how to create an app that has user authentication. Adding authentication to the web app is completely new to me and as always, I’m time constrained. So, when I found myself in a plane on the runway for over…

  • RESTful Routes

    RESTful Routes

    What are REST, Routes, CRUD? Representation State Transfer or REST is a pattern/convention for defining our routes. Routes are the code that listens and receives requests then figures out what to send back. CRUD stands for Create, Read, Update, and Delete. These are the 4 basic functions we have when building an API. So why…

  • YelpCamp

    YelpCamp

    I’ve now reached a turning point in my web dev course. This morning I started writing code on my first meaty project, YelpCamp. As the name implies the YelpCamp project is Yelp but for campsites. The idea isn’t to release this as a service that people will actually use. The intent is to combine what…

  • JSON

    JSON

    I’ve worked with JSON data before when I was learning Swift and iOS development. At the time I didn’t really know much of JavaScript or its object syntax. Back then, I made my version of a weather app call “Clima“. That app pulled down weather information based on your current location using JSON data from…

  • A battle for the ages

    A battle for the ages

    Spaces vs tabs is a hilarious holy war that doesn’t really matter but I do find amusing. Modern text editors normalise differences on a project anyway, but I do love these ideological battles. The video below covers it better than I ever could. Enjoy… btw I’m a spaces man 😉

  • I made a thing: Aroha generator

    I made a thing: Aroha generator

    So I made another thing. The only reason I’m really even talking about it is because what’s going on in Christchurch is so awful I can hardly bear it. Making new things (even simple things like this) is a good distraction. So in an effort to cheer myself up I made a web thing that…

  • Constantly letting down my variables

    Constantly letting down my variables

    As it turns out I’ve been doing everything wrong. Well, maybe not everything, but at the very least I’ve been declaring variables incorrectly. There are actually three different variable types in JavaScript, var, let, and const. I’ve been using var exclusively and it’s actually bad practice. So what’s the difference between each and which should…

  • Flow

    Flow

    Getting into a flow state is super helpful when you’re trying to get some coding done. Whenever I’m working on a course exercise or side project I find a few things in my daily routine really help focus my mind: Keeping my desk tidy – It seems silly but a cluttered desk is a cluttered…