• 0 Posts
  • 150 Comments
Joined 3 years ago
cake
Cake day: August 4th, 2023

help-circle
  • Is this position against lookup or read-only db tables?

    Largely, yes.

    The kind of cases where I’ve seen people stick things in the database that I thought would better be elsewhere:

    • If it’s small and doesn’t need to change between releases, you can save all the moving-part kind of overhead of pulling that data from the database just by throwing that data in the source code. Often times people do this just so they can have a “foreign key” to something in the data in question. But a nice, semantic “enum” sort of field in the database can refer to something static that’s already in memory no problem.
    • If it needs to change at an administrator’s or developer’s (or manager’s) whim, it’s probably configuration, not dynamic data. In the Java ecosystem, Spring Cloud Config makes it easy to change configuration without releasing the code. (I mean, in a perfect world, releasing should be as easy and straightforward as changing configuration, but not everyone lives in a company where all the managers have read The Phoenix Project and caught the DevOps bug.) Putting configuration in the database tends to create a big audit trail gap, unless you spend a bunch of effort building a custom audit trail kind of system.
    • If it’s big and not (very?) relational, it may be better suited for files in a directory. This can be true even if it does change based on user input. (Users uploading images, for instance.)

    Mind you, certain kinds of behind-the-scenes users can still qualify as “users” for purposes of considering whether “it needs to change based on user input”. For instance, if your marketing department (without software engineering expertise) needs to be able to mess around (without software engineering assistance) with marketing materials displayed on customer-facing websites, you probably need a content-management system of some sort, and I don’t think the database is necessarily a bad place to store a lot of that information. (Things like images probably shouldn’t go in the database, but metadata about those images are probably quite reasonable data for the database.)

    Also, I’m rethinking the term “user input”. I could certainly see it being reasonable for automated systems to put data in the database. Like, if you have a scraper doing stuff to be displayed to end users, that doesn’t belong in the source code or configuration, and if it’s very relatioal, it could well belong in the database. Maybe it’d be better to say “if it doesn’t change based on client input, it doesn’t belong in the database.”






  • For real. Some guy I knew introduced me to SuSE back when I was in highschool. It was great and all, but it made things easy by hiding details behind snappy GUIs. While I was in college, I started to realize I wasn’t learning anything about Linux. So I took a deep breath and installed Gentoo. Switched to Arch for a while, but I’m back to Gentoo now. I wanted to learn more about how Linux really worked and holy shit did I get my wish.


  • Huh! That’s wild. How have I never heard of this?

    I’ve frankensteined distros before, but without the help of Bedrock. An employer asked what OS I’d like on my work laptop and I asked for a Linux system, but of course they didn’t offer me my choice of distro or anything. It came with KDE Neon. I wanted to run Artix and I wasn’t going to let UEFI Secure Boot stop me even if the PC Support department wouldn’t share the BIOS password. Now, KDE Neon uses the Ubuntu kernel, and it booted on the laptop in question, so I knew the secure boot trusted the signature on the official Ubuntu kernel. But Artix uses the Arch kernel which isn’t signed at all, so the laptop wouldn’t boot that. So I made a PKGBUILD that would download the Ubuntu kernel .deb file from the official Ubuntu repository, unzip the .deb file, and build an Arch/Artix package containing the kernel image and initramfs and CPU microcode and such. The result was a system that was entirely Artix except that it used the Ubuntu kernel. Worked perfectly. I’m sure the folks at PC Support were confused when an Artix box showed up on their Nessus asset management software.




  • OpenAI and Anthropic and Alphabet etc try their best to preventing it from doing so, so the act of getting it to do so anyway is “jailbreaking”, but yes. LLMs can reproduce works it was trained on. (At least chunk-by-chunk each limited to the token limit.) And I’d imagine the same is true of things like Stable Diffusion, though it might be much easier to get Stable Diffusion to produce something similar enough to qualify as a “derivative work” than it would be to get it to produce exactly the original.




  • TootSweet@lemmy.worldtolinuxmemes@lemmy.world•True story.
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 months ago

    Python rebuilds don’t cause (noticeable) problems for AMD64 Arch Linux.

    And any time anyone offers any kind of help on the Arch Linux Arm forums to try to help resolve the issue, the admins ignore and/or lock the thread. They’re not open to help and the people on the forums are super frustrated about it.






  • TootSweet@lemmy.worldtoProgrammer Humor@programming.dev•: (
    link
    fedilink
    English
    arrow-up
    62
    arrow-down
    2
    ·
    6 months ago
    create table boolean (
      id integer primary key,
      name text not null unique
    )
    insert into boolean (name) values ('true');
    insert into boolean (name) values ('false');
    create table document (
      id integer primary key,
      name text not null unique,
      body text not null,
      is_archived not null integer,
      foreign key (is_archived) references boolean (id)
        on delete cascade
        on update no action
    );
    

    Solved.

    Bonus: DBAs hate this one weird trick that can free up incredible amounts of disk space by deleting just two rows.