Earlier quoted context omitted.
Stream of consciousness programming?
I associate this with what we used to call "one-liner programming": I would write a single line of Perl code (in bash, prefixed with `perl -Mwarnings -MDebug -E' '`, convince myself the code did what we needed, and then share it around as a paste in irc / chat / whatever. It was amazing what you could achieve with the right modules, and Perl's flexibility allowed your mind to roam freely. Incidentally, the fact that…
python -c '
import re, sys
for line in sys.stdin: print(line.lower().count("foo"))
'
works in shell interactively (both bash and zsh support multiline history entries well), or in shell scripts, and also in slack/mattermost/matrix/email.