On 2/9/21 10:40 PM, Eike Rathke wrote: > Hi, > > On Monday, 2021-02-08 10:56:43 +0000, Jacob Hrbek wrote: > >> Should FSFE provide some kind of platform for community to discuss and >> propose coding standards? > Before discussing coding standards we should rule out bad Mail User > Agents that produce totally unusable text/plain from text/html in their > multipart/alternative: > >> Bad code: >> >> #!/bin/bash >> >> number= >> >> "5" >> >> if >> >> [[ >> >> " >> >> $number >> >> " >> >> =~ [0-9] ]]; >> >> then >> >> whatever; >> >> fi >> >> - Works only on systems with dynamic linking >> - Bash is not part of standard portable OS → Not portable >> >> Good code: >> >> #!/bin/sh >> >> # shellcheck shell=sh # Written to comply with IEEE Std 1003.1-2017 >> [<http://get.posixcertified.ieee.org/>](http://get.posixcertified.ieee.org/) >> number= >> >> "5" >> >> case >> >> " >> >> $number >> >> " >> >> in >> >> [0-9]) whatever; >> >> esac > > As sent, both are bad code. > > Eike > > -- > OpenPGP/GnuPG encrypted mail preferred in all private communication. > GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 > 2D3A > Use LibreOffice! https://www.libreoffice.org/ > _______________________________________________ > Discussion mailing list > Discussion@lists.fsfe.org > https://lists.fsfe.org/mailman/listinfo/discussion > > This mailing list is covered by the FSFE's Code of Conduct. All > participants are kindly asked to be excellent to each other: > https://fsfe.org/about/codeofconduct
Justify bad code and elaborate on bad mail user agents. -- - Krey
OpenPGP_0x31AE4020956E0A9A.asc
Description: application/pgp-keys
OpenPGP_signature
Description: PGP signature
_______________________________________________ Discussion mailing list Discussion@lists.fsfe.org https://lists.fsfe.org/mailman/listinfo/discussion This mailing list is covered by the FSFE's Code of Conduct. All participants are kindly asked to be excellent to each other: https://fsfe.org/about/codeofconduct