• 8 Posts
  • 40 Comments
Joined 11 months ago
cake
Cake day: October 14th, 2023

help-circle
  • I wonder what kind of support for development do you get? Honestly I’ve only had obstacles when I switched, for example the docker installation was much more complicated on linux than on windows+wsl. Even installing python was problematic because apparently ‘upgrading it yourself can brick the system’, at least if an older version comes with the OS?

    And lastly it’s the simple thing that pretty much all tools work on windows natively but on linux you have to find workarounds, which is definitely a problem when it comes to productivity.

    So what are the benefits, what does linux have that windows doesn’t in this context?









  • Additional question - I said at first that the “Service” should be doing the mandatory checks like uniqueness validation or whether the fields are filled in properly with good values, but is even that a good approach?

    Instead of implementing this in every service that might create a new Movie (and it could be from different sources - import from file, different APIs, background worker, etc), wouldn’t it make more sense to add these checks to the repository itself so they always gets called?

    Alternatively, do we have to handle a constraint violation in every service or could we just have the repository return a result with failure if it happens?

    In short, once I start thinking in this way I start to wonder why even have a separation between repository and service.







  • A bit late to this thread but what helped me a lot was when I started doing TDD. By testing my code against tests before its fully done or even implemented in the main app codebase (so to speak), I could break down individual tasks in it more easily and see how its interior parts work. It seemed easier to separate it into SRP areas since they’d have to stick to the unit test for that responsibility. Do keep in mind you can take it too far and overengineer it in this way but it was a good kick in the butt to get me to think in a different way.



  • In the context of this small app im writing category is unique by name already so I can just use that if I wanted to go the string route, but agreed - yours is probably the standard way, youtube/reddit do it like that after all.

    I’m still wondering about the technical implementation of it - where would you generate the string? Manually in backend before each save, probably using a locking mechanism to prevent accidentally creating 2 identical IDs at the same time? I’d have to do a db hit to make sure it doesn’t exist already every time, right? Maybe I just try to insert and see if it crashes due to the uniqueness index? Maybe I use a store procedure in the database to get a unique ID? Do I just hash the timestamp or sth like that?

    Whether I generate a number or a string, feels like I always open it up to many issues.






  • You can kinda see this in things like modding communities or anything piracy related too. Users just want easy solutions even if it’s at the expense of creators, and creators are doing it more and more for money rather than any personal drive or satisfaction. I can’t believe we’ve reached a point where even mods are being locked behind paywalls, need to be commissioned or sometimes have entire teams funded by patreon to work on them, it’s just another business nowadays.