• 0 Posts
  • 26 Comments
Joined 2 years ago
cake
Cake day: July 1st, 2023

help-circle

  • Actually “natural” gets a pass from me. It doesn’t feel right just because we got used to the opposite.

    Imagine a paper scroll on rolls. If you slide the top of the roll upwards - the paper goes up, and you can see more bottom content. The exact opposite happens when you scroll the mouse wheel with default config.



  • I disagree (mostly). What’s the difference between library and language built-in? PHP and C++ has a ton of built-ins. It doesn’t make it less complex than using library.

    Problems that look simple at the first glance are in most cases are complex with too many edge cases.

    I think I have never written a single utility function that had no non-obvious bug, and imagine that in more complex problems

    Not to mention in many cases any function you write is possibly dangerous.

    Just take a look how many things you have to consider when checking for odd number in JS:

    https://www.npmjs.com/package/is-odd?activeTab=code

    And of course most of that can be fixed be using strongly typed language.





  • As a 1998 who had access to the internet during its wildest peak with no parental control at all (had internet since I was 10 years old), I do not agree with ANY parental control. Your kid is going to stumble upon these topics anyway, sooner or later, internet or real life.

    Instead of preventing it - monitor it, and make sure you discuss it with them. Some years from now on, you will lose whole control over them, and then they won’t be easily persuaded.

    Censorship creates people that are easily manipulated - no matter what your intentions are.




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







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