• 0 Posts
  • 504 Comments
Joined 2 years ago
cake
Cake day: June 21st, 2023

help-circle

  • To me, it seems like this article is overemphasizing code duplication as problematic. If multiple types of searches use some of the same fields, it’s okay to just copy them to each search type that uses them. This also allows each search type to be independently updated later on to add additional fields or deprecate existing fields without affecting other search types.

    Fields that should always exist together should probably be moved to a struct containing those fields, if there’s some concept that encapsulates them. Paging fields, for example, that exist only on two of three variants can just live in their own struct, and those two variants can have fields of that type.

    Code duplication is only really problematic when all duplicates need to be updated together every time. That does not seem to be the case here.






  • The distribution is super important here too. Hashing any value to zero (or h(x) = 0) is valid, but a terrible distribution. The challenge is getting real-world values hashed in a mostly uniform distribution to avoid collisions where possible.

    Still, the contents of the article are useful even outside of hashing. It should just disclaim that the width of the output isn’t the only thing important in a hash function.




  • This would infuriate me to no end. It’s literally the definition of a data race. All data between threads needs to either be accessed through synchronization primitives (mutexes, atomic access, etc) or needs to be immutable. For the most part, this should include fds, though concurrent writes to stderr might be less of an issue (still a good idea to lock/buffer it and stdout though to avoid garbled output).


  • The main value I found from Copilot in vscode back when it first released was its ability to recognize and continue patterns in code (like in assets, or where you might have a bunch of similar but slightly different fields in a type that are all initialized mostly the same).

    I don’t use it anymore though because I found the suggestions to be annoying and distracting most of the time and got tired of hitting escape. It also got in the way of standard intellisense when all I needed was to fill in a method name. It took my focus away from thinking about the code because it would generate plausible looking lines of code and my thinking would get pulled in that direction as a result.

    With “agents” (whatever that term means these days), the article describes my feelings exactly. I spend the same amount of time verifying a solution as I would just creating the solution myself. The difference is I fully understand my own code, but I can’t reach that same understanding of generated code as fast because I didn’t think about writing it or how that code will solve my problem.

    Also, asking an LLM about the generated code is about as reliable as you’d expect on average, and I need it to be 100% reliable (or extremely close) if I’m going to use it to explain anything to me at all.

    Where I found these “agents” to be the most useful is expanding on documentation (markdown files and such). Create a first draft and ask it to clean it up. It still takes effort to review that it didn’t start BSing something, but as long as what it generates is small and it’s just editing an existing file, it’s usually not too bad.



  • Ah yes, one of the major questions of software development: to comment, or not to comment? This is almost as big of a question as tabs vs spaces at this point.

    Personally? I don’t really care. Make the code readable to whoever needs to be able to read it. If you’re working on a team, set the standard with your team. No answer is the universally correct one, nor is any answer going to be eternally the correct one.

    Regardless of whether code comments should or shouldn’t exist, I’m of the opinion that doc comments should exist for functions at the very minimum. Describe preconditions, postconditions, the expected parameters (and types if needed), etc. I hate seeing undocumented **kwargs in a function, and I’ll almost always block a PR on my team if I see one where the valid arguments there are not blatantly obvious from context.


  • another “Arch” charm

    My guess is white. We already have blue and green as far as I remember, leaving white, red, and black.

    card that makes you choose odd or even

    Reprint of Extinction Event?

    new artifact token called Munitions

    Combat trick token? I doubt it does direct damage, but a combat trick (like tap+sac for +1/+0 until end of turn) seems possible.

    card that lets you take control of an opponent

    Definitely an Eldrazi card. New Emrakul?

    card that grants an ability to Slivers

    So a Sliver.

    Edit since I got a chance to read the rest:

    “If it’s not a creature, it becomes a 0/0 Robot artifact creature.”

    New scissors card?

    “You may play lands from your graveyard.”

    Crucible of Worlds reprint would fit really well here.

    “Artifact cards and red cards in your hand have”

    … Warp X, where X is ??? I’m guessing.

    “X is the number of differently named lands you control.”

    Llurgoyf card probably, especially since it’s an elemental. Probably 2-3 mana?






  • I’d love to see WOTC take the hammer to standard. It’d make it more fun for me at least.

    I think my list is at minimum Monstrous Rage, Cori Steel-Cutter, Manifold Mouse, Stormchaser’s Talent. Following that:

    • Either Omniscience or one of its support cards. GY hate and control are more viable in a slower format though.
    • Either Callous Sell-Sword or Cacophony Scamp to reduce the consistency of the red fling deck, considering we’ll still have Turn Inside Out and some other support pieces. Remember, this was a pretty oppressive deck, and scamp rotates soon anyway. Sell-Sword does not rotate yet, so I can see them leaving it in.
    • Possibly Up the Beanstalk. I’m mixed on this because the deck loses support soon, but it also restricts design space.
    • Possibly Screaming Nemesis. I’m personally of the opinion that this single card negates the entire lifegain archetype and is largely unanswerable. I’m mixed on this though since I don’t think it’s too insane outside of that, just that it severely restricts what decks can exist in standard.

    Decks I think will rise are the bounce deck, hopefully a goblin deck for red (instead of the BS we have now), maybe jeskai prowess(?), jeskai control, dimir control, and some reanimator strategies that weren’t as viable before. Boros tokens coming back could be interesting too.