4 ms·
I love academics. They can post shitty code full of single letter variables etc and still get the applause for it, not to mention the paycheck :D
by redcat7 6y ago
I love academics. They can post shitty code full of single letter variables etc and still get the applause for it, not to mention the paycheck :D
- exdsq 6y agoRegarding this example, which variable could do with being longer? It seemed fine to me!
- segmondy 6y agoacademic is about computer science not computer programming. 2 very different things, their "shitty code" is often "good computer science code" and just like it's fine to have single letter variables when reading mathematics, it's the same when reading computer science code. the idea is to get knowledge across which can then be expressed clearly by computer programmers.
- redcat7 6y agoscrew this shit
- bidirectional 6y agoThis is not shitty code, single letter names have their place, and are absolutely fine here.
- mulberrybush 6y agoI like Golang's convention for names - names should get longer and more expressive the wider their use is across the code. Single letter names for loop variables, two or three letter names to refer to the current struct in methods, but expressive struct and function names.