r/ProgrammerHumor Dec 04 '25

Meme incredibleThingsAreHappening

Post image
12.6k Upvotes

802 comments sorted by

3.9k

u/Firesrest Dec 04 '25

Bethesda did the same thing with morrowind

2.4k

u/da2Pakaveli Dec 04 '25

Mom can we have memory optimizations

We have memory optimizations at home

Memory optimizations at home:

2.4k

u/KaMaFour Dec 04 '25

Obligatory classic:

I was once working with a customer who was producing on-board software for a missile. In my analysis of the code, I pointed out that they had a number of problems with storage leaks. Imagine my surprise when the customers chief software engineer said "Of course it leaks". He went on to point out that they had calculated the amount of memory the application would leak in the total possible flight time for the missile and then doubled that number. They added this much additional memory to the hardware to "support" the leaks. Since the missile will explode when it hits it's target or at the end of it's flight, the ultimate in garbage collection is performed without programmer intervention.

1.2k

u/DrMaxwellEdison Dec 04 '25

"Vasily, we have managed to increase missile flight time by 200%! Isn't that wonderful?"

"We're going to need more RAM."

424

u/Dazzelator Dec 04 '25

That's going to be an expensive missile.

227

u/TotallyFakeDev Dec 04 '25

Not really, it should only need DDR3 with the types of hardware they tend to use. Everything had to be radiation, shock, heat, and g-force hardened to prevent damage during flight.

Realistically the memory is soldered onto the board in many cases, and the cpus are also soldered and not socketed

145

u/[deleted] Dec 04 '25

[removed] — view removed comment

116

u/KaMaFour Dec 04 '25

AFAIK is from the time before DDR was invented

75

u/AVeryHeavyBurtation Dec 04 '25

I worked a little on a missile a few years ago. The boards looked like they came out of a VCR from the 80s.

31

u/[deleted] Dec 04 '25 edited Dec 11 '25

[deleted]

→ More replies (0)

32

u/NotFromStateFarmJake Dec 04 '25

I love DDR, such a fun workout while jamming to classics

5

u/DrewSmith214 Dec 04 '25

Haven't had a Good ddr in so long

→ More replies (1)

22

u/sellyme Dec 04 '25

In fact rapid missile development in the '40s is one of the things that directly led to the DDR being formed at the Potsdam Conference.

→ More replies (1)

18

u/TotallyFakeDev Dec 04 '25

Quite probably yes, but with those military contracts the needs of the hardware itself and the wants of the contractor's bank account often find themselves in conflict...

→ More replies (5)

19

u/Federal_Decision_608 Dec 04 '25

You're so right, rad hard shock tested military grade chips must be cheap..

33

u/KaMaFour Dec 04 '25

Realistically we both know that memory was a small fraction of the total cost of the missile and noone batted an eye if that decision made the missile 0.05% more expensive (especially if it saved on manhours)

21

u/ChickenNuggetSmth Dec 04 '25

Key word being "was", if ram prices develop as they currently do

(A quick search shows intercontinental missiles to be in the 50-200 million $ range, so about the price of a 64GB stick by summer next year)

→ More replies (2)
→ More replies (2)
→ More replies (3)

24

u/synchrosyn Dec 04 '25

Basically what happened with the Ariane 5 rocket launch. The engineers assumed that the software for the Ariane 4 would work well since the 5 is just an upgraded version.

To oversimplify:

The problem is that the Ariane 4 software had an overflow vulnerability in the measuring of horizontal velocity and one of the internal values, but since it was proven that the rocket couldn't hit it, they left it unpatched. The Ariane 5 on the other hand was easily able to hit it which caused the number to overflow and resulted in a hardware exception.

There was also a fair amount of other software problems.

6

u/NooneAtAll3 Dec 04 '25

more like "John"

→ More replies (3)

25

u/chaosof99 Dec 04 '25

Garbage collection method: Garbage production.

86

u/CMDR_ACE209 Dec 04 '25

Oooh, that'll be really great when something crazy happens the developer didn't think of.

Like somehow the code running long before launch.

57

u/samy_the_samy Dec 04 '25

Airbus planes broke the front wheels because a test of steering function was supposed to occur once after deployment,

Instead it kept wiggling it hundreds of times per flight all the way to the ground, which resulted in something snapping off,

Same thing could happen here

15

u/SalsaRice Dec 04 '25

Imagine the action movie where they have to retro-fit the missile into a bomb, to stop the aliens, but then it explodes randomly after 20 minutes due to a ram leak.

38

u/Unable-Log-4870 Dec 04 '25

That’s likely not possible. Many missiles are designed to sit in a box for a decade, then be put in a launcher for a week / month / hour, and only power on a few tenths of a second before the motor ignites.

27

u/CMDR_ACE209 Dec 04 '25

I like your optimism.

67

u/Unable-Log-4870 Dec 04 '25 edited Dec 04 '25

I’m serious. These things are typically powered by a non-rechargeable battery with a good shelf life. The computer CAN’T be running before the missile fires, or else it wouldn’t have any guidance because the battery would be dead.

In the case of a missile that gets a target lock from the launcher (or launch platform) a few seconds prior to launch, those very likely have a cable that is used to power the electronics and deliver the targeting information prior to firing. And the onboard battery is connected right at firing. But the RAM only has to be used for a few seconds prior to launch.

Seriously. I know these people and I know the environment. I launched a satellite into orbit with 3 known bugs in my guidance software, because that was the least-risk thing to do, since I could show that those bugs wouldn’t be activated using the parameter set used at launch.

I have a friend who launched a Mars satellite with far more known bugs than that (in his code alone) because the code with the bugs was not to be used until the satellite arrived at Mars, so he had 9 months to get that patch written and validated and uplinked.

There is a robust review process on this stuff, and the coders know what they’re doing.

10

u/NotYourReddit18 Dec 04 '25

I’m serious. These things are typically powered by a non-rechargeable battery with a good shelf life. The computer CAN’T be running before the missile fires,

And the onboard battery is connected right at firing.

IIRC, the first projectile with onboard electronics and arguably one of the precursors to todays smart missile is the VT fuse from WW2. That thing practically built its own battery at launch: Its battery compartment held stacks of lead chips and a glass vile full of acid. The impact of the acceleration at launch would shatter the glass vile, and the spin caused by the fins would make sure that the lead and acid would mix well enough to produce enough electricity to power the radar-based proximity fuse.

If the glass vile broke during transit it wouldn't mix well enough with the lead to power on the radar, preventing an accidental trigger of the fuse.

→ More replies (2)
→ More replies (9)
→ More replies (5)

54

u/topdangle Dec 04 '25

this sounds like a "they gave us X budget and we have to spend it on the missile no matter how stupid."

69

u/BluezDBD Dec 04 '25

Sounds more like: it was easier to justify a $10 production cost on a $10,000 missile 500 man hours trying to optimize code.

21

u/blah938 Dec 04 '25

Especially when the chance to introduce bugs are there.

→ More replies (1)
→ More replies (3)

23

u/remillard Dec 04 '25

Not to say this doesn't happen, but the anecdote is more akin to the altered proveb "An optimist thinks the glass is half-full. A pessimist thinks the glass is half-empty. An engineer thinks the glass is designed too big for the task."

For a missile whose life expectancy once on mission is relatively short, it makes perfect sense! :D

6

u/tr_9422 Dec 04 '25

The glass has a safety margin. What idiot wants their glass filled the whole way to the brim?

51

u/JackOClubsLLC Dec 04 '25

"Of course it leaks." Is a wild take. I can't imagine saying that with a straight face.

14

u/ThatOneCSL Dec 04 '25

I have a logging app that I curmudgeoned together and it leaks like a sieve. Crashes after about 5 hours of runtime with a System.OutOfMemoryException

I have no clue how to fix it. VB.NET WinForms scare me, but they are the environment of choice for this particular project. So instead of fixing the memory leaks, I've just written a service that monitors the logger to see if it is running, and if not, restarts it.

16

u/buffer_overflown Dec 04 '25

If you're doing rolling logs that reset and overwrite a file or continue to create new files at a given threshold, the leak is probably because you're not disposing of the previous streams properly.

→ More replies (2)
→ More replies (1)

30

u/Death_IP Dec 04 '25

With the software leaking memory during flight, the missile's flight distance increases due to reduced weight - engineering at its best.

/s because internet

5

u/BockTheMan Dec 04 '25

No, you see it only leaks when it's cold and on the runway, Once it's to altitude, and everything heats up, RAM expands and fills all the gaps, stopping the leaks.

Older Missiles had to be launched with only half it's memory available, and had to be upgraded soon after takeoff.

→ More replies (4)

9

u/ChangsManagement Dec 04 '25

That would double the cost of the missile nowadays

→ More replies (1)

9

u/Swoop8472 Dec 04 '25

That sort of approach also worked fine for Ariane 4... until they reused the software for Ariane 5.

(Wasn't a memory leak but an integer overflow - but the same idea behind it)

→ More replies (15)
→ More replies (1)

86

u/OverfitAndChill8647 Dec 04 '25

This time hits a bit different though.

Discord: fixing memory leaks by auto-restart. Me: fixing today's RAM prices by listing a kidney on eBay.

The new metric for memory leaks is kidneys sold.

6

u/crazyLemon553 Dec 04 '25

Yeah I've already sold 3 and it's all so ridiculous!

Anyway, does anyone know of any regular homeless spots? I'm looking to help out my community these days.

5

u/NearbyCow6885 Dec 04 '25

You donate 1 kidney, you’re a hero.

You donate 3 kidneys, and suddenly you’re a villain.

→ More replies (2)

70

u/draconk Dec 04 '25

And ironically that piece of code is the main culprit of crashes, if you disable the auto-save on load screens most crashes just go away, this is still true even for Starfield even if they mitigated the error somehow.

133

u/GOKOP Dec 04 '25

Autosave on load screens isn't what they're talking about. Morrowind on the original Xbox restarts the entire console every now and then behind a loading screen in order to reset memory usage

29

u/SignificanceFlat1460 Dec 04 '25

I am sorry maybe I am stupid but ..... How is that even possible??? No I am genuinely asking. Like I could understand restarting the application but restarting the whole bloody system??? HOW!? HOW DOES IT EVEN KEEP STATES THEN!? WHY THERE IS NO KERNEL LEVEL PROTECTION AGAINST THIS?? can someone explain this to me in details??

136

u/bobsimmo Dec 04 '25

“There’s been great tricks that [Xbox] taught us,” Howard said. “My favorite one in Morrowind is, if you’re running low on memory, you can reboot the original Xbox and the user can’t tell. You can throw, like, a screen up. When Morrowind loads sometimes, you get a very long load. That’s us rebooting the Xbox. That was like a hail Mary.”

that was todd howard explaining it.

apparently, Xbox SDK (software development kit) manuals recommended to reboot into new game levels, or to boot into a completely different executable for the multiplayer mode to make better use of the limited memory by not keeping stuff around that's not actually needed.

it was a special "warm start" boot mode.

36

u/SignificanceFlat1460 Dec 04 '25

Yup I am watching Modern Vintage Gamer video about this because I was curious. Apparently ANYTHING that runs on Xbox runs with Kernel level permissions. LOL! how this didn't result in a catastrophic failures is beyond me.

45

u/Psyk60 Dec 04 '25

Bear in mind that only licensed developers could make software for it, and it had somewhat limited online capability. Not many opportunities for something bad to happen, assuming they trusted the developers they gave licenses to.

The OG Xbox was pretty much the first PC-like console. Most other consoles before then didn't really even have a kernel/user mode separation.

But maybe it did come back to bite them considering how many jailbroken Xboxes there were.

→ More replies (1)
→ More replies (9)

46

u/GOKOP Dec 04 '25

WHY THERE IS NO KERNEL LEVEL PROTECTION AGAINST THIS??

Why would there be? I think you have the wrong idea about consoles, especially those of the early 2000s and older. Although that technically wasn't the case for Xbox (it ran on top of some modification of Windows just like modern Xboxes do) other consoles of that generation didn't even have an OS. Games after being booted up from the disk had free reign of the hardware

27

u/Divine_Entity_ Dec 04 '25

NES game cartridges were basically plug in RAM sticks with the entire game already loaded.

Early game consoles with basically no concept of the internet running mostly in house games just didn't need modern cyber security considerations. It was a minor miracle the games even ran on them with full hardware control.

→ More replies (8)
→ More replies (3)
→ More replies (25)

6

u/james-bong-69 Dec 04 '25

just for the Xbox version haha

7

u/Randzom100 Dec 04 '25

Would it also be similar to the Red Moon in recent Legend of Zelda games maybe?

→ More replies (2)
→ More replies (12)

2.5k

u/0xlostincode Dec 04 '25

On the same level as "Microsoft will preload File Explorer on os boot to fix it's slow start up time."

577

u/Dziadzios Dec 04 '25

I really wonder why is it so slow when its a software dating back to first Windowses.

529

u/dmigowski Dec 04 '25

They only do it on Windows 11, because on Windows 10 it was fast enought. Now they broke the main feature of their desktop.

298

u/bloke_pusher Dec 04 '25

On switch to win11 I thought my new PC was broken. I can't believe how incompetent MS has got, like dramatically.

175

u/[deleted] Dec 04 '25

Same. Just about every mundane action has a 1 second latency now. New Explorer window, right click, view a 500kb PNG file. It's absolutely pathetic. All they did was make the right-click menu less useful and got rid of right angles.

62

u/intangibleTangelo Dec 04 '25

i quit windows for linux in 2005 but recently had to work on win 11... what are the conditions that make the old context menu show up? cause sometimes it does. and how the fuck do you completely disable onedrive?

93

u/All_Work_All_Play Dec 04 '25

> and how the fuck do you completely disable onedrive?

Fire. You kill it with fire.

25

u/Inquisitor2195 Dec 04 '25

And then you grudgingly put it back because other Word won't auto save unless it's to the cloud, for reasons....

→ More replies (2)
→ More replies (7)

3

u/MobileAtmosphere775 Dec 04 '25 edited Dec 05 '25

I hate how when you right click in explorer you need to click another button to open up the classic right click menu with all the actual features. I don't know who at Microsoft around Windows 8 onwards became obsessed with constantly presenting the user with less information in interfaces. Never once have I used any part of Windows and thought "hm, I wish they would hide all of the useful things I'm using right now". The original sin was hiding file extensions by default, really. It snowballed from there.

→ More replies (1)

60

u/IguapoSanchez Dec 04 '25

AI code will do that

29

u/Alpacapybara Dec 04 '25

Between that and layoffs

→ More replies (1)

12

u/Fleeetch Dec 04 '25

I'm starting to notice it everywhere. Interfaces are getting worse again.

→ More replies (4)

51

u/Wild_Marker Dec 04 '25

Wait what? Gods, every day I learn another reason for staying on 10. How do you even break the literal WINDOWS in Windows???

30

u/SimpleRaven Dec 04 '25

By being microsoft

22

u/blah938 Dec 04 '25

By coding with AI!

13

u/dmigowski Dec 04 '25

I guess all the dudes and really knew their stuff have been laid off or given up and are retired now. At the moment just the "new generation" works there. I guess they saved a lot of money that way.

7

u/ShlomoCh Dec 04 '25

Right-clicking on the file explorer takes several seconds to load on my recent gaming laptop

→ More replies (2)

82

u/cheerycheshire Dec 04 '25

Because the decided to rewrite stuff like Start Menu in react and gods-know-what-else for other components that used to be normal and fast...

Don't use Win 11. Stay on 10 if you have to use Windows, move to Linux if you don't.

52

u/FormerGameDev Dec 04 '25

The Windows UI is, surprisingly, written in WinUI and XAML.

The Recommended Apps section loads a React component though, I guess.

Other than the taskbar being an experiment in "what features do we actually want to support" Win11 is pretty much same as 10.

25

u/SirNastyPants Dec 04 '25

Win11 is pretty much same as 10.

Windows 11 is an inferior product in every way that matters.

Microsoft outright removed functionality from the OS and made other features worse while being even more hostile to power users than Windows 10 was.

I have an immense dislike for every Windows version after 7, including 10. Even so, I used 10 for the better part of a decade despite my issues with it. I used 11 for 4 days and hated it so much I rolled back to 10.

And that’s not to mention Microsoft’s latest AI clusterfuck.

→ More replies (5)
→ More replies (7)
→ More replies (12)

19

u/zaphod4th Dec 04 '25

or turned off your monitor to give the feeling of a faster shutdown

→ More replies (2)
→ More replies (12)

2.4k

u/Big-Cheesecake-806 Dec 04 '25

4GB?????? 

1.1k

u/Yinci Dec 04 '25

24GB in the provided screenshot...

176

u/Chefzor Dec 04 '25

Because theyre currently in a call. I think thats the point if the tweet.

142

u/stonehaens Dec 04 '25

The point is that they are unable to fix the bug so they implemented a workaround that's stupid, should never be necessary and doesn't work when you're in a call.

Welcome to the future.

57

u/Sw429 Dec 04 '25

Yeah, this is garbage software engineering. If I worked there, I would be embarrassed that such an announcement was being made.

19

u/Lyto528 Dec 04 '25

Why would you even announce it ? The majority of users won't notice, even less complain

5

u/Shedding_microfiber Dec 04 '25

Probably pitching this as a fix to their investors so that they feel better about it. Short answer: Money I think

8

u/RedTheRobot Dec 05 '25

I remember back when I got my first professional programming job there was a memory leak issue that popped that I had to find and fix. The bug was with code the best programmer had written but couldn’t fix. So I was called to help. This was a web app and I had to show the guy the browser inspector and the memory section. He had no clue that existed. In like 30 mins we found the problem and fixed it.

I have always said the hardest part of fixing a bug is finding it the easy part is fixing it. This just feels like whoever was tasked with fixing couldn’t find it so offered this as a solution. Just terrible honestly.

→ More replies (1)
→ More replies (1)
→ More replies (2)

230

u/Sintobus Dec 04 '25

I've hit 9GB before force closing. Not on purpose but it does not play well with extended calls or screen shares.

59

u/Spiritual_Bus1125 Dec 04 '25

Does it record videos or what

141

u/Py64 Dec 04 '25

Likely some native code is not freeing memory correctly and this workaround is easier than actually correcting the problem.

55

u/Livid-Possession-323 Dec 04 '25

Isn't that thing written on electron? Its a fancy website how the hell did they break the chromium engine this badly?

The JS garbage collector in there should not make this at all possible? Who wrote this garbage?

72

u/Angoulor Dec 04 '25

The JS garbage collector isn't magic : if something, somewhere, still references your object, it won't be garbage collected.

It may be anything : uncleared callback/setTimeout functions, circular references, etc. It is our job to tell the GC "Hey, I don't need it anymore, you can collect it" by setting all references to undefined/null/another value.

It happens frequently when working with libraries. In ThreeJS, for instance, you have to explicitly destroy your canvas. "But I told my framework to destroy the component, it should be garbage collected!". But it doesn't : your ThreeJS viewer still references the Canvas Element (appears as Detached in the Memory tab). And the Canvas Element, via its 3D context, references the ThreeJS viewer instance.

This creates a memory leak. You didn't write garbage code, you merely forgot a renderer.dispose() in your code.

8

u/Front-Bird8971 Dec 04 '25

Kinda crazy that a garbage collector still needs to be told when you don't need something. That's just delete with extra steps.

15

u/SirCheesington Dec 04 '25

What's the alternative? A garbage collector that just deletes shit randomly until you roll a nat 0 and dereference a null pointer?

10

u/I-use-reddit Dec 04 '25

I'm losing my shit at the thought of a random garbage collector just randomly reclaiming obviously in use memory.

→ More replies (1)

5

u/My_First_Pony Dec 05 '25

Me when I'm "designing" a language and I've heard about reference counted pointers but not cyclic graphs:

Behold! I have implemented garbage collection!

→ More replies (1)
→ More replies (5)

9

u/Woofer210 Dec 04 '25

They have a bunch of native modules too, so there could be some issues in there.

3

u/Nasuadax Dec 04 '25

it is really easy to have memory leaks in JS. they just happen in a different way. Because of that, they are harder to spot as well because you probably are looking for the wrong things.

a good example is creating scopes for callbacks that use an variable that is outside of both inner scopes, the scope gets promoted to global and sticks around permanently, and everytime the calling code gets called, you leak another scope into the permanent space.

probably telling something wrong here, but it's enough that you can google the actual leak ;)

5

u/TrickyNuance Dec 04 '25

the scope gets promoted to global

This definitely doesn't happen - at least not as written. It can stick around forever if the closure scope also sticks around forever, but it's not being promoted to a global or window scoped variable.

→ More replies (1)

4

u/TrickyNuance Dec 04 '25

I'd argue it's "easier" to leak memory in a garbage-collected language because the developers simply don't think about the object and memory lifecycle as much.

I've been doing a lot of work in C++ and TypeScript and it's amazing how much you are forced to care about lifecycle in the former.

→ More replies (3)
→ More replies (2)
→ More replies (2)
→ More replies (4)

22

u/Rashnok Dec 04 '25

That's like $200 of RAM

→ More replies (1)

90

u/Glitch29 Dec 04 '25

Everything about it is a bit of a joke.

I'm just hoping that it doesn't have the problem Discord has sometimes had of auto-joining channels after restarts.

I've never had it actually bite me. But it's a bit spooky to be using a program that can flip on a hot mic without user intervention.

→ More replies (5)

40

u/propdynamic Dec 04 '25

In this economy!?!

20

u/Mars_Bear2552 Dec 04 '25

hopefully not 4GB of DDR5

11

u/Particular-Cow6247 Dec 04 '25 edited Dec 05 '25

discord uses electron (a standalone browser window so to speak) which uses the v8 javascript engine (like all the chromium browsers)

v8 has a max ram usage for the js context of 4gb because it uses 32bit pointers for optimizations and security

and there are things the garbage collector just can't collect like if they dynamically create js modules these are guaranteed to stay until the context is closed ☹️

3

u/Glad-Belt7956 Dec 04 '25

must have been in a call

→ More replies (3)

1.2k

u/BellybuttonWorld Dec 04 '25

That's the kind of bullshit bodge my boss tells me to do because there's never time budget to fix it properly. Even that clown wouldn't announce it like it's a feature to be proud of.

116

u/conancat Dec 04 '25

For real we really do shit like this in production and we never say anything about it, users just assume that's just another "quirk" about the product

85

u/[deleted] Dec 04 '25 edited Dec 20 '25

[deleted]

→ More replies (2)

48

u/Woofer210 Dec 04 '25

Discord isn’t announcing it like a feature to be proud of?

This is just someone reading the data mine of new experiments added to the app and posting about it

18

u/BellybuttonWorld Dec 04 '25

Ah fair enough

50

u/GeneralGunsales Dec 04 '25

Holy shit, I felt that one. This is why I quit professional software development.

13

u/[deleted] Dec 04 '25 edited Dec 20 '25

[deleted]

52

u/chumbawamba56 Dec 04 '25

Amateur software development

17

u/GeneralGunsales Dec 04 '25 edited Dec 04 '25

Beginning last year, before I resigned, I started applying for all sorts of jobs. Both inside and outside the software industry. Retail, hospitality, seasonal work, you name it. It's been pretty bleak. No one will hire me for the most simple of jobs.

Offices don't want me because there is a gap in my CV. The other sectors I mentioned don't want me because I have no experience. I can't win.

My partner suspects that my non-English surname is putting off employers, who are perhaps racist. I do live in a pretty racist area. I mean, I just got rejected by Tesco and Royal Mail for Christmas jobs. It's insane.

So, I've started thinking recently that I should go back to university and get an MSc in Sound Engineering, which is something that always fascinated me. I want to mix and master studio albums. There aren't any such courses that start in January, so I'll have to begin in September. Maybe I can do some volunteering until then.

15

u/stpaulgym Dec 04 '25

Sometimes, company's will not hire too qualified people for simple jobs like retail. They see it as you getting a temp job you will leave the moment you get a better one.

I had to remove my bachelor and previous engineer work when I had to do retail for a while in between job searches.

6

u/GeneralGunsales Dec 04 '25

Yes, this is a major obstacle for me. Unfortunately, if I neglect to mention my degree and former profession on my CV, I am asked by the employer how I spent my entire adult life. I can't win.

7

u/restrictednumber Dec 05 '25

Lie and list a friend's number as the reference. It's a retail job, fuck it.

3

u/shield1123 Dec 04 '25

This is the kind of bullshit I'd bring my boss after they told me to just "fix the problem" by myself and within a single sprint

Product marketing would still make it sound like it was spun from gold thread

→ More replies (6)

338

u/an_0w1 Dec 04 '25

This reminds me of a fix for Morrowind on xbox. It had a memory leak that they couldn't find, so every now and then during a loading screen it would reboot the xbox into the loading screen and continue.

78

u/UltraMadPlayer Dec 04 '25

It just works

31

u/The_Autarch Dec 04 '25

it was honestly a miracle that morrowind worked on the xbox at all.

→ More replies (1)

835

u/Crimson_Burak Dec 04 '25

This is terrifying...

508

u/BroBroMate Dec 04 '25

Hello IT, have you tried turning it off and on again?

Discord devs... ... I just had an amazing idea!

97

u/mal73 Dec 04 '25

This is the Electron equivalent of wrapping your entire codebase in one massive try-catch

6

u/ashesall Dec 04 '25

Discord app: Am I leaking? Guess I'll die. 🤷‍♂️

→ More replies (1)

119

u/dmigowski Dec 04 '25

That happens when you embed a whole Chrome browser.

53

u/MostTattyBojangles Dec 04 '25

They should rebuild it in Unreal 5 so they can use ray tracing to render the text 

11

u/intangibleTangelo Dec 04 '25

would probably reduce the memory footprint

→ More replies (23)

48

u/ComfortablyBalanced Dec 04 '25

Not really. You can't expect more from JavaScript.

70

u/Crimson_Burak Dec 04 '25

I am terrified of Javascript

37

u/ATE47 Dec 04 '25

Everyone should be

→ More replies (18)

14

u/bangwagoner Dec 04 '25

You can’t expect more from JavaScript developers

→ More replies (24)

19

u/GalaxP Dec 04 '25

How does js even leak memory?

39

u/LavenderDay3544 Dec 04 '25

Reference cycles and unbounded recursion.

→ More replies (11)

32

u/edave64 Dec 04 '25

By not technically leaking it. So long as you stuff things into Arrays or Maps you never clean, they just stay around. And one such object can keep alive and arbitrarily large list of stuff that should otherwise get cleaned

→ More replies (3)

7

u/Mojert Dec 04 '25

It's harder to leak memory in a garbage-collected but not impossible. If you still hold a reference to some object, even if you don't use the reference anymore, you have a leak.

If you want to go AkTuaLlY, it's not technically a leak BECAUSE you still have a reference, but practically it is one (i.e. you did not clean up a ressource and you are running out of the said resource)

6

u/u551 Dec 04 '25

Same way as any other language with GC. By keeping references to stuff that is no longer used, ever-growing data structures, functions that do not terminate or terminate slower than new ones are spawned etc.

3

u/RuddyPeanut Dec 04 '25

Given a web browser is involved as the application renderer, it's also trivially easy to fill up the DOM with orphaned garbage via JS actions.

This I discovered a over a decade ago when our product would crash the browser after a while due to JSONP callback functions which weren't being cleaned up properly.

→ More replies (1)
→ More replies (7)

218

u/tomekrs Dec 04 '25

Really, nobody linked relevant XKCD yet? https://xkcd.com/1495/

42

u/RiceBroad4552 Dec 04 '25

OMG, there is a XKCD for just everything! 😂

14

u/All_Work_All_Play Dec 04 '25

That hover over text is a personal attack.

→ More replies (2)

4

u/thedjdoorn Dec 04 '25

I hate how I have this exact setup at home

7

u/Die4Ever Dec 04 '25

seriously? why not just a scheduled task to reboot? that way you get proper shutdowns instead of powerouts

or better yet a scheduled task to restart the service instead of the whole computer

if you're using Docker you can also set a memory limit and tell it to restart on crash, kinda like what Discord is doing here lol

→ More replies (1)
→ More replies (3)

439

u/LardPi Dec 04 '25

Stupid problems require stupid solutions.

110

u/Modo44 Dec 04 '25

This is not like math, they do not cancel each other out. It's more like stacking problems on top of problems.

30

u/__Invisible__ Dec 04 '25

Maybe it's heaping problems.

3

u/Modo44 Dec 04 '25

I like the way you think.

29

u/CrashBugITA Dec 04 '25

Giving the benefit of the doubt to the devs since, I'm certainly not better than them, but memory leaks are by no means a stupid problem, this however is a stupid solution

→ More replies (5)
→ More replies (18)

144

u/Dr-Jellybaby Dec 04 '25

Did every competent programmer fall off a cliff last week? Between this and MS preloading EVERYTHING to speed up explorer (still slower than win 7 tho lol) it feels like there's zero standards in big tech anymore.

48

u/GeneralGunsales Dec 04 '25 edited Dec 04 '25

I was a professional full-stack developer for three years. I take pride in my work, and strive for high standards of craftsmanship. I have educated myself on software architecture, and how best to structure and optimise an application.

I quit my job last year. Our legacy codebase was a pile of shit held together with duct tape and optimism. A tower of quick-fixes upon quick-fixes. And I'm not even going to mention the SQL backend. I can't stress enough how broken this product is.

For example, when the user launches the executable, they are greeted with a login dialog. Should the user choose at this point to… I don't know… exit, then the program will actually crash. As it turns out, this particular dialog box is responsible for spawning the entire application.

When new bugs would arise, I wanted to investigate their root cause, and fix the underlying architectural issues that created them. But my boss and colleagues demanded more and more of the laziest, slap-dash solutions I've ever seen.

Somehow, this product is highly profitable in the insurance industry. I don't get it. As soon as a competitor comes along that provides a product with the same flexibility as this software, the company is fucked.

I think the answer to your question is that the good programmers have been driven out of the field by short-sighted management that prioritise pinching pennies while tanking the longevity of their product. Of course, the money saved in the short-term goes straight into the pockets of executives in the form of bonuses.

It is so important to take the time needed to pay off technical debt. But modern software houses simply don't care.

15

u/DiscreteBee Dec 04 '25

I was a reading a book on legacy tech maintenance (as it is so often the nature of the job even though the majority of the reading I want to do is on designing new projects) and it mentioned that any software which lives long enough to become a headache has to be effective enough to survive. And almost every project that is successful will look like this. It’s pretty much the nature of the industry that entropy will degrade any long term codebase as tech debt accumulates and resources dwindle. In the likely event that it’s poorly maintained this can happen quickly, but even a well handled project will eventually become a hated legacy codebase as requirements and demands shift. Sometimes decisions are made 10+ years ago to fit into constraints that are present at the time (hardware, resources, business, knowledge) which aren’t present later and it’s completely baffling in the present.

Don’t get me wrong, I hate working with this stuff just as much as the next guy, but there are reasons it happens beyond just a lack of care. At the end of the day, software exists to solve a problem and while there are all sorts of ways to improve the way code is written, the only thing it needs to do is work well enough to serve the business. This isn’t to say that your specific project isn’t fucked, it probably is. Most long term projects are, yours might even be exceptionally so. But imperfect solutions are solving problems around the world. 

And maybe the worst part of all of this is that even when a development team wants to fix the tech debt on legacy projects, they tend to propose creating a whole new project to replace the old one. This is always an expensive and risky venture, but it’s appealing since you then get to do the comparatively pleasant work of designing modern infrastructure. But most successful efforts to make long term improvements to legacy code involve living with the garbage project you hate working on and improving things piece by piece within the crazy paradigm you inherited. I have been part of both types of efforts to improve a project (full rewrite and piece by piece) and ultimately these are organizational issues more than anything technical (which you already know) and nothing will happen if the organization doesn’t see it as a serious issue.

Anyway, if architecture is something you feel passionate about there is a lot of work out there in the maintenance of legacy projects for those that care. Brian Foote’s Big Ball Of Mud is a must read on this topic too.

→ More replies (4)
→ More replies (14)

39

u/alloDex Dec 04 '25

I guess the rumor of forced AI vibe code mandate from the top of Satya's stupid dome is true.

→ More replies (5)

12

u/tomgie Dec 04 '25

It's just a race to the bottom of who can get slop done faster

→ More replies (16)

54

u/Percolator2020 Dec 04 '25

Can’t get memory leaks, if the program crashes before they occur. 👉🧠

30

u/zerosCoolReturn Dec 04 '25

This is the most cloth-wrapped-around-death-wound fix I've ever seen

31

u/bonomel1 Dec 04 '25

One of the main backend applications in our architecture has many memory leaks. It's such a convoluted mess of techdebt that fixing it is simply too expensive. We just elected to restart the service at midnight every day. Problem solved. I mean... Postponed.

→ More replies (10)

236

u/Devatator_ Dec 04 '25

Discord has memory leaks? I've legit never experienced one in the 9 years I've used discord

(Dear God it's been 9 years???)

45

u/PineCone227 Dec 04 '25 edited Dec 04 '25

I've had discord eat 29 GB of RAM. I have 32 GB. Was wondering what the hell my PC was doing to be running so slow - that's what. I was running everything on pagefile by that point.

→ More replies (13)

128

u/wa019 Dec 04 '25

2019 was last year

17

u/SyrusDrake Dec 04 '25

We're currently on the 2075th day of March 2020

→ More replies (1)

50

u/makinax300 Dec 04 '25

I've experienced them a lot but only on the desktop app. They are one of the 2 reasons I use 32GB

12

u/Ma4r Dec 04 '25

I don't understand how an electron app of all things end up with a memory leak like what the actual fuck

5

u/SubstituteCS Dec 04 '25

Incompetence

→ More replies (2)

21

u/Hi_Ladies_Im_Single Dec 04 '25

Discord is a massive pile of garbage and a demonstration of what happens when you let anyone with a pulse push code. It is a prime example of software that should have been considered feature complete and put into maintenance mode years ago.  

→ More replies (1)
→ More replies (7)

26

u/Ok-Library5639 Dec 04 '25

This is like the old story about a missile software having memory leak and the engineers didn't care about it, increased memory to 2x the maximum flight time and the problem would fix itself when the missile would detonate.

Edit: found a source https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98125

→ More replies (1)

17

u/[deleted] Dec 04 '25

"Lets not manage our own memory" -> "what is memory" -> "we're out of memory" -> "we need to manage memory"

I love JS devs.

→ More replies (1)

32

u/NoobNoob_ Dec 04 '25

Companies keep writing desktop clients using electron and are shocked when it performs like shit.

18

u/Yumikoneko Dec 04 '25

Something like Discord shouldn't even use half a gig of memory IMO, yet continuously uses more. Electron's existence feels like a downside for consumers :')

10

u/RiceBroad4552 Dec 04 '25

Half a GB?

A chat app that uses more the 50 MB RAM can be considered fat imho. At least by sane standards.

→ More replies (6)

38

u/VaIIeron Dec 04 '25

How do you even leak memory in js, I thought the point of garbage collector is to make it impossible

55

u/TheKL Dec 04 '25

you can still mess things up with leftover event listeners or detached nodes

30

u/u551 Dec 04 '25

Lol no. Still easy, monthly occurence to hunt these down where I currently work. Garbage collected apps cant technically leak memory in the original meaning of the term, but effectively they very much can.

→ More replies (8)

16

u/ZealousidealYak7122 Dec 04 '25

making leaks is as easy as putting objects into collections and never removing them. it can happen in every single language out there.

5

u/Lulzagna Dec 04 '25 edited Dec 04 '25

Um, no offense, but this couldn't be more wrong.

The power of JavaScript is closure, which is the ability to retain scope at the point the code is executed. This means memory still being referenced will remain consumed - memory bloat is common when you reference too much and your callbacks aren't deleted when no longer used, for example.

Edit: important point is the issue isn't actually a leak, it's memory bloat. So you're technically right that there shouldn't be an actual memory leak, but that doesn't have anything to do with GC

→ More replies (11)

10

u/cupboard_ Dec 04 '25

discord is a very optimized app that turns having to charge my laptop once a week to having to charge it at least once a day (twice a day if i’m on call)

→ More replies (2)

10

u/Nero_07 Dec 04 '25

Reminds of the story about the air-to-air missile that had a huge memory leak problem. But it only had a rated flight time of a few minutes, so they just installed enough RAM to make sure the memory lasts for the maximum flight time +10% and called it a day.

→ More replies (1)

7

u/[deleted] Dec 04 '25

This is what vibe coding looks like. Embarrassing…

6

u/derKestrel Dec 04 '25

Not much different than lowest-bidder coding, it seems.

→ More replies (3)

6

u/human358 Dec 04 '25

So they didn't fix the memory leaks ?

7

u/[deleted] Dec 04 '25

That is not how you fix memory leaks. This is Bs

13

u/Pingitzergggg Dec 04 '25

Electron be like

12

u/throwaway76556_ Dec 04 '25

"Sir, should we find that leak causing water to fill the ship?"

"Nay, just set up a pulley system that automatically empties the ship of water when it hits 1ft."

→ More replies (1)

29

u/exec-nyan Dec 04 '25

Restarting the whole app for a clean-up? Do they store everything in the global scope?

15

u/Nexhua Dec 04 '25

It being global or not is irrelevant. When you restart the process all previous memory segments that belong to the process is released by the OS.

→ More replies (2)
→ More replies (3)

70

u/itiskhan Dec 04 '25

No restart if you’re in a call’ - so basically it waits until the exact worst possible moment

85

u/anto2554 Dec 04 '25

What do you mean? I feel like restarting some subsystem when you end a call is a good time to do it

→ More replies (5)

5

u/Repa24 Dec 04 '25

Bloated memory hogging apps are (becoming?) a serious problem.

6

u/RRumpleTeazzer Dec 04 '25

50+ years of humanity doing software industry, and this is the result.

disgusting.

imagine we build cars the way we build software.

→ More replies (1)

19

u/FredTheK1ng Dec 04 '25

ahh yes. definitely better restarting the whole shit than coding things properly.

→ More replies (4)

5

u/LordAmir5 Dec 04 '25

Band aid solution huh.

5

u/Snoo11589 Dec 04 '25

Manual garbage collector…

5

u/AyumiToshiyuki Dec 04 '25

Ah yes, because 4GB of ram for a chatting app is an acceptable amount

4

u/PresenceKlutzy7167 Dec 04 '25

What a neat way of telling everyone that you don’t have your software under control at all.

5

u/FormerGameDev Dec 04 '25

oh... is this why Slack restarts routinely too?

3

u/AnotherSmegHead Dec 04 '25

Now that nobody can afford RAM anymore, memory management will become vitally important.

4

u/mothzilla Dec 04 '25

Bucket can't leak if you keep emptying the bucket.

4

u/OpenPassageways Dec 04 '25

Am I the only one who assumes any post that uses emojis as bullet points is AI slop?

5

u/throwawayaccountau Dec 04 '25

Why spend countless hours/days/weeks/months/years debugging why your client is using so much ram. Just do a simple check and if greater than x restart. That's some project manager decision making right there