2 ms·
And Part 2/2: file.seek is your friend. You should not use any dynamic allocation to make it more robust (yes preallocating fixed memory size with "char circul
by SFJulie2 11y ago
And Part 2/2:
file.seek is your friend. You should not use any dynamic allocation to make it more robust (yes preallocating fixed memory size with "char circular_ring[N * MAX_SIZE]")
Where N and MAX_SIZE are fixed.
Well. It requires a complete rewrite for this code to not create a risk for your users. Your code is like full of hidden landmine by lack of design.
And you know what?
It used to be standard knowledge for introduction to CS for scientific. You know why? Because no users of computers like to lose their precious data made during a very long measurement spilling huge amount of data and costing a lot of resources. (like gold, helium, molybden, electricity, time, wages of qualified operators....)
It seems like coders do not care of their users, like a builder thinking it is reasonable to build 50 store buildings on quicksands because people only judges builder by the look of their creation.
- dang 11y agoPlease don't do this. Instead, vouch for a dead comment if you think it shouldn't be dead. We banned SFjulie1: https://news.ycombinator.com/item?id=11141174 https://news.ycombinator.com/item?id=11141174. If you violate the rules of this community that badly, you forfeit the right to comment here. We detached this comment from https://news.ycombinator.com/item?id=11141103 https://news.ycombinator.com/item?id=11141103 and marked it off-topic.