Questions tagged [syntax]
Questions related to teaching about programming language syntax. Use this tag to ask about teaching the usage of correct syntax or to ask questions involving it.
11
questions
2
votes
1
answer
139
views
Are there any recommended tools for teaching syntax and grammar of programming languages?
I would like to know if there are some tools to teach the following topics in a programming paradigms course:
Demonstration of lexical rules
Demonstration of grammar rules, such as tree parsers of ...
8
votes
4
answers
2k
views
What are some non-CS concepts that can be defined using BNF notation?
I'm preparing a class on the modified BNF notation that python uses. I.e.,
Each rule begins with a name (which is the name defined by the rule) and ::=. A vertical bar (...
2
votes
3
answers
102
views
A category to classify expressions, statements and blocks
I was teaching an intro to Programming class, full of social scientists. After explaining that the basic building blocks of a program are called tokens, I took them through Keywords, Identifiers, ...
5
votes
2
answers
144
views
App Lab/JS confusion between strings and variables
In my APCSP class (using app lab, which is javascript based), I noticed that there are many students who struggle with the difference between a string ("foo") and a ...
2
votes
1
answer
74
views
Going from syntax to CS concepts
I am going to be teaching a small-ish group of people to write code to control a device. The code is built around a giant framework made to make it easy to write the actual code. My job nominally is ...
9
votes
2
answers
168
views
Is it a good idea to have students see syntax much earlier than they write it themselves?
I was wondering if there was any research on whether or not students generally perform better later if they're introduced to the syntax they'll be learning far earlier than they actually use it.
As ...
3
votes
5
answers
371
views
How to teach beginning students how to find and fix syntax errors?
Our college has a course entitled "Introduction To Programming", although I often tell the students that the real title should be "Introduction to Programming... for non-majors... who have never ...
7
votes
3
answers
215
views
Teaching syntactic sugar
When I show my code to students I tutor, they ask about "all those things in my code", which refers (quite vaguely) to things such as shortened ifs, post\...
8
votes
4
answers
512
views
How can I help students develop intuition about a programming language?
As an tutor for introductory CS classes, I often come across students that have a very rigid understanding of a programming language up to what they have been taught so far. This most often manifests ...
12
votes
7
answers
770
views
Lesson Idea: Arrays, Pointers, and Syntactic Sugar
One of the most challenging concepts to instill in new CS students is 0-indexing (indeed, the pedagogy of this fact probably merits its own discussion). Another difficult topic -- although a slightly ...
16
votes
9
answers
989
views
Should I have written tests on basic programming skills?
When making more complex programs, it is natural that one needs to run the program to see whether things work and fixing bugs. However, if one makes a lot of mistakes in basic programming, e.g. ...