Saturday, November 17, 2007

ANTS Profiler with .NET bad coding style

look to what this guys is saying about ANTS Profiler.


IMHO: I think he didn't had a clear strategy on how to search/hunt/fix memory leaks and memory exhaustion for many reasons:

1. you must use a tool to check for memory leaks; if so - which is the one they used and failed - it's important that we all the others know what to avoid :-)

2. you must profile your code for memory leaks and execution times in a very-white-box-manner. personally I think that every single error and every single function should be traced, checked for errors, profiled with scope-lexical-instances, traced about input, about output. you should have the code in such way that simply by running it in debug mode with tracing activated at highest level - the code is debugging itself. it tells you where there is a problem asap - so you can fix it.

3. if you choose the hack to 'restart to avoid leaks' - then why doing this at fixed intervals or fixed rules - and not dynamic based on a monitoring application on the same computer ? if you worry memory-leaks - why not restarting when total memory is 90% full and increasing ?

4. if you do code-review (and peer reviews among members generally) the choices are:
- the problematic code had a comment/reminder like 'possible issue'; then it's a problem of execution/checkings
- the problematic code hadn't comments/etc - so review was done lame


My major point: this tool may be just fine. But it is very lame to just get a tool (auto-magical-detector) and hope all the issues are gone. code management / organization / practices / reviews are a mandatory for any coding-success.


I admit it's so easy to talk about other people's failures.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home