In your opinion what is the best way to learn to program, not language specific but in general, i'm super curious of how others actually learned to program :)

@koreymoffett for me it's learning basic syntax then jumping right into an exercise project to practice

@koreymoffett for me, it involved reading a lot of tutorials, reading simple code, and, when at first actually typing anything into the computer: straight up copying out small 200-odd lines-of-code programs.

When I first came across Lisp in 2017-2018, it was the syntax that really attracted me. Finding a language with a syntax you like is very important to me, and motivates me to code.

@koreymoffett I think it’s pretty specific to how you learn in general. I find lectures to be very engaging, so watching video tutorials from people explaining things helped me a lot.

I think another very important thing to do is to practice reading code from other people. Maybe find some small projects in a language you’re interested in, and try to pick them apart to understand them. If you find something unfamiliar to you, pull on that thread until you understand it. Like, if you find some unfamiliar syntax, or some function that you don’t understand what it’s doing, try looking it up, and maybe making a small program to just explore that until you understand it. come up with a SIMPLE program that you want to put the effort in to making. for example i need a desktop timer app so it looks like i'm learning qt's python stuff and playing around with qt creator. now that i have an idea i'll look in to how to make timers with python, how to use qt creator to make a UI, and how to bind UI interactions to python function calls. i've already poked around, and qt creator has a nice built in tutorial and examples that show these last few bits, so i'll read over them in detail, then start building the program (with ALL of this documentation pulled up at the ready. multiple monitors are nice -- hardcopy is better)

@purple @koreymoffett yeah, this.

Generally, i wouldn’t code for the sake of it—i have some sort of problem i want to solve. Find a difficulty you have when computing, and try and make it easier!


I thought it'd be cool to learn programming so I picked up a Python tutorial book and started learning programming.

Then I became busy in other stuff I gave up for year.

I picked it up again with SICP and it's video lectures.

Since then trying to read a lot of programs (especially moderately large ones) and trying to write a lot of programs :-)

@koreymoffett I find it depends on the language how far I get from online tutorials. But I always need to jump in & use it for some project or other before I truly understand it!

@koreymoffett find a small problem that impacts you directly and figure out what you need to solve it

I got started writing minecraft stuff in java, initially copypasting crap from examples and going from there

@koreymoffett Reading, and then just doing projects, not giving up has showed itself to be pretty helpful, don't worry about doing things optimally at first, just do something that works, you can always rewrite things later if you learn something better.

Lots of good suggestions here!
I'd also like to add: get involved in projects with other people as early as possible! You can learn a lot from working with other people's code, and working on a project forces you to get out of your comfort zone 🙂 I was lucky to find a small team of gamedevs I could join making a game (working for free in my spare time).

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.