• 0 Posts
  • 39 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle






  • Oh, that makes warnings errors and does not mean “ignore errors”. I’m not too familiar with compiler flags. You could do some mental gymnastics to argue that the unused variable causes the compiler to exit and thus the code is not functioning and thus the unused variable is not a warning but an error :^)


  • dbx12@programming.devtoProgrammer Humor@programming.dev???
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    5 months ago

    I for my part prefer it that way. Makes sure the code stays clean and nobody can just silence the warnings and be done with it. Because why would you accept useless variables that clutter the code in production builds? Imagine coming back after some time and try to understand the code again. At least you have the guarantee the variable is used somehow and not just “hmm, what does this do? … ah, it’s unused”






  • Review is done before code gets into main, but that’s inefficient for most of the non-mission critical projects out there. A better approach is to optimistically merge most changes as soon as not-rocket-science allows it, and then later review the code in situ, in the main branch.

    Assuming you have a project with continuous delivery, that is an absolute foot gun. Optimistically merge the change and then realize in situ that you forgot the WHERE part of your SQL command (or analog statement of the query builder)? No fucking thanks.



  • There are some good points in it but the list feels poorly written as it contains very general tips which feel like fluff to increase the article length like:

    Protect the client-side against attacks.

    Or just wrong stuff like:

    Validate all server-side input data.

    If you can trust someone, it’s the server. You should validate data coming from the client on the server side.

    Some things even contradict each other like

    Implement strong authentication, such as two-factor authentication (2FA).

    And

    Use secure authentication mechanisms such as OAuth.

    Assuming your app is an OAuth client, you have no say in how the identity provider identifies the user.

    Good point, but even better than

    Monitor file and source code integrity.

    is having the application source code read-only, ideally owned by another user to avoid the confused deputy problem.