• 5 Posts
  • 426 Comments
Joined 1 year ago
cake
Cake day: August 4th, 2023

help-circle


  • “readability” is subjective. much like how there is no objective definition of “clean code”. i am not arguing that either option is more generally “readable”, i am insisting that people use a common standard regardless of your opinion on it. a bad convention is better than no convention. i dont personally like a lot of syntax conventions in languages, whether that be non-4-space indenting, curly braces on a new line, or early-declared variables. but i follow these conventions for the sake of consistency within a codebase or language, simplicity on linter/formatter choice, and not muddling up the diffs for every file.

    if you want to use <br/> in a personal codebase, no-one is stopping you. i personally used to override every formatter to use 2-space indenting for example. but know that there is an official best practice, which you are not following. if you work in a shared codebase then PLEASE just follow whatever convention they have decided on, for the sake of everyone’s sanity.





  • lseif@sopuli.xyztoProgrammer Humor@programming.dev<br>
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    4 months ago

    An explanation of this problem can be found on the official W3C HTML validator wiki.

    HTML parsers only allow this to stop pages breaking when developers make mistakes; see this Computerphile video. ‘Able to be parsed correctly’ is not the soul criterion for it a syntax being preferred, otherwise we would all leave our <p> elements unclosed.

    Yes, it is not “incorrect” to write <br/>, but it is widely considered bad practice. For one, it makes it inconsistent with XML. Linters will often even “correct” this for you.

    I personally find the official style (<br>) to be more readable, but this is a matter of personal opinion. Oh, and I used to have the same stance as you, but I also used to think that Python’s whitespace-based syntax was superior…

    At the end of the day, regardless of anyone’s opinion, we should come to SOME consensus…and considering that W3C already endorses <br>, we should use this style.






  • For those who dont know these already:

    Aurora Store - Install Google Play Store apps without a Google account - I recommend to switch all non-paid apps to be installed with this, and use an anonymous login if possible.

    F-Droid: Install apps from centralized repositories (like a package manager) - I recommend to gradually switch all FOSS apps to be installed with this (not all Google Play apps can be installed with F-Droid of course). Other repositories can be added.

    Obtainium: Install apps from the ‘releases’ page of the app’s Github/Gitlab - I prefer this to F-Droid if possible, but there is little difference and it is slightly harder to set up, so I don’t recommend this initially.

    And last of all, installing an APK manually from the internet (works similar to an EXE installer).

    Each of these options should work on all Android distributions or ROMs.

    P.S. Please consider using a FOSS android ROM, such as GrapheneOS, LineageOS, /e/, CalyxOS, etc.