Post thumbnail of Useful rpmbuild macros
3 December 2010
Continue reading Useful rpmbuild macros

Useful rpmbuild macros

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.

Post thumbnail of How to debug wxPython errors when your applications crash
20 October 2009
Continue reading How to debug wxPython errors when your applications crash

How to debug wxPython errors when your applications crash

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).

Post thumbnail of Running bash shell scripts in debug mode to trace execution
26 August 2009
Continue reading Running bash shell scripts in debug mode to trace execution

Running bash shell scripts in debug mode to trace execution

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.

Post thumbnail of Toggling debug output within a PHP class
6 August 2009
Continue reading Toggling debug output within a PHP class

Toggling debug output within a PHP class

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.

Powered by Wordpress   |   Lunated designed by ZenVerse