Daily Shaarli

All links of one day in a single page.

April 30, 2022

Usbek & Rica - Du « choix contraint », ou quand voter « contre » n’est pas pour autant voter « pour »

Le propre des choix contraints est que la contrainte se fait oublier face à l’empressement du choix. Et comme c’est à nous qu’il revient au final de choisir, nous avons l’impression d’exercer notre libre arbitre. Mais parce que le choix contraint n’est pas l’expression d’un désir et qu’il nous invite à décider entre deux alternatives que nous ne voulons pas, nous devenons responsables d’un choix que nous avons certes fait, mais qui, pour autant, va à l’encontre de notre désir. C’est le moment où le désir cède sur la volonté.

Question pertinente: quelle est la légitimité d'un candidat élu par choix contraint ?

A l’âge de la retraite, 25% des plus pauvres sont déjà morts – Libération

« A 62 ans, un quart des 5% les plus pauvres en France sont déjà morts. Il faut attendre l’âge de 80 ans pour que cette proportion soit atteinte pour les 5% les plus riches. » ‒ https://www.frustrationmagazine.fr/vieux-cons/

Et pour répondre à l'argument:

"Oui mais bon, cette génération a quand même détruit la planète en consommant comme des porcs !” On touche là à un autre aspect terriblement séduisant, pour la bourgeoisie, du prisme générationnel : il efface d’un seul coup la responsabilité d’une classe sociale, de ses dirigeants voire des individus.

Ce raisonnement est donc faussé, puisque toutes les personnes d'une génération ont des impacts différents !

Usbek & Rica - « Nos petits-enfants en sauront probablement moins sur le monde dans lequel ils vivent que nous »

Ah...

Une autre donnée étonnante lie le déclin de la pensée avec la crise climatique. Il est possible que le taux de concentration du CO2 dans l’air puisse avoir un impact physique sur nos cerveaux. Pour la première fois depuis 800 000 ans, le dioxyde de carbone présent dans l’atmosphère a dépassé les 400 ppm (partie par million). Or, à 1000 ppm, la capacité cognitive humaine chuterait de 21 %.

divers - lehollandaisvolant.net

Une liste d'outils implémentée pour un usage perso et partagée à tous

We fixed f-string typos in 69 of the most popular Python repos in only one day. Here’s how. – Higher Tier Systems

To test he new "this probably should be an f string" checker, they generated a list of the most popular python repositories on Github by using Github's topic search API [with this script].

With the rule:

GIVEN a string does not have an f prefix
WHEN the string contains {foo}
AND foo is in scope
THEN it’s probably missing an f prefix

And minimizing the false positive such as

  • The string is later used in an str.format(…) call or str.format_map(…)
  • The string is used in behave style test `@when('{user} accesses {url}.')
Moa

A service to link a mastodon account with a twitter one

CSS { In Real Life } | A Blog Post About Blogging

The very act of recording your actions and impressions is itself powerfully mnemonic, fixing the moment more durably in your memory so that it’s easier to recall in future, even if you never consult your notes. ‒ Cory Doctorow

Ça y est : Google se convertit au bouton « tout refuser » pour les cookies - Numerama

Une bonne action !

Developers spend most of their time figuring the system out

Let’s look at a recent paper by Xia, Bao, Lo, Xing, Hassan, & Li entitled Measuring Program Comprehension: A Large-Scale Field Study with Professionals and published in IEEE Transactions on Software Engineering, 44, 951-976, 2018. This paper is quite interesting in that it describes in great details how the figures are obtained. And it says that Comprehension took on average ~58%.

So much ?!

HTML event handler attributes: down the rabbit hole

About the onclick attribute and the event variable: onclick="submit(event)" works. But why ?

The spec shows that the string passed to a handler is combined like this:

function $name (event) { $body }

I'm not sure what $name is but $body is the string passed to the handler attribute in HTML. event is an argument. This string becomes a function through the Function constructor I'm assuming.

wg-securing-critical-projects/The_state_of_the_Linux_kernel_security.pdf at main · ossf/wg-securing-critical-projects

Stats about security flaws in the linux kernel

Linux et la sécurité, tel un désert et un oasis ?

Quelles sont les failles de sécurité de GNU/Linux ?
Exemples et statistiques à l'appui !

Lessons from my PhD - Austin Z. Henley
  • Led or to be led: be led may not be the best four you. If you want to lead, make a plan first.
  • Topic sentences: After coming up with a rough outline for whatever you need to write, the next step is to write the topic sentences.
  • Get excited
  • Unmotivated details: why are you telling me this? → why should this person care about what I'm going to tell them?
  • Slides versus speaker: one leads, the other support. This alternate in a presentation.
  • Managers as input/output machines: You put into it your update and you get back feedback. The meeting is for your benefit. And more tips for running update meetings with an adviser or manager :)
  • Daily progress tracking of objectives and results
Dynamic Scroll States with Intersection Observer + Vue - YouTube
const currentSection = ref()
onMounted(() => {
  const observer = new IntersectionObserver((entries) => {
    entries.forEach((entry) => {
        if(entry.intersectionRatio > 0) {
          currentSection.value = entry.target.getAttribute('id')
        }
      })
     document.querySelectorAll('article h2').forEach((section) => {
        observer.observe(section)
     })
})

then add a class to the active currentSection.

Does Fast Charging ACTUALLY Ruin Your Battery? - YouTube

They absorb the most energy when they have the least in them. And as they get closer and closer to full, they can't absorb quite as efficiently and then there is some excess lost.

and

batteries degrades over time

Causes of degradation:

  1. Heat ruins the battery (high impact)
  2. Charging cycles
  3. Time (slow impact)

How to charge the phone without generating extra heat ?

  • Power breaks generating heat are now near the electrical socket
  • the battery is divided by two
  • adding more cooling hardware
    → heat problem is covered in normal situations

So what counts ?

  • around 80% battery health after 800 charges (but we don't have long-term data about these new fast charges)

Announcement for 2022 from a tech company: 80% battery health after 1600 charges.

Usbek & Rica - « La vie n’est pas une startup » : et si on arrêtait de s'auto-disrupter ?

Comme l’explique Fred Turner, professeur à Stanford et spécialiste de l’histoire de la Silicon Valley, « si on s’imagine comme un disrupteur, on n’a pas à s’imaginer comme un constructeur responsable. On n’a pas à s’imaginer comme un citoyen ». Cette disruption, produite par certains, ne doit pas effacer le travail de ceux que l’on pourrait qualifier de continuateurs. Leurs activités : enseigner dans une école, soigner à l’hôpital, travailler dans une usine, une boulangerie, un service de transport. Ce n’est pas spectaculaire. C’est souvent de la routine, des attentions simples, des actions précises, répétées. Pourtant, elles tiennent l’ensemble. Elles fabriquent une unité, une continuité.

All the user-facing states – Eric Bailey
Command Line Magic on Twitter: "echo "Is this real life?" | cowsay -n | cowsay -n | cowsay -n | cowsay -n https://t.co/RGHccChCLE" / Twitter

Cowsay asking itself if it is the real life, wrapped into a cowsay, wrapped into another cowsay, recursively...

anonymous animal