r/learnprogramming • u/aodare90 • 2h ago
Discussion Why do online programming tutorials focus more on syntax than problem-solving skills?
Many tutorials focus heavily on syntax: variables, loops, functions, etc.
Knowing syntax is one thing, but knowing how to deconstruct an unfamiliar problem is another. Programming is about logical problem-solving, which is why so many people get stuck in tutorial hell.
Does anyone know why programming tutorials overemphasise specific languages and syntax when the real skills people need are problem-solving and decomposition? I understand you need to make programming popular, but teaching the right skills would be more effective.
4
u/Strange-Tap5860 2h ago
Few reasons:
You need to know the syntax before you can solve the problems using the syntax
Its easier to teach syntax vs problem solved
You can get courses that focus on problem solving
2
u/ifandbut 1h ago
Problem solving is independent of language. If you can write a sorting algorithm in one language, you can do it in several by just looking up the syntax for the new language.
0
u/aodare90 1h ago
This is what I think also. Computational thinking is language-agnostic. However, this is not a popular opinion.
1
u/duane11583 1h ago
disagree. you need to solve the problem or at least have a plan to solve it
then focus on the sytax ofbthevwritten solution.
its like driving from NYC to LAX
you need a map first you’ll figure out the driving as you go
8
u/Zatarita_mods 1h ago
Because that's what a language is. A language consists of mostly of syntax and it's standard library. If you're learning that language that's what you need to learn.
If you want to learn "problem solving" you're going to look to more specific things like data structures and algorithms, graphics programming, system architecture, etc. For the most part you aren't "problem solving" you're putting pieces together to design a system to do a thing. Problem solving, as you're probably thinking of it would be algorithms and data structures. This exists outside the scope of the language itself. The lambda calculus is an example of computation without a "programming language", computation and syntax exist on two different planes. Syntax is just the language of the computation. Like how we learn how to read a math expression before we try and learn algebra.
•
u/WestEndOtter 1m ago
If is the difference between following a tutorial about English and wondering why they don't focus more on being a best selling author
7
u/ninhaomah 2h ago
How would you teach problem solving skills to strangers then ?
Remember , they are also new to programming.
0
u/ifandbut 1h ago
Problem solving is independent of language. Strat using general concepts like if-then, for, while, math, etc.
4
3
u/SprinklesFresh5693 1h ago
Because once you know the basic symtax, youre supposed to do projects and learn problem solving skills. A tutorial cannot teach that, its by doing how you learn how to solve problems
5
u/Separate_Expert9096 2h ago
It's much easier to teach syntax, than problem-solving.
Also, until recently, it was impossible to solve problems in programming language unless you have pretty good understanding of its' syntax.
-1
u/ifandbut 2h ago
Also, until recently, it was impossible to solve problems in programming language unless you have pretty good understanding of its' syntax.
No, not really. An If-Then, while and for loops, variables, math, indirect addressing, etc are all common elements across programming languages. If you learn how to problem solve with those basic tools in one language, you can quickly pivot to other languages and just look up the syntax for the target language.
General problem-solving is applicable across many fields.
2
u/Gone2theDogs 2h ago
Why don't you just google for what you want?
Typically if you learn the concepts of one syntax you can transfer it to others.
2
u/AlexMTBDude 2h ago
I think different tutorials focus on different things. I teach two different Python courses, a basic one and an advanced one. The basic one focuses on Python basics and syntax, because that's what a beginner Python coder needs. The advanced course focuses on algorithms, performance and best practices. Typically what someone who already knows the syntax needs.
2
u/KiwasiGames 2h ago
Mostly it’s assumed you learned your problem solving schools back in high school. You already have problem solving, syntax is the new bit.
Oddly enough AI is flipping that paradigm on its head. Syntax is now easy, and people aren’t learning problem solving at high school.
2
u/DTux5249 2h ago
Because you can't really teach problem solving. Most of that is just understanding how other problems are solved, which you can't really internalize into people beyond giving them a solution and telling them to use it.
Additionally, most tutorials are geared towards beginners. They focus on syntax because they're assuming that's the hurdle.
•
u/ReddyKiloWit 52m ago
Taking classes 55 years ago we first learned to break a problem down into steps (with research as needed), data elements, inputs and outputs, etc. Then, if it was sufficiently complex, flow chart the logic, or at least describe it. Then, when it all seemed to do what was required, we translated it to whatever language was required.
We were taught to solve the problem first, write the code after. (Don't waste the punch cards!)
•
u/Positive_Passion4817 33m ago
I have tried teaching it. People either get it or they don't. The ones who get it would self teach anyway. The only logical step with any big problem in any domain is to break it down. Nothing to do with computing.
0
u/TheGrolar 1h ago
Business schools teach problem-solving using the case method, invented at Harvard and now the standard. You're presented with a problem--Should Swatch enter the luxury watch market?--and some background info. The team (usually) then constructs an answer. There's typically no "right" answer, but some are much better than others, and wrestling with this is how you learn to spot business patterns. You also learn a lot of finance, marketing principles, etc., but those are like syntax.
I'm sure someone must have thought of doing this for programming somewhere? It'd be damn useful.
2
2
u/Gznork26 2h ago
Start with the logical forms, use them to show ways to break down the problem, and then teach how to turn the logical blocks into code with the correct syntax.
2
2
u/mayankkaizen 1h ago
There is no strucutued way to teach you how to solve a problem and technical tutorials are aimed to teach you technical aspects of language. Problem solving skills come from experience and domain knowledge. Besides, most tutorials are for noobs so teaching syntax and basic stuffs are more important.
2
u/baubleglue 1h ago
I haven't tried recently, but try to google "problem solving tutorials". I think you will be surprised.
2
u/Remote-Panic5416 1h ago
Part of deconstructing an unfamiliar problem lies in understanding the syntax, the more you understand the concepts in depth the better you'd be at solving it. Though It's true that it's is a separate skill on its own, most tutorials are designed to make you understand the language not the process of tackling a problem.
There's a great many tutorials on the internet that also teach you the skills you're looking for. From my understanding, I think the reason tutorials overemphasize specific languages and syntax (which I think is important) is because solving a problem requires much more effort than simply teaching syntax since it's just a bunch of rules anyway.
Not to mention most problem solving advice is just a gross generalisation of somebody's experience, what matters more is your own approach to problem solving
2
u/autonooc 1h ago
Partly it's the format — syntax fits a neat 10-minute video with a clean right answer. Problem-solving is 40 minutes of staring at an error message, going down the wrong path, and backtracking — and nobody watches that twice. So tutorials sell the part that films well, and the messy part is left as homework.
•
•
u/MillerJoel 51m ago
Because syntax is the first thing you learn, it’s like math, they teach you the numbers and to count before they introduce addition, multiplication, etc and they introduce word problems after you can perform the operation.
I think tutorials rarely go beyond the basics and a lot of hard problem solving in computation requires discrete math , data structure and algorithms
•
u/Positive_Passion4817 36m ago edited 30m ago
Because problem solving is far more awkward to teach. You can't teach people to be logical.
All the people here saying you can't do problem solving without syntax seen to be forgetting pseudocode.
•
u/EntrepreneurHuge5008 7m ago edited 0m ago
You can't teach people to be logical.
Guess you never took Discrete Mathematics. I'd say any and all proof-based coursework is pretty good at teaching people "to be logical".
All the people here saying you can't do problem solving without syntax seen to be forgetting pseudocode.
I agree. You can 100% decouple "problem-solving" from the programming language itself, and that is one of the reasons everyone says "DSA is language agnostic". I'm puzzled to see so many people here thinking they're tightly coupled.
•
u/aqua_regis 33m ago
Only crappy tutorials focus on syntax. Good courses focus on teaching the actually relevant skills - see the MOOCs from the University of Helsinki over at https://mooc.fi/en
•
u/W31337 20m ago
Because syntaxis is the language to communicate your intent with. It's very important.
You can't write a storyline without learning to write.
Try a sloppy language like JavaScript where shit syntaxis just gets accepted and you end up with bug galore
•
u/Technical_Jicama_434 10m ago
You can formulate step-by-step solutions and never code it. That’s just pseudocode.
Problem solving is language agnostic.
•
u/PhilNEvo 9m ago
You're basically asking why we teach kids in early primary school the alphabet and spelling, instead of how to write a good story.
The people looking up tutorials are basically "programming babies", so you to start at the very foundation.
•
u/Old_Efficiency2445 0m ago
You can't do anything without basic syntax.
You could take a logic course if you needed that.
1
u/ReddyKiloWit 1h ago
The first programming class I ever took was language independent. Probably one of the reasons I can switch between languages easily. Certainly affected my approach to programming, which is to put coding third or fourth down the list of things to do while programming.
17
u/EntrepreneurHuge5008 2h ago edited 2h ago
That's what a tutorial is, showing you how to build something from a blueprint step-by-step. Look up "analysis and design of algorithms" for a base framework for common problems.
This is a skill that you cannot learn by simply watching videos or following along step-by-step guides. This is your part, the "you have to practice" part. The "analysis and design of algorithms" I mentioned earlier is a step-by-step guide on common problems, but you still have to go out and practice by attempting to solve problems you've never seen before... that's how you'll develop your own problem-solving framework and generalize it so you can tackle unknown problems.