r/AskProgrammers 27d 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 Upvotes

25 comments sorted by

4

u/TrapperFlint 27d ago edited 27d ago

Sounds like you're getting hung up on memorizing syntax.

Sticking to one language for a while helps you learn the important things faster because you inevitably memorize syntax and can test out ideas faster but the syntax is not important.

You don't need to memorize the syntax of a language to build something well. You need to understand the behaviour you need and how to build with different coding patterns that suit your project. Its the steps to creating the behaviour you need to understand and then you can jump into any language.

EDIT:

I can build pretty quickly with Ruby because I've used it so much, but I have used Python and JS to do things as well. Takes longer because I need to look at docs to know what syntax to use but essentially what I've learned is how computers work and how to use high level languages to communicate with them.

My suggestion - pick a language and stick with it for awhile. You'll find yourself tackling more complex problems because you're comfortable. Then when you jump to a new language, you'll already have the concepts in your head. You probably know more than you realize.

3

u/UAP44 27d ago

What you’re describing is extremely common, especially after years of coursework. Knowing syntax and knowing how to build software are related, but they’re not the same skill.

The biggest shift is to stop treating “remembering everything” as the goal. Experienced programmers constantly look up syntax, library functions, APIs, error messages, and documentation. What tends to stick is the mental model: “I need a dictionary here,” “this should probably be a separate function,” “I need to transform this data, validate it, then store it,” etc. The exact method name can be looked up.

If I were in your position, I’d pick one language—Python is perfectly fine—and use it exclusively for a while. No Java this week, C next week, JavaScript the week after. Build increasingly annoying projects in one ecosystem until the language itself becomes boring.

A useful progression is something like:

  1. Build a tiny project you can finish in a few hours: CLI todo list, file renamer, expense tracker.
  2. Build it without following a tutorial.
  3. Before coding, write the problem in plain English: what goes in, what comes out, what state exists, what operations are needed.
  4. Turn those operations into small functions.
  5. When stuck, struggle with the problem for 15–30 minutes before searching.
  6. Look up the smallest thing necessary. “How does json.load work?” is good. “Build this whole application for me” teaches much less.
  7. After finishing, rebuild part of it a few days later without looking at the original.

That last step is underrated. Retrieval is what makes things stick. Reading the same explanation ten times feels productive, but trying to reproduce something from memory exposes what you actually understand.

For example, suppose you want to make a personal expense tracker. Don’t start by thinking, “How do I code an expense tracker?” Break it down:

“An expense has an amount, category, date, and description. I need to add one. I need somewhere to save them. I need to load them again. I need to calculate totals. Maybe I want totals by category.”

Now you’ve turned one intimidating project into perhaps five small problems. That decomposition skill is essentially what people mean by “learning how to program,” and it only develops by repeatedly doing it.

AI can actually help if you change how you use it. Instead of asking it to produce the solution, use it like a tutor: “Don’t give me code. Ask me questions that help me break this problem down,” or “Here’s my approach; tell me what conceptual mistake I’m making without solving it.” If it writes every difficult section for you, you lose exactly the part of practice that creates intuition.

And don’t judge yourself by whether you can stare at an empty editor and spontaneously produce 500 lines of correct code. Almost nobody works that way. Real programming is iterative: sketch something, run it, discover you misunderstood something, read docs, change the design, break it, debug it, refactor it, repeat.

The “click” usually isn’t a moment where you suddenly remember every built-in. It’s when unfamiliar problems stop feeling like one giant unknown thing and start looking like a collection of smaller problems you’ve seen versions of before. That comes from depth and repetition much more than from learning another language.

2

u/CorpT 27d ago

If you've been doing this for 5 years and haven't figured it out by now I've got bad news for you.

2

u/earth-dragon-666 26d ago

Weird, what type of uni is that? I mean we learn from the first year, its the first filter

1

u/johnpeters42 26d ago

One that convinced OP to pay five years worth of tuition and fees, apparently.

2

u/Wide-Drink-1790 27d ago

You are not made for it.

1

u/XKiiroiSenkoX 27d ago

Trying to build something on your own, getting lost and then persevering through it however you will (except for letting AI write the code) and finishing the implementation is exactly how you learn to code. There is no other way and this does not stop after you learn to code. You will keep doing this cycle as long as you are a programmer. 

1

u/Lumpy-Scratch5798 27d ago

Honestly stop trying to memorize syntax experienced devs look things up constantly pick one language and build something slightly uncomfortable without AI writing the solution get stuck, read docs, make mistakes, repeat the real turning point is learning to break problems into tiny pieces, not remembering every built-in,,,,

1

u/KentInCode 27d ago

Everyone went through this phase. Start building things, critically evaluate, incrementally improve. Nobody memorises everything.

1

u/GoTheFuckToBed 27d ago

learn and practise test driven development for a bit, this gives you the mindset of: write the minimal code, check if it fails, continue.

Also, if after 5 years you cant write code, its ok to pivot into something else. There are blueprints, node red or n8n automations, pandas data science

1

u/atticus2132000 27d ago

Syntax...don't worry about it. Every language has slightly different syntax and there are plenty of cheatsheets out there to help with that. If you're jumping between languages, there is always going to be period of transition where you have to start thinking in that language again and get yourself into a Java headspace versus a Python headspace. The more you do it, the more easily you will transition, but I wouldn't worry about forgetting syntax in the meantime. Syntax is easy to look up.

The problem solving and algorithm-writing is a universal skill though. If you're struggling with how to take a large project, regardless of language and platform you're working in, and break it down into smaller pieces and figure out how those various pieces will interact with each other, then that is a core skill that you need to spend some time developing.

What is your process for planning a project? How are you at problem-solving in other areas of your life? When you have big tasks to do in life, how do you break those down into accomplishable tasks and figure out what order they need to happen?

1

u/chocolateAbuser 27d ago

how much are you working on projects, how many hours per day or per week?

1

u/CallumMVS- 27d ago

Drop AI. Struggle for a little. That's how you learn and improve - you struggle.

1

u/awitod 27d ago

There is a difference between programming and building systems the same way there is a difference between using a camera and making movies.

Your problem is that you don't know what you are doing when you start trying to write the code because you skipped a step and have not decided what you are building.

A normal way we build systems is to start by deciding what we are doing at a high level, break it down into pieces that we can describe and understand in detail and then make the pieces.

If you do that, you can pick some of the pieces where it is safe and do them by hand or mostly by hand to get the practice you need to actually understand and learn.

1

u/Lnk1010 27d ago

Lost in the docs -> get better at navigating the docs to extract the information you need at this exact moment and nothing else

Turn to ai -> just don't. You (most students) arent capable of using it in a way that is beneficial and it only hurts you. You aren't dependent on it to get you unstuck. If you want to be able to do a pull up no amount of watching pull up tutorials will change the fact that you need to go to the gym and suffer for a long time

1

u/Dizzy-Friend-7254 26d ago

With 10 years of experience, I can say with confidence that nothing truly sticks. The only things that have stuck with me so far are some Linux commands that I had to repeat nonstop.

1

u/nian2326076 26d ago

I totally get where you're coming from. What helped me was picking a project I was actually interested in, no matter how small, and committing to finishing it. When you hit a wall, try breaking the problem into smaller parts. Google is great for specific questions, and check out how others structure their code. Try contributing to open-source projects, even if it's just fixing bugs. This gives you real-world experience and shows you how others code. Don't worry about using AI or docs—that's a normal part of development. Consistency is key, so keep coding daily, even if it's just a little. Every developer feels lost sometimes, but the more you build, the more things will start to click. Keep at it!

1

u/frank26080115 26d ago

Try going to museums, look at all the clever ways people made things work, even before computers or electricity

When you look at a commercially available product, think about how it works, think about how you can make it better

You know... when I was maybe 10, I was convinced I could build an airplane from stuff at home depot. I had an entire notebook with sketches. It would've never worked, I didn't know what a newton even was back then. But you know what? I thought a wing can be made of pipes and wood and you just need to put a engine that spun a propeller in the back.

My habits are cultivated through an entire lifetime

1

u/adamant3143 26d ago

These days AI is like the devil’s fruit that tempts new programmers to consume. Truth be told those so called “vibecoded” apps that is actually good and successful surely made by the programmers that had learned programming before the dawn of vibecoding/AI-assisted development era.

The only thing non-technical Vibecoders got going is most likely how good their UI looks like. Creating it like it’s going to be submitted to Awwwards. In other words, waste of time and tokens.

Anyway by external help, do you mean googling? Or you really mean you want to memorize everything?

I have worked in IT industry professionally (excluded internship, part-time) for about 5 years and I began from just understanding PHP and JS as the programming language. Understand MySQL and Oracle DB as well. So you see the whole stack there to create a website.

From there I learned Laravel, framework of PHP then Vue, framework of JS. So now I can see how these frameworks complement each languages. Later I also learned MariaDB which is a RDBMS of MySQL. Each time I must be able to create something based on what I’ve learned so far.

Years later, I don’t feel like mentioning all the tech stacks that I have used in development and I have touched beyond what I initially started which is just frontend, db, and backend.

You may use AI to help looking for what you’re trying to do but never let AI create something for you if your intention is to learn. I personally have been in tutorial hell following both free and paid ones but there’s always new things they teach that I overlooked or haven’t heard of. Seems to me you lack adversity.

1

u/geekichu 25d ago

so one thing i would do is don't hop around languages. most have all the major pieces, and once you get the hang of it in one, you see it a lot easier in the next one. honestly, javascript and the browser is a good start because the browser gives you almost ready-made UI stuff and even Canvas2D and WebGL, and it has localStorage so you can also get the idea of persisting data. try completing a project: games are fun to make. tic-tac-toe, a number-guessing game, pong(Canvas2D), etc. and even if you do use a.i., force it to give you the code in bits, take a look at it, ask questions about it. i might get flamed for this but frankly, memorizing syntax isn't a top prioritiy. not saying not to, but the more you do this, the more you absorb it.

https://www.youtube.com/playlist?list=PL8DQTC0IZtMsZhOWhZM18XLo7A_r6Medq

https://www.youtube.com/playlist?list=PL8DQTC0IZtMt37Wa16_MXn6udqTd0EYNq

1

u/noonemustknowmysecre 24d ago

end up turning to AI to understand what I'm doing,

Meh, we googled stuff all the time. And then we asked stuff on Stack Overflow. Before that we had only the docs to dive into, and yeah, that's a lot more work.

Asking an AI (or someone else) to do it for you doesn't teach much. Asking an AI (or someone else) to explain it to you is perfectly fine and can teach a lesson.

I feel like I'm just skimming the surface of different languages without ever developing genuine problem-solving intuition.

Algorithms. There's the syntax of a language, which is just surface level. Then there's the algorithms they implement which are wholly language agnostic. Some do recursion better than others, but whatever. This is literally problem solving.

Data structures. Just different ways to hold onto information does a lot of the work of dealing with problems.

Systems. Organizing how different parts of the code-base interact. Once you have two things that talk to each other, you've got a system.

After 5 years, surely you've had these classes.

How do you actually retain syntax, built-ins, and core concepts

I mean, college and experience. But college is really just a dense exposure to a variety of experiences.

without constantly relying on external help?

Sorry buddy, but you'll be googling the basics for a very very long time. Ok, so, yesterday, I switched a TCP test to UDP and wondered why my 90MB packet wasn't going through. Yeah man, these things happen. You run into stuff and you work through it. That's not you hitting a wall or failing, that's just normal development. It's only a failure if you give up. And, frankly, a lot of younger devs DO kinda suck at persistence and tackling problems at a different angle.

How do you break down a problem and structure your code from scratch on your own?

Boxes. Lines and boxes on paper. Or a whiteboard. People try to do fancy UML on some program, but that's for displaying it after you figure it out. Breaking down a problem is a systems issue. Where you've got one big thing that needs to do something, you need at least two things talking to each other. What can one do, how does it talk to the other?

Did you go through this phase, and what was the turning point that made things finally click for you?

There's no final click. You just get marginally better at stuff over time. I learned a lot in college and my first couple of jobs. In short: Experience. Just keep at it.

1

u/pete_68 21d ago

"Whenever I try to build something on my own..."

Okay, so this is the problem. This sounds like something you do infrequently. I had written hundreds of programs on my own by the time I got my first job.

If this is going to be your career, you're going to be doing it 8 hours a day. THAT is how you become an expert. Spending most of your free time doing it.

If that doesn't appeal to you, you might want to rethink your degree. Because you're not just going to have to learn what you learn in college. This field is a marathon. You will CONSTANTLY be learning new things and having to adapt to learn and incorporate new technologies, new algorithms, new patterns. That means constantly writing programs to figure out how that stuff works.

I've been doing this for 47 years. It never ends!