close icon
close icon

    Liens du 18 août 2023


    HATEOAS and JSON, Is slowness the essence of knowledge?, Modern EU policies need the voices of the fourth sector, Splitting the Web

    HATEOAS and JSON

    This page is a reworking on the Wikipedia Entry on HATEOAS, which uses JSON. Here we use HTML to explain the concept, and contrast it with JSON APIs. It is a more opinionated explanation of the concept than would be appropriate for Wikipedia, but it is more correct in our opinion.

    […]

    The web browser does not know about the concept of an overdrawn account or, indeed, even what an account is. It simply knows how to present hypermedia representations to a user.

    Hence we have the notion of the Hypermedia being the Engine of Application State. What actions are possible varies as the state of the resource varies and this information is encoded in the hypermedia.

    […]

    Note that this HTML response encodes all the information necessary to update the account balance, providing a form with a method and action attribute, as well as the inputs necessary for updating the resource correctly.

    The JSON representation does not have the same self-contained “uniform interface” as the HTML representation does.

    Je pense que l’article est intéressant sur l’axe « affordance » du système à exploiter. C’est à dire : en quoi une interface (programmatique ou non !) suffit à décrire son propre usage. Ça me rappelle une suite de vidéos d’un théoricien des langages de programmation, Robert Harper, dont le propos était, si je résume très grossièrement avec mes mots, de dire qu’un logiciel maintenable était d'abord un logiciel affordant pour ceux qui le maintiennent, avec une forte emphase sur les interfaces tels que les types. Sur un billet de blog, un autre, parlant du même théoricien et vulgarisant ses propos, démontrait en quoi des langages comme java, typescript ou autre ne permettait pas de construire des modules affordant avec autant facilité :

    Understanding real modules is worthwhile even if you never intend to work in a language that has them. Modules are fundamental, and so much of what is done in other languages, from build configurations to dependency injection to the Adapter pattern, are in large part an attempted encoding of things easily expressed with modules. To write namespaces in other languages worthy of being called “modules,” you need to understand what representational secrets are shared internally and hidden externally. To properly parameterize a Java program over which stack implementation it uses, you need to do dependency injection on the StackFactory type defined above, something which is much easier to do if you first think about how to do it with modules and then translate.

    Mais je pense que l’article est aussi à mettre en perspective de ce que propose le site qui l’héberge :

    htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext htmx is small (~14k min.gz’d), dependency-free, extendable, IE11 compatible & has reduced code base sizes by 67% when compared with react

    En somme, ils proposent un package permettant de faire en sorte que l’interface html soit dotée de bien plus de capacités pour représenter les états du système sous-jacent, et donc réduire le bricolage en javascript en s'appuyant sur une sémantique web plus étendue.

    Is slowness the essence of knowledge?

    If emotions prompt rapid responses, cognitive reappraisal is the ability to more slowly re-evaluate our initial reaction. This slower process allows us to regulate our own emotions and respond more appropriately to situations. For instance, imagine we are walking down the street and we pass a friend. We lift our arm and wave to them and say hello, but they simply carry on walking as if they don’t know us. Our first, fast, reaction may be to suppose that they deliberately ignored us, perhaps prompting emotions such as anger or sadness, which can spiral into a negative mood. However, if we are able to reappraise the situation more slowly, and come to a more balanced view, we may be able to avoid the negative emotional consequences. Perhaps he just didn’t see us? Perhaps he was having a bad day and didn’t feel like talking? Reappraisal allows us to focus on the facts, considering more balanced opinions and thereby regulating our emotions.

    […]

    As the ‘slow movement’ advocates a cultural shift towards slowing down life’s pace, so does the evidence. Slow processes, be it eating, cognitive reappraisal or slow thinking in the context of psychiatric disorder, are beneficial to us. Slowness may even be an index of recovery in mental health.

    Speed is evidently important in many contexts. Quick reactions and instinctive responsiveness aid survival. But we also have a subsequent ‘slow’ response, which is conscious and deliberative, and may be beneficial for more complex social interactions and moral emotions. Perhaps ‘fast’ and ‘slow’ thinking are really two sides of the same coin – intrinsically related, but with their own independent virtues. In our fast-moving society that frequently prioritises speed, the importance of slowness should not be forgotten.

    Un article de la British Psychological Society sur la nécessité d'intégrer le "fast thinking" avec le "slow thinking" sur divers aspect de notre vie. Cependant, je ne vois pas comment "ralentir la pensée" dans le contexte de mes missions : très souvent les clients réagissent à des évènements, et en vitesse, car ils ne sont pas maitres de l'environnement dans lequel ils évoluent, et souvent victimes du "Tir de couverture" de la concurrence que j'ai pu partager plus tôt.

    Modern EU policies need the voices of the fourth sector

    Post-industrial society comprises three sectors in the worldview undergirding the European Union

    […]

    each fourth sector role will fuse together an aspect represented and an aspect confronted by any of the entities and roles dedicated to the three traditional sectors.

    This means that a consumer association won’t advocate well for Open Source developers because an aspect of their existence is classified as commercial. A streamer won’t be well represented by a trade union because they embody both consumer and commercial aspects. And so on. As a result, existing consultation mechanisms used by legislators are guaranteed to fail. When they try to deal with Open Source by expressing the understanding they have gained of proprietary software, they will keep causing collateral damage — as we have seen in the Cyber Resilience Act (CRA) and many times previously. The need will increase as regulation tries to control, account for or promote the activities of the fourth sector without consulting it.

    One significant reason this has been happening for such a long time already is the lack of a term to use to raise the issue. That’s why I am proposing to call this sector of European society the “fourth sector.”

    Un court article et suggestion sur la représentativité des acteurs de l’Open Source lors des décisions de l’UE.

    Splitting the Web

    There’s an increasing chasm dividing the modern web. On one side, the commercial, monopolies-riddled, media-adored web. A web which has only one objective: making us click. It measures clicks, optimises clicks, generates clicks. It gathers as much information as it could about us and spams every second of our life with ads, beep, notifications, vibrations, blinking LEDs, background music and fluorescent titles.

    […]

    Think about it! That whole "MBA, designers and marketers web" is now optimised thanks to analytics describing people who don’t block analytics (and bots pretending to be those people). Each day, I feel more disconnected from that part of the web.

    […]

    It’s not me. It’s people living for and by advertising who are the outsiders. They are the one destroying everything they touch, including the planet. They are the sick psychos and I don’t want them in my life anymore. Are we splitting from those click-conversion-funnel-obsessed weirdos? Good riddance! Have fun with them.

    Je suis d’accord sur le constat de scission, et je me sens aussi de plus en plus déconnecté de la partie commerciale, en revanche pas du tout d’accord sur la suggestion. Je pense que continuer dans cette scission ne fera que renforcer les monopoles, qui, comme les états, ne se privent pas de standardiser et verrouiller les usages, et progressivement l'infrastructure. D'un point de vue systémique, la tendance ira à l'étouffement d'un web libre si un effort volontaire n'est pas fait pour sensibiliser ceux qui naviguent dans l'écosystème sans en comprendre les mécanismes, et pour réguler les actions de ceux qui les exploitent.