I know I'll get flamed for this.
After taking a term of C++ at my tech-oriented school in Oregon, I've reached a opinion. Pseuodocode, much of the time, teaches bad habits. Here's why.
I came to this opinion after the 10th time helping yet another student trying to finish their lab. While helping, I noticed several papers of just text. I asked what that was. He said pseudocode. WTF? 3 pages? I checked it out and aside from being all in english and no actual code, the damn thing sure looked like code. It was that detailed.
However, the connection between knowing what to do and actually implementing it was far from him and his lab partner. They had written the pseudocode together, not a bad thing. However, they decided since they knew the pseudocode was spot on, the wrote all the code in one sitting, then debugged!
I was shocked. My coding style has always been this: implement a small feature, test it throughouly and make sure it works before continuing. They had not done this. There were about 50 compiler errors, not to mention logic errors they were obviously going to show up. After about only a hour of actual code typing, they had at least 6 hours of debugging ahead of them. This relatively simply project took me about 4 hours to complete.
This is not the first time I have seen this. I would say at least 1/2 of my friends and peers write a crapload of code, then try to run it and get the correct results. While I do think pseuodocode has its merits, I wish my school would teach careful coding and thinking ahead instead of concerntrating on pseuodocode. One professor is specifically known for emphasising good pseuodocode over everything else.
My pseudocode for the project they were working on was this:
I know it's fairly basic, but that's exactly what my program did. Fortunately for me, my professor clalims this is sufficient. His views are that pseudocode should be short and that any non coding person could read it and know what your code should be doing.
What's your thoughts?
After taking a term of C++ at my tech-oriented school in Oregon, I've reached a opinion. Pseuodocode, much of the time, teaches bad habits. Here's why.
I came to this opinion after the 10th time helping yet another student trying to finish their lab. While helping, I noticed several papers of just text. I asked what that was. He said pseudocode. WTF? 3 pages? I checked it out and aside from being all in english and no actual code, the damn thing sure looked like code. It was that detailed.
However, the connection between knowing what to do and actually implementing it was far from him and his lab partner. They had written the pseudocode together, not a bad thing. However, they decided since they knew the pseudocode was spot on, the wrote all the code in one sitting, then debugged!
I was shocked. My coding style has always been this: implement a small feature, test it throughouly and make sure it works before continuing. They had not done this. There were about 50 compiler errors, not to mention logic errors they were obviously going to show up. After about only a hour of actual code typing, they had at least 6 hours of debugging ahead of them. This relatively simply project took me about 4 hours to complete.
This is not the first time I have seen this. I would say at least 1/2 of my friends and peers write a crapload of code, then try to run it and get the correct results. While I do think pseuodocode has its merits, I wish my school would teach careful coding and thinking ahead instead of concerntrating on pseuodocode. One professor is specifically known for emphasising good pseuodocode over everything else.
My pseudocode for the project they were working on was this:
Code:
Read Data From File
Put Data Into Appropriate Arrays
Sort Arrays Based On Last Name
Sort Using The Bubble Sort Method
Print Menu
Have User Enter Choice
Process Choice
When Closing Save Data To Textfile
I know it's fairly basic, but that's exactly what my program did. Fortunately for me, my professor clalims this is sufficient. His views are that pseudocode should be short and that any non coding person could read it and know what your code should be doing.
What's your thoughts?