• 0 Posts
  • 108 Comments
Joined 1 year ago
cake
Cake day: August 15th, 2023

help-circle








  • Vlyn@lemmy.ziptoMicroblog Memes@lemmy.worldOldie but a goldie
    link
    fedilink
    English
    arrow-up
    40
    arrow-down
    10
    ·
    1 month ago

    Counter point: I know plenty of people who close the lid and then flush, then leave. So when you open the toilet you’re greeted by a floater or shit streaks over the bowl.

    I flush with it open, check if it’s clean (otherwise use the brush and flush again) then leave.

    If you want to close the lid you’d have to close it, flush, open it and check, clean, close it again. Are you doing that?



  • designing a vote weighting system that favors similar instances

    Would make the whole thing even worse, as I could create several new instances with 10 bot users each, then hammer out the votes.

    The entire problem is that you can’t trace back each vote to a genuine user. It would be bad in case of fake instances that create 100 user accounts and upvote/downvote stuff, but you can ban the instance. It would be a disaster if a big instance creates fake votes (like lemmy.world suddenly adds 1000 fake users and uses them to manipulate other instances, if votes were anonymous you couldn’t check if it’s genuine lemmy.world users or fake accounts).



  • The problem isn’t keeping votes anonymous, that’s easy. The problem is bots/spam. You could just create a new instance and then upvote a post from another instance a thousand times. If the votes are anonymous for the other instance it’s tough to say if they are genuine users or just bots.

    That’s the main issue here, when votes are anonymous you could easily just spam votes with no way to trace it back. If it’s a rogue instance then fine, you can ban the whole instance. But imagine if lemmy.world starts using fake votes in the background towards other instances.


  • I really don’t see the issue there, you’re only outputting highly specific data to a website, not dumping half the database.

    Do you mean your typical CRUD structure? Like having a User object (AuthId, email, name, phone, …), the user has a Location (Country, zip, street, house number, …), possibly Roles or Permissions, related data and so on?

    SQL handles those like a breeze and doesn’t care at all about having to resolve the User object to half a dozen other tables (it’s just a 1…1 relation, on 1…n, but with a foreign key on the user id it’s all indexed anyway). You also don’t just grab all this data, join it and throw it to the website (or rather the enduser API), you map the data to objects again (JSON in the end).

    What does it matter there if you fetched the data from a NoSQL document or from a relational database?

    The only thing SQL is not good at is if you have constantly changing fields. Then JSON in SQL or NoSQL makes more sense as you work with documents. For example if you offer the option to create user forms and save form entries. The rigid structure of SQL wouldn’t work for a dynamic use-case like that.


  • I mean in my case it’s for an international company where customers use this structure and the depth can basically be limitless. So trying to find the topmost parent of a child or getting all children and their children anywhere inside this structure becomes a performance bottleneck.

    If you have a single level I really don’t understand the problem. SQL joins aren’t slow at all (as long as you don’t do anything stupid, or you start joining a table with a billion entries with another table with a billion entries without filtering it down to a smaller data subset).


  • If you only join on indexed columns and filter it down to a reasonable number of results it’s easily fast enough.

    For true hierarchical structures there’s tricks. Like using an extra Path table, which consists of AncestorId, DescendentId and NumLevel.

    If you have this structure:

    A -> B -> C

    Then you have:

    A, A, 0

    A, B, 1

    A, C, 2

    B, B, 0

    B, C, 1

    C, C, 0

    That way you can easily find out all children below a node without any joins in simple queries.


  • Vlyn@lemmy.ziptoMicroblog Memes@lemmy.worldWould be cool
    link
    fedilink
    English
    arrow-up
    12
    ·
    edit-2
    3 months ago

    You do realize we have an unlimited energy source burning down on us during the day? Energy isn’t the issue here. We already overproduce during the day (though electric cars might take the load off of that in the near future).

    Also you don’t have to make the carbon go poof, you just have to capture it and store in in another form (that’s not in the atmosphere). So yes, if you have a way to capture it and you use solar power (or any other renewable) you can reduce the carbon in the air.

    Earth isn’t a closed system.


  • Well, there’s modern C++ and it looks reasonable, so you start to think: This isn’t so bad, I can work with that.

    Then you join a company and you find out: They do have modern C++ code, but also half a million lines of older code that’s not in the same style. So there’s 5 different ways to do things and just getting a simple string suddenly has you casting classes and calling functions you have no clue about. And there’s a ton of different ways to shoot your foot off without warning.

    After going to C# I haven’t looked back.