2018-03-17 15:54 EDT, Brendan Burkart <[email protected]>:
> Another side to this is how do you speak the intention behind your code?
>
Yes I was also wondering about that. There are multiple "levels" of looking
at code, and I don't think people would enumerate every single symbol, even
when dictating, to anyone but absolute beginners. Now "show me the
dataframe as a plot" is a bit high-level, more paraphrasing than reading
the code, and might only be appropriate when everyone can also see the code
(i.e. I can't expect everyone hearing this to write the same thing).
But even for something as simple as "if a < b < c: b.foo(bar)", I am
unlikely to read this as "if a minus-sign b minus-sign c colon newline
indent b dot foo open-paren bar close-paren stop-indenting", but rather as
"if b is strictly between a and c then call b's method foo with argument
bar endif". (I realize Python is a poor example because it's written so
much like English already, but in a language like C, I am unlikely to ever
pronounce &, *, {}).
I think there are multiple levels of "speaking" codes, same as
spelling/reading for English text. And I think it is very (programming)
language dependent (even symbols; e.g. Rust's "turbofish" operator). But I
would love to have more details on how people do it (maybe transcripts, but
from experienced programmers rather than 10-year olds).
Cheers
--
Rémi
_______________________________________________
Discuss mailing list
[email protected]
http://lists.software-carpentry.org/listinfo/discuss