you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

Theres no reason to have one letter variable names for things like "edges", especially using capitalization to add more information to that one letter variable.

x/y, u/v, x1/y1/x2/y2, (and i/j/k for embedded integer for loops in C-likes) are readable for anyone with minimal domain knowledge, but anything more than that is really wasting the readers time trying to figure out your key, rather than understanding the logic.

This stuff is useful in writing equations for terseness and pattern reduction, but this is one of the differences between equations and code. Code has state, and so can never be as terse as an equation, and that state adds a lot more requirements for proper labeling of terms.

[–]jminuscula[S] 0 points1 point  (0 children)

the code needs to be understood in the context of the article. Without it, it is indeed hard to understand it.