News for hackers. Stuff that matters.
Re:All my servers have an 8 GB empty file on disk by SethTro on Thursday March 25, 2021 @03:14PM (#26584187)
Same idea as this game development legend

https://www.dodgycoder.net/2012/02/coding-tricks-of-game-dev...

> he had put aside those two megabytes of memory early in the development cycle. He knew from experience that it was always impossible to cut content down to memory budgets, and that many projects had come close to failing because of it. So now, as a regular practice, he always put aside a nice block of memory to free up when it's really needed.

Re:All my servers have an 8 GB empty file on disk by Cerium on Thursday March 25, 2021 @04:00PM (#26584694)
In my work it is very common to make the memory map a little smaller than it has to be. If you can't ship an initial version in a reduced footprint you will have no hope of shipping future bugfixes.
Re:All my servers have an 8 GB empty file on disk by nitrogen on Thursday March 25, 2021 @08:46PM (#26587603)
Many years ago I spent a couple of weeks fixing a firmware bug. The firmware was only a few dozen bytes shy of the EEPROM. I just #ifdef'd out a bunch of features to focus on debugging what was broken, but to get the fix released I had to manually optimize several other parts of the code to get everything to fit in the 2MB or whatever it was.

Would've been nice if someone had reserved some space ahead of time. Maybe they did, but nobody was around who remembered that codebase.

Re:All my servers have an 8 GB empty file on disk by benhurmarcel on Thursday March 25, 2021 @04:57PM (#26585276)
Re:All my servers have an 8 GB empty file on disk by Blackthorn on Friday March 26, 2021 @12:59AM (#26588882)
My favorite part of that story is how the initial question about overflow should make it obvious that what they're doing doesn't work, but nobody noticed.
Re:All my servers have an 8 GB empty file on disk by umanwizard on Friday March 26, 2021 @02:24AM (#26589288)
Is it an overflow because `int` was typically 16-bit in those days?
Re:All my servers have an 8 GB empty file on disk by Blackthorn on Friday March 26, 2021 @11:14PM (#26599592)
Yeah.
Re:All my servers have an 8 GB empty file on disk by pjmorris on Thursday March 25, 2021 @06:44PM (#26586563)
I'd read in 'Apollo: Race To The Moon', Murray and Cox, that the booster engineers had done something similar with their weight budget, something the spacecraft engineers wound up needing. Contingency funds of all sorts are a great thing.
Re:All my servers have an 8 GB empty file on disk by djmips on Saturday March 27, 2021 @08:38AM (#26601871)
Back in the late eighties a colleague of mine was making a game for the Atari ST and he purposely put in some time wasting code in the game loop so that he had to work against a smaller budget which gave him some contingency for later on when he needed some extra cycles.
Re:All my servers have an 8 GB empty file on disk by 295310e0 on Thursday March 25, 2021 @03:36PM (#26584444)
If true, I hate that story. Think of the better art assets that were needlessly left behind. How is it that said block of memory had never been identified by any profiling?
Re:All my servers have an 8 GB empty file on disk by usefulcat on Thursday March 25, 2021 @04:08PM (#26584773)
> Think of the better art assets that were needlessly left behind.

Consider how long it takes to edit or recreate art assets to reduce their size. Depending on the asset, you might be basically starting over from scratch. Rewriting code to reduce its size is likely to be an even worse option, introducing new bugs and possibly running slower to boot. At least smaller, simpler art assets are likely to render faster.

This is also the kind of problem that's more likely to occur later in the schedule, when time is even more scarce. Between these two factors (lack of time and amount of effort required to get art assets which are both decent looking and smaller), I think in practice you're actually more likely to get better quality art assets by having an artificially reduced memory budget from the outset.

Re:All my servers have an 8 GB empty file on disk by _carbyau_ on Thursday March 25, 2021 @06:23PM (#26586343)
I see it as a "Choose your problem." affair.

1. Deal with possibly multiple issues possibly involving multiple people with the politics that entails resulting in a lot of stress for all involved as any one issue could render it a complete failure.

2. Have extra space you can decide to optimise if you want. You could even have politics and arguments over what to optimise, but if nothing happens it all still works so there is a lot less stress.

I pick 2.

Re:All my servers have an 8 GB empty file on disk by emmab on Thursday March 25, 2021 @03:58PM (#26584674)
If it would be detected by profiling that does make the technique asymmetric in that it would only stick around if nobody profiled to find it.
Re:All my servers have an 8 GB empty file on disk by hinkley on Thursday March 25, 2021 @03:59PM (#26584689)
Or if you didn’t have an understanding with the sort of people who would run the profiler...
Re:All my servers have an 8 GB empty file on disk by Rule35 on Friday March 26, 2021 @06:50PM (#26597943)
Better PMs do this today by having buffer-features they can cut when needed. It'll handle the not-enough-memory issue as well as a meddlesome VP who think you're over-subscribed and wants you to cut to meet your dates.

Also, don't forget you're hearing decades-later retellings of someone else's story. I don't doubt that they trickled this extra space out as changing requirements mandated it, but that they kept from doing so until the team had actually reached a certain level of product-maturity and reclaimed all of their own waste first.

Remember that the PMs goal is to ship. Them blocking some assets but actually shipping is a success. Better 95% of the product than 0%.

Re:All my servers have an 8 GB empty file on disk by Bost on Thursday March 25, 2021 @03:37PM (#26584452)
There's a difference between "The server is not responding right now. We're loosing customers.", and "Low resources during product development". Actually the latter may be a case of enforcing premature optimization. So no, it's not the same idea.
Re:All my servers have an 8 GB empty file on disk by smarx007 on Thursday March 25, 2021 @05:25PM (#26585598)
I think we are thinking of a different baseline. You are thinking along the lines of "this should run, we can reduce server costs later", I would suggest (if I may) "the app needs to run on any Android device with 2GB RAM". And then you develop a game to run on a 1.5GB RAM phone, expecting that it will eventually fit into 2GB RAM budget.