Programmers, which of these shortcuts do you use?
-
-
undefined Evan Prodromou ha condiviso questa discussione
-
@evan no need for me to copy and paste, as Emacs abbreviation mode does a smart version much quicker 😜
-
@evan no need for me to copy and paste, as Emacs abbreviation mode does a smart version much quicker 😜
@joncruz I'm not sure what you mean.
-
@joncruz I'm not sure what you mean.
@evan it's why I dont bother setting up "smart completion" for most languages. I hit the magic key combo and Emacs searches through all my open buffers to see "ok, last time you had typed this sequence of characters, you then followed it with this result". And another combo will cycle through other options starting with most recent. Kinda works like magical "I know what you need" copy-n-paste.
-
@evan it's why I dont bother setting up "smart completion" for most languages. I hit the magic key combo and Emacs searches through all my open buffers to see "ok, last time you had typed this sequence of characters, you then followed it with this result". And another combo will cycle through other options starting with most recent. Kinda works like magical "I know what you need" copy-n-paste.
@joncruz like CoPilot!
-
@evan don’t so much copy and paste previously written code but rather reuse modular abstractions with a defined, tried, real-world tested functionality and interface e.g. since 2011 I’ve used the same/similar runtime logger abstraction wrapper for contextual application runtime debug/trace/info/warn/error/fatal messages.
-
For the first option, what about D.R.Y. ?
-
@Mrpotatoqc9 what about the Rule of Three?
https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)
-
@evan don’t so much copy and paste previously written code but rather reuse modular abstractions with a defined, tried, real-world tested functionality and interface e.g. since 2011 I’ve used the same/similar runtime logger abstraction wrapper for contextual application runtime debug/trace/info/warn/error/fatal messages.
@dahukanna Do you use a packaged module or library, or is it just the same source code that you copy over?
-
Hey, all. I do all 4. Thanks for the responses!
-
@dahukanna Do you use a packaged module or library, or is it just the same source code that you copy over?
@evan
The example I gave is code I reuse by copying and pasting. I’d only go through packaging + distribution + versioning “tax” if I was sharing for other team/people to reuse. -
@evan
The example I gave is code I reuse by copying and pasting. I’d only go through packaging + distribution + versioning “tax” if I was sharing for other team/people to reuse.@dahukanna That makes a lot of sense!
-
Hey, all. I do all 4. Thanks for the responses!
Also, to everyone who got tricked into saying they use LLMs: GOTCHA! You fell for my AI trap. Bonk! Go directly to LLM jail.
-
Also, to everyone who got tricked into saying they use LLMs: GOTCHA! You fell for my AI trap. Bonk! Go directly to LLM jail.
@evan unironically I knew this was some sorta honeypot, and I’m all for it
-
@evan unironically I knew this was some sorta honeypot, and I’m all for it
@GroupNebula563 it wasn't, but I did realise after that it probably felt high-risk for people on the Fediverse.