TheDoctor [they/them]

  • 9 Posts
  • 96 Comments
Joined 6 个月前
cake
Cake day: 2024年3月25日

help-circle










  • I often use comments as ways to say, “I know this is cursed, but here’s why the obvious solution won’t work.” Like so:

    /**
     * The column on this table is badly named, but
     * renaming it is going to require an audit of our
     * db instances because we used to create them
     * by hand and there are some inconsistencies
     * that referential integrity breaks. This method
     * just does some basic checks and translates the
     * model’s property to be more understandable.
     * See [#27267] for more info.
     */
    

    Edit: to answer your question more directly, the “why not what” advice is more about the intent of whether to write a comment or not in the first place rather than rephrasing the existing “what” style comments. What code is doing should be clear based on names of variables and functions. Why it’s doing that may be unclear, which is why you would write a comment.








  • 0.000% of Communism has been built. Evil child-murdering billionaires still rule the world with a shit-eating grin. All he has managed to do is make himself sad. He is starting to suspect Karl Marx fucked him over personally with his socio-economic theory. It has, however, made him into a very, very smart boy with something like a university degree in Truth. Instead of building Communism, he now builds a precise model of this grotesque, duplicitous world.