News for hackers. Stuff that matters.
Re:A Paper Algorithm Notation by natch on Saturday December 31, 2016 @02:55PM (#13292840)
Clearly there is room for improvement in this area.

But I'd rather see papers include code snippets.

If a widely used and highly readable language is used (Python, for example) then the meaning of what is going on would be much more clear, and in some cases could be immediately tested out with ones own data or at least played with in an existing, widely installed, live system.

Re:A Paper Algorithm Notation by gravypod on Saturday December 31, 2016 @03:03PM (#13292869)
I think ideally a psudo-code should be directly translatable into any programming language. It should be dead simple. It should use all of the best practices of the most common programming languages. It should be typable.

None of this garvage of arrows and triangles. I'm not Greek, I don't have that kind of stupid keyboard.

Also, it should follow programming practices for variable names.

Rather then A, B, C, D, X and the lot use forward_momentum or ForwardMomentum. We're not using typewriters any more. The extra few keystrokes for typing out words, and not symbols, is well worth it.

Re:A Paper Algorithm Notation by nickpsecurity on Saturday December 31, 2016 @03:43PM (#13293045)
Interestingly, exactly how it's done in almost every academic paper or article on software I've read outside some really niche ones. Plus most prototypes in industry that were done as UML, Visual Basic, etc. Python got somewhat popular in this niche as it's quite readable & high-level.

The people downvoting these comments don't represent a majority opinion on pseudocode in any way. Quite the opposite.

Re:A Paper Algorithm Notation by gravypod on Saturday December 31, 2016 @05:06PM (#13293448)
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.
Re:A Paper Algorithm Notation by e12e on Saturday December 31, 2016 @07:14PM (#13293950)
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.

Re:A Paper Algorithm Notation by gsam on Saturday December 31, 2016 @11:58PM (#13294751)
Widely used only applies when the paper was written. Actual code snippets put more future demand on readers when those languages are potentially no longer popular. I would strongly suggest the use of an abstract version merely for the authors to abstract their own thinking, then additionally have embedded concrete versions.