I write bugs and sometimes features! I’m also @CoderKat@kbin.social.

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

help-circle
  • There’s a lot of common patterns, but you have to understand how URLs work. You have to recognize which URL parameters are tracking ones or even just might be tracking. And that means you have to know how they work and that takes a moment.

    In brief, URL parameters start after a ? in the URL and are formatted like key1=values&key2=value2. You can’t usually remove all parameters because not all are tracking. To further complicate things, URLs can also have an anchor starting with a # character which will be after the URL parameters. You often don’t want to remove that (though theoretically the anchor could in fact contain tracking details).

    It’s often trial and error to see which parameters you can remove. I do this a lot since I write a lot of technical documentation. Clean URLs make the documentation more compact and less likely to break. It’s not just tracking stuff, but sometimes you need to remove temporal data that makes a page display data from a specific time when you want it to just default to the current time (etc).


  • CoderKat@lemm.eetoProgrammer Humor@programming.devGolang be like
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 year ago

    Let’s not pretend people acknowledge warnings, though. It’s a popular meme that projects will have hundreds of warnings and that devs will ignore them all.

    There’s a perfectly valid use case for opinionated languages that don’t let you get away with that. It’s also similar to how go has gofmt to enforce a consistent formatting.

    Honestly, I’ve been using Go for years and this unused variable error rarely comes up. When it does, it’s trivial to resolve. But the error has saved me from bugs more often than it has wasted my time. Most commonly when you declare a new variable in a narrower scope when you intended to assign to the variable of the same name (since Go has separate declare vs assign operators).