Weekly Shaarli

All links of one week in a single page.

Week 40 (October 2, 2023)

Using HTML landmark roles to improve accessibility | MDN Blog
HTML list attribute

Set options for an input field. Here some demo :)

The Absolute Minimum Every Software Developer Must Know About Unicode in 2023 (Still No Excuses!) @ tonsky.me

UTF-8 is an encoding. Encoding is how we store code points [of Unicode] in memory.

The simplest possible encoding for Unicode is UTF-32. It simply stores code points as 32-bit integers.

UTF-8 is a variable-length encoding. A code point might be encoded as a sequence of one to four bytes. One or more code points can build a character.

Side effects of UTF-8:

  • You CAN’T determine the length of the string by counting bytes.
  • You CAN’T randomly jump into the middle of the string and start reading.
  • You CAN’T get a substring by cutting at arbitrary byte offsets. You might cut off part of the character.

If you want a character comparison, you should be iterating on "extended grapheme clusters", or graphemes. A grapheme is a minimally distinctive writing unit in the context of a particular writing system. ö is one grapheme. é is one too. And 각.

Is Unicode hard only because of emojis?
No, for example, ö (German) is a single character, but multiple code points (U+006F U+0308).

What is 🤦🏼‍♂️ length?
It depends of the encoding used: 5 for Python, 7 for JavaScript / Java / C#, and 17 in Rust. That’s what extended grapheme clusters are all about what humans perceive as a single character. And in this case, 🤦🏼‍♂️ is undoubtedly a single character.

Before comparing strings or searching for a substring, normalize!

Because code points can be in different order for a grapheme. Also we want to be able to search for 2 in 𝕏².

Unicode is locale-dependent, because two grapheme with the same code points can look different in two languages.

So no, you can’t convert string to lowercase without knowing what language that string is written in. [...] I live in the US/UK, should I even care?

Yes.

What are surrogate pairs?

Unicode decided to allocate some of these 65,536 characters to encode higher code points, essentially converting fixed-width UCS-2 into variable-width UTF-16.

A surrogate pair is two UTF-16 units used to encode a single Unicode code point. For example, D83D DCA9 (two 16-bit units) encodes one code point, U+1F4A9.
The top 6 bits in surrogate pairs are used for the mask, leaving 2×10 free bits to spare: 1101 10?? ???? ???? to 1101 11?? ???? ????'

Is UTF-16 still alive?

Yes. The only downside of UTF-16 is that everything else is UTF-8, so it requires conversion every time a string is read from the network or from disks.

(Encore) un nouveau Fairphone ? – Framablog

Une critique vis à vis des Fairphones qui sortent tous les 2 ans

Accueil - Recommandations accessibilité numérique Orange

Le guide d'Orange contenant un certain nombre de ressources

Backlog CSRD, une estimation vertueuse | Pablo Pernot

Ne plus mesurer l'item d'un backlog avec son ROI, mais aussi avec l'impact environmental et l'impact social.

xkcd: Steal This Comic

Thinking of buying from audible.com or iTunes?

Remember, if you pirate something, it's yours for life. You can take it anywhere and it will always work.

But if you buy DRM-locked media, and you ever switch operating systems or new technology comes along, your collection could be lost.

And if you try to keep it, you'll be a criminal (DMCA 1201).

So remember: if you want a collection you can count on, pirate it.

Hey you'll be a criminal either way.

cohost! - "things i just don't like about git"

Critics of Git, if someone had to improve from its weaknesses.

sha1 was a bad choice back then. The moral here is "treat your identifiers as opaque strings" along with "sometimes a sha1: prefix doesn't hurt anyone"

Email and names in every commits:

I guess when you read lkml, the notion of spam isn't too worrying, but putting names and emails into every commit means any time someone changes name or email, they might as well be a whole different person to the repo.
Sure enough, when you store names in the files, you have to rewrite history when someone changes email address, but in another world, you'd use a UUID and a file called .gitauthors that maps one to the other

There are two different mechanisms for almost every feature.

git forces you to make a choice. use merge and get a noisy, but representative history. use rebases and lose some of the work, but the log is a lot easier to navigate.
we could also have a version of git log that didn't make merges look like shit, but that's another problem altogether.

the unix philosophy is about building toolkits, not applications

in other words: have you ever accidentally committed inside a rebase? or accidentally committed a conflict? tough shit, fucko.
git commands are named after implementation, not use, and there's absolutely no excuse for it
flat files kind of suck if your state gets corrupted.

git is made from papercuts

there's bits where you can't check in an empty directory, or how you can set files to ignore but not files to include.

#project #idea make it better

Novel – Notion-style WYSIWYG editor with AI-powered autocompletions
GitHub - webpro/knip: ✂️ Find unused files, dependencies and exports in your JavaScript and TypeScript projects. Knip it before you ship it!
TypeScript Template Literal Types: Practical Use-Cases for Improved Code Quality | ClarityDev blog

How typescript types can improve safety?

New revelations from the Snowden archive surface | Computer Weekly

One of the most important unpublished revelations from the Snowden archive regards American semiconductor supplier Cavium. According to Appelbaum, the Snowden files list Cavium “as a successful SIGINT enabled CPUs vendor”.

😬

Faster Vue.js Execution in Firefox - Mozilla Hacks - the Web developer blog

Optimizing the proxy object lead to performance gains

Open Props: sub-atomic styles

A consistent set of design tokens already defined

Blog Stéphane Bortzmeyer: Est-ce légitime de récolter des pages Web pour entrainer des IA ?
https://matias.ma/nsfw/

The URL ends with nswf ...

Companies Only Want Hardcore Workers

Why does he think company structures are outdated and don't fit in our world anymore? He's providing some arguments.

Link Rot

It was already, is and becomes an issue of the web.

Here the thoughts of Brisray.

Fenêtre d'Overton — Wikipédia

La fenêtre d'Overton, aussi connue comme la fenêtre de discours, est une allégorie qui situe l'ensemble des idées, opinions ou pratiques considérées comme plus ou moins acceptables dans l'opinion publique d'une société.

Il s'agit de glisser vers l'impensable au populaire avec ces différents status d'acceptation:

  1. Impensable
  2. Radical
  3. Acceptable
  4. Raisonnable
  5. Populaire
Rust Dockerfile Boilerplate | Peter Todorov 💻 Blog

A good docker image boilerplate

Usbek & Rica - Dans 250 millions d’années, la Terre pourrait ressembler à « Dune » et entraîner l’extinction des mammifères

Dans 250 millions d'années, l'humanité aura enfin trouvé un moyen de voyager entre les planètes, ou se éteinte.
On serait à 1 120 ppm, sans les émissions anthropiques.
Le soleil serait 2.5% plus lumineux.
L'air excéderait 40°C.

Charline Avenel telle qu’en elle-même | Academia

Un travail approfondi sur l'académie de Versailles

Blog Stéphane Bortzmeyer: Visite des plate-formes Pharos et Thesee
How I stay motivated as a solo-creator | ᕕ( ᐛ )ᕗ Herman's blog

One nice thing about being employed is when you wake up, you know what you're going to do. You're going to work. The choice has been made.

The author shares ways he tries to stay motivated:

  1. Work on things that you find engaging
  2. Building routines into the day: Coffee and a walk with my partner, gym for an hour, journal and write, work block 1 (3 hours), lunch and chill, work block 2 (3 hours).

Do I manage to keep to this structure every day? No. But I try and mostly succeed. It's a framework. Sometimes I'm just not feeling it and allow myself a day off to read or play PlayStation. Without forcing myself to grind I never get too ground down.

  1. I'm intentional with my down-time

To preserve my focus I don't engage with any of these platforms until the end of the work day.

  1. I hang out with people in my field
  2. I write about it
The Frustration Loop | ᕕ( ᐛ )ᕗ Herman's blog

If spam is detected, then make his life harder :p

Boycott Wayland. It breaks everything!

Arguments against Wayland

Goodbye to sequential integers, hello UUIDv7!

The seventh version supports timestamps in them. What a cool thing, because they are now sortable, and searchable. Time slices will be easy :)

Naming things needn’t be hard - Classnames

Examples of relevant class names.

Collaborative UX Design

A workflow or framework with methods for each step

How principled coders outperform the competition - YouTube

Basic advices, so nothing new at the end.

  1. Use programming standards
  2. Use programming design principles
  3. Use patterns
  4. Use proper names
  5. Use tests
  6. Manage time, as time estimation often fails. Double or triple the estimated time
  7. Use appropriate speed
Webrings

Thoughts and collection of Brisray