DEV Community

Discussion on: How I chose a programming language and beat bad habits

Collapse
 
thesnowmanndev profile image
Kyle Martin

Thanks Dirk for truly understand the point of the post! It is insanely confusing to learn two languages at once. Similar to if you tried to learn the piano and the guitar at the same time you would get frustrated of all the issues that would pop up. All of the "advanced" stuff comes eventually. But in order to get past the basics you need to get a grip on one.

Thread Thread
 
tylerl profile image
Tyler Larson

I've taught programming pretty extensively in a non-classroom context, (mostly at work, but some family) such that I follow the same students for years, and here's the tactic that I've found works the best.

Pick a "primary" language to learn, and a "comparison" language. You'll do the majority of your work with the Primary language, and the useful things you build will be built in that language. But for each concept you learn, you become familiar with the parallel concept from your Comparison language. Perhaps not well enough that you'd be comfortable writing something new in that language, but comfortable enough that you can read and understand other people's code. Obviously this is a lot easier if you have a teacher who knows both languages well.

A key point here is to get an evidenced-based understanding of what concepts carry over from language to language, which concepts are parallel and just differently expressed, and which ones you have to start over fresh. Plus seeing that different languages can make it easier or more difficult to tackle certain kinds of problems is instructive.

An example is during COVID lockdown I taught my 11-year-old how to program using Lua (primary) and Python (comparison). Lua was the primary because the objective was game scripting in Roblox. But Lua has some funny little quirks (as does Python I suppose), and it's much easier to understand the reason to jump through certain weird hoops when writing Lua if you can see the same techniques expressed natively in Python.

Thread Thread
 
thesnowmanndev profile image
Kyle Martin

That's an interesting tactic. I could see how the would be useful as they cross bleed into each other but could also slow down process and demoralize someone if they get overloaded easily. But like you said only write in one so that would dampen the overload process.