I am taking this Programming Competitions Preparations class. The problems are all horribly unrealistic and not represenative of Software Engineering at all, but then again, they are not really meant to be.
Problems are solved in a two hour period in a team, typically of 3-5 students.
Well, my team realized that today's problem could be easily solved if we plotted points on a grid.
Hmm, lets see now. The largest a coordinate can be is 40,000. Ok simple, declare a 40,000 X 40,000 array of booleans.
Oh, too large for the stack, ok, declare it on the heap.
Umm, hey why is this taking so long.
Wait, what is 40k * 40k again? Oh crap.
Just for laughs, open up Task Manager and hit "Run", watch the VM usage go up to 1.90GB. Hey, look, I can see principles from my Operating Systems class in action! Awesome!
Hey, wait, did Windows just swap everything out to disk? Wow, everything is taking awhile to get back in order.
So, who here can quickly implement a sparse matrix?
To be fair, such stupidities only occure because there is a hard time limit. Normally I would never hard code in an array of anything near that size. Indeed, I do not know of any students here who would ever hard code in an array and say "That should be enough".