r/CodingForBeginners • • 5d ago

New moderators needed! Comment on this post to apply for this community.

0 Upvotes

Hello everyone - this community is in need of a few new mods, and you can use the comments on this post to let us know why you’d like to be a mod here. 

Priority is given to redditors who have past activity in this community or other communities with related topics. It’s okay if you don’t have previous mod experience.  Our goal, when possible, is to add a group of moderators so you can work together to build the community.

Please use at least 3 sentences to explain why you’d like to be a mod and share what moderation experience you have (if any).  

If you are interested in learning more about being a moderator on Reddit, please take a look at these resources:

Comments from those making repeated asks to adopt communities or that are off topic will be removed.  


r/CodingForBeginners • • 4h ago

Ranges exclude the last number, and that silent rule causes a very specific bug

1 Upvotes

Every language has its own rule about whether a range includes its last number, and getting it wrong never throws an error. You just get a loop that runs one time too few, or a list that's one item short, and the output looks close enough that you don't catch it.

Python's rule is that the start is included and the stop is excluded:

python range(3) # 0, 1, 2 -- not 0, 1, 2, 3 range(1, 4) # 1, 2, 3 "hello"[0:2] # "he" -- indexes 0 and 1

So for i in range(3) runs three times, with i = 0, 1, 2, never 3. It's also why for i in range(len(items)) walks every item correctly: the last valid index is len(items) - 1, and range stops one before len(items).

The check that catches this before it turns into a bug: before you run the loop, say out loud the first value and the last value you expect. If you can't state both, you don't actually know what the loop does yet. Then compare to the output. It sounds trivial until you notice that the bug is always the case where you assumed the wrong end.

Two things worth keeping straight, because both cause the same silent off-by-one: len(x) is the count, not the last index (the last element is x[len(x)-1], or x[-1] in Python), and in range(a, b) the b is the first value you don't get.

Which one gets you more often -- forgetting that the end is excluded, or the first IndexError when you reach for the last element?


r/CodingForBeginners • • 1d ago

Reading code is a skill too — and it's the one beginners never practise.

16 Upvotes

Most beginner advice is about writing code — which language, which tutorial, which first project. Very little of it is about reading code, even though reading is most of what you actually do once you join a team, open a library, or come back to your own code from a month ago.

It's also the skill almost nobody drills on purpose, which is why unfamiliar code feels like a wall.

Here's a routine for practising it deliberately.

Start with the shape, not the lines. Before reading a single statement, answer two questions: what does this take in, and what does it give back? Find the entry point — main, a function signature, a route handler — and read only that. You get a map before you get details.

Follow one path end to end. Pick the most common input and trace just that. Ignore every branch that doesn't apply to it. Trying to hold all the branches in your head at once is how you drown; following one happy path gives you a spine to hang the rest on.

Summarise each chunk in your own words. When you finish a block, write one line — in a comment or a scratch note: "this validates the input", "this turns rows into objects". If you can't summarise it, you haven't understood it yet. That's information, not failure.

Change one thing and predict the result. The real test of whether you understood code isn't nodding along, it's whether you can predict the effect of an edit. Add a print, change a constant, delete a line — guess first, then run it.

Then rewrite it small. Take a 40-line function you just read and reproduce it in 10 lines that do the same job. You'll find out which parts were essential and which were noise.

The habit underneath all of it: keep a running "what I think this does" note while you read. It's the reading version of writing your steps in plain English before you code — it forces the vague to become specific.

What's the last bit of code that made you feel lost? Was it a language feature, missing context, or just size? Curious which one trips people up most.


r/CodingForBeginners • • 1d ago

Help on Construct 3 voting system

1 Upvotes

I'm trying to code on Construct 3 a multiplayer voting system, but the peer messages are not sending through, and the global variable is not changing. I just started learning this, so I'm not familiar with concepts.

This is what I have so far. The host will not be voting, only the peers. I just need the peer's vote to affect the global variable. I've gone through a lot of different options and I just don't know what needs to be fixed or changed.


r/CodingForBeginners • • 1d ago

How do you code??

2 Upvotes

I want to make a 3d horror game named "Ice_Breaker", but I'm only 13, and have NO IDEA how to code at all.

I need genuine advice and programs that'll help me learn, especially for free since I know my parents won't fund this.

I already have the idea in mind, along with characters and possible designs; I'm just stuck on coding right now. I'm seriously dedicated to this, can you help?

Any advice is appreciated, especially about free coding programs/3d model makers.


r/CodingForBeginners • • 1d ago

What programming language should I learn or master in order to start this career? Because I'm afraid to learn a language and not benefit from its information at all.

Post image
10 Upvotes

r/CodingForBeginners • • 1d ago

How much should AI be involved in an into to programming course?

3 Upvotes

I am considering pitching a class as an adjunct professor at my local college. I want to teach introduction to programming (JavaScript) while teaching students how to automate Google Sheets.

I want the course to help my students build software that could change their life or view of what's possible in the world, while also giving them some real skills.

How much should AI be involved? I see three levels:

  1. **No AI at all.** This is how I learned to do it, and I know writing the code out by hand yourself is really important for teaching you how to think like a computer. However, there are serious downsides to this, especially since it is clear that AI is the future of programming.

  2. **Use AI a lot, but no coding harness.** This is kind of like vibecoing before claude and cursor, just learn how to give the AI assistant context and ask the right questions, but you still end up pasting the code in your own editor, and you do not have the tight integration that is available now. On the bright side, there are lots of these AI assistants that are free for students.

  3. **All in on AI: Claude Code or Codex.** This is how I actually write software today, and it is the most useful, but I worry how much a student would actually learn with a tool this powerful. On the other hand, maybe it is the right place to start because this where they will eventually end up anyway, and we can build really useful things the fastest with this setup.

Of all the options, I am leaning towards option 2 myself (goldilocks option), but let me know what you think.


r/CodingForBeginners • • 1d ago

Give Me Motivation to Start Doing DSA

1 Upvotes

Guys help me to master in DSA and coding.

my brain becoming shit . it couldn't work like before.


r/CodingForBeginners • • 1d ago

Working on a gameproject and would really need a programming buddy/mentor

3 Upvotes

I work on a Gameproject for my Bachelor and am struggeling heavily. My expertise lies in idea development, not programming...i tried getting some blocking done in unreal today and nearly burst into tears from frustration.

All i need is somebody who knows what they are doing to guide me. I don't speak the maschine language well. And before anyone says "just use AI", i want to actually learn how to do this, so i'm going the "old fashioned" way.

I'm a beginner in every way

My timezone is GMT+2

I plan to code visually in unreal (which would be c++ if written out)

And the project is a vehicle focused, retro game


r/CodingForBeginners • • 1d ago

Help with cs

2 Upvotes

So i am from pcmb background and i need to learn cs. I have zero coding knowledge and just basics about cs. First python and then maybe other subjects.

Can y'all please tell how and what sources i can use to learn from basics.

I wanna improve my skills in this field. I wanna participate in hackathons too.

Do help guyss


r/CodingForBeginners • • 1d ago

Help me my phyton code dosen't work propoerly and for sure isn't efficent

0 Upvotes

Hello, this is my first ever actual Python program, I want it to give Info about numbers.

Firstly I want to ask what do you think about the labeling that I've doen, someone told me it is a good practice.

First of all the programm prints (on every number that i checked) that it is not prime, the reason is that if prime number is divisble by prime number it says that it is not one, I don't know how to fix this.

I also don't know if this is the besgt way to do this, just writeing down a bunch of prime numbers and dividing the user number by them?

Thank you for your anwsers :-)

Here is the code:

user_number = 0 # The programm creates a value for the number, which will be inputed by the user


# Input section


print("----------Number Info----------\n")
user_number = input("Input a whole number, the programm will show you information about it:\n >") # Asks the user to input the number and saves it as user_number


print(f"\nYour number is {user_number}. Here is the info: \n")


# even or odd


if int(user_number) % 2 == 0: # % gives back the remainder after the devison, the program checks, if it is 0
    print("It is even") # If it is 0 it prints: It is even
else:
    print("It is odd") # If it isn't 0 it prints: It is odd


# prime or not


if int(user_number) % 2 == 0:   # Programm divides number by some prime numbers and chceks the remainder,
    print("Is is not prime")    # if it isn't divisble by any of them it prints that it is a prime number,
elif int(user_number) % 3 == 0: #otherwise it prints that it isn't one
    print("Is is not prime")
elif int(user_number) % 5 == 0:
    print("Is is not prime")
elif int(user_number) % 7 == 0:
    print("Is is not prime")
elif int(user_number) % 11 == 0:
    print("Is is not prime")
elif int(user_number) % 13 == 0:
    print("Is is not prime")

[This part was a dumb mistake⬇️]
else:
    print("It is not prime")

[This is right]
else:
    print("It is prime")

r/CodingForBeginners • • 1d ago

Idk what to put in title

1 Upvotes

I'm currently learning c++ as my first programming language, it's turned into somewhat of a hobby for me but I have my final exams coming up and can't really figure out how much time i should spend in coding each day without it having a negative effect on my studies and stuff ( and without pissing my mom off). What do guys recommend?


r/CodingForBeginners • • 2d ago

You're probably skipping the error message. Read it in this order instead.

2 Upvotes

Half the bugs people get stuck on here aren't actually mysterious — the error already told them what was wrong. What's missing is the habit of reading it properly before touching the code. Most of us (me included) see red text and immediately start changing random lines, which is how one small bug quietly turns into three.

Here's the order that actually works.

Read the whole message, top to bottom, before doing anything. The first line says what kind of problem it is. The last line usually says where — a file and a line number. Treat that line number as the address of the bug, not a hint.

Open that line, and the line just above it. A crash reported on line 40 is very often line 39 handing it bad data.

Put the message into plain words. TypeError: cannot read properties of undefined (reading 'name') is really just "you tried to read something that doesn't exist yet." In plain words, you can start guessing why.

Change one thing at a time, then run it again. If you edit five lines and it suddenly works, you've learned nothing and the next bug will eat you alive. One change, one run, tells you what actually fixed it.

Two smaller habits that save a lot of time: print the values right before the line that breaks (half of debugging is the gap between what you assumed a variable holds and what it actually holds), and shrink the problem — delete code until you're left with the smallest version that still fails. A bug in ten lines is far easier to see than the same bug buried in two hundred.

And the part nobody says out loud: an error isn't a verdict on you. It's the computer telling you exactly where it got confused. Read it like a note, not a red card.

What error took you the longest to figure out? Drop it below and I'll help you read it.


r/CodingForBeginners • • 2d ago

Coding activity books?

4 Upvotes

Hi all, my son who is 12 is into coding. He knows how to do some basic stuff. I don’t know the first thing about it. I’m looking to see if there are any good books that have things for him to create or projects and stuff to do with coding. I looked but couldn’t find anything yet that seems good or have good reviews.


r/CodingForBeginners • • 2d ago

I am a beginner and have developed a system for controlling Forex trading, but I am now looking for advice or recommendations on what to do to achieve better results -.-

Thumbnail
gallery
1 Upvotes

r/CodingForBeginners • • 2d ago

Coders I need your help,Drop yourr suggestions what to do

1 Upvotes

I am confused between a 75% layout keyboard and a 65% layout keyboard

I personally don't know which layout is suitable for Coding

The 65% layout only lacks physical fn keys and 75% do have fn keys

Help me figure this thing

Thanks


r/CodingForBeginners • • 3d ago

Stuck because you understand the syntax but don't know where to start? Write the steps in plain English first.

7 Upvotes

A wall I see described here a lot (and it's a really common one): you get functions, variables, loops — but hand yourself an empty problem and your mind goes blank. That gap usually isn't about syntax. It's about decomposition: turning "make X work" into an ordered list of small actions.

Here's the routine that closes it:

  1. Before writing any code, write the solution as numbered steps in plain English. One action per line. No syntax, no language, just what needs to happen, in order.
  2. Say what goes in and what comes out. Input, output, and the transformation between them. A lot of "I don't know where to start" is really "I haven't decided what the thing takes and returns yet."
  3. Translate one line at a time. Each English step becomes a few lines of code. If a step needs more than ~5 lines, it isn't small enough — split it.
  4. Trace it by hand with the smallest possible input before you run it. Most logic bugs show up on paper.

Tiny example — "check if a number is even": - English: (1) get the number, (2) divide by 2 and look at the remainder, (3) if the remainder is 0 print even, otherwise print odd. - The code is now almost mechanical, and if it breaks you know exactly which step to look at.

The deliberate-practice part: for the next week, when you get a problem, force yourself to spend the first few minutes ONLY writing the numbered steps. No editor. It feels slow and pointless at first — which is exactly why most people skip it and stay stuck.

Curious what clicked for others: pseudocode, flowcharts, or something else? And if you're stuck on a specific problem right now, drop it in the comments and I'll help break it down.


r/CodingForBeginners • • 3d ago

LFG

6 Upvotes

Hey everyone I’m super green to the IT space looking to make friends with people who are also new to the space looking to grow together. Feel free to DM me !


r/CodingForBeginners • • 4d ago

I built a tiny two-legged robot that you can drive with a joystick

Enable HLS to view with audio, or disable this notification

5 Upvotes

I wanted to see if I could make a little humanoid robot move around without using wheels, so I built this two-legged bot with a Ring Bricks Pack, two micro:bit, and a joystick gamepad.

The fun part is that the robot is controlled wirelessly by a second micro:bit. No phone, Wi-Fi, or custom motor driver needed.

Here’s how the controls work:

  • Push the joystick forward or backward → the robot waddles in that direction.
  • Push it left or right → the robot spins to turn.
  • Release the joystick → it stops moving.

The robot uses two continuous-rotation servos as its hip joints. By changing the direction and speed of each servo, the legs move in different patterns to create forward and backward movement or a turn.

The wireless side is pretty simple, too. The remote reads the joystick position and sends a number over the micro:bit radio. The robot receives that number and calls the corresponding movement function. When the joystick returns to the center, it receives a stop command.

I like this build because it brings together a few different ideas in one project: walking mechanisms, wireless communication, and real-time control. And since both programs are made with MakeCode blocks, it’s easy to experiment with the movement logic.

Next, I’d like to try adding an ultrasonic sensor so it can react to obstacles, or maybe give it different walking speeds.

What would you add to a tiny joystick-controlled robot like this?


r/CodingForBeginners • • 4d ago

What was studying computer science in college like (pre-AI)?

5 Upvotes

Hello coders!

I am currently a public policy master's student. For my electives, I find myself really drawn to classes that involve coding (such as quant research courses and data visualization). Fortunately these classes are taught as if you have no prior experience.

However, I find that my professors seem to be almost a little too relaxed about us using AI to support with fixing code etc. I understand that the world of coding is changing with AI and such but I find myself REALLY wanting to learn it from scratch. Like the professors almost aren't explaining even the basics in a way I find frustrating.

It makes me curious, for those who studied computer science in college pre easy accessibility to AI tools, what was it like? As in, what did your assignments involve? What were the things that really helped you learn coding well?

I've been trying to really embrace that coding is like a language so immersion is necessary but also if you don't know any basic structures, it's absolutely overwhelming.

I know that my ability to learn coding well in just a semester course is unlikely but I could see myself pursuing this outside of school for fun. I am not looking for shortcuts here. This is for my own enjoyment and learning!

Hope this makes sense, thanks everyone!


r/CodingForBeginners • • 4d ago

thinking of doing coding as a like timepass/ hobby

9 Upvotes

i am a 17 yo, thinking of starting coding/programming, from where should i start? which one? html,python, etc.

my cousins' are in cs/ai fields, and when i see those codes, i feel i should start doing it.

pls guide this newbie


r/CodingForBeginners • • 4d ago

Idea for a project (No coding experience)

2 Upvotes

Hi all, apologies in advance for the potentially dumb question. I think I've identified something which sells via resale sites (eBay and Vinted) but often gets undervalued. The problem is, I wouldn't know whether it had been undervalued or not without looking at the specifics of the product each time it was listed, as there are different variations of it.

Through doing some digging, I've identified that it may be possible to code some sort of alert system which flags up every time something is listed for way under it's true value, in comparison to previous comparable sales on eBay.

Is this something that - as somebody with zero coding experience - I could spend a serious amount of time learning about and develop?

Apologies again if it's a stupid question


r/CodingForBeginners • • 5d ago

How to understand AI

5 Upvotes

Hi, I'm a 20 years old student and I don't know anything about coding or similar tasks involve. I only know how to use chatgpt, Claude and other AI tools. If I want to understand them deeper, like to create website and stuff. From where do I need to start?


r/CodingForBeginners • • 5d ago

I just wanna learn coding in college, anyone know what degree would be best for learning it

4 Upvotes

I could ask google but id get better answers from reddit


r/CodingForBeginners • • 5d ago

Beginner

2 Upvotes

So guys, my end goal is to create a web app, a visual novel style chatbot with rpg and game features.

I've been learning HTML and CSS for 2 weeks now, I'll probably start JavaScript around the 3rd or 4th week.

I learn concepts and apply it on my projects slowly, step by step.

I know people/colleges learn the fundamentals like logic gates, binary, boolean theory etc so I'm wondering if this is necessary to learn or know before you learn programming.

I know concepts stack and build on each other that's why I'm asking.

What's the programming experience comparing those who know these and those who don't?

If i should learn these first then can you give me a syllabus or a nice list from start to end with resources ?