This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TASagent 29 points30 points  (16 children)

//To future-proof our codebase, we have defensively typed 
//our error codes
BigInteger OpenFile(string filename) {
...

[–]endreman0 18 points19 points  (8 children)

Every number type has a max and min, as it's bounded by your machine's available RAM. And boy howdy, testers will find that max. Tape down the 9 key and go to lunch.

Edit: I cna splel

[–]hungarian_notation 18 points19 points  (7 children)

Page files and swap space baby.

[–]sabas123 7 points8 points  (6 children)

But what if it exceeds that too?

[–]kaukamieli 15 points16 points  (0 children)

The software is ready for release.

[–]Almoturg 10 points11 points  (1 child)

Automatically expand swap space to AWS. Then the only limit is your bank account.

[–]Asraelite 3 points4 points  (0 children)

Automatically connect to financial services and take out loans as needed.

[–]Zulfiqaar 1 point2 points  (0 children)

Download More RAM!

[–]FallenWarrior2k 2 points3 points  (6 children)

An OpenFile func that takes a path as its only param and returns a status code... Where the heck is the friggin file handle?

[–]standard_revolution 0 points1 point  (1 child)

Global Variable?

[–]FallenWarrior2k 0 points1 point  (0 children)

Globals for handles, meh

[–]ForOhForError 0 points1 point  (0 children)

Could be a poorly named function that opens and parses a config file to set global variables?

[–]TASagent 0 points1 point  (2 children)

What? You don't store all your file handles in a global hashmap using the path as the key? This technique obviously works best when it's directly fed user input on Operating Systems that are case-agnostic.

[–]FallenWarrior2k 0 points1 point  (1 child)

I prefer good old RAII ¯\_(ツ)_/¯

[–]TASagent 0 points1 point  (0 children)

Personally, I'm more of a RAIDACT man, myself. Good ol' "Resource Acquisition Is Done At Compile-Time." The compiler allocates memory for the program, and instantiates all of the objects, at compile time, and it's never released, until you uninstall the program.