Explore My Notes

Marxian alienation and web development | Heydon Works

Some interesting thoughts from Heydon on burnout, why it's a positive thing that we're talking about it more, and what a major root cause is for many people:

Burnout is what Marx called alienation. It's when a worker becomes estranged from their work. It sounds like a big, grand thing, but it happens every day, in small ways. As a web designer or developer burnout comes calling when you try to do good work, but you're not allowed.

Thinking in React hooks | Amelia Wattenberger

I'm not going to lie, some of Amelia's breakdown of why hooks > class components went over my head, but the reasoning is solid (plus, preaching to the converted 😉). Even better, though, is that she shares a number of open-source hooks you can use, including ones for synchronising URL hashes and setting/updating cookies. Useful.

📆 03 Jun 2020  | 🔗

  • JavaScript
  • React hook
  • React
  • component
  • class
  • function
  • example
  • guide
  • URL
  • hash
  • cookies 

It's plant, it's animal, it's bitroph | Planet Furaha

The idea of an animal that can derive all or some of its energy needs from the sun is one that sci-fi authors have often touched on. Gert has proposed the nomenclature "bitroph" for such a creature, which I like. He also points out that certain sea slugs are known that "steal" chloroplasts from ingested algae and continue to use them as a sort of battery; they aren't necessary for survival, but help during lean times. Personally, I've always considered the way cold-blooded animals bask in the sun a form of photosynthesis and saw the skeletal adaptations of creates like Dimetrodon (such as sails and large fins) as potentially analogous to bitrophic behaviour.

Gert has also modelled a rough estimate "leaf" size for a mammalian-type metabolic rate. For an animal the size of a bandicoot, it would need to be a circle with a 40cm diameter. Obviously that would look a little ridiculous (and be extremely vulnerable to attack) but honestly it's well within the bounds of reality, which is a pleasant surprise. As he points out, the surface area would be reduced for less energy-intensive body plans, such as crustaceans, as well; plus, having large foldable flaps of photosynthetic skin isn't exactly a stretch (pun intended) when you consider bat and pterosaur wings. Interesting indeed.

Update 15/06/20: Gert's published a follow up. The short of it is that there are a lot more issues with the idea: available sunlight, metabolic need fluctuations (like movement), the fact leaves have mass. On the plus side, photosynthesis on Earth is pretty rubbish, so it could be made a lot more efficient.

Round to the nearest 0.5 | Yang Yang

I'm still chipping away at getting a review section working. Part of that has been finding a way to automate the calculation of series ratings from individual ratings. Not the hardest equation in the world: take the sum of the ratings and divide by the total number of reviews. However, I want to display this using a star (⭐) system, which means I can't have any decimal other than .5 or .0.  Like a lot of languages, PHP will only round to a whole decimal, so you can do .0, .1, .01 etc. using round(), but nothing in between. Luckily, Yang has a solution:

$rating = round((sum rating / ratings count) * 2) / 2;

It's a bit fiddly, but it means that every rating it outputs is either .5 or .0, exactly what I'm after.

The panopticon | Seth Godin

Seth reckons there are three ways to track whether people are working hard:

  1. The boss can watch people in meetings;
  2. The boss can watch people at their desks;
  3. An honour system, where people promise to do something and then do it.

Working from home makes #1 easy and #2 pointless, but #3 is where the magic happens, and I agree.

It seems as though only the third one is a useful, long-term way to allow us to do our best work together.

📆 02 Jun 2020  | 🔗

A static future | Josh W Comeau

A static website is a website where the initial HTML is prepared ahead of time, not dynamically generated by a server on request.

I like this definition. I think it does a good job of encapsulating why static sites are beneficial whilst also being clear that there are very few things a static site can't be. As Josh demonstrates through several examples, he has static sites that interact with databases; static sites that allow users to create generative art (via a load of client-side JavaScript); and normal websites that would only ever want static pages anyway.

Better yet, static sites let you shift computation (where possible) from the user to the server. Sites like this one where all pages are rendered on build. Plus, it gives you additional resilience to mistakes; a production error that crashes a build doesn't impact a live site, and even live errors can simply be rolled back one deploy if you're using a service like Netlify.

Static sites are more performant, more resilient, have better SEO, better user experience, better accessibility, they can be more easily cached. Yes, there will always be some web uses which don't fit the model (a static Slack would be a nightmare) but for a lot of websites, it could be a better choice, particularly as we get features like Incremental Builds.

Gardened | Ethan Marcotte

We’re dealing with the results of bad defaults, deployed at a terrible scale.

The way we make websites is built on a false assumption: that the tools we use are the right ones for the job. Now – more than ever – we should be questioning why common frameworks, dependencies, libraries, and other packages are often poorly optimised. Engineers can put in the work (and many do) to fix those issues, but if the default state is broken then most won't.

In other words, they have to give a damn. But giving a damn doesn’t scale.

It's the users that pay in the short-term, but in the long-term Ethan makes a valid point that it may ultimately mean the tech industry will require greater oversight and regulation. Some of what makes the web great might be lost in that process but, as he puts it:

If other industries follow building codes and regulations, why shouldn’t we?

📆 02 Jun 2020  | 🔗

Hamonshu | Eric Meyer

A really like Eric's latest redesign. I'm a huge fan of ink drawings in general, so it figures I'd like this, but more than the graphic elements I feel like the layout manages to strike a great balance of feeling refreshingly different and yet immediately obvious, particularly on desktop. Snooping the source code shows that there's some clever CSS grid wizardry going on here with negative column/row indices that I'll definitely want to remember 🕵️‍♂️

CSS Remedy | Jen Simmons

An in-progress project looking to create a CSS reset that creates modern defaults, rather than just focusing on standardising behaviour across browsers or removing irritating legacy features in browser user agent stylesheets.

You, however, don't have to stay in the past. You can override the UA styles with more modern ideas of how CSS should work by default. Introducing CSS Remedy.

Principle and priorities | adactio

User experience, even over developer experience.

Jeremy has some solid thoughts on what makes a good design principle. In brief, it should be a little provocative and not automatically achievable; it needs to be something to actually drives behaviour and guides decision making, rather than being bland, boring, and already achieved. Something like that initial statement, which I agree should be a fairly universal principle. I also agree with his follow up:

Sadly, I think the current state of “modern” web development reverses that principle. Developer efficiency is prized above all else. Like I said, that would be absolutely fine if we’re talking about technologies that only developers are exposed to, but as soon as we’re talking about shipping those technologies over the network to end users, it’s negligent to continue to prioritise the developer experience.

Making RSS more visible with slash feeds | Marcus Herrmann

A simple idea: collate all your feeds (RSS, ATOM, MF2, whatever) into one place. Marcus suggests a pattern of using the /feeds page (his is here). There have been some valid discussions on the IndieWeb slack about whether an English-language specific pattern is ideal, but overall I feel like it's a positive step until something better comes along. Personally I'd be interested in expanding on the idea and also having silo feeds (Twitter, Instagram etc.) linked on that page too, a little like Marcus does with Mastodon.

Super Tiny Icons | GitHub

A collection of hyper-optimised SVG logos for social media, popular websites, and tech companies. Every logo, whether in PNG or SVG form, is less than 1kb in size and have a base scale of 512px.

📆 02 Jun 2020  | 🔗

  • Web Design
  • resource
  • SVG
  • logo
  • icon
  • GitHub
  • Twitter
  • Facebook
  • Instagram
  • social media 

Made By Me, But Made Possible By:


Build: Gatsby

Deployment: GitHub

Hosting: Netlify

Connect With Me:

Twitter Twitter

Instagram Instragram

500px 500px

GitHub GitHub

Keep Up To Date:

All Posts RSS feed.

Articles RSS feed.

Journal RSS feed.

Notes RSS feed.