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

  • 8 Posts
  • 1.35K Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle

  • How would this be enforceable, though? Part of the benefit of the Fediverse is that multiple different apps can communicate with each other (for example, you can see Lemmy posts on Mastodon). Even if Lemmy implements something like this, what’s to stop someone from commenting using a different app that doesn’t implement it?

    I’m actually surprised we don’t see more spam on ActivityPub-powered systems, since spammers don’t even need to have an account with Lemmy, Mastodon, etc and could instead have their own ActivityPub server to send the spam. I guess they don’t do that since the spam instance would be defederated pretty quickly.












  • I took down the home page of one of the top 5 websites for around 5 minutes.

    There were two existing functions that were written by a different team: An encode method that took a name of something (only used internally, never shown to the user) and returned a numeric identifier for it, and a decode method that did the opposite.

    Some existing code already used encode, but I had to use decode in my new code. Added the code, rolled it out to 80% of employees, and it seemed to work fine. Next day, I rolled it out to 5% public and it still seemed okay.

    Once I rolled it out to everyone, it all broke.

    Turns out that while the encode function used a static map built at build-time (and was thus just an O(1) lookup at runtime), decode connected to a database that was only ever designed for internal use. The DB only had ten replicas, which was nowhere near enough to handle hundreds of thousands of concurrent users.

    Luckily, it’s commonplace to use feature flags changes, which is how I could roll it out just to employees initially. The devops team were able to find stack traces of the error from the prod logs, find my code, find the commit that added it, find the name of the killswitch, and disable my code, before I even noticed that there was a problem. No code rollback needed.

    That was probably 7 years ago now. Thankfully I haven’t made any mistakes as large as that one again!

    Always use feature flags for major changes, especially if they’re risky!



  • I still don’t think that I’ve ever seen a 4k image or video

    Have you not watched a recent movie? Modern midrange to high-end TVs have been 4K for a while (eg my 2019 LG OLED is 4K) and it’s pretty common for movies to be released on 4K Blu-ray.

    Good 4K looks great. Not the low-bitrate streams from services like Netflix, but the 60Mbps+ streams from Blu-ray remuxes (for example, via Real Debrid or downloaded via usenet) or from Blu-ray disks themselves.

    You’ve definitely seen a 4K image. It’s equivalent to 8.3 megapixels, and good cameras have supported at least that resolution for a long time. Even the nearly 15-year-old Samsung Galaxy S2 had an 8MP camera.