Image for post
Image for post
The programming bug can strike anywhere, so you’d better watch out — Photo taken today at Memory Cove, South Australia.

My first PR for the year, and a lesson to us all.

const Copyright = ({ holder }) => (
<Typography>
{'Copyright © ' + holder}
{new Date().getFullYear()}.
</Typography>
)
Copyright.propTypes =…


Image for post
Image for post
My first car, bought the day the Covid 19 lockdowns started.

In the age of Covid 19


Image for post
Image for post
A rapsberry reduction. Photo by the author.

Judicious use of map and reduce functions is a core skill, but one seldom used effectively.

export const VERBS = ['start', 'stop']
export const ACTIONS = VERBS.map(verb => import(`acts/${verb}`))
import { VERBS, ACTIONS } from 'acts'export default function action(verb) {
const i = VERBS.indexOf(verb)
return ACTIONS[I]
}


Image for post
Image for post
A Shadow Over Canberra: Photo by the author.

I just tracked down a bug that, for a while, made me doubt my grasp on the very foundations of Javascript .

// This fails as it thinks the scanner has not started.const commonData = getCommonData();
console.debug('commonData', commonData);
*** Hey I’m a feedscanner ***
*** Hey I’m a feedscanner ***

Javascript imports are cached so why am I seeing two ditinct feedScanner modules?


How to use the Apple Remote app on iOS to control the Music app on your Mac (updated, and updated).

Image for post
Image for post
macOS 10.15.2 fixes a lot of issues including the borked Remote issue.


A window cleaner dangles outside a hotel window in Amritsar, India.
A window cleaner dangles outside a hotel window in Amritsar, India.
Window Cleaner in Amritsar, India (Image by the author)

How React’s new Hooks API can help you win the class war

What are hooks?

Watch Dan Abramov’s introduction to React Hooks at React Conf 2018.

The useState hook


A flow chart showing the interrelated concepts around human activity, global warming, and climate change.
A flow chart showing the interrelated concepts around human activity, global warming, and climate change.
Global warming, climate change, and the climate emergency.

but everyone is acting as if it’s the Roaring Twenties

Climate Change 101


Image for post
Image for post
One night in Bangkok (Image by the author)

And make my tests more honest


Image for post
Image for post
Image derived from an original photo by Peter Stevens and adapted under the terms of its license.

and why would I use one?


Image for post
Image for post
A walk in the Swiss Alps (Image by the author)

The trouble with Typescript

Background

So let’s talk about Typescript

Dave Sag

Blockchain Tsar & Senior Javascript Practitioner at Industrie&Co. (https://industrie.co)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store