5 ms·
That's an explicit goal of pseudocode. It's implied by the fact that it's used by both laypersons and programmers to explore algorithms for any sub-field of Com
by nickpsecurity 10y ago
That's an explicit goal of pseudocode. It's implied by the fact that it's used by both laypersons and programmers to explore algorithms for any sub-field of CompSci or application in IT. It's the level of detail and symbols they modify when targeting specific groups.
- seanmcdirmid 10y agoIt really isn't. Psuedocode is a notation to move design along, to communicate and iterate. It isn't meant for the 6 year old kid or non programming PHB people manager, laypersons if you might say. Psuedocode notations require learning investments just like any other notations.
- akkartik 10y agoAnother attempt at articulating what I think is your point: languages have network effects. You're less effective programming in a language if others don't understand what you did. But the notation of OP is intended to not require network effects. Pseudocode is often intended purely to help one privately think through a problem. Even if nobody adopts this notation, it might be useful to you. Does that seem on the right track? I don't mean to put words in your mouth.
- seanmcdirmid 10y agoI agree with this. The notation might also apply to a smallish group of people, like mathematicians in a certain field who use it to communicate and work together. Notations are powerful like programming languages, if you can reuse an existing one or use ones other people you need to work with already know, there is an advantage to that.
- akkartik 10y agoRight. I was focusing on the extreme ends of the spectrum to sharpen the contrast.
- nickpsecurity 10y agoThere's two reasons pseudocode is used in most cases: 1. Private exploration as you said. 2. Publication of algorithms in a form most will understand and be able to duplicate. There's an example of 2 on the front page right now: https://arxiv.org/abs/1610.08129 https://arxiv.org/abs/1610.08129 In the PDF, they describe their algorithms in pseudo-code that combines the common, BASIC/ALGOL-like text with some common notation (i.e. division) from math. I immediately understood the algorithms enough to implement them myself in about any language without soneone telling me what the notation meant. A common effect of published pseudocode since it's intended to be widely understood. This new notation Id have to think about and practice with. Just using it in a paper with the label pseudocode would cause confusion. It's less intuitive in a world of widely-deployed, ALGOL-like notations. Maybe it has benefits worth sacrificing the wide usability but person switching it better be OK with that.
- seanmcdirmid 10y agoIn the PL community, when we want to communicate an algorithm in a paper in something like code, we will say something to the effect of C-style pseudo code. This serves two roles: 1) everyone "knows" C so you don't have to explain your notation very well, and 2) we will skip over all the ickiness of C (hence the C-like). I get the impression that the work here is more about thinking and iterating on paper, not just communicating on paper, which, IMHO, is a very niche use case that most people aren't going to run into. We don't do anything in our C-style pseudo codes but present.
- nickpsecurity 10y agoPerhaps you didnt understand what for everyone means. It wasn't meant literally. It's often used by programmers, even laypersons, as a short-hand for a broad audience. I've seen laypersons write pseudocode and formal specs after training. Many were also taught to use an executable form called 4GL's which still have a lot of revenue and users. COBOL was the first in this since its language let even accountants and such write programs. Far as a learning investment, that's true for any precise notation, modeling tool, or formal language. Even English takes Americans years to learn. So, pointing out pseudocode has a learning curve like everything else doesn't invalidate my claim that it reduces detail to aid understanding and by many people. Note: Im also not arguing group-specific pseudocodes cant be developed. Only that the normal kind is meant to be accessible and usually is.
- seanmcdirmid 10y agoAnyone (even lay people!) can learn how to program, anyone can learn math, anyone can learn a formal specification language. I've seen accountants learn and excel at APL, the most obtuse language ever. So, what is "the notation that everyone can read?" Since you've claimed that it exists and is well defined, it must be describable. Surely, it isn't because this notation is different and everyone doesn't like different things?
- nickpsecurity 10y agoThe Pascal-looking one in the paper I cited that academic publications and classrooms have used successfully going back decades. Strange you seem so unfamiliar with it.
- seanmcdirmid 10y agoYes, pascal makes for great psuedocode because we have a long history with pascal. I am familiar with it, I even ate dinner with Wirth once, nice guy. I guess you just don't like new things, it makes sense now.
- 10y ago