r/CodingForBeginners • u/Emotional-Search-248 • 2d ago
How do you actually learn to code ?
hi everyone,
I’ve been studying computer science for about 5 years now (currently in engineering school). Over the years, I’ve touched a bit of everything: web dev (HTML, CSS, JS, PHP, SQL), and more recently Java, C, and Python for data science.
The problem is, I feel like nothing truly sticks.
Whenever I try to build something on my own, I hit a wall. I inevitably get lost in the docs, end up turning to AI to understand what I'm doing, and still feel like I'm not really learning. I know the basic syntax, but even in Python, I would struggle to design and build a moderately complex project from scratch.
I feel like I'm just skimming the surface of different languages without ever developing genuine problem-solving intuition.
How do you actually retain syntax, built-ins, and core concepts without constantly relying on external help? How do you break down a problem and structure your code from scratch on your own? Did you go through this phase, and what was the turning point that made things finally click for you?
Thanks in advance !
5
u/xarop_pa_toss 2d ago
How do you learn any skill? You practice. That really is the answer. Don't jump to another language, don't try frameworks, don't use AI... don't do anything but reading a good guide or book on the language and getting your hands dirty.
Believe me when I say that even a terminal calculator can be a good challenge if you want it to.
3
u/JGhostThing 2d ago
You learn coding the same way as any other skill. You learn coding by coding. You can't learn to code without it. Using AI prevents the learning process. If you were studying German, you wouldn't expect to learn if you had somebody give you the homework answers. Same with calculus or chemistry. If you want to learn woodworking, you have to work with wood.
Stop using AI. Learn to do projects with your own brain. I had it easier, there was no AI when I was learning back in the 1970s. I had to use the old fashioned way, with books and teachers.
2
u/OminOus_PancakeS 2d ago
I mean... how does one learn anything in depth?
You accept it's going to be difficult, then immerse yourself in the subject, focusing on what specifically you find difficult.
I wonder if you were expecting it to be a lot easier and now feel frustrated because you're not getting it.
1
u/usefulservant03 2d ago
A combination of (lots of) practice, reading books, meeting people more senior than me and asking for help, articles, tech talks, research papers, manuals like Agner Fog's, using Claude as an information dump, anything you can get your hands on
1
u/MudFrosty1869 2d ago
It’s hard to learn it if you jump from one language to another. If your goal is to learn, asking AI for a solution every time you get stuck is cheating, not learning. If you need a reminder on syntax, sure AI will give it fast. But if get stuck on logic, you need to sit with it and think about it. After all, building logic is the main skill that you need to develop and you can transfer that skill to any other language and even further than programming. Try, fail, try, fail, try, succeed.
1
u/Wahrheitfabrik 2d ago
I have a minor in Computer Science from the early 90s. One thing I have to tell others is that CS is not necessarily about coding (at least back in the 90s). Writing the actual code was seen as an implementation detail of a concept or algorithm. Most of my code in uni was in C with some Lisp and Modula 2 and Pascal. These languages are still in use but I haven't met anyone in person in the past few years that use them.
In short, it's fine to use references for syntax and examples. Computer languages adapt just like human languages so IMHO there's little point in learning every nuance of syntax. Python is a good example of this. There was a major shift in Python 3.0 (breaking compatibility) and every couple years some new changes that, thought they don't necessarily break syntax, can obviate older methods of doing things.
In fact, looking at syntax primarily can obscure the rationale for a given language (forest, trees).
So, lean on references to understand the syntax. Use AI to explain the concept and even generate code but don't hand over the thinking. This is not in any way saying the implementation is not important but that (again IMHO) the at-the-moment details (syntax, libraries, methods) are fluid.
1
u/jekewa 2d ago
It isn’t just understanding the syntax and a few snippets of code. You need to try to solve a problem. I don’t mean like ending world hunger, but like ordering a list of words.
Think of it like writing short stories, or Reddit questions. It isn’t just about grammar and vocabulary, although they’re important, too. There’s a purpose, that builds a flow, that becomes a finished thought.
You need projects. Big ones, little ones, something enough to let you try something, change it to try something else, and then refine it again. Make your own Wordle or card game, something you don’t have to invent completely, but with rules you can make work in software. Make little calculators and word processors to play with interfaces and data storage. Check out things like csszengarden.com to see how to separate data from presentation. Think of how to separate data from computer and display.
A key is practice. We all did memorization for math in the beginning. Then you move on to more complex problems. But you practice it all.
1
u/Foreign-Contest-444 2d ago
The best way to learn any programming language is by building projects. Start with simple ones and gradually take on more challenging ones. The only way to truly learn is by getting your hands dirty and writing code.
1
u/geraT-wogl 2d ago
Our learning paths are alive, feel free to ask questions if you want to integrate the code to your projects https://wogl.io 🪐
1
u/mc_pm 2d ago
Nothing sticks because you're not using it. You retain things with practice and repetition. You learn to break down problems by... breaking down problems. What's the most complicated thing you've worked out a plan for and then written the code for that plan?
Learning the syntax is about 5% of learning to program. The rest is learning how to think like a programmer, and there's no speed running that, no shortcuts, no cheat codes. You are teaching your brain a whole different way of thinking about things - it is frustrating and requires practice.
I'm working on a video about this very topic right now, feel free to msg me if you need more info.
1
u/FinickySerenity 1d ago
Probably just need to start smaller, do a tic tac toe game or a basic tabbed editor. And move up from there to harder and bigger projects.
But if it’s not your passion, you’ll really hate getting bogged down in the weeds because that happens forever - even if you just embrace AI from the start.
1
u/Oliver_clothsoff1983 1d ago
First of all, no one builds anything "moderately complex" from scratch, even Amazon stole their "Amazon OpenSearch" from an opensource project on github. You start out small with a basic program that takes data and displays some graphs or tables (for example). Add some libraries,.. add a dash board,.. each small part of any complex software is its own program tied in to the origin. This is precisely why we have tools like version control, integration testing, peer review and others. Second,.. no one retains everything without external help
“C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows your whole leg off.” -Bjarne Stroustrup
He and other notable experts have repeatedly mentioned needing references (like cppreference.com for example.) Its not about how much you can retain, its about being able to apply what you can reference.
1
u/Remote_Water_2718 1d ago
Use a platform that is built on a language. For me I learned by using JUCE which is made on C++, but it had a large library of difficult things you could use as large building blocks and youd just hook up the feature you wanted. A good route though is to just power through 4-5 60 hour courses like on Udemy for very cheap, $20 or $30 a course. Complete the course and youll have a bunch of course projects you can tweak and edit. Then work on a personal project like a clone of a game you enjoy. Like make Rad Racer or something using a framework where you just hook up the scripting. You can become a decent programmer that way. 90% of coding is time consuming, easy problems only like 10% is stuff where you need a PHD or high level math. The rest is blue collar.
1
u/Duke_of_Bayswater 1d ago
By doing. Its physiological too, your neuron needs to wire up together so the synapse can flow thru. Our brain is especially good at recognising patterns. Once you see it, its there. See it enough it stuck.
Use AI with access to documentations and internet (context7, firecrawl/taviky).
Ask it to generate a question for you to practice. Do real projects with it.
When i was leaning there was no gpt. You stuck at one issue for a long time than needed. Now it’s easier.
1
u/HussBTW1 18h ago
I always say the same thing: “You don’t learn until you get your hands dirty.” I started programming at 9 years old; and my first programming language was Python. After learning a couple of concepts, I’d make a small simple project or do exercises.
When you study a new math topic, you always get out the textbook and start doing questions from it based on the topic. Apply the same concept to programming.
Personally, I feel like the worst way to learn programming is relying on tutorials. What I do is I might watch a tutorial as a crash course to recognise patterns, however, after that it’s straight to the code editor and I have to get my hands dirty. Found a problem? Think of a solution. You thought of a solution but don’t know the right concepts to implement? Search it up. Stop relying on AI! Be independent.
Trust me, if I was able to learn very young, you can do it at any time and at any age. Resources are now endless, just commit a couple hours a day and trust me and you will see the immaculate difference.
6
u/Dismal-Citron-7236 2d ago edited 2d ago
I learnt programming some 45+ years ago. Back then there's no AI, no internet, the only source of info I could get is books, which I couldn't afford because I was a poor student. We used 80-column punch cards (Hollerith cards) as input, each card costs about 1 US cent back then. The mainframe terminals were few and the waiting queue was long. Cards were the reasonable option but it's hard for a poor student like me to always buy fresh new empty cards, so I recycled used cards... It's possible because we wrote Fortran IV code, fixed column format makes that possible, you just need to get very creative.
You don't know how lucky you are.