News for hackers. Stuff that matters.
Re:Ask HN: Is "Code Complete" by Steve McConnell still a rec... by fooker on Wednesday April 26, 2023 @05:09AM (#35711162)
Does anyone actually do this?

I have never seen people write pseudo code as part of the programming process.

Diagrams, comments, tests, stubs sure, but never really pseudo code.

Re:Ask HN: Is "Code Complete" by Steve McConnell still a rec... by gjadi on Wednesday April 26, 2023 @05:26AM (#35711274)
I do it regularly but it's always invisible if all you see is the resulting code.

I do it to structure my code, but I remove the comments as I implement it because I try to make it obvious in the code what's being done. You know, regular good programming, pick good names, keep the code reasonably short, add comments when needed, etc.

The same way you won't see the detailed outline of a writing once it has been written. Yet, the author likely started with an outline.

Re:Ask HN: Is "Code Complete" by Steve McConnell still a rec... by azangru on Wednesday April 26, 2023 @05:16AM (#35711206)
Sometimes, for some confusing piece of functionality that I am developing, I would write pseudocode in a comment first to see whether it makes sense; and would use it as an outline for implementing the feature. I've found it useful. I've never read Code Complete though :-)
Re:Ask HN: Is "Code Complete" by Steve McConnell still a rec... by jacknews on Wednesday April 26, 2023 @07:08AM (#35711908)
Yes all the time, how else?

I mean if it's just a few lines, a change to existing code, etc, you can jump straight in with actual code.

But if it's a new object/module etc, start by writing some function names, and some rough structure within them, etc. All in IDE/editor. And I wouldn't call it pseudo-code, just a rough outline.

Re:Ask HN: Is "Code Complete" by Steve McConnell still a rec... by fooker on Wednesday April 26, 2023 @06:00PM (#35720602)
That's exactly my point.

An outline is a very different beast compared to pseudo code.

It's effectively the difference between operational semantics and denotational semantics.

Re:Ask HN: Is "Code Complete" by Steve McConnell still a rec... by is_true on Wednesday April 26, 2023 @07:20AM (#35711986)
I studied systems engineering and the first class about algorithms and data structures started using pseudocode, then Pascal. And they still do today.
Re:Ask HN: Is "Code Complete" by Steve McConnell still a rec... by warrenm on Thursday April 27, 2023 @07:31AM (#35726463)
>Diagrams, comments, tests, stubs sure, but never really pseudo code.

Hate to break it to you ... but those are all forms of pseudocode (or verification of your process (which is nearly the same thing)) :)