JavaScript, deployment and prototyping - Code with Hugo 14
JavaScript, deployment and prototyping - Code with Hugo
#JavaScript basics
New and old posts to get gain some confidence in JavaScript. The following are all fundamental knowledge, which will help beginner and experienced developers alike.
1. Impress interviewers with recursion in JavaScript
Some examples of solving toy problems with recursion in ES6 JavaScript.
2. Array vs object in JavaScript
In the same vein, how to decide whether something is and Object or an Array.
3. First-class and Higher Order Functions
One of the coolest set of JavaScript features that gives it most of its composition power.
4. Closures, Partial Application and Currying
A few tools to help you think more functionally although using them extensively aren’t the most readable.
#Deployment and prototyping
Last newsletter, I mentioned my deployment setup.
1. Deployment options: Netlify + Dokku on DigitalOcean vs now.sh, GitHub Pages, Heroku and AWS
I’ve had to solidify my deployment choices since I’m running a new initiative called “Accountable Blogging” (accountableblogging.com). The first section of it was a product called Post Frequency. The project as a whole aims to help people get into blogging more frequently.
2. ObservableHQ notebooks for JavaScript demos and prototypes
As part of prototyping Post Frequency I created a GitHub-style Reddit contribution graph on ObservableHQ. This explains what it is and why I like it for prototyping and demos, especially for visualisations or projects that will be built “properly” with Vue/React.
#Vue
1. Multiple Vue components in a single file
In React, there’s a pattern whereby you can put multiple components in a file to keep stuff dry. I saw Swizec Teller complain about how he can’t do this in Vue and decided to show him that you can. There’s actually 4 different ways to do it.
AngularJS is reaching end-of-life. Vue’s template syntax looks quite similar to AngularJS which makes it a semi-natural choice for migrating/modernising an AngularJS app.
Links and some #wins
1. micro by Zeit, Asynchronous HTTP microservices
Super minimal library to write Node/JavaScript microservices. Comes with body parsing by default, and leverages async/await support, eg. you can return { my: 'data' };
instead of the Express-style res.send/.json
2. esm by John-David Dalton (the lodash guy)
A module that allows you to use ES6 modules in Node without transpiling your code (or using feature flags). Super useful when you want to share code (eg. constants strings) between your frontend and your backend but don’t want to bring in the whole Webpack/Babel/Rollup armory in.
3. Dokku on DigitalOcean One-click install
DigitalOcean has a great on-click installer for Dokku, there’s some tips in Deployment options: Netlify + Dokku on DigitalOcean vs now.sh, GitHub Pages, Heroku and AWS.
I launched Post Frequency, a tool that allows you to visualise your content output. Whether that’s a blog, a podcast or anything else that can be exposed as an RSS feed.
5. Why Iām done with Chrome by Matthew Green
I stopped using Chrome and switched to Brave after I read this post š.