849 Matching Annotations
  1. Last 7 days
  2. Mar 2024
    1. The occurrence of a do-while instead of a while should always raise a question: why isn't the loop termination condition being tested at the beginning
    1. Thinking about how you will observe whether things are working correctly or not ahead of time can also have a big impact on the quality of the code you write.

      YES. This feel similar to the way that TDD can also improve the code that you write, but with a broader/more comprehensive outlook.

  3. Feb 2024
    1. dernière question de la part de Cécile qui dit pour un scénario complexe vaut-il mieux faire une seule 01:18:16 automatisation ou décomposer en plusieurs étapes
    2. Gérald qui demande lorsque le collaborateur s'en va comment fait-on pour récupérer les flux d'automatisation problématique qui paraît doit se présenter régulièrement 01:16:23 en amont ce sujet là et donc aujourd'hui l'idée c'est que ces outils là soient utilisés et là tout à l'heure clairement Erwan a dit à me connecter j'ai pas mon 01:16:37 outil de mot de passe clairement nous chez nos codes forgots on utilise un outil qui nous permet de sauvegarder les mots de passe pour que l'ensemble des membres y est axé pour se connecter aux outils qu'on a décidé d'utiliser pour 01:16:48 pour le fonctionnement de la plateforme et du reste et donc en gros si moi je suis absent ou pour X raisons la Saône n'est pas bloquée parce que les mots de passe sont dans ce coffre-fort qui est 01:16:59 qui est protégé et commun à quelques-uns d'entre nous
    3. Benjamin se demande si s'il cherche des logiciels qu'ils utilisent mais qu'aucun figure sur les outils ne codes est-ce que dans 01:13:05 ce cas-là c'est possible de créer la liaison
    4. qu'est-ce que ce serait des exemples un peu pour mettre la main à la pâte en sortant de ce webinaire
    5. je remets la slide où il y avait des 01:08:58 exemples qui sont une dizaine d'exemples parmi des centaines possible
    6. par exemple chez solidatech on se sert à la fois de 01:07:42 RTBF et de et de zappyer pour interconnecter justement nos posts sur les réseaux sociaux mais en fait ça permet de centraliser aussi bien Twitter que LinkedIn que 01:07:57 Twitter etc et ça nous permet de conserver un historique centralisé au même endroit sans avoir justement besoin au cas par cas d'aller voir ce qu'on a publié sur Twitter et en même temps sur Facebook etc et en fait tout en se 01:08:09 mettant en forme à calendrier on a les choses très clairement notre historique et donc on sait que bah oui on a déjà publié il y a trois mois sur Twitter tel sujet on va plutôt varier les plaisirs ou au contraire en parler sur Facebook pour pas oublier
    7. on a une question de Gabriel qui qui est en plein dans le sujet des 01:06:08 automatisations et qui me paraissait pertinente qui demande avant d'automatiser des tâches comment savoir si les outils les applis sur lesquels on travaille sont interconnectables
    8. démo de 20 secondes
    9. des questions sur les tarifs de de toutes ces solutions
    10. les outils no code c'est il y a une version gratuite puis 10 euros par 00:48:24 mois ou 20 euros par mois
    11. Résumé de la vidéo [00:00:00][^1^][1] - [01:22:34][^2^][2]:

      Cette vidéo est un webinaire organisé par Solidatech et Contournement, deux programmes de solidarité numérique qui aident les associations à renforcer leur impact grâce au numérique. Le webinaire présente les concepts et les outils du no code, c'est-à-dire la possibilité de créer des sites web, des applications, des outils internes et des automatisations sans avoir besoin de coder. Le webinaire explique les avantages du no code pour les associations, les différents types d'outils disponibles, les bonnes pratiques à adopter, et propose des démonstrations concrètes de création de projets no code.

      Points clés: + [00:00:00][^3^][3] Présentation de Solidatech * Programme de solidarité numérique créé en 2008 * Facilite l'accès au numérique financièrement et accompagne aux usages * Propose des logiciels à tarif réduit, du matériel reconditionné, des ressources, des webinaires et des formations + [00:04:53][^4^][4] Présentation de Contournement * Programme de solidarité numérique créé en 2017 * Aide les associations à créer des sites, des applis et des automatisations sans coder * Propose des vidéos, des podcasts, des formations en ligne et des offres solidaires + [00:08:10][^5^][5] Introduction au no code * No code = créer des projets numériques visuellement sans écrire de code * Avantages : gain de temps, d'argent, d'autonomie, de créativité * Inconvénients : dépendance aux éditeurs, limites techniques, besoin de se former + [00:14:29][^6^][6] Panorama des outils no code * Différents types d'outils selon les besoins : site web, appli mobile, outil interne, automatisation, etc. * Différents niveaux d'accessibilité selon les compétences : débutant, confirmé, avancé * Exemples d'outils : Dorik, Webflow, Bubble, Glide, Zapier, Airtable, Notion, etc. + [00:20:10][^7^][7] Démonstration de Zapier * Zapier = outil no code qui permet d'interconnecter des outils entre eux pour automatiser des tâches * Exemple : automatiser le traitement des candidatures à une formation * Explication pas à pas de la création d'un zap (automatisation) + [00:29:00][^8^][8] Démonstration de Softr * Softr = outil no code qui permet de créer des sites web et des applis à partir de bases de données Airtable * Exemple : créer un site de recrutement pour les métiers du no code * Explication pas à pas de la création d'un site avec Softr + [00:36:38][^9^][9] Bonnes pratiques du no code * Commencer par définir son besoin et son objectif * Choisir l'outil le plus adapté à son projet * Se former et se documenter sur l'outil choisi * Tester et itérer son projet * Se faire accompagner par des experts si besoin + [00:39:34][^10^][10] Questions-Réponses * Réponses aux questions des participants sur le no code, les outils, la sécurité, le rgpd, etc. * Présentation d'un bon d'achat de 80 euros valable un mois sur les formations de Contournement * Conclusion et remerciements

    12. partage les coulisses de contournement là vous voyez un tableau dans le ça alors on va juste faire un truc c'est imaginons que je veux veiller à chaque 00:33:09 fois qu'il y a le mot clé #noode sur Twitter ou alors qu'il y a hâte solidatech
    13. exemple maison c'est nos codes for good
    1. Résumé de la vidéo [00:00:00][^1^][1] - [01:30:42][^2^][2] :

      Cette vidéo est une présentation en français sur les outils numériques pour les associations, organisée par Solidatech et animée par Erwan Khezzar, cofondateur de Contournement. Elle aborde les sujets suivants :

      Points forts : + [00:00:00][^3^][3] Présentation de Solidatech * Un programme de solidarité numérique créé en 2008 * Une filiale des Ateliers du Bocage, membre du mouvement Emmaüs * Plus de 32 000 associations bénéficiaires et plus de 500 000 outils numériques distribués + [00:04:12][^4^][4] Présentation de Contournement * Une entreprise qui forme à contourner les obstacles techniques du numérique * Une approche basée sur les outils no code, qui permettent de créer des sites, des applis, des outils sans écrire de code * Un exemple de projet réalisé avec Glide : H24 Urgence, une appli qui cartographie les maisons de santé + [00:15:32][^5^][5] Panorama des outils no code * Une typologie des outils selon leur fonctionnalité : création de sites, d'applis, d'outils, d'automatisation, etc. * Une présentation de plusieurs outils avec leurs avantages et leurs limites : Webflow, Bubble, Glide, Airtable, Zapier, Notion, etc. * Une démonstration de Airtable, un outil de gestion de bases de données visuelles et collaboratives + [01:11:22][^6^][6] Questions-réponses * Des réponses aux questions des participants sur les outils no code, leur utilisation, leur coût, leur sécurité, etc. * Des conseils et des ressources pour se former et se lancer dans le no code * Une offre de réduction pour la formation initiation au no code de Contournement

  4. Jan 2024
    1. A system is a composition of objects thatare abstractions, which hide data andexpose behavior*

      Composition Abstraction Hide data Expose behavior

    1. Visual Studio Code has integrated source control management (SCM) and includes Git support out-of-the-box. Many other source control providers are available through extensions on the VS Code Marketplace

      This is an excellent resource for learing about Git integration with VS Code

  5. Dec 2023
    1. 看主体代码,主流程,折叠没有用的代码,忽略注释

    1. we are certainly special I mean 00:02:57 no other animal rich the moon or know how to build atom bombs so we are definitely quite different from chimpanzees and elephants and and all the rest of the animals but we are still 00:03:09 animals you know many of our most basic emotions much of our society is still run on Stone Age code
      • for: stone age code, similar to - Ronald Wright - computer metaphor, evolutionary psychology - examples, evolutionary paradox of modernity, evolution - last mile link, major evolutionary transition - full spectrum in modern humans, example - MET - full spectrum embedded in modern humans

      • comment

      • insights

        • evolutionary paradox of modernity
          • modern humans , like all the living species we share the world with, are the last mile link of the evolution of life we've made it to the present, so all species of the present are, in an evolutionary sense, winners of their respective evolutionary game
          • this means that all our present behaviors contain the full spectrum of the evolutionary history of 4 billion years of life
          • the modern human embodies all major evolutionary transitions of the past
          • so our behavior, at all levels of our being is a complex and heterogenous mixture of evolutionary adaptations from different time periods of the 4 billion years that life has taken to evolve.
          • Some behaviors may have originated billions of years ago, and others hundred thousand years ago.
      • Examples: humans embody full spectrum of METs in our evolutionary past

        • fight and flight response
          • early hominids on African Savannah hundreds of thousands to millions of years ago when hominids were predated upon by wild predators
        • cancer
          • normative intercell communication breaks down and reverts to individual cell behavior from billions of years ago
            • see Michael Levin's research on how to make metastatic cancer cells return to normative collective, cooperative behavior
        • children afraid to sleep in the dark
          • evolutionary adaptation against dangerous animals that might have hid in the dark - dangerous insiects, snakes, etc, which in the past may have resulted in human fatalities
        • obesity
          • hunter gatherer hominid attraction to rich sources of fruit. Eating as much of it as we can and maybe harvesting as much as we can and carrying that with us.
            • like squirrels storing away for the winter.
    1. Modern clients are produced by a modern code generator, combined with hand-crafted functionality for some services.
    2. The libraries in this repo are simple REST clients. These clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
  6. Nov 2023
    1. It is also worth noting that lib/tasks typically has application-specific tasks, thus not fitting into the condition for lib. Which makes me question the criteria for lib
    2. lib/ is intended to be for non-app specific library code that just happens to live in the app for now (usually pending extraction into open source or whatever).
    3. Stuff like a generic PhoneNumberFormatter is exactly what lib/ is intended for.
    4. If application code lives in app, then doesn't that imply that things in lib (such as PhoneNumberFormatter) are not application code? I think that's one of the reasons why your recommendation of app/lib felt right to me -- my classes feel like they belong in app somewhere.
    1. @tmoschou You can find the source for Apple's pkill on opensource.apple.com/source. It's together with other utilities in the collection adv_cmds. Maybe you can spot the bug.
    1. This snippet removes some of the empty a elements to make the headings anchors instead:

      javascript ([ ...document.querySelectorAll("a[name] +h1, a[name] +h2, a[name] +h3, a[name] +h4, h1 +a[name], h2 +a[name], h3 +a[name], h4 +a[name]") ]).map((x) => { if (x instanceof HTMLHeadingElement) { var link = x.previousElementSibling; var heading = x; } else { var link = x; var heading = x.previousElementSibling; } link.parentElement.removeChild(link); heading.setAttribute("id", link.name); })

    2. The HTML encoding of this document contains several errors, some of which substantially affect the way it's read. This fixes one of those problems in Appendix II:

      javascript ([ ...document.querySelectorAll("op") ]).reverse().forEach((op) => { let f = document.createDocumentFragment(); f.append(document.createTextNode("<OP>"), ...op.childNodes); op.parentElement.replaceChild(f, op); })

      The problem show be apparent on what is, at the time of this writing, line 4437:

      html <code>IF ?w THEN ?x<OP>?y ELSE ?z<OP>?y</code>

      (The angle brackets around the occurrences of "OP" should be encoded as HTML entities. Because they aren't they end up getting parsed as HTML op elements (which isn't a thing) and screwing up the document tree.)

    1. ou, pour l'élection des représentants des parents d'élèves, exclusivement par correspondance sur décision du chef d'établissement, après consultation du conseil d'administration. Les votes sont personnels et secrets.
  7. Oct 2023
  8. Sep 2023
    1. Besides that ffscreencast can act as an ffmpeg command generator. Every available option can also just show the corresponding ffmpeg command instead of executing it. Non-ffmpeg commands, such as how the camera resolution is pulled and others can also be shown instead of being executed.
    1. Fig. 5.1 An early bulletin board system. The entire interface was just plain text, and you had to type in commands to navigate to the different threads and read or reply with messages.

      This would be a killer introduction to computing I wonder if there's a demo of this anywhere

    1. Configuring PyCharm: Open PyCharm with ‘Pytest Web Framework’ Press Ctrl+Alt+S > Project Click ‘Project Interpreter’ Select Python 3.6 Click ‘OK’ Go to write over 100500 automated tests!!!

      This section provides a step-by-step guide on setting up PyCharm for automated testing using the 'Pytest Web Framework'.

    1. So now we have a file that you need to open in JMeter UI, configure number of threads that you want to execute and you are good to go.

      After converting the Postman test into a JMeter format, users can easily adjust the concurrency settings by configuring the number of threads in the JMeter UI, offering flexibility in load testing scenarios.

    1. Let’s add a test that will validate that number of results on a page is lower then total number of results.

      This code snippet in Postman ensures that the number of displayed results on a single page is always less than the total count of results, ensuring pagination is functioning correctly.

  9. Aug 2023
    1. TypeTest(x, obj.type, FALSE) ; x.type := ORB.boolType

      The explicit x.type assignment here is redundant, because TypeTest will have already done it (in this case because the third argument is false).

    2. IF sym = ORS.ident THEN ORS.CopyId(modid); ORS.Get(sym); Texts.WriteString(W, modid); Texts.Append(Oberon.Log, W.buf) ELSE ORS.Mark("identifier expected") END ;

      This "IF...ELSE Mark, END" region could be reduced by replacing the three lines corresponding to those control flow keywords with a single call to Check:

      Check(ORS.ident, "identifier expected");
      
  10. Jul 2023
    1. there's really shocking data that shows red zip codes are getting red or redder and blue ones Bluer and Bluer
      • US political polarization at local level
        • there's really shocking data that shows
          • red zip codes are getting red or redder and
          • blue states are getting Bluer
        • people are self-selecting into communities based on their political beliefs
          • and this is the highest rate we've ever seen it since polling began in that space
        • The phenomenon is really hyper localized
  11. Jun 2023
    1. the code of G of of a transformer the T in in a 00:25:17 GPT is 2000 lines long it's not very complex it's actually not a very intelligent machine it's simply predicting the next word
      • interesting fact
        • ChatGPT is only written with 2,000 lines of code
        • It's not very intelligent, but a very large external memory
        • and repeats the best of what humans have said
  12. May 2023
    1. the Carthusian monks decided in 2019 to limit Chartreuse production to 1.6 million bottles per year, citing the environmental impacts of production, and the monks' desire to focus on solitude and prayer.[10] The combination of fixed production and increased demand has resulted in shortages of Chartreuse across the world.

      In 2019, Carthusian monks went back to their values and decided to scale back their production of Chartreuse.

  13. Apr 2023
    1. Replace all NaN elements in column ‘A’, ‘B’, ‘C’, and ‘D’, with 0, 1, 2, and 3 respectively.

      可以对部分列进行操作,不需要对所有列都进行操作(填补缺失值)

  14. Mar 2023
    1. Incitement of violence towards any individual

      Believing in "government" REQUIRES hypocrisy, schizophrenia and delusion. One illustration of this is the bizarre and contradictory way in which social media platforms PRETEND to be against people advocating violence.

      https://youtu.be/7OyNHgTSBiQ

    1. RECOMMANDATION N°8La Défenseure des droits recommandeau ministre des Solidarités, de l’Autonomieet des Personnes handicapées et à la ministredéléguée chargée des Personneshandicapées :• De rappeler aux MDPH d’adopter un PPSafin, conformément à l’article D. 351-5 ducode de l’éducation, de définir et coordonnerles modalités de déroulement de la scolaritéet les actions pédagogiques, psychologiques,éducatives, sociales, médicales etparamédicales répondant aux besoinsparticuliers des élèves présentant unhandicap ;• D’inviter les CDPAH à préciser, dansleurs décisions, les activités à réaliserpar les AESH affectés auprès des enfants

      Recommandation 08

  15. Feb 2023
    1. In very large code bases, it is likely impossible to make a change to a fundamental API and get it code reviewed by every affected team before merge conflicts force the process to start over again.
    1. "The coded language is effective in that it creates this sense of community," said Rachel Moran, a researcher who studies COVID-19 misinformation at the University of Washington. People who grasp that a unicorn emoji means "vaccination" and that "swimmers" are vaccinated people are part of an "in" group. They might identify with or trust misinformation more, said Moran, because it’s coming from someone who is also in that "in" group.

      A shared language and even more specifically a coded shared language can be used to create a sense of community or define an in group identity.

    1. Enseignements artistiques :Organisation et financement dans le cadre du plan régional desformations professionnelles prévu à l’article L. 214-13 du code del’éducation, des cycles d’enseignement professionnel initial.
    2. Signature par le président du conseil régional et le préfet de régiond’une convention régionale pluriannuelle de coordination del’emploi, de l’orientation et de la formation (L6123-4 du code dutravail)
    1. Le chef d'établissement fixe l'ordre du jour, les dates et heures des séances du conseil d'administration en tenant compte, au titre des questions diverses, des demandes d'inscription que lui ont adressées les membres du conseil. Il envoie les convocations, accompagnées de l'ordre du jour et des documents préparatoires, au moins huit jours à l'avance, ce délai pouvant être réduit à un jour en cas d'urgence.
    1. Are there symbols for 'supported by' or 'contradicted by' etc. to show not quite formal logical relations in a short hand?

      reply to u/stjeromeslibido at https://www.reddit.com/r/Zettelkasten/comments/10qw4l5/are_there_symbols_for_supported_by_or/

      In addition to the other excellent suggestions, I don't think you'll find anything specific that that was used historically for these, but there are certainly lots of old annotation symbols you might be able to co-opt for your personal use.

      Evina Steinova has a great free cheat sheet list of annotation symbols: The Most Common Annotation Symbols in Early Medieval Western Manuscripts (a cheat sheet).

      More of this rabbit hole:

      (Nota bene: most of my brief research here only extends to Western traditions, primarily in Latin and Greek. Obviously other languages and eras will have potential ideas as well.)

      Tironian shorthand may have something you could repurpose as well: https://en.wikipedia.org/wiki/Tironian_notes

      Some may find the auxiliary signs of the Universal Decimal Classification useful for some of these sorts of notations for conjoining ideas.


      Given the past history of these sorts of symbols and their uses, perhaps it might be useful for us all to aggregate a list of common ones we all use as a means of re-standardizing some of them in modern contexts? Which ones does everyone use?

      Here are some I commonly use:

      Often for quotations, citations, and provenance of ideas, I'll use Maria Popova and Tina Roth Eisenberg's Curator's Code:

      • ᔥ for "via" to denote a direct quotation/source— something found elsewhere and written with little or no modification or elaboration (reformulation notes)
      • ↬ for "hat tip" to stand for indirect discovery — something for which you got the idea at a source, but modified or elaborated on significantly (inspiration by a source, but which needn't be cited)

      Occasionally I'll use a few nanoformats, from the microblogging space, particularly

      • L: to indicate location

      For mathematical proofs, in addition to their usual meanings, I'll use two symbols to separate biconditionals (necessary/sufficient conditions)

      • (⇒) as a heading for the "if" portion of the proof
      • (⇐) for the "only if" portion

      Some historians may write 19c to indicate 19th Century, often I'll abbreviate using Roman numerals instead, so "XIX".

      Occasionally, I'll also throw drolleries or other symbols into my margins to indicate idiosyncratic things that may only mean something specifically to me. This follows in the medieval traditions of the ars memoria, some of which are suggested in Cornwell, Hilarie, and James Cornwell. Saints, Signs, and Symbols: The Symbolic Language of Christian Art 3rd Edition. Church Publishing, Inc., 2009. The modern day equivalent of this might be the use of emoji with slang meanings or 1337 (leet) speak.

  16. Jan 2023
    1. Recommandation 6. Attribuer la mission d’organisation des séances annuelles aux chefs d’établissement, enlien avec les comités d’éducation à la santé et la citoyenneté (disposition complétant l’article L. 312-16 ducode de l’éducation)
    1. • Inscrire le droit à une éducation non violente et l’interdiction des châtiments corporels ettraitements humiliants dans le code de l’éducation, dans le code de la santé publique, ainsi quedans le code de l’action sociale et des familles.destinataires : Ministre de l’Éducation nationale / Ministre de la Santé et de la PréventionMinistre des Solidarités, de l’Autonomie et des Personnes handicapées
  17. Dec 2022
    1. Since there is no measurable performance advantage for either, any time (however marginal) spent thinking or talking about a choice between the two is wasted. When you prefer single quoted strings, you have to think when you need interpolation. When you use double quoted strings, you never have to think. (I'd also add, anecdotally, that apostrophes are more prevalent in strings than double quotes, which again means less thinking when using double-quoted strings.) Therefore always using double-quoted strings results in the least possible wasted time and effort.
  18. Nov 2022
    1. Use the Get-ChildItem cmdlet with the -Recurse switch: Get-ChildItem -Path V:\Myfolder -Filter CopyForbuild.bat -Recurse -ErrorAction SilentlyContinue -Force

      Useful PowerShell command to do recursive file search in Windows through PowerShell.

    1. dsmdavid commented Mar 8, 2021 @tchakabam if you right click on the status bar, do you get many options? Might be worth not showing some of the other options (in my case the line/column was not shown because there were too many options already there) and, after unselecting one:

      Post about status bar in VS Code (visible at bottom of window by default).

      I looked for this since I couldn't figure out the column numbers of where my cursor was in the editor.

      You can toggle this setting by opening command palette and searching "View: Toggle Status Bar Visibility"

      Displays Ln & Col numbers.

    1. You can also go to the Ruby OAuth Client Library to download the source code and run: 1gem build intuit-oauth.gemspec to build your own gem if you want to modify certain functions in the library.
    1. Louis Burki 6 months ago (edited) I have make some changes to make it work, because I had a similar error. First, I have add a ":" before the "=" in the Text variable at the beginning of the script. Now it looks like that: "Text:=". Then I have put double quotes around (**your snippets**) so now it looks like this "(***your snippets***)". Then, I also changed the sort line to make it look that: Text:= sort(Text). And now it works as intended. Also, be careful not to remove the pipe symbol in your snippets.

      Someone giving a troubleshooting solution to using Joe Glines' Auto Hotkey script that inserts text from a list of the user's choosing. The problem another user had was including it in their main script file, but this was resolved with Louis Burki's answer

    1. You can then edit files in that repository and commit and push them like this: cd 0a30d52feeb3ff60f7d8636b0bde296b # Edit files here git commit -m "Edited some files" -a git push
    2. But if you want to be able to make local edits and then push them back, you need to use this recipe instead: git clone git@gist.github.com:0a30d52feeb3ff60f7d8636b0bde296b.git You can find this in the "Embed" menu, as the "Clone via SSH" option.
    3. You can clone them anonymously (read-only) just using their URL: git clone https://gist.github.com/simonw/0a30d52feeb3ff60f7d8636b0bde296b
    1. Run in WSL to return current total "word count": find /mnt/c/path/to/obsidian -type f -name "*.md" -exec cat '{}' \+ | wcThis will also count words in syntax - like the word "query" in an embedded query. In fact it probably counts anything separated by whitespace as separate words. But you could do some preprocessing between the cat and the wc if you like.

      Linux command for WSL to count all lines, words count, & character count. OP states at end -wc restricts to word count only

    1. A second problem is that once your process has exited, Bash will proceed to exit as well. If you're not being careful, Bash might exit with exit code 0, whereas your process actually crashed (0 means "all fine"; this would cause Docker restart policies to not do what you expect). What you actually want is for Bash to return the same exit code your process had.
  19. Oct 2022
    1. Several templates and tools are available to assist in formatting, such as Reflinks (documentation), reFill (documentation) and Citation bot (documentation)

      I clicked the link for reFill and thought it looked interesting. Would like to look into this further.

    1. You may need pathname2url

      (Author:: [[neurino on Stack Overflow]]) python from urllib.request import pathname2url pathname2url('dir/foo, bar.mp3')

    1. L'échelle des sanctions fixée à l'article R. 511-13 du code de l'Éducation est reproduite dans le règlement intérieur. Toutefois, le juge administratif (CE, 16 janvier 2008, MEN c/Mlle Ayse A, n° 295023) considère que, même en l'absence de toute mention dans le règlement intérieur, l'échelle des sanctions réglementaires est applicable de plein droit.
    1. Functions are much more flexible than aliases. The following would overload the usual ls with a version that always does ls -F (arguments are passed in $@, including any flags that you use), pretty much as the alias alias ls="ls -F" would do: ls () { command ls -F "$@" }
  20. Sep 2022
    1. First, to clarify - what is "code", what is "data"? In this article, when I say "code", I mean something a human has written, that will be read by a machine (another program or hardware). When I say "data", I mean something a machine has written, that may be read by a machine, a human, or both. Therefore, a configuration file where you set logging.level = DEBUG is code, while virtual machine instructions emitted by a compiler are data. Of course, code is data, but I think this over-simplified view (humans write code, machines write data) will serve us best for now...
    1. Writing Code for Humans — A Language-Agnostic Guide…because code which people can’t read and understand is easy to break and hard to maintain.
    1. I don't like the first syntax because then you have weird looking code due to all the leading whitespace, and you lose a lot of real estate.
    2. Aligning everything with however long the method name is makes every indention different. belongs_to :thing, class_name: 'ThisThing', foreign_key: :this_thing_id has_many :other_things, class_name: 'ThisOtherThing', foreign_key: :this_other_thing_id validates :field, presence: true Compared to the following, which all align nicely on the left. belongs_to :thing, class_name: 'ThisThing', foreign_key: :this_thing_id has_many :other_things, class_name: 'ThisOtherThing', foreign_key: :this_other_thing_id validates :field, presence: true
    3. This one bugs me a lot, but honestly, I don't like either style of the "normal method calls" above. I'm definitely voting to change the rule, but I'd also recommend trying to use the following syntax. In my opinion, it's the best of both worlds. a_relatively_long_method_call( :thing, :another_thing ) Or, if there are a lot or arguments, or the arguments are long: a_relatively_long_method_call( :a_long_argument, :another_long_argument, :a_third_long_argument )
    1. In collusion, writing good code not only require knowledge but also require compassion. To understand people's pain and mistakes, to think about your teammate and to help everyone achieve a better life.
    2. Think about how good it is if you can build a system at “2 half brain quality” and then people just need use 1 half of their brain to maintain it. You can fix bug in a blink of an eye, run tests and give it to tester, done. Everything will be done in a easiest way and fixing bug or refactoring can be easy like breathing. The most heavy task in programming is not about building application, but it’s about maintain them and if you wrote something you can’t understand, then you will suffer for the rest of your life.
    3. Write code for human, not for God
    1. your cognitive load increases with the level of indentation. 1 2 3 4 5 6 7 8 9 10 if r.Method == "GET" { if r.Header.Get("X-API-KEY") == key { // ok return nil }else{ return errors.New("Key is not valid") } } else { return errors.New("Invalid Method") }
    2. Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
    3. To see if you are writing good code, you can question yourself. how long it will take to fully transfer this project to another person? If the answer is uff, I don’t know… a few months… your code is like a magic scroll. most people can run it, but no body understand how it works. Strangely, I’ve seen several places where the IT department consist in dark wizards that craft scrolls to magically do things. The less people that understand your scroll, the more powerfully it is. Just like if life were a video game.
    4. Avoid indentation levels, If you find yourself with more than 3, you should create a function.
    5. Code explains what and how Documentation explains why.
    6. This is so clear that you don’t even need comments to explain it.
    7. Another type of comments are the ones trying to explain a spell.
    8. Do you really need those lines? Isn’t it clear enough? Well, I still find comments like this in a lot of cases and it gets funnier when the comment is obsolete and the code is doing other things. Following the example, let’s imagine that another developer adds support for PUT method. I think that this is what would happen.
    9. The rule of thumbs is, never use code that you do not understand.
    1. For example, whereas C programmers have argued for years about where to put their brackets, and whether code should be indented with tabs or spaces, both Rust and Go eliminate such issues completely by using a standard formatting tool (gofmt for Go, rustfmt for Rust) which rewrites your code automatically using the canonical style. It’s not that this particular style is so wonderful in itself: it’s the standardisation which Rust and Go programmers appreciate.
  21. Aug 2022