17 points · by codinglearner · 3y ago · 26 comments
I am beginning to learn how to code. I was wondering what peoples secret weapon resources here are and what you all can recommend.
E.g. I know about freecodecamp and other more mainstream sources, but was wondering if people have other recommendations as well.
As I am unable to rank the quality of the content I normally find online, it would really help to hear some suggestions.
E.g. someone recommended https://fullstackopen.com/en/, is that any good?
All the best and thanks in advance!
I teach students, and I've seen all manner of people, and one thing that distinguishes those who get better vs those who don't is: consistency.
Show up every day to practice, to improve. Put in the effort. Try to do, try to be active. Listen to more experienced/accomplished people.
In the early days, it matters less exactly what you do. Most things will help, tutorials, courses, building your own thing. The difficult part is sticking with the process.
If you do these things *consistently*, you'll grow quickly.
PS: The second most important thing in my opinion is, managing discomfort/negative feedback.
"I want to mod Minecraft, write Quakescript, automate my Blender 3D models, make my job processing spreadsheets easier, make a check which alerts me when my internet drops out or my aquarium overheats, etc.". Task based. Desire for a solution. Google tutorials for the things you need to work with and move step by step forward. Learn as you go. Doesn't want to be a rockstar, wants to build something, solve a problem, play with tech. Will learn something practical.
"I want lots of money / a new career". Search for high paying jobs in your area, find what skills they need, target tutorials on those skills. Study hard, maybe bootcamp, grind leetcode, build showcase demonstrations of your ability, as necessary. Repeat until jobs start wanting to hire you. Will learn something marketable, may learn something practical, may not enjoy it. Accountant model.
"I heard about AI ML crypto bitcoin l33tcode red teaming cybersecurity I want to be a l33t hacker omg how do I make dark mode can I do this in a week what's the best bootcamp I have a great idea for an iPhone app which will be like Facebook but without the ads, I watched 30 YouTube videos on coding last night but today I can't write FizzBuzz in React am I not cut out for this??". ADHD. Not interested in code or tech, wants to be a rockstar without interest in music or wanting to learn an instrument. Probably won't learn anything.
Even though 3 is a parody of a panicked desperate teenager looking for an ego and your question is a lot calmer, the fact that you aren't using any of the zillions of existing tutorials, or any of the zillions of existing "how do I learn to code?" questions and answers on the internet, and haven't specified anything that you actually want to build or want to work with or want to achieve, puts you most likely in group 3.
You almost can't go wrong. If you're plotting a rocket course to orbit the moon, it matters which direction it goes in down to quite fine tolerances. If you're standing still and refuse to move 5 steps in any direction until you have the 'best' direction and 'secret weapon direction finder' that's just ... well, what it needs is a psychologist not an expert direction finder.
I can assure you, I am not. I was simply a little overwhelmed and wanted to use swarm intelligence to find good approaches as there are, as indicated by you, so many sources out there.
I am more between 1 and 2. I have built software before, but with really scrappy Ruby on Rails to solve some basic problems. Now I am considering a career switch as I do not want to stick with my current job forever.
To specify: - I am interested in learning react / typescript / vue.js --> I am, at least from what I read / tried so far, a JavaScript fan and want to get more into that to start.
"You almost can't go wrong" is quite motivating as I was as mentioned a bit overwhelmed with the opportunities.
Hello! I've been down this road before.
I personally would avoid TypeScript for now and just learn JavaScript well. Compiled TypeScript is just JavaScript anyway, so if you don't know JS, you don't know TS.
I would start with trying to make an app just using vanilla JavaScript. Start with a `index.html` page + a `<script>` tag, and see how far you can get. I was always more motivated to finish these projects when I was building something I wanted to use for myself. MDN is the go-to resource[1] for JS. I would go through the "beginner" tutorials on that page first, and then try to come up with an app. javascript.info[2] is also great if you need extra reference.
The reason I recommend doing all that before jumping straight to React is you learn how to write JavaScript without a library/framework, which I think gives you more options. It also shows you why something like React is useful to begin with. When you're ready to try a library, I would start with Preact without build tools[3]. Preact has essentially the same API as React, but it's lighter weight, and it's website has a guide to using it without build tools (which React docs no longer have, since they recommend you jump straight to using a big framework like Next now).
Eventually, you may want to use build tools so that you can split up your app into multiple .js files. In that case you'll have to install Node.js on your system. Node.js is just a runtime for JavaScript that you can install on your PC or server (kinda how you install Ruby on your PC). Most JavaScript build tools are written in JavaScript to run on Node.js, hence why you need Node. Node comes with a package manager called `npm`, which you'll see and use a lot. Preact has a good guide for getting started with Vite, which is a build tool. [4]
I think it's also important to know that most of these libraries (React/Vue/Preact/Svelte) are mostly interchangeable. They all have strengths and weaknesses. Pick what you're most productive with. These libraries are also far less opinionated than something like Ruby on Rails. Each of these libraries have equivalent frameworks that fill that niche. (React -> Next.js, Vue -> Nuxt.js, Svelte -> SvelteKit).
Good luck! Let me know if you have more questions.
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript#for_...
[3] https://preactjs.com/guide/v10/getting-started#no-build-tool...
[4] https://preactjs.com/guide/v10/getting-started#create-a-vite...
Learn the tools necessary to rapid prototype it.
Learn the tech needed to implement the prototype. You'll see yourself having to learn a handful of things in parallel, but try to make your project move in a linear fashion, one step after the other. Every time you hit a barrier, learn only the necessary to overcome it. Celebrate every progress you make. Make notes to somewhere public like a personal website/github. Manage your motivation, expectation, anxiety.
For learning Python, you can check out this blog post I wrote recently, which makes an analogy between Python prompt and a regular calculator you are already familiar with. I go over some basic topics like assignment + for-loops + functions: https://minireference.com/blog/python-for-stats/ There is a lot more to programming than this, but if you learn these three concepts you'll have done a big chunk!
There are A LOT of good resources for Python beginners. I think you should try a few of them out and see which ones you like best. Here is one example https://www.youtube.com/playlist?list=PLbFHh-ZjYFwGeYhQ2yIQF...
Good luck with your learning. Remember that seeing errors every few seconds is normal... this is how everyone learns, and even advanced programmer run into errors all the time. It's part of the game, so don't be discouraged.
This is from my experience as someone straddling both academia and a data science position in a startup where I have seen it rampant on both ends (slightly more understandable in academia but terrible for anything that actually goes into production).
It would be great to "move out" all the working code that has been REPL-tested into a separate file. Bonus points if it is a standalone command-line-runnable script that does something useful, e.g. after reading inputs from `sys.argv`. The exposure to running programs in the command line is probably a key skill I would include in the ABSOLUTE BEGINNER (because it is a prerequisite for so many other things).
I suppose running a "server" would also be good to learn (even if just localhost), but that's getting into the HTTP/TCP/IP stack, so I would cover that CODING 102, not CODING 101.
* W3Schools - https://www.w3schools.com
* MIT's introduction to computer science and programming using Python https://www.edx.org/learn/computer-programming/massachusetts...
* UCLA Extension's Coding Bootcamp - https://bootcamp.uclaextension.edu/coding/landing/
* Harvard’s Introduction to Computer Science course on edX (https://www.edx.org/learn/computer-science/harvard-universit...) and the CS50 YouTube channel (https://www.youtube.com/channel/UCcabW7890RKJzL968QWEykA
teachyourselfcs has a solid list of canonical resources that are common across many university programs. [1]
The Art of Problem Solving books are great if you want to learn math to a high level, though it isn't strictly necessary. [2]
[0] https://www.edx.org/learn/computer-science/harvard-universit...
Successfully working through those books will have prepared you for the toughest math undergrad programs in the world, so it's a bit overkill, but the road is there if you wish to take it.
As an aside, something I should have recommended in my original comment is to learn efficient study habits, which will accelerate all of your efforts. This course is short but highly recommended: https://www.coursera.org/learn/learning-how-to-learn
The reason I ask is that a common newbie mistake I've noticed with people who want to learn to code is bouncing around from learning resource to learning resource without going deep with any one of them. Nothing wrong with getting different perspectives, but at some point, it's going to get hard because you're learning something hard.
It's a little hard to give specific suggestions without more information. If you've tried freecodecamp, was there something about it that didn't work for you? That would help in giving you more actionable advice.
What does "code" mean?
It sounds like you want to code front/backends for HTTP/Internet stuff.
If that's the case, you'll get lots of help, here, and you won't need much, in the way of equipment and software.
If you want to write stuff for devices (Droids, i-devices, computers, IoT, etc.), then there's no substitute for actually having the device, and the development environment (often, one and the same).
Also, "coding" != "software engineering," but that's something that you'll learn, down the road. For now, getting some "hello world" stuff going, is a start.
Then I'd recommend FreeCodeCamp. Don't worry about languages/frameworks/etc - you'll get there.
Don't go the codecamp/paid course route until you've tried building a bunch of things.
Software, start with CS50 MIT course.
When I’m trying to learn something new having a bunch of different perspectives and explanations is important because for one reason or another, some will click with me right away, and some won’t.
Sometimes one persons explanation won’t make sense to me until I’ve learned the concept from someone else - so it’s not only about trying a lot of sources but also going back and retrying ones you may have bounced off of initially.
What do you want to do with coding? What's going to give you the most leverage in the long term?
That course is going to dump you into the deep end for modern web dev. You'll probably struggle with it because it's taking on a bunch of things all at once. Some of the technology is also temporary. Will MongoDB or GraphQL still exist in 30 years? Will HTML, CSS, and JS exist in 30 years? Focus first on fundamentals that will give you a leg up.
I know professional frontend devs that still struggle with HTML because they went straight into React without learning semantic HTML first. If you can master the basics early on, then learning React and other frontend frameworks later becomes way easier.
Start with building web pages rather than web apps. You can do apps later but there's a lot more stuff going on. It's like trying to ride a unicycle while juggling flaming torches and balancing a spoon on your nose. Maybe you could sort of figure it out but it's better to split up the tasks and handle each in turn. That course is for people that already know the basics and want to try balancing on a new unicycle.
If you want ways to practice frontend, try building copycats of websites. Read the DOM, look stuff up, make lists of HTML elements or JS built-ins and memorize them. Play games to learn CSS flexbox or grid. Do whatever as long as you like it and it's teaching you the way.
There's lots of other stuff like frontend challenge sites that are good too. You'll always be "challenged" going forward for professional projects. Some might be really easy tasks, others will be hard. Get used to being resourceful and learning how to figure things out. It's an infinite game.
This style of learning isn't unique to frontend. If you wanted to be a backend dev, learning Spring Boot before design patterns, networking, etc. would probably be a bad idea. It's better to start as a beginner and embrace learning the basics. Go slow and master things step by step. Eventually it pays off.
You could also zoom out and abstract things to help with programming languages. Popular languages are pretty similar. Familiarize yourself with basic control flow syntax in one language and chances are it carries over into others. The same goes for "paradigms" like imperative, OO, and functional programming (others exist but they're more niche). Learning a paradigm is like rebuilding the thought process for your brain. If you learn different paradigms, then your thinking gets more flexible and you can approach problems differently. You might like the "aha" moments you get when things finally connect too!
If your chosen task seems daunting, feel free to break it into something simpler (e.g. for a game, turn-based may be easier than realtime; text interaction may be easier than graphics; 2D easier than 3D; etc.)
Your choice of project will then determine your learning path. For example, Web stuff is all about Javascript; but data analysis may be better in Python; and automation may be easier with Applescript; etc.
I would avoid starting with something "overly ceremonial"; e.g. Java forces everything into a "class hierarchy", Rust requires references to be "borrowed", C requires memory to be manually allocated and freed, etc.
So-called "scripting" languages are a good way to avoid such complications, e.g. Python, Scheme, Javascript, etc. That way you can focus on one thing at a time (you can learn class hierarchies, borrow-checking, memory management, etc. later!).
Avoid languages/systems which have a bad reputation, e.g. Perl, PHP, C, Bash, etc. When learning, it's hard to know what's fundamental and what's just a quirk of that particular system; learning with a particularly-quirky system can make this harder.
When learning a concept, try it in a few different languages (again, to work out what's fundamental)
Don't bother too much about "good practice" or "bad practice" when learning. Make a note if you come across such recommendations, but they can lead to second-guessing oneself and unneeded complexity that obscures what's going on. Focus on "minimum viable projects". Also, following advice that you're not yet able to understand can lead to "cargo culting". Once you're confident/competent enough that you can hack together some solution, you can revisit that advice to see why some approaches may be better than others.
Once you start to feel comfortable, try playing with some big new idea. Sometimes it can help to use a radically different language which forces you to think in that new way; good examples include Prolog (logic programming), Pure (term rewriting), Haskell (pure functional), Smalltalk (message-passing), Forth (stack based). This is good for making you think more deeply, and gain a better understanding of what's going on.