Is it a good idea to teach algorithm courses using pseudocode instead of a real programming language?...





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







19












$begingroup$


I am a young professor teaching a data structures course for the first time. I'm teaching at an engineering college that provides an academic degree, but the focus is preparing future computer programmers, not academics.



Before the start of the semester I decided to present the algorithms as java code, instead of pseudocode. I felt that this would make the presentation more precise, and show the students how to put these algorithms to practical use.



My experience has been mixed. It seems like the problem is that now the students think that the various algorithms are the java code. They are complaining that, for example, I can't possibly expect them to know the counting sort algorithm, because how can they be expected to learn code by heart? So I am starting to understand the wisdom of using pseudocode.



My question, intended for other teachers, is: What has been your experience when using pseudocode vs using code?










share|cite|improve this question











$endgroup$


We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.





closed as off-topic by xskxzr, Evil, Derek Elkins, David Richerby, Thomas Klimpel May 18 at 9:54


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not appear to be about computer science, within the scope defined in the help center." – xskxzr, Evil, Thomas Klimpel

If this question can be reworded to fit the rules in the help center, please edit the question.












  • 25




    $begingroup$
    I wonder if this question would receive even more attention on CS Educators SE.
    $endgroup$
    – Juho
    May 16 at 8:36






  • 8




    $begingroup$
    @Juho Definitely! See for example Is there any value in teaching pseudo code? and Should the first Programming/Algorithms class be taught in pseudo-code?
    $endgroup$
    – Hendrik Jan
    May 16 at 10:37






  • 6




    $begingroup$
    This is a symptom of a failure in earlier education... an university student ought to know how to abstract ideas. Whatever choice you take you are probably still going to have troubles with these students. I don't think simply using both as @Art says would help them... you probably need to show them both and also the translation between the two... basically teach them the concretization of an algorithm from pseudo code to implementation code and abstraction of an algorithm from implementation code to pseudo code.
    $endgroup$
    – Giacomo Alzetta
    May 16 at 11:04






  • 2




    $begingroup$
    "What has been your experience when using pseudocode vs using code?" -- this is going to get you a list of singular opinions. I recommend you ask for solid evidence instead, e.g. in the form of scientific studies.
    $endgroup$
    – Raphael
    May 16 at 21:19






  • 2




    $begingroup$
    You don't say what your teaching goals are beyond the topic of the course. Those will heavily influence any didactic choice, and may just make the difference here. The background and focus of your students is also relevant, as is the form of exam you're going to hold. Say, some students know Java, others Python, and some C++. How fair is an exam requiring Java skills? How do Java skills reflect on their data structure expertise?
    $endgroup$
    – Raphael
    May 16 at 21:22


















19












$begingroup$


I am a young professor teaching a data structures course for the first time. I'm teaching at an engineering college that provides an academic degree, but the focus is preparing future computer programmers, not academics.



Before the start of the semester I decided to present the algorithms as java code, instead of pseudocode. I felt that this would make the presentation more precise, and show the students how to put these algorithms to practical use.



My experience has been mixed. It seems like the problem is that now the students think that the various algorithms are the java code. They are complaining that, for example, I can't possibly expect them to know the counting sort algorithm, because how can they be expected to learn code by heart? So I am starting to understand the wisdom of using pseudocode.



My question, intended for other teachers, is: What has been your experience when using pseudocode vs using code?










share|cite|improve this question











$endgroup$


We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.





closed as off-topic by xskxzr, Evil, Derek Elkins, David Richerby, Thomas Klimpel May 18 at 9:54


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not appear to be about computer science, within the scope defined in the help center." – xskxzr, Evil, Thomas Klimpel

If this question can be reworded to fit the rules in the help center, please edit the question.












  • 25




    $begingroup$
    I wonder if this question would receive even more attention on CS Educators SE.
    $endgroup$
    – Juho
    May 16 at 8:36






  • 8




    $begingroup$
    @Juho Definitely! See for example Is there any value in teaching pseudo code? and Should the first Programming/Algorithms class be taught in pseudo-code?
    $endgroup$
    – Hendrik Jan
    May 16 at 10:37






  • 6




    $begingroup$
    This is a symptom of a failure in earlier education... an university student ought to know how to abstract ideas. Whatever choice you take you are probably still going to have troubles with these students. I don't think simply using both as @Art says would help them... you probably need to show them both and also the translation between the two... basically teach them the concretization of an algorithm from pseudo code to implementation code and abstraction of an algorithm from implementation code to pseudo code.
    $endgroup$
    – Giacomo Alzetta
    May 16 at 11:04






  • 2




    $begingroup$
    "What has been your experience when using pseudocode vs using code?" -- this is going to get you a list of singular opinions. I recommend you ask for solid evidence instead, e.g. in the form of scientific studies.
    $endgroup$
    – Raphael
    May 16 at 21:19






  • 2




    $begingroup$
    You don't say what your teaching goals are beyond the topic of the course. Those will heavily influence any didactic choice, and may just make the difference here. The background and focus of your students is also relevant, as is the form of exam you're going to hold. Say, some students know Java, others Python, and some C++. How fair is an exam requiring Java skills? How do Java skills reflect on their data structure expertise?
    $endgroup$
    – Raphael
    May 16 at 21:22














19












19








19


4



$begingroup$


I am a young professor teaching a data structures course for the first time. I'm teaching at an engineering college that provides an academic degree, but the focus is preparing future computer programmers, not academics.



Before the start of the semester I decided to present the algorithms as java code, instead of pseudocode. I felt that this would make the presentation more precise, and show the students how to put these algorithms to practical use.



My experience has been mixed. It seems like the problem is that now the students think that the various algorithms are the java code. They are complaining that, for example, I can't possibly expect them to know the counting sort algorithm, because how can they be expected to learn code by heart? So I am starting to understand the wisdom of using pseudocode.



My question, intended for other teachers, is: What has been your experience when using pseudocode vs using code?










share|cite|improve this question











$endgroup$




I am a young professor teaching a data structures course for the first time. I'm teaching at an engineering college that provides an academic degree, but the focus is preparing future computer programmers, not academics.



Before the start of the semester I decided to present the algorithms as java code, instead of pseudocode. I felt that this would make the presentation more precise, and show the students how to put these algorithms to practical use.



My experience has been mixed. It seems like the problem is that now the students think that the various algorithms are the java code. They are complaining that, for example, I can't possibly expect them to know the counting sort algorithm, because how can they be expected to learn code by heart? So I am starting to understand the wisdom of using pseudocode.



My question, intended for other teachers, is: What has been your experience when using pseudocode vs using code?







algorithms education pseudocode






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited May 17 at 5:22









Oliphaunt

1072




1072










asked May 16 at 7:56









Zur LuriaZur Luria

29427




29427



We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.




We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.





closed as off-topic by xskxzr, Evil, Derek Elkins, David Richerby, Thomas Klimpel May 18 at 9:54


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not appear to be about computer science, within the scope defined in the help center." – xskxzr, Evil, Thomas Klimpel

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by xskxzr, Evil, Derek Elkins, David Richerby, Thomas Klimpel May 18 at 9:54


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not appear to be about computer science, within the scope defined in the help center." – xskxzr, Evil, Thomas Klimpel

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 25




    $begingroup$
    I wonder if this question would receive even more attention on CS Educators SE.
    $endgroup$
    – Juho
    May 16 at 8:36






  • 8




    $begingroup$
    @Juho Definitely! See for example Is there any value in teaching pseudo code? and Should the first Programming/Algorithms class be taught in pseudo-code?
    $endgroup$
    – Hendrik Jan
    May 16 at 10:37






  • 6




    $begingroup$
    This is a symptom of a failure in earlier education... an university student ought to know how to abstract ideas. Whatever choice you take you are probably still going to have troubles with these students. I don't think simply using both as @Art says would help them... you probably need to show them both and also the translation between the two... basically teach them the concretization of an algorithm from pseudo code to implementation code and abstraction of an algorithm from implementation code to pseudo code.
    $endgroup$
    – Giacomo Alzetta
    May 16 at 11:04






  • 2




    $begingroup$
    "What has been your experience when using pseudocode vs using code?" -- this is going to get you a list of singular opinions. I recommend you ask for solid evidence instead, e.g. in the form of scientific studies.
    $endgroup$
    – Raphael
    May 16 at 21:19






  • 2




    $begingroup$
    You don't say what your teaching goals are beyond the topic of the course. Those will heavily influence any didactic choice, and may just make the difference here. The background and focus of your students is also relevant, as is the form of exam you're going to hold. Say, some students know Java, others Python, and some C++. How fair is an exam requiring Java skills? How do Java skills reflect on their data structure expertise?
    $endgroup$
    – Raphael
    May 16 at 21:22














  • 25




    $begingroup$
    I wonder if this question would receive even more attention on CS Educators SE.
    $endgroup$
    – Juho
    May 16 at 8:36






  • 8




    $begingroup$
    @Juho Definitely! See for example Is there any value in teaching pseudo code? and Should the first Programming/Algorithms class be taught in pseudo-code?
    $endgroup$
    – Hendrik Jan
    May 16 at 10:37






  • 6




    $begingroup$
    This is a symptom of a failure in earlier education... an university student ought to know how to abstract ideas. Whatever choice you take you are probably still going to have troubles with these students. I don't think simply using both as @Art says would help them... you probably need to show them both and also the translation between the two... basically teach them the concretization of an algorithm from pseudo code to implementation code and abstraction of an algorithm from implementation code to pseudo code.
    $endgroup$
    – Giacomo Alzetta
    May 16 at 11:04






  • 2




    $begingroup$
    "What has been your experience when using pseudocode vs using code?" -- this is going to get you a list of singular opinions. I recommend you ask for solid evidence instead, e.g. in the form of scientific studies.
    $endgroup$
    – Raphael
    May 16 at 21:19






  • 2




    $begingroup$
    You don't say what your teaching goals are beyond the topic of the course. Those will heavily influence any didactic choice, and may just make the difference here. The background and focus of your students is also relevant, as is the form of exam you're going to hold. Say, some students know Java, others Python, and some C++. How fair is an exam requiring Java skills? How do Java skills reflect on their data structure expertise?
    $endgroup$
    – Raphael
    May 16 at 21:22








25




25




$begingroup$
I wonder if this question would receive even more attention on CS Educators SE.
$endgroup$
– Juho
May 16 at 8:36




$begingroup$
I wonder if this question would receive even more attention on CS Educators SE.
$endgroup$
– Juho
May 16 at 8:36




8




8




$begingroup$
@Juho Definitely! See for example Is there any value in teaching pseudo code? and Should the first Programming/Algorithms class be taught in pseudo-code?
$endgroup$
– Hendrik Jan
May 16 at 10:37




$begingroup$
@Juho Definitely! See for example Is there any value in teaching pseudo code? and Should the first Programming/Algorithms class be taught in pseudo-code?
$endgroup$
– Hendrik Jan
May 16 at 10:37




6




6




$begingroup$
This is a symptom of a failure in earlier education... an university student ought to know how to abstract ideas. Whatever choice you take you are probably still going to have troubles with these students. I don't think simply using both as @Art says would help them... you probably need to show them both and also the translation between the two... basically teach them the concretization of an algorithm from pseudo code to implementation code and abstraction of an algorithm from implementation code to pseudo code.
$endgroup$
– Giacomo Alzetta
May 16 at 11:04




$begingroup$
This is a symptom of a failure in earlier education... an university student ought to know how to abstract ideas. Whatever choice you take you are probably still going to have troubles with these students. I don't think simply using both as @Art says would help them... you probably need to show them both and also the translation between the two... basically teach them the concretization of an algorithm from pseudo code to implementation code and abstraction of an algorithm from implementation code to pseudo code.
$endgroup$
– Giacomo Alzetta
May 16 at 11:04




2




2




$begingroup$
"What has been your experience when using pseudocode vs using code?" -- this is going to get you a list of singular opinions. I recommend you ask for solid evidence instead, e.g. in the form of scientific studies.
$endgroup$
– Raphael
May 16 at 21:19




$begingroup$
"What has been your experience when using pseudocode vs using code?" -- this is going to get you a list of singular opinions. I recommend you ask for solid evidence instead, e.g. in the form of scientific studies.
$endgroup$
– Raphael
May 16 at 21:19




2




2




$begingroup$
You don't say what your teaching goals are beyond the topic of the course. Those will heavily influence any didactic choice, and may just make the difference here. The background and focus of your students is also relevant, as is the form of exam you're going to hold. Say, some students know Java, others Python, and some C++. How fair is an exam requiring Java skills? How do Java skills reflect on their data structure expertise?
$endgroup$
– Raphael
May 16 at 21:22




$begingroup$
You don't say what your teaching goals are beyond the topic of the course. Those will heavily influence any didactic choice, and may just make the difference here. The background and focus of your students is also relevant, as is the form of exam you're going to hold. Say, some students know Java, others Python, and some C++. How fair is an exam requiring Java skills? How do Java skills reflect on their data structure expertise?
$endgroup$
– Raphael
May 16 at 21:22










9 Answers
9






active

oldest

votes


















31












$begingroup$

Similar to @Vince, I think it's a good practice to do both. I don't really agree with the cooking recipe analogy, though. Pseudocode describes that the algorithm does, without going into detail how you do it.



I think perhaps a better analogy:




  • Pseudocode: you need to put an egg into the flour mixture

  • Actual code: pick up an egg, crack it open on the side of the bowl, and drop the egg into the container. Don't forget you need to dispose the egg shell as well.


There are so many ways to accomplish the task, and the actual code just gives the student an example of how to do it.



Presenting only the pseudocode might make some of your students loss. Presenting only the actual code would keep them in the box and get them focused too much on the details. A mixture of both would be my choice.






share|cite|improve this answer









$endgroup$









  • 38




    $begingroup$
    Don't crack the egg on the side of the bowl: that risks getting shell in your batter, which is a pain to get out again. And this is exactly why actual code is bad for teaching -- arguments about irrelevant details take over.
    $endgroup$
    – David Richerby
    May 16 at 8:57






  • 13




    $begingroup$
    @DavidRicherby: Isn't your example proving the exact opposite, that actual code is useful for teaching actual skills? In pseudo-code, it's easy to ignore edge cases like the empty collection and the collection with one element.
    $endgroup$
    – MSalters
    May 16 at 12:49






  • 7




    $begingroup$
    Depends on which "skill" you wanna have the students practice I guess. I'd imagine that these students preparing to become a programmer would have other project courses to practice on coding already.
    $endgroup$
    – Art
    May 16 at 13:00






  • 6




    $begingroup$
    @MSalters There are multiple skills, and it's usually not a good idea to try to cover too many of them at once. In an algorithms course, the focus is on algorithms, not coding; in a creative writing course, the focus is on expression, not handwriting; etc.
    $endgroup$
    – David Richerby
    May 16 at 15:59






  • 2




    $begingroup$
    @DavidRicherby Most people in an algorithms course intend to actually write code for a living. There is no reason to deprive them of experience converting problem descriptions to actual code. The skill of making that translation is fundamental to being able to do much of anything useful in computing.
    $endgroup$
    – jpmc26
    May 17 at 1:06



















21












$begingroup$

Actually I am of the opinion that you should not present your own code, but rather get the students to implement the algorithms you teach them, which you give in pseudocode, and give them the freedom to choose any one of a fixed set of languages that you are familiar with, such as C++/Java/Python. Really, the only way students can truly understand an algorithm is when they face the real task of implementing it, but the key ideas behind an algorithm can be sufficiently conveyed via pseudocode.






share|cite|improve this answer









$endgroup$









  • 5




    $begingroup$
    And perhaps even more importantly, don't go about the entire course shoving one arbitrarily-chosen programming language down students' throats; specially not Java. That's very off-putting. I've seen complaints about this all too often.
    $endgroup$
    – Marc.2377
    May 16 at 23:54






  • 1




    $begingroup$
    The algorithms course I'm taking right now is exactly what you are talking about. The prof explains algorithms in class and we can choose the Python, Java and C++ to implement them as homework :) I can confirm that this is a great idea :)
    $endgroup$
    – Rakete1111
    May 17 at 22:03










  • $begingroup$
    Implementation from pseudo-code is one of the more long term useful skills. Outside an academic algorithm design course, I have rarely needed to create an algorithm from scratch. I have often needed to look one up in various references, and implement it in whatever language I'm currently using.
    $endgroup$
    – Patricia Shanahan
    May 19 at 3:46



















7












$begingroup$

I understand your dilemma, but from a general pov it's better to present content through pseudocode. This actually gives students the freedom to explore multiple languages. When you present your code in a particular language you are making them comfortable with that language alone and they might find it hard to shift to other languages later on. The main purpose of learning algorithms is to know how they work rather than implementing them in a particular language. Regarding resources, I would suggest looking up books like Introduction to Algorithms. You can also refer to CodeMonk which is an online portal which has a collection of all known problems and algorithms to look into.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    “When you present your code in a particular language you are making them comfortable with that language alone” This can be an advantage if the students are currently learning the same language. Just don’t confuse them with features they haven’t used yet.
    $endgroup$
    – Michael
    May 16 at 11:39



















5












$begingroup$

One of the key points here is that you are teaching to future engineers, even if at academic level. The very nature of engineering is solving problems by implementing a solution.



Therefore I think that presenting the pseudocode is useful to give your student the correct theoretical POV to frame the problem, BUT showing them an actual, working implementation is key to make them develop their engineering skills.



Much better would be to show them the pseudocode and make them try to come up with an implementation first, then show them yours. But this requires honing their skills first, probably.



As their skills improve, you may also dare show them more than one implementation, possibly in two or more languages. Of course this depends on their actual knowledge of the languages you are going to use. If they know only, say, Java, showing them an additional implementation in another language could backfire and confuse them more.



Of course, I'm assuming that it's not your duty to teach them another computer language, otherwise, it could be a useful approach: start with pseudocode, show a reference implementation in a known language (e.g. Java) and finally show them how to reimplement the algorithm in the new language they must learn.






share|cite|improve this answer











$endgroup$





















    5












    $begingroup$

    When I took algorithms, my first professor used a pseudo-code of his choosing. It may have been clear in his mind, but in was pretty opaque in they eyes of his students. It was a much dreaded class, and hard to get useful knowledge from. Then he had a heart attack.



    New professor (let's call him "Finkle"), discarded the previous class notes and textbook. Finkle wrote new notes (replacing the book) and explained algorithms using Pascal (it was the 1980's). Pascal was much more clear than the pseudo-code AND IF YOU DID NOT UNDERSTAND HOW SOMETHING WORKED, YOU COULD RUN THE CODE AND LEARN.



    That class ended up being the most valuable class in my whole undergraduate education.






    share|cite|improve this answer









    $endgroup$





















      4












      $begingroup$


      1. Pseudocode helps a lot by removing anything unnecessary, and focusing entirely on the algorithm, which can already be hard to understand as is. It's also faster to express ideas : if a student wants to write a different algorithm than the one you taught them, it can be really cumbersome if they have to deal with every details of Java.


      2. As others said, it's good for students to come up with their own implementation in code of the pseudo-code algorithm. They need to really understand it, while if they just paste code or learn it by heart they won't necessarily understand every subtlety.



      I think most universities do this already (mine did), but I think the best is pseudocode for the course, and real code for practical exercises.






      share|cite|improve this answer











      $endgroup$





















        3












        $begingroup$

        Neither alone is enough for a good dish.



        I'd go with pseudo code in the lecture, and use homework to give students practice in turning pseudo code into real code.



        Using pseudo code in the lecture has the pragmatic reason that pseudo code is, by nature, somehow vague. You want to use it as a tool to be able to concisely state ideas that still contain all important details, but abstract as many of the unimportant ones away.



        Because of this, it takes some time to gauge, as a student, how pseudo your pseudo code actually is allowed to be:

        As an example, at the start of the course, pseudo code shouldn't involve a (merge-)sort, but once you're done with that chapter, there's no harm in adding the line "sort the array A" without further explanation.



        Therefore I'd say that the easiest way for a student to learn what is, and what is not, allowed in pseudo code, is by getting a feel for it, simply by osmosis over time.



        And if some students have problems understanding your pseudo code, then they still have enough resources (books, or even interactive coding sessions of the algorithm) showing them how the algorithms would look like in an actual programming language.



        On the other hand, to understand the design and working of an algorithm, it helps immensely to have coded it yourself, at least partially, once.

        Therefore, by letting your students program the algorithm (or letting them finish a partially programmed algorithm) and then tasking them to "play with it", they'll get a good look on the other side of the medal as well.






        share|cite|improve this answer









        $endgroup$





















          3












          $begingroup$

          Writing from a students point of view:



          I had a course regarding algorithms and data structures two years ago.



          The first exercise consisted of implementing a program with a certain behavior (Search in a sorted array, etc.).
          In the next lecture we would discuss an algorithm in pseudocode which fulfills the requirement of the previous exercise, only in a more efficient manner. The next exercise consisted of another goal to achieve (sort an array, ...) and a implementation of the pseudocode we discussed earlier in the lecture. We could freely choose the language for implementation.



          These assignments made every student give their best since we compared the runtimes of our algorithms among ourselves.



          The course was well received among all of the ~30 students. For myself I think I learnt a lot since you can also focus on optimization instead of only making something work.






          share|cite|improve this answer









          $endgroup$





















            2












            $begingroup$

            I think the best is to do a comparison. The algorithm may be a cooking recipe that may be written in many languages but produce always the same cake.



            Pseudo-code is like describing the recipe with pictures. There is not a unique grammar or way to "talk" in pseudo-code but anyone should be able to interpret it. By reading the pseudo-code written by someone, one may often guess what is his favorite language. The main rule is to forbid the language specific keywords.



            Teaching an algorithm in a specific language is not a problem in my opinion as long as anyone understand it. But if you want someone to master this algorithm, you have to make him try it by hand. Make him do the different steps of the algorithm on a small example. In fact it is again like cooking the cake... You can remember a recipe much easier if you actually have cooked it.






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              Not just pictures, but more like ideograms.
              $endgroup$
              – user28434
              May 17 at 15:10


















            9 Answers
            9






            active

            oldest

            votes








            9 Answers
            9






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            31












            $begingroup$

            Similar to @Vince, I think it's a good practice to do both. I don't really agree with the cooking recipe analogy, though. Pseudocode describes that the algorithm does, without going into detail how you do it.



            I think perhaps a better analogy:




            • Pseudocode: you need to put an egg into the flour mixture

            • Actual code: pick up an egg, crack it open on the side of the bowl, and drop the egg into the container. Don't forget you need to dispose the egg shell as well.


            There are so many ways to accomplish the task, and the actual code just gives the student an example of how to do it.



            Presenting only the pseudocode might make some of your students loss. Presenting only the actual code would keep them in the box and get them focused too much on the details. A mixture of both would be my choice.






            share|cite|improve this answer









            $endgroup$









            • 38




              $begingroup$
              Don't crack the egg on the side of the bowl: that risks getting shell in your batter, which is a pain to get out again. And this is exactly why actual code is bad for teaching -- arguments about irrelevant details take over.
              $endgroup$
              – David Richerby
              May 16 at 8:57






            • 13




              $begingroup$
              @DavidRicherby: Isn't your example proving the exact opposite, that actual code is useful for teaching actual skills? In pseudo-code, it's easy to ignore edge cases like the empty collection and the collection with one element.
              $endgroup$
              – MSalters
              May 16 at 12:49






            • 7




              $begingroup$
              Depends on which "skill" you wanna have the students practice I guess. I'd imagine that these students preparing to become a programmer would have other project courses to practice on coding already.
              $endgroup$
              – Art
              May 16 at 13:00






            • 6




              $begingroup$
              @MSalters There are multiple skills, and it's usually not a good idea to try to cover too many of them at once. In an algorithms course, the focus is on algorithms, not coding; in a creative writing course, the focus is on expression, not handwriting; etc.
              $endgroup$
              – David Richerby
              May 16 at 15:59






            • 2




              $begingroup$
              @DavidRicherby Most people in an algorithms course intend to actually write code for a living. There is no reason to deprive them of experience converting problem descriptions to actual code. The skill of making that translation is fundamental to being able to do much of anything useful in computing.
              $endgroup$
              – jpmc26
              May 17 at 1:06
















            31












            $begingroup$

            Similar to @Vince, I think it's a good practice to do both. I don't really agree with the cooking recipe analogy, though. Pseudocode describes that the algorithm does, without going into detail how you do it.



            I think perhaps a better analogy:




            • Pseudocode: you need to put an egg into the flour mixture

            • Actual code: pick up an egg, crack it open on the side of the bowl, and drop the egg into the container. Don't forget you need to dispose the egg shell as well.


            There are so many ways to accomplish the task, and the actual code just gives the student an example of how to do it.



            Presenting only the pseudocode might make some of your students loss. Presenting only the actual code would keep them in the box and get them focused too much on the details. A mixture of both would be my choice.






            share|cite|improve this answer









            $endgroup$









            • 38




              $begingroup$
              Don't crack the egg on the side of the bowl: that risks getting shell in your batter, which is a pain to get out again. And this is exactly why actual code is bad for teaching -- arguments about irrelevant details take over.
              $endgroup$
              – David Richerby
              May 16 at 8:57






            • 13




              $begingroup$
              @DavidRicherby: Isn't your example proving the exact opposite, that actual code is useful for teaching actual skills? In pseudo-code, it's easy to ignore edge cases like the empty collection and the collection with one element.
              $endgroup$
              – MSalters
              May 16 at 12:49






            • 7




              $begingroup$
              Depends on which "skill" you wanna have the students practice I guess. I'd imagine that these students preparing to become a programmer would have other project courses to practice on coding already.
              $endgroup$
              – Art
              May 16 at 13:00






            • 6




              $begingroup$
              @MSalters There are multiple skills, and it's usually not a good idea to try to cover too many of them at once. In an algorithms course, the focus is on algorithms, not coding; in a creative writing course, the focus is on expression, not handwriting; etc.
              $endgroup$
              – David Richerby
              May 16 at 15:59






            • 2




              $begingroup$
              @DavidRicherby Most people in an algorithms course intend to actually write code for a living. There is no reason to deprive them of experience converting problem descriptions to actual code. The skill of making that translation is fundamental to being able to do much of anything useful in computing.
              $endgroup$
              – jpmc26
              May 17 at 1:06














            31












            31








            31





            $begingroup$

            Similar to @Vince, I think it's a good practice to do both. I don't really agree with the cooking recipe analogy, though. Pseudocode describes that the algorithm does, without going into detail how you do it.



            I think perhaps a better analogy:




            • Pseudocode: you need to put an egg into the flour mixture

            • Actual code: pick up an egg, crack it open on the side of the bowl, and drop the egg into the container. Don't forget you need to dispose the egg shell as well.


            There are so many ways to accomplish the task, and the actual code just gives the student an example of how to do it.



            Presenting only the pseudocode might make some of your students loss. Presenting only the actual code would keep them in the box and get them focused too much on the details. A mixture of both would be my choice.






            share|cite|improve this answer









            $endgroup$



            Similar to @Vince, I think it's a good practice to do both. I don't really agree with the cooking recipe analogy, though. Pseudocode describes that the algorithm does, without going into detail how you do it.



            I think perhaps a better analogy:




            • Pseudocode: you need to put an egg into the flour mixture

            • Actual code: pick up an egg, crack it open on the side of the bowl, and drop the egg into the container. Don't forget you need to dispose the egg shell as well.


            There are so many ways to accomplish the task, and the actual code just gives the student an example of how to do it.



            Presenting only the pseudocode might make some of your students loss. Presenting only the actual code would keep them in the box and get them focused too much on the details. A mixture of both would be my choice.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered May 16 at 8:27









            ArtArt

            44814




            44814








            • 38




              $begingroup$
              Don't crack the egg on the side of the bowl: that risks getting shell in your batter, which is a pain to get out again. And this is exactly why actual code is bad for teaching -- arguments about irrelevant details take over.
              $endgroup$
              – David Richerby
              May 16 at 8:57






            • 13




              $begingroup$
              @DavidRicherby: Isn't your example proving the exact opposite, that actual code is useful for teaching actual skills? In pseudo-code, it's easy to ignore edge cases like the empty collection and the collection with one element.
              $endgroup$
              – MSalters
              May 16 at 12:49






            • 7




              $begingroup$
              Depends on which "skill" you wanna have the students practice I guess. I'd imagine that these students preparing to become a programmer would have other project courses to practice on coding already.
              $endgroup$
              – Art
              May 16 at 13:00






            • 6




              $begingroup$
              @MSalters There are multiple skills, and it's usually not a good idea to try to cover too many of them at once. In an algorithms course, the focus is on algorithms, not coding; in a creative writing course, the focus is on expression, not handwriting; etc.
              $endgroup$
              – David Richerby
              May 16 at 15:59






            • 2




              $begingroup$
              @DavidRicherby Most people in an algorithms course intend to actually write code for a living. There is no reason to deprive them of experience converting problem descriptions to actual code. The skill of making that translation is fundamental to being able to do much of anything useful in computing.
              $endgroup$
              – jpmc26
              May 17 at 1:06














            • 38




              $begingroup$
              Don't crack the egg on the side of the bowl: that risks getting shell in your batter, which is a pain to get out again. And this is exactly why actual code is bad for teaching -- arguments about irrelevant details take over.
              $endgroup$
              – David Richerby
              May 16 at 8:57






            • 13




              $begingroup$
              @DavidRicherby: Isn't your example proving the exact opposite, that actual code is useful for teaching actual skills? In pseudo-code, it's easy to ignore edge cases like the empty collection and the collection with one element.
              $endgroup$
              – MSalters
              May 16 at 12:49






            • 7




              $begingroup$
              Depends on which "skill" you wanna have the students practice I guess. I'd imagine that these students preparing to become a programmer would have other project courses to practice on coding already.
              $endgroup$
              – Art
              May 16 at 13:00






            • 6




              $begingroup$
              @MSalters There are multiple skills, and it's usually not a good idea to try to cover too many of them at once. In an algorithms course, the focus is on algorithms, not coding; in a creative writing course, the focus is on expression, not handwriting; etc.
              $endgroup$
              – David Richerby
              May 16 at 15:59






            • 2




              $begingroup$
              @DavidRicherby Most people in an algorithms course intend to actually write code for a living. There is no reason to deprive them of experience converting problem descriptions to actual code. The skill of making that translation is fundamental to being able to do much of anything useful in computing.
              $endgroup$
              – jpmc26
              May 17 at 1:06








            38




            38




            $begingroup$
            Don't crack the egg on the side of the bowl: that risks getting shell in your batter, which is a pain to get out again. And this is exactly why actual code is bad for teaching -- arguments about irrelevant details take over.
            $endgroup$
            – David Richerby
            May 16 at 8:57




            $begingroup$
            Don't crack the egg on the side of the bowl: that risks getting shell in your batter, which is a pain to get out again. And this is exactly why actual code is bad for teaching -- arguments about irrelevant details take over.
            $endgroup$
            – David Richerby
            May 16 at 8:57




            13




            13




            $begingroup$
            @DavidRicherby: Isn't your example proving the exact opposite, that actual code is useful for teaching actual skills? In pseudo-code, it's easy to ignore edge cases like the empty collection and the collection with one element.
            $endgroup$
            – MSalters
            May 16 at 12:49




            $begingroup$
            @DavidRicherby: Isn't your example proving the exact opposite, that actual code is useful for teaching actual skills? In pseudo-code, it's easy to ignore edge cases like the empty collection and the collection with one element.
            $endgroup$
            – MSalters
            May 16 at 12:49




            7




            7




            $begingroup$
            Depends on which "skill" you wanna have the students practice I guess. I'd imagine that these students preparing to become a programmer would have other project courses to practice on coding already.
            $endgroup$
            – Art
            May 16 at 13:00




            $begingroup$
            Depends on which "skill" you wanna have the students practice I guess. I'd imagine that these students preparing to become a programmer would have other project courses to practice on coding already.
            $endgroup$
            – Art
            May 16 at 13:00




            6




            6




            $begingroup$
            @MSalters There are multiple skills, and it's usually not a good idea to try to cover too many of them at once. In an algorithms course, the focus is on algorithms, not coding; in a creative writing course, the focus is on expression, not handwriting; etc.
            $endgroup$
            – David Richerby
            May 16 at 15:59




            $begingroup$
            @MSalters There are multiple skills, and it's usually not a good idea to try to cover too many of them at once. In an algorithms course, the focus is on algorithms, not coding; in a creative writing course, the focus is on expression, not handwriting; etc.
            $endgroup$
            – David Richerby
            May 16 at 15:59




            2




            2




            $begingroup$
            @DavidRicherby Most people in an algorithms course intend to actually write code for a living. There is no reason to deprive them of experience converting problem descriptions to actual code. The skill of making that translation is fundamental to being able to do much of anything useful in computing.
            $endgroup$
            – jpmc26
            May 17 at 1:06




            $begingroup$
            @DavidRicherby Most people in an algorithms course intend to actually write code for a living. There is no reason to deprive them of experience converting problem descriptions to actual code. The skill of making that translation is fundamental to being able to do much of anything useful in computing.
            $endgroup$
            – jpmc26
            May 17 at 1:06













            21












            $begingroup$

            Actually I am of the opinion that you should not present your own code, but rather get the students to implement the algorithms you teach them, which you give in pseudocode, and give them the freedom to choose any one of a fixed set of languages that you are familiar with, such as C++/Java/Python. Really, the only way students can truly understand an algorithm is when they face the real task of implementing it, but the key ideas behind an algorithm can be sufficiently conveyed via pseudocode.






            share|cite|improve this answer









            $endgroup$









            • 5




              $begingroup$
              And perhaps even more importantly, don't go about the entire course shoving one arbitrarily-chosen programming language down students' throats; specially not Java. That's very off-putting. I've seen complaints about this all too often.
              $endgroup$
              – Marc.2377
              May 16 at 23:54






            • 1




              $begingroup$
              The algorithms course I'm taking right now is exactly what you are talking about. The prof explains algorithms in class and we can choose the Python, Java and C++ to implement them as homework :) I can confirm that this is a great idea :)
              $endgroup$
              – Rakete1111
              May 17 at 22:03










            • $begingroup$
              Implementation from pseudo-code is one of the more long term useful skills. Outside an academic algorithm design course, I have rarely needed to create an algorithm from scratch. I have often needed to look one up in various references, and implement it in whatever language I'm currently using.
              $endgroup$
              – Patricia Shanahan
              May 19 at 3:46
















            21












            $begingroup$

            Actually I am of the opinion that you should not present your own code, but rather get the students to implement the algorithms you teach them, which you give in pseudocode, and give them the freedom to choose any one of a fixed set of languages that you are familiar with, such as C++/Java/Python. Really, the only way students can truly understand an algorithm is when they face the real task of implementing it, but the key ideas behind an algorithm can be sufficiently conveyed via pseudocode.






            share|cite|improve this answer









            $endgroup$









            • 5




              $begingroup$
              And perhaps even more importantly, don't go about the entire course shoving one arbitrarily-chosen programming language down students' throats; specially not Java. That's very off-putting. I've seen complaints about this all too often.
              $endgroup$
              – Marc.2377
              May 16 at 23:54






            • 1




              $begingroup$
              The algorithms course I'm taking right now is exactly what you are talking about. The prof explains algorithms in class and we can choose the Python, Java and C++ to implement them as homework :) I can confirm that this is a great idea :)
              $endgroup$
              – Rakete1111
              May 17 at 22:03










            • $begingroup$
              Implementation from pseudo-code is one of the more long term useful skills. Outside an academic algorithm design course, I have rarely needed to create an algorithm from scratch. I have often needed to look one up in various references, and implement it in whatever language I'm currently using.
              $endgroup$
              – Patricia Shanahan
              May 19 at 3:46














            21












            21








            21





            $begingroup$

            Actually I am of the opinion that you should not present your own code, but rather get the students to implement the algorithms you teach them, which you give in pseudocode, and give them the freedom to choose any one of a fixed set of languages that you are familiar with, such as C++/Java/Python. Really, the only way students can truly understand an algorithm is when they face the real task of implementing it, but the key ideas behind an algorithm can be sufficiently conveyed via pseudocode.






            share|cite|improve this answer









            $endgroup$



            Actually I am of the opinion that you should not present your own code, but rather get the students to implement the algorithms you teach them, which you give in pseudocode, and give them the freedom to choose any one of a fixed set of languages that you are familiar with, such as C++/Java/Python. Really, the only way students can truly understand an algorithm is when they face the real task of implementing it, but the key ideas behind an algorithm can be sufficiently conveyed via pseudocode.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered May 16 at 12:41









            user21820user21820

            33216




            33216








            • 5




              $begingroup$
              And perhaps even more importantly, don't go about the entire course shoving one arbitrarily-chosen programming language down students' throats; specially not Java. That's very off-putting. I've seen complaints about this all too often.
              $endgroup$
              – Marc.2377
              May 16 at 23:54






            • 1




              $begingroup$
              The algorithms course I'm taking right now is exactly what you are talking about. The prof explains algorithms in class and we can choose the Python, Java and C++ to implement them as homework :) I can confirm that this is a great idea :)
              $endgroup$
              – Rakete1111
              May 17 at 22:03










            • $begingroup$
              Implementation from pseudo-code is one of the more long term useful skills. Outside an academic algorithm design course, I have rarely needed to create an algorithm from scratch. I have often needed to look one up in various references, and implement it in whatever language I'm currently using.
              $endgroup$
              – Patricia Shanahan
              May 19 at 3:46














            • 5




              $begingroup$
              And perhaps even more importantly, don't go about the entire course shoving one arbitrarily-chosen programming language down students' throats; specially not Java. That's very off-putting. I've seen complaints about this all too often.
              $endgroup$
              – Marc.2377
              May 16 at 23:54






            • 1




              $begingroup$
              The algorithms course I'm taking right now is exactly what you are talking about. The prof explains algorithms in class and we can choose the Python, Java and C++ to implement them as homework :) I can confirm that this is a great idea :)
              $endgroup$
              – Rakete1111
              May 17 at 22:03










            • $begingroup$
              Implementation from pseudo-code is one of the more long term useful skills. Outside an academic algorithm design course, I have rarely needed to create an algorithm from scratch. I have often needed to look one up in various references, and implement it in whatever language I'm currently using.
              $endgroup$
              – Patricia Shanahan
              May 19 at 3:46








            5




            5




            $begingroup$
            And perhaps even more importantly, don't go about the entire course shoving one arbitrarily-chosen programming language down students' throats; specially not Java. That's very off-putting. I've seen complaints about this all too often.
            $endgroup$
            – Marc.2377
            May 16 at 23:54




            $begingroup$
            And perhaps even more importantly, don't go about the entire course shoving one arbitrarily-chosen programming language down students' throats; specially not Java. That's very off-putting. I've seen complaints about this all too often.
            $endgroup$
            – Marc.2377
            May 16 at 23:54




            1




            1




            $begingroup$
            The algorithms course I'm taking right now is exactly what you are talking about. The prof explains algorithms in class and we can choose the Python, Java and C++ to implement them as homework :) I can confirm that this is a great idea :)
            $endgroup$
            – Rakete1111
            May 17 at 22:03




            $begingroup$
            The algorithms course I'm taking right now is exactly what you are talking about. The prof explains algorithms in class and we can choose the Python, Java and C++ to implement them as homework :) I can confirm that this is a great idea :)
            $endgroup$
            – Rakete1111
            May 17 at 22:03












            $begingroup$
            Implementation from pseudo-code is one of the more long term useful skills. Outside an academic algorithm design course, I have rarely needed to create an algorithm from scratch. I have often needed to look one up in various references, and implement it in whatever language I'm currently using.
            $endgroup$
            – Patricia Shanahan
            May 19 at 3:46




            $begingroup$
            Implementation from pseudo-code is one of the more long term useful skills. Outside an academic algorithm design course, I have rarely needed to create an algorithm from scratch. I have often needed to look one up in various references, and implement it in whatever language I'm currently using.
            $endgroup$
            – Patricia Shanahan
            May 19 at 3:46











            7












            $begingroup$

            I understand your dilemma, but from a general pov it's better to present content through pseudocode. This actually gives students the freedom to explore multiple languages. When you present your code in a particular language you are making them comfortable with that language alone and they might find it hard to shift to other languages later on. The main purpose of learning algorithms is to know how they work rather than implementing them in a particular language. Regarding resources, I would suggest looking up books like Introduction to Algorithms. You can also refer to CodeMonk which is an online portal which has a collection of all known problems and algorithms to look into.






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              “When you present your code in a particular language you are making them comfortable with that language alone” This can be an advantage if the students are currently learning the same language. Just don’t confuse them with features they haven’t used yet.
              $endgroup$
              – Michael
              May 16 at 11:39
















            7












            $begingroup$

            I understand your dilemma, but from a general pov it's better to present content through pseudocode. This actually gives students the freedom to explore multiple languages. When you present your code in a particular language you are making them comfortable with that language alone and they might find it hard to shift to other languages later on. The main purpose of learning algorithms is to know how they work rather than implementing them in a particular language. Regarding resources, I would suggest looking up books like Introduction to Algorithms. You can also refer to CodeMonk which is an online portal which has a collection of all known problems and algorithms to look into.






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              “When you present your code in a particular language you are making them comfortable with that language alone” This can be an advantage if the students are currently learning the same language. Just don’t confuse them with features they haven’t used yet.
              $endgroup$
              – Michael
              May 16 at 11:39














            7












            7








            7





            $begingroup$

            I understand your dilemma, but from a general pov it's better to present content through pseudocode. This actually gives students the freedom to explore multiple languages. When you present your code in a particular language you are making them comfortable with that language alone and they might find it hard to shift to other languages later on. The main purpose of learning algorithms is to know how they work rather than implementing them in a particular language. Regarding resources, I would suggest looking up books like Introduction to Algorithms. You can also refer to CodeMonk which is an online portal which has a collection of all known problems and algorithms to look into.






            share|cite|improve this answer









            $endgroup$



            I understand your dilemma, but from a general pov it's better to present content through pseudocode. This actually gives students the freedom to explore multiple languages. When you present your code in a particular language you are making them comfortable with that language alone and they might find it hard to shift to other languages later on. The main purpose of learning algorithms is to know how they work rather than implementing them in a particular language. Regarding resources, I would suggest looking up books like Introduction to Algorithms. You can also refer to CodeMonk which is an online portal which has a collection of all known problems and algorithms to look into.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered May 16 at 8:24









            Vikas ShettyVikas Shetty

            835




            835












            • $begingroup$
              “When you present your code in a particular language you are making them comfortable with that language alone” This can be an advantage if the students are currently learning the same language. Just don’t confuse them with features they haven’t used yet.
              $endgroup$
              – Michael
              May 16 at 11:39


















            • $begingroup$
              “When you present your code in a particular language you are making them comfortable with that language alone” This can be an advantage if the students are currently learning the same language. Just don’t confuse them with features they haven’t used yet.
              $endgroup$
              – Michael
              May 16 at 11:39
















            $begingroup$
            “When you present your code in a particular language you are making them comfortable with that language alone” This can be an advantage if the students are currently learning the same language. Just don’t confuse them with features they haven’t used yet.
            $endgroup$
            – Michael
            May 16 at 11:39




            $begingroup$
            “When you present your code in a particular language you are making them comfortable with that language alone” This can be an advantage if the students are currently learning the same language. Just don’t confuse them with features they haven’t used yet.
            $endgroup$
            – Michael
            May 16 at 11:39











            5












            $begingroup$

            One of the key points here is that you are teaching to future engineers, even if at academic level. The very nature of engineering is solving problems by implementing a solution.



            Therefore I think that presenting the pseudocode is useful to give your student the correct theoretical POV to frame the problem, BUT showing them an actual, working implementation is key to make them develop their engineering skills.



            Much better would be to show them the pseudocode and make them try to come up with an implementation first, then show them yours. But this requires honing their skills first, probably.



            As their skills improve, you may also dare show them more than one implementation, possibly in two or more languages. Of course this depends on their actual knowledge of the languages you are going to use. If they know only, say, Java, showing them an additional implementation in another language could backfire and confuse them more.



            Of course, I'm assuming that it's not your duty to teach them another computer language, otherwise, it could be a useful approach: start with pseudocode, show a reference implementation in a known language (e.g. Java) and finally show them how to reimplement the algorithm in the new language they must learn.






            share|cite|improve this answer











            $endgroup$


















              5












              $begingroup$

              One of the key points here is that you are teaching to future engineers, even if at academic level. The very nature of engineering is solving problems by implementing a solution.



              Therefore I think that presenting the pseudocode is useful to give your student the correct theoretical POV to frame the problem, BUT showing them an actual, working implementation is key to make them develop their engineering skills.



              Much better would be to show them the pseudocode and make them try to come up with an implementation first, then show them yours. But this requires honing their skills first, probably.



              As their skills improve, you may also dare show them more than one implementation, possibly in two or more languages. Of course this depends on their actual knowledge of the languages you are going to use. If they know only, say, Java, showing them an additional implementation in another language could backfire and confuse them more.



              Of course, I'm assuming that it's not your duty to teach them another computer language, otherwise, it could be a useful approach: start with pseudocode, show a reference implementation in a known language (e.g. Java) and finally show them how to reimplement the algorithm in the new language they must learn.






              share|cite|improve this answer











              $endgroup$
















                5












                5








                5





                $begingroup$

                One of the key points here is that you are teaching to future engineers, even if at academic level. The very nature of engineering is solving problems by implementing a solution.



                Therefore I think that presenting the pseudocode is useful to give your student the correct theoretical POV to frame the problem, BUT showing them an actual, working implementation is key to make them develop their engineering skills.



                Much better would be to show them the pseudocode and make them try to come up with an implementation first, then show them yours. But this requires honing their skills first, probably.



                As their skills improve, you may also dare show them more than one implementation, possibly in two or more languages. Of course this depends on their actual knowledge of the languages you are going to use. If they know only, say, Java, showing them an additional implementation in another language could backfire and confuse them more.



                Of course, I'm assuming that it's not your duty to teach them another computer language, otherwise, it could be a useful approach: start with pseudocode, show a reference implementation in a known language (e.g. Java) and finally show them how to reimplement the algorithm in the new language they must learn.






                share|cite|improve this answer











                $endgroup$



                One of the key points here is that you are teaching to future engineers, even if at academic level. The very nature of engineering is solving problems by implementing a solution.



                Therefore I think that presenting the pseudocode is useful to give your student the correct theoretical POV to frame the problem, BUT showing them an actual, working implementation is key to make them develop their engineering skills.



                Much better would be to show them the pseudocode and make them try to come up with an implementation first, then show them yours. But this requires honing their skills first, probably.



                As their skills improve, you may also dare show them more than one implementation, possibly in two or more languages. Of course this depends on their actual knowledge of the languages you are going to use. If they know only, say, Java, showing them an additional implementation in another language could backfire and confuse them more.



                Of course, I'm assuming that it's not your duty to teach them another computer language, otherwise, it could be a useful approach: start with pseudocode, show a reference implementation in a known language (e.g. Java) and finally show them how to reimplement the algorithm in the new language they must learn.







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited May 16 at 15:18

























                answered May 16 at 15:12









                Lorenzo DonatiLorenzo Donati

                1515




                1515























                    5












                    $begingroup$

                    When I took algorithms, my first professor used a pseudo-code of his choosing. It may have been clear in his mind, but in was pretty opaque in they eyes of his students. It was a much dreaded class, and hard to get useful knowledge from. Then he had a heart attack.



                    New professor (let's call him "Finkle"), discarded the previous class notes and textbook. Finkle wrote new notes (replacing the book) and explained algorithms using Pascal (it was the 1980's). Pascal was much more clear than the pseudo-code AND IF YOU DID NOT UNDERSTAND HOW SOMETHING WORKED, YOU COULD RUN THE CODE AND LEARN.



                    That class ended up being the most valuable class in my whole undergraduate education.






                    share|cite|improve this answer









                    $endgroup$


















                      5












                      $begingroup$

                      When I took algorithms, my first professor used a pseudo-code of his choosing. It may have been clear in his mind, but in was pretty opaque in they eyes of his students. It was a much dreaded class, and hard to get useful knowledge from. Then he had a heart attack.



                      New professor (let's call him "Finkle"), discarded the previous class notes and textbook. Finkle wrote new notes (replacing the book) and explained algorithms using Pascal (it was the 1980's). Pascal was much more clear than the pseudo-code AND IF YOU DID NOT UNDERSTAND HOW SOMETHING WORKED, YOU COULD RUN THE CODE AND LEARN.



                      That class ended up being the most valuable class in my whole undergraduate education.






                      share|cite|improve this answer









                      $endgroup$
















                        5












                        5








                        5





                        $begingroup$

                        When I took algorithms, my first professor used a pseudo-code of his choosing. It may have been clear in his mind, but in was pretty opaque in they eyes of his students. It was a much dreaded class, and hard to get useful knowledge from. Then he had a heart attack.



                        New professor (let's call him "Finkle"), discarded the previous class notes and textbook. Finkle wrote new notes (replacing the book) and explained algorithms using Pascal (it was the 1980's). Pascal was much more clear than the pseudo-code AND IF YOU DID NOT UNDERSTAND HOW SOMETHING WORKED, YOU COULD RUN THE CODE AND LEARN.



                        That class ended up being the most valuable class in my whole undergraduate education.






                        share|cite|improve this answer









                        $endgroup$



                        When I took algorithms, my first professor used a pseudo-code of his choosing. It may have been clear in his mind, but in was pretty opaque in they eyes of his students. It was a much dreaded class, and hard to get useful knowledge from. Then he had a heart attack.



                        New professor (let's call him "Finkle"), discarded the previous class notes and textbook. Finkle wrote new notes (replacing the book) and explained algorithms using Pascal (it was the 1980's). Pascal was much more clear than the pseudo-code AND IF YOU DID NOT UNDERSTAND HOW SOMETHING WORKED, YOU COULD RUN THE CODE AND LEARN.



                        That class ended up being the most valuable class in my whole undergraduate education.







                        share|cite|improve this answer












                        share|cite|improve this answer



                        share|cite|improve this answer










                        answered May 17 at 12:49









                        paul carpenterpaul carpenter

                        591




                        591























                            4












                            $begingroup$


                            1. Pseudocode helps a lot by removing anything unnecessary, and focusing entirely on the algorithm, which can already be hard to understand as is. It's also faster to express ideas : if a student wants to write a different algorithm than the one you taught them, it can be really cumbersome if they have to deal with every details of Java.


                            2. As others said, it's good for students to come up with their own implementation in code of the pseudo-code algorithm. They need to really understand it, while if they just paste code or learn it by heart they won't necessarily understand every subtlety.



                            I think most universities do this already (mine did), but I think the best is pseudocode for the course, and real code for practical exercises.






                            share|cite|improve this answer











                            $endgroup$


















                              4












                              $begingroup$


                              1. Pseudocode helps a lot by removing anything unnecessary, and focusing entirely on the algorithm, which can already be hard to understand as is. It's also faster to express ideas : if a student wants to write a different algorithm than the one you taught them, it can be really cumbersome if they have to deal with every details of Java.


                              2. As others said, it's good for students to come up with their own implementation in code of the pseudo-code algorithm. They need to really understand it, while if they just paste code or learn it by heart they won't necessarily understand every subtlety.



                              I think most universities do this already (mine did), but I think the best is pseudocode for the course, and real code for practical exercises.






                              share|cite|improve this answer











                              $endgroup$
















                                4












                                4








                                4





                                $begingroup$


                                1. Pseudocode helps a lot by removing anything unnecessary, and focusing entirely on the algorithm, which can already be hard to understand as is. It's also faster to express ideas : if a student wants to write a different algorithm than the one you taught them, it can be really cumbersome if they have to deal with every details of Java.


                                2. As others said, it's good for students to come up with their own implementation in code of the pseudo-code algorithm. They need to really understand it, while if they just paste code or learn it by heart they won't necessarily understand every subtlety.



                                I think most universities do this already (mine did), but I think the best is pseudocode for the course, and real code for practical exercises.






                                share|cite|improve this answer











                                $endgroup$




                                1. Pseudocode helps a lot by removing anything unnecessary, and focusing entirely on the algorithm, which can already be hard to understand as is. It's also faster to express ideas : if a student wants to write a different algorithm than the one you taught them, it can be really cumbersome if they have to deal with every details of Java.


                                2. As others said, it's good for students to come up with their own implementation in code of the pseudo-code algorithm. They need to really understand it, while if they just paste code or learn it by heart they won't necessarily understand every subtlety.



                                I think most universities do this already (mine did), but I think the best is pseudocode for the course, and real code for practical exercises.







                                share|cite|improve this answer














                                share|cite|improve this answer



                                share|cite|improve this answer








                                edited May 17 at 7:57

























                                answered May 16 at 15:28









                                Teleporting GoatTeleporting Goat

                                1412




                                1412























                                    3












                                    $begingroup$

                                    Neither alone is enough for a good dish.



                                    I'd go with pseudo code in the lecture, and use homework to give students practice in turning pseudo code into real code.



                                    Using pseudo code in the lecture has the pragmatic reason that pseudo code is, by nature, somehow vague. You want to use it as a tool to be able to concisely state ideas that still contain all important details, but abstract as many of the unimportant ones away.



                                    Because of this, it takes some time to gauge, as a student, how pseudo your pseudo code actually is allowed to be:

                                    As an example, at the start of the course, pseudo code shouldn't involve a (merge-)sort, but once you're done with that chapter, there's no harm in adding the line "sort the array A" without further explanation.



                                    Therefore I'd say that the easiest way for a student to learn what is, and what is not, allowed in pseudo code, is by getting a feel for it, simply by osmosis over time.



                                    And if some students have problems understanding your pseudo code, then they still have enough resources (books, or even interactive coding sessions of the algorithm) showing them how the algorithms would look like in an actual programming language.



                                    On the other hand, to understand the design and working of an algorithm, it helps immensely to have coded it yourself, at least partially, once.

                                    Therefore, by letting your students program the algorithm (or letting them finish a partially programmed algorithm) and then tasking them to "play with it", they'll get a good look on the other side of the medal as well.






                                    share|cite|improve this answer









                                    $endgroup$


















                                      3












                                      $begingroup$

                                      Neither alone is enough for a good dish.



                                      I'd go with pseudo code in the lecture, and use homework to give students practice in turning pseudo code into real code.



                                      Using pseudo code in the lecture has the pragmatic reason that pseudo code is, by nature, somehow vague. You want to use it as a tool to be able to concisely state ideas that still contain all important details, but abstract as many of the unimportant ones away.



                                      Because of this, it takes some time to gauge, as a student, how pseudo your pseudo code actually is allowed to be:

                                      As an example, at the start of the course, pseudo code shouldn't involve a (merge-)sort, but once you're done with that chapter, there's no harm in adding the line "sort the array A" without further explanation.



                                      Therefore I'd say that the easiest way for a student to learn what is, and what is not, allowed in pseudo code, is by getting a feel for it, simply by osmosis over time.



                                      And if some students have problems understanding your pseudo code, then they still have enough resources (books, or even interactive coding sessions of the algorithm) showing them how the algorithms would look like in an actual programming language.



                                      On the other hand, to understand the design and working of an algorithm, it helps immensely to have coded it yourself, at least partially, once.

                                      Therefore, by letting your students program the algorithm (or letting them finish a partially programmed algorithm) and then tasking them to "play with it", they'll get a good look on the other side of the medal as well.






                                      share|cite|improve this answer









                                      $endgroup$
















                                        3












                                        3








                                        3





                                        $begingroup$

                                        Neither alone is enough for a good dish.



                                        I'd go with pseudo code in the lecture, and use homework to give students practice in turning pseudo code into real code.



                                        Using pseudo code in the lecture has the pragmatic reason that pseudo code is, by nature, somehow vague. You want to use it as a tool to be able to concisely state ideas that still contain all important details, but abstract as many of the unimportant ones away.



                                        Because of this, it takes some time to gauge, as a student, how pseudo your pseudo code actually is allowed to be:

                                        As an example, at the start of the course, pseudo code shouldn't involve a (merge-)sort, but once you're done with that chapter, there's no harm in adding the line "sort the array A" without further explanation.



                                        Therefore I'd say that the easiest way for a student to learn what is, and what is not, allowed in pseudo code, is by getting a feel for it, simply by osmosis over time.



                                        And if some students have problems understanding your pseudo code, then they still have enough resources (books, or even interactive coding sessions of the algorithm) showing them how the algorithms would look like in an actual programming language.



                                        On the other hand, to understand the design and working of an algorithm, it helps immensely to have coded it yourself, at least partially, once.

                                        Therefore, by letting your students program the algorithm (or letting them finish a partially programmed algorithm) and then tasking them to "play with it", they'll get a good look on the other side of the medal as well.






                                        share|cite|improve this answer









                                        $endgroup$



                                        Neither alone is enough for a good dish.



                                        I'd go with pseudo code in the lecture, and use homework to give students practice in turning pseudo code into real code.



                                        Using pseudo code in the lecture has the pragmatic reason that pseudo code is, by nature, somehow vague. You want to use it as a tool to be able to concisely state ideas that still contain all important details, but abstract as many of the unimportant ones away.



                                        Because of this, it takes some time to gauge, as a student, how pseudo your pseudo code actually is allowed to be:

                                        As an example, at the start of the course, pseudo code shouldn't involve a (merge-)sort, but once you're done with that chapter, there's no harm in adding the line "sort the array A" without further explanation.



                                        Therefore I'd say that the easiest way for a student to learn what is, and what is not, allowed in pseudo code, is by getting a feel for it, simply by osmosis over time.



                                        And if some students have problems understanding your pseudo code, then they still have enough resources (books, or even interactive coding sessions of the algorithm) showing them how the algorithms would look like in an actual programming language.



                                        On the other hand, to understand the design and working of an algorithm, it helps immensely to have coded it yourself, at least partially, once.

                                        Therefore, by letting your students program the algorithm (or letting them finish a partially programmed algorithm) and then tasking them to "play with it", they'll get a good look on the other side of the medal as well.







                                        share|cite|improve this answer












                                        share|cite|improve this answer



                                        share|cite|improve this answer










                                        answered May 16 at 18:31









                                        SudixSudix

                                        31618




                                        31618























                                            3












                                            $begingroup$

                                            Writing from a students point of view:



                                            I had a course regarding algorithms and data structures two years ago.



                                            The first exercise consisted of implementing a program with a certain behavior (Search in a sorted array, etc.).
                                            In the next lecture we would discuss an algorithm in pseudocode which fulfills the requirement of the previous exercise, only in a more efficient manner. The next exercise consisted of another goal to achieve (sort an array, ...) and a implementation of the pseudocode we discussed earlier in the lecture. We could freely choose the language for implementation.



                                            These assignments made every student give their best since we compared the runtimes of our algorithms among ourselves.



                                            The course was well received among all of the ~30 students. For myself I think I learnt a lot since you can also focus on optimization instead of only making something work.






                                            share|cite|improve this answer









                                            $endgroup$


















                                              3












                                              $begingroup$

                                              Writing from a students point of view:



                                              I had a course regarding algorithms and data structures two years ago.



                                              The first exercise consisted of implementing a program with a certain behavior (Search in a sorted array, etc.).
                                              In the next lecture we would discuss an algorithm in pseudocode which fulfills the requirement of the previous exercise, only in a more efficient manner. The next exercise consisted of another goal to achieve (sort an array, ...) and a implementation of the pseudocode we discussed earlier in the lecture. We could freely choose the language for implementation.



                                              These assignments made every student give their best since we compared the runtimes of our algorithms among ourselves.



                                              The course was well received among all of the ~30 students. For myself I think I learnt a lot since you can also focus on optimization instead of only making something work.






                                              share|cite|improve this answer









                                              $endgroup$
















                                                3












                                                3








                                                3





                                                $begingroup$

                                                Writing from a students point of view:



                                                I had a course regarding algorithms and data structures two years ago.



                                                The first exercise consisted of implementing a program with a certain behavior (Search in a sorted array, etc.).
                                                In the next lecture we would discuss an algorithm in pseudocode which fulfills the requirement of the previous exercise, only in a more efficient manner. The next exercise consisted of another goal to achieve (sort an array, ...) and a implementation of the pseudocode we discussed earlier in the lecture. We could freely choose the language for implementation.



                                                These assignments made every student give their best since we compared the runtimes of our algorithms among ourselves.



                                                The course was well received among all of the ~30 students. For myself I think I learnt a lot since you can also focus on optimization instead of only making something work.






                                                share|cite|improve this answer









                                                $endgroup$



                                                Writing from a students point of view:



                                                I had a course regarding algorithms and data structures two years ago.



                                                The first exercise consisted of implementing a program with a certain behavior (Search in a sorted array, etc.).
                                                In the next lecture we would discuss an algorithm in pseudocode which fulfills the requirement of the previous exercise, only in a more efficient manner. The next exercise consisted of another goal to achieve (sort an array, ...) and a implementation of the pseudocode we discussed earlier in the lecture. We could freely choose the language for implementation.



                                                These assignments made every student give their best since we compared the runtimes of our algorithms among ourselves.



                                                The course was well received among all of the ~30 students. For myself I think I learnt a lot since you can also focus on optimization instead of only making something work.







                                                share|cite|improve this answer












                                                share|cite|improve this answer



                                                share|cite|improve this answer










                                                answered May 17 at 11:49









                                                bautistabautista

                                                1311




                                                1311























                                                    2












                                                    $begingroup$

                                                    I think the best is to do a comparison. The algorithm may be a cooking recipe that may be written in many languages but produce always the same cake.



                                                    Pseudo-code is like describing the recipe with pictures. There is not a unique grammar or way to "talk" in pseudo-code but anyone should be able to interpret it. By reading the pseudo-code written by someone, one may often guess what is his favorite language. The main rule is to forbid the language specific keywords.



                                                    Teaching an algorithm in a specific language is not a problem in my opinion as long as anyone understand it. But if you want someone to master this algorithm, you have to make him try it by hand. Make him do the different steps of the algorithm on a small example. In fact it is again like cooking the cake... You can remember a recipe much easier if you actually have cooked it.






                                                    share|cite|improve this answer









                                                    $endgroup$













                                                    • $begingroup$
                                                      Not just pictures, but more like ideograms.
                                                      $endgroup$
                                                      – user28434
                                                      May 17 at 15:10
















                                                    2












                                                    $begingroup$

                                                    I think the best is to do a comparison. The algorithm may be a cooking recipe that may be written in many languages but produce always the same cake.



                                                    Pseudo-code is like describing the recipe with pictures. There is not a unique grammar or way to "talk" in pseudo-code but anyone should be able to interpret it. By reading the pseudo-code written by someone, one may often guess what is his favorite language. The main rule is to forbid the language specific keywords.



                                                    Teaching an algorithm in a specific language is not a problem in my opinion as long as anyone understand it. But if you want someone to master this algorithm, you have to make him try it by hand. Make him do the different steps of the algorithm on a small example. In fact it is again like cooking the cake... You can remember a recipe much easier if you actually have cooked it.






                                                    share|cite|improve this answer









                                                    $endgroup$













                                                    • $begingroup$
                                                      Not just pictures, but more like ideograms.
                                                      $endgroup$
                                                      – user28434
                                                      May 17 at 15:10














                                                    2












                                                    2








                                                    2





                                                    $begingroup$

                                                    I think the best is to do a comparison. The algorithm may be a cooking recipe that may be written in many languages but produce always the same cake.



                                                    Pseudo-code is like describing the recipe with pictures. There is not a unique grammar or way to "talk" in pseudo-code but anyone should be able to interpret it. By reading the pseudo-code written by someone, one may often guess what is his favorite language. The main rule is to forbid the language specific keywords.



                                                    Teaching an algorithm in a specific language is not a problem in my opinion as long as anyone understand it. But if you want someone to master this algorithm, you have to make him try it by hand. Make him do the different steps of the algorithm on a small example. In fact it is again like cooking the cake... You can remember a recipe much easier if you actually have cooked it.






                                                    share|cite|improve this answer









                                                    $endgroup$



                                                    I think the best is to do a comparison. The algorithm may be a cooking recipe that may be written in many languages but produce always the same cake.



                                                    Pseudo-code is like describing the recipe with pictures. There is not a unique grammar or way to "talk" in pseudo-code but anyone should be able to interpret it. By reading the pseudo-code written by someone, one may often guess what is his favorite language. The main rule is to forbid the language specific keywords.



                                                    Teaching an algorithm in a specific language is not a problem in my opinion as long as anyone understand it. But if you want someone to master this algorithm, you have to make him try it by hand. Make him do the different steps of the algorithm on a small example. In fact it is again like cooking the cake... You can remember a recipe much easier if you actually have cooked it.







                                                    share|cite|improve this answer












                                                    share|cite|improve this answer



                                                    share|cite|improve this answer










                                                    answered May 16 at 8:18









                                                    VinceVince

                                                    993210




                                                    993210












                                                    • $begingroup$
                                                      Not just pictures, but more like ideograms.
                                                      $endgroup$
                                                      – user28434
                                                      May 17 at 15:10


















                                                    • $begingroup$
                                                      Not just pictures, but more like ideograms.
                                                      $endgroup$
                                                      – user28434
                                                      May 17 at 15:10
















                                                    $begingroup$
                                                    Not just pictures, but more like ideograms.
                                                    $endgroup$
                                                    – user28434
                                                    May 17 at 15:10




                                                    $begingroup$
                                                    Not just pictures, but more like ideograms.
                                                    $endgroup$
                                                    – user28434
                                                    May 17 at 15:10



                                                    Popular posts from this blog

                                                    He _____ here since 1970 . Answer needed [closed]What does “since he was so high” mean?Meaning of “catch birds for”?How do I ensure “since” takes the meaning I want?“Who cares here” meaningWhat does “right round toward” mean?the time tense (had now been detected)What does the phrase “ring around the roses” mean here?Correct usage of “visited upon”Meaning of “foiled rail sabotage bid”It was the third time I had gone to Rome or It is the third time I had been to Rome

                                                    Bunad

                                                    Færeyskur hestur Heimild | Tengill | Tilvísanir | LeiðsagnarvalRossið - síða um færeyska hrossið á færeyskuGott ár hjá færeyska hestinum