Category: web dev
-
Using the Community
You can’t always successfully google problems when you’re starting out – usually because you don’t know the correct terminology for the issue or solution. Often you might still get a newbie StackOverflow hit, but when there’s not even that, you need a human to help out. One of the things ZTM do with their courses…
-
Openlayers & Vite
In Randy Pausch’s last lecture he talks about the benefit of brick walls in our lives – they tell us how much we really want something. Software development is full of these brick walls – things we want to do, but there’s a barrier to achieving it. Will we persevere and accomplish the thing, give…
-
APIs – http & https Mixed Content error
Ran into a little bump today – I was calling a cool API that gives the current location of the International Space Station. In a classic case of “it worked on my machine” it worked perfectly in the Live server in VS Code on my laptop, but when I pushed it up to my GitHub…
-
React code is not HTML
I was looking at this ugly code in a React app: Since I don’t need any of those CSS properties to change at any stage, I could just convert it to pure HTML/CSS right? Well no: The newbie trap I’ve fallen for here is that although that <div style= tag looks like HTML, it’s actually…
-
De-structuring objects in JS
I’ve worked through my first React tutorial app, and obviously that’s a lot – I’m struct by how messy mixing HTML, JS and React is. One language feature that’s being used quite a bit, and that is apparently a JS ability I’d never seen is ‘destructuring’ object properties. It’s very cool and obviously useful. It’s…
-
Digital Color Meter
For the Calculator project, I needed to know the exact RGB values for the colours on the iOS calculator buttons so I could reproduce them. Assuming a tool for reading colours from the screen exisited, I googled it, and was surprised to find this exact tool is already installed by default on MacOS. It’s called…
-
Calculator
I’ve been doing a bit of driving during the holidays, which means a lot of podcast listening. An episode of JavaScript Jabber about JS features you should never use sparked my interest in eval(). eval() takes whatever you pass it in a string and executes it in the JS engine. This is a crazy concept…
-
CWD – 185 – Problem solving
Line 10 When I’m looking at a function, I’d prefer not to also have to hold global state in my head – so I’m all for functional programming as far as that goes. I’m less concerned about side effects, so I wouldn’t always bother to copy a parameter like this, but the argument is stronger…
-
Types of Concern
I am still struggling with the dynamic typing of JS. I guess the benefit of such an approach is needing less characters – which makes sense in a scripting language like bash, but in real programming it opens us up to a whole class of avoidable errors. To program defensively in JS would mean loading…
-
Lost in Translation
We’re in a pretty good place now (compared to a few years ago) in terms of being able to rely on JavaScript behaving the same on different platforms. There’s still some differences (mostly in when things are implemented) but overall, not to bad once you decide to no longer support Internet Explorer. In times past,…