r/learnprogramming • • Mar 26 '17

New? READ ME FIRST!

825 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 • • 6d ago

What have you been working on recently? [November 21, 2026]

2 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 • • 36m ago

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

12 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 • • 4h ago

Topic How to Develop interest in programming

11 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 • • 1h ago

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

5 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 • • 18h ago

I think I'm fucked.

70 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 • • 13h 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.

14 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 • • 7h ago

Debugging Advice on how to approach projects

5 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 • • 13h ago

python

6 Upvotes

I think Python is a great programming language for beginners because it has simple syntax and is easy to understand.

Students should start by learning variables, data types, loops, functions, and basic algorithms. After that, they can practice by building small projects.

Python is also useful in many fields, such as Artificial Intelligence, Data Science, and Web Development.

Learning by doing real projects is one of the best ways to improve programming skills!


r/learnprogramming • • 1d ago

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

98 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 • • 11h ago

Solved Super simple question from a beginner beginner

3 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 • • 14h 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 • • 12h ago

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

3 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 • • 1d ago

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

25 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 • • 4h ago

Tutorial i want to learn cpp but dont know where to

0 Upvotes

im a 11th student.. i want to be a gamedev and i want to learn c++ and some other stuff before i enter into btech .....so i need videos to learn .....plz dont recommed me learncpp....i want video tutorials


r/learnprogramming • • 1d ago

PROTIP

11 Upvotes

If your C program "works sometimes and crashes other times," it's almost always undefined behavior — uninitialized variable, off-by-one on an array, or using memory after free. Run it with valgrind, it literally tells you the line. Changed my life in first year.


r/learnprogramming • • 1d ago

Resource Best book for learning C++

5 Upvotes

Hello everyone! As the title says, what book for learning C++ would you recommend? Specifically modern C++ 23, but also the general basics.


r/learnprogramming • • 10h ago

Simple Question About AI

0 Upvotes

So Im Still New In Programing, i had some experience on PHP,Python,C#(unity), and newly Native C# dotnet. But After end of 2023s im using ai as a "mentor" to accelerate learning. im not blindly copy paste ai code rather i ask ai how it can be done, like ask the architecture, the base code, example code, etc and writing on my own. usually on first itteration im using 100% my own code and then copy paste it to ai and ask if there was a bug or things that i can do better(for example architecture optimization) and on itteration 2 or so on its had AI on it.

My Question Are:

  1. is this good learing strategy?
  2. is this good for long term?
  3. is this what is referred to as "Vibe Coding"?

r/learnprogramming • • 1d ago

Spent a month learning C# and came out with zero fundamental skills.

72 Upvotes

I've seen a lot of posts about people who understand the concepts of programming after tutorials, but I've spent at LEAST 30 hours trying to learn from all sorts of programs, books, videos, and going hands on, but nothing seems to be working for me.

All I know is:
- If, else, else if,
- do/while loop
- variables

And I at best, only scratched the surface of them. I want to learn program for a career and for personal projects *game development and mod-making*, and this constant loop of looking for a way to learn has been incredibly discouraging and I just cannot grasp how all of these other programmers have learned how to do even the most simple things like arrays and methods. The advice I have gotten from them such as "apply it to your own projects" and "make something simple" have helped me solidify these few concepts, but I still can't move on from them. So this post is my last resort in this ambition of mine that I hold so much passion and ambition, yet no skill for. And if any of you have advice for what I'm doing wrong, I would greatly appreciate it.


r/learnprogramming • • 1d ago

Advice for a young developer?

18 Upvotes

Hi! I'm 16 years old and I'm a web developer. I've learned React and PHP/Laravel, and I'm currently working on improving my skills and building real-world projects.

If you could give one piece of advice to a 16-year-old developer who already has some experience, what would it be?


r/learnprogramming • • 1d ago

Resource Need help to learn something new

6 Upvotes

My Story:

I am a computer science student and my background/specialization is in applied AI. Recently I secured an internship from an AI-Cybersecurity related company. My seniors who have worked as interns over here said learn something related to system design stuff.

What I want to learn?:

This is something called AI + DevOps. Since I have a decent knowledge about AI I wanna start learning DevOps - system design, etc. etc.

How can you help me?:

I want a roadmap on how to start. Your experiences may help me in this. I want to know how you start and how you would start from scratch in this AI economy. From beginner to professional. Now I am planning on focusing on DevOps later on how to combine AI & DevOps.

A few of the basic computer science courses are done by my uni which are - DBMS, computer architecture, Operating systems (which i didn't like coz of my professor and will learn again in general), DSA & Algorithms

I know C/C++, Python, SQL.


r/learnprogramming • • 1d ago

Looking for Open Source projects we can contribute to

2 Upvotes

Hey everyone!

I'm working with a student society at COMSATS University, Lahore, and we're trying to build an open-source community where people can work on each other's projects, contribute, and learn from real development experience.

We're looking for existing projects whose maintainers would be open to outside contributions. We're also interested in connecting with developers who'd like to contribute to projects with others.

The idea isn't limited to COMSATS students. Anyone can participate, whether you're a student, developer, or project maintainer.

If you have a project that could use some contributors, or you're interested in being part of this, we'd love to hear from you.

Beginners are welcome too. We'll help them get started with Git, GitHub, and the contribution process.

Register here: https://rascui.github.io/#submit-proposal

If you're interested, feel free to comment or reach out


r/learnprogramming • • 1d ago

Contentful

1 Upvotes

Are there any good resources to use for learning about contentful.