Utilizing macros can make life easier when you’re dealing with building on, and for, multiple platforms. Why bother with hard-coding full paths to system utilities when you can simply refer to them by their macro name? These can also be useful for avoiding things like rpm check-files errors, installed (but unpackaged) file(s) found, and debuginfo related stuff.
After your done building your wx objects and you’re ready to show it and call MainLoop(), wrap your main loop where you actually instantiate your gui objects in try/accept statements so that you can really catch any errors by calling the “show_errors()” function to launch a new message window where the errors will get displayed. This lets you catch errors before your whole program dies (causing errors to get lost).
This is so handy, I can’t believe i’ve never used or even heard of this until today! You can easily run your bash shell scripts in debug mode to watch what they’re doing behind the scenes in real time. You get to see the levels of nesting when you’re inside loops and variables get replaced with their actual contents at the time of execution.
This might come in handy if you have multiple levels of nesting in ‘for’ and ‘while’ loops or a few if/then/else statements and you want to see just what is getting passed in the comparisons.
I don’t care what anyone says, I like lots of debug output available in my programs. It helps me crank out code faster with less errors. You can keep a private member called debug and just flip it on and off when you want to see the output. It’s a lot cleaner than interjecting prints and echos all over the place.