5 ms·
Also, I didn't know about this specific bug but I spotted it almost immediately while reading the code. This is not because I'm some kind of 10x programmer but
by xmcqdpt2 2y ago
Also, I didn't know about this specific bug but I spotted it almost immediately while reading the code. This is not because I'm some kind of 10x programmer but because Integer.MAX_VALUE bugs while processing arrays are actually fairly common in java programs in 2025, I fixed one a few weeks back and it's something I look for in code reviews.
I guess it would have been surprising in 2006?
- brabel 2y agoIn 2006, if you tried to create an array with 2^30 elements you would just get an OutOfMemoryError almost anywhere.
- masklinn 2y agoAMD's 64b CPU were released in 2003, Intel followed up in 2004, and in 2006 launched their first 64b laptop chip (with Core 2). By then the ability to reasonably allocate more than 1GB in one shot was becoming quite widespread (the mid 2007 MBPs could be upgraded to 6GB RAM). And obviously Google would have been dealing with servers, where it'd be even older as they'd probably have been using PAE and each process would be able to allocate and address a full 4GB.
- brabel 2y agoNot sure if you're a troll... but for general info, in 2006 most desktop computers (laptops were still not so common) had something like 100MB of RAM if you were lucky. Maybe Google already had some huge machines with 1GB+ but that was not at all a common thing outside supercomputers.
- aspenmayer 2y agoI think you’re off by a decade or so. Common consumer laptops had 2-4 GB of RAM in 2006. https://everymac.com/systems/apple/macbook_pro/specs/macbook-pro-core-2-duo-2.33-17-specs.html https://everymac.com/systems/apple/macbook_pro/specs/macbook...
- brabel 2y agoJust like today you can buy machines with 128GB of RAM... but that doesn't mean that's what people were using... a lot of people buy machines with 4GB today (just checked the most popular website in my country, lots of the offers only have 4GB: https://www.elgiganten.se/datorer-kontor/datorer/laptop https://www.elgiganten.se/datorer-kontor/datorer/laptop). I remember pretty clearly that if you had anywhere above 512MB of RAM in 2006 you had very much top-of-the-line.
- aspenmayer 2y ago> I remember pretty clearly that if you had anywhere above 512MB of RAM in 2006 you had very much top-of-the-line. That’s a different claim than your original statement of having 100MB max.
- brabel 2y agoI am so sorry for not being 100% accurate.
- aspenmayer 2y agoI don't mean to invalidate your experience, as computers and parts prices have varied a lot historically and geographically. My point was to give some context with what was then a decent laptop with the understanding that some setups might be even more high end, and that legacy systems would have lower specs, similar to what you mentioned.
- masklinn 2y agoYou are not "not being 100% accurate", you are 100% inaccurate while accusing people of trolling.
- saalweachter 2y agoEh, 2006 was right on the cusp of the 32-bit/64-bit flip. 32-bit was still pretty common, but my first task at my first job that year was migrating a search app to compile as a 64-bit binary, for servers that had (I believe) 8GB. They were good-sized servers for the time, but not particularly exotic, commodity hardware at a startup.
- Smithalicious 2y agoYou think Windows Vista ran on 100MB of RAM? I wish!
- brabel 2y agoI was still on Windows 98 :D, that could easily run on 64MB.
- deleted 2y ago[deleted]
- spixy 2y agoWhy are they common in java? In .net or node.js I dont think I have ever had one.
- xmcqdpt2 2y agoI don't know, maybe I review code that uses arrays more?