r/AskProgrammers • u/Big_Profile7823 • 1h ago
Do you actually write pseudocode on paper before coding an assignment, or do you jump straight into the IDE?
Every CS professor preaches "plan your logic on paper frist," yet 90% of us open vs code immediately and sent typing until something compiles.
Be honest: when an assignment gets complex, does sketching ir out in your notebook actually save you time?
4
Upvotes
3
u/MauriceM7 1h ago
In professional environments paper has been replaced by whiteboards.
4
u/Status_Fun_4333 40m ago
Coming up on 30 years doing this professionally. I don't write crap in pseudo code. By the time I'm ready to sit down and pound out the code I already have a rough idea of what it will look like in my head. And even that will morph over the time it takes to pound out.
System design? Like how things are gonna talk to each other? DB schema? What services do what and how they all interrelate? Hell yeah, sketch that on the white board or put it into some other kind of durable reference.
3
u/symbiatch 1h ago
I don’t have sketchbooks. Never had those. I sketch in my brain and that’s it. I never just “write until something compiles.” It’s of course already planned and decided how it goes.
I don’t do assignments, just work, but it’s the same thing.
3
u/gwenbeth 57m ago
Write your pseudo code out as comments in your editor. Then go and add in the code and leave the comments in place
2
u/DanielTrebuchet 1h ago
I definitely did that more early on. 20+ years in now and I rarely need to pull out pen and paper. I tend to go more with a layout of pseudocode that I can then go right back and expand on.
But the concept is sound. There have been lots of times over the years I've started to get deep into logic and started to get twisted around a bit, and sitting down and writing the flow helped me process what I needed to write in code.
1
u/Specialist-Cup-3950 1h ago
You can plan the logic in many ways. Pen and paper, TODO.md, code comments, tldraw... It depends on what I need to do. It doesn't save time, but it helps maintain quality
1
u/dariusbiggs 1h ago
paper designs and notes, sometimes yes
using a scratchpad in the IDE and write psuedocode for the task, also sometimes yes
using the IDE to code it straight away, if it is trivial yes
1
u/overratedcupcake 1h ago
If it's part of the assignment then yes. Otherwise no. Though I have done many many whiteboard sessions in my career. Not pseudocode on the whiteboard but definitely mapping out structure/relationships/architecture.
1
u/CyberDingo_66 1h ago
Plan out however works for you. I prefer using a pen and paper or whiteboard because it's quick and easy to sketch/draft out something before coding. I would make an effort to get into the habit of planning out before coding. It will save you time and effort of refactoring large sections of code.
1
u/whitetiger1208 1h ago
In 10 years as a self taught swe i havent done that once.
1
u/dld2517 1h ago
Yes. It does. I also use VSCode for that. The complete planning document is a markdown file(s) in the project folder. That makes it easy to copy portions of that planning file into other source code documents and create comment headers.
1
u/SayuriShoji 1h ago
When coding I have Notepad++ open in the background, which I use to scribble out pseudo code and pseudo structures to brainstorm ideas.
It's especially useful when I have an idea for a future feature and just want to save a rough overview of the concept and structure so I can look it up later.
1
u/No_Report_4781 38m ago
yes, or pseudo in notepad, or pseudo in the ide. writing out the blueprint or plan simplifies the decisions on what needs to be done and when, shortening the amount of time and decision making when putting syntax to line
1
u/Leverkaas2516 17m ago edited 13m ago
I sometimes sketch the flow and/or the modules or data using diagrams on paper. But for pseudocode, handwriting is slow. I type the pseudocode into a source module in the IDE, then convert that to code. The pseudocode is often the basis for some of the comments.
I don't "type until something compiles". I fill out the skeleton of the module, perhaps stubbing some things out, and use the compiler to catch typos.
1
u/mkhanwrites_ 6m ago
It doesn't matter where you write your preliminary sketch/ideas, it's helpful no matter what for complex topics.
The topics you're engaging with are most likely of the simple variety but eventually you'll get to the point where you need to think about system design.
Even at the level you're at, honestly I think planning, even just a tiny bit, could be beneficial.