Re: Friday finking: IDE 'macro expansions'
On 19/03/2023 01.27, 2qdxy4rzwzuui...@potatochowder.com wrote: On 2023-03-18 at 11:49:24 +, "Weatherby,Gerard" wrote: For templating, I have two Python programs for starting new work. One generates a standalone Python program with the Python shebang, a __main__ which calls def main(), and logging and argparser intialization. The other generates a pyproject.toml /setup.cfg directory structure with a main.py referenced as a console script. from setup.cfg You don't describe the process for using those programs, but if you "have two Python programs," then it sounds like you're *not* using the IDE/editor for that. (I'm not judging, I'm trying to relate your answer to dn's original question.) It is a good example of a facility or 'power' of an IDE - even if there's room for more information... The team I'm currently assisting has decided to use Poetry. PyCharm will create a new project, populating basic files, more-or-less as @George described. In the same way, if one prefers a venv (etc) instead of a Poetry structure, PyCharm will set things up similarly. Accordingly, it saves a lot of time, fiddling-about creating a bunch of (basically) empty files and sub-dirs. (that said, there a plenty of operations which have a blank-project template which can be copied-in and renamed...) Continuing the story, let's say the project calls for a PyPi-based* library, eg more_itertools, or there's a team 'standard', eg pytest; then these can be selected from a PyCharm-provided list (no need to go to PyPi to download) AND that operation will also be reflected in the pyproject.toml file. * cf one from the PSL In other words, the build file has been created and continually-maintained, by the IDE, ready for when the project is to be uploaded to a library or exported to target-machines; cf the 'tradition' of an extra, last, and not looked-forward-to, step in the process! For an opposing view, I'm much more likely to copy an old project (at the command line, often with sed) and then use my editor to morph it into a new project. IME, unless there's an imposed process, those templates and programs tend to experience bitrot, whereas going back to an old program gives me the chance to keep it up to date w.r.t. what I've learned more recently, which helps reinforce said learning. Yes... (guilty as charged!) Equally, may promulgate old habits and a lower-quality (related to the depth of learning, back-then cf 'now'). -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Friday finking: IDE 'macro expansions'
On 2023-03-18 16:06:49 +, Alan Gauld wrote: > On 18/03/2023 12:15, Peter J. Holzer wrote: > >> I think you might be meaning TurboPascal, Delphi's forerunner. It just > >> had a compiler and text editor. > > > > I'd still classify Turbo Pascal as an IDE. It wasn't a standalone > > compiler you would invoke on source files you wrote with some other > > It had both I didn't mention that because I think it is irrelevant to the question whether Turbo Pascal as an IDE or not. What is relevant IMNSHO is that it did indeed provide an "integraded environment" for "developing", combining all those tools which were traditionally separate in one user interface. > Indeed, but it was intrinsic to Delphi (even though you could > write non GUI apps too, but they required extra effort.) > Eclipse et al have GUI builders available as extras, in Delphi > (and Lazurus) it is hard to avoid. This is starting to sound like "Delphi is the only True™ IDE". hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Friday finking: IDE 'macro expansions'
On 18/03/2023 12:15, Peter J. Holzer wrote: >> I think you might be meaning TurboPascal, Delphi's forerunner. It just >> had a compiler and text editor. > > I'd still classify Turbo Pascal as an IDE. It wasn't a standalone > compiler you would invoke on source files you wrote with some other It had both (although I'm not sure when that was introduced, the original didn't). Mostly you used the IDE/editor but there was a command line compiler that you could run (and a make-like project tool too in the later versions). I started with TurboPascal on DOS at Uni generating COM files then later used TP versions 4, 5.5(with added OOP!) and 6 professionally, creating EXE file DOS programs. Up until I switched to a Mac, a year ago, I still had TP6 and used it to maintain some old TurboVision DOS programs. But I used Delphi from version 1 through to 7(?) for all my Windows programming and still have version 3 installed (via VirtualBox on Linux) to keep some old shareware apps of mine running. I often think there are a lot of similarities between Delphi/Object Pascal and Python in the OOP area. > it, see the errors directly in the source code. I think it even had a > debugger which would also use the same editor window (Turbo C did). I think the debugger came in v3, but i could be wrong. I don't recall there being one at uni... > Turbo Pascal predated GUIs, so it wouldn't have a GUI builder. No, it did have a windowing toolkit(TurboVision) but no visual UI builder. That was the big new feature of Delphi. > application (i.e. not a learning project) with a traditional desktop GUI > for 20 years) so the presence or absence of a GUI builder isn't an > essential criterion on whether something is or is not an IDE. Indeed, but it was intrinsic to Delphi (even though you could write non GUI apps too, but they required extra effort.) Eclipse et al have GUI builders available as extras, in Delphi (and Lazurus) it is hard to avoid. BTW Delphi (v11) and the other Borland tools are still going strong, albeit at extortionately high prices: $1000~3000 for the pro versions! (But there is still a free community version with just the basics.) See http://www.embarcadero.com And it's targeted at multi-platforms now: Windows, MacOS, Android, iOS although it only runs on Windows. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Friday finking: IDE 'macro expansions'
Peter J. Holzer schreef op 18/03/2023 om 13:15: On 2023-03-18 08:46:42 +, Alan Gauld wrote: > On 17/03/2023 17:55, Thomas Passin wrote: > >> I used Delphi and Smalltalk/V which both pretty much only exist within > >> their own IDEs and I used their features extensively. > > > > Back when Delphi first came out, when I first used it, I don't remember > > any IDE; one just used a text editor. > > I think you might be meaning TurboPascal, Delphi's forerunner. It just > had a compiler and text editor. I'd still classify Turbo Pascal as an IDE. It wasn't a standalone compiler you would invoke on source files you wrote with some other tool. It was a single program where you would write your code, compile it, see the errors directly in the source code. I think it even had a debugger which would also use the same editor window (Turbo C did). Oh yes, Turbo Pascal was definitely an IDE. It was actually pretty similar to the GUI applications we have today, even though it was all text based. It had a menu bar with pull-down menus, it had popup windows. The look and feel is pretty similar to that of Midnight Commander (mc) nowadays, for those who know that. Like you say it had an editor (obviously) and an integrated compiler, and indeed an integrated debugger, with watches and all, much like you would see in an IDE today. See this screenshot for example: https://daynhauhoc.s3.dualstack.ap-southeast-1.amazonaws.com/original/3X/7/8/782423b53bb6531d43c3c2075cb4a00f4ac7a5c0.png For people too young to have used such semi-graphical applications in the past, you can find plenty of screenshots when you do an image search for turbo pascal. Turbo Pascal was obviously not as advanced as the IDEs we have today, but it was definitely an IDE, and it had all the basic functions that one would expect from an IDE. -- "Most of us, when all is said and done, like what we like and make up reasons for it afterwards." -- Soren F. Petersen -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Friday finking: IDE 'macro expansions'
On 3/18/2023 8:15 AM, Peter J. Holzer wrote: On 2023-03-18 08:46:42 +, Alan Gauld wrote: On 17/03/2023 17:55, Thomas Passin wrote: I used Delphi and Smalltalk/V which both pretty much only exist within their own IDEs and I used their features extensively. Back when Delphi first came out, when I first used it, I don't remember any IDE; one just used a text editor. I think you might be meaning TurboPascal, Delphi's forerunner. It just had a compiler and text editor. I'd still classify Turbo Pascal as an IDE. It wasn't a standalone compiler you would invoke on source files you wrote with some other tool. It was a single program where you would write your code, compile it, see the errors directly in the source code. I think it even had a debugger which would also use the same editor window (Turbo C did). Yes, TurboPascal was a brilliant product for its time. And it was much cheaper than getting, say, a complete C compiler package, and way easier and faster to use. But Delphi from day 1 was an IDE designed to compete with Visual Basic. Everything was geared around the GUI builder. Turbo Pascal predated GUIs, so it wouldn't have a GUI builder. Also not everything you develop needs a GUI (in fact I haven't written a real application (i.e. not a learning project) with a traditional desktop GUI for 20 years) so the presence or absence of a GUI builder isn't an essential criterion on whether something is or is not an IDE. hp -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Friday finking: IDE 'macro expansions'
On 3/18/2023 4:46 AM, Alan Gauld wrote: On 17/03/2023 17:55, Thomas Passin wrote: I used Delphi and Smalltalk/V which both pretty much only exist within their own IDEs and I used their features extensively. Back when Delphi first came out, when I first used it, I don't remember any IDE; one just used a text editor. I think you might be meaning TurboPascal, Delphi's forerunner. It just had a compiler and text editor. But Delphi from day 1 was an IDE designed to compete with Visual Basic. Everything was geared around the GUI builder. You could write code outside the IDE but it was orders of magnitude more difficult. Maybe my memory has faded too much! I remember porting some of my TurboPascal code to Delphi and wrapping it with the Delphi-Windows GUI instead of my own, pre-Delphi one. The details are hazy, though ... The Lazarus open source project is based on Delphi's IDE. -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
On 2023-03-18 at 11:49:24 +, "Weatherby,Gerard" wrote: > For templating, I have two Python programs for starting new work. One > generates a standalone Python program with the Python shebang, a > __main__ which calls def main(), and logging and argparser > intialization. The other generates a pyproject.toml /setup.cfg > directory structure with a main.py referenced as a console > script. from setup.cfg You don't describe the process for using those programs, but if you "have two Python programs," then it sounds like you're *not* using the IDE/editor for that. (I'm not judging, I'm trying to relate your answer to dn's original question.) For an opposing view, I'm much more likely to copy an old project (at the command line, often with sed) and then use my editor to morph it into a new project. IME, unless there's an imposed process, those templates and programs tend to experience bitrot, whereas going back to an old program gives me the chance to keep it up to date w.r.t. what I've learned more recently, which helps reinforce said learning. > From: Python-list on > behalf of dn via Python-list > Date: Thursday, March 16, 2023 at 6:59 PM > To: 'Python' > Subject: Friday finking: IDE 'macro expansions' > *** Attention: This is an external email. Use caution responding, opening > attachments or clicking on links. *** > > It is a long, long, time since I've thrown one of these into the > maelstrom of our musings. > (have the nightmares receded?) > > > Do you make use of your IDE's expansionist tendencies, and if-so, which > ones? [...] -- I can eat glass, it does not hurt me. Dan Sommers, http://www.tombstonezero.net/dan -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Friday finking: IDE 'macro expansions'
On 2023-03-18 08:46:42 +, Alan Gauld wrote: > On 17/03/2023 17:55, Thomas Passin wrote: > >> I used Delphi and Smalltalk/V which both pretty much only exist within > >> their own IDEs and I used their features extensively. > > > > Back when Delphi first came out, when I first used it, I don't remember > > any IDE; one just used a text editor. > > I think you might be meaning TurboPascal, Delphi's forerunner. It just > had a compiler and text editor. I'd still classify Turbo Pascal as an IDE. It wasn't a standalone compiler you would invoke on source files you wrote with some other tool. It was a single program where you would write your code, compile it, see the errors directly in the source code. I think it even had a debugger which would also use the same editor window (Turbo C did). > But Delphi from day 1 was an IDE designed to compete with Visual > Basic. Everything was geared around the GUI builder. Turbo Pascal predated GUIs, so it wouldn't have a GUI builder. Also not everything you develop needs a GUI (in fact I haven't written a real application (i.e. not a learning project) with a traditional desktop GUI for 20 years) so the presence or absence of a GUI builder isn't an essential criterion on whether something is or is not an IDE. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
I send ~99% of Python coding time in PyCharm. Likewise, IntelliJ and Clion for Java and C++, respectively. Mostly use: Tab completion for variable names Letting PyCharm figure out imports for me, and cleaning up old, unused imports. Jumping to definitions of symbols. Tellling me I’ve made a type error before unit testing the code by highlighting it in yellow. Occasionally I’ll jump through the hoops to connect it to our Postgresql database to help verify SQL, but it’s not usually worth the trouble. For templating, I have two Python programs for starting new work. One generates a standalone Python program with the Python shebang, a __main__ which calls def main(), and logging and argparser intialization. The other generates a pyproject.toml /setup.cfg directory structure with a main.py referenced as a console script. from setup.cfg From: Python-list on behalf of dn via Python-list Date: Thursday, March 16, 2023 at 6:59 PM To: 'Python' Subject: Friday finking: IDE 'macro expansions' *** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. *** It is a long, long, time since I've thrown one of these into the maelstrom of our musings. (have the nightmares receded?) Do you make use of your IDE's expansionist tendencies, and if-so, which ones? NB this is where vi/emacs enthusiasts start chuckling (polite term for 'insane cackling'). Hence the question's limitation to IDEs, cf 'editors'! Also: I'm talking 'PyCharm' because of the story, but others use Codium, Sublime Text, etc - which presumably offer equivalent features. Was helping a friend install PyCharm. Jumped into the Settings. Isn't it incredible how many there are? Idly noted that there are two short-cut or macro-expansion types of facilities: - Postfix Completion, (nothing to do with email or polish notation) and - Live Templates (again, we're not talking about jinja2) With both, one types an abbreviated-name and the IDE will expand it into appropriate code. For (LiveTemplate) example, typing compli and pressing Tab induces PyCharm to add the following to the program[me]: [ ! for ! in !drop-down menu! if ! ] It offers further typo-saving through the drop-down menu which lists a bunch of likely (iterable) candidates from amongst previously-written code. The action continues after selecting from the menu, by inviting completion of the other ("!") placeholders, in-turn. I haven't made use of such a tool, to-date - OK, yes, I have practised a high typing-speed (and accuracy). Puff, puff... Also, at the time, I'm thinking in 'code', rather than about what tool might implement said ideas. Do you make use of such expansionist-tendencies? Do you make use of other powerful features within the IDE, or are its editor functionalities employed at pretty-much the NotePad level? Web.Refs: https://urldefense.com/v3/__https://www.jetbrains.com/help/pycharm/settings-postfix-completion.html__;!!Cn_UX_p3!l5XlkM7xExYMxpwFOxIvLPLSWPm_iu_aRv0WpnvCW2353FzsFjuJKfOYr-rCsnE915Rk59u6F4CgKPuF7fWLqicNTA$<https://urldefense.com/v3/__https:/www.jetbrains.com/help/pycharm/settings-postfix-completion.html__;!!Cn_UX_p3!l5XlkM7xExYMxpwFOxIvLPLSWPm_iu_aRv0WpnvCW2353FzsFjuJKfOYr-rCsnE915Rk59u6F4CgKPuF7fWLqicNTA$> https://urldefense.com/v3/__https://www.jetbrains.com/help/pycharm/using-live-templates.html*live_templates_types__;Iw!!Cn_UX_p3!l5XlkM7xExYMxpwFOxIvLPLSWPm_iu_aRv0WpnvCW2353FzsFjuJKfOYr-rCsnE915Rk59u6F4CgKPuF7fUOn2vrzA$<https://urldefense.com/v3/__https:/www.jetbrains.com/help/pycharm/using-live-templates.html*live_templates_types__;Iw!!Cn_UX_p3!l5XlkM7xExYMxpwFOxIvLPLSWPm_iu_aRv0WpnvCW2353FzsFjuJKfOYr-rCsnE915Rk59u6F4CgKPuF7fUOn2vrzA$> -- Regards, =dn -- https://urldefense.com/v3/__https://mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!l5XlkM7xExYMxpwFOxIvLPLSWPm_iu_aRv0WpnvCW2353FzsFjuJKfOYr-rCsnE915Rk59u6F4CgKPuF7fUQeq7a_w$<https://urldefense.com/v3/__https:/mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!l5XlkM7xExYMxpwFOxIvLPLSWPm_iu_aRv0WpnvCW2353FzsFjuJKfOYr-rCsnE915Rk59u6F4CgKPuF7fUQeq7a_w$> -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Friday finking: IDE 'macro expansions'
On 17/03/2023 17:55, Thomas Passin wrote: >> I used Delphi and Smalltalk/V which both pretty much only exist within >> their own IDEs and I used their features extensively. > > Back when Delphi first came out, when I first used it, I don't remember > any IDE; one just used a text editor. I think you might be meaning TurboPascal, Delphi's forerunner. It just had a compiler and text editor. But Delphi from day 1 was an IDE designed to compete with Visual Basic. Everything was geared around the GUI builder. You could write code outside the IDE but it was orders of magnitude more difficult. The Lazarus open source project is based on Delphi's IDE. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
On 18/03/2023 02.44, Thomas Passin wrote: On 3/17/2023 9:38 AM, Simon Ward wrote: On Fri, Mar 17, 2023 at 02:05:50PM +0100, Roel Schroeven wrote: Even better than simply highlighting is (IMO) a thing called "Rainbow Braces" or "Bracket Pair Colorization" I recently learned about: both braces of a matching pair get the same color, while other pairs get other colors. I have to say I like it quite a lot. It's in VS Code these days; possible there are implementations or extensions for other editors and IDEs as well. VS Code also supports ‘semantic highlighting’: Instead of simply highlighting syntax, highlight the same identifiers in the same colours, with the aim of helping you see them through the flow of the code. Even with a simple "Find" command I don't like that behavior, let alone for programming. I find that all those other marked instances make it harder for me to read the surrounding material. They are good for moving from one instance to another, but otherwise they get in the way for me. Haven't seen the coloring feature as-described. As the number of identifiers increased, suspect it would become gaudy or the color shading too subtle for my eyes. +1 'Busy pictures' can be distracting. That said, the syntax-highlighting can provide the occasional cue that something has gone-wrong. However, will I recognise it from the mis-coloring, or from other evidence first? The semantic point might be easily under-estimated. A 'simple find' may not be helpful - a web-search for Python turns-up irrelevant information about snakes! Regarding the tracing of an identifier: PyCharm has two features: - with cursor/caret on/at a single use of an identifier, it will highlight other usage, elsewhere in that module's code - (context menu) FindUsages will bring-up a two-pane window. The left-pane shows a tree-structure of the project, modules, etc, down to a listing of each code-line where the identifier is used. Highlighting one of those (at a time), will show the context around that particular line/usage. The right-pane is editable! The great thing about these features is that they are semantically-aware (is that a real term?). For example, if I were (foolish enough) to name an identifier "the", such searches will not 'hit' the same word inside a comment or docstring. Better still, the above motivation continues into a (context menu) Refactor facility. This, one might consider to be a semantic Find-Replace. Often employ when helping others to clarify their code/Code Review - or when I'm 'just coding' and have quickly defined an identifier without a lot of thought, but later (ie when come to make use of it) realise a better alternative and more descriptive name. -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Friday finking: IDE 'macro expansions'
On 2023-03-17 17:55, Thomas Passin wrote: On 3/17/2023 1:13 PM, Alan Gauld wrote: Oops! I meant to send this to the group not just Dave. Forwarded Message On 16/03/2023 22:55, dn via Python-list wrote: Do you make use of your IDE's expansionist tendencies, and if-so, which ones? When I'm writing Java/C++/C# yes, I need all the IDE help I can get. Netbeans or Eclipse being my tools of choice. And in my Windows days I used Delphi and Smalltalk/V which both pretty much only exist within their own IDEs and I used their features extensively. Back when Delphi first came out, when I first used it, I don't remember any IDE; one just used a text editor. I used Turbo Pascal and then Delphi 3 or 4, back when it was still Borland. When writing Python I use IDLE, or vim for bigger jobs. IDLE does have some suggestions and auto tricks but I don't always use them. In vim I use auto-indent and that's about it. -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Friday finking: IDE 'macro expansions'
On 3/17/2023 1:13 PM, Alan Gauld wrote: Oops! I meant to send this to the group not just Dave. Forwarded Message On 16/03/2023 22:55, dn via Python-list wrote: Do you make use of your IDE's expansionist tendencies, and if-so, which ones? When I'm writing Java/C++/C# yes, I need all the IDE help I can get. Netbeans or Eclipse being my tools of choice. And in my Windows days I used Delphi and Smalltalk/V which both pretty much only exist within their own IDEs and I used their features extensively. Back when Delphi first came out, when I first used it, I don't remember any IDE; one just used a text editor. When writing Python I use IDLE, or vim for bigger jobs. IDLE does have some suggestions and auto tricks but I don't always use them. In vim I use auto-indent and that's about it. -- https://mail.python.org/mailman/listinfo/python-list
Fwd: Friday finking: IDE 'macro expansions'
Oops! I meant to send this to the group not just Dave. Forwarded Message On 16/03/2023 22:55, dn via Python-list wrote: > Do you make use of your IDE's expansionist tendencies, and if-so, which > ones? When I'm writing Java/C++/C# yes, I need all the IDE help I can get. Netbeans or Eclipse being my tools of choice. And in my Windows days I used Delphi and Smalltalk/V which both pretty much only exist within their own IDEs and I used their features extensively. When writing Python I use IDLE, or vim for bigger jobs. IDLE does have some suggestions and auto tricks but I don't always use them. In vim I use auto-indent and that's about it. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
On 3/17/2023 9:38 AM, Simon Ward wrote: On Fri, Mar 17, 2023 at 02:05:50PM +0100, Roel Schroeven wrote: Even better than simply highlighting is (IMO) a thing called "Rainbow Braces" or "Bracket Pair Colorization" I recently learned about: both braces of a matching pair get the same color, while other pairs get other colors. I have to say I like it quite a lot. It's in VS Code these days; possible there are implementations or extensions for other editors and IDEs as well. VS Code also supports ‘semantic highlighting’: Instead of simply highlighting syntax, highlight the same identifiers in the same colours, with the aim of helping you see them through the flow of the code. Even with a simple "Find" command I don't like that behavior, let alone for programming. I find that all those other marked instances make it harder for me to read the surrounding material. They are good for moving from one instance to another, but otherwise they get in the way for me. -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
On Fri, Mar 17, 2023 at 02:05:50PM +0100, Roel Schroeven wrote: Even better than simply highlighting is (IMO) a thing called "Rainbow Braces" or "Bracket Pair Colorization" I recently learned about: both braces of a matching pair get the same color, while other pairs get other colors. I have to say I like it quite a lot. It's in VS Code these days; possible there are implementations or extensions for other editors and IDEs as well. VS Code also supports ‘semantic highlighting’: Instead of simply highlighting syntax, highlight the same identifiers in the same colours, with the aim of helping you see them through the flow of the code. Simon -- A complex system that works is invariably found to have evolved from a simple system that works.—John Gall -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
Op 17/03/2023 om 0:54 schreef Thomas Passin: What I find more useful is matching brackets/parens/braces. Not inserting them but highlighting or (better) jumping to the matching one when asked. That is very helpful indeed. Even better than simply highlighting is (IMO) a thing called "Rainbow Braces" or "Bracket Pair Colorization" I recently learned about: both braces of a matching pair get the same color, while other pairs get other colors. I have to say I like it quite a lot. It's in VS Code these days; possible there are implementations or extensions for other editors and IDEs as well. -- "Most of us, when all is said and done, like what we like and make up reasons for it afterwards." -- Soren F. Petersen -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
On Fri, Mar 17, 2023 at 11:55:38AM +1300, dn via Python-list wrote: Do you make use of your IDE's expansionist tendencies, and if-so, which ones? Unix (well, GNU/Linux) is my IDE ;) Simon -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
On 2023-03-16, Thomas Passin wrote: > In general, I don't like a lot of popups and code completions, so I > tend to avoid them. I don't even like automatic parens or brace > insertion. I _hate_ it when the "editor" decides to insert stuff I didn't type. There's an html editor I use occasionally that auto-inserts the closing tag when you type an opening tag. It's, always, 100% of the time, wrong. Either the tag ends up in the wrong place, or it's a duplicate because there was already a closing tag. > They distract me, and often put the cursor somewhere I don't want it. Maybe it matters how good a typist you are, but I don't really concentrate that hard on watching the letters show up on the screen, so any sort of "IDE know better than you do" stuff tends to trip me up. > Of course, for Python code I do like automatic indentation after a > colon: if the cursor ends up in the right place, then I'm happy. Yep, I do allow emacs to do auto indent. > If I'm using a plain editor, then I usually like EditPlus. It's not > free but the cost is low and it's well worth it (but Windows only). > It knows about file types, and can do various insertions and > completions if you want (as I said, I mostly don't). I also use > Notepad++, but I more often go with EditPlus. > > What I find more useful is matching brackets/parens/braces. Not > inserting them but highlighting or (better) jumping to the matching one > when asked. Same here. -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
On 2023-03-17 at 11:55:38 +1300, dn via Python-list wrote: > Do you make use of your IDE's expansionist tendencies, and if-so, which > ones? Expansionist tendencies. Nice phrase. :-) > NB this is where vi/emacs enthusiasts start chuckling (polite term for > 'insane cackling') ... Long time (since the 1980s, when you had to edit config.h and compile it yourself) insane emacs enthusiast and "Unix is my IDE" claimant here. I used one language that required a special editor because the "source code" was a semi-compiled byte stream instead of ASCII. A coworker once awarded me a black belt in vi for knowing how to indent and unindent code. They made me write in Java at my last job; that language encourages IDEs beause they deny that the underlying OS and tools exist at all. I used to say that some of my coworkers weren't writing Java, they were writing IntelliJ. Anyway, the short answer to your question is no. I think the main reason is that there are/were too many editors in too many contexts to start depending on such features. What happens if I'm editing on a target box instead of my desktop? What if I'm helping a coworker, and they use a different editor (different tools for different programmers)? > I haven't made use of such a tool, to-date - OK, yes, I have practised a > high typing-speed (and accuracy). Puff, puff... I, too, type relatively quickly, which definitely relieves some of the appeal. Saving a few keystrokes isn't worth the extra congnitive load to remember how to use those features. And by the time I edit the template, it's more keystrokes (and usually cursor motion and placeholder deletion keystrokes not related to the programming task at hand) than if I had typed the full code in the first place. > Also, at the time, I'm thinking in 'code', rather than about what tool might > implement said ideas. Exactly. Any excursion away from the programming language and the programming task at hand is disruptive. I did finally train myself to use Emacs' dabbrev-expand function, which completes the current "word" according to the previous occurrance of that word, which lets me use longer identifiers without having to type them out or copy/paste them. That said, I often find myself typing stuff out anyway, again because any deviation from writing code is a deviation from writing code. -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
On 3/16/2023 6:55 PM, dn via Python-list wrote: It is a long, long, time since I've thrown one of these into the maelstrom of our musings. (have the nightmares receded?) Do you make use of your IDE's expansionist tendencies, and if-so, which ones? NB this is where vi/emacs enthusiasts start chuckling (polite term for 'insane cackling'). Hence the question's limitation to IDEs, cf 'editors'! Also: I'm talking 'PyCharm' because of the story, but others use Codium, Sublime Text, etc - which presumably offer equivalent features. Was helping a friend install PyCharm. Jumped into the Settings. Isn't it incredible how many there are? Idly noted that there are two short-cut or macro-expansion types of facilities: - Postfix Completion, (nothing to do with email or polish notation) and - Live Templates (again, we're not talking about jinja2) With both, one types an abbreviated-name and the IDE will expand it into appropriate code. For (LiveTemplate) example, typing compli and pressing Tab induces PyCharm to add the following to the program[me]: [ ! for ! in !drop-down menu! if ! ] It offers further typo-saving through the drop-down menu which lists a bunch of likely (iterable) candidates from amongst previously-written code. The action continues after selecting from the menu, by inviting completion of the other ("!") placeholders, in-turn. I haven't made use of such a tool, to-date - OK, yes, I have practised a high typing-speed (and accuracy). Puff, puff... Also, at the time, I'm thinking in 'code', rather than about what tool might implement said ideas. Do you make use of such expansionist-tendencies? Do you make use of other powerful features within the IDE, or are its editor functionalities employed at pretty-much the NotePad level? In general, I don't like a lot of popups and code completions, so I tend to avoid them. I don't even like automatic parens or brace insertion. They distract me, and often put the cursor somewhere I don't want it. Of course, for Python code I do like automatic indentation after a colon: if the cursor ends up in the right place, then I'm happy. If I'm using a plain editor, then I usually like EditPlus. It's not free but the cost is low and it's well worth it (but Windows only). It knows about file types, and can do various insertions and completions if you want (as I said, I mostly don't). I also use Notepad++, but I more often go with EditPlus. What I find more useful is matching brackets/parens/braces. Not inserting them but highlighting or (better) jumping to the matching one when asked. Otherwise I'm usually working in the Leo Editor, which is hard to explain in a few words but is a real gift, especially for Python programmers. It does have an abbreviation capability that I use a little, but so far mostly for inserting symbols like math and Greek letters. Leo is written in Python (with a Qt GUI) and you can easily get access to all its internals, so once you learn something about how it works, you can create scripts to do almost anything you want. The Leo Editor is an MIT-licensed project on GitHub (I know I sound very positive but despite that, it's not my project; it really can grow on you - if you are willing to climb the learning curve). -- https://mail.python.org/mailman/listinfo/python-list
Re: Friday finking: IDE 'macro expansions'
On 3/16/23 16:55, dn via Python-list wrote: It is a long, long, time since I've thrown one of these into the maelstrom of our musings. (have the nightmares receded?) Do you make use of your IDE's expansionist tendencies, and if-so, which ones? NB this is where vi/emacs enthusiasts start chuckling (polite term for 'insane cackling'). Hence the question's limitation to IDEs, cf 'editors'! Also: I'm talking 'PyCharm' because of the story, but others use Codium, Sublime Text, etc - which presumably offer equivalent features. Was helping a friend install PyCharm. Jumped into the Settings. Isn't it incredible how many there are? Idly noted that there are two short-cut or macro-expansion types of facilities: - Postfix Completion, (nothing to do with email or polish notation) and - Live Templates (again, we're not talking about jinja2) With both, one types an abbreviated-name and the IDE will expand it into appropriate code. For (LiveTemplate) example, typing compli and pressing Tab induces PyCharm to add the following to the program[me]: [ ! for ! in !drop-down menu! if ! ] It offers further typo-saving through the drop-down menu which lists a bunch of likely (iterable) candidates from amongst previously-written code. The action continues after selecting from the menu, by inviting completion of the other ("!") placeholders, in-turn. I haven't made use of such a tool, to-date - OK, yes, I have practised a high typing-speed (and accuracy). Puff, puff... Also, at the time, I'm thinking in 'code', rather than about what tool might implement said ideas. Do you make use of such expansionist-tendencies? Do you make use of other powerful features within the IDE, or are its editor functionalities employed at pretty-much the NotePad level? Not sure the purpose of the "survey" but - no, I don't use these. IDEs are incredible things, but you need to invest yourself completely in them, basically live in them, or there's not that much payback. There's just too much to remember, and honestly, too much mouse movement needed, especially if you have a big screen. In the PyCharm case, the startup time is incredibly slow, so, since I don't "live in it", I don't use it much any more - there are some things it does superbly, but it's such a cost to fire it up just for those I pretty much don't bother any more. -- https://mail.python.org/mailman/listinfo/python-list
Friday finking: IDE 'macro expansions'
It is a long, long, time since I've thrown one of these into the maelstrom of our musings. (have the nightmares receded?) Do you make use of your IDE's expansionist tendencies, and if-so, which ones? NB this is where vi/emacs enthusiasts start chuckling (polite term for 'insane cackling'). Hence the question's limitation to IDEs, cf 'editors'! Also: I'm talking 'PyCharm' because of the story, but others use Codium, Sublime Text, etc - which presumably offer equivalent features. Was helping a friend install PyCharm. Jumped into the Settings. Isn't it incredible how many there are? Idly noted that there are two short-cut or macro-expansion types of facilities: - Postfix Completion, (nothing to do with email or polish notation) and - Live Templates (again, we're not talking about jinja2) With both, one types an abbreviated-name and the IDE will expand it into appropriate code. For (LiveTemplate) example, typing compli and pressing Tab induces PyCharm to add the following to the program[me]: [ ! for ! in !drop-down menu! if ! ] It offers further typo-saving through the drop-down menu which lists a bunch of likely (iterable) candidates from amongst previously-written code. The action continues after selecting from the menu, by inviting completion of the other ("!") placeholders, in-turn. I haven't made use of such a tool, to-date - OK, yes, I have practised a high typing-speed (and accuracy). Puff, puff... Also, at the time, I'm thinking in 'code', rather than about what tool might implement said ideas. Do you make use of such expansionist-tendencies? Do you make use of other powerful features within the IDE, or are its editor functionalities employed at pretty-much the NotePad level? Web.Refs: https://www.jetbrains.com/help/pycharm/settings-postfix-completion.html https://www.jetbrains.com/help/pycharm/using-live-templates.html#live_templates_types -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list