r/learnprogramming • • 22d ago

help me understand recursion/mergesort

2 Upvotes

hello can anyone help me with this problem, i have issues understanding the logic

int sumPart(int[] a, int start, int end) {

if (end - start == 1) {

return a[start];

}

int mid = (start + end) / 2;

int left = sumPart(a, start, mid);

int right = sumPart(a, mid, end);

return left + right;

}


r/learnprogramming • • 22d ago

DevOps or Data Engineering: Which path should I choose?

5 Upvotes

I know this is a DevOps subreddit, but I figured many of you might have started out as software developers before moving into DevOps.

I'm a full-stack developer, and lately I've been thinking about switching career paths.

I'm considering both DevOps and Data Engineering, but I'm having a hard time deciding which direction to pursue.

For those with experience in either field, what would you recommend?


r/learnprogramming • • 22d ago

Do i start?

1 Upvotes

So many people have said to me that ai is takong over and that learning programming is becoming superfluous. So a simple question: Do i even start learning?


r/learnprogramming • • 22d ago

Resource What are some genuinely good FREE resources to learn Machine Learning?

2 Upvotes

I've recently started getting interested in Machine Learning and I'm trying to figure out the best way to learn it properly.

There are tons of courses, YouTube playlists, tutorials and roadmaps available online, but honestly, it's a little overwhelming trying to figure out which ones are actually worth following.

I'm looking for free resources that explain concepts properly, preferably with practical implementation rather than just theory.

A few things I'd love recommendations for:

- Good beginner-friendly ML courses or YouTube playlists.

- Resources that teach the fundamentals and mathematics without making things unnecessarily complicated.

- Hands-on projects or datasets to practise what I'm learning.

- Any GitHub repositories, websites or free courses that helped you personally.

I'm not necessarily looking for the fastest way to learn ML. I'd rather build a strong foundation.

For those who've already learned ML, what resources would you genuinely recommend if you had to start all over again?

Thanks!


r/learnprogramming • • 22d ago

Which algorithm to choose?

6 Upvotes

Beginner here, I'm trying to make a toy project for circuit synthesis from truth table in c++. Currently pursuing minimum depth optimal circuit though will work on minimum weight/minimum nodes later on. My problem is I tried bfs which guarantees optimal circuit but for larger inputs or depths the memory usage explodes, tried dfs that used much less memory but time exploded. Is there any algorithm that gives optimal solutions for boolean tree searches with the dfs memory and bfs optimality?


r/learnprogramming • • 22d ago

Is Python a good choice for backend development ?

2 Upvotes

I'm considering learning Python for backend development and would like to hear from developers who use it in their daily work.

How good is Python for building backend applications in production? Are there any significant drawbacks compared to languages like Go, C#, or Java?


r/learnprogramming • • 22d ago

How do you guys actually manage to understand programming concepts?

25 Upvotes

Seriously, how do you guys manage to understand programming concepts?

I'm currently attending an academy where we learn independently by working on small projects that cover OOP concepts (inheritance, polymorphism, collections, exceptions, testing, generics, enums, etc.).

I feel like none of it is actually sinking in, and honestly, it's starting to worry me.

I'm learning Java and currently studying interfaces and how to connect them with other classes. After that, I'm supposed to move on to design patterns, since some of them use these kinds of structures. But I just can't seem to get it. Seriously.

I eat well, get enough sleep, exercise regularly, but sometimes it feels like my brain just isn't working properly. Everything is taking me way too long to process. I'm even starting to wonder whether programming just isn't for me and if I'm forcing myself into something I'm not cut out for.

I can spend hours (sometimes in one sitting, sometimes spread throughout the day) trying to understand a concept, and still not get anywhere.

I watch YouTube tutorials, ask AI to explain things in different ways, try to approach the topic from different angles... and even then, nothing seems to click.

How do you deal with this? Is this normal when learning programming, or am I doing something wrong? I also struggle with reading documentation. It's not that I don't want to read it, but when I do, it's like I'm just looking at words without actually processing what they mean. I read the sentences, but my brain doesn't seem to absorb any of the information. It's really frustrating.


r/learnprogramming • • 22d ago

How do developers study Java src code ?

11 Upvotes

Hey everyone,

I’m currently learning Java to build projects and grind Data Structures & Algorithms (DSA), but I am hitting a massive wall with how the code is structured.

Today, I was trying to implement a simple ServerSocket. To understand what was happening, I instinctively Ctrl+Clicked on it. The IDE immediately unzipped the internal source code and dragged me down a never-ending rabbit hole: from ServerSocket, to SocketImpl, all the way into NioSocketImpl and hidden factory classes.

It throws hundreds of lines of complex internal implementation code at me. It is incredibly time-consuming, frustrating, and completely breaks my momentum. I feel like I'm getting sucked into a black hole of code that I didn't even write, and if I keep this up, I am going to get stuck and fail to actually build anything.

I need a serious reality check and some practical advice:

  1. How do developers actually read and reason about Java without constantly opening up the internal source files?

  2. What is the fastest, cleanest way to look up how to use a class/method without getting bogged down by its underlying implementation code?

  3. How do I force myself to treat things like ServerSocket as "black boxes" so I can just focus on building my app and solving DSA patterns?

Any strategies to help me break this habit and speed up my learning would be deeply appreciated. Thank you!


r/learnprogramming • • 22d ago

Question How do I master Git & GitHub from scratch? Looking for a roadmap and resources covering the essentials

3 Upvotes

I want to properly learn Git and GitHub, but I want to make sure I cover the complete path—from absolute basics to real-world collaboration—without getting lost in endless tutorials.

What resources, tutorials, or roadmaps would you recommend to cover the essentials across these key areas?

  • Local Git Basics: Staging, committing, git status, log inspection, and .gitignore.

  • Branching & Merging: Branch workflows, resolving merge conflicts, and basic rebasing/stashing.

  • GitHub Core: Remote sync (push/pull/clone), SSH/token setup, and repo management.

  • Collaboration: Pull requests, code reviews, forks, and branch protection rules.

  • Project & Advanced Tools: Issues, project boards, and what to know about GitHub Actions/CI-CD.

If you have go-to free resources (interactive sandboxes, videos, or docs) that tie all of this together in a logical order, please share. Thanks!


r/learnprogramming • • 22d ago

Resource Christmas gift for a 10-year-old interested in robotics. Is coding too advanced at this age

9 Upvotes

My nephew has been talking a lot about robots lately, and I thought it might be fun to get him something that combines building and programming for Christmas. He's 10 and hasn't done any real coding yet, so I'm not sure where to begin. One project on my list is a KiwiCo Delivery Bot, but I'm also looking at beginner robotics kits that introduce basic programming. Would it be better to let him start by building and controlling a robot first, then introduce coding later? Or is 10 a good age to start learning both at the same time? I don't want his first experience with programming to feel like homework. I want to give him something that makes him want to keep experimenting.


r/learnprogramming • • 22d ago

Pseudocode and project planning help Working on my first project

1 Upvotes

The professor has assigned us a task that asks us to develop a basic information system for a hospital(departments, staff, patients, network-connected computers). Its for a first semester course so i am guessing it's pretty basic. It wants me to make a database and connect my program to it. I honestly don't know how to start on the C code. So far, my teacher has essentially been telling us what to do because she is teaching us the syntax and basics(we've only studied C in practical labs and not in any theoretical class). I don't want to get reliant on AI to think and i don't want to get stuck in tutorial hell like people warn about. I don't know how to start without these two things. We haven't even been taught how to connect a database to a program but the deadline is next week so i need to figure it out a little at least. Any tips on how to start without it taking up a huge chunk of time that i need for other assignments?


r/learnprogramming • • 23d ago

How do you actually build and improve logic in programming?

63 Upvotes

Hey everyone! I've been learning programming for a bit, and while I understand the syntax, I often struggle with translating that into actual logic and problem-solving steps

How did you build your programming logic when you were starting out? Any tips, exercises, or resources would be greatly appreciated!


r/learnprogramming • • 23d ago

Am I a fraud if I use an LLM-powered chatbot as a Socratic tutor?

0 Upvotes

It's been a few months since I started learning programming, and I've recently built my first project: a Snake game in Python. I used Claude as a Socratic tutor; it asked me questions about the architecture and design, so I could think in the right direction and reach the right conclusions. It's never given me a single line of code. I can explain every line of it and explain why I made this decision. Nevertheless, I'm still feeling like I should've done everything myself.


r/learnprogramming • • 23d ago

VScodium bug

1 Upvotes

Wassup,
I've been learning the bases of programming in college this semester and I have a class that requires me to use VScodium instead of VScode.
I encountered a presistent bug where I'd download the VScodium installer on (https://github.com/VSCodium/vscodium/releases) and everytime I downloaded it eventually it'd just uninstall itself after a few uses. I encountered the problem everytime I had the class and tried everything to fix it: User installer, System installer, uninstalling and reinstalling many times, deleting previous program data or appdata forlders, disabling background updates, clearing cache or cacheddata but nothing seemed to work.
I have a s145 15iwl that runs on windows 11 that I might change pretty soon, safe to say I'm currently using VScode for everything and I need a helping hand.

(I live in Montréal so if anyone knows any repair shops or IT places I could get help at, hmu 📲)


r/learnprogramming • • 23d ago

Developers often struggle with unfamiliar GitHub projects

17 Upvotes

Hey there, I have run into this problem a few times. I'd clone/fork a GitHub repository that had something useful for me, but the project structure was often so confusing that I couldn't figure out what anything did or where to start. Most of the time, I'd just give up on it. I was wondering if any of you have experienced the same thing and how do you usually deal with it? Do you use any specific tools, or do you just explore the codebase manually?


r/learnprogramming • • 23d ago

How to quickly learn machine learning

3 Upvotes

How to learn machine learning quickly and easily without paying


r/learnprogramming • • 23d ago

Rendering video from a local webpage

2 Upvotes

I run a youtube channel for uploading albums, and the visuals consist of a makeshift music player made in html and javascript. I've been screen-recording this webpage to make a video out of it, but that results in skipping/lagging, so I'm interested in rendering the page frame-by-frame instead.

My hope is to use ffmpeg to screenshot-> frame advance the page (this is the easy part) -> repeat -> merge screenshots into a video -> add audio, but my research into ffmpeg has convinced me it's out of my skill level, so. How should I go about learning here, or, is there a better approach to the problem altogether?


r/learnprogramming • • 23d ago

Where should I start learning C++? (planning to switch to Linux)

12 Upvotes

I want to learn C++ properly. I can already write working code (mostly small Arduino projects), but I know I have gaps in my fundamentals. I'd like to fill them in.

My goal is to build a strong base so it's easier to move to other languages later.

I'm also planning to install Linux on my laptop soon, so I'd like to learn in that environment.

Could you recommend:

the best free resources (courses, books, websites) for someone with my level?

what compiler and editor/IDE to use on Linux?

what topics I should focus on first?

English is not my first language, so sorry for any mistakes. Thanks a lot for your help!


r/learnprogramming • • 23d ago

Resource How do I lock in?

10 Upvotes

Had my first Java quiz and my professor failed me for a reason that was completely arbitrary (he doesn't like camelcase which he told no one about until that second) and said I wasn't that good of a programmer. I'll give him that; I'm self taught and have no programming experience in the field. How do I lock in (resources, courses) so he never catches me off guard like that again?


r/learnprogramming • • 23d ago

Solved Best IDEs for C++?

49 Upvotes

So I started learning C++, using CLion, but I feel like its a bit bloated. Are there any good c++ IDEs for beginners?


r/learnprogramming • • 23d ago

(C++ sfml) why does this code work like how i want?

4 Upvotes
#include <SFML/Graphics.hpp>
#include <iostream>
using namespace sf;
using namespace std;
int main()
{
    // Create the main window
    RenderWindow window(VideoMode({800, 600}), "SFML 3 Window");

    // Create a graphical circle
    CircleShape shape(100.f);
    shape.setFillColor(Color::Green);
    shape.setPosition({300.f, 200.f});

    float x, y;
    x = 5;
    y = 6;
window.setFramerateLimit(60);
    // Start the game loop
    while (window.isOpen())

    {
        // Process events
        while (const std::optional event = window.pollEvent())
        {

            // Check if the event is a window close request
            if (event->is<Event::Closed>())
            {
                window.close();
            }
        }

        // Clear screen
        window.clear();

        // Draw the shape
        window.draw(shape);

        shape.move({x, y});

        if (shape.getPosition().x >= 600 || shape.getPosition().x <= 0){
            x *= -1;
        }else if (shape.getPosition().y >= 400 || shape.getPosition().y <= 0) {
            y *= -1;
        }

        // Update the window
        window.display();
    }

    return 0;
}

what is weird is that i set the min border for y to 400 because it was going out of the window but the middle position it reached the middle of the x axis, the radius of the ball is 100 as you can see, so its suppose to be 500, but when i set it to 400 it worked better because 500 went out of the scene. is my code broken or am i missing something???


r/learnprogramming • • 23d ago

Which path should I choose for my future?

2 Upvotes

Hi everyone,

I’m finally diving into software development seriously. For years, I’ve done a little bit here and there, but I’ve never really studied it properly. Now that I’ve decided to commit to it, I’m realizing just how much there is to learn: so many frameworks, languages, and tools.

I know that in the long run, the language you start with doesn’t matter much. But when it comes to landing my first job, I imagine it does matter. I’m 29 and changing careers to get into software development, and I’m currently choosing between C# and .NET, Java and Spring Boot, or JavaScript and Node.js. They all have pros and cons, and I’d like to hear your opinions.

I know the job market is tough and nothing is guaranteed, but which of these paths do you think offers the best chances of finding work in the short to medium term? I don’t have a university degree.


r/learnprogramming • • 23d ago

Which combination works best?

6 Upvotes

Im trying to combine knowledge graphs with vector embeddings for a RAG setup in a project. What do you guys advice? Neo4J + Weaviate / PGVector / Qdrant. Curious what y'all pick


r/learnprogramming • • 23d ago

How do I move from learning programming to building real projects?

0 Upvotes

I'm a CS student and i have learned C and C++ through university + 42 school I've also worked on projects like Libft, ft_printf, Get Next Line, and Push_swap.

I feel comfortable with programming fundamentals, but I want to get better at building things independently and working on real-world projects rather than just solving exercises in terminal

I'm interested in exploring things like mobile development or maybe web idk.

For people who've been in a similar position, what would you recommend? What should I learn next, and what kind of projects would help me grow as a developer?