• 60 Posts
  • 1.62K Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle


  • My pet theory is that our brain rewards us for interpreting clues correctly, because this is crucial for survival. And patterns make it easy to do this interpretation correctly, therefore triggering the reward system frequently.

    But if it is too easy to interpret a pattern correctly, the reward will be lessened, because the challenge you succeeded in was lesser. And it was also crucial to survival to fade out patterns which don’t change, so that e.g. the wind brushing through leaves doesn’t drown out the noises from a predator approaching.

    That’s why patterns which don’t change every so often stop triggering the reward system and therefore bore us.


  • Well, the writing-part isn’t the bad part about duplicated code. It’s the maintaining of it. In particular, if you duplicate logic, it happens all too quickly that you make modifications to one, but not the other, or you make differing modifications to both.

    Eventually, you’ll end up with two wildly different versions, where you won’t know why certain changes were made and not applied to the other version. Similarly, if you do need to make a similar change to both, you might now need to implement it two times.

    I guess, I do agree that it isn’t *always* worth it, but in my experience, it is far more often worth it than one might think.







  • Can we at least mention, though, that that’s kind of nonsensical, too? Give me a *very* high-level summary of what changed, but then the rest of the commit message should be the why (unless that’s genuinely obvious, like when adding a feature).

    If I actually want to know what changed, I can look at the code changes. I can’t find the why anywhere else, though. Nor can an LLM having to describe those random code changes.





  • Yep, the repository root. Where everyone starts to read your code, so you put your README there and the docs-folder and the entrypoint to your source tree, oh and also all this random guff that no sane reader would ever be interested in.

    I still remember how I tried to read larger repositories for the first time and this was genuinely a hurdle, because I figured these files must be highly relevant for understanding the code.

    My attempt at combating that has been to move as much of the code structure to the top as possible, so that someone new will have a much higher chance of clicking on something relevant. But yeah, downside is that your code structure isn’t as separated from the guff anymore…






  • You can check whether you’re clean with a toilet paper, if you’re unsure. But I did so a few times at the beginning and never had stained toilet paper (so long as I didn’t stick it inside, I guess), so I don’t bother anymore.

    In particular, you also feel cleaner when you regularly use a bidet (like you’re freshly showered), so that also makes it easier to feel when you aren’t clean…