3 ms·
This is pretty interesting to me. "stack, dynamic memory, pointers and so on" for the most part is not something I've had to think about while programming in th
by Hominem 15y ago
This is pretty interesting to me. "stack, dynamic memory, pointers and so on" for the most part is not something I've had to think about while programming in the last couple years. For the most part I can ignore them, and I doubt any new developers that learn on the job would pay any special attention to these issues, but there is always a case that pops where this knowledge suddenly becomes very important, and having the background knowledge is important.
Let me give you an example. I got called in to diagnose a problem with a c# web service. They were getting constant OutOfMemory exceptions. The team's solution was to increase memory and then throw up their hands when it that didn't fix the issue. After looking at the code I saw that they were creating a 500mb string. They figured this was a-ok because they had 4gb of memory. They did not know what a string really is, even in a language like C# the memory has to be contiguous. If they had ever worked with C they would have known this and we could have saved time and money.