Tracking issue to implement various code shufflers, inspired by Gerald M. Weinberg's the Psychology of Computer Programming (Part 4, Chapter 13, Documentation).
The observation is that once a programmer is stuck on debugging, he is stuck since he already tried all rational approaches. So irrational / unconventional methods are needed to shake the programmer out of stuckness - the "set". In Underhood we constrain the methods to code display methods.
Examples from the book (pdf page 442), with some additional remarks:
[ ] Change typography in various ways (example: bold keywords).
[ ] Change multi-use symbols, like ambiguous equals sign, parens by levels.
[ ] List symbols with their references inline (note: likely need to cut to top)
[ ] Strip comments, or keep only comments, or show side-by-side.
[ ] Similarly for literals.
[ ] Rename all variables (maybe keep first char, or assign new sequential chars... maybe take scope into account)
[ ] Expand abbreviations or abbreviate expansions
[ ] Permute operation order
[ ] List symbols
[ ] Highlight ambiguous or dangerous operations
[ ] Show conditionals as decision tables or other canonical representation (decision tree?)
[ ] Show example in/out results on expressions (note: needs pure functions and interpreting)
(Note: many items from the list, which was published in 1971 originally, is clearly a forerunner of many modern niceties. Absolutely stunning, respect to the elders.)
Inspired custom additions:
[ ] Turn off syntax highlight.
[ ] Randomize indentation.
[ ] Introduce mutation into source code, and make the programmer find it (Quiz Time!)
[ ] Replace variables with names inferred from their types and usage.
[ ] Replace names with AI-generated names.
[ ] Assign unique color to different variables.
[ ] Assign unique object (pictogram, waveform, number...) to different variables.
[ ] Display as flowchart.
[ ] Add badge to variables noting their usage counts (in same module / other modules / etc), especially write counts.
[ ] Show test cases side-by-side.
[ ] Reorder function sequence within file according to various orders
[ ] Show code bubbles (dynamic reorder based on current focus)
Tracking issue to implement various code shufflers, inspired by Gerald M. Weinberg's the Psychology of Computer Programming (Part 4, Chapter 13, Documentation).
The observation is that once a programmer is stuck on debugging, he is stuck since he already tried all rational approaches. So irrational / unconventional methods are needed to shake the programmer out of stuckness - the "set". In Underhood we constrain the methods to code display methods.
Examples from the book (pdf page 442), with some additional remarks:
(Note: many items from the list, which was published in 1971 originally, is clearly a forerunner of many modern niceties. Absolutely stunning, respect to the elders.)
Inspired custom additions: