Best way to learn a programming language
Posted by CuteNullPointer@reddit | learnprogramming | View on Reddit | 22 comments
What is your most effective way to learn a new programming language and keep muscle memory strong ?
I personally feel like solving competitive programming questions in each language I want to learn is the best way to do so, and trying to optimize each code using each language’s unique style.
I’m asking this because I don’t want to get rusty in this age of AI coding.
Curios to hear from the community.
NextMode6448@reddit
while not success do it again
CuteNullPointer@reddit (OP)
Hmmm, what ?
themagicalfire@reddit
They made a joke about while loops
JeSuisOmbre@reddit
Take an old project and rewrite it in that language. Something as simple as fizzbuzz or fibonacci works. If I can write a CLI program with a language I'd feel pretty comfortable.
ConsLeader@reddit
A lot of people overcomplicate this, but the best way to learn a language is to simply actually build things with it. As for tools, I think Boot Dev is a strong option - it’s hands-on, has a clear step-by-step path, and keeps you moving by making you write code instead of just watching videos. It also does a good job of teaching the underlying computer science concepts, so you’re not just memorizing syntax.
DirtAndGrass@reddit
I don't think competitions and "learning programming languages" are correlated at all, one is problem solving, one is syntax
Gnaxe@reddit
Work through a textbook. Then write video games. Games are engaging enough to keep your attention, unforgiving of egregious waste, and easily scale their difficulty to your level because you can keep adding features. They really bring together a lot of skills.
Tiny toy LeetCode-style questions can easily get more difficult than anything you'd do on the job, while also not teaching you how to manage complexity in a large project. If you want a bigger bag of tricks, read a book on algorithms and then download a library.
Striking_Display8886@reddit
Don’t use AI
euortiz@reddit
AI is the best tool ever for learning if you know how to use it properly and avoid outsourcing your tasks to it.
CuteNullPointer@reddit (OP)
It's like saying "Don't use Google" to someone when search engines got popular
CuteNullPointer@reddit (OP)
I don't really agree with this generalization, I realize that AI can effect programmers in a bad way, but I personally learned how to use it effectively in my job and personal projects and it can for sure make you more productive if you know what you're doing.
But I don't want to get rusty with the languages I want to learn and stay up to date with.
SeatWild1818@reddit
> "How do you learn a programming language?"
> "Don't use X"
> "I disagree with you."
So why did you fucking ask?
CuteNullPointer@reddit (OP)
> "Don't use X"
This is not a related answer at all
> "I disagree with you."
Yes because this is a discussion and I'm trying to hear other's perspective.
tmtowtdi@reddit
This will help.
CuteNullPointer@reddit (OP)
Thanks, curios to hear what you think.
lurgi@reddit
I don't think that competitive programming problems show you much about a language, because the code is usually too short to require anything beyond the basics of the language. They may also emphasize bits of the language that, in larger programs, are less relevant (I'm thinking about file I/O here. In competitive programming a non-trivial part of your program is going to be reading and parsing the input data and then outputting the result. In larger programs that will be a tiny fraction of the code).
Most competitive programs aren't going to use user-defined classes. For small Rust programs you can ignore the borrow checker. Error checking and memory leaks can be ignored in competitive programming.
Hey, do what you want, but I still think that Read A Tutorial followed by Do Actual Stuff That Interests You has a pretty solid track record.
CuteNullPointer@reddit (OP)
I agree that competitive programming doesn't cover all aspects of a language, but I think it's good to train your muscle memory.
I started doing competitive programming in college using C/C++ and I got deep knowledge on these languages trying to solve a problem multiple ways.
Good advice from you thanks :D
antiaust@reddit
Let AI teach you. Ask about the basics, and after each lesson, have it give you a task. After a few lessons you can ask it for a test where you can apply everything you've learned
Zealousideal_Trip650@reddit
hola soy un chico de 17 que recién empieza a programar, y me pregunto: cuáles son los pros y contras de aplicar esto en tu flujo de aprendizaje?
CuteNullPointer@reddit (OP)
It can be a great resource to learn a new language, but I also want to stay up-to-date and not get rusty, that's why I think practicing leetcode problems with different languages can help.
Slottr@reddit
Both the replies here are fucking hilarious
CuteNullPointer@reddit (OP)
What is your perspective on this subject ?