r/learnprogramming • • Mar 26 '17

New? READ ME FIRST!

828 Upvotes

Welcome to /r/learnprogramming!

Quick start:

  1. New to programming? Not sure how to start learning? See FAQ - Getting started.
  2. Have a question? Our FAQ covers many common questions; check that first. Also try searching old posts, either via google or via reddit's search.
  3. Your question isn't answered in the FAQ? Please read the following:

Getting debugging help

If your question is about code, make sure it's specific and provides all information up-front. Here's a checklist of what to include:

  1. A concise but descriptive title.
  2. A good description of the problem.
  3. A minimal, easily runnable, and well-formatted program that demonstrates your problem.
  4. The output you expected and what you got instead. If you got an error, include the full error message.

Do your best to solve your problem before posting. The quality of the answers will be proportional to the amount of effort you put into your post. Note that title-only posts are automatically removed.

Also see our full posting guidelines and the subreddit rules. After you post a question, DO NOT delete it!

Asking conceptual questions

Asking conceptual questions is ok, but please check our FAQ and search older posts first.

If you plan on asking a question similar to one in the FAQ, explain what exactly the FAQ didn't address and clarify what you're looking for instead. See our full guidelines on asking conceptual questions for more details.

Subreddit rules

Please read our rules and other policies before posting. If you see somebody breaking a rule, report it! Reports and PMs to the mod team are the quickest ways to bring issues to our attention.


r/learnprogramming • • 2d ago

What have you been working on recently? [October 24, 2026]

11 Upvotes

What have you been working on recently? Feel free to share updates on projects you're working on, brag about any major milestones you've hit, grouse about a challenge you've ran into recently... Any sort of "progress report" is fair game!

A few requests:

  1. If possible, include a link to your source code when sharing a project update. That way, others can learn from your work!

  2. If you've shared something, try commenting on at least one other update -- ask a question, give feedback, compliment something cool... We encourage discussion!

  3. If you don't consider yourself to be a beginner, include about how many years of experience you have.

This thread will remained stickied over the weekend. Link to past threads here.


r/learnprogramming • • 15h ago

How do you guys handle keeping up with your skills and agentic programming

47 Upvotes

Hey guys so I've been learning programming since 2015-2016 when I was around 14.

My workflow lately is mostly just prompting/agentic programming and the reason is clear for me. I am just more productive that way.

On one hand, I don't find a reason nowadays to waste a week writing code when I could prompt what i want and see the result in 30 minutes.

On the other hand, progressing through a big codebase is a little bit harder now(even tho with how ai is being developed lately, I see improvements consistently in that segment).

The biggest issue, tho is I feel like my programming skills are getting very rusty, which I honestly dont really love. And with the ways things are heading as a guy who is for the lookout for a job (just finishing my uni degree at the moment) am wondering what being a good programmer will even mean/does mean when it comes to finding a job

I'm curious how other developers are dealing with this. If you noticed the same issues and if you are actively trying to keep your coding skills sharp or you are just shifting towards fully ai assisted development.


r/learnprogramming • • 11h ago

26 y/o Male Looking To Find a Coding Buddy

24 Upvotes

Just as the title states, I'm looking for a coding buddy. Recently decided to do a career switch. I left the Navy last April as an IT guy. Got a job in June as an Operations Analyst and got a taste for coding/programming. Is anybody interested in mentoring and/or learning alongside me? Really just need an accountability partner. I'm essentially going to be teaching myself to become a software developer. Cheers!


r/learnprogramming • • 3h ago

Should I use live coding in an interview when hiring seniors?

5 Upvotes

I am an experienced programmer that is supposed to hire people. I have a free choice what to use during job interviews. I am debating with myself if I should do live coding sessions or just ask questions. What do you think? I am hiring rather experienced devs with 10+ exp in the domain. Would having them to write for example implementing a linked list be appropriate?


r/learnprogramming • • 5h ago

Beginning C++ through game programming, fourth edition.

3 Upvotes

I purchased this book a few years ago. And I was wondering how viable it is for learning, and if anyone has used this book, what are your thoughts on it. I'm turning forty in november, and i'm ready to pick up a new skill i hope this book can put me on the path to that.


r/learnprogramming • • 17h ago

How thoroughly should I check arguments to a function

13 Upvotes

Below is a function that takes in an array of objects and averages their `count` properties:

function computeAverageCount (group) {
  let n = 0
  let sum = 0
  group.forEach(curr => {
    const count = curr.count
    sum = sum + count
    n++
  })
  return n > 0 ? sum / n : 0
}

Let's say that these objects containing count properties were retrieved from a server, which documents that the `counts` are a number greater than or equal to zero. Also, this function is used as an internal helper in an application.

To what extent should I check the data coming in to the function? I could add checks in the function to ensure that the `count` is an integer that is greater than or equal to zero. But if I expect the server to only send those kinds of values, are these checks overkill? I suppose it's possible for something to go wrong server-side that would cause unexpected counts to be sent.

I appreciate the feedback.


r/learnprogramming • • 11h ago

Topic Jetpack Compose vs XML for a beginner in 2026: what would you pick and why?

2 Upvotes

I just started learning Kotlin for Android and I’m confused about where to begin with UI. Half the tutorials I find use XML but everyone online says Compose is the future. If you were starting from zero today which would you learn first? Is XML still worth the time or is it mostly just old projects at this point?


r/learnprogramming • • 20h ago

Topic Python beginner

8 Upvotes

I’m a 1st year computer science student. I have no coding experience and my classmates can finished it like under 20 mins.

How do you code a word problem? I’m stuck of what I should code. I can somehow visualize it but I can’t put it code and I have upcoming midterm. Most of my midterm is word problem then create a function and return statement.


r/learnprogramming • • 9h ago

Tutorial Fsd

0 Upvotes

I have started my journey with my own to learn full stack without playlist, but if i want to learn fast , I have to watch sm tutorials/ playlists, can smone can suggest the best worth playlist on YouTube

Note! Don't suggest apna clg/ code with Harry/..etc, no offence but II don't like personally!

Plsss suggest me sm worth playlist over thr


r/learnprogramming • • 16m ago

16 year old full stack Web developer - how do i start finding clients?

• Upvotes

I've been doing this for years just making websites for fun and ill list my skills below for you guys to get a better idea of how i should be approaching this .

PostgreSQL ,Node.js and Express API and just linking API in general

I can do Javascript HTML and CSS pretty well

My best projects so far are :

a notes app with an account system that has hashed passwords using bcrypt , saves notes to a database using Node.js and Express API

a weather app that uses openmeteor API to tell weather thats styled well with CSS

and a cookie clicker which doesnt really show much other than CSS and Javascript logic skills

I have deployed all of these sites by the way

and i Have made a portfolio website thats been deployed as well it has a contact me form made with formspree in my opinion great UI and a showcase of the projects mentioned earlier , im in the UK and i have no idea where to start with selling people websites or fixing bugs or whatever it is that people need

TLDR: i have some skills and projects how do i start selling them to clients and how do i even find clients the business side of freelancing is the only thing thats throwing me off


r/learnprogramming • • 22h ago

Topic Looking for programming courses with independent projects to explore different fields

6 Upvotes

Hi everyone!

I'm a CS student, or rather, I recently dropped out of university because I realized that I didn't really enjoy the amount of theory involved in the Italian university system. I'd prefer a more hands-on approach to learning programming.

Thanks to my previous education, I already have some experience with programming languages such as Go (Golang), Java, C, and SQL.

A while ago, I found freeCodeCamp and completed its Responsive Web Design certification. I learned HTML and some CSS, but I never finished the CSS section because, to be honest, freeCodeCamp's learning method started getting on my nerves a bit. I found it too guided and repetitive.

I'd rather learn the basics of a technology and then work on projects independently, with minimal guidance, instead of following step-by-step instructions.

I'm not particularly attached to any specific area of programming, so I'd like to explore as many fields as possible, including web development, app development, backend development, game development, machine learning, and anything else that might be interesting.

I'm mainly looking for free courses or learning resources, preferably with plenty of projects that I can work on independently. Certificates would be a nice bonus, but they're not a requirement.

What courses or resources would you recommend based on your own experience? I'd especially appreciate suggestions that helped you learn by actually building things and solving problems on your own.

Thanks in advance!


r/learnprogramming • • 1d ago

What to make as a beginner web dev?

18 Upvotes

I currently know HTML, CSS and basic Javascript.

I want to expand my knowledge, but not learn other stacks, like react.js etc, right now.

I'm a beginner, so don't give me big projects. I worked to some projects, but couldn't contribute much.

I have also made a small portfolio website for a client (my first and last T-T, till now)


r/learnprogramming • • 15h ago

Confused on what to learn next !

1 Upvotes

Am a Pega Lead system with 19 years exp .. almost all in Pega. But off late Pega is being seen as a legacy app and not getting enough large scale projects. Just confused on what to learn next .. Salesforce or service now or something else .. to make a career in this AI era .. any suggestions..


r/learnprogramming • • 4h ago

Topic What is the definition of a self-taught programmer and is it true that most skilled programmers are self-taught?

0 Upvotes

title says it


r/learnprogramming • • 1d ago

Is it okay to learn Php in 2026, I find it easier than node.js

55 Upvotes

I have build some projects with the help of AI in MERN Stack, but a senior once told me they made new programming languages/libraries/ frameworks to make building Projects difficult so that less people know how to build apps. I feel sometimes he was right. Php's approach seems easier than node.js


r/learnprogramming • • 16h ago

Topic Watching toturial or keep coding?

1 Upvotes

Which of them you so mostly to get the best result and feel productive?

This days most of people struggling with this issue in my social circle and most of teenagers don't know what to do!

Have any openion or recommendations about how to make a good daily routine for themselves!


r/learnprogramming • • 22h ago

Any suggestions on sites like exercism.io to learn coding?

2 Upvotes

I'm working on learning (mainly for now) C#, and i came across the website exercism. I really loved their approach and how they structured the learning process, however, the exercises are really REALLY poorly explained and confusing. Most of the time i'm just trying to understand whats expected from the exercise.

Because of that, the experience became really frustrating after a certain point. Thats why i'm looking for another platform, and if it have an approach simillar to exercism, but better explained, it would be great. Any other suggestions like books or courses are very welcomed too.

As a sidenote, what i'm looking for is to learn C# for multiplatform projects, PostgreSQL, JS (accepting suggestions on frameworks that works well for C# projects) and overall proggraming logic. I began learning proggraming quite a while ago but the courses i used cut a lot of the basics, so I ended up confused and lost after a while, like knowing enough to make a few projects, but lacking on the fundaments (I began with PHP and SQL), so i want to focus on that as well. Recently i began the CS50x course and i'm really liking it.


r/learnprogramming • • 23h ago

Debugging Raycaster points at the wrong direction at angle 0.

2 Upvotes

I have been coding a raycaster following 3DSage's tutorial. The code works generally but there is one specific issue I cannot fix. When the code starts, and I angle the player to slightly right and then left, the horizontal check line points at PI instead of 2PI. When I do I full circle, the issue dissappears, I have been trying to fix this the whole week, but I cannot. I can just make the start angle PI, but that feels like cheating.

#include <iostream>
#include <GL/glut.h>
#include <stdio.h>
#include <math.h>
#define PI 3.1415926535
#define P2 PI/2
#define P3 3*PI/2

//glut <3

float px, py, pdx, pdy, pa; //player positions

void drawPlayer()
{
    glColor3f(1,1,0);
    glPointSize(8);

    glBegin(GL_POINTS); //begin drawing and draw dots at everything after that
    glVertex2i(px, py); //draw a dot here
    glEnd(); //ok stop no  more dots, draw em now, no more dot coordinates

    glLineWidth(3);
    glBegin(GL_LINES);
    glVertex2i(px, py);
    glVertex2i(px + pdx * 5, py + pdy * 5);
    glEnd();
}

int mapX = 8, mapY = 8, mapS = 64;
int map[] =
{
    1,1,1,1,1,1,1,1,
    1,0,1,0,0,0,0,1,
    1,0,1,0,0,0,0,1,
    1,0,1,0,0,0,0,1,
    1,0,0,0,0,0,0,1,
    1,0,0,0,0,1,0,1,
    1,0,0,0,0,0,0,1,
    1,1,1,1,1,1,1,1,

};

void drawMap2D()
{
    int x, y, xo, yo; //o is offset

    for (y = 0; y < mapY; y++)
    {
        for (x=0; x < mapX; x++)
        {
            if (map[y * mapX + x] == 1)
            {
                glColor3f(1,1,1);
            }
            else
            {
                glColor3f(0, 0, 0);
            }

            xo = x * mapS; yo = y * mapS; //top left coordinate of the block that has a size of 64, mapS
            glBegin(GL_QUADS);
            glVertex2i(xo +1, yo + 1);
            glVertex2i(xo + 1, yo+mapS - 1);
            glVertex2i(xo + mapS - 1, yo + mapS - 1);
            glVertex2i(xo+mapS - 1, yo + 1);
            glEnd();
        }
    }

}

void drawRays3D()
{
    int r, mx, my, mp, dof; 
    float rx, ry, ra, xo, yo;
    ra = pa;
    for (r = 0; r < 1; r++)
    {
        //---Check Horizontal Lines---
        dof = 0;
        float aTan = -1 / tan(ra);

        if (ra > PI) //looking up
        {
            ry = (((int)py >> 6) << 6) - 0.0001; /*the top grid of the block
            that the player is standing*/
            rx = ((py - ry) * aTan + px);
            /*130 - 128 = 2, lets say tan gives 3, but it is negative so -3, if
            players x value is 33, then the rayx is 30, so it finds how much the 
            x changed when ry touched a horizontal line*/
            yo = -64;
            xo = -yo * aTan; /*when tan is this and y is 64 what is the offset of
            x to hit the next wall*/
        }

        if (ra < PI) //looking down
        {
            ry = (((int)py >> 6) << 6) +64; //64 moves it to the bottom part of the grid
            rx = ((py - ry) * aTan + px);
            yo = 64;
            xo = -yo * aTan; // dy/tan(ra) = dx, aTan = -1/tan(ra), aTan * -yo = dx
        }

        if (ra == 0 || ra == PI) //looking straight left or right
        {
            rx = px; //so it basically stays there without moving
            ry = py;
            dof = 8; //don't go more than 8
        }

        while (dof < 8)
        {
            mx = (int)(rx) >> 6; // where is rx in the grid
            /*I needed to translate it into pixels to find the actual
            distance, but now I have gotta find which block are we at*/
            my =(int)(ry) >> 6;
            mp = my * mapX + mx;

            if (mp >= 0 && mp < mapX * mapY && map[mp] == 1) //hit wall
            {
                dof = 8; /*althought there aint a wall, do not move more
                artificially set the value to 8*/
            }

            else
            {
                rx += xo;
                ry += yo;
                dof++;

                /*So the line moves according to the ratio of while y = 64
                how much did x change*/
            }
        }

        glColor3f(0, 1, 0);
        glLineWidth(10);
        glBegin(GL_LINES);
        glVertex2i(px, py);
        glVertex2i(rx, ry);
        glEnd();

        //---Check Vertical Lines---
        dof = 0;
        float nTan = -tan(ra);

        if (ra > P2 && ra < P3) //looking left
        {
            rx = (((int)px >> 6) << 6) - 0.0001; /*the top grid of the block
            that the player is standing*/
            ry = ((px - rx) * nTan + py);
            /*130 - 128 = 2, lets say tan gives 3, but it is negative so -3, if
            players x value is 33, then the rayx is 30, so it finds how much the
            x changed when ry touched a horizontal line*/
            xo = -64;
            yo = -xo * nTan; /*when tan is this and y is 64 what is the offset of
            x to hit the next wall*/
        }

        if (ra > P3 || ra < P2) //looking right
        {
            rx = (((int)px >> 6) << 6) + 64; //64 moves it to the bottom part of the grid
            ry = ((px - rx) * nTan + py);
            xo = 64;
            yo = -xo * nTan; // dy/tan(ra) = dx, aTan = -1/tan(ra), aTan * -yo = dx
        }

        if (ra == 0 || ra == PI) //looking straight up or down
        {
            rx = px; //so it basically stays there without moving
            ry = py;
            dof = 8; //don't go more than 8
        }

        while (dof < 8)
        {
            mx = (int)(rx) >> 6; // where is rx in the grid
            /*I needed to translate it into pixels to find the actual
            distance, but now I have gotta find which block are we at*/
            my = (int)(ry) >> 6;
            mp = my * mapX + mx;

            if (mp >= 0 && mp < mapX * mapY && map[mp] == 1) //hit wall
            {
                dof = 8; /*althought there aint a wall, do not move more
                artificially set the value to 8*/
            }

            else
            {
                rx += xo;
                ry += yo;
                dof++;

                /*So the line moves according to the ratio of while y = 64
                how much did x change*/
            }
        }

        glColor3f(1, 0, 0);
        glLineWidth(1);
        glBegin(GL_LINES);
        glVertex2i(px, py);
        glVertex2i(rx,ry);
        glEnd();

    }
}


void display()
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    drawMap2D();
    drawRays3D();
    drawPlayer();
    glutSwapBuffers();
}

void buttons (unsigned char key, int x, int y)
{
    if (key == 'a')
    {
        pa -= 0.1;
        if (pa < 0)
        {
            pa += 2 * PI;
        }

        pdx = cos(pa) * 5; //these are vectors with magnitude
        pdy = sin(pa) * 5;
    }

    if (key == 'd')
    {
        pa += 0.1;
        if (pa > 2*PI)
        {
            pa -= 2 * PI;
        }

        pdx = cos(pa) * 5;
        pdy = sin(pa) * 5;
    }

    if (key == 's')
    {
        py -= pdy; //if you add this amount of x and that amount of y, you do to the vector in the middle
        px -= pdx;
    }

    if (key == 'w')
    {
        py += pdy;
        px += pdx;
    }

    glutPostRedisplay(); /*glut pleaseee re-draw the screen, glut 
    does not know it has gotta re-draw
    the screen with the current variables
    something has changed, so please look back at glutdisplayfunc and re-draw it
    */
}

void init()
{
    glClearColor(0.3f, 0.3f, 0.3f, 0.0f); // red, green, blue, alpha
    gluOrtho2D(0, 1024, 512, 0); //top left edge, top right edge[x], bottom edge, top edge [y]

    px = 300; 
    py = 300;

    /*
    questions:
    this,
    why is anything drawn when looking directly left or right*/

    pdx = cos(pa) * 5;
    pdy = sin(pa) * 5;

}

int main(int argc, char* argv[]) 
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA);
    glutInitWindowSize(1024, 512);
    glutCreateWindow("Don't make lemonade!");
    init();
    glutDisplayFunc(display); //if the display is fiddled with do this
    glutKeyboardFunc(buttons); //if a button is pressed do this
    glutMainLoop(); //always listening for stuff like window re-sizing
}

r/learnprogramming • • 23h ago

Resource Why kind of thing would I need to learn to create a GUI app with my current skills?

1 Upvotes

*What kind of thing.

Being unable to edit titles on Reddit is annoying.

I'm looking to create a GUI app for my Linux machine. It's not going to go into production, I just want to be able to create something. Looking all over the place, there are a hundred different things I can do, and almost all of the tutorials require me to learn another language or something.

Now, I'm sure this may be necessary, but if there's one thing I've learnt over my years of studying computing, if you ask "what is the best x for y?" you'll get as many different responses as there are responders. Learning a new language always leaves me as a perpetual beginner, and I'd rather build on what I already know, than start again.

Currently, I am very familiar with Bash, PHP, MySQL, and to a certain extent C++. I also know HTML and CSS.

What I'd like to do is build a GUI for a media player. I've already created a rudimentary CLI for one, and it works, though it's far from pretty. I've tried to create a web based one, and I got fairly far into it, using PHP on the backend, and MySQL for the database, but the limits of HTML mean I cannot harness the power of my preferred Matroska format for videos (something I've been able to do in my terminal based app).

I write almost exclusively in plain text files, and don't use an IDE. Foolish? Probably. But I find it far more portable and easier to understand.

The idea I have, is for me to have a GUI to display the contents of the database, and to organise it in a pretty way to be user friendly, and then when you click on something to play it, it launches MPV player with all the relevant commands I give it. I'm not sure I want to build something with the player built in, as that would probably be far too much work for what I want. And besides, my current CLI app does exactly this, so it would, again, be building on my current knowledge.

What I would like, is for something that would allow me to programme the GUI in an XML like structure, similar to HTML, and style with CSS, use PHP as a backend script to connect to MySQL, and be able to execute terminal based commands so I can launch MPV. Pretty much a website kind of thing that can launch other apps. I have no idea if this is possible, but it would work with what I already know. If it's not possible, is there any kind of thing that would work without requiring me to go right back to the beginning too much?


r/learnprogramming • • 23h ago

Hi Everyone! What branch of coding to be actual specialist in upcoming years

0 Upvotes

Hi, everyone!
I’m a computer science student trying to figure out my path. I’d love some advice from the more experienced folks here—you all know the market so much better. What kind of specialist do you think will be in demand over the next few years?


r/learnprogramming • • 1d ago

I really need help and gaudiness

1 Upvotes

hey. so it could be a little bit of a odd post but I really wish to know other people's opinions. I'm a third year statistic student and this major wasn't really my choice. in my country there is college entrance exam and you kinda have to choose your major according to how well you did in this exam so I couldn't get into a cs or ce program in one of the capital universities so I chose statistic because I've heard it's relevant to ML and data science and back then I didn't know much about programming and tech just that I hold a passion for it. and now I'm very confused about what path I should take. I don't really find myself interested in data related areas and with the new Job market and age of AI I don't know what path to take or if I have any chance in the tech world. every path I think of trying I ended up giving up because I don't think if I hold a chance against someone with years of experience and a cs degree. I really need gaudiness because it's heavily affecting my mental health and self esteem. the idea of open source developers, system engineers, security, robotics and hardware always interested me but these are very different and unrelated. please tell me what I should do just to get out of this loop and what should I learn and in which order to get hands on exprienced. if my plan b is getting a master in cs.


r/learnprogramming • • 1d ago

What are some actually interesting, and fun programming projects?

10 Upvotes

I am an intermediate programmer, and I just don't know what to make. All the projects people say to do like to do list or weather app seem so lame.

All replies are appreciated!


r/learnprogramming • • 1d ago

how to learn "software engineering"

13 Upvotes

Hi guys, I'm a senior in high school, and I'm really confused on where to go

for the record I do know a decent amount of C++ / python (for comp coding and classes) but since then I've started to move to personal projects....

The purpose of these projects is to improve my knowledge tenfold and learn how real software is made. But online, EVERYONE says "coding is dead, and to learn architecture".

But how do you learn that?

Do I delegate sections to AI and then have it explain? Do I create what goes where and then tell the Ai to make it? Or Do I just code it all myself with AI to debug (taking an absurd time).

I feel like only the third one will have me actually learning completely, but at the same time, it'll take 20x the time, and with 20 projects I could probably reach the same level (or more) of learning by having it make + I explain? AHHH i'm just not sure how to make myself super smart and knowledgeable for swe

thanks in advance :)


r/learnprogramming • • 21h ago

Topic Pros and Cons using AI while learning?

0 Upvotes

​

I've met a lot of people here who will just rain down hellfire on you for using AI when learning. I'm an ADHD kid, and AI really helped me. I had terrible experience with my teachers back home. So I used AI to create a learning plan. I started with Linux, booted up a Ubuntu USB, and then dug into different frameworks like React and Vue. This helped me build several web applications.

I'd say it depends on how you prompt your assistant and analyze its mistakes. When your skill grows over time, you'll also catch AI mistakes. AI doesn't generate bulletproof code. Is the assistant only as good as its owner?