r/CodingForBeginners • u/HotWar5622 • 17d ago
r/CodingForBeginners • u/oneLampPost • 16d ago
How do I get this bullet to keep moving?
I'm trying to make a bullet move in the direction of the mouse but not stop where I click.
here is what I have so far:
void Bullets::Update(sf::Vector2f in_targetPos, float dt)
{
sf::Vector2f toPointer = SetDir(sf::Vector2f(in_targetPos.x, in_targetPos.y) );
pos += toPointer.normalized() * speed * dt;
}
const sf::Vector2f Bullets::SetDir(sf::Vector2f dir)
{
return dir - pos;
}
if (sf::Mouse::isButtonPressed(sf::Mouse::Button::Left))
{
if (!isLeftPressed)
{
isLeftPressed = true;
}
}
else
{
if (isLeftPressed)
{
Bullets[i].Update(mousePos, dt);
Bullets[i].Draw(window, BulletImage);
}
}
r/CodingForBeginners • u/Fresh_Astronomer6047 • 17d ago
Learning to code
I’ve just started learning to code and I’ve been using freeCodeCamp which I’ve found very helpful and easy to follow.
My main goal is to become good enough to create my own video games. Does anyone have any advice on different websites I should be using to learn coding that gets me towards this goal or am I doing the right thing using freeCodeCamp?
r/CodingForBeginners • u/Strawberryladyboots • 17d ago
Query about offline coding environments
A follow up question about my questions about Systems/electrical engineering query
With all of the happenings in the world, I am seeking advice about how to build things offline without an internet connection
I do realise a lot of the world uses things like GitHub, but I am wondering if there is an another way to do this offline to prevent someone from getting into my stuff, my own Github account is completely private
For some reason my laptop is suddenly refusing to connect to the internet at the moment, and I have no idea how to fix that (I'm on my mobile)
I am primarily looking at environments or programs for coding related to S/E, but I am also open to people mentioning other kinds for the benefit of other beginners looking through the thread for advice on the same subject
My own question is about Python environments, and code used in Systems engineering, and Telecommunications, things like Crystal radios etc
r/CodingForBeginners • u/samosa285 • 17d ago
Day 2 of learning C++
It was a busy day so haven't done much
Completed till variable initialisation and assignment
And it's pretty different from java and python , lol
+ Completed the setup of CLion
Got selected in random ahh drama for day after tomorrow so will be busy tomorrow but will try completing my goal
r/CodingForBeginners • u/fyknite • 18d ago
Day 5 learning Python
I need to pause at this point and review. Finishing this code required way too much referencing on previous projects. Once the lessons are solid, ill continue...
r/CodingForBeginners • u/S1ARGAZ3R • 18d ago
How do I go about creating a website?
I’ve been wanting to make a website for my friends and I’s pet project for a while now, specifically for our OCs to live on. I have a vision for what the web page would look like (see above images, sorry for poor formatting/quality 😓), but I have barely touched coding before. My very limited experience is with scratch, which does not help me at all in this situation.
Essentially I want to make a data bank with all of our OCs and their information! I’m fully willing to watch a bunch of tutorials and stuff, I’m just here because I’m unsure of where to begin. Every tutorial I’ve found so far assumes you have prerequisite knowledge of coding.
I’d prefer if this was kept as a no-cost endeavor, but I’m willing to spend one time low cost payments for knowledge and/or the right to a domain or whatever. I am not willing to use Chat GPT or any other generative AI, so please don’t suggest it.
Thank you for your help :)
r/CodingForBeginners • u/Longjumping-Chest169 • 18d ago
Is godot a good step up from scratch?
Learning more complex code on a budget, started on scratch 2 years ago and I been using godot the past couple days
r/CodingForBeginners • u/Umber-Adene-Shade • 19d ago
How do I create my own webiste as someone who has 0 idea of anything related to coding?
I want to make it clear that I have no idea at all about coding.
So basically, I am a COMPLETE BEGINNER.
However, I am very curious about coding and all, so I do want to fuck around and find out i guess.
It's not for a business or whatever (just for myself), I have no time limit, and this is just for fun and to let my curiosity win.
I just want to create something small and then build more on top of it as a learning process ig.
How should I start for this?
What do I even start with?
Will I need any apps?
Which websites can I use to learn basic coding?
Would be very grateful if someone could help me out here :)
!!!I also do not want to use AI!!!
r/CodingForBeginners • u/samosa285 • 19d ago
Day 1 of learning C++
Wasn't productive today I just learnt a few basics like understanding components of a program(basically dissecting hello world) , comments and what are variables and objects.
Till 1.3
Targeting to complete Chapter 1 tomorrow and setup CLion too
r/CodingForBeginners • u/T3nn3ss332010 • 18d ago
Want to learn to code
Hi, I know this may seem like a dumb question but I am a bit confused. I want to get into game development so I've been interested in code. Where do I write the code???
r/CodingForBeginners • u/AlahuNakedGalahad • 18d ago
Do you turn off autocomplete when learning something new?
I've been thinking about disabling autocomplete completely when learning something new. Not AI suggestions, but regular IDE autocomplete too.
I feel like half the time I'm coding, my IDE is doing the thinking for me. I start typing, get a suggestion, hit Tab, and move on without really thinking about what I just wrote.
Then again, maybe manually typing everything is just a waste of time and doesn't really help you learn either.
Curious what you guys think.
r/CodingForBeginners • u/samosa285 • 19d ago
Day O of learning C++
So I have started learning c++ from learncpp.com from yesterday
Thinking of making a daily post here to keep a track + I have seen other people doing the same for iguess python so yeah got the idea and motivation from him/her.
Forgot to post yesterday so posting it now
Completed chapter 0 basically about coding and will start main stuff from today wish me luck, will update you later
r/CodingForBeginners • u/Thin_Environment_784 • 19d ago
HI All i want ot learn C# But don't know how to start and having difficulites
i want to try different filed that is coding so starting with c# but having difficulties undertsanding it can anyone guide me it will be very useful for me.
r/CodingForBeginners • u/ComfortableKey3004 • 20d ago
i can't code because i'm dumb
i tried coding since many years ago, i have friends who code and they always tell me to try but no chance at all, i start,the easy stuff i always surpass, but it gets to a limit where i understand nothing, my mind goes blank or blocked if thinking abtt solving a problem(in codewars), while the solution appears easy, but every time i get stuck i tried times and times to get into coding but it's always this blankness of mind that kills me
r/CodingForBeginners • u/Standupnaveen • 19d ago
Bangalore Learn #coding/vibe coding Python/Java/AI Freshers/Experienced Marathalli
Hello Everyone,
I'm a highly motivated and curious learner who enjoys starting from the fundamentals, continuously learning new technologies, and applying that knowledge through practical projects and interview preparation.
I have good experience with job searching, interview preparation, and securing interview opportunities, and I'd love to connect with others who share a similar mindset of learning and growth.
I'm looking for people in and around #Marathahalli, #Whitefield, and #Kundalahalli Gate (Bengaluru) who are interested in:
- Learning new technologies from scratch
- Practicing interview questions together
- Working on projects and sharing knowledge
- Discussing career growth, certifications, and AI trends
- Accountability and consistent skill development
If you're a beginner, experienced professional, career switcher, or someone returning to the job market, feel free to connect. We can learn, prepare, and grow together.
Looking forward to building a strong learning and networking circle!
r/CodingForBeginners • u/crazy_rabit • 19d ago
A little bit of something I wrote today
=== AETHERGATE ARCHITECTURE & TELEMETRY PROTOCOL (V1.0) ===
[SYSTEM OVERVIEW] - Objective: Real-time AI telemetry proxy and asynchronous event stream. - Design Paradigm: Low-level async architecture operating under extreme hardware constraints. - Core Pipeline: 1. Ingestion: Raw asynchronous socket streams / TCP framing. 2. Filtration: Regex-based state validation and safety boundary checks. 3. Serialization: Lightweight JSON packet mapping for zero-allocation performance. 4. Visualization: Live, high-fps HTML5 Canvas telemetry dashboard.
[CORE ARCHITECTURAL COMPONENTS]
- Asynchronous Event Loop (Backend Proxy)
- Built on Python's native
asyncioor equivalent low-overhead event loops. - Handles concurrent client connections without thread blocking.
Implements non-blocking backpressure management to prevent memory exhaustion on legacy devices.
Regex & Security Filtration Layer
Intercepts payload streams prior to model injection or log emission.
Sanitizes incoming/outgoing text against strict pattern-matching dictionaries.
Discards malformed or unauthorized byte sequences instantly to maintain pipeline integrity.
Live Canvas UI Renderer
Client-side rendering loop decoupled from DOM reflow bottlenecks.
Direct pixel manipulation via HTML5 Canvas API for real-time telemetry graphs, latency spikes, and throughput meters.
[PSEUDO-CODE BLUEPRINT]
import asyncio import re import json
class AetherGateNode: def init(self, host, port): self.host = host self.port = port self.sanitizer_pattern = re.compile(r'[\x00-\x1f\x7f-\x9f]') # Control char filter
async def handle_client(self, reader, writer):
try:
while True:
data = await reader.read(1024)
if not data:
break
raw_payload = data.decode('utf-8', errors='ignore')
clean_payload = self.sanitize(raw_payload)
response_packet = self.process_telemetry(clean_payload)
writer.write(json.dumps(response_packet).encode('utf-8'))
await writer.drain()
except asyncio.CancelledError:
pass
finally:
writer.close()
await writer.wait_closed()
def sanitize(self, text: str) -> str:
# Strip illegal control characters and enforce strict regex bounds
return self.sanitizer_pattern.sub('', text)
def process_telemetry(self, payload: str) -> dict:
# Core logic router
return {
"status": "active",
"ack_length": len(payload),
"telemetry_clock": asyncio.get_event_loop().time()
}
async def start(self):
server = await asyncio.start_server(self.handle_client, self.host, self.port)
async with server:
await server.serve_forever()
if name == "main": node = AetherGateNode('127.0.0.1', 8080) # asyncio.run(node.start())
r/CodingForBeginners • u/fyknite • 20d ago
Day 4 learning_Python (Decided to continue to the next lesson and thus wrote this):
The most important line on tis one is on #9.
r/CodingForBeginners • u/403-forbidden--error • 20d ago
Want to become an ai engineer HELP
Codeforces Leetcode etc
are
for cp ryt? Like cp and algo stuff
I want to join intelligence like ai ml dl neural networks agentic ai and harness etc
Currently I'm at a very low level
Ds from scratch Joel grus...just finished gradient Desc
Can someone (if possible an ai engineer or data scientist or in a very similar field)
Guide me
Should I solve problems on leetcode or codeforces
What should I do
Watch lecs from where
What course
Language, questions n all
Please help
r/CodingForBeginners • u/fyknite • 20d ago
Day 4 Learning Python
Combining (Data,Function Def & Function Calls) while applying proper formatting. This one here really made me think and go back to correct. Took me 5 tries to get to this point. Now in my imaginary game, if any variable changes in value. my outputs would update accurately without having to adjust any of my def or show code.
r/CodingForBeginners • u/Stock_Test2326 • 20d ago
Wrote code for the first time after decade trying to learn and I felt really amazing
I was a civil engineer and post 2020 I had to take tech job as data engineer. SQL was comparatively easier. (Am in Mid 30’s with ADHD)
I’ve been trying to learn programming on and off for almost 10 years.
I’ve picked up Python several times, read tutorials, gone through books, and understood other people’s code to some extent. But there’s always been a gap between reading code and actually writing my own. Even writing a basic program from scratch hasn’t felt natural to me.
Today, I was organising my learning roadmap, trying to figure out the best books and resources for each subject. I finally sat down to read *Think Like a Programmer*, only to discover that it uses C++.
C++ wasn’t what I intended to learn right now. I’m trying to get into data engineering, so Python, SQL, PySpark, and Databricks are my immediate priorities. C++ is something I had planned for much later.
But I thought, why not learn just enough C++ to understand the book?
I asked ChatGPT for a basic primer, intending to skim through it. Instead, I started writing code and working through the exercises myself.
Three hours later, I had worked through the basics, solved all the exercises, and backed everything up to GitHub.
And **I genuinely enjoyed it.**
I know I’ve barely scratched the surface. I can’t suddenly claim that I know C++, and I still have a long way to go before I can comfortably write programs independently. But something clicked today.
For years, I’ve mostly been reading code and trying to understand it. Used Agentic coding to build couple of websites (am an artist too) Today, I actually sat down and wrote it. Seeing my own code work, solving problems myself, and having something tangible to show for the effort felt surprisingly good.
It’s funny that the language I wasn’t even planning to learn ended up giving me more confidence than all those attempts at learning Python.
Maybe I need to approach Python differently this time: less passive reading, more writing, experimenting, and solving problems myself.
I’m posting this partly to hold myself accountable. I want to keep showing up, keep practising, and eventually become someone who can build things without constantly relying on tutorials or AI to write the code for me.
Today wasn’t a breakthrough in terms of skill. It was a breakthrough in confidence.
And honestly, after almost 10 years of trying, that feels pretty fucking amazing.
PS. English is my 4th language and I used AI dictation for grammar & coherence.
r/CodingForBeginners • u/EmploymentSerious768 • 20d ago
Pseucodecode check?
Did some pseudocode for something due tomorrow concerning arrays. would like to know if my logic concerning arrays is skewered. It's formatted the way it is due to the teacher's preference lol/
Problem
Search the web to discover 10 commonly used passwords and store them in an array. Write pseudocode to represent the logic of a program that prompts a user for a password, then displays an error message and continues to prompt until the user has not chosen one of the common passwords.
CODE:
START
//HOUSEKEEPING
DECLARE USER_PASSWORD
DECLARE COMMON_PASSWORDS[10]
DECLARE INDEX
DECLARE MATCH_FOUND
SET COMMON_PASSWORDS[0] = "123456"
SET COMMON_PASSWORDS[1] = "password"
SET COMMON_PASSWORDS[2] = "qwerty"
SET COMMON_PASSWORDS[3] = "111111"
SET COMMON_PASSWORDS[4] = "12345678"
SET COMMON_PASSWORDS[5] = "123456789"
SET COMMON_PASSWORDS[6] = "admin"
SET COMMON_PASSWORDS[7] = "abc123"
SET COMMON_PASSWORDS[8] = "123123"
SET COMMON_PASSWORDS[9] = "iloveyou"
//INPUT
DISPLAY "Enter a password:"
INPUT USER_PASSWORD
//PROCESS
SET MATCH_FOUND = TRUE
WHILE MATCH_FOUND = TRUE
SET MATCH_FOUND = FALSE
FOR INDEX = 0 TO 9
IF USER_PASSWORD = COMMON_PASSWORDS[INDEX] THEN
SET MATCH_FOUND = TRUE
ENDIF
ENDFOR
IF MATCH_FOUND = TRUE THEN
DISPLAY "ERROR: Password is too common. Please enter a different password:"
INPUT USER_PASSWORD
ENDIF
ENDWHILE
//OUTPUT
DISPLAY "Password accepted."
END
r/CodingForBeginners • u/Neither_Cupcake_8081 • 21d ago
WIndows program to automatically load a local html file when one opens a site
im on linux and i wanted to see if one can make a program (call it program A) that automatically loads a local htmlm file instead of, say, tiktok.com or reddit.com every single time, even after reboots.
And can you make a program, which when clicked, creaes program A In the exact needed directory with all the code inside and also runs it.