TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Can pseudocode make you a better programmer?

5 pointsby 2ro4 months ago
In modern software development, do people still use pseudocode before writing computer code?<p>I am kind of fascinated by the idea of improving my programming skill by focusing on the notation I use to think in - I remember reading an essay by Paul Graham: &quot;The Hundred-Year Language&quot;<p>How do people here use pseudocode? And, although Paul Graham has said languages are not really technologies but are more like notation, do people here agree? I tend to think of notations as technology - what are words in natural languages other than little &quot;thought machines?&quot; - anyway what do people here think? Feel free to share your preferred notations for pseudocode if you use them regularly when programming.

3 comments

gregjor4 months ago
Rule 13 from <i>The Elements of Programming Style</i>:<p>&gt; Write first in easy-to-understand pseudo language; then translate into whatever language you have to use. [1]<p>I write in a simplified version of C. Pseudocode helps you concentrate on the data structures, module boundaries, and control flow without getting bogged down and distracted with the details and trivia of a specific language. You can read and walk through the code in your head.<p>I know this advice seems contrary to the copy&#x2F;paste let the IDE or &quot;AI&quot; do it mentality, but as the industry shakes out (again) the programmers who can actually write code to solve business problems will still have jobs, and those who memorize and automate won&#x27;t.<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;The_Elements_of_Programming_Style" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;The_Elements_of_Programming_St...</a>
uberman4 months ago
When writing p-code I dont use any kind of formal notation on to formalize it would be to defeat the entire purpose in my opinion. For me, p-code is notes to myself describing intended functionality without implementation details.
评论 #42927454 未加载
dtagames4 months ago
I do think it helps. Sometimes I write pseudocode as comments if I have a complicated task to break down. It also lends itself well to LLM programming, especially with &quot;reasoning&quot; models where giving a complete picture of what you want in pseudocode-like terms can improve the results.<p>Donald Knuth said famously that code is for people and only incidentally for computers. And at the end of the day, only machine language code (not any &quot;languages&quot; we write) gets run. From that perspective, everything is a kind of pseudocode, including how you name and layout your variables and functions, etc.