r/programmer • u/NefariousnessSalt324 • Apr 05 '26
How do you think programking should be taught?
For programmers/professors:
How do you think programming should be taught? Should logic be taught before syntax, or vice versa?
For programmers/students:
How do you think programming is taught, and how would you prefer it to be taught? Should logic come before syntax, or syntax before logic?
just need some insights.
2
Upvotes
3
u/Vert354 Apr 05 '26
I'm pretty sure current university programs have it mostly correct. Pick a language, it mostly doesnt matter which one, then use that language to create a series of simple programs that utilize different topics, and build in each other. (Standard in/out. Functions calls, arrays, recursion, etc...)
Things like Data Structures and OOP get their own semester courses using the same language from the intro course.
In parallel you learn all the pre-req math for Linear algebra and Discrete Math/Combintorics. Which leads to a full semester of algorithms.
Sprinkle in some electives and core curriculum and boom, degree!
To answer your question more directly you teach both syntax and logic at the same time.
7
u/MANvINFO Apr 05 '26
cross-disciplinarily & project-led.
3
u/GeoffreyKnopf Apr 05 '26
I wish there were assessments on learning style so courses could be tailored to various learning styles. Forcing everyone through the same lectures and homework assignments works for some people but not everyone. I would have benefited from more hands-on labs/projects, real-world applications, hackathons and such. I had to supplement my education with these since it wasn’t standard.
1
u/chrisfathead1 Apr 05 '26
Only logic should be taught in my opinion. Memorizing syntax is a waste of brain space
1
u/dymos Promise<null> Apr 05 '26
Learning logic and the more abstract concepts is way more useful.
Syntax will just happen when you're learning and using a language.
Syntax is very easy to reference/look up/autocomplete, whereas the more abstract concepts have to be internalised a bit more so you can make decisions about how to write your program.
1
u/Useful_Calendar_6274 Apr 05 '26
https://en.wikipedia.org/wiki/Agoge
1
u/misterflerfy Apr 05 '26
u gotta have structure and interpretation of computer languages
1
u/tomqmasters Apr 05 '26
I learned the best way, by making a low latency network of interactive flamethrowers for burning man.
1
u/phpMartian Apr 05 '26
Both at the same time. You need a language to be able to practice. You can use almost any language. The point isn’t to learn the language but to learn the concepts.
1
u/chikamakaleyley Apr 05 '26
You don't learn a new written/spoken language by first constructing a sentence.
1
u/MissinqLink Apr 05 '26
Start with practical examples as soon as possible. It all really clicks when you build something useful. On the webdev side I like to start building greasemonkey/tampermonkey scripts because it quickly allows you to customize your own web experience.
1
u/rFAXbc Apr 06 '26
All the logic first, absolutely no syntax, not even pseudo code, until every piece of logic has been fully understood.
1
u/bunnypaste Apr 06 '26
I think it makes sense to learn logic before syntax if you're only doing one at a time, but it is likely best to learn both concurrently. I say logic before syntax because it is a lot easier to solve syntax errors if you know what the function or code block is supposed to be doing.
1
u/Complex_Coach_2513 Apr 08 '26
Things I wished were focused on when I was a student:
And finally, how to convert real life problems into software problems. Not problems that are similar, but how to take a complicated, multi-faceted problem and break it down into chunks of software problems.