Is Pseudocode really important for writing any Program

Hi this is Palak Sharma
I am an engineering student, I am learning lots of programming languages here. Python Programming is my favorite programming language. I have taken a project for development of Web Development. and we are planning for it and working on every possible aspect. One of my friend suggest me that before developing or starting Software or Web application I should read about Pseudocode, and he also insure me that it will help me to take rough idea for developing any kind of application doesn’t matter which programming language you are going to use. I am very confused now. What should I do, Does Pseudocode really helpful for Programming.
Kindly give your valuable suggestions on this. Will be a great support.
Thanks

2 Likes

@plksharma481 ,

pseudocode is crusial, because you have to translate “real work” in a programing lenguage f.e.

you have to divide a workflow or problem in logic (programing) steps and also to reverse it, so that a enduser can work with your script(or interface).

KR

Andreas

2 Likes

Since I have an AEC background, I’ll give you an AEC based thought experiment.

Say you want to build a house. Think about what it would look like. Get a good vision of the end goal. Really let it sink in. What rooms will you have? Best to keep it small; say 4 rooms in this case. Where will they be? Where are the doors and windows? What about plumbing fixtures? Get all the details too, like the trim and paint colors. Make sure you remember it.
Got a good vision? Great because you’ve just been teleported to the local home improvement store. You have 60 minutes to get the complete listing of every material you need to build that home, from the foundation to the roof. Framing to finish.
Done shopping? Cool as we will now start assembling the house. You bought or rented an excavator to dig the foundation right? No? Ok, guess we’re heading back to the home improvement store.
Ok now we’ve got our excavator so we can dig the hole. Now that that’s done we can set up the formwork. You bought or rented formwork, right? No? Ok, guess we’re heading back to the home improvement store.

You can likely see how this expands, until you have spent more time taking imaginary trips to the home improvement store then you did doing imaginary construction work. In the case of our exercise some design drawings would certainly have saved us a lot of trips as we could have quantified what we need in advance.

Writing code isn’t all that different. You have a vision for what you want to execute, but there isn’t a set of plans built yet. The pseudo code becomes that plan. You don’t necessarily need it for super simple projects (ie: place a sphere at the center of every line of the type “needs sphere” isn’t something I would write up pseudo code for). But on any project of scope it’s my step 1. Having this document ensures you don’t forget a feature (imagine forgetting a kitchen in our house exercise), focus on the wrong part of the project (the future addition on the north end is a project for tomorrow, we need the driveway built today), and allows for initial collaboration (you work on the bathroom while I work on the kitchen) and exploration (what if we had a door directly from the master bedroom into the bathroom), and so much more.

It need not be any formal language; Most of my stuff consists of iPad sketches with bulleted lists; and I rarely write anything code specific; but if you are collaborating (and you almost always should be) it should be clear what happens in what order.

Hope this helps!

3 Likes

I don’t think pseudocoding as a formal practice is necessary, but the ability to translate real world problems, step by step, into actual code is absolutely necessary. Not having that ability, whether you choose to write it out or translate it in your head, is like being able to speak a second language but not understand it when it’s being spoken back to you. It really is a two-way street and being able to only go one direction is more than just limiting.

That being said, actually writing out your pseudocode is a fantastic way to learn as you’re getting started. Especially if you’re learning a new language, as you can define your base logic separate from your understanding of the language. This means that you may have to change your steps based on what the language is capable of, but also gives you the flexibility to determine what those capabilities are before even starting your code.

3 Likes

I have a onenote folder that is dedicated to rough ideas for Dynamo scripts. I get the idea of what I want the script to do/accomplish, and then I jot down my first thoughts on how to break each of those tasks up into nodes/commands/steps. It helps me to understand how many moving parts I’m supposed to be working with. That way I can more easily keep my script organized in development.

Also, I have loads of write-ups that I haven’t been able to implement yet. That doesn’t bother me because I don’t have to re-think up those ideas now. I’ve been able to review one of the write-ups a week or two later and I see an easier/simpler way of achieving the goal.

Pseudocode is kinda like sketches or post-it notes, in my opinion. It helps you to get the more broad idea out of your head and into a form that is easier to translate to your specified coding language. It’s not something with a standardized format, like outline-style notes, but rather pseudocode is formatted in whatever way best works for you as an individual/team.

I’ve found it exceedingly useful when asking for help from others with more coding experience as well.

1 Like

As most have said so far pseudocode is really about planning out a script.

I don’t think things like intellisensed code and AI based programming are worth learning in place of actual written code currently - this field is still evolving. I genuinely believe those technologies will not evolve to the point where a non-programmer will be able to make perfect code with no background knowledge of programming concepts anytime soon anyway. Imagine trying to convey nested loop structures to a computer without any syntax provided.

Learning how to break down your code into simpler ideas both for means of planning it but also explaining it is highly valuable, whether through literal pseudocode or just talking about it to other people.

1 Like