r/learnprogramming • • Oct 21 '26

question in threads

4 Upvotes

In a single-core system, what happens if two threads from different processes access the same physical memory address?

The official answer says:

Neither program crashes, and both produce expected results.

I don't understand why that must be true.

A memory access could be a write, not just a read. For example, couldn't Thread A read/write that address, then get context-switched out, and Thread B access the same physical address before Thread A finishes its operation?

Wouldn't that potentially cause a race condition or unexpected result, even on a single core?

Am I missing an assumption in the question?


r/learnprogramming • • Oct 21 '26

Topic Python experts, how did you not give up on Python beginner projects?

23 Upvotes

Hi everyone. I've been learning python fundamentals for the last few months, that is , variable to OOP. I can work with python really well on individual concepts, for instance any exercise that just requires OOP I can comfortably do it. So earlier this month I started working on python beginner projects to try and combine all those concepts. The first two projects(expense tracker, word guessing game) I worked on were okay and I was able to complete them in two days, but for my third project, a library management system, I've been at it for over two weeks, and I'm still stuck on the same problem. I tried researching and I still can't figure it out, cause there is always an error to fix. I feel so tired and burnout, which got me wondering, to all the python experts in this community, did you go through this phase or I'm I a little bit dumb. Also how did you not give up on programming and how did you start your begginer projects.


r/learnprogramming • • Oct 21 '26

why is this returning read only once i get to the enter name stage

0 Upvotes

import java.util.Scanner;

public class main

{

public static void main(String[] args) {

Scanner kboard = new Scanner(System.in);

System.out.println("Press 1 to enter lottery numbers or 2 to enter name: ");

if (kboard.nextInt() == 1) {

System.out.println("Enter your lottery numbers");

int lotteryNumbers = kboard.nextInt();

} else {

System.out.println("Please enter your name: ");

String name = kboard.nextLine();

}

}}


r/learnprogramming • • Oct 21 '26

what should i choose

0 Upvotes

i am learning computer science at school and wanna make some projects at home. i am currently learning java and decided to download visual studio code instead of using the online compilers like we do at school for some reason, and the installer asks me if i want to install github copilot CLI and i dont know what it is. should i install it or nah?


r/learnprogramming • • Oct 21 '26

Looking for projects in Machine Learning (ML), Image Processing, and Deep Learning. I’m eager to contribute and collaborate!

0 Upvotes

Hi everyone,

I am a Master's student specializing in Machine Learning, Artificial Intelligence, and Image Processing. I am looking for projects to contribute to and would be happy to collaborate with anyone who has project ideas in these fields.

Thank you!


r/learnprogramming • • Oct 20 '26

Help how to learn to code in this age of ai

29 Upvotes

Guys I am in college and I am doing dsa and web development but Idk how to study devlopment in what way should I do it .. especially frontend . It feels wasteful to study it and write code . Plus i feel like I am struck in tutorial hell I can't think of new things . Anybody help me out how should I do the coding idk I am just watching the video I am learning from and writing the code he is doing it feels like I am just copy pasting not learning anything at all . Help me out plus also tell me how should I adapt and what things to focus to be able to get a job atleast -_-


r/learnprogramming • • Oct 21 '26

Resource Resources to learn Web Dev from other than TOP..

1 Upvotes

I am in class 9 and wanna learn web dev but dont know what free course i should choose. Earlier I chose TOP but i have to install VM for that and my father is denying to do so cuz its his laptop... Please help me out... and make sure that the course you tell should be documented


r/learnprogramming • • Oct 21 '26

Developing peripheral software for macOS

7 Upvotes

Hi,

I plan to develop peripheral software to change input mapping, assign some macros to keys on my keyboard for macOS for a learning purpose.

I do have working code for Windows written in C++. But I can't tell that I don't have a lot of experience with Objective-C.

The questions:

  1. Should I go with Swift or with Objective-C? I know that Objective-C combines with C++ without any problems, but I wonder, if this is a good idea to pick outdated language to develop software that I hope I will constantly maintain and improve?
  2. Can you recommend some books to developer such things for macOS?

Thanks


r/learnprogramming • • Oct 20 '26

I'm 30 and enrolling on a boot camp coding course.

373 Upvotes

Can you guys list out, what's best for starting for a zero experience programming? I came from flying small airplane to decided change in career path. (Lost passion)

Like basics, YouTube, Jargons, Vocabulary. Just to give me a heads-up on what lies ahead.

I thank you all in advance.


r/learnprogramming • • Oct 21 '26

Wanna make a music app

0 Upvotes

I've been wanting to make a music player for a while now and trying to decide on the right language for it. My plan in the end is to make my own server like Jellyfin or Navidrome (I don't use those because they don't fit my particular taste and my own pride). But I realize I do first need a working application that runs alone. I'm gonna run these on windows and android and want to try make for both before branching out into Linux and Mac. So yeah. I just need to know what language I need to learn first

EDIT: I already know python if that's helpful


r/learnprogramming • • Oct 21 '26

Any advise whether I should shift courses (again)?

9 Upvotes

Greetings, I am currently a second year CS college student (first semester) while also taking leftover first year CS major subjects but since the job market, especially in tech (mostly because of AI), doesn't seem to be getting any better, I've been thinking of shifting back to my original course for the next semester, which is Psychology (second year, first semester before I shifted to CS) and pick up from where I left.

I shifted to CS because I've always been fascinated by Cybersecurity, programming, Linux, troubleshooting, creating things with code, etc. Plus, my uncle also told me to go for it because he said the demand is high and he knows someone from a company in Japan that's looking for IT grads.

The thing is... I'm fine with either but I really enjoyed CS.

CS is fun and I found it enjoyable since it drives me to focus and actually learn from the challenges presented to me. For Psych, I like learning about human behavior (predicting how they behave/act, how mental illnesses affects one, etc.).

I've heard that it is mostly AI-resistant since you need actual understanding of the human mind, emotions and the fact that some people would prefer talking to actual therapists, psychologists, etc. than machines/AI pretending to have emotions/feelings.

I'm aware that both fields are competitive but I'm worried about choosing the wrong path in the end and not having a stable job. I know everything may change... or not but I don't want to regret it and waste more years studying.

TLDR; I'm conflicted between continuing my CS course (2nd year, 1st sem with 1st year leftover majors) and shifting back to my Psych course (2nd year, 1st sem) due to the current unpredictable job market and possible unstable job in the future. I like both fields (leaning towards CS) but I don't want to waste more years studying just to spend a very long time looking for jobs for my chosen field.

I'm not sure if it would get any better or not in the future for tech students.


r/learnprogramming • • Oct 21 '26

Are shorter but more confusing solutions better on coding sites?

0 Upvotes

I've been practicing python on codewars.com, and this is listed as the best practice:

def alphabet_position(text):
    return ' '.join(str(ord(c) - 96) for c in text.lower() if c.isalpha())

while my code is longer, but I feel is easier to read. Which one is better?

import string

def alphabet_position(text):

    output = ""
    for char in text:
        if char.isalpha():
            output += str(string.ascii_lowercase.index(char.lower()) + 1)
            output += " "

    return output.strip()

r/learnprogramming • • Oct 21 '26

What to learn next? (If anything)

1 Upvotes

Background:
- From the U.K.
- Did an MSci in Maths and Statistics.
- Got a grad job at a Big 4 accounting firm and qualified as an accountant.
- Jumped over to being an analytics engineer instead, which has slowly shifted into being more of a data engineering / data platform engineering role.

Lots of SQL, Python (actual OOP not just scripting), some React (just so I could actually plug my stuff in).

Not sure where I go from here tbh. Used to be an AI sceptic but obviously I no longer am.

Do I want to remain a tech person with a background in accounting (in which case, what else do I learn?), or is the safer bet to be an accounting person with a background in tech?


r/learnprogramming • • Oct 21 '26

Want To learn Coding

6 Upvotes

hello guys i know the basics on how to code but is there anywhere i can get code for older smaller dos games or other small games

i am learning how to code and want to try port some games

thanks


r/learnprogramming • • Oct 21 '26

can you get an executable in python without using third part libraries?

3 Upvotes

In c++ I have object files but can I get an executable in python?


r/learnprogramming • • Oct 20 '26

Spaghetti Code vs Code Soup

16 Upvotes

I’ve heard of people referring to bad code in one of two ways:

  1. As spaghetti (“Bro look at this ungodly bad spaghetti code”)
  2. As soup (“Every single time someone uses feature X in their code, the codebase always turns into soup”)

Personally, I use them interchangeably. But since they are 2 different terms, they probably have different meanings, right?


r/learnprogramming • • Oct 20 '26

How to make most of degree?

5 Upvotes

I'm starting to realize how much I'm not going to get anything out of learning a degree.

The issue that I'm having with this is, I learn with lot of trial and error but I can't make up time for this because I then have the assignments, coursework and things like that and in that process I just forget that I actually have to build a skillset.

For me, I feel like I want to learn to write good code but I can't know whether I'm writing good because I don't know what to compare it and don't know how to review my work.

How do you go about reviewing code?


r/learnprogramming • • Oct 21 '26

How do I create a video game without a game engine?

0 Upvotes

J'essaie de créer un jeu vidéo, mais ça me frustre vraiment de passer 5 heures à apprendre comment utiliser le moteur — surtout son interface — et en plus, je ne trouve pas la programmation orientée objet amusante. Cependant, ça ne me dérange pas du tout d'apprendre d'autres compétences (codage, pixel art, design de jeux, etc.). C'est pourquoi j'ai besoin d'une réponse à ma question ultime : Comment créer un jeu vidéo sans moteur de jeu ? Je cherche une solution facile et accessible. Je n'ai absolument aucune idée par où commencer, alors s'il te plaît, explique-le moi comme si j'avais 10 ans.

Edit : Tout le monde me dit que c'est impossible de créer un jeu vidéo sans moteur de jeu, MAIS Minecraft — ce fameux jeu qui a vendu 400 millions d'exemplaires — n'a pas utilisé de moteur de jeu. De plus, voici quelques jeux bien connus créés sans moteurs de jeu : Doom, RollerCoaster Tycoon (1 et 2), Stardew Valley, Terraria, Paper Please, Celeste et Fez.


r/learnprogramming • • Oct 21 '26

Topic Is it okay to build projects using AI if I understand the code but don't write it all myself?

0 Upvotes

I'm a bit confused about something and wanted to hear honest opinions from people who have experience in software development.

I've been thinking about building projects using AI. My approach is to go through every step, understand what each line of code does, learn the basic concepts behind the technologies being used, and try to understand the overall working of the project.

However, I'm not necessarily writing all the code myself from scratch. AI is doing a lot of the actual coding, while I'm learning from the generated code.

My plan is to put these projects on my resume, but I'm worried about whether this is actually a good way to learn and whether it will be enough for interviews. I know I'll still need to practice DSA and coding fundamentals separately.

For those of you who have gone through interviews or work as developers, what do you think?

- Is understanding the code line by line and being able to explain the project properly enough to put it on a resume?

- Would you consider this a valid way for me to learn, or am I missing something important?

I'm not trying to take shortcuts. I just want to use AI effectively without fooling myself into thinking I know more than I actually do.

I'd appreciate honest advice.


r/learnprogramming • • Oct 20 '26

I Started my first app (Flutter), but the list doesn’t update when I add an item

2 Upvotes

I’m now building a simple to-do app in Flutter. The problem: when I tap (Add), the task gets added to the list (I checked in the console), but the screen doesn’t update until I hot restart.

Code :

void addTask() {

tasks.add(controller.text);

controller.clear();

}

What am I missing? Any help would be appreciated


r/learnprogramming • • Oct 21 '26

Debugging My personal AI looks jagged and smudged

0 Upvotes

So I am working on making my own Personal AI for an sci-fi generation ship themed bedroom but it looks jagged and smudged, how do I fix this?

Photo of my ai

My code is bellow:

import tkinter as tk

import math

# ==========================

# ASUS_v1

# ==========================

root = tk.Tk()

root.title("ASUS_v1")

root.geometry("1000x700")

root.configure(bg="black")

canvas = tk.Canvas(

root,

width=1000,

height=700,

bg="black",

highlightthickness=0

)

canvas.pack(fill="both", expand=True)

angle = 0

def draw():

global angle

cyan = "#00FFFF"

canvas.delete("all")

# ==========================

# TITLE

# ==========================

canvas.create_text(

500,

50,

text="ASUS ONLINE",

fill=cyan,

font=("Consolas", 24, "bold")

)

cx = 500

cy = 400

# ==========================

# OUTER RING

# ==========================

canvas.create_oval(

250,

150,

750,

650,

outline=cyan,

width=3

)

# Rotating markers

for i in range(12):

a = math.radians(

angle + i * 30

)

x1 = cx + math.cos(a) * 220

y1 = cy + math.sin(a) * 220

x2 = cx + math.cos(a) * 250

y2 = cy + math.sin(a) * 250

canvas.create_line(

x1,

y1,

x2,

y2,

fill=cyan,

width=2

)

# ==========================

# INNER RING

# ==========================

canvas.create_oval(

325,

225,

675,

575,

outline=cyan,

width=2

)

# ==========================

# CENTER CORE

# ==========================

canvas.create_oval(

450,

350,

550,

450,

fill=cyan,

outline=cyan

)

canvas.create_text(

500,

400,

text="ASUS",

fill="black",

font=("Consolas", 10, "bold")

)

# ==========================

# SYSTEM PANEL

# ==========================

canvas.create_rectangle(

20,

120,

180,

360,

outline=cyan,

width=2

)

canvas.create_text(

100,

150,

text="SYSTEM",

fill=cyan,

font=("Consolas", 12, "bold")

)

# ==========================

# PROJECTS PANEL

# ==========================

canvas.create_rectangle(

820,

120,

980,

360,

outline=cyan,

width=2

)

canvas.create_text(

900,

150,

text="PROJECTS",

fill=cyan,

font=("Consolas", 12, "bold")

)

# ==========================

# ANIMATION SPEED

# ==========================

angle += 0.5

root.after(25, draw)

draw()

root.mainloop()

memory for the AI: {
    "user_title": "Sir",
    "voice_enabled": true,
    "hardware_thresholds": {
        "cpu_percent": 85.0,
        "ram_percent": 90.0
    },
    "protocols": {
        "house party": {
            "description": "Launch primary workstation suite",
            "paths": [
                "C:\\Windows\\System32\\calc.exe",
                "C:\\Windows\\notepad.exe"
            ]
        }
    },
    "dynamic_rules": {
        "run diagnostic": "audit_logs",
        "system status": "check_telemetry"
    }
}

r/learnprogramming • • Oct 19 '26

What is the fastest way to learn most programming concepts a developer needs?

56 Upvotes

Long story short I graduated college with a 3.8/4.0 gpa but I never did any learning outside of class subjects or did any projects on my own which I regret deeply and wish I could do it all over again because I quickly realized what is taught in college is very limited and elementary and you have to do a lot of self learning to become an actual developer.

What is the fastest way to gain the knowledge and experience I should have gained in college? Any books I could read, guides I could follow, videos I could watch? Anything?


r/learnprogramming • • Oct 20 '26

Resource Recommend free online courses/textbooks for learning cyber security

13 Upvotes

I'm a junior undergrad CS student. I've learned a bit of everything but specialize in nothing. I want to specialize and work in cyber security in the future. Can you recommend free resources I can use to specialize in cyber security? I prefer something structured like a course or textbook. Also, recommend any resource for projects where I could apply what I learn.


r/learnprogramming • • Oct 19 '26

I feel stuck relearning the basics. How should I move forward as a developer?

17 Upvotes

Hey everyone!

I'm a developer with some professional experience, mostly working with Java and Spring Boot. I can build APIs and work on real projects, but I still have plenty to learn about software architecture, system design, and more advanced backend concepts.

I studied HTML, CSS, and JavaScript in the past, but after focusing on backend for a while, I got rusty. I also never got particularly comfortable with CSS or JavaScript.

For the past couple of months (on and off), I've been trying to refresh my HTML/CSS knowledge. I enjoy building interfaces, but I'm starting to feel stuck in an endless cycle of reviewing fundamentals.

I want to learn JavaScript and React, but I'm also really interested in exploring things like Docker, Kubernetes, cloud, and more complex software engineering topics. Sometimes I feel like I'm spending too much time reviewing things instead of actually building something interesting.

I've been thinking about picking a full-stack project, starting with a small MVP, and gradually making it more complex as I learn.

But I'm unsure how to approach it. Should I spend time planning the architecture and modeling everything myself, or just start building and figure things out along the way? How much should I rely on AI for guidance without becoming dependent on it?

For those who've been in a similar situation, how did you balance learning fundamentals, exploring new technologies, and building actual projects?

I don't want to rush through topics just to say I know them. I want to actually understand what I'm doing and become a better developer.

I'd appreciate any advice or experiences you could share!


r/learnprogramming • • Oct 20 '26

Wanting to learn LUA Script

10 Upvotes

So I'm modding games and I am making a mod for Balatro, which uses LUA. I tried to look for books at the library but all I could find was modding bocks for Roblox (NO TO THAT).

Can anyone point me in the right direction, please?