Categories
Links

Link from Pinboard – Adactio: Journal—Several people are writing

“I told him that I’m going to be writer number 1001, and I’m going to write something great that nobody has written before.”

This is a good list of reasons to reconsider how neglectful I am of this stuff. Link.

federated from Pinboard

Categories
Technical

Couple of thoughts on React

Pretty sure it’s nothing nobody has noticed already, but I farted out some thoughts about React a while back. I figured I should publish more of this type of rubbish:

I have been watching Kent C. Dodds’ fantastic Advanced React Patterns course on Front End Masters. It occurs to me that a lot of the React patterns and principles which are being uncovered and taught to us all by the likes of Kent relate quite directly to more traditional patterns & principles – in the Gang of Four sense, regarding SOLID and further.

Some examples off the top of my head:

  • Render props feel like a sensible way of implementing dependency injection.
  • Pretty much every major React pattern is a different take on Inversion of Control.
  • Compose-all-the-things is generally a decent approach, good React seems to encourage this.
  • Redux implements Event Sourcing and the concepts of CQRS in an extremely elegant manner.
  • The Single Responsibility Principle underlies the entire concept of web components and React itself.

At first, I was quite snobby about it all: “They’re just coming up with new names for old things”, “all of this has happened before and will happen again”. But when you think about it, this is such a visual way to implement and explain these patterns.

It’s a lot easier to explain event sourcing with “it’s like a distributed redux”. The metaphors feel simpler to solidify when a method hidden in a class called `component.setDependency()` or a hugely overloaded constructor (`new Component(dependency1, dependency2, dependency3);`) becomes ``. I find that coupling, and its costs are so much easier to visualise when you can see the logic spelled out in this way.

I think this has a lot to do with React making interfaces so explicit. If you’re writing sensible components, it is trivial to convert from React’s XML to the correlating UML in your head. (If that doesn’t exist as software yet, I expect it will eventually.)

Categories
Links

Link from Pinboard – time to stop pretending i’m just here to read — s-peak-in-tongue-s: cardboardfacewoman: …

“Colocative substitution” – my new favourite concept Link.

federated from Pinboard

Categories
Links

Link from Pinboard – Intersection Observer comes to Firefox ★ Mozilla Hacks – the Web developer blog

Yay, a native way of firing an event when an element appears on the page Link.

federated from Pinboard

Categories
Links

Link from Pinboard – How to run secret ZX Spectrum message from Radiohead’s OKNOTOK C90 tape

Amazing Easter Egg. Some weird noise on a new track in the OK Computer reissue is actually a Spectrum program. Link.

federated from Pinboard

Categories
Links

Link from Pinboard – The Travis CI Blog: Start Every Meeting with a Personal Check-in

Focus and presence were very much things I took for granted before I started managing. I now realise that these are both limited resources. This feels like a nice tool to have in our arsenals. Link.

federated from Pinboard

Categories
Links

Link from Pinboard – A Unified Styling Language – SEEK blog – Medium

I finally understand the React-driven CSS-in-JS movement. Great read. I’m still not entirely sold on it, but I understand it. Maybe I need to use it in anger, get a feel for the pros and cons. Link.

federated from Pinboard

Categories
Links

Link from Pinboard – The Guardian is getting 60 percent of its Google mobile traffic from AMP – Digiday

Interesting to see some real positive data around AMP. I’m still not sold, but those are numbers that are hard to argue with. The stories around accidentally creating invalid articles and the fallout from that are also interesting. This all in contrast to Guardian dropping Apple News and Instant Articles. Link.

federated from Pinboard

Categories
Links

Link from Pinboard – Replacing Disqus with Github Comments · Gazoo.vrv

I love this, I have no idea whether github would be ok with this if everyone did it, but it’s a nice solution to the comments problem Link.

federated from Pinboard

Categories
Links

Link from Pinboard – n-gate.com. we can’t both be right.

Cynical digests of the last week’s hacker news links and discourse. Wonderful. Link.

federated from Pinboard