Skip to content

Instantly share code, notes, and snippets.

@peerreynders
peerreynders / README.md
Last active February 12, 2024 20:56
Bookmarklet

Resource: Implementing bookmarklets in JavaScript

  • Implement bookmarklet as an IIFE.
  • Test the IIFE in the console for a relevant page.
  • Minify the finished bookmarklet, e.g. Minify JS Online
  • In the Bookmark Manager (Ctrl+Shift+O) choose “Add New Bookmark” under the “Organise” menu.
  • Specify a name.
  • In URL specify the javascript: scheme and delimeter and paste the minified bookmarklet at the end.

e.g.

@peerreynders
peerreynders / young-punks.md
Last active February 4, 2024 17:19
Scott Ambler describing in 2002 the phenomenon that fundamentally shapes the nature of the software development industry.

In 2002 Scott Ambler observed in Agile Modeling (p.4) the typical career path of a corporate developer:

"I also believe that the way that developers learn their trade has a few unique dysfunctions. For the most part our colleges and universities are doing a reasonable job of educating developers for entry-level jobs. However, even if the schools were doing a perfect job and everyone was getting a degree or diploma, I suspect that we’d still have a problem due to the inherent nature of software developers. When software developers are young, in their teens or early twenties, they typically focus on learning and working with technology. They describe themselves as PERL programmers, Linux experts, Enterprise JavaBeans (EJB) developers, or .NET developers. To them technology is the important thing. Because technology is constantly changing, young

@peerreynders
peerreynders / technology-hospice.md
Last active February 1, 2024 16:31
Technology Hospice, Chad Fowler

But, the old systems don’t just die. They are replaced. Furthermore, in most cases, homegrown systems are replaced in stages. In those stages, the old systems have to talk to the new systems. Someone has to know how to make the new speak to the old, and vice versa. Typically, the young tykes don’t know (or want to know) how to make the old systems listen. Nor do the crusty old pre-retirees know how to make the newfangled systems talk to their beloved creatures.

So, there’s a role to be filled by a calculating technologist: technology hospice. Helping the old systems die comfortably and with dignity is a task that should not be underestimated. And, of course, most people will jump ship before it sinks, either via retirement or by sidestepping into another technology realm. By being the last one left to support still-critical systems, you can pretty much call the shots. It’s risky, in that once the technology really is gone, you’ll be an expert in something that doesn’t exist. However, if you can mov

@peerreynders
peerreynders / README.md
Last active March 8, 2023 23:29
Gilded Rose Kata—Look-up approach in TypeScript
@peerreynders
peerreynders / README.md
Created September 16, 2022 22:54
Web App Actors
@peerreynders
peerreynders / README.md
Last active September 15, 2022 01:10
Differences for conditional nested effects

Solid (solid.html 1.5.4)

Activating: red
Red is off
Red is on
Activating: green
Green is on
Green is off
Activating: blue
Blue is off
@peerreynders
peerreynders / README.md
Last active September 14, 2022 14:19
µsignal 0.4.2 performance comparison

Sample run on Ubuntu 22.04 LTS [i7-4900MQ CPU @ 2.80GHz/32GB] Chromium 105.0.5195.102

Solid (solid.html)

Created 205760 nodes.
278 ms; sum: 9.11303444731602e+305

@preact/signals (preactive.html)

@peerreynders
peerreynders / SmartUIAntiPattern.md
Created August 2, 2022 13:27
Smart UI “Anti-Pattern”

The Smart UI “Anti-Pattern”

… That sums up the widely accepted Layered Architecture pattern for object applications. But this separation of UI, application, and domain is so often attempted and so seldom accomplished that its negation deserves a discussion in its own right.

Many software projects do take and should continue to take a much less sophisticated design approach that I call the Smart UI. But Smart UI is an alternate, mutually exclusive fork in the road, incompatible with the approach of domain-driven design. If that road is taken, most of what is in this book is not applicable. My interest is in the situations where the Smart UI does not apply, which is why I call it, with tongue in cheek, an “anti-pattern.” Discussing it here provides a useful contrast and will help clarify the circumstances that justify the more difficult path taken in the rest of the book.

❊ ❊ ❊

A project needs to deliver simple functionality, dominated by data entry and display, with few business rules. Staff is

@peerreynders
peerreynders / notes.md
Last active February 22, 2022 16:24
Experiment: Astro with Communicating Islands

Experiment: Astro with Communicating Islands

Note: There is an official example with-nanostores that lets two islands communicate via nanostores.


Caution: At this point it is unclear whether this technique interferes with the islands autonomous hydration process. On the surface this seems to work but it's not clear what potential drawbacks there may be.

The experiment was performed on a "Starter Kit" installation with a Preact renderer.

@peerreynders
peerreynders / index.js
Created March 12, 2021 03:29
Marko - first steps
// file: /src/index.js
import fastify from 'fastify';
import marko from 'marko';
import pointOfView from 'point-of-view';
const app = fastify({
logger: true
});
app.register(pointOfView, {