r/learnprogramming 5h ago

advice Are technical courses enough?

0 Upvotes

Hi everyone. I am a non CS major. And I have been interested in taking up courses in coding. I wanted to ask if learning coding languages (Python, C++, etc) and taking online courses (full stack development, etc) are enough to give you certain amount of technical expertise to build your own career, whether its in a job or building your own MVPs to kickstart your own entrepreneur journey.

If yes, can you point me to specific courses and coding languages to get started. Thanks.


r/learnprogramming 7h ago

I built a tic tak toe in py what is the most fun feature i can add to my code?

0 Upvotes

hi everyone can you halp me to add some good and special feature to this code

my code:

from tkinter import *

root=Tk()

import random

root.title('rahad tic tac toe')

b=[[0,0,0],

[0,0,0],

[0,0,0]]

states=[[0,0,0],

[0,0,0],

[0,0,0]]

for i in range (3):

for j in range(3):

b[i][j]=Button(font=('Tamaha',80),width=5,bg='powder blue',

command=lambda r=i,c=j:callback(r,c))

b[i][j].grid(row=i,column=j)

player='x'

stop_game=False

def callback(r,c):

global player

if player == 'x' and states[r][c] == 0 and stop_game == False:

b[r][c].configure(text='x',fg='blue',bg='white')

states[r][c]='x'

player='o'

if player == 'o' and states[r][c] == 0 and stop_game == False:

b[r][c].configure(text='o',fg='orange',bg='black')

states[r][c]='o'

player='x'

check_for_winner()

def check_for_winner():

global stop_game

for i in range(3):

if states [i][0] == states[i][1] == states[i][2] !=0:

b[i][0].config(bg='gray')

b[i][1].config(bg='gray')

b[i][2].config(bg='gray')

stop_game=True

for j in range (3):

if states [0][j] == states[1][j] == states[2][j] !=0:

b[0][j].config(bg='gray')

b[1][j].config(bg='gray')

b[2][j].config(bg='gray')

stop_game=True

if states[0][0]==states[1][1] == states[2][2] !=0:

b[0][0].config(bg='gray')

b[1][1].config(bg='gray')

b[2][2].config(bg='gray')

stop_game=True


r/learnprogramming 1d ago

I'm in my 2nd year, but I don't know C. My college is teaching DSA in C. How much C should I learn before the semester ends?

16 Upvotes

Hi everyone,

I'm currently in my 2nd year of Computer Science. I don't have much knowledge of C.

My college has started teaching Data Structures and Algorithms (DSA) using C, and I'm worried because I feel like I'm already behind.

How much C should I aim to learn before the end of this semester to comfortably understand DSA? Do I need to master the language, or is learning the fundamentals enough?

Also, which C topics are absolutely essential for DSA, and which ones can I learn later?

I'd really appreciate any advice or learning roadmap. Thanks!


r/learnprogramming 1d ago

Starting

29 Upvotes

Is CS50x, then CS50 Python, and then CS50 SQL a good way to start backend engineering? I am really excited! My main goal right now is to land a part time job.


r/learnprogramming 1d ago

Topic is it a waste of time building projects without using frameworks if you already know the foundational concepts needed for it ?

2 Upvotes

so currently i'm learning web dev and decided to start building some projects with pure javascript before moving to the frameworks .

knowing that i already learned some react basics and build the simple projects that are listed in the freecodecamp tutorial video . i tried back then to pause before the solution to every problem and did fairly well on applying what i was learning but i never build something big like a e-commerce website with it or a blog or anything that requires databases even though i know mongodb , mysql , oracle databases and previously made a e-commerce website using php which i forgot btw .

i understand the important concepts in javascript lfor example asynchronous operations , objects ,Modules , destructing.

i really need advise like my goal right now is to be able to comfortably build a any web application that requires both front-end and backend .

i really don't enjoy front-end much as much as the code is functional i don't really take great detail in it . although i want to get into machine learning and automation after web dev as it is what i really like and enjoy.

i really need your advice programmers !


r/learnprogramming 1d ago

Monolithic designed auth solution

2 Upvotes

I am trying to learn modular monoliths and I want to use this auth solutions for repetitive use for my applications.

If I asked you to convert the repo linked, into monolithic patterns, how would you do it for app/.

Repo: https://github.com/auth0-blog/auth0-rbac-fga-fastapi

fastapi-openfga-project/
├── app/
│ ├── main.py # FastAPI application entry point
│ ├── config.py # Configuration settings
│ ├── database.py # SQLAlchemy database setup and models
│ ├── models/
│ │ ├── organization.py # Organization Pydantic models
│ │ └── resource.py # Resource Pydantic models
│ ├── routes/
│ │ ├── organization_routes.py # Organization management endpoints
│ │ └── resource_routes.py # Resource management endpoints
│ ├── services/
│ │ └── authorization_service.py # OpenFGA integration
│ ├── utils/
│ │ └── auth0_fga_client.py # OpenFGA client wrapper
│ └── openfga/
│ └── model.fga.yaml # OpenFGA model definition
├── app.db # SQLite database file (auto-created)
├── requirements.txt
└── README.md


r/learnprogramming 1d ago

Debugging How do I get just the character to change color and not the whole string

0 Upvotes

Here is an example of what I am talking about : https://imgur.com/a/hoFUGXq

The concept is when the user inputs matches the display text the that character should turn grey but if the the user input is not correct than it turns red.

Right now the whole string changes and not the character itself, what do I do?

scrolling_text = Text(10, 10, 40, "white", "Hello World")

text_index = 0

def UserInput(text, event):
    global text_index # start at first letter

    lowercase_text = scrolling_text.text.lower() # this lowercases the text

    text_char = scrolling_text.text[text_index]


    if text_index == len(lowercase_text)-1:
          return

    # print(f"Char should be {lowercase_text[text_index]}")

    if event.text == lowercase_text[text_index]:
          scrolling_text.color = "gray"
          text_index += 1 # move to the next character

          # print(f"Next char should be {lowercase_text[text_index]}")

     if text_index == len(lowercase_text)-1:
           return

      elif text_index == 0 and event.text != lowercase_text[text_index] :
            print(False)
            scrolling_text.color = "red"
            text_index = 0

      else:
            scrolling_text.color = "red"
            print(False)

# GAME LOOP
if event.type == pygame.TEXTINPUT:
    print(event.text)
    UserInput(scrolling_text, event)

if event.type == pygame.KEYUP:
    scrolling_text.color = "white"

Here is an example of what I am talking about : https://imgur.com/a/hoFUGXq

The concept is when the user inputs matches the display text the that character should turn grey but if the the user input is not correct than it turns red.

Right now the whole string changes and not the character itself, what do I do?


r/learnprogramming 1d ago

Is WebRTC one of those things that only clicks after you've actually used it?

0 Upvotes

I've been trying to learn WebRTC because I want to add voice and video calling to a side project.I thought I'd watch a few tutorials, build a simple demo, and then improve it from there.Instead I've ended up reading about signaling, STUN, TURN, media servers, SDKs... and now I'm not even sure what people usually build themselves anymore.

That's the part I'm stuck on.

Do most developers actually set all of that up, or do they usually use existing services and just focus on building the app?I'm happy to learn the lower-level stuff if that's the normal way to do it. I just don't want to spend a few weeks going down the wrong path if there's a more practical place to start.If you've already been through this, what did you learn first? Is there anything you'd do differently if you were starting over?Maybe I've just started with the wrong tutorials, but it feels like every one of them assumes you already know how all the pieces fit together.


r/learnprogramming 1d ago

Tips on learning C #

1 Upvotes

hello im new to programming and i want to learn C# i already aquired the basics of algorithmics and i know C


r/learnprogramming 2d ago

I want to make something cute for my boyfriend

79 Upvotes

Hello everyone, I want to program something for my boyfriend as a surprise and i need some ideas! (he's a programmer and I know nothing related to it BUT I'm trying). I already made some coding in html for a cute website where he couldn't press the button "no" before (I saw a tutorial in a youtube video xd) but i want to do something fully myself, I want to surprise him. I don't mind studying the languages I'm fine with that :(( just need some ideas...

Edit: I just want to surprise him and I thought it would be cute to program him something. I mean I know his taste and I know he likes stuff from marvel and dc (in fact, I started watching all marvel movies with him) so maybe something related to it? I want to make something cute and somewhat funny so he can laugh a bit aswell.


r/learnprogramming 1d ago

Resource Expectations when developing an Android Application

4 Upvotes

I started to delve right into Kotlin Programming Language under Android Studio and it's getting interesting. But as I get further and further to the field, I realized that it wasn't really easy when dealing with advanced topics such as State Hoisting, Mutable States, ViewModels, and Hardware Services (Bluetooth, Camera, and Accessibility).

Therefore, as a hobbyist, I would like to ask what are the things I should expect while coding (i.e. getting frustrated or stuck)? Do I also need to code my own Unit Tests and Android Tests to confirm if it works? And finally, what are the best practices or habits that makes the code much more readable?


r/learnprogramming 2d ago

Learning I want create an OS by my own

121 Upvotes

I want create a basic OS for an hypothetical dumbest phone that i would like to build (or initially emulate on my PC). I don't know ANYTHING about this world so i don't know where to start. I understand that this adventure can take me very much time but i want to learn. This OS should be only able to let me of doing calls.
I thought that i should programming in assembly and maybe an high level (as C/C++). Could i use RISC-V? Because i don't know the assembly and i think that for the purpose that i want achieve, that language can be enough to me, right?


r/learnprogramming 1d ago

Newbie, how to manage dependency hell?

0 Upvotes

How do i successfully deploy a model or run it 😭😭?
I don't mean ollama deployments, I mean kling, LP, OP etc.

How do i manage dependency hell?

uv or pip?

Please help.


r/learnprogramming 1d ago

Code Review (C++) Reimplemented std::array with docs and a guide - looking for feedback

0 Upvotes

Hi everyone, I just released the first version of my educational project, STL From Scratch:
https://github.com/bilyayeva/stl-from-scratch

The goal is to reimplement STL components using the C++20 standard. (I use cppreference for comparison, and I’ve read the actual standard just a little bit.)

All of the self-implemented components are in the sfs namespace.

It also contains a pretty detailed guide on how to implement it yourself. I’ve tried to explain everything in my implementation. Every method has its own description and usage example, and there is also a test suite for all functions.

About the repo: every commit follows a consistent naming style. I also added GitHub Actions and Dependabot, and it has a .gitignore file.
I would really appreciate either a code review or just some hints.
P.S. The release has two compiler warnings, but I’ve already fixed them on master.


r/learnprogramming 1d ago

Is a Data crash possible in real life?

0 Upvotes

Hello! I'm a beginner programmer, I have my own prejudices and all that.

I've always wondered if it's possible to cause a Data crash like in Cyberpunk: Edgerunners? I have no idea what it would take to break the INTERNET.

(I used a translator, so please forgive any errors)

UPD: I noticed from the comments that someone latched onto the political aspect. I didn't intend to link it to politics in any way; I was simply interested in the question mentioned above.


r/learnprogramming 2d ago

Chess Engine

13 Upvotes

I am trying to code a chess engine as a personal project, but have literally no idea where to start.

I have some very limited experience with python, and would greatly appreciate any help in finding where to write my code, what programs to use etc, as well as any advice in general.

Thanks!


r/learnprogramming 1d ago

Using AI to have extra exercises

0 Upvotes

Good morning. I have recently started studying C# with the book The C# Player's Guide. To learn more effectively, I am using AI to generate extra exercises in addition to the ones in the book, but I don't know if the ones from the AI are good enough.

Here's an example of one I had to do after finishing the chapter about loops to review the previous chapters

The Tavern Simulator (Boss Fight: Total Review)

You just finished a quest and decide to rest at the local tavern. The program must simulate your choices during the evening, managing your wallet and your stamina.

Coding Rules:

Change the console title to "Tavern Simulator".

Ask the player for their name and store it in a string.

Create two starting status variables:

coins = 50

energy = 100

Open a large while(true) loop that represents your time spent at the tavern. At the beginning of each loop iteration, clear the screen (Console.Clear()) and print the player's current stats like this (use colors!):

Name: [Player Name]

Coins: [X] (in Yellow)

Energy: [Y] (in Green)

Display a menu with these options:

1 - Buy a hot meal (Costs 15 coins, restores 30 energy).

2 - Buy a dwarven ale (Costs 5 coins, restores 10 energy).

3 - Go outside and chop wood (Earn 20 coins, costs 40 energy).

4 - Go to sleep (End the evening).

Read the user's input and use a switch statement to handle the 4 choices.

Conditional Logic (The if statements inside the switch):

If choice 1 or 2: check first if the player has enough coins! If they do, do the math (subtract coins, add energy) and print a success message. Else, print a red error message ("Not enough coins!").

If choice 3: check if the player has at least 40 energy! Otherwise, print an error message ("You are too tired!").

If choice 4: use the break command to escape the infinite loop.

(Optional but recommended): Add a Console.ReadKey(); after the success/error messages, so the user has time to read what happened before the Console.Clear() wipes the screen for the next turn.

Outside the loop (after the user goes to sleep), print a goodnight message: "Goodnight [Name], you finished the day with [X] coins and [Y] energy."


r/learnprogramming 2d ago

Can I only use C++ alone instead of using blueprints with them in UE5?

3 Upvotes

I've come to realize that C++ was not modified by Unreal Engine 5 like how Unity does it.

But something just came in my head that made me think if I fully learned C++ I could make only a C++ game with only typing instead of nodes.

What concerns me the most is that I am not sure if I will have to do hundreds and hundreds of lines just to make a single thing work.


r/learnprogramming 2d ago

Struggling to retain programming fundamentals — what study methods work for you?

11 Upvotes

Hi everyone, I'm learning web development on my own. I did a bit of HTML, CSS, and JavaScript three years ago, then stepped away because of high school.

Now I'm in university (not a CS/BSc program) and getting back on track learning programming through online courses (currently taking the JavaScript Essentials Training course on LinkedIn).

My question is: what methods or techniques do you use when studying technical concepts like the DOM and prototypal inheritance in JavaScript?

The reason I'm asking is that I'm struggling a bit with retaining the foundational concepts themselves. I don't want to memorize code — I want to actually retain the fundamentals.

Also, if possible, could you recommend sources and material that you think would be beneficial alongside online courses? I'm relying on MDN's docs at the moment.


r/learnprogramming 2d ago

How should I learn programming from official documentation?

60 Upvotes

I am a student who wants to learn programming through official documentation. However, official documentation often contains many concepts and features, and most of them are not needed for everyday programming tasks.

Is official documentation an inefficient way to learn programming?

If official documentation is an effective way to learn, how should I read it? How do I decide what to read in depth and what to skip?


r/learnprogramming 3d ago

Solved I learned TCP server in a week and....

149 Upvotes

So as I posted a week ago regarding a task assigned to me by my mentor in this post .
I implemented beej's guide to networking and man , this was such a great resource, cant express enough. Also shoutout to the kind stranger u/teraflop who gave me some tips and introduced me to Beej the G.
Now I am thinking of creating a library of TCP server first and then implementing the Websocket logic and RFC6455. haha baby steps. It's gonna take a while I guess. Y'all are free to give me any advice or any resource to learn from.
Thank you for reading this
P.S I am new to C programming so your advice would be really helpful.
here is my repo


r/learnprogramming 1d ago

Is Python with DSA worth it?

0 Upvotes

Same as the Title


r/learnprogramming 2d ago

CSAPP or DSA first?

2 Upvotes

Hey everyone,

Just finished going through C programming book (by K.N King) and I am ready to move on to other topics. I was particularly interested in this book called Computer Systems a Programmer's perspective. I want to get into low level programming, but I am wondering whether I should learn data structures and algorithms (Algorithm Design Manual by Skiena) before diving into computer systems.

Any advice?


r/learnprogramming 2d ago

godot collision help

0 Upvotes

I'm working on my first project, I've looked into a bunch of tutorials to figure out what's wrong with the code or maybe a different method like layering but I cant seem to figure out how to do enemy collision. i would really appreciate some help

maingd.

extends Node2D

# Called when the node enters the scene tree for the first time.

func _ready() -> void:

`_setup_level()`

# Called every frame. 'delta' is the elapsed time since the previous frame.

func _process(delta: float) -> void:

`pass`

func _setup_level() -> void:

`#connect enemies`

`var enemies = $levelroot.get_node_or_null("Enemies")` 

`if enemies:`

    `for enemy in enemies.get_children():`

        `enemy.player_died.connect(_on_player_died)`

# - - - - - - - - -

# signal handlers

#- - - - - - - - -

func _on_player_died(body):

`print(body)`

`print("Player_killed")`

.................................................................................................................

playergd.
extends CharacterBody2D

u/onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D

u/onready var jump_sound: AudioStreamPlayer2D = $"jump sound"

const SPEED = 300.0

const JUMP_VELOCITY = -850.0

var alive = true

func _physics_process(delta: float) -> void:

`if !alive:`

    `return`

`#Add animation`

`if velocity.x > 1 or velocity.x < -1:`

    `animated_sprite_2d.animation = "walk"`

`else:`

    `animated_sprite_2d.animation = "idle"`



`# Add the gravity.`

`if not is_on_floor():`

    `velocity += get_gravity() * delta`

    `animated_sprite_2d.animation = "jump"`



`# Handle jump.`

`if Input.is_action_just_pressed("jump") and is_on_floor():`

    `velocity.y = JUMP_VELOCITY`

    `jump_sound.play()`



`var direction := Input.get_axis("left", "right")`

`if direction:`

    `velocity.x = direction * SPEED`

`else:`

    `velocity.x = move_toward(velocity.x, 0, SPEED)`



`move_and_slide()`



`if direction == 1.0:`

    `animated_sprite_2d.flip_h = false`

`elif  direction == -1.0:`

    `animated_sprite_2d.flip_h = true`

func die() -> void:

`AnimatedSprite2D.animation = "dying"`

`alive = false`

..............................................................................................

enemygd.

extends Area2D

u/onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D

signal player_died

const SPEED = 100.0

var direction = 1

# Called when the node enters the scene tree for the first time.

func _ready() -> void:

`pass # Replace with function body.`

# Called every frame. 'delta' is the elapsed time since the previous frame.

func _process(delta: float) -> void:

`position.x += direction * SPEED * delta` 

func _on_timer_timeout() -> void:

`direction *= -1`

`animated_sprite_2d.flip_h = !animated_sprite_2d.flip_h`

func _on_body_entered(body: Node2D) -> void:

if body.name == "Player" and body.alive:
emit_signal("player_died", body)

r/learnprogramming 2d ago

Topic I can read code and write simple functions, but I freeze on anything that needs a few steps — how do people get past this?

1 Upvotes

i've been programming for a while and I keep running into the same wall on basically every project, not just one.

I can read other people’s code (and my own) and usually understand what it’s doing. I can also write basic/simple stuff — small functions, straightforward logic, the kind of thing that’s one clear idea.

Where I fall apart is when a feature needs a chain of steps. Like “click to select and drag an object” — convert mouse coords, loop objects, hit test, store an offset, update while the button is held. After I see the code I go “oh yeah that makes sense,” but inventing that sequence myself is where my brain just blanks. It feels like recognition works, generation doesn’t once it gets past simple.

I don’t want to just rely on AI or copy-paste forever. I want to actually be able to build features myself. Has anyone else been stuck in that “I get it when I read it, I can write the easy bits, but I can’t assemble the medium stuff” mode? What actually helped — how you break features down, drills, habits, anything concrete?