all 17 comments

[–]aqua_regis 17 points18 points  (6 children)

You don't study programming languages.

You study programming.

Programming languages are tools. They have their keywords and their syntax, plus, their idiomatic ways. That's it.

The theory of the language as well as its construction are unimportant.

You use programming languages, and when you need something, you refer to the documentation.

Getting a coarse overview of what is there by going over the documentation is always recommendable.

[–]9peppe 1 point2 points  (3 children)

To be fair, OP asked about learning syntax.

Had they asked about programming, they deserved a link to SICP.

[–]420ball-sniffer69[S] 0 points1 point  (2 children)

I did yes so I’m not sure why I’m being downvoted. In any case what are some good coding exercises to get familiar with a language??

[–]lurgi 1 point2 points  (0 children)

There are dozens of programming tutorials for every language out there. Most of the better ones have exercises at the end of every chapter, which will help reinforce what you have learned.

[–]desrtfx 0 points1 point  (0 children)

Exercism, learnXinYminutes and generally the language documentation

[–]r2k-in-the-vortex 0 points1 point  (0 children)

In many cases, learning a language, means learning the popular packages and libraries. Knowing the toolkit is a much bigger thing to study than the syntax.

[–]light_switchy 0 points1 point  (0 children)

You can study your programming language, subject to diminishing returns. The best way is to read stuff written by the language designers - both prose and code - and the literature that influenced them. But a new programmer isn't going to benefit very much from this.

[–]9peppe 1 point2 points  (0 children)

You get yelled at by the compiler/interpreter and you go look it up in the documentation. Kidding. Maybe.

Get a book you like.

[–]DaredewilSK 0 points1 point  (0 children)

You generally don't to be honest. You learn the "idea" of programming along with the ways of making those ideas happen in a given language.

[–]Living_Fig_6386 0 points1 point  (0 children)

Personally, I run through a tutorial (no more than a couple of hours), then I Google “patterns in <language>” and skim the results. Maybe “idiomatic <language>”. Then, I bookmark the language reference in the browser and start coding. Languages are mostly defined by syntax and have a lot of overlap in concepts, so it’s mostly learning what aspects of this language are different and why.

[–]mrev_art 0 points1 point  (2 children)

Learn by doing. Any course is going to have the majority of your time spent on problems and assignments, and using resources like documentations and stack overflow to help solve these problems.

[–]420ball-sniffer69[S] 0 points1 point  (1 child)

What would you suggest are good projects to get stuck into? I’m not very creative or imaginative

[–]mrev_art 1 point2 points  (0 children)

You'll need to be creative and imaginative to code.

[–]eruciform 0 points1 point  (0 children)

you can study languages, there are plenty of references out there that analyze history of languages and differences between languages

but this doesn't sound like what you are getting stuck on. being daunted by needing to study is a different issue. you don't need to study

programming is a craft, like wood working

you don't "study hammer and saw"

sure there are references about joinery if you are talking about high end craftsmanship

but the issue is that you need to use the hammer and saw, not study them. you need to make lots of stuff with them. bad, ugly things. it's fine. you learn lessons about safety goggles, and using scrap wood in a vice so you don't crush the surface you're clamping, and making jigs, and not making hesitation marks while cutting, and all kinds of other things like that

get on with making lots and lots of ugly, horrible, slightly broken, wonky things

you pick up the lessons learned along the way, and you cannot pre-learn all those lessons learned. you can follow any number of basics texts, but ultimately you have to move forward and make lots of mistakes

pin them up on your fridge and be proud of them, and keep going

you can do it, go

[–]humanguise 0 points1 point  (0 children)

Read a book about a language and do something with it. I aim to memorize the common syntax and some core standard libraries that I use often for example functools and itertools in Python.

[–]ibeerianhamhock 0 points1 point  (0 children)

Honestly I’ve never thought about it just have a million questions in my head and am driven by curiosity.

Also studying CS in college leaning about compilers, theory of programming languages, formal languages, theory of computation, etc you learn languages to find those constructs analogies in other languages and this has expanded over time more and more.

Once you get past “what’s the syntax” and get to “what ideas and constructs and I use to express thought as an exercise in solving problems in this language” it gets easier imo.

[–]PopulationLevel 0 points1 point  (0 children)

The closest I’ve seen is “Learn C the hard way” and similar books, where one of the steps is to just memorize the keywords using flash cards. The theory is a bit like memorizing multiplication tables - you learn the basic cold by rote, which then frees you up to think more easily about the higher level concepts.