r/learnprogramming • • 3h 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.

9 Upvotes

46 comments sorted by

21

u/EntrepreneurHuge5008 3h ago edited 3h ago

Why do online programming tutorials focus more on syntax

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.

 but knowing how to deconstruct an unfamiliar problem is anothe

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.

0

u/aodare90 3h ago

This actually makes sense now you’ve explained it. Thanks.

EDIT: I am focused on how to help others learn programming so this is good feedback.

4

u/Strange-Tap5860 3h ago

Few reasons:

  1. You need to know the syntax before you can solve the problems using the syntax
  2. Its easier to teach syntax vs problem solved
  3. You can get courses that focus on problem solving

3

u/ifandbut 3h ago
  1. 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.

1

u/aodare90 3h ago

This is what I think also. Computational thinking is language-agnostic. However, this is not a popular opinion.

1

u/duane11583 3h 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

2

u/aqua_regis 2h 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/aodare90 47m ago

I’ll check this out.
Thanks for the recommendation.

11

u/Zatarita_mods 2h 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.

2

u/WestEndOtter 1h 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 3h ago

How would you teach problem solving skills to strangers then ?

Remember , they are also new to programming.

0

u/ifandbut 3h ago

Problem solving is independent of language. Strat using general concepts like if-then, for, while, math, etc.

4

u/SpringCurrent7406 3h ago

Walk before you crawl doesnt work

3

u/SprinklesFresh5693 2h 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 3h 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 3h 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 3h 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 3h 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 3h 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 3h 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.

3

u/ReddyKiloWit 2h 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!)

1

u/Positive_Passion4817 2h 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/mxldevs 1h ago

How did you learn what tools are available to actually solve the problem?

Things like loops, conditional branching, basic data types like strings or numbers, etc.

Are programming concepts separate from problem solving logic?

0

u/TheGrolar 3h 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

u/DTux5249 3h ago

So .... Leetcode? Because that sounds an awful lot like leetcode.

1

u/TheGrolar 1h ago

...Kinda? LC is still interview questions, most of which (I imagine) have a clearly superior answer. To put it another way: you have tradeoffs, of course, but at bottom it's about syntax.

The case study involves syntax, but at bottom it's about tradeoffs. It resists structure and definition, which is part of its perceived value. You get better at negotiating (not solving, necessarily!) ambiguity. Which might be useful with, say, parsing some PM's product document in the wild.

I dunno, I'm not a coder, but I wasn't expecting downvotes?!?

2

u/Gznork26 3h 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

u/duane11583 3h ago

because they can do that it is the easiest to show

2

u/mayankkaizen 3h 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 3h ago

I haven't tried recently, but try to google "problem solving tutorials". I think you will be surprised.

2

u/Remote-Panic5416 3h 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 2h 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.

1

u/ZestycloseEvening155 2h ago

Because syntax is where you start and where you fuck up first 

1

u/MillerJoel 2h 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

1

u/Positive_Passion4817 2h ago edited 1h 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.

1

u/EntrepreneurHuge5008 1h ago edited 49m 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". I'd say logic on its own just checks whether your steps are consistent with each other, not whether your starting assumptions are actually true or solve the real problem, though.

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.

Edit: I will yield a little bit and say that syntax does shape the implementation of a solution, but I'd refer to the same solution in different programming languages as different "flavors" of the same solution. That's just me, though.

Edit 2: Discrete Mathematics and DSA are both examples relevant to a programming community. There are other examples that show problem-solving and logic/logical thinking outside of programming. For example, logistics (supply chain) for problem-solving and Philosophy for logic.

1

u/W31337 1h 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

1

u/Technical_Jicama_434 1h ago

You can formulate step-by-step solutions and never code it. That’s just pseudocode.

Problem solving is language agnostic.

1

u/PhilNEvo 1h 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.

1

u/Old_Efficiency2445 1h ago

You can't do anything without basic syntax.

You could take a logic course if you needed that.

1

u/pixel293 1h ago

I think problem solving, i.e. getting from point A to point B is a sign of intelligence. We use it all the time. How do I get from here to the grocery store. How do I get from the grocery store to Mdonald's. How do I move this large thing to my shed. Basically what steps are involved to do X and X isn't necessarily a program.

With programming, once you learn the syntax and the logic, you need to figure out how to use that to get from point A to point B. A tutorial is only going to be helpful if your goal is the same as the tutorial.

So figure out what you want to create, figure out what steps you need to do, and do it.

•

u/builders6 22m ago

Syntax is easy to grade in a browser box. Problem decomposition takes ten minutes to explain and still leaves half the class staring at a blank screen.

•

u/Temporary_Pie2733 4m ago

Because most tutorials are designed to demonstrate how to use a particular language for people who already know how to program, not teach people how to program. 

If the stated goal is to teach programming, and it focuses more on syntax than problem-solving skills, then it’s probably a bad tutorial.

Also, traditionally tutorials were not meant to be comprehensive, standalone courses that explained everything, but just brief explanations that gave you enough information to guide you in searching more comprehensive documentation. 

1

u/ReddyKiloWit 2h 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.