Sunday, October 16, 2016

Redneck's python debugger,screen shot



There we have it, exactly 50 lines of code will lay out the Redneck's Debugger for Python.
We have the source to the left, watch display to the right; both text boxes.  Seven buttons, set and del breaks, set and clear watch, open file, quite and run. The source text box will put up scroll bar as needed.

The file button simply calls the library file chooser.  The run  button simply executes sequentially lines of code, there is no 'go into button',  Eventually run quits the loop at end of file, or it find one line in the break point list, and exits the loop, calling the break point handler.  None of the call backs is more than 20 lines of code, the entire Redneck debugger should come in as less than 200 lines of python,  The text box should handle the scroll bar.

What was the constraint in doing this?
For an old windowing guy, I go straight to the reference to see how to manage lay out parameters and layout order in tkinter.  Every experienced programmer does this as they hop from one windowing language to another, its a one or two day ordeal.  But it is a one time shot, so the hiring manager does not care about python, he wants to know if you cut your teeth and one or more windowing systems, then he is willing to pay the set up time.

What is a Redneck programmer?
We say, screw the rules, we are going to write spaghetti code.  I have put the source in a web page, unseen.  Give me a day or to of additions, then I will give up the source link  This is extremely light weight, use this when a snippet of spaghetti needs analysis.

No comments: