I'm an undergrad and I'm currently working with people in the physics. All of their code, python or not, uses N, n, and x as the most common variable names.
Re:A Paper Algorithm Notation
by jonathankoren on Saturday December 31, 2016 @07:20PM
(#13293979)
There is a definitely antipattern that comes from mathematics where variables are cryptic in an effort to look like math, and also I believe to try and show off how smart your are. However, in some domains, the single letter variables become standard. In IR, w means word, d means document, D means the document corpus, and the like. Of course, w sometimes means "weight" when applied to a x, which maybe mean an document d.
It's a damn mess.
Re:A Paper Algorithm Notation
by nickpsecurity on Saturday December 31, 2016 @05:10PM
(#13293465)
That is a recurring problem. The structure is easy to follow. Variable names often suck. I think they get it from their Algebra and Calculus classes because that was first type of books I saw using those letters almost exclusively.
It's almost as if algebra would also make more sense with better variable names, rather than simple letters...
Re:A Paper Algorithm Notation
by nickpsecurity on Saturday December 31, 2016 @09:13PM
(#13294351)
It would. Start with the word problem. Define some variables maybe big or short-hand closer to actual description. Then use algebra with those variables to model the problem in math. Solve it. Others understand it more easily in peer review.
Much like programming and code review.
The people downvoting these comments don't represent a majority opinion on pseudocode in any way. Quite the opposite.