Aussie living in the San Francisco Bay Area.
Coding since 1998.
.NET Foundation member. C# fan
https://d.sb/
Mastodon: @dan@d.sb

  • 0 Posts
  • 354 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle

  • Would a git hook block you from committing it locally, or would it just run on the server side?

    I’m not sure how our one at work is implemented, but we can actually commit @nocommit files in our local repo, and push them into the code review system. We just can’t merge any changes that contain it.

    It’s used for common workflows like creating new database entities. During development, the ORM system creates a dev database on a test DB cluster and automatically points the code for the new table to it, with a @nocommit comment above it. When the code is approved, the new schema is pushed to prod and the code is updated to point to the real DB.

    Also, the codebase is way too large for something like ripgrep to search the whole codebase in a reasonable time, which is why it only searches the commit diffs themselves.




  • At my workplace, we use the string @nocommit to designate code that shouldn’t be checked in. Usually in a comment:

    // @nocommit temporary for testing
    apiKey = 'blah';
    // apiKey = getKeyFromKeychain(); 
    

    but it can be anywhere in the file.

    There’s a lint rule that looks for @nocommit in all modified files. It shows a lint error in dev and in our code review / build system, and commits that contain @nocommit anywhere are completely blocked from being merged.

    (the code in the lint rule does something like "@no"+"commit" to avoid triggering itself)









  • dan@upvote.autoProgrammer Humor@programming.devPlease stop
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    15 days ago

    it’s not “stable”

    “stable” in this case means that it doesn’t change often. Debian stable is called that because no major version changes are performed during the entire cycle of a release.

    It doesn’t mean “stable” as in “never crashes”, although Debian is good at that too.

    Arch is definitely not “stable” using that definition!



  • I’ve seen many a terrible containerized monolithic app.

    I’ve seen plenty of self-hosters complain when an app needs multiple containers, to the point where people make unofficial containers containing everything. I used to get downvoted a LOT on Reddit when I commented saying that separating individual systems/daemons into separate containers is the best practice with Docker.



  • Are there better alternatives for newbs who just wanna self host stuff?

    Docker is great for a beginner, and even for an expert too. I’ve been self-hosting for 20 years and love Docker.

    Back in “the old days”, we’d use Linux-VServer to containerize stuff. It was a bit like LXC is today. You get a container that shares the same kernel, and have to install an OS inside it. The Docker approach of having an immutable container and all data stored in separate volumes was a game changer. It makes upgrades so much simpler since it can just throw away the container and build a new one.

    The main alternative to Docker is Podman. Podman uses the same images/containers as Docker - technically they’re “OCI containers” and both Docker and Podman implement the OCI spec.

    Podman’s architecture is different. The main difference with Podman is that it never runs as root, so it’s better for security. With Docker, you can either run it as root or in rootless mode, but the default is running it as root.


  • You can use WebAssembly today, but you still need some JS interop for a bunch of browser features (like DOM manipulation). Your core logic can be in WebAssembly though. C# has Blazor, and I wouldn’t be surprised if there’s some Rust WebAssembly projects. I seem to recall that there’s a reimplementation of Flash player that’s built in Rust and compiles to WebAssembly.