Monday, 23 July 2018
Writing a Python Program: Tools
Real Developers use vi at the command line and have memorised the every single Python library. Actually, Read Developers probably don't use Python. This is for the rest of us.
There’s no question of anyone knowing all the Python libraries by heart, let alone by muscle memory. It’s impossible for any one mere mortal to know the Excel VBA object model and all the constants. That’s why VBA has Intellisense, which Microsoft patented, forcing everyone else to provide a slightly cut back version called ‘auto-complete’. PyCharm has autocomplete, but not the full-fledged Intellisense. Auto-complete doesn’t walk you through all the parameters for a function, nor offer values when the number of options is less than about five. Microsoft spent all that money developing Intellisense because they knew if would pay back in productivity and user loyalty.
The minimalist Python IDE is IDLE, which doesn’t have a visual form editor. To find the typos in your code, you have to run the program and then deal with the messages from the python debugger. That’s what makes it minimalist.
PyCharm Community Edition has a neat feature where it puts red line in the right of the code screen against the lines it thinks are wrong in some way, thus sparing you doing debugging runs to find the bits where you forgot to put ‘:’ at the end of a ‘def’. This helps, but if the interpreter spots something else wrong while your code is running, you have to correct it and start over.
This is when one realises that the VBA editor / debugger is a thing of utter wonder. Being able to do on-the-fly code correction while debugging is like having a superpower. No other IDE provides it. A search for the reason brought up a comment from someone on the original VBA project to the effect that the trick was keeping track of all the threads and re-aligning them when the user had re-coded and started from some earlier point in the program that they halted. That is nowhere near as easy to do as it is to say.
While it doesn’t take much time to stop, edit, and re-run code from the start, as PyCharm and all the others force us to do, compared with the Microsoft Way, it just feels clunky. To me.
I'm going to try Visual Studio Code from Microsoft next time I do something. The demo looks interesting. Anything to get on-the-fly debugging again.
But then Real Developers don't need to debug.
(PS: It's too hot for me to keep up my usual schedule. Normal service will be resumed when this hot spell breaks.)
Labels:
Computing
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment