Tout à fait, j'aime beaucoup cet extrait, le côté « dès que je regarde quelque part, je trouve un truc qui ne marche pas » (comme je voudrais). Je dirais que c'est un mélange de « plus tu fais de choses, plus tu rencontres de problèmes », d'un regard plus intéressé par ce qui ne marche pas que par ce qui marche (j'ai travaillé dans les tests et de manière générale mon boulot a souvent été d'assurer que ça marche comme prévu), d'acceptation (j'aurais aussi pu me dire « je m'en fous » ou « je créé une entrée dans le suivi et on verra plus tard »), voire une forme de perfectionnisme (« je ne veux aucune erreur, tout doit marcher comme prévu »). Mais ça rentre aussi dans une des définitions de la procrastination qui est de se lancer dans une véritable frénésie d’activités pour éviter de faire une tâche que l'on veut éviter de faire (source https://fr.wikipedia.org/wiki/Procrastination ).
En français c'est facile : le g se prononce comme dans coing. Le e comme dans laitue. Le d comme dans friand. Le t comme dans dessert. Y manque plus grand chose.
Ma première idée aurait plutôt était de corriger le code.
On est normalement dans une situation qui n'est pas censée arriver. Plutôt qui n'est plus censée arriver. Les soucis proviennent des données avant le passage en Ruby on Rails, ça relève de la dette technique. Je vais néanmoins regarder ce que je sais faire niveau code sur ce point.
Je suis surpris de l'utilité de ce script pour une base de données SQL. L'un des grands intérêts d'SQL c'est qu'il donne tous les outils pour avoir des données cohérentes et sa force c'est que les données restent cohérentes, elles ne le sont pas qu'au moment où ton cron vient de passer.
Vaste question. J'y vois de très nombreuses réponses :
cela suppose que les développeurs sont parfaits : ils ne font pas d'erreurs de conception, pas d'erreurs de développement, pas d'oublis, ils ont une maîtrise parfaite du SQL, ils gèrent tous les cas du passé, et ils pensent à faire toutes les adaptations nécessaires sur les contraintes à gérer ;
cela suppose que les outils sont parfaits : les bibliothèques de développement n'ont pas de bugs ou de lacunes, la base de données non plus (pour mémoire MySQL n'avait pas de clés étrangères à un moment, et MySQL gérait mal l'UTF-8 sur 4 octets à un moment, pour ne citer que deux exemples) ;
la confiance n'exclut pas le contrôle : ceinture et bretelles, ça ne coûte pas grand-chose d'avoir un script en plus, qui vérifie de façon différente certains points, en l'occurrence précisément les points que l'on ne garantit pas par la base de données elle-même. Et la duplication de vérification peut aussi être faite par des personnes différentes (par exemple le dév mettra des contraintes dans le code, le DBA dans la base SQL et l'adminsys dans un script shell externe) ;
certaines vérifications doivent être faites a posteriori : le script vérifie aussi l'absence de spammeurs non filtrés, basé sur les comportements de spammeurs déjà détectés, et en remontant dans le temps, au cas où l'on en aurait laissé passer, pour les virer avec retard ;
certaines vérifications sont pénibles à écrire en SQL : par exemple nodes.content_type contient News, Diary, etc., nodes.content_id contient l'identifiant qui correspond à ce que l'on trouvera respectivement dans news.id, diaries.id, etc. Même chose pour les slugs avec du sluggable_type et du sluggable_id. Écrire des contraintes dessus repose à ma connaissance sur des triggers et il faut vraiment être sûr de comment ça s'intégrer avec Ruby On Rails par exemple (qui fait toujours des tas de choses implicitement). Pareil on a un materialized_path composé d'une concaténation de chaînes de 12 octets chacune contenant un id de commentaire : vérifier que la taille est un multiple de 12 et que chaque sous-chaîne de 12 caractères correspond à un entier utilisé comme id dans la table comments mais aussi un id qui est sur le bon contenu, ça peut être compliqué à écrire (et on peut aussi se dire qu'il n'y a aucune raison que ça soit corrompu un jour, même si l'expérience montre que si) ;
les scripts garantissent aussi une cohérence la base SQL et Redis, ce que ne permettent pas les contraintes SQL (par exemple on va trouver dans Redis la tribune associée à une dépêche refusée, donc si on supprime cette dépêche, il faut nettoyer côté Redis aussi) ;
il y a des plantages qui peuvent interrompre des opérations en cours. On peut espérer que tout soit transactionnel, mais, un, ce n'est pas le cas, deux, les transactions ne seront pas multi-base de données ;
il y a des opérations manuelles en base parfois (notamment pour virer des comptes ou gérer des spammeurs), et tant que cela n'est pas codé proprement, on peut avoir une bête typo en base de données (le souci sur les arborescences de commentaires est juste un zéro manquant dans une chaîne de caractère, soit cinq zéros d'affilée au lieu de six, une erreur facile à faire pour un humain sur un copier-coller par exemple) ;
on a des données dénormalisées, ce qui augmente les risques de désynchronisation (comme les nodes.comment_count vs le nombre de commentaires ou le cached_slug qui est une copie locale) ;
il y a le poids de l'historique ou dette technique : on a des données très anciennes, on a pu avoir des soucis de conversion dans le passé, les contraintes ont changé au fil du temps, le code est surtout utilisé sur les nouvelles données donc on peut avoir des surprises sur les anciennes (par exemple le code d'édition des anciennes dépêches qui n'existent qu'en HTML est actuellement cassé car il cherche désespérément la dernière version en Markdown), etc. ;
de fait, le script trouve des choses, régulièrement. Il détecte le bug sur les tags avec espace (le code RoR lui est "persuadé" d'avoir géré correctement), il détecte les oublis lors d'opérations manuelles comme une purge complète de compte suite à une demande d'un utilisateur, etc. ;
il assure une non-régression : on a déjà eu des soucis dans le passé sur certains cas, on met en place un test pour savoir si cela se reproduit (en espérant que cela n'arrive plus car on a fait des corrections ailleurs pour l'éviter) ;
je suis largement plus à l'aise pour faire des vérifications externes que pour modifier du code Ruby On Rails ;
dans mon expérience pro et dans mon expérience associative, on m'a très souvent dit que c'était inutile de vérifier les données ainsi, et pourtant j'ai détecté ainsi de nombreux problèmes distincts, à pas cher, sur des projets différents, avec des bases SQL ou NoSQL variées. Pour faire un parallèle hasardeux, dans certains domaines sensibles (aéronautique, nucléaire), on s'assure d'avoir deux ou plus implémentations différentes d'un même comportement pour être sûr qu'au moins une va marcher et détecter les incohérences, ici c'est un peu ça de façon limitée, ciblée et pas coûteuse.
Multiple hard links – that is, multiple directory entries to the same file – are supported by POSIX-compliant and partially POSIX-compliant operating systems, such as Linux, Android, macOS, and also Windows NT4[2] and later Windows NT operating systems.
Support also depends on the type of file system being used. For instance, the NTFS file system supports multiple hard links, while FAT and ReFS do not.
(nb: le règlement est vieux/obsolète, ne traite pas vraiment du logiciel ou des détails des fonctionnalités, et le code électoral est bogué aussi sur le sujet des machines à voter… mais on continue avec les modèles de 2005 parce changer quelque chose serait beaucoup plus compliqué que de ne rien faire et d'attendre que la mode et les machines ne (tré)passent)
La question était « Honnêtement qui peut réellement prétendre se servir de GPG ? ». J'y ai répondu. Maintenant l'auteur de la question m'explique qu'il sous-entendait « à part les geeks barbus ». Et toi tu m'expliques que « C’est que des cas qui ne nécessite absolument pas GPG. » J'ai envie de vous dire de ne pas poser des questions si vous ne voulez pas écouter les réponses, ou si vous avez déjà vos préjugés et que les réponses sont inutiles. Quand bien je serais atypique et le dernier utilisateur de GPG dans l'univers, vos réponses sont à côté de la plaque.
Oui, chaque fois que j'ajoute un paquet, que j'accède à mon gestionnaire de secrets, que j'utilise duplicity pour les sauvegardes, que je veux chiffrer rapidement un truc sur disque ou parfois pour du courriel. Au final, oui tous les jours.
Envie de dal ? Goût pour la goudale ou La goudale ? Un sujet hadal de jeux de mots foireux. Laissons donc le temps des faits au Dhall, que l'on nomme ami, pour voir s'il ment.
Le numéro de CVE a été demandé/créé le 12 mai. Comme il s'agit apparemment d'une personne extérieure au projet qui a trouvé la faille, il semblerait que LO ait corrigé entre le 12 et 19 donc.
La liste de qui a noté comment sur un commentaire donné est conservée pour une durée limitée. Du coup j'imagine qu'il faudrait arrêter de tenter d'afficher cette information après la durée en question, vu qu'on n'a plus l'info.
[^] # Re: vélo couché ???
Posté par Benoît Sibaud (site web personnel) . En réponse au journal BRouter, un calcul d'itinéraire libre pour vélo (mais pas que). Évalué à 4.
Vélo couché
[^] # Re: Coquille
Posté par Benoît Sibaud (site web personnel) . En réponse au journal Premiers pas sur l'architecture RISC-V avec la carte HiFive1. Évalué à 3.
Corrigé, merci.
[^] # Re: Auteurs manquant
Posté par Benoît Sibaud (site web personnel) . En réponse à la dépêche Revue de presse de l’April pour la semaine 22 de l’année 2020. Évalué à 4.
Corrigé, merci.
[^] # Re: Si je devais lui donner un titre,
Posté par Benoît Sibaud (site web personnel) . En réponse au journal Il était une fois… la procrastination. Évalué à 4.
Tout à fait, j'aime beaucoup cet extrait, le côté « dès que je regarde quelque part, je trouve un truc qui ne marche pas » (comme je voudrais). Je dirais que c'est un mélange de « plus tu fais de choses, plus tu rencontres de problèmes », d'un regard plus intéressé par ce qui ne marche pas que par ce qui marche (j'ai travaillé dans les tests et de manière générale mon boulot a souvent été d'assurer que ça marche comme prévu), d'acceptation (j'aurais aussi pu me dire « je m'en fous » ou « je créé une entrée dans le suivi et on verra plus tard »), voire une forme de perfectionnisme (« je ne veux aucune erreur, tout doit marcher comme prévu »). Mais ça rentre aussi dans une des définitions de la procrastination qui est de se lancer dans une véritable frénésie d’activités pour éviter de faire une tâche que l'on veut éviter de faire (source https://fr.wikipedia.org/wiki/Procrastination ).
[^] # Re: Épisode VI ?
Posté par Benoît Sibaud (site web personnel) . En réponse au journal [HS] Microsoft ♥ Linux - Episode VI "AYBABTU". Évalué à 8. Dernière modification le 01 juin 2020 à 12:41.
En français c'est facile : le g se prononce comme dans coing. Le e comme dans laitue. Le d comme dans friand. Le t comme dans dessert. Y manque plus grand chose.
[^] # Re: Remarques
Posté par Benoît Sibaud (site web personnel) . En réponse au journal Il était une fois… la procrastination. Évalué à 10.
On est normalement dans une situation qui n'est pas censée arriver. Plutôt qui n'est plus censée arriver. Les soucis proviennent des données avant le passage en Ruby on Rails, ça relève de la dette technique. Je vais néanmoins regarder ce que je sais faire niveau code sur ce point.
Vaste question. J'y vois de très nombreuses réponses :
[^] # Re: coquilles
Posté par Benoît Sibaud (site web personnel) . En réponse à la dépêche Utilisation d’un TPM pour l’authentification SSH. Évalué à 3.
Corrigé, merci.
# Collisions de slugs détectées en base de données
Posté par Benoît Sibaud (site web personnel) . En réponse au journal LinuxFr.org : première quinzaine de mai 2020. Évalué à 3.
Cf https://linuxfr.org/users/oumph/journaux/il-etait-une-fois-la-procrastination
# markdown
Posté par Benoît Sibaud (site web personnel) . En réponse au message script .sh problème de connexion. Évalué à 3.
Bloc de code réformaté avec
[^] # Re: E-mail sans support du client
Posté par Benoît Sibaud (site web personnel) . En réponse au journal Bien démarrer avec GnuPG. Évalué à 3.
C'est compliqué de relayer (donc d'envoyer) des courriels avec des adresses d'émetteurs tiers quel que soit le tiers (t'as forcément des soucis avec Google ou Yahoo ou …). D'où les options
https://sympa-community.github.io/manual/customize/dmarc-protection.html pour Sympa par exemple.
[^] # Re: Dépôt git pour les logiciels écrits en Folders
Posté par Benoît Sibaud (site web personnel) . En réponse au lien Tout est dossier. Évalué à 3.
rectification c'est possible aussi sous Windows.
cf https://en.wikipedia.org/wiki/Hard_link
[^] # Re: Dépôt git pour les logiciels écrits en Folders
Posté par Benoît Sibaud (site web personnel) . En réponse au lien Tout est dossier. Évalué à 3.
Faire une version non-Windows avec des liens durs ? De quoi faire une super extension au langage ?
[^] # Re: Udev rules
Posté par Benoît Sibaud (site web personnel) . En réponse à la dépêche Utiliser une des LED d’un Raspberry Pi comme témoin d’enregistrement TV. Évalué à 4. Dernière modification le 26 mai 2020 à 16:31.
Tu parles de systemd-udevd.service ?
[^] # Re: on parle beaucoup de logiciel opensource mais quid du logiciel libre?
Posté par Benoît Sibaud (site web personnel) . En réponse à la dépêche Revue de presse de l’April pour la semaine 21 de l’année 2020. Évalué à 8.
Du coup Open Source c'est https://opensource.org/osd une définition en 10 points.
[^] # Re: Code ouvert
Posté par Benoît Sibaud (site web personnel) . En réponse au lien La CNIL rend son avis sur les conditions de mise en œuvre de l’application « StopCovid ». Évalué à 5.
ça dépend a priori du pays et du code électoral (si applicable, donc si scrutin institutionnel).
Pour la France https://www.interieur.gouv.fr/Elections/Comment-voter/Machines-a-voter
(nb: le règlement est vieux/obsolète, ne traite pas vraiment du logiciel ou des détails des fonctionnalités, et le code électoral est bogué aussi sur le sujet des machines à voter… mais on continue avec les modèles de 2005 parce changer quelque chose serait beaucoup plus compliqué que de ne rien faire et d'attendre que la mode et les machines ne (tré)passent)
[^] # Re: Quelle générosité
Posté par Benoît Sibaud (site web personnel) . En réponse au lien Microsoft continue sa libération du code source des applications stratégiques. Évalué à 5.
Quelqu'un pourrait vouloir relancer daCode sur PHP3, ou Templeet sur PHP4, sait-on jamais.
[^] # Re: Journal vs Forum
Posté par Benoît Sibaud (site web personnel) . En réponse au message REX de Chuwi sur Linux. Évalué à 5.
https://fr.m.wikipedia.org/wiki/Retour_d%27exp%C3%A9rience
La notion de retour d'expérience (parfois abrégé REX ou RETEX) (…)
https://fr.m.wiktionary.org/wiki/REX
http://m.gdt.oqlf.gouv.qc.ca/ficheOqlf.aspx?Id_Fiche=26532685
…
les deux sont utilisés (avec une préférence pour retex chez les militaires ?)
[^] # Re: THanks for the fish but...
Posté par Benoît Sibaud (site web personnel) . En réponse au journal Bien démarrer avec GnuPG. Évalué à 10.
La question était « Honnêtement qui peut réellement prétendre se servir de GPG ? ». J'y ai répondu. Maintenant l'auteur de la question m'explique qu'il sous-entendait « à part les geeks barbus ». Et toi tu m'expliques que « C’est que des cas qui ne nécessite absolument pas GPG. » J'ai envie de vous dire de ne pas poser des questions si vous ne voulez pas écouter les réponses, ou si vous avez déjà vos préjugés et que les réponses sont inutiles. Quand bien je serais atypique et le dernier utilisateur de GPG dans l'univers, vos réponses sont à côté de la plaque.
[^] # Re: THanks for the fish but...
Posté par Benoît Sibaud (site web personnel) . En réponse au journal Bien démarrer avec GnuPG. Évalué à 6.
Oui, chaque fois que j'ajoute un paquet, que j'accède à mon gestionnaire de secrets, que j'utilise duplicity pour les sauvegardes, que je veux chiffrer rapidement un truc sur disque ou parfois pour du courriel. Au final, oui tous les jours.
[^] # Re: Perso, je n'irais pas travailler dehors
Posté par Benoît Sibaud (site web personnel) . En réponse au journal 3615 mavie / disques nvme et chaleur. Évalué à 9.
https://www.epicurien.be/recettes/recettes-cuisson-en-croute-de-sel.asp je n'ai pas trouvé d'informations relatives aux ordi portables
[^] # Re: Où est l'intérêt ?
Posté par Benoît Sibaud (site web personnel) . En réponse au journal Dhall, une réponse au problème de configuration. Évalué à 6.
Envie de dal ? Goût pour la goudale ou La goudale ? Un sujet hadal de jeux de mots foireux. Laissons donc le temps des faits au Dhall, que l'on nomme ami, pour voir s'il ment.
[^] # Re: Marre des demi-mesures
Posté par Benoît Sibaud (site web personnel) . En réponse au lien Numérique dans l'Éducation : JM Blanquer annonce les états généraux du numérique à Poitiers. Évalué à 5.
Rassures-toi, si c'est JM Blanquer qui l'annonce, ça aura lieu ailleurs.
# Je reviens du futur et
Posté par Benoît Sibaud (site web personnel) . En réponse au journal LibreOffice : faille de sécurité liée aux fichiers MSOffice corrigée. Évalué à 3.
Le numéro de CVE a été demandé/créé le 12 mai. Comme il s'agit apparemment d'une personne extérieure au projet qui a trouvé la faille, il semblerait que LO ait corrigé entre le 12 et 19 donc.
# Stockage temporaire
Posté par Benoît Sibaud (site web personnel) . En réponse à l’entrée du suivi Disparition des pertinentages/inutilages. Évalué à 5 (+0/-0).
La liste de qui a noté comment sur un commentaire donné est conservée pour une durée limitée. Du coup j'imagine qu'il faudrait arrêter de tenter d'afficher cette information après la durée en question, vu qu'on n'a plus l'info.
[^] # Re: Croix vé bâton
Posté par Benoît Sibaud (site web personnel) . En réponse au journal Le 16, le nombre du démon. Évalué à 3.
Y a encore plus magique. C'est garanti sans le bug de l'an 10000 : 1 + 6 + 0 + 5 + 0 + 2 + 0 + 2 + 0 = 16