Je viens de découvrir la fonction "inspect.cleandoc" de la librairie standard de #Python.

https://notes.sklein.xyz/2025-06-13_1437/

#TIL #CodingStyle

Journal du Vendredi 13 juin 2025 à 14:37 - Jardin numérique de Stéphane Klein

Journal du Vendredi 13 juin 2025 à 14:37

Just found this piece on code styles, from the perspective of human cognitive capabilities and tendencies. This is something I've previously thought a lot about, and even given a short talk about! I've not had time to read it all yet, but from what I've read it seems very well grounded and thorough:

https://optimal-codestyle.github.io/

#Programming #SoftwareDevelopment #CodingStyle #Cognition

optimal-codestyle

TABS. It is a question of #accessibility, you morons!

Death to #smartTabs (aka random haphazard inserts of spaces depending on the IDE at hand)!

#codingStyle

Question ? what do you think about this style of coding. Is it readable enough ?
I've been using it a lot lately #PHP #codingstyle

Hey #PHP. When you use union and intersection types, do you include spaces?

(RT for reach, etc. This is survey data for @phpfig. If you know of any official policies by major projects already, please note/link in the replies.)

#codingstyle #phpfig

Foo|Bar, Foo&Bar, (Foo&Bar)|Baz
59.4%
Foo | Bar, Foo & Bar, (Foo & Bar) | Baz
39.6%
Other (specify)
1%
Poll ended at .

Some great points, some not so great ones:

“My Favorite C Programming Practices” [2014], Malcolm Inglis (https://github.com/mcinglis/c-style).

Via HN: https://news.ycombinator.com/item?id=40409956

#C #Programming #CProgramming #Style #CodingStyle #Guidelines #BestPractices #C11 #C17 #C99

GitHub - mcinglis/c-style: My favorite C programming practices.

My favorite C programming practices. Contribute to mcinglis/c-style development by creating an account on GitHub.

GitHub
Fuck zodiac signs, tell me which name you'd choose
#codingstyle #programming
FrobnicateUsbDevices()
30%
FrobnicateUSBDevices()
70%
Poll ended at .
Finally started, including an editorconfig file as part of my checkins to make it easy for my team to stick to general indentation style. Should have done it a while ago. It would have saved me an hour of reformatting code to use two space indents. #codingstyle
https://editorconfig.org
EditorConfig

EditorConfig is a file format and collection of text editor plugins for maintaining consistent coding styles between different editors and IDEs.

Bisher den einzigen #CodingStyle Dissenz im Team gibt's bei:

Leerzeichen vor oder nach (cast) statements (von PSR/PER nicht abgedeckt):

if ((bool) $var)
if ((bool)$var)

funcyCall((string)$something, (float)'1.337', (array)$var);

Werden wir wohl einen Fight Rule Club aufmachen.

JavaScript/TypeScript getters and setters

#JavaScript #TypeScript #codingStyle #getters
yey
36.4%
ney
63.6%
Poll ended at .