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

help-circle





  • If you’re lucky enough to successfully create an account on Oracle Cloud, you can also try Oracle Cloud Free Tier. You can have free ARM64 x4 CPU and 24 GiB RAM totally free of charge. There might be problems with availability during VM registration, but there are scripts that automate spamming for checking every 80 seconds.

    I’ve been using it for 2 years and it’s great. However be aware that your VM might get erased if you have a free account. That too can be remedied if you update to a premium subscription (You still get Free Tier resources without a charge). Nobody has reported an erased VM on a premium plan yet.

    Still, I am pretty sure they can erase it if you do illegal stuff with it. I’ve been using it only to host Minecraft Server, as well as other services using Docker. So far so good.







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





  • gornius@lemmy.worldtoProgrammer Humor@programming.devGolang be like
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    11 months ago

    It is better than in most languages with exceptions, except from languages like Java, that require you to declare that certain method throws certain error.

    It’s more tedious in Go, but at the end of the day it’s the same thing.

    When I use someone else’s code I want to be sure if that thing can throw an error so I can decide what to do with it.




  • Have you even made a production grade front end project?

    You can’t use “pure” HTML solutions because every browser can display these differently. You have to use CSS to make a website look and behave modern. “Pure” center tag is clunky and doesn’t work everywhere and that’s “by design” (That behavior is defined in specification, and we can’t change specification to meet today’s standards because that would make it non backwards compatible). Additionaly you need to make your website scale to wide range of devices. And sometimes you need to even add JS to fix some of the issues if you don’t want the developer to implement a non-maintainable solution taking him 5 hours, if he could do that in JS in 5 minutes.

    Look CSS is not perfect. It’s hacky solution to a problem, but news flash: most software engineering is. And it’s proved to be working.

    “But what if in the future…” - address future problems in the future. As soon as they appear - not before or after that.

    That’s the stupidest thing I’ve read today. I hope you’re not any kind of engineer. There are some situations where it might not be worth it to future-proof something, but if you apply that to everything you end up needing a full rewrite instead of just adding a feature.


  • gornius@lemmy.worldtoMildly Infuriating@lemmy.worldThanks Spez!
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    To add to an answer, caddy is better fit for reverse proxy in my opinion. It’s like easier to configure version of nginx. With nginx proxy_pass you also have to configure other headers like x_forwarded_to, and you will also need to do some magic to get websockets working.

    And also caddy automatically generates certs using ACME, by default.