Category: Dev

  • on() click()

    on() click()

    Today I learned the difference between the on(“click”) and click() methods in jQuery. click() only adds listeners for existing elements, so it will completely ignore any dynamically added items. So, in the example below only the <li> declared in the HTML file will be clickable. All of the new <li> elements added to the to-do…

  • VS Code

    VS Code

    Recent reading leads me to think my text editor of choice (Atom) might not be the best solution for my current needs. To that end, I’m downloading VS Code just to see what all the fuss is about. The number one thing I keep hearing about VS Code is its performance. I’ve always found this…

  • What is the state of JavaScript?

    What is the state of JavaScript?

    This JavaScript thing is really catching on eh? As the name suggests, “the state of JavaScript” survey gives a snapshot view of JavaScript development. What everyone (over 20,000 developers anyway) is using and enjoying or otherwise. It also gives a general sense of the direction things are going in. As with the StackOverflow survey, I found…

  • Pigs in namespaaaace

    Pigs in namespaaaace

    When you’re working on a JavaScript (JS) app you’ll create loads of functions and variables. By default in JS, there is no namespacing so everything you declare is effectively in the global namespace. This can lead to issues where two or more functions or variables can easily be called the same thing and create conflicts.…

  • Atom snippets

    Atom snippets

    One of the things I love about modern text editors is code snippets. Coding tends to involve repetition, code snippets can really help cut down on needless typing. I group all my code snippets by prefixing them with “my”. That way to view all my snippets I just start typing “my” and Atom shows all…

  • Selection

    Selection

    One thing I notice about jQuery is how it simplifies common tasks. A good example is something you do all the time with JavaScript, select DOM elements. In JavaScript selecting all li elements would look something like this: The same selection using jQuery is like this: At this stage of my learning, I can’t say…

  • Survey says

    Survey says

    Today I was reading the 2018 stack overflow developer survey and boy was it an interesting read. There are loads of insights into the current state of software development. For example, JavaScript continues to grow in dominance. If you’re working on the web and you’re not learning JavaScript you need to start yesterday. It’s been…

  • Emmet!

    Emmet!

    Whatever your text editor of choice (I just can’t quit you Atom) there is a wide range of plugins to enhance its capabilities. One such plugin that I use constantly is Emmet. Emmet can be used for a number of things, but where it really shines is speeding up my HTML production. Emmet uses a…

  • Hex

    Hex

    Just a quick post to say I’ve updated the colour game with a new mode, Hex colours. To enable different modes I’ve changed a little bit of the UI. So the difficulty is now a dropdown making room for a matching mode dropdown. The beauty of this is I can add other modes (CMYK for…