r/learnprogramming • • 1d ago

i have a poblem

0 Upvotes

soo i crated my own script for a game to farm but i what the script to farm on the game soo i can do what ever i what on my pc but the script start to tipe on my drscktop can you help me pls

my script
import ctypes

import subprocess

import win32gui

import time

import random

import threading

import keyboard

import tkinter as tk

from tkinter import font as tkfont

import vgamepad as vg

# ── CONFIG ──────────────────────────────────────────────────────────────────

WINDOW_TITLE = "BongoCat" # adjust if title differs in your language

TOGGLE_KEY = "F8"

INTERVAL_MIN = 0.055 # pauza intre cicluri (~10-12 cicluri/sec)

INTERVAL_MAX = 0.085

HOLD_MIN = 0.015 # cat timp stau apasate simultan

HOLD_MAX = 0.025

DEBOUNCE = 0.26

# Ruleaza DOAR cand BongoCat este fereastra activa (evita deschiderea tastaturii cand scrii)

ONLY_WHEN_BONGO_FOCUSED = True

PAUSE_ON_WINDOWS_SEARCH = True

KILL_TOUCH_KEYBOARD = True

# Am scos X / Y / SHARE / OPTIONS pentru a evita scurtaturile tastaturii virtuale

# Disponibile: "CROSS", "CIRCLE", "SQUARE", "TRIANGLE", "L1", "R1", "DPAD_UP", "DPAD_DOWN", "DPAD_LEFT", "DPAD_RIGHT"

KEYS = [

"CROSS",

"CIRCLE",

]

# ────────────────────────────────────────────────────────────────────────────

def _ds4_dpad(attr_name: str):

return getattr(vg.DS4_DPAD_DIRECTIONS, attr_name, None)

DS4_DPAD_NONE_VAL = _ds4_dpad("DS4_DPAD_NONE")

BUTTON_MAP = {

"CROSS": vg.DS4_BUTTONS.DS4_BUTTON_CROSS,

"CIRCLE": vg.DS4_BUTTONS.DS4_BUTTON_CIRCLE,

"SQUARE": vg.DS4_BUTTONS.DS4_BUTTON_SQUARE,

"TRIANGLE": vg.DS4_BUTTONS.DS4_BUTTON_TRIANGLE,

"L1": vg.DS4_BUTTONS.DS4_BUTTON_SHOULDER_LEFT,

"R1": vg.DS4_BUTTONS.DS4_BUTTON_SHOULDER_RIGHT,

"DPAD_UP": _ds4_dpad("DS4_DPAD_NORTH") or _ds4_dpad("DPAD_UP"),

"DPAD_DOWN": _ds4_dpad("DS4_DPAD_SOUTH") or _ds4_dpad("DPAD_DOWN"),

"DPAD_LEFT": _ds4_dpad("DS4_DPAD_WEST") or _ds4_dpad("DPAD_LEFT"),

"DPAD_RIGHT": _ds4_dpad("DS4_DPAD_EAST") or _ds4_dpad("DPAD_RIGHT"),

}

DPAD_BUTTONS = {

"DPAD_UP",

"DPAD_DOWN",

"DPAD_LEFT",

"DPAD_RIGHT",

}

BG_MAIN = "#09090b"

BG_CARD = "#121216"

BG_BTN = "#18181f"

BG_BTN_ACT = "#241322"

BORDER_CLR = "#22222b"

FG_WHITE = "#ffffff"

FG_PINK = "#ff5ec4"

FG_MUTED = "#a1a1aa"

DWMWA_USE_IMMERSIVE_DARK_MODE = 20

DWMWA_CAPTION_COLOR = 35

DWMWA_TEXT_COLOR = 36

gamepad = None

running = False

paused_by_bg = False

lock = threading.Lock()

_last_toggle = 0.0

press_count = 0

elapsed_sec = 0

last_tick_time = None

status_label = None

btn_toggle = None

count_label = None

timer_label = None

title_label = None

root = None

def init_gamepad():

global gamepad

if gamepad is None:

gamepad = vg.VDS4Gamepad()

gamepad.reset()

gamepad.update()

def release_all_gamepad():

try:

if gamepad is not None:

gamepad.reset()

gamepad.update()

except Exception:

pass

def close_touch_keyboard():

if not KILL_TOUCH_KEYBOARD:

return

for proc_name in ("TabTip.exe", "TextInputHost.exe"):

try:

subprocess.run(

["taskkill", "/F", "/IM", proc_name],

stdout=subprocess.DEVNULL,

stderr=subprocess.DEVNULL,

creationflags=subprocess.CREATE_NO_WINDOW,

)

except Exception:

pass

def is_windows_search_active() -> bool:

if not PAUSE_ON_WINDOWS_SEARCH:

return False

try:

hwnd = win32gui.GetForegroundWindow()

if not hwnd:

return False

title = (win32gui.GetWindowText(hwnd) or "").strip().lower()

cls_name = (win32gui.GetClassName(hwnd) or "").strip().lower()

search_titles = {"search", "căutare", "start", "searchhost"}

search_classes = {

"windows.ui.core.corewindow",

"searchui.searchwindow",

"launcherframe",

}

if title in search_titles or cls_name in search_classes:

return True

if "search" in cls_name or "searchhost" in title:

return True

except Exception:

pass

return False

def get_target_hwnd():

hwnd = win32gui.FindWindow(None, WINDOW_TITLE)

if hwnd and win32gui.IsWindow(hwnd):

return hwnd

return None

def is_window_open() -> bool:

return get_target_hwnd() is not None

def is_target_focused() -> bool:

if not ONLY_WHEN_BONGO_FOCUSED:

return True

target_hwnd = get_target_hwnd()

if not target_hwnd or win32gui.IsIconic(target_hwnd):

return False

fg_hwnd = win32gui.GetForegroundWindow()

if not fg_hwnd:

return False

if fg_hwnd == target_hwnd:

return True

try:

parent = win32gui.GetParent(fg_hwnd)

while parent:

if parent == target_hwnd:

return True

parent = win32gui.GetParent(parent)

except Exception:

pass

return False

def hex_to_colorref(hex_color: str) -> int:

hex_color = hex_color.lstrip("#")

r = int(hex_color[0:2], 16)

g = int(hex_color[2:4], 16)

b = int(hex_color[4:6], 16)

return (b << 16) | (g << 8) | r

def style_title_bar(window, active_text_hex: str = FG_WHITE):

try:

window.update_idletasks()

hwnd = ctypes.windll.user32.GetParent(window.winfo_id())

if not hwnd:

hwnd = window.winfo_id()

dwm = ctypes.windll.dwmapi

dark_mode = ctypes.c_int(1)

dwm.DwmSetWindowAttribute(

hwnd,

DWMWA_USE_IMMERSIVE_DARK_MODE,

ctypes.byref(dark_mode),

ctypes.sizeof(dark_mode)

)

cap_color = ctypes.c_int(hex_to_colorref(BG_MAIN))

dwm.DwmSetWindowAttribute(

hwnd,

DWMWA_CAPTION_COLOR,

ctypes.byref(cap_color),

ctypes.sizeof(cap_color)

)

txt_color = ctypes.c_int(hex_to_colorref(active_text_hex))

dwm.DwmSetWindowAttribute(

hwnd,

DWMWA_TEXT_COLOR,

ctypes.byref(txt_color),

ctypes.sizeof(txt_color)

)

except Exception:

pass

def format_timer(seconds: int) -> str:

mins, secs = divmod(max(0, seconds), 60)

hours, mins = divmod(mins, 60)

if hours > 0:

return f"{hours:02d}:{mins:02d}:{secs:02d}"

return f"{mins:02d}:{secs:02d}"

def press_keys_simultaneously(key_names):

global press_count

std_buttons = []

dpad_dirs = []

for name in key_names:

upper = name.upper()

val = BUTTON_MAP.get(upper)

if val is None:

print(f"[press] Unknown or unsupported PS button '{name}'")

continue

if upper in DPAD_BUTTONS:

dpad_dirs.append(val)

else:

std_buttons.append(val)

if not std_buttons and not dpad_dirs:

return

try:

if gamepad is None:

init_gamepad()

for btn in std_buttons:

gamepad.press_button(button=btn)

if dpad_dirs:

gamepad.directional_pad(direction=dpad_dirs[-1])

gamepad.update()

hold = random.uniform(HOLD_MIN, HOLD_MAX)

if hold > 0:

time.sleep(hold)

for btn in std_buttons:

gamepad.release_button(button=btn)

if dpad_dirs and DS4_DPAD_NONE_VAL is not None:

gamepad.directional_pad(direction=DS4_DPAD_NONE_VAL)

gamepad.update()

with lock:

press_count += len(std_buttons) + len(dpad_dirs)

except Exception as e:

print(f"[press] Error on PS buttons {key_names}: {e}")

def auto_press_loop():

global running, paused_by_bg

cycle = 0

while True:

with lock:

is_running = running

if not is_running:

paused_by_bg = False

time.sleep(0.05)

continue

if not is_window_open():

release_all_gamepad()

time.sleep(0.2)

continue

if is_windows_search_active() or not is_target_focused():

if not paused_by_bg:

paused_by_bg = True

release_all_gamepad()

close_touch_keyboard()

apply_theme(True, bg_paused=True)

time.sleep(0.08)

continue

if paused_by_bg:

paused_by_bg = False

apply_theme(True, bg_paused=False)

try:

press_keys_simultaneously(KEYS)

cycle += 1

if cycle % 8 == 0:

close_touch_keyboard()

except Exception as e:

print(f"[loop] Error: {e}")

delay = random.uniform(INTERVAL_MIN, INTERVAL_MAX)

if delay > 0:

time.sleep(delay)

def apply_theme(is_active: bool, bg_paused: bool = False):

if not root:

return

active_fg = FG_PINK if (is_active and not bg_paused) else FG_WHITE

def _update():

style_title_bar(root, active_fg)

if title_label:

title_label.config(fg=active_fg)

if status_label:

if not is_active:

status_label.config(text="○ STOPPED", fg=FG_WHITE)

elif bg_paused:

status_label.config(text="⏸ PAUSED", fg=FG_MUTED)

else:

status_label.config(text="● RUNNING", fg=FG_PINK)

if count_label:

count_label.config(fg=active_fg)

if timer_label:

timer_label.config(fg=active_fg)

if btn_toggle:

btn_toggle.config(

text="■ STOP [F8]" if is_active else "▶ START [F8]",

fg=active_fg,

bg=BG_BTN_ACT if (is_active and not bg_paused) else BG_BTN,

activebackground=BG_BTN_ACT,

activeforeground=FG_PINK

)

root.after(0, _update)

def set_not_found_state():

if not root:

return

def _update():

style_title_bar(root, FG_WHITE)

if status_label:

status_label.config(text="✕ WINDOW NOT FOUND", fg=FG_WHITE)

if btn_toggle:

btn_toggle.config(text="▶ START [F8]", fg=FG_WHITE, bg=BG_BTN)

root.after(0, _update)

def toggle_running():

global running, paused_by_bg, _last_toggle, last_tick_time

now = time.time()

if now - _last_toggle < DEBOUNCE:

return

_last_toggle = now

with lock:

next_state = not running

if next_state:

if not is_window_open():

running = False

paused_by_bg = False

set_not_found_state()

return

init_gamepad()

running = True

paused_by_bg = not is_target_focused()

last_tick_time = time.time()

else:

running = False

paused_by_bg = False

last_tick_time = None

release_all_gamepad()

apply_theme(next_state, bg_paused=paused_by_bg if next_state else False)

def reset_stats():

global press_count, elapsed_sec, last_tick_time

with lock:

press_count = 0

elapsed_sec = 0

if running:

last_tick_time = time.time()

refresh_stats_ui()

def refresh_stats_ui():

with lock:

c = press_count

t = elapsed_sec

is_active = running and not paused_by_bg

fg = FG_PINK if is_active else FG_WHITE

if count_label:

count_label.config(text=f"{c:,}", fg=fg)

if timer_label:

timer_label.config(text=format_timer(t), fg=fg)

def ui_tick():

global elapsed_sec, last_tick_time

if not root:

return

with lock:

if running:

now = time.time()

if last_tick_time is not None:

elapsed_sec += int(now - last_tick_time)

last_tick_time = now - (now - last_tick_time - int(now - last_tick_time))

refresh_stats_ui()

root.after(200, ui_tick)

def on_hotkey(event):

toggle_running()

def on_close():

global running

with lock:

running = False

release_all_gamepad()

root.destroy()

def build_gui():

global root, status_label, btn_toggle, count_label, timer_label, title_label

root = tk.Tk()

root.title("LGF // Controller")

root.geometry("320x235")

root.resizable(False, False)

root.configure(bg=BG_MAIN)

root.protocol("WM_DELETE_WINDOW", on_close)

root.attributes("-topmost", True)

root.attributes("-alpha", 0.97)

style_title_bar(root, FG_WHITE)

f_title = tkfont.Font(family="Consolas", size=13, weight="bold")

f_stat = tkfont.Font(family="Consolas", size=9, weight="bold")

f_lbl = tkfont.Font(family="Segoe UI", size=8)

f_val = tkfont.Font(family="Consolas", size=14, weight="bold")

f_btn = tkfont.Font(family="Consolas", size=10, weight="bold")

f_mini = tkfont.Font(family="Consolas", size=8)

header = tk.Frame(root, bg=BG_MAIN)

header.pack(fill="x", padx=16, pady=(14, 8))

title_label = tk.Label(

header, text="LOCAL GAME FARM",

font=f_title, bg=BG_MAIN, fg=FG_WHITE

)

title_label.pack(side="left")

status_label = tk.Label(

header, text="○ STOPPED",

font=f_stat, bg=BG_MAIN, fg=FG_WHITE

)

status_label.pack(side="right", pady=(3, 0))

card = tk.Frame(

root, bg=BG_CARD,

highlightbackground=BORDER_CLR, highlightthickness=1

)

card.pack(fill="x", padx=16, pady=(2, 12))

left_box = tk.Frame(card, bg=BG_CARD)

left_box.pack(side="left", expand=True, fill="both", padx=12, pady=10)

tk.Label(

left_box, text="PRESSES / CLICKS",

font=f_lbl, bg=BG_CARD, fg=FG_MUTED

).pack()

count_label = tk.Label(

left_box, text="0",

font=f_val, bg=BG_CARD, fg=FG_WHITE

)

count_label.pack(pady=(2, 0))

divider = tk.Frame(card, bg=BORDER_CLR, width=1)

divider.pack(side="left", fill="y", pady=8)

right_box = tk.Frame(card, bg=BG_CARD)

right_box.pack(side="right", expand=True, fill="both", padx=12, pady=10)

tk.Label(

right_box, text="ACTIVE TIMER",

font=f_lbl, bg=BG_CARD, fg=FG_MUTED

).pack()

timer_label = tk.Label(

right_box, text="00:00",

font=f_val, bg=BG_CARD, fg=FG_WHITE

)

timer_label.pack(pady=(2, 0))

controls = tk.Frame(root, bg=BG_MAIN)

controls.pack(fill="x", padx=16)

btn_toggle = tk.Button(

controls,

text="▶ START [F8]",

font=f_btn,

bg=BG_BTN,

fg=FG_WHITE,

activebackground=BG_BTN_ACT,

activeforeground=FG_PINK,

relief="flat",

bd=0,

highlightthickness=1,

highlightbackground=BORDER_CLR,

pady=8,

cursor="hand2",

command=toggle_running

)

btn_toggle.pack(fill="x")

footer = tk.Frame(root, bg=BG_MAIN)

footer.pack(fill="x", padx=16, pady=(10, 0))

tk.Label(

footer, text=f"Target: {WINDOW_TITLE}",

font=f_mini, bg=BG_MAIN, fg=FG_WHITE

).pack(side="left")

btn_reset = tk.Button(

footer, text="RESET",

font=f_mini, bg=BG_MAIN, fg=FG_WHITE,

activebackground=BG_BTN, activeforeground=FG_PINK,

relief="flat", bd=0, cursor="hand2",

command=reset_stats

)

btn_reset.pack(side="right")

root.after(200, ui_tick)

return root

if __name__ == "__main__":

keyboard.on_press_key(TOGGLE_KEY, on_hotkey)

threading.Thread(target=auto_press_loop, daemon=True).start()

root = build_gui()

print("INFO F8 = Start/Stop | Close window to exit")

root.mainloop()


r/learnprogramming • • 2d ago

Topic Is Python -> JS -> C++ -> Java -> C -> Assembly a good order to learn?

10 Upvotes

I'm a Python beginner planning my learning path and want to know if this order makes sense:

Python -> JavaScript -> C -> Java -> C++ -> Assembly

Is this a good path, or is it a bad idea to learn this many languages? What do you think?
Edit: Swapped C++ and C (so C -> C++ instead of C++ -> C) based on your feedback. Thanks for all the advice!


r/learnprogramming • • 2d ago

Best books to learn Python from scratch with lots of exercises and practice problems?

19 Upvotes

Hi everyone!

I want to learn Python programming from scratch and become really good at it.

I'm looking for book recommendations that

  1. Explain concepts clearly, starting from the basics.
  2. Have plenty of exercises and practice problems after each topic.
  3. Gradually increase from beginner to advanced difficulty.
  4. Focus on problem-solving and programming logic rather than just theory.
  5. Include practical projects to help apply what I've learned.

I don't mind working through lengthy books. My main goal is to practise extensively until I can write programs independently without relying on tutorials.

Which books would you recommend? Also, are there any websites or platforms with excellent Python practice problems?

I'd appreciate recommendations from people who have learned Python this way. Thank you!


r/learnprogramming • • 1d ago

Topic Please help me out with this?

0 Upvotes

Ok so I a am currently in my college 1st year 1st sem and interacted with one of my senior. Then I got to knew that backend engineer and Ai roles are different things. To be an ai engineer I don't need to be a backend engineer like I don't need to go in deep in backend or web dev. I asked me that I am currently learning flask and thinking of switching to spring boot and I am interested in ai role. The he cleared me with these differences between ai roles and backend. And suggest me to start backend with spring boot and continue In it. Is he right. I also watched a road map video and in that the creator told that exactly defination of ai engineer is not properly designed rather it depends on company what work they give you. In some companies the same person does both backend as well as designing ai . Before interacting with him I used to thought that main core of Ai that is llm is itself a backend system. Or good knowledge of backend is the first step in the ai industry. please anyone could clarify me here. And suggest me should I go with full stack web dev or Ai model designing and training.


r/learnprogramming • • 2d ago

Question (CS Student) Every Time I see AI code I Feel disencouraged

206 Upvotes

How is your day.
I'm currently a 2nd year CS student who genuinely enjoys learning coding. I can stay for hours studying a certain topic and usually all I need to be feel like continuing is less bugs showed by the compiler. but seeing AI being able to do the same thing I have been trying to learn for hours way faster and better than me always makes question myself. My question is...
Is it still worth it going through all of this


r/learnprogramming • • 2d ago

i feel so useless and divided

23 Upvotes

Final year CS student building embedded projects to land a real role. I genuinely love embedded systems and coding, and it feels weird right now because I barely have time to learn how to write things properly from scratch. Everything pushes you toward big, impressive projects nobody gets noticed for mastering the basics even though the basics are what actually build real understanding. Meanwhile, that understanding can feel almost pointless when AI agents can build things faster, bigger, and louder. I want to write my own code, yet I catch myself feeling stupid for wanting to actually know how to write scripts without an agent.

Do I just have to accept that coding from scratch is becoming a useless skill, that debugging on your own is a waste of time, and that being "good" now means handing that knowledge over to machines?

I don’t just want to ship demos. I want to be a real programmer like the engineers who came before me someone with genuine, deep mastery over the craft I love.

So I’m genuinely asking: what does mastery even look like in the age of AI?


r/learnprogramming • • 2d ago

Question on what I should focus

7 Upvotes

I'm in my fourth semester of my Information Systems degree, but I don't know what career I want to persue. I like coding in C/C++, Rust and even Haskell, I like complex things on computing like theory of computation and I really enjoy learning networking. However, I can't decide what I really want to work with. I've thought I would like working with web development, but unfortunaly I don't find it that cool when compared with the topics I mentioned earlier.

So, what would you guys recommend me?


r/learnprogramming • • 2d ago

Family Man With Limited Free Time: Is a Personal Offline Copy of Wyrm Wild Possible?

3 Upvotes

Hi everyone,

I currently play a game called Wyrm Wild. Because of my work schedule and family responsibilities, idle/automatic games are really the only type of games that fit into the limited free time I have.

The problem is that this game relies heavily on microtransactions. Almost every aspect of progression seems tied to spending money, and since the purchases are priced in US dollars while I earn in Brazilian reais, everything becomes very expensive for me.

So I was wondering: would it be possible to create a personal offline copy of the game just for myself, with no intention of distributing it, so I could play at my own pace and experience a sense of progression without constantly hitting paywalls?

I'm not looking to profit from it or share it with anyone, just to enjoy the gameplay offline. I'd appreciate any advice or information about whether this is technically possible and what would be involved.(i am not programmer)

Thanks!


r/learnprogramming • • 2d ago

Should I stick with Java for both backend and LeetCode if I have six months to prepare for an internship?

2 Upvotes

Hey folks, I’m a third-year CS student on the software engineering track. I have about six months to prepare for my required summer internship, and I’m aiming for a backend role.

I’ve used Java in my OOP course and I’m fairly comfortable with it, but I haven’t built a backend project yet. I also want to get better at data structures and problem solving. I’m considering two options.

  1. Stick with Java for both backend projects and LeetCode since I already know the language.
  2. Learn Python for backend and use C++ for problem solving. Python appeals to me because I’m interested in AI.

With six months to prepare, which approach would you take? How would you split your time between building a backend project and practicing data structures and algorithms?

Edit: Thanks to everyone who took the time to reply. I really appreciate all the advice


r/learnprogramming • • 2d ago

I don't know anything still.

3 Upvotes

I've been trying to learn programming, and I do open my IDE, and write up simple rpg mini-games and such, but I still don't know anything in programming, I literally don't know how to learn programming, or If I'm meant to learn it, I'm still stuck on level 0, and I'm not progressing at all, I feel stressed out because I have to land a job in IT, but it feels like a far-fetched dream, ATM I'm learning web-development using JS/CSS, I love the language, I'm enjoying my time building simple stuff, but everything feels too complex, and I'm not at good at coding as I am into other skills like art/drawing, and I'm not advancing at all.


r/learnprogramming • • 3d ago

Topic How to Develop interest in programming

24 Upvotes

Hello i am a bscs student 1st semester. I want to know how do i develop interest for programming cause all i do is play video games only i can't get out of this situation. When i was young i had a deep passion for learning rubiks cube so i used to spent day and night learning and solving it and i learnt it. How do i develop that kind of passion and obssession with this programming??

Thank you for your answer.


r/learnprogramming • • 2d ago

R advice

5 Upvotes

I’m newish to coding and learning latex and R for a project, how can I neatly display different graphs or information in a report-like style? I have my dataset I just don’t know what to do with it lol. I’m using R studio.
Anything that helped you learn or develop skills please recommend to me, I will appreciate it a lot.


r/learnprogramming • • 2d ago

Almost finished with Colt steele Web Dev course, what should I do next?

8 Upvotes

Just wanted to ask those who have finished colt steel web dev course or even any course/bootcamp in general on web development, what should be my next steps?


r/learnprogramming • • 3d ago

I think I'm fucked.

108 Upvotes

I'm a college student working toward an associate's degree in computer programming. I've had to take 2 semesters off for mental health breaks along the way, so completing my degree has taken longer than I originally expected. However, I think I've reached a point where I need to be honest about where I stand on my actual programming skills.

Due to my mental health and personal circumstances, I've relied heavily on AI throughout my coursework. I'd estimate that AI has done around 90% of the work for me, and some of my courses have even encouraged its use and are teaching us how to use ai agents. I do understand certain fundamentals, but the reality is that I haven't developed any independent projects or gained much experience actually writing code on my own.

What really brought this to my attention was a recent quiz where my professor asked us to write a function that returns a list of sorted numbers. I couldn't do it. I ended up having to leave the quiz and essentially relearn functions because I realized that, despite having encountered them in previous courses, I had never properly learned how to use them independently. Even when assignments required me to work with certain concepts, I was just throwing my assignment into the Ai and having it complete it for me.

There's just so much information to absorb, especially when we're being introduced to multiple programming languages every semester, databases, flasks, threads, etc. I feel like I'm constantly jumping between languages, concepts, frameworks, and tools without ever having enough time to properly internalize any of them. On top of that, relying on AI has made it difficult to distinguish between what I genuinely understand and what I've simply been able to get working with its help.

I've read a lot of discussions suggesting that writing code from scratch isn't as important as it used to be, and I can understand that AI is becoming an increasingly important part of software development. I do feel like I understand some of the fundamentals, but I honestly don't know where to go from here. I don't know what projects I should be building, how to structure my learning, or how to get out of what feels like an endless cycle of tutorials without actually developing practical skills. And the frustrating part is that I'm in college. I'm supposed to be graduating next year, yet I feel like I'm still at the beginning.

I'm also increasingly concerned about the job market. I've been seeing so much pessimistic discussion about companies hiring fewer junior developers and entry-level programmers because AI tools and agents can now handle an increasing amount of the work. It's difficult not to feel discouraged when I'm already questioning whether I have the skills to enter the industry in the first place.

When I initially enrolled in this degree in 2024, I remember seeing discussions about AI and how it wasn't expected to become nearly as capable as it is today, and I felt safe enough to go forth with pursuing this degree. Obviously, things have changed considerably in just 2 years. Maybe I'm consuming too much doomer content, or perhaps I'm looking at the wrong sources, but I genuinely don't know what to make of the current state of the industry.

At this point, I feel lost. I want to become a competent programmer and build my own projects and actually have the skills to get a job in the future. But I'm struggling to figure out how to get there, especially when I feel like I've spent so much of my time learning, getting assignments completed without developing the actual skills those assignments were supposed to teach me. I know the go to advice will be to just stop using AI and get to learning and making projects, but it's so hard, and it's everywhere, including in my courses.


r/learnprogramming • • 2d ago

Has anyone here actually started from zero and made money from programming within 6 months?

0 Upvotes

Hey everyone,

I'm 26 and recently started learning Python through Harvard's CS50 course. I'm going through a difficult financial period and trying to build a better future.

I'm willing to dedicate around 3 hours a day to learning, but I'm curious about real experiences rather than motivational advice.

Has anyone here started programming from scratch and managed to earn their first money within 3–6 months?

If so, what did you learn, what was your first paid project, and how did you find your first client or job?

I'm also curious whether AI tools made that journey easier, or whether the current market has made it harder for beginners.

I'm not expecting to become a professional developer in six months. I just want to know what's realistically possible.

I'd really appreciate hearing your stories. Thanks!


r/learnprogramming • • 2d ago

Advice Software Engineer Role Requirments

0 Upvotes

Finishing my associate in computer systems i have an interest in database and game development so
Im looking towards those industries but i have no clue on how to sell myself in a way my resume list languages i know and learned through college with some projects that i have worked on both in school and at home and i have not heard back and the jobs that im looking to apply seems way out of my league

So im looking for advice on what i can do to really achieve getting my foot in the door

To add im also continuing my education for bachelors with either a pathway in software engineering and or database administration


r/learnprogramming • • 3d ago

hi, i started learning cpp by myself since about 2 weeks ago, and i wrote my first useful simple program. the thing is that cause i learn by myself i don't know where my level is, so i wrote this program as a hope someone can judge me based on the simple first program i wrote.

21 Upvotes
/*
i learned file reading and writing
data types like int, strings
data saving, declaration, initializing, and defining
arrays and vectors
integrating vectors and file reading and writing
enums and the enum class
functions
calling functions and etc

so basically, this simple program asks you to write a password and a username and points you want to save
then it will save them in a text file called "users"
then it will ask you to write the pasword and username
then it will dispaly a comment depending on your points count
and if you run the program again and wrote a new saved password and username, then used the old passwerd and username, it will judge you based on that

and thanks!!
*/

#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
#include <vector>
struct user {
std::string username;
std::string password;
int points;
};

enum class Ranking {
Trash,
Intermediate,
Advanced,
Legendary,
Mr_VIP
};

Ranking getrank(int points)
{
if (points < 250) return Ranking::Trash;
if (points < 500) return Ranking::Intermediate;
if (points < 750) return Ranking::Advanced;
if (points < 1000) return Ranking::Legendary;
return Ranking::Mr_VIP;
}

void addUser(std::string username, std::string password, int points)
{
std::ofstream file("users.txt", std::ios::app);
file << username << " ";
file << password  << " ";
file << points << " " << "\n";
}

std::vector<user> loadUsers()
{
std::vector<user> users;
std::ifstream file("users.txt");
user u;
while (file >> u.username >> u.password >> u.points)
{
users.push_back(u);
}
return users;
}

int main()
{
std::string savedUser;
std::string savedPass;
int savedPoints;

std::cout << "Enter the username you wanna save: ";
std::cin >> savedUser;
std::cout << "\n";

std::cout << "Enter the password you wanna save: ";
std::cin >> savedPass;
std::cout << "\n";

std::cout << "Enter the points you wanna save: ";
std::cin >> savedPoints;
std::cout << "\n";
if (std::cin.fail() || savedPoints < 0)
{
std::cout << "Error!!!\n";
return 0;
}

user u;
u.username = savedUser;
u.password = savedPass;
u.points = savedPoints;

system("cls");

addUser(savedUser, savedPass, savedPoints);

std::vector<user> users = loadUsers();

for (int attempt = 0; attempt < 3; attempt++)
{
std::string iusername;
std::string ipassword;
std::cout << "Enter your username: ";
std::cin >> iusername;
std::cout << "\n";
std::cout << "Enter your password: ";
std::cin >> ipassword;
std::cout << "\n";

bool found = false;
int foundPoints = 0;

for (const user& u : users)
{
if (u.username == iusername && u.password == ipassword)
{
found = true;
foundPoints = u.points;
break;
}
}

if (found)
{
std::cout << "logged in successfully!\n\n";

Ranking rank = getrank(foundPoints);

switch (rank)
{
case Ranking::Trash:
std::cout << "You are trash\n";
break;
case Ranking::Intermediate:
std::cout << "You are intermediate\n";
break;
case Ranking::Advanced:
std::cout << "You are advanced\n";
break;
case Ranking::Legendary:
std::cout << "You are legendary\n";
break;
case Ranking::Mr_VIP:
std::cout << "You are Mr. VIP\n";
break;
}
return 0;
}
else
{
std::cout << "wrong password or username, try again\n\n";
}
}

std::cout << "too many failed attempts!!!\n";
return 0;
}

r/learnprogramming • • 3d ago

Debugging Advice on how to approach projects

6 Upvotes

i actually want to completely hand code a complete internship app.

I mean everything by hand , I will only use AI for research and stuff like that ,

I want to do it in python , use PostgreSQL for the database and use the SQLAlchemy library to convert the python variables and classes into database queries,

For the frontend , I would like to use javascript, css and html ,

So , i humbly ask for guidance tips and how i should approach it , I have coded with python , made a few mini programs that i use for basic stuff such as cgpa calculation , solved a few leetcode problems,

I have learned Object orientated programming as well but I have never taken on such a huge project so anyone sort of tips or advice or what problems I might face or what I should learn throughly before i jump into this will be appreciated

Thank you .


r/learnprogramming • • 3d ago

I need help understanding a particular case of an improved for loop using an array as a parameter. (Java)

5 Upvotes

I am learning Java using Deitel's book. This particular for loop uses and array as a parâmeter but I can't understand exactly how it's supposed to work.

int lowGrade = grades[0][0];

for (int[] studentGrades : grades)
{
    for (int grade : studentGrades)
    {
        if (grade < lowGrade)
            lowGrade = grade;
    }
}

For all I understood, the improved for loop works the same as this other example here:

int total;

for (int counter = 0; counter < array.lenght; counter++)
{
    total += array[counter];
} 

But I don't understand how the first one could work in a similar way with an array as a parameter since in the example in the book, the array grades is a bidimentional array. What is that first for loop doing to the int[ ] studentGrades?

The books says something like: " The external improved for loop iterates through the bidimentional array grades assingning new lines to the parameter studentGrades.". How does that even work?


r/learnprogramming • • 3d ago

Solved Super simple question from a beginner beginner

4 Upvotes

I am following the coding tasks from an old post from here:
https://www.reddit.com/r/learnprogramming/comments/9c380n/heres_a_list_of_coding_exercises_to_help_get_you/?sort=new

and am at the 3rd and 4th Step. I assume I understood what is asked of me but my solution feels a bit too simple? And I am thinking I just found a solution but not necessarily for the question asked. Could someone double check if my code actually does what the task asks of me?

3.
Create a class called "Car" that has 1 variable called "licensePlate". Within the class, create a default constructor that sets "licensePlate" to 'Unknown' and a method/function called "getLicensePlate" that returns the variable "licensePlate".

Code:
class car:

license_plate = "Unknown"

p1=car()

def getlicense_plate():

print(p1.license_plate)

getlicense_plate()

4. Add a second Car constructor to our class that takes 1 input of type String. This is the license plate number. Assign the value of the inputLicensePlate to our variable licensePlate.

Code:
class car:

license_plate = input()

p1=car()

def getlicense_plate():

print(p1.license_plate)

getlicense_plate()


r/learnprogramming • • 4d ago

Topic Am I wrong for not feeling okay with completely surrendering to the AI agents?

118 Upvotes

Maybe this is mine OCD personality, but I just can't develop something if I don't completely understand the code. This makes my work significantly slower, compared to the pace where I would delegate everything to AI and just brute force towards some end goal.


r/learnprogramming • • 3d ago

Failed 4 programming exams in a row – I don't know what I'm doing wrong anymore

30 Upvotes

I started out studying electrical engineering and failed the programming exam there 3 times, even though it was just multiple choice. I switched to an easier university program, thinking it would be different, and I just failed again. This time it was a Python exam on the absolute basics: loops, strings, slicing, lists and simple functions. I got 33%.

The frustrating part is that I didn't just ignore it. I did all the weekly exercise sets, and before the exam I studied with practice quizzes and tracing exercises. When I go through it with explanations, I understand it. But on the actual exam it just doesn't come together.

So now I genuinely don't know what the problem is.

Am I studying the wrong way?

Do I just not know how to learn this kind of thing?

Or am I simply not cut out for programming?

If anyone has been in a similar spot and figured it out, I'd really like to hear what changed for you. How did you actually practice? What made it "click"?

Thanks for reading.


r/learnprogramming • • 3d ago

I want to build a tool to transfer liked songs between YouTube Music accounts but I have no idea how to start ?

5 Upvotes

so i have this annoying problem where all my youtube music liked songs are also showing up in my main youtube liked videos playlist and it's getting pretty messy.

i want to move all my liked songs to a separate google account but doing that manually would take forever since i have thousands of songs. i was wondering if there's any tool that can transfer all my liked songs from one youtube music account to another. something where i can connect both accounts and just transfer everything at once. or maybe select specific songs and playlists to transfer. it'd also be nice to have an option to remove songs from the original account after transferring them.

i couldn't really find anything that does exactly this so i'm thinking of trying to make one myself. if anyone knows something similar please let me know.

i'd also like to add spotify support at some point so people can transfer liked songs between spotify accounts too but that's something for later. for now i just want to figure out the youtube music part.

basically i want the tool to fetch all my liked songs and let me transfer my entire library to another account or select specific songs and playlists. and also remove songs from my liked songs because that's actually the main reason i want to make this. i do have some coding experience but i'm still a beginner so i'm not really sure where to start with something like this and also i know APIs and hosting can cost money but is there a way to make something like this completely free? like can i build and run the whole thing without spending anything? what libraries or technologies should i look into?

i mainly want to build this as a learning project. if i manage to get it working i'll probably put it on github so other people can use it too. just need some guidance on where to start and what approach would make sense.

not looking for anyone to build it for me. just trying to figure out how to get started. any help would be appreciated.


r/learnprogramming • • 2d ago

Topic Refuse to use Ai yet want a career with actual programming.

0 Upvotes

To put it lightly, this is not a conversation that can be solved with "oh you can still learn, you have to coach the ai". To which I say, THAT IS NOT THE REASON I AM WORKING FOR A CAREER IN THIS. If i wanted to correct something's homework for a living, then I would have become a kindergarten teacher.

I refuse to work with ai, saying that ai is a tool for you, is really dismissive towards the people that love the process of coding. I'm talking about the actuall passion within itself. The idea of manual coding. Not it's efficiency, time, etc. If there is no more manual coding in this space, then the career I wanted, is dead and gone.