back
7 comments
This problem isn't unique to fonts.

I used to joke to my students that the hardest part of programming is coming up with names -- for variables, functions, classes, modules, packages, etc. I still tell them that, but now I'm relatively serious about it. ("Relatively", because I don't know that it's the hardest part, but it certainly is hard.)

"there are two hard things in computer science: cache invalidation, naming things, and off-by-one errors"

But you're totally right. I was watching my friend code last night, we both have the same # of years experience, and I was like "what does that function name even mean? How about 'FindNeighbors' instead of 'CheckNeighbors' ". I'm sure I do the same thing in my own code.

If you still teach, do you ever have your students do code review on eachother's code?

> If you still teach, do you ever have your students do code review on eachother's code?

Yes, I teach. No I haven't done that. But it's a great idea. I'll think about it.

<ggchappell proceeds to think about it>

In the more hardcore-about-code-review job I had, the code reviewer was as responsible for bugs / broken stuff that came out as the person who wrote the code. And in that job we didn't just read the code briefly, you'd load up the branch and test their code. I'm not sure that it was the best practice, it slowed everything down and led to a more formal culture.

If you do this, in order to incentivize the code reviewer you might actually make 10% of the grade based on the code submitted by the person they reviewed. (Granted that could be kind of harsh, and I always hated group projects in school.)

Probably best to make code review an extra credit exercise because you don't want to ever penalize a good student by tying their rewards to the actions of someone who might be slacking.
That’s part of the reason I really like control and data flow combinators (map, filter, fold, zip, compose, duplicate, both, …), because they let me avoid a lot of names for intermediate values.

But I still can’t make a directory for the project without first thinking of a name…

My first exposure to programming was The TeXbook by Donald Knuth (back in 1990). I still remember marveling at how he always managed to come up with perfect names. Little did I know then (and experience has since delivered plenty of fails) that it really is a hard problem.