Follow-up for learning Python/Java
Posted by immediate_push5464@reddit | learnprogramming | View on Reddit | 12 comments
Hey folks,
I’ll try to keep this quick.
Problem I’ve seen a lot of exp folks come from a desensitized (but good) place of saying just program more. Awesome advice, really truly. But that’s tough advice to process as a beginner. So that’s why I wanted to follow up with those folks and ask more specific, albeit probably doomed questions.
Questions 1. What specific (not db, not ML, not OPP theme recommendations) things would you recommend in a pseudocode/algorithm style template? Kind of like a college would do, but specifically syntax. So an example might be
- Learn how to call user inputs 2 learn how to convert floats and ints and str
- Learn for loops
- Learn while loops
And the reason I’m asking for more syntactically based advice is because the themes are great- I get that- but the syntax is what rules the programming part of programming. I don’t care how theoretically or conceptually versed you are. If you don’t know the syntax, you can’t even begin to think about topology or project details. And, as many exp and junior devs know, many beginners know virtually nothing.
I’ve programmed some beginner level stuff, but I think we need to shift to a more command/syntax based recommendation or at LEAST a CREDIBLE source that teaches that. Most of the sidebar and general source recommendations are out of date and incomplete at best.
Thanks
peterlinddk@reddit
If you want to learn a specific syntax, just read the reference for the programming language in question - that is all there is to it. You don't even need to read more than the BNF grammar, that'll give you the exact syntax.
But if you think that programming is about learning one syntax, then you are sorely mistaken:
That is just plain wrong! You can design a class hierachy for any language without knowing whether to use extends, ::, self, this, class, prototype or stucts with void pointers. But even if you learn all the syntactic details about how to write structs, records, interfaces, classes and types, you'll have no idea of which ones to use.
Also, I have no idea what you mean with your four questions ... How is "learn for loops" and "learn while loops" questions?
immediate_push5464@reddit (OP)
What do you mean reference and BNF grammar? You mean documentation? Or other work folks have done? Thanks for the clarification, this seems like a solid solution.
psychojoke_r@reddit
I think he meant Backus–Naur Form which is a formal notation used to precisely describe the syntax (grammar) of a programming language.
Here is an example,
```
```
peterlinddk@reddit
That is exactly what I meant - googling a programming language with the added "BNF" usually gives an example of the grammar of that language.
And I said reference, because I meant the part of the documentation that is a reference to how the language is structured. Maybe I should have said specification instead, as reference also refers to the API everything else around the language itself.
But still: learning programming is not about learning a language, just like learning to write poetry isn't about learning the grammar of a specific language.
immediate_push5464@reddit (OP)
Right, I understand you want a zoomed out focus most of the time. My request was just for my specific case struggling with syntax. And I would still contest that while these other conceptual components are equally important, knowing what to write is also equally important. Thank you again, I’ll check out the BNF
aqua_regis@reddit
If you struggle with syntax, only one single thing can help: ample practice. The more often you write the commands the more you will get in your muscle memory, just as you don't have to think when you write spoken languages.
There is also absolutely no reason to focus on deliberately memorizing syntax (like learning vocabulary/grammar). You can always look it up.
immediate_push5464@reddit (OP)
Thank you.
peterlinddk@reddit
I don't think I understand your question then - if you are struggling with the syntax of a for-loop, then the only answer is to look it up in the documentation for the programming language you are using. It isn't something to be "struggling" with, like spelling, it is something that you either know, remember or look up.
The syntax is different for a lot of languages - like in JavaScript you have for-of loops:
for (const student of students)
in Java you have "enhanced for-loops":
for (var student : students)
and other languages have slightly different syntax
However, that doesn't help you, if you don't know why and when you should use a loop, what it means to iterate over a collection, what a collection even is, and so on.
Don't confuse "what" you want to write, with "how" you have to write it for the compiler.
immediate_push5464@reddit (OP)
Thanks
immediate_push5464@reddit (OP)
Thank you
aqua_regis@reddit
That is, like always, completely focusing on the wrong end.
I can get any code monkey to implement my design in any programming language, provided that my design is sound and solid and well described.
Totally wrong. Especially the topology and project details exist far outside the context of syntax and even programming languages.
Programming languages with their syntax and vocabulary are just a necessary evil, a means to tell the computer what steps (algorithms) it has to perform in order to do the task we want them to do.
The steps, the algorithms, the design are the important parts. The actual implementation in code is trivial compared to what happens before the code.
And that's what disqualifies you. You are still struggling at two fronts - programming languages and programming. You haven't yet gone over the hump where you see programs as the sequences of steps that need to be performed. You see programs as code and you seem to focus on the code, which is reigning the horse from the wrong end.
You need to learn to abstract the design from the implementation. Then, you will realize that everything you said in your post is completely and utterly unimportant.
immediate_push5464@reddit (OP)
Great thanks appreciate it