A close up picture of a delicious looking hamburger.
The hamburger is a terrific metaphor for the tiers of an n-tier application. Photo by Media News and used within the terms of its license.

And what are the skills that comprise a full-stack project team?

When I started building web applications in 1995 they were called data driven websites and the exciting jargon of the day was “three tier”. The idea was that a web app had three tiers. The Front End, which ran in the browser, displayed the ‘view’ tier, while, over in the Back End, lived the ‘controller’ tier, (a REST API perhaps, or simply code that rendered the ‘view’ to HTML), and the ‘model’ tier, some representation of the peristable data. …

Just like sand, you can put different kinds of components into different buckets. (Photo by Don DeBold and used under the terms of its license)

Care and handling of pure and simple vs display, and self-managed components

I’ve been working, as part of a team, on a project recently, building a React component library for use within a number of related corporate environments. As part of this process we’ve found it makes sense to classify the components in terms of where they get their data from.

We’ve also settled on a number of rules which help us keep components consistent and predictable.

Component types

React Components can get data from a couple of places:

  1. The component gets all of its data from props, or
  2. It gets some data from props, and some from somewhere else (context, state, app-state, etc)

Autumn in Canberra is my favourite time of year. (Image by the author)

Because recursion rules.

A very common pattern when ingesting data from an API involves indexing that data within your app so you can read it back without searching.

An example

Let’s say you have an API that returns a list of items, such as.

const ITEMS = [
title: 'The One',
contract: '1',
author: 'alice'
title: 'It Takes Two',
contract: '2',
author: 'alice'
title: '3x a lady',
contract: '1',
author: 'beck'
title: 'Four on the Floor',
contract: '1',
author: 'candice'
title: "In de'Pipe Going Five by Five",
contract: '3',
author: 'candice'

In your app…

Welcome — an NFT from the Three Years in India collection on OpenSea

And what’s a shitcoin?


If Bitcoin is digital gold, then Ether is digital fuel, and most of the De-Fi coins, and NFTs you hear about are layered on top of Ether.


Nothing I say constitutes financial advice; I’m not a financial advisor, I’m just someone into technology and art and their numerous intersections, and who enjoys explaining this stuff to people.

Bitcoin is the OG cryptocurrency

Bitcoin is fast becoming the world’s preferred store of value — set to overtake gold. There’s now over US$1 trillion stored in Bitcoin. There can only ever be 21 million Bitcoin ever, and the reality is that, because people sometimes lose their Bitcoin…

EV charging in regional Australia is getting more mainstream. (Photo by the author)

A form-letter for your clean-air taxing local senator or local member

Dear (insert correct salutation),

I am voter in the electorate of (insert the name of your electorate) and write to you as someone who is concerned about the proposed introduction of a clean-air tax, aka an electric vehicle road-use tax.

refs: pick one, or find another
- https://thedriven.io/2020/11/11/south-australia-to-impose-road-user-tax-on-electric-vehicles-from-2021/
- https://www.theage.com.au/politics/victoria/pallas-zaps-electric-cars-with-road-charge-20201121-p56gp3.html

The proposed tax is bad policy

I have read the report Road User Charging for Electric Vehicles released by Infrastructure Partnerships Australia, which paints the idea of a per-kilometre charge for EVs as an inevitability, but which discounts the many benefits of EV use.

This report purports to provide the intellectual underpinnings of the move by…

An extract from ASCII Cthulhu by Dave Sag
Extracted from ASCII Cthulhu, my first ever NFT based artwork.

Finally a way to create and sell digital originals.

Back in 1993 Jesse Reynolds and I started a company called Virtual Artists. The original intent was to use it as a vehicle for creating what we called at the time, Virtual Art. We did a bunch of interesting stuff, and created many works of art with themes that intersected ideas of reality, digital creation, installations and conceptual art, writings, and events. We quickly realised that the worldwide web would be a ‘place’ for us to both create art, and also to do more straightforward commercial work.

We were the first of what became known as “web design” companies in…

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.

I ran git pull upstream develop and was quietly relieved to see that no-one had changed anything over xMas. I ran git push just to make sure my fork was in sync. The package.json file has a preprocessor step when running git push that lints and tests everything before it pushes.

And damn the tests failed.

And why did the test fail?

Because now it’s 2021, and the Copyright component’s snapshot still said 2020, cursed be its name.

The component:

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

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

In the age of Covid 19

It’s almost xMass and typically, each year, I like to get over to Adelaide, South Australia to catch up with family and friends during that period of enforced annual leave. Normally I’d fly. This year however I’m very keen to attempt the drive, having finally bought myself my first car.

When I was about 14 years old my father asked me what kind of car I thought I’d get when I grew up. My response was that I didn’t think I really wanted a car, so much as I wanted a robot to carry me around at high speed, and…

A rapsberry reduction. Photo by the author.

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

The map function is something offered by all Iterable objects (Arrays, Sets, Lists, etc) and allows you to iterate through the items, apply a transformation to the item, and returns a corresponding collection of the transformed items.

export const VERBS = ['start', 'stop']
export const ACTIONS = VERBS.map(verb => import(`acts/${verb}`))

That’s handy for lots of things, but the above isn’t terribly useful. To get to a function you have to do something like:

import { VERBS, ACTIONS } from 'acts'export default function action(verb) {
const i = VERBS.indexOf(verb)
return ACTIONS[I]

What’s more useful is if you took the…

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 .

Symptom: I am calling a function, getCommonData, loaded from a module called feedScanner. Calling getCommonData() ought to return actual data. It does in unit tests, but, in practice, it’s coming back in its initialised state.

// This fails as it thinks the scanner has not started.const commonData = getCommonData();
console.debug('commonData', commonData);

Investigation: It looks like my hunch was right, there are two feedScanner modules! WTF.

*** Hey I’m a feedscanner ***
*** Hey I’m a feedscanner ***

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

Investigation: It must be something to do with thewebpack

Dave Sag

Blockchain Tsar & Senior Javascript Practitioner at Industrie&Co (part of Accenture) — see 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