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

I think I'm fucked.

34 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 • • 2h 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.

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

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

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

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

17 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 • • 2h ago

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

2 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 • • 26m 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 • • 4h ago

I want to build a tool to transfer liked songs between YouTube Music accounts but I have no idea how to start ?

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

Resource Best book for learning C++

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

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

69 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 • • 21h ago

Resource Need help to learn something new

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

Contentful

1 Upvotes

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


r/learnprogramming • • 1d ago

Should beginners learn one programming language first or try different ones?

15 Upvotes

I'm new to programming and not sure if I should focus on one language or explore different ones. What would you suggest based on your own experience?


r/learnprogramming • • 1d ago

Data analytics or Full stack which one is better .

9 Upvotes

I read a sub on reddit, some IT persons were saying that Data Analytics replaced by AI that it's so so hard to get a job. Every work is done by AI and iam planning to learn Data analytics to get a job. Is Data analytics market really dead and should I shift to full stack.


r/learnprogramming • • 1d ago

Topic Is it still possible to break into web development as a self-taught developer, or am I too late?

118 Upvotes

I recently finished The Odin Project after spending around two years learning web development on my own.

I’m trying to transition into web development, but with the rise of AI and how competitive the job market seems to be, I’m starting to question whether it’s still a realistic career path.

For those who are self-taught or have switched careers into web development:

- Are companies still hiring self-taught developers without a CS degree?

- Are there still opportunities for people with no professional experience?

- How difficult is it to land that first job?

I’m wondering if there’s still a chance for someone like me to break into the industry, or if I’ve spent the last two years learning something that’s becoming increasingly difficult to turn into a career.

I’d appreciate some honest advice, especially from people who recently entered the industry.


r/learnprogramming • • 20h ago

Languages Want to make an app for Learning and resume project. Kotlin or Dart?

1 Upvotes

My background: C++, Python, Go

My best is c++, i practice DSA in it. Python and Go, i know very basics of it.

I have project ideas for mobile application. I primarily use android, and i feel its easier to get into android instead of ios development.

I see 2 viable options,
0. Kotlin/Jetpack-compose

  1. Dart/Flutter

Note: Never touched either kotlin or dart.

I would like to know which stack is better for my situation?
Which one has long term reliable?

please help me choose one.


r/learnprogramming • • 1d ago

Tutorial PyQT - can I learn it concurrently with Python basics?

5 Upvotes

Hi! I’m looking to expand my skillset into Python, and was recommended by a colleague to look into PyQT for what I do. My basic questions are:

  • Is it ideal to complete a Python tutorial course before even touching PyQT?
  • Could I begin directly with a PyQT course?
  • What are some ideal tutorials/courses for this?

For reference, I come from the background of FileMaker Pro scripting and layout/GUI design with an expert certification. It’s like a combo of SQL and Javascript for those unfamiliar.

Thank you in advance!


r/learnprogramming • • 1d ago

Tutorial Need help setting up a gui library in C

0 Upvotes

I would owe the world and more to whoever helps me

Okay so hi everyone, i'm fairly new to programming and recently i challenged myself to program something in C, i wanted to make a gui calculator bcs i thought it was fairly simple.

Turns out it's not that easy, and i discovered i had to download gtk4 and learn it, and i'm willing to do that i just need some help on how to download it, set it up and link it, preferably on codeblocks, but vs is great too.


r/learnprogramming • • 1d ago

What's currently worth trying to learn and break into in the development world? (I have some experience)

4 Upvotes

Hi all,

So I guess for some context, I graduated from college back in 2019 with a combined computer science and game design degree. Seven years later, and I never really did anything with the degree. I work in tech but I work in support. Originally, I took the first job that came to me out of college because I had to start paying back student loans. It was a technical support engineer job and my career trajectory more or less went in that direction.

I then had a chance to work at a gaming technology company with a similar style role but a little more technical (mainly reading and debugging code and a bit of writing) but I kind of noped the hell out of the gaming industry once teams started being laid off for sport.

Now I work at a spatial intelligence/physical AI/ embodied AI company as a contractor. It's kind of a mix of my first job which felt like glorified help desk and my second job which was more dev support adjacent, but being a contractor, I don't see much room for growth here, and I'm starting to apply again primarily for jobs I know I'd be good fit for like support and operations related roles but I also want to get back into coding and try my luck with a developer role in the near future

I am quite uninformed with the current state of the market other than AI and LLMs being a thing now and really speeding up development. While in college, my electives primarily revolved more around AI and graphics for games. I took a pure AI and game AI class and did the same for computer graphics. Ideally I'd want to spend some time brushing up on my fundamentals again and the locking in on something that would be worth pursuing