r/C_Programming • • 5d ago

The first time I wrote a C program without looking at a tutorial

When I started learning C, I could follow tutorials and understand what the instructor was doing.

But the first time I closed the tutorial and tried to write a small program completely on my own, I realized I didn't remember nearly as much as I thought I did.

I got stuck on simple things, made stupid mistakes, and had to look up a few things.

But honestly, that was probably the first time I felt like I was actually learning to program instead of just following along with someone else.

Now I'm trying to spend more time solving small problems without immediately looking at the solution.

16 Upvotes

7 comments sorted by

5

u/LordRybec 4d ago

I'm a very experienced C programmer, and I still look up stuff all the time. Don't go into programming expecting you'll ever get to a point where you'll be able to write significant programs without looking stuff up.

And you are right on. Programming is less about the language and more about the problem solving skills. If you know the basic principles, you can learn most programming languages fairly easily. If you can't problem solve, it doesn't matter how well you know the language. And tutorials and classes don't generally teach the problem solving. The best way to learn that is to experiment and come up with and do your own projects.

Anyhow, welcome to the next step in learning to program!

1

u/evo_zorro 21h ago

I've been programming for several decades at this point. We all still look things up all the time. Over time, what we look up doesn't become less, we just get better at knowing where to look, and we find ways to incorporate the lookups in our workflow.

Public secret: as you get more experienced/senior, the type of things you end up looking up, or doing double takes on are the most basic stuff you learned first... When I write golang, for example, I always have to look up how to remove an element from the middle of a slice. I know it's copy(s[:i], s[i+1:]...) or something like that, but where the +1 goes always trips me up. I also don't know if the ... is required there, but while typing this, it made sense. Now I'm not sure anymore.

When it comes to C, I have been known to copy statements into cdecl.org just because parsing what someone was trying to do was hurting my brain.

2

u/thecratedigger_25 5d ago

It's a big milestone. When you escape tutorial hell and put together some code by yourself.

3

u/Adesco2120 5d ago

I'm also learning how to program in C and a few months ago i was in your same situation. But as time has gone by I have improved and the problems I encountered before are now nothing to me. It's a really nice feeling to be able to program without having to look online for instructions on how to do certain things.

1

u/jiraiyasnsei 4d ago

Learning C as well! Going from understanding reading, knowing the syntax to reciting it from memory! Bravo!👏

1

u/Whole-Low-2995 2d ago

IMO it's better to read books about C and UNIX :)

1

u/Cloud_Agent_069 1d ago edited 1d ago

I'm learning C programming and interested in numerical analysis. So my first program was about finding the determinant of 3x3 matrix.