this post was submitted on 15 Jul 2026
21 points (95.7% liked)

Programming

27709 readers
474 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS
 

I'm a beginner in programming, and I found out I cannot even reproduce a simple number guessing program I have earlier copied from a book.

Is it a beginner issue, or there is more than just continuing to learn to be able to code without hints?

you are viewing a single comment's thread
view the rest of the comments
[–] mrmaplebar@fedia.io 3 points 2 hours ago

How does one code by themself?

You really don't! I'll explain:

1. Just like there's no shame to drawing with a reference image (in fact, it's a necessary part of practicing and improving), there's also no shame in referring to documentation, cheat sheets, and things like variable hints and function signature auto-completion to speed up the process of writing code.

The primary skill involved with programming is logic--understanding what you want to do and having some idea of how you want to do it, step by step. From there, the secondary skill is optimization--figuring out ways to do all of this stuff faster and more efficiently in terms of RAM and processing time. If you can remember how things should be written off the top of your head, fine... But memorizing the names of variables and the signature of functions inside of some object is not only not that important, it's arguably a huge waste of time.

Make sure you understand computers enough to begin to develop a sense of logic around basic things like conditionals, loops, objects, etc. Put some thought into how you can cleverly design your program so that it's easy to write and maintain. But remember that it's perfectly ok to USE DOCUMENTATION!

2. Most of the code you work with is code that someone else wrote.

If you want to learn baking, it's smart to start with something simple, like a cake mix that comes in a box. (You add some eggs and some milk, or whatever, pop it in the oven and wait.) You don't start your own farm or milk your own cows. You start by combining and utilizing ingredients and instructions that other people have organized for you.

Programming is the same. Whether you're making something high level (like a game or application) or something lower level (like a driver or an embedded system program), you're almost certainly going to be most effective by learning to use other people's libraries or APIs.

There are thousands of libraries out there that help do basically anything you might want to do, for any programming language or platform that you want to use. What to display a GUI window with some buttons and scrollbars? There are multiple libraries for that. Want to load a song file and play back audio? There are multiple libraries for that too. Basically every programming language that I'm aware of has a "standard library" of some sort with a bunch of basic, expected functionality that most programmers may need, and you should take a little bit of time to familiarize yourself with that (not memorizing, but understanding). But for more niche functionality that's specific to what you want to do, you might have to seek out a specific library that someone else made.

You don't usually just learn a programming language and start writing every function from scratch. Rather, you're also going to want to do a little research into your languages standard library, as well as some other useful libraries relating to whatever program you're trying to make.

In other words, real programming isn't something that happens in a vacuum. You will be constantly using other people's code, you'll be getting help from your compiling and basic auto-completion from your IDE, and you'll be constantly looking up documentation to learn/remember how things are supposed to work.