Post B6ySviEM8csu3Ev3oW by algernon@come-from.mad-scientist.club
 (DIR) More posts by algernon@come-from.mad-scientist.club
 (DIR) Post #B6yPvT5a8NqBED0VVo by algernon@come-from.mad-scientist.club
       0 likes, 0 repeats
       
       Since I chose violence today, lets do some public violence then, because sometimes that's necessary to bring about change for the better. To serve as a cautionary tale.There's this blog post titled The Bloat, which goes on to explain that the author has a hairy, legacy codebase, 750(!) lines of Python in one file, and... they're never going to fix that. They lamented that they may set one of their agents on it, but they do know that AI can write code that is too complex for an AI to understand.Good job mate! That's the only kind of code an AI can "write", because it has no understanding whatsover.They showed a screenshot of "code of highest quality". It went something like this:if "description" in song:  payload["description"] = song["description"]if "generatorType" in song:  payload["generatorType"] = song["generatorType"]...and so on. And this is what they can't trivially refactor in like 5 minutes?for key in ["description", "generatorType", ...]:  if key in song:    payload[key] = song[key]Fuckin' done. Hundreds of lines collapsed into... three + formatting the bigass key array I guess. You can do this with a single regexp, nothing fancier than that.Need some mapping? Use tuples:for (payloadKey, songKey) in [("desc", "description"), ...]:  if songKey in song:    payload[payloadKey] = song[songKey]Boom. I pretty much cut down your validation.py in half in ~30 seconds.You don't need an LLM for this. You don't need AI for this. You don't need anything complicated for this. You merely user your brain instead of tokens. But I guess that's something one stops doing when exposed to much to these "AI" things. A shame, really.
       
 (DIR) Post #B6yPvUFBq97WoIVh7w by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @algernon what the fuckhow does one not know that?Like, I can understand not knowing that at the age of 15how does one not know that after 15 years of programming?
       
 (DIR) Post #B6yQWNenIFUr5z4w3E by algernon@come-from.mad-scientist.club
       0 likes, 0 repeats
       
       @wolf480pl "Please insert token to continue". "Please insert token to continue". "Please insert token to continue".This is what happens when one outsources their brain.
       
 (DIR) Post #B6yQWPqDAlolryR57o by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @algernon reading the blogpost> Code of the highest qualitythat's gotta be sarcasm> An attempt at a half-baked re-invention of JSON serialization, featuring beautiful gems as if value is True: return "true".this is typical 12yo mistake that makes you cringe and if there's hundreds of lines of code like that I'm not surprised the author doesn't want to touch itLike, I think the problem isn't that the code is difficult to refactor. It's that it's emotionally draining.
       
 (DIR) Post #B6yQjuoNKwgDgf0vy4 by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @algernon The code is so insulting that it takes an enormous amount of willpower to look at, let alone start cleaning it up.I'm guessing if the author of that blogpost started cleaning it up, it'd be downhill from there. But the activation energy is very high.> When will I ever get to fix this? And the answer is: Never.These words are not a sign of stupidity or lack of skill.They're a sign of burnout.
       
 (DIR) Post #B6yQwu7hCvS3JhFELQ by algernon@come-from.mad-scientist.club
       0 likes, 0 repeats
       
       @wolf480pl Yes, it is sarcasm. And yes, legacy code can be emotionally draining to fix. I'll happily accept they don't want to.But then, doing the same with "AI" gotta be emotionally (and financially!) draining, since they're gonna review the results, no?In any case, it clearly bothers them enough to write a blog post about it. Could've spent a tenth of the time cleaning up the if into a for loop, and they'd have a much less emotionally draining codebase. A quick win to start! Leave the rest for later (or never)!
       
 (DIR) Post #B6yQwwKB1Uci8z6E4m by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @algernon > since they're gonna review the results, no?If I understood correctly, this is the only time they looked, usually they don't.> Could've spent a tenth of the time cleaning up the if into a for loop, and they'd have a much less emotionally draining codebase. A quick win to start!I think you have tools for dealing with insufficient dopamine levels that most of programmers don't have.
       
 (DIR) Post #B6yR34EeWVzgPtRBDs by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @algernon IOW, the money spent on AI would better be spent on therapy and ADHD medication
       
 (DIR) Post #B6yRVQvfk2yiuP5MLg by algernon@come-from.mad-scientist.club
       0 likes, 0 repeats
       
       @wolf480pl See my previous response, but I'll expand a bit here: I wouldn't mind the blog post, if it weren't for the second to last paragraph:If and when this module will grow enough tentacles to make further changes a cumbersome, hairy, token-heavy, and error-prone effort, then I’ll have no other option than to roll up my sleeves and yell at my robot to mow down the lawn.I understand they're not happy with the code. That's fine. I understand they don't feel like fixing it. That's also fine. Sometimes shit will stay shit, it happens.But "oh, eventually I'll spend a few hours yelling at AI to fix it" is where I draw the line. That sounds painful, and expensive, and completely unnecessary. Take a deep breath, find a quick win, five minutes and a single breath later you're out. Repeat that once every few years, and voilá, you have cleaner code!
       
 (DIR) Post #B6yRVRoGT4eBdicxRQ by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @algernon soI don't know if the author is the only one working on that codebase - if so then yeah.If there are other people who will use LLMs and he* has no say over it, then I see how spending 5 minutes a day to clean things up only to have someone else fuck it up with an LLM in 5 seconds does not sound sustainable*fuck it, I need to use 2 distinct pronouns
       
 (DIR) Post #B6yRxl3WVMdvRGGQNc by algernon@come-from.mad-scientist.club
       0 likes, 0 repeats
       
       @wolf480pl He started his blog post with "my app grew its own home-brewed unplanned data structure". Nowhere else in the blog post does he mention other people working on it. It's always "I". "When will I ever get to fix this?", "I will never have a day...", "I will never care enough".
       
 (DIR) Post #B6yRxoZXQn2CLQGXCK by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @algernon hmm so it's self-inflictedthen yeah, no excuse
       
 (DIR) Post #B6yRxqZxyAZ6ZKTu8u by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @algernon are LLMs the new alcohol? 🤔
       
 (DIR) Post #B6ySviEM8csu3Ev3oW by algernon@come-from.mad-scientist.club
       0 likes, 0 repeats
       
       @wolf480pl I think "AI" is a few orders of magnitudes worse.
       
 (DIR) Post #B6ySvigiRBZNTCBi1A by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @algernonyeah but I'm trying to come up with a framework of thinking about people who use itthey reach for it either due to peer pressure or because they're sadbut instead of helping, it makes them sadderand they get addicted
       
 (DIR) Post #B6zVCBw7fgtcFbXULA by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @algernonbtw. if that person is from Tel Aviv, as their GitHub profile says, the "mow down the lawn" at the and of the blog post suddenly sounds very dark...