Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
18

No, it shouldn't. It's an appealing idea, but when kids are just starting in programming, one of the few straws they have to grasp at is that it is, on some level, very concrete. I type: std::cout << "Hello World!"; ... and out prints "Hello World!". Without the ability to run and troubleshoot code, I'm afraid that everything will become abstract, ...


14

Rather than giving them processes to model algorithmically, have them start coming up with algorithms for everyday activities. Here is the formal assignment I have students complete: CS50 AP - Everyday Algorithms. They begin with a simple pseudocode example: 1 look out the window 2 if it is raining outside 3 put on your rain boots 4 put on ...


12

Yes, the first algorithms class should be taught in pseudo-code (And teach logic tables too.) If the objective of the class is to teach algorithms and programming, not a programming language, the pseudo-code is the way to focus on the objectives, not the tools. Flow charting can be included, but need not be either. Programs written in pseudo-code don't ...


11

How do you teach students of this age and ability to think algorithmically? I don't really think there's a silver bullet to this problem. To be able to think algorithmically, you need to solve lots of problems, over and over. Some students will naturally have the ability to be able to describe algorithms without much teaching, but it's not a universal skill,...


10

Neither is always better, and both have their strengths. The idea of scoring higher marks as a criteria for better is going to be unpredictable without knowing who is granting those marks. Someone who is heavily in favor of one style over the other may grant higher marks to low quality uses of their favored style than they would to high quality answers in ...


7

I remember a demonstration from early in my first college CS course (this was in 1998, almost 20 years ago!), where the professor brought in a loaf of bread, a butter knife, a jar of peanut butter, and a jar of jelly. He then asked the class to give him instructions to make a peanut butter sandwich, with predictably hilarious results. After we had finally ...


6

Yes, definitely. There is a need, while developing an algorithm, for a language (or diagramming technique) that is less precise and requires less detail than a formal programming language. This is to let the developer expand his/her thoughts from an overall view to one that is more and more refined. This is true even for high-level languages, though the ...


6

The problem as described is simply translation from one firm of words to another, so in some senses, students may not really grasp what you are asking for. I think a more important thing to ask for is to construct algorithms from a less structured problem. A flow chart is just another way to write the algorithm, not really a progression - and not ...


6

I think this heavily depends on the environment. Is this a science university? A middle school? An engineering high school? Pseudo code has its uses. At university level, with years of programming to come, you should use pseudo code - they will need to learn it anyway, and they need to understand the theory without strongly connecting it to one programming ...


5

No, classes should favor actual programming languages. Ideally, students should should be able to: Run code examples. Apply code analysis tools to code examples, both to better understand the examples and to become familiar with code analysis. Experiment with modifying code. However, it's important to select a reasonable language. Unfortunately some ...


5

Sounds like you've tried everything already, but here are some suggestions: Use a scenario / problem that every student can relate to Most of my lower ability 13-14 year old boys don't have much experience of wages, tax and jobs. Writing an algorithm for making a perfect cup of tea doesn't do much for them either. Drawing a flow chart for how to irritate ...


5

I'm a bit confused by your question. Your exercise seems to involve some combination of… Requirements gathering: what are the inputs, outputs, and formulas? Translating the requirements to a conceptual model Translating the conceptual model to pseudocode Translating the pseudocode to code Translating the pseudocode or code back to a flowchart (Why? In ...


4

I just finished up 8th grade. I took an Intro to Engineering/Robotics class as an elective this past semester. I have programmed (mainly in Python 3) before this class, and I was mainly excited for the Robotics part. When we started, the teacher talked to us about how the computer takes things very literally, etc, etc, and then - he had us pretend he was ...


4

Since all the other great answers are all given, let me mention a minor one. Lateral thinking Puzzles are good for this. They help to teach children to think in a different manner by themselves and encourage general problem solving. However, they can be used to teach one important part of algorithms, the need for rigor in your statements, if one chooses ...


4

Even though it can be complicated, recursion gives a great algorithmic view of problems. I have seen quite a few students start to think in an algorithmic way after I introduce recursion (just very simple problems such as printing the individual characters of a string. I'll refer to this exercise as an example task throughout the answer). This gives them ...


4

One thing that helps in my experience (albeit with older students) is to give a pseudo-code cheat-sheet and insist that the problem has to be solved only using the building blocks on the sheet. In particular, you must insist that anything that is not on the list must be written using the building blocks. So if at some point they need to fill an array with ...


4

Thinking algorithmically isn't always natural. In an algorithm, you're going to write down everything the computer is going to, then hit "go" and step away for a few microseconds while the computer does it. In most of our lives, there's more back-and-forth in our interactions, so it takes a while to get used to thinking in this one-pass approach. ...


3

Pseudo-code feels like one of those things invented before I learnt to code, as a response to the complexity of reading and to a lesser extent writing code in assembler (or even machine code). When it was impossible to explain a program without recourse to explaining every single term (starting with 'every line needs a number, start off with increments of ...


3

Pseudo-code allows expressing that an algorithm to solve some problem is not the same as the syntax (formatting, punctuation abuse, etc.) required to make any particular compiler or interpreter happy. Pseudo-code is also suitable for algorithms using data types that are not directly expressible in a standard programming language, such as real physical ...


3

The biggest problem is moving students to a difficult algorithm before they have mileage with simple ones. The best way I've found is a. Go over the classic small algorithms, especially array and string based. - e.g. find the sum, min, max, do a swap. b. give students many small algorithmic problems to solve. I use the exercises at codingbat.com which ...


3

So far in my career, when I have a student who just doesn't seem to get it (and there is no obvious discernible cause) it very often comes down to one of two problems. The first is mutability, which I wrote a little piece about here. Kids who can't easily trace how values will change need explicit practice in this concept before they will really be able to ...


2

Practice. Thinking algorithmically is a skill, and skills develop with focused practice over time. All of the relevant-to-life examples in previous answers are forms of practice that will result in some skills transfer to computer algorithms and also maintain student interest. You could add some basic mathematical algorithms that students know to the pool ...


2

Here's an enlightening blog post about teaching programming to elementary school age children. They started without any computers at all by "programming" the teacher to walk from one corner of the class to the other using few simple commands. They then proceeded to use the Turtle Roy online programming environment which works like the Logo programming ...


2

Do you know about the initiative called Scratch? It's a visual and algorithmical language, it can be useful as an introductory subject for your students. In scratch you can visually build loops, conditionals, functions, and return events, it's a whole language that is more approachable to beginners, and maybe might incite more their inquisitive ...


2

The other answers are already spot-on, but I wanted to offer another way to think about it... My question is this: which is better for planning a set of algorithms: pseudocode or flow charts? By better I mean faster, more accurate, easier to understand and/or gives a better chance of scoring higher marks. Like many things in programming, ...


2

Both are a requirement of one of the courses that I teach. I like to start with a flowchart, as (for all the reasons mentioned by @GypsySpellweaver already) they provide a good visual representation of the problem to be solved, and can help then to generate the pseudo code. Value of flowcharts Although I have seen it argued that flowcharts are somewhat ...


1

While both notations have their use, I would only use flow charts when the algorithm lends itself to it, namely when the algorithm is made of loops and conditionals. If your algorithm is recursive for instance, or rely fundamentally on a particular data structure (for instance a stack or a queue) then flowcharts won't help you. In my experience I found ...


1

Pseudo-code is not an option. You have to have it. The purpose of such a course is not about the expression of algorithms in a nearly ready to run form. It is about the work involved in their development. The strategies you use. The ideas you consider, try and abandon as they don't seem so good. So how could we use a formal language to write down fuzzy ...


1

Perhaps students should be required to at least learn to read pseudo-code. Some algorithms or concept are unsuited for clear expression in some languages (e.g. the ones pre-requisite for the course). Those concepts might be more simply explainable using a pseudo-code that does not require the clutter of a lot of syntactic sugar or other gymnastics. ...


Only top voted, non community-wiki answers of a minimum length are eligible