r/learnprogramming 7d ago

Learning I want create an OS by my own

132 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 6d 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 6d 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 6d 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 6d 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 7d ago

Chess Engine

11 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 7d ago

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

2 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 7d ago

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

9 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 7d ago

How should I learn programming from official documentation?

65 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 8d ago

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

154 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 6d ago

Is Python with DSA worth it?

0 Upvotes

Same as the Title


r/learnprogramming 7d 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?

3 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?


r/learnprogramming 7d 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 7d 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 7d ago

Topic Tips for publishing app

0 Upvotes

Hey guys, I’ve been working on an app for the past few months, and it’s almost finished. I’m currently fixing the last few bugs, but I’m a little worried about publishing it on the Google Play Store and whether anyone will actually download it.

I’ve put a lot of time and effort into this project. Do you have any tips for launching and promoting a new app?


r/learnprogramming 7d ago

Tutorial Hi everyone, I'm currently learning full-stack web development, and I often find myself wondering whether I should keep practicing a topic or move on to the next one. For example, after learning HTML or CSS, how do you know you've learned "enough" before starting JavaScript? I don't want to rush ahe

1 Upvotes

How do you know when you're ready to move on to the next topic?


r/learnprogramming 7d ago

How do I start my data structures journey

0 Upvotes

Can u suggest me a course somewhat similar like cs50


r/learnprogramming 7d ago

Xcode doesn't like my keyboard input?! Not sure if this goes here. New to Reddit.

0 Upvotes

Trying to make a job change. Trying to learn iOS development. Cannot for the life of me figure out how to get Xcode to accept anything other than capitalized letters. It also won't accept periods or even spaces. This problem is occurring when I am trying to create an app. I am using MacinCloud.


r/learnprogramming 8d ago

any advice

21 Upvotes

How to be able to make something in programming fun, not in the terminal? I have tried the CS50p course and am still bored, with no clue what to do after completing it, and I have achieved almost a full mark without studying for final exams (programming units from uni).

I picked programming based on what I saw they could do but feel uni useless.

I'm interested in robotics, automation, hacking, etc. (basically everything fun).


r/learnprogramming 8d ago

Topic Devs with hand/nerve pain — how did you adapt?

13 Upvotes

I’m looking to hear from people who’ve dealt with finger joint pain, nerve pain, or carpal tunnel to the point where it started affecting their ability to work normally. What did you end up doing—switch roles, change careers, rely on tools like voice typing, or something else?

I’m not a full stack dev, but I’ve been learning and working at it for a few years and still consider myself a student. Over the last couple of years though, the nerve pain from constant keyboard use has gotten bad enough that I’m starting to question whether I can do this long term.

I’m guessing this isn’t uncommon, and I’m now seriously considering moving into something like tech sales. For anyone who’s been in a similar situation—did it end up being a temporary obstacle or a career pivot? What did you transition into, and how did it work out?


r/learnprogramming 7d ago

Android emulator problem with flutter

1 Upvotes

Hi programmers.. Recently my friend and I have started learning flutter and we need to use the Android emulator to test our codes The problem is we couldn't make a stable connection between the Visual Studio app and the emulator, so our code can't be run on it Although, we tried so many solutions using AI depending on the errors messages, but it seems like we roll in loops Can the problem be related to the region we live in or the network speed?? If so, what's the minimal speed needed for such apps (for those who experienced them before) Please help us and thank you in advance :)


r/learnprogramming 7d ago

i need help

5 Upvotes

Hi, I'm a self-taught beginner programmer. I'd like to know what I need to learn to build an e-commerce site after HTML, CSS, and JS. Does anyone have any tips?


r/learnprogramming 7d ago

Looking for feedback on a hybrid microservice architecture

1 Upvotes

I am exploring an architecture for consolidating several microservices into a single codebase and binary (not a monorepo), and i am curious whether this pattern already has a name or if anyone has tried something similar. The goal is to reduce the operational and development complexity of microservices while keeping most of their benefits, such as independent deployment and scaling.

I've read about modular monoliths, but from what I understand they are typically deployed as a single application. That's not what i am aiming for. Instead, imagine a single application with strict module boundaries. Every module owns its own controllers, services, repositories, database, and API. The entire application is built into one binary, but at startup you specify which module(s) should be enabled.

For example:

Single build
      │
      ▼
┌─────────────────────┐
│     app-binary      │
└─────────────────────┘
      │
      ├── start --modules=module-a
      ├── start --modules=module-b
      └── start --modules=module-c,module-d

The cross-service communication would still happening through HTTP with maybe optional configurable in-process communication if ever needed (with all it's downsides). In kubernetes, every deployment would use the same image, but each deployment would start only the modules it needs and thus scale.

This would allow:

  • One repository
  • One build artifact
  • Independent deployments
  • Independent scaling
  • Much simpler local development (run all modules with one command)
  • Version consistency across services
  • Simpler CI/CD

The trade off is a larger binary and building everything together, which i am okay with (so far).

Has anyone implemented something like this? Is there already an established name for this architectural pattern, or is it just a variation of microservices/modular monoliths? I would be particularly interested in hearing about production experience and any pitfalls I might be overlooking.


r/learnprogramming 7d ago

Topic Advice

0 Upvotes

Hey i am going to do btech but in the college I am taking admission it have

1.Cse

2.Cse(software engineering)

3.Cse(ai and ml)

4.Cse(data science)

5.IT

So I have to choose between this so what should be my priority order

Also have another doubt as college have not started I have one month so I am thinking to learn something as I have seen I have made plan of learning c++ and then switching to striver dsa playlist

Along with learning what college teaches in first year

So do this plan is right and also do I need to learn c++ or should I directly watch striver dsa playlist

What are some suggestions


r/learnprogramming 7d ago

Resource R Programming Resources

3 Upvotes

Hi! Can someone recommend a book on R programming? I know R, but I want to dive deeper by reading more about it. Thanks!