https://microcumul.us

Just chilling

  • 6 Posts
  • 210 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle







  • andrew@lemmy.stuart.funtomemes@lemmy.worldGreek letters too!
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    edit-2
    1 month ago

    This is true but it’s much easier to understand in retrospect unless you have a very very gifted math teacher (or series of teachers really) when you start learning it. For most people learning algebra it’s just another checkbox to tick for some reason. Plus pesky word problems that make you figure out the equations on top of that.

    Now that I’m an adult I recognize what all of this was trying to teach me. But back in my school days it was just another thing I had to do between hanging out with friends.








  • Is there a language that anyone would say really does fare well for continued development or is it just that few people enjoy maintaining code? I’ve maintained some pretty old Go programs I wrote and didn’t mind it at all. I’ve inherited some brand new ones and wanted to rage quit immediately. I’ve also hated my own code too, so it’s not just whether or not I wrote it.

    I have found maintainability is vastly more about the abstractions and architecture (modules and cohesive design etc) chosen than it is about the language.



  • The real primary benefit of storing your relationships in a separate place is that it becomes a point of entry for scans or alterations instead of scanning all entries of one of the larger entity types. For example, “how many users have favorited movie X” is a query on one smaller table (and likely much better optimized on modern processor architectures) vs across all favorites of all users. And “movie x2 is deleted so let’s remove all references to it” is again a single table to alter.

    Another benefit regardless of language is normalization. You can keep your entities distinct, and can operate on only one of either. This matters a lot more the more relationships you have between instances of both entities. You could get away with your json array containing IDs of movies rather than storing the joins separately, but that still loses for efficiency when compared to a third relationship table.

    The biggest win for design is normalization. Store entities separately and updates or scans will require significantly less rewriting. And there are degrees of it, each with benefits and trade-offs.