• 13 Posts
  • 11 Comments
Joined 3 months ago
cake
Cake day: September 29th, 2024

help-circle


  • this is a big ol’ “it depends”

    if it’s a hobby project, then by all means rewrite it if you want to.

    if it’s a commercial project of some kind - there’s a business that’s making money, and part of the business making money relies on this code working properly - then rewrites are almost always a bad idea.

    read Things You Should Never Do, Part I, an almost 25-year-old blog post (man, that’s a weird sentence to write) about why giant rewrites in a commercial setting are a bad idea.

    in general, people greatly underestimate how much work is involved in a rewrite. it feels like it should be simpler to start from a blank slate, and tell yourself you’re going to avoid all the mistakes that you hate with the existing codebase. maybe you’re writing it in a new language, or at least a newer dialect/version of the same language.

    if the current codebase is a mess…how did it get that way? lack of engineering discipline? a “just make it work now, we can go back and tidy it up later” attitude towards accumulation of tech debt? if those same attitudes are present on the team doing the rewrite, you’re going to end up right back where you started after the rewrite is “done”.

    the main things you need for refactoring to be successful is a) tests, and b) a plan.

    the tests allow you to refactor with the confidence that if you break something, the tests will point it out for you. trying to refactor something that lacks tests is the worst place to be in, because you’ll want to add tests, and often adding tests requires refactoring the code to be more testable, placing you in a catch-22.

    the plan allows you to make those refactoring changes gradually, over time, while still maintaining the system. in the context of a business that’s paying developers to do this work, the businesspeople tend to look poorly on an engineer coming to them and saying “we’re gonna spend the next year or two doing a big rewrite, so in the meantime you can’t ask us for any new features or bugfixes to the existing system. but once it’s done the new system will be really cool, trust me.”

    successful refactoring is a Ship of Thesus - you can replace the entire thing, but you have to do it one component at a time.


  • putting this in the context of other committee fights the Democrats have been having:

    77-year-old Jerry Nadler was the top Democrat on the House Judiciary Committee (which also plays a crucial oversight role)

    Nadler’s leadership was successfully challenged by 62-year-old Jamie Raskin.

    so Democrats’ version of “younger blood” was to replace a baby boomer (born 1947) with…a slightly younger baby boomer (born 1962, which depending on where you draw the line is the last of the baby boom, or the very beginning of Gen X)

    Raskin had previously been the top Democrat on House Oversight, so that spot became vacant.

    Alexandria Ocasio-Cortez ran for that leadership position on House Oversight. she’s 35 years old, has an excellent media presence, and is well-known nationally.

    instead of AOC, Democrats chose a 74-year old, Gerry Connolly.

    and not just any 74-year old…they chose a 74-year-old who has cancer

    and not just any 74-year old with cancer…a 74-year-old who has an especially deadly form of cancer

    and not just any 74-year old with an especially deadly form of cancer…esophageal cancer. cancer of the esophagus. you know, that thing that’s in your throat. you know what else is in your throat, right next to your esophagus? your voice box. that thing you speak with.

    Democrats in a nutshell: the guy we put in charge of oversight of the Trump administration…there’s a good chance he’s going to have surgery that renders him physically incapable of speaking.



  • the most plausible explanation I’ve seen so far - credit to this post (from one of the hosts of the 5-4 podcast) where I saw it first:

    my suspicion is that Kamala is floating a CA governor run or 2028 run not because she thinks she has a chance but because it will help convince wealthy donors that it’s still worth buying influence with her and thus help her fundraise to pay off her campaign’s debts

    but also Kamala ending up as the nominee wouldn’t surprise me. if it’s not her, there’ll be a different “establishment” Democratic candidate that the DNC puts their thumb on the scale for. 2028 seems likely to be yet another “this is the most important election of our lives, it’s crucial to the future of the country that you vote for whichever Democrat we tell you to vote for, now shut the fuck up and stop complaining”.




  • when people say “echo chamber” with negative connotations, what they actually mean is “a place that has a consensus reality, and I disagree with that consensus reality”.

    a forum for geologists bans flat-earthers. the flat-earthers will call it an “echo chamber”. they’ll ask why the geologists are so afraid to have their beliefs questioned. if they’re so sure the earth is round, shouldn’t they be willing to debate it?

    having a consensus reality is good, actually. and enforcement of that consensus is usually necessary to maintain the health of the community. geologists want to talk about…actual geology stuff. if flat-earthers are allowed, they’ll turn every thread into a debate about flat vs. round earth, and it will drown out the actual more interesting conversations the geologists were there for.

    when someone says “such-and-such is an echo chamber” you should look to see what the consensus reality of that place is, and what aspects of that consensus reality the complainer disagrees with.

    recently, I’ve seen a lot of people calling Bluesky an echo chamber, for example. if you dig into it…usually they posted some transphobic bullshit and got blocked by half the site. Bluesky isn’t perfect, but one thing they’ve gotten right so far is “trans people exist, and have the right to exist, and to live their lives free of harassment” is a pretty strong part of their consensus reality. people who disagree with that are inevitably going to run back to Twitter and whine about Bluesky being an echo chamber.


  • the primary source of this is annoyingly hard to track down for legislation that passed Congress and was signed by the President.

    it turns out that’s because it was part of H.R.815 - “Making emergency supplemental appropriations for the fiscal year ending September 30, 2024, and for other purposes.”

    if you want to read the actual text of the law, this PDF starting on page 61.

    the gist is that it’s illegal to:

    Providing services to distribute, maintain, or update such foreign adversary controlled application (including any source code of such application) by means of a marketplace (including an online mobile application store) through which users within the land or maritime borders of the United States may access, maintain, or update such application.

    everyone calls this a “ban on TikTok” and it kinda annoys the shit out of me, because as far as I can tell, the website tiktok.com is probably still going to be available in the US.

    what this law actually does is require Google and Apple to remove TikTok from their app stores, for US-based users. and makes them subject to a fine of $5000 per user if they don’t comply.

    I’m generally in favor of more regulation of tech companies…but this is a really fucking stupid way to do it.




  • you read a post about how awesome C is, asking why more people don’t use it and instead gravitate towards replacements.

    you ctrl-F for “security” - no mention

    “buffer overflow” - nope

    “memory safety” - nothing

    “undefined behavior” - nada

    this is sort of a reverse Chesterton’s Fence situation. the fence is getting replaced, and you’re talking about how great the old fence was, without understanding any of the actual problems it had.

    you wrote some C and found it simple? OK, great, congratulations.

    go work on a C codebase that spans 100 or more engineers all contributing to it.

    go write some C code that listens on a TCP socket and has to deserialize potentially-malicious data received from the public internet.

    go write some C code that will be used on an aircraft and has to comply with DO-178C.

    and so on. after you’ve done that, come back here and tell us if you still think it’s “simple and effective” and “applicable everywhere”.

    there is a reason C has stood the test of time over many decades. but there is also a reason it is being replaced with more modern languages.




  • here in Seattle: the at-large City Council seat (district 8) between Tanya Woo and Alexis Mercedes-Rinck

    Woo ran for a different city council seat a year ago, and lost. in the same election, a sitting city councilmember (Teresa Mosqueda) won an election to the King County Council, so she resigned her city council seat. to fill that vacant seat, the other newly-elected city councilmembers appointed Woo, even though she had just lost.

    by the rules of the resignation and temporary appointment, the next regular election (now) elects a permanent replacement.

    this leads to an unusual scenario - normally, Seattle (and all of Washington state) holds its municipal elections in odd years. the current mayor was elected in 2021, the most recent city council election was 2023. this leads predictably to much lower turnout for the municipal elections, which leads in turn to conservative business interests having an easier time buying the local elections.

    Woo is aligned with the “business-friendly”, conservative (by Seattle standards) councilmembers who were elected in 2023. Mercedes-Rinck is significantly more progressive.

    based on the primary results and subsequent polls, Woo winning seems pretty unlikely - but the margin of Mercedes-Rinck’s victory will still be interesting, because of what it says about Seattle politics in elections with high turnout. voter turnout in the 2023 elections was a dismal 36%. this year is likely to be in the ~80% range.

    it’s also an opportunity for something very funny to happen - Tanya Woo may set a record that will likely never be broken, becoming the first candidate in city history to lose 2 elections in consecutive 2 years, for a seat that normally gets elected every 4 years.







  • hello Cleveland Beehaw! happy to be joining this pleasant little corner of the internet.

    good news: I’m in the process of buying a house, after renting my whole life up to now. got lucky that the first home I toured in-person (after viewing probably 100+ homes on Zillow) I liked enough to put in an offer, and had the offer accepted. now I’m just going through inspection and mortgage approval crap.

    bad news: I broke my big toe. not broken broken, apparently just a tiny chunk of bone flaked off where the ligament is attached. I put off going to the doctor about it, because I woke up with my toe swollen and painful, Dr. Google suggested that it was probably gout, and I didn’t want to bother with a doctor visit if it was just going to be a lecture about eating healthier. so I hobbled around on a broken toe for almost 2 weeks before going in for X-rays and getting told it was broken. now I’m crossing my fingers that it’ll heal up on its own in the Fancy Medical Shoe they gave me, and I won’t have to have surgery on it. and it’s a good reminder that sometimes I need to push past my ADHD and medical anxiety and go to the doctor anyway.


  • it might be more complicated than you’re looking for (requires a self-hosted server instead of just a desktop app), but take a look at the ecosystem surrounding Subsonic

    Subsonic did some licensing shenanigans, but there’s an actively-maintained GPL3 fork called airsonic-advanced

    there’s also alternate implementations, Gonic and Navidrome, that maintain compatibility with the original Subsonic API

    because they all work with a common API, there’s a variety of clients that can work with the backend.

    I’m also a big fan of Beets for music organization, it’s not tied in to the Subsonic ecosystem so you can use them completely separately if you want. it handles tagging, can fetch lyrics, and can also transcode the library (or an arbitrary subset of it) if you want to send it to a portable device. (not sure if this is what you mean by compatibility)

    I currently have Beets organizing everything, run Navidrome on my server pointed at the Beets library directory, then Ultrasonic on my phone, and the Navidrome web interface on my desktop. the combo is especially nice for streaming to my phone - Navidrome will transcode FLAC to Opus on the fly, and Ultrasonic has an option to cache those files locally, and to pre-download them over wifi instead of mobile data. so I have my full collection available on my phone, can stream it from anywhere, and the songs I listen to frequently are already downloaded and I don’t have to waste mobile data, or wait for them to load if I have poor cell signal.