"Collapsibility" behaviour for code fragments

Announcements, comments, ideas, feedback, and "How do I... ?" questions
Post Reply
pablo.hernandez
Posts: 2
Joined: Wed Nov 23, 2022 8:56 pm

"Collapsibility" behaviour for code fragments

Post by pablo.hernandez »

Hello, I think many more people would use the great [ code ] tags in the forums if the initial state of "collapsibility" was either set to "show by default" (and collapse on click) or was at least configurable (maybe providing an additional keyword for the tag, like "language=Python expanded=yes" or something similar)

Why am I suggesting this, which may be seen as a step back on a good functionality to save valuable space in the always crowded forums? Well I'm sure you've noticed that many user posts do not leverage the [ code ] tag. Of course I can only speculate about the reasons: maybe it's because people tend not to read the instructions and maybe don't even know or care about tagging or formatting... but that doesn't sound like the typical poster, who must be able to read very carefully in order to solve any challenge at all... well, in many cases my guess is that the reason behind this is more "human": the urge to...boast :D I mean, we invest time and effort into solving the challenges and probably want to make sure, as our only reward, that everyone sees and appreciates our beautiful code and ingenious solution at first glance (not hidden behind a click), and we're willing to sacrifice all the bells and whistles of keyword highlighting and readable fonts to this end. I'm proposing the feature to be optional for the cases where the code is too long or unpleasant, in other words, to allow for a personal aesthetic / ego choice when presenting to the world our hard-worked-on solutions...

Do you agree with my cheap geek-psychology analysis? would that change of behaviour be doable without too much effort?
Last edited by pablo.hernandez on Fri Nov 25, 2022 8:34 am, edited 1 time in total.
pjt33
Posts: 140
Joined: Mon Oct 06, 2008 6:14 pm

Re: "Collapsibility" behaviour for code fragments

Post by pjt33 »

pablo.hernandez wrote: Wed Nov 23, 2022 9:29 pm I mean, we invest time and effort into solving the challenges and probably want to make sure, as our only reward, that everyone sees and appreciates our beautiful code and ingenious solution at first glance
Given the amount of write-only code that I see in the discussion threads, that can't be the reason. If people wanted others to appreciate their code they'd use intelligible variable and function names and comments.
pablo.hernandez
Posts: 2
Joined: Wed Nov 23, 2022 8:56 pm

Re: "Collapsibility" behaviour for code fragments

Post by pablo.hernandez »

pjt33 wrote: Thu Nov 24, 2022 8:31 am
pablo.hernandez wrote: Wed Nov 23, 2022 9:29 pm I mean, we invest time and effort into solving the challenges and probably want to make sure, as our only reward, that everyone sees and appreciates our beautiful code and ingenious solution at first glance
Given the amount of write-only code that I see in the discussion threads, that can't be the reason. If people wanted others to appreciate their code they'd use intelligible variable and function names and comments.
Fair enough, I just thought this small change could help a bit to bring about the "right" attitude: "solve it, as beautifully as you can... then boast about it, we're all looking"... maybe too ambitious a goal for a simple collapsible property :)
Post Reply