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

help-circle
  • 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.



  • 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.



  • Vlyn@lemmy.ziptoProgrammer Humor@lemmy.mlLeave it alone
    link
    fedilink
    English
    arrow-up
    16
    ·
    9 months ago

    Yeah, I’ve worked with the leave it alone types. What do you get in return? Components of your system which haven’t been updated in the last 20 years and still run .NET 3.5. They obviously never stopped working, but you have security concerns, worse performance (didn’t matter much in that case) and when you actually need to touch them you’re fucked.

    Why? Because updating takes a lot of time (as things break with every major revision) and on top of that if you then decide not to update (yeah, same coworker…) then you have to code around age old standards and run into bugs that you can’t even find on Stack Overflow, because people didn’t have to solve those in the last 20 years.


  • Yep, even “efficiency” cores are a scam. They were forced to go that way because their current process simply can’t support all full cores without drawing 300W+ and taking too much space.

    Cut down E-Cores aren’t even efficient power wise, just space efficient so they could fit them on the die.

    Besides power consumption my trust for Intel is down the gutter with half a dozen security issues. Which were patched with performance degradation. So they fucked up, patched it in software, now your hardware runs slower than when you bought it.



  • Absolutely not. I finally got a 4K 120hz OLED TV which needs a HDMI 2.1 cable. Ordered a certified one and I couldn’t get 120hz to run whatever way I tried. I managed to force it one time and the TV screen black screened every two seconds. After doing everything else (reinstall GPU drivers, messing with settings) I finally ordered a different HDMI cable.

    Plugged it in, set 120hz, it worked. Both cables are certified, but one was trash.

    Even with the new cable I sometimes get a short black screen now, but I have no clue if it’s the cable’s fault or the TV. HDMI cables are a total mess when you actually want to use the full bandwidth :-/

    I switched to 4K 60hz for now as I don’t really game on the TV anyway, it also allows me to use TrueMotion again (which seemingly doesn’t run at 120hz). Either way I get anxious about HDMI cables now, lol.


  • ThinkPad for laptop (user repairability, third party parts, open schematics)

    My fully decked out ThinkPad T16 Gen 1 I got for work last year is a piece of shit. Lenovo keeps messing up the BIOS (sometimes it took up to 2 minutes to reach the Windows loading screen), it sometimes has trouble with the Lenovo Monitor (which has a docking station with USB-C), or a colleague who had the same model it refused to charge.

    Don’t get me started on thermals, that thing either sounds like a jet engine or throttles down to 1.4 GHz on a damn 6 core CPU. That’s partly Intel’s fault too of course (The AMD counterpart would likely run cooler/faster).

    I always thought ThinkPads are awesome, now that I actually use a $3000 one I’d never buy one myself.






  • Vlyn@lemmy.ziptoNo Stupid Questions@lemmy.world*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    53
    arrow-down
    2
    ·
    10 months ago

    If it’s an existing language then it’s not secure.

    If you make up your own language you’ll waste a thousand hours and someone might use the notes you used to learn it.

    Just use damn encryption, it’s easy and fast. Also has additional benefits. If someone wants to force you to give them/translate your notes you can’t do much (they’ll know when your translation is inconsistent).

    With encryption you can hide a volume inside another one. If you enter the weaker password you can put decoy files there, with just your run of the mill notes. While behind a stronger password you hide your actual diary.




  • They usually use both. Client side and server side detection together.

    The problem isn’t the check itself usually, but rather latency. If you shoot a player on your screen you want immediate feedback (client side), instead of waiting for a roundtrip to the server until the blood spatters.

    There have been shooters where the server decides if a bullet lands. So on your screen you hit the player and then they suddenly survived. So most shooters switched to: If the client thinks it hit, it hit. Which does lead on the receiving end to running behind a wall and still dying. Overall it feels better than the alternative though.

    The whole topic is pretty much game networking, it’s a balance between doing it correctly (server side, slow) and faking to get it close enough (client side, immediate, easier to cheat, unfair if the player is laggy).

    Of course there are some server checks that are always easy: For example if a player teleports or moves around the map faster than possible? You can flag them for review or if it happens too often kick/ban them. As long as you’re super careful about automatic bans (bugs exist).