• 0 Posts
  • 30 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle




  • gornius@lemmy.worldto196@lemmy.blahaj.zonerule
    link
    fedilink
    arrow-up
    32
    ·
    11 months ago

    Java used to lack many features to make the stuff you wanted it to do, so most Java programmers adapted design patterns to solve these problems.

    Honestly, older versions of Java are utter garbage DX. The only reason it got so popular was because of aggressive enterprise marketing and it worked. How can a language lack such an essential feature as default parameters?

    So, anyway after the great hype Java lost its marketshare, and developers were forced to learn another technologies. And of course, instead of looking for language-native way of solving problems, they just used same design patterns.

    And thus MoveAdapterStrategyFactoryFactories were in places where simple lambda function would do the same thing, just not abstracted away three layers above. Obviously used once in the entire codebase.

    Imo the only really good thing about Java was JVM, while it was not perfect, it actually delivered what it promised.






  • gornius@lemmy.worldto196@lemmy.blahaj.zoneraytracing rule
    link
    fedilink
    arrow-up
    18
    ·
    edit-2
    11 months ago

    I might be wrong, but even for games like Cyberpunk 2077 there is a finite set of world states that define lighting conditions (time of day weather etc.).

    So prebaking lighting information for all these combinations and then figuring out a way to create transitions between them would maybe not be the perfect representation, but best of both worlds.

    However, given how fast RayTracing improves hardware-wise, in my opinion it would make no sense to even consider researching and developing a solution of that kind.



  • The main argument to use password managers to prevent password leaks to all of your services (that you use with the same login/email). You can’t trust any service to store your password securely, therefore you should use different ones everywhere.

    Using a password manager gives you the convenience of using one, strong password that’s being used very securely, and mitigating risk of password leaks spreading further.

    If you abstract it that way, it by no means eliminates the risk of someone breaking into your database, but makes it harder and from a single entry point, instead of any service that uses your password.

    Plus many of those password managers give you an option to use YubiKey for additional security.

    Oh and also you won’t ever need to press “forgot password” ever again due to the arbitrary requirements that your password doesn’t pass, so you modify it slightly so it would.




  • Ok, if I remember correctly, YouTube barely generates, but generates nonetheless revenue for Google. There are many ways to make more money without fucking over its users by cutting costs:

    • downgrade old videos with small watch count to 720p30

    • make people pay for hosting >1080p60 content

    • do not allow private/unlisted videos

    • straight up remove 10h looped videos - they take so much space, but are technically spam - both for bandwidth and storage

    And my go-to solution: focus on sponsorships as main source of revenue. They are the only ads I can tolerate and are actually effective from my experience. YouTube can just take a cut from every sponsorship on YouTube video and everyone will be happy.






  • The thing is, they look like too much for a simple app with near none interactive elements.

    But once app starts growing, concepts like reusable components, reactivity and state management become such an important tool.

    Imagine tracking shopping cart’s total value. With these frameworks it’s just one store containing total value, exposing the value as reactive state. Once the value changes, all components using directly or indirectly that value update immediately. In vanilla you would have to keep track of every instance where that value is used manually.

    Additionally, if you decide keeping total value of cart in frontend is stupid (because it is), you just modify your store to provide only readonly value, and create setters that require you to pass item or item id. Then that setter would hit up backend keeping your cart’s total value, add an item, and backend would return new total, which would now be set as that store’s new total value.

    These frameworks are kind of SOLID principles applied to chaotic world of user interfaces.