• 0 Posts
  • 1.63K Comments
Joined 3 years ago
cake
Cake day: June 21st, 2023

help-circle



  • Can’t speak for Git, but caching responses is a common enough problem that it’s built into the standard HTTP headers.

    As for building a cache, you’d want to know a few things:

    • What is a cache entry? In your case, seems to be an API response.
    • How long do cache entries live? Do they live for a fixed time (TTL cache)? Do you have a max number of cached entries before you evict entries to make space? How do you determine which entries to evict if so?
    • What will store the cache entries? It seems like you chose Git, but I don’t see any reason you couldn’t start simple just by using the filesystem (and depending on the complexity, optionally a SQL DB).

    You seem locked into using Git, and if that’s the case, you still need to consider the second point there. Do you plan to evict cache entries? Git repos can grow unbounded in size, and it doesn’t give you many options for determining what entries to keep.








  • This has always been an issue. From my experience, the best way to get in was through internships, co-ops, and other kinds of programs. Those tend to have lower requirements and count as experience.

    Of course, today, things are a lot different. It’s a lot more competitive, and people don’t care anymore about actual software dev skills, just who can churn out SLOC the fastest.



  • If the version ranges for those dependencies which depend on vulnerable versions of packages cover the fixed versions as well, then just updating your Cargo.lock dependencies should pull the fixed versions. You can do this with cargo update.

    If the ranges don’t cover the fixes, you have a couple options:

    • If the vulnerability doesn’t affect you, do nothing.
    • If it does affect you, you can patch the dependencies to a local version or one in a git branch.

    If you choose to patch the dependency, the version of the patched package still needs to be compatible with what your dependencies are requesting. If foo v2.1.1 depends on bar = "3", then it can’t use a patched bar v4.1.2 for example, but can use bar v3.3.4. You may need to backport a fix to an earlier version of a package in some cases. You can do that locally and use a path specifier in your patch for that.

    In most cases, the vulnerability probably won’t affect you. You should check to make sure though on a case-by-case basis.



  • To put some perspective into what our code looks like, there are very few tests (which may or may not pass), no formatter or linter for most of the code, no pipelines to block PRs, no gates whatsoever on PRs, and the code is somewhat typed sometimes (the Python, anyway). Our infrastructure was created ad-hoc, it’s not reproducible, there’s only one environment shared between dev and prod, etc.

    I’ve been in multiple meetings with coworkers and my manager talking about how it is embarassing that this is what we’re shipping. For context, I haven’t been on this project for very long, but multiple projects we’re working on are like this.

    Two years ago, this would have been unacceptable. Our team has worked on and shipped products used by millions of people. Today the management is just chasing the hype, and we can barely get one customer to stay with us.

    The issue lies with the priorities from the top down. They want new stuff. They don’t care if it works, how maintainable it is, or even what the cost is. All they care about is “AI this” and “look at our velocity” and so on. Nobody cares if they’re shipping something that works, or even shipping the right thing.



  • To add to the other comment, in general, you do as much as possible when resolving a card or effect.

    The only exception is if something targets (specifically only with the word “target”) and either there are no valid targets when it would go on the stack (in which case it cannot be cast/triggered/activated), or the targets all become invalid when it’s time to resolve it (in which case you do nothing at all and just remove it from the stack).

    So to answer your question, you reveal cards until you reveal a saga (which means you reveal every card in your library), then shuffle those cards back into your library.