I'm working on a set of basic projects with step by step walkthrough guides for beginners. I expect most people to do this alongside a more traditional course but some people do it first to get a "feel" for coding. It doesn't cover a lot of theory but you get to make a variety of things that show the potential of learning to code (and are hopefully fun). If you take a look I'd be very interested to hear feedback. htt…
Ask HN: Any Tips on Learning to Code?
11–18 of 18 posts
Re: Ask HN: Any Tips on Learning to Code?
#12So I’m just kinda wondering if y’all have any tips, or if y’all want to recommend any websites, apps, or books.
Re: Ask HN: Any Tips on Learning to Code?
#13Re: Ask HN: Any Tips on Learning to Code?
#14To that end when I was teaching students I would print out snippets of code and have them evaluate the code in their head/on paper and then have them run the code to see if there was anything wrong. Repeat this process until your mental model matches what the computer does.
Re: Ask HN: Any Tips on Learning to Code?
#15Now start writing that program and pick up the skills to solve little pieces of the big problem you want to solve.
Does your program need to fetch something from the Internet? Learn to do that. Does it need to read a file? Learn to do that.
Break up the problem into small manageable pieces.
Learn git to version your code. Invest one day to learn how to commit and push your changes into GitHub or GitLab. It will save you a lot of time and will avoid breaking your heart by not losing your code.
If you have a language in mind, learn the syntax quickly and to do the most basic stuff, then get a cookbook that shows you how to do useful things, like reading or writing to a file, or sending something to a server. These will help you solve the little pieces of your problem.
Software can be useful to people. What do you want your program to help you with? Imagine you can do anything in a computer, find a problem you're passionate about, and set out to solve it. You'll be way ahead.
You can also do that when you pick an nth language. When I wanted to learn Python, I started to write a program that would allow you to send airtime (mobile money) from one SIM card to other SIM cards of different operators. You can't do that, but I essentially did impedance matching.
The service would expose n mobile numbers corresponding to n operators. You send money to the number from your same operator, and then send an SMS specifying the amounts and the recipients. The service then would use its own SIM cards for the target networks and send money.
Learning can be accelerated doing a real project.
Then you can refine your programming.
Re: Ask HN: Any Tips on Learning to Code?
#16Studies of college students learning CS showed that students who built a consistent mental model of what the code was doing did considerably better in classes. To that end when I was teaching students I would print out snippets of code and have them evaluate the code in their head/on paper and then have them run the code to see if there was anything wrong. Repeat this process until your mental model matches what the…