Most active commenters

    ←back to thread

    69 points thunderbong | 11 comments | | HN request time: 0.585s | source | bottom
    1. nomilk ◴[] No.45160043[source]
    Reading through some controllers and models, haven't encountered a single code comment yet, just chiselled-out ruby.

    Arbitrary examples:

    https://github.com/basecamp/once-campfire/blob/main/app/cont...

    https://github.com/basecamp/once-campfire/blob/main/app/cont...

    https://github.com/basecamp/once-campfire/blob/main/app/mode...

    replies(4): >>45160157 #>>45160222 #>>45160923 #>>45161406 #
    2. napsterbr ◴[] No.45160157[source]
    Reminds me of Ash (Elixir framework).

    Seems great on paper, but quickly turns into a nightmare. Magic is great to get you up to speed, but as soon as you find yourself having to bend the magic, good luck.

    replies(2): >>45160427 #>>45164872 #
    3. mdaniel ◴[] No.45160222[source]
    I got a kick out of seemingly server-side browser blocking https://github.com/basecamp/once-campfire/blob/eecdb29332527... without one iota of "but, why?"
    replies(1): >>45160276 #
    4. gls2ro ◴[] No.45160276[source]
    I dont know for sure why but could it be that they are using importmaps and so it needs some browser versions to support it out of the box.

    One the other hand there is an advantage to use importmaps removing the dependency on nodejs for FE assets thus making both DX and deployment a breeze.

    replies(1): >>45160775 #
    5. ch4s3 ◴[] No.45160427[source]
    There's not much magic in any of these. Scopes for example are just a convenience on top of a self method that can be chained to spit out SQL.
    6. mdaniel ◴[] No.45160775{3}[source]
    (a) reasonable guess, but it seems no, given https://caniuse.com/import-maps cites FF 108(!) versus the forbidden 120

    (b) ok, fine, then include any english anywhere (in the source code, in the incompatible_browser.html.erb, in CLAUDE.md, whatever) so future generations would have any sane reason to mutate those magic numbers

    7. wereHamster ◴[] No.45160923[source]
    Could it be that they removed /all/ comments from the codebase when they made it public, to not release some sensitive information that was in them?
    replies(2): >>45161036 #>>45161389 #
    8. micromacrofoot ◴[] No.45161036[source]
    possible, but I've worked in similar sized codebases that didn't use them intentionally (linted them out)

    the idea being that the code should be readable enough to not require then

    9. jbl0ndie ◴[] No.45161389[source]
    We're a Ruby shop and we have pretty much zero commented code. Ruby's intended to be readable enough not to need them and when we do need them, it's a sure sign we need some refactoring.
    10. TiredOfLife ◴[] No.45161406[source]
    It's Ruby. No amount of comments will make somebody who doesn't grok Ruby understand the code.
    11. borromakot ◴[] No.45164872[source]
    Make sure to tell the team about it, and ask questions about it. Sometimes it's hard to tell the difference between magic and a misunderstanding