Reading Notebook: 23-Apr-09
Friday, April 24th, 2009Comments in italics are mine and express my own views, thoughts and opinions
Developer’s Guide to Debugging by M. Wloka, et al.:
debugging as reverse engineering (p. 169)
two camps of source commenters (pp. 169 - 170) - I personally tend to belong to the camp of writers of self-documentary code
workaround turns a bug once the underlying cause is fixed (p. 171)
consistent coding style (p. 171) - I fully agree and when I fix a bug I adopt whatever coding style is used in the code
naming style (pp. 171 -172) - Here I would say that MS prefers its own styles (Hungarian notation) instead of C++ standard library and I prefer to use the former when writing programs on Windows except maybe short illustrative examples for language features and exception processing. And I don’t like underscores as name separators.
spreading the code (p. 172) - I even tend to split complex logical expressions into several lines of code
avoiding macros (pp. 173 - 178) - regarding macros in C/C++: an idea came to me for the need to have a program or WinDbg extension that gives you macro text for any given number. For example, a window message text, an status or error value text, and so on. This would be handy for raw debugging or postmortem crash dump analysis
debugging preprocessor output via a compiler switch (pp. 176 - 177)
external preprocessors like m4 (pp. 177 - 178) - I’m considering to use an external preprocessor for the Riemann programming language I invented.
custom debugging functions in code to call from a debugger (pp. 179 - 181)
writing analysis functions (p. 180) - I used this when writing a word processor long time ago to check the consistency of internal structures: http://www.dumpanalysis.org/blog/index.php/2006/12/16/real-programmers-no-impossible-code/
coupling tracing with postmortem dumps (pp. 181 - 182) - See also Historical Information and Execution Residue patterns: http://www.dumpanalysis.org/blog/index.php/2007/11/06/crash-dump-analysis-patterns-part-34/ and http://www.dumpanalysis.org/blog/index.php/2008/04/29/crash-dump-analysis-patterns-part-60/. Also in Citrix environments we use CDF logging which can be circular coupled with memory dump analysis
static checking as an aid in debugging (pp. 183 - 190) - I recall that when I was working at Programming Research Ltd. on their static QA C++ checker and particular STL usage checks we used it against our own C++ code and I confess that there was no need to use GDB. In a few times when program crashed I used logging to narrow down the statement
cleanup session to eliminate all compiler warning (p. 184) - I hate compiler warnings too and change code until they disappear
Finished this book!!! Edited notes also appear in Software Engineering Notebooks, Volume 1 (ISBN: 978-1906717148) later this year
Advanced Windows Debugging by M. Hewardt and D. Pravat:
Concurrent Programming on Windows by J. Duffy:
Software Factories by J. Greenfield, et. al.:
Software Engineering Foundations: A Software Science Perspective, by Y. Wang:
Didn’t have time today - resume reading next week
- Dmitry Vostokov @ SoftwareGeneralist.com -