he/him

Nerd, programmer, writer. I like making things!

  • 22 Posts
  • 515 Comments
Joined 2 years ago
cake
Cake day: June 20th, 2023

help-circle

  • In python I put my base models in models/__init__.py. The bases have things for managing data behind the scenes, adding common utility methods, etc. If I’m using another library or method to serialize data I’d put it in a separate utility script somewhere, it’s probably going to be useful to more than just data models and it’s easy enough to import.

    Then each file that defines models has a from models import BaseModel or whatever else is needed, keeping each file relatively short and focused to what it needs to do.








  • Gamma@beehaw.orgtoProgramming@programming.devSoftware Fast-Food
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    27 days ago

    The thing is, most humans are laughably bad at architecting software without actually writing it first

    That quote is hilarious to me, I guess they haven’t stumbled upon design patterns yet? I don’t even know who this blog is supposed to be for, there’s no name attached so I’m half guessing it’s more AI slop







  • I agree with your points, except if the script ever needs maintaining by someone else’s they will curse you and if it gets much more complicated it can quickly become spaghetti. But I do have a fair number of bash scripts running on cron jobs, sometimes its simplicity is unbeatable!

    Personally though the language I reach for when I need a script is Python with the click library, it handles arguments and is really easy to work with. If you want to keep python deps down you can also use the sh module to run system commands like they’re regular python, pretty handy




  • Woohoo!! 💛 I’ve been curious, I know some of them didn’t make it until the new year. How’s it been? They recently asked devs if they wanted to test web request support so it’s exciting times!

    My partner and I got Baldurs Gate 3 and it has been a delight. We pass the ps5 controller so we each get an npc during combat and do splitscreen for the world. She’s a dragonborn paladin and I’m a tiefling warlock, we spent the weekend clearing out a dungeon of goblins!