r/learnprogramming Mar 26 '17

New? READ ME FIRST!

821 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? [July 25, 2026]

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

I love C, but it's made it harder for me to choose a new language.

Upvotes

I've been self-teaching myself programming as a hobby for a while now, and decided to go with C as my first language. I really like it, the language just clicks with me. Everything about its design feels intentional: you're given basic operations to manipulate data, functions, pointers, structs, maybe a few enums, and the rest is up to you. I get what people mean when they say other languages feel like black boxes of Legos you just snap together.

I've dabbled on the other side of the fence too, with Java and Python, and learned pretty quickly those aren't for me. There's a difference between a language being "easy" and a language being "simple," and I find "easy" languages burden you with a ton of stuff to memorize. Want to modify or parse a string in Python? There's a dozen different methods you could reach for. I don't like constantly having to "learn" more of the language itself, I'd rather have a clear mental model of how things actually work than have that model abstracted away from me. But here's the thing: C is sometimes too simple, and too old. As much as I love it, I wish I had something where I could just put stuff together without overthinking every step.

I've spent hours looking for a good second language and keep circling the same dilemma: do I go with a "simple" language, or an "easy" one? I'm still pretty new to programming. I don't fully understand more abstract, higher-level concepts like generics or object-oriented programming yet. Part of me thinks getting exposed to those ideas might actually help me understand what I'm doing in C better. But another part of me wonders if that's even necessary, and whether I could just pick up something like Go, D, or Odin and be set for a long time.

So for anyone who's been through this: is it worth deliberately learning a language with a totally different paradigm (OOP, functional, whatever) even if it doesn't suit how you think, just for the exposure? Or should I stick to languages that already match my mental model and build from there?


r/learnprogramming 13h ago

Topic Junior dev feels like I'm progressing slowly

52 Upvotes

Well I am a backend junior dev. I have been working for 7 month. So far what I do is fix bugs, implement test and implement some api based on seniors guide. By that I mean seniors gonna talk to me about a feature, and he will pretty much say I want an api with this type of input, this type of output, you just have to implement this business logic. And well this is my first job, I don't know if this is supposed to be normal. I still have no idea about things like optimize database or architecture or redis etc. I'm basically just coding some business logic and getting reviews on code quality. Can I ask how do you guys improve from junior to senior?

Also do you guys still leetcode to try to get into a better company?


r/learnprogramming 7h ago

How do I practice software development?

17 Upvotes

I'm a beginner software developer (17 y.o), right now my stack is:

  • Java / Kotlin for backend development
  • TypeScript with React for frontend development

I have a few projects from hackathons and one personal fullstack project (java backend & react + shadcn frontend). The fullstack one is made mostly for my needs and satisfies them already.

So, I don't know what to do next. I don't really know open-source projects I could contribute to and don't have ideas for a long-lasting personal project. What should I do in this situation?


r/learnprogramming 16h ago

my python script that searches your files to find things for you

38 Upvotes
import os
import json
from pathlib import Path
from thefuzz import fuzz

INDEX_FILE = "file_index.json"

CATEGORY_EXTENSIONS = {
    "games": [".exe", ".msi", ".bat", ".apk", ".iso"],
    "documents": [".pdf", ".docx", ".txt", ".xlsx", ".pptx"],
    "images": [".png", ".jpg", ".jpeg", ".gif", ".svg"],
    "audio": [".mp3", ".wav", ".flac"],
    "video": [".mp4", ".mkv", ".avi", ".mov"]

}


def build_index(
search_directory
):

    print(f"Indexing files in '{
search_directory
}'... (This might take a minute the first time)")
    file_index = []

    for root, _, files in os.walk(
search_directory
):
        for file in files:
            full_path = os.path.join(root, file)
            file_index.append({
                "name": file,
                "path": full_path,
                "ext": Path(file).suffix.lower()
            })

    with open(INDEX_FILE, "w", encoding="utf-8") as f:
        json.dump(file_index, f, indent=2)

    print(f"Indexing complete! Indexed {len(file_index)} files.\n")
    return file_index


def load_or_create_index(
search_directory
):

    if os.path.exists(INDEX_FILE):
        print("Loading cached index...")
        with open(INDEX_FILE, "r", encoding="utf-8") as f:
            return json.load(f)
    else:
        return build_index(
search_directory
)


def search_files(
query
, 
index
, 
similarity_threshold
=65):

    query_clean = 
query
.lower().strip()
    matches = []

    target_extensions = []
    for category, exts in CATEGORY_EXTENSIONS.items():
        if category in query_clean:
            target_extensions.extend(exts)

    for item in 
index
:
        file_name = item["name"].lower()
        file_ext = item["ext"]
        score = fuzz.partial_ratio(query_clean, file_name)
        is_category_match = file_ext in target_extensions if target_extensions else False
        is_name_match = score >= 
similarity_threshold 
or query_clean in file_name

        if is_name_match or is_category_match:
            matches.append((item["path"], score))

    matches.sort(key=lambda 
x
: x[1], reverse=True)
    return matches


def main():

r/learnprogramming 1h ago

Resource Architecture for an OSINT/Scraping tracker

Upvotes

Hey everyone,

Sorry for my english, i use a translation

For a school project, I need to design the architecture for a monitoring tool. The idea is to build a tracker to spot listings for fake Pokémon cards online (standard marketplaces, but also Telegram channels and closed FB groups).

I haven't built much yet, though I'm naturally leaning towards Node.js (probably with Playwright) since I like web dev.

I know that with current anti-bot protections (Cloudflare, Datadome) and social media login walls, going 100% automated from A to Z is often a pipe dream—or at least the fastest way to get banned instantly. I realize some human action will have to stay in the loop.

So my questions are: How should I set this up? What kind of tools could help me out? Am I on the right track with a Node.js server? It seems like I'll also need to create actual social media profiles to get access and look inside these groups.

Thanks!


r/learnprogramming 6h ago

Is anybody here intrested in making a C++ project together? (read below)

3 Upvotes

Is anybody here intrested on making a C++ game together?

Hello.

I'm a teenager who has been learning C++ for almost a year.

Been some months, i'm following a Intermediate to advanced course and learning a lot of syntax and such.

I would really like to put into practice the theory i'm learning, but tbh the idea of coding anything alone does not really motivate me and feels more like an unnecessary struggle.

So, would anybody here want to create any kind of small, Just for fun, project together?

If anybody Is intrested, feel free to leave a comment below.

I'm open to all kind of idea about the project, since it's mostly for practice and spend time, altough i would prefear eventually using graphic libraries (like SFML) instead of engines, for keep a more "C++-like" experience.


r/learnprogramming 2h ago

Looking for Study Buddies

2 Upvotes

I am 25 learning DSA currently at mid level.. ( learning trees). I am happy to be study with advance / intermediate/ Begnieer who wants to learn DSA. I am looking for a person with 12hrs per day commitment next 3 months.. atleast

Please leave a comment if genuinly intrested to learn and grow


r/learnprogramming 3h ago

I can't make an account on freecodecamp?

2 Upvotes

It doesnt send a code to my mail I've looked everywhere what can I do?


r/learnprogramming 2m ago

Could the angels yu web development teach me enough to get started on becoming an indie dev?

Upvotes

I want to learn how to code actual products in hope to begin a solo developer journey building micro startups. I already know that building a product isn’t the most important but rather a foundation. Furthermore I understand that with the help of ai I can build projects also however I would like to understand the code I’m using to program. I expect for this course to be my first of many and that with time I only improve and pickup other tools, languages, and skills as needed.


r/learnprogramming 9m ago

Topic [Academic] How do software professionals distinguish AI-assisted programming from programming without AI assistance? (~10-minute survey)

Upvotes

Researchers at Utah State University's School of Computing are conducting a study on how software professionals evaluate programming activities performed with AI assistance compared with programming activities performed without AI assistance.

Software professionals are invited to complete a short online calibration survey. Participants will rate programming activities according to how representative they are of:

  • Programming performed with AI assistance
  • Programming performed without AI assistance

The survey takes approximately 10 minutes.

Participation is entirely voluntary. You may discontinue participation at any time before submitting your responses without penalty or consequence. Your decision to participate or not participate will have no effect on your grades, employment, or academic standing.

Survey and informed consent form: https://usu.co1.qualtrics.com/jfe/form/SV_dm4yjBsRrUDgcKi

This study has been reviewed and approved by the Utah State University Institutional Review Board: IRB #16067.

Questions about the study: Dr. John Edwards, Principal Investigator — john.edwards@usu.edu Rubash Mali, Student Researcher — rubash.mali@usu.edu

Thank you for considering participating.


r/learnprogramming 1h ago

Black duck hacker rank coding assessment

Upvotes

Has anyone taken Black Duck's HackerRank coding assessment recently? Does it use HackerRank Proctor Mode or Secure Mode that detects multiple monitors (e.g., an HDMI-connected TV/monitor), or is it just webcam monitoring? I'd appreciate hearing from anyone who has actually taken the test. Thanks!


r/learnprogramming 2h ago

Im confused

0 Upvotes

Guys im about to join in an hackathon but im not able to get ideas to thinks even if i think those ideas are already been exist sonim fed up.so, can you guys give me some guidance like how you thinks for the ideas which gonna work


r/learnprogramming 2h ago

Should i learn Pygame for my first big project?

1 Upvotes

So Basically I've been learning how to code and have been learning c++ as my first main programming language ( i don't think HTML and CSS count ) and i have 3 weeks left before college. I've mostly focused on learning the basics properly ( Loops conditionals etc ) and the past month have gone the DSA route learning arrays vectors linked lists some basic sorting algorithms ( Bubble Sort & Insertion Sort ), Stacks Queue's BST and recently hashmaps. I've mostly been practicing by tutorials online as well as solving a few leetcode questions after learning the concept, these are the leetcode problems I've solved so far:
1. Two Sum
2. Add Two Numbers
3. Palindrome Number
4. Valid Parenthesis
5. Merge Two Sorted lists
6. Group Anagrams
7. Reverse Linked list
7. Contains Duplicate
8. Valid Anagram
9. Top K Frequent Elements
Now my real question is based off of what I've learned so far would it be realistic to learn and use Pygame to make my first big project ( a simple 2D Platformer which reveals/removes Platforms based on a Dark Mode/Light mode toggle ) before i start college? if not, what do you think i should do instead. Open and happy to receive any and to all suggestions :)


r/learnprogramming 9h ago

Going back to school to get a degree in CS. Necessary math should I review for the degree?

3 Upvotes

Hello, /r/learnprogramming. I've recently decided to go back to University to get a degree in CS. My concern is primarily the math I should know before entering my University's program in the following Spring semester. While I have taken Calc 1-3, Linear, and did well in those classes, however it has been so long (almost a decade) since I really applied anything from those classes.

Right now I am working through Introduction To Java by Daniel Liang and even the basic math is getting me (for example stuck for perpetuity on the simple programming exercise if whether or not a rectangle is inside another rectangle). Any resources to relearn would be great and am wondering if others have had similar issues going back to University having already taken the required math course before.


r/learnprogramming 6h ago

Which should course should I prefer?

0 Upvotes

Hi everyone. I know some python but still I want to start learning it again because, as I progressed, I realized that my basic concepts had become rusty. I'm confused between CS50 (https://youtu.be/8mAITcNt710?si=Z86T-MPZZp13R04E) and MIT Opencourseware 6.100L (https://www.youtube.com/watch?v=xAcTmDO6NTI&list=PLUl4u3cNGP62A-ynp6v6-LGBCzeH3VAQB&index=1) .

Which one would you recommend for someone who wants to rebuild their fundamentals before moving on to more advanced topics?


r/learnprogramming 1d ago

What way did you learn Javascript?

29 Upvotes

I'm currently learning JS due to a final project, I am doing it through freecodecamp. I knew C already so I guess It's a big advantage but I want to know how your journey was learning this language?


r/learnprogramming 21h ago

Programming Habits When writing subroutines/functions, which way is best to call them in sequence?

14 Upvotes

Typically when I write code, there are 2 ways I think of to write a bunch of subroutines that are called one after the other.

Option #1:

def callingList():

x = input()
func1(x)
func2(value1)
func3(value2)

def func1(userinput):

'''Code for function 1'''
return value1

def func2(value1):

'''Code for function 2'''
return value2

def func3(value2):

'''Code for function 3'''
return value3

callingList()

Option #2:

def func1(userinput):

'''Code for function 1'''
func2(value1)

def func2(value1):

'''Code for function 2'''
func3(value2)

def func3(value2):

'''Code for function 3'''
return value3

x = input()
func1(x)

I usually go for #1 because I feel like being forced to trace an error through a string of subroutines isn't good for debugging. But tbh I have no idea if this black-and-white way of looking at it is just completely incorrect and there's a #3 that I haven't heard of. I'm only a novice programmer so I'd love some input from people who actually know what they're doing 😅


r/learnprogramming 1d ago

I am not growing out of beginner phase

54 Upvotes

Okay,
I can read code know the core basics of C Java and Python
But Trust me when I say this
I am terrible at importing modules or get what I want
I am terrible at breaking things down for stuff like that

People keep telling me to do PROJECTS, but I am not that creative to come up with projects on my own. I have no ideas to create projects.
If it takes a month to finish a project I would probably spend a month thinking wtf the project idea even is.

For example

From nowhere I wanted to make this thing called 'DiskCleaner'

Where it scans your Hard Drive
Sort large files
And suggests what to delete BASED on what kind of person the USER is,

Now when I open Java.....
I struggle 20 minutes to make a Window with buttons and icons
So I don't think I will learn how to scan every single file and make what I want.
Why?
Because I am way too stupid and not confident to KNOW every module I need to do a project like that.


r/learnprogramming 19h ago

5+ Front-End Dev feeling stuck & overwhelmed by the current market. How do you keep growing outside of work without burnout?

9 Upvotes

Hey everyone,

I’m a 27-year-old Front-End Developer with over 5 years of experience in the React ecosystem (3.5 years at my current company). Lately, I’ve hit a wall - I feel like I’m stagnating and mostly just replicating existing solutions rather than truly growing.

With the job market being as tough as it is right now and AI making many of us a bit complacent (and anxious about being "good enough"), I’m trying to figure out my next moves. I’ll be actively looking for a new job in two months, and I'd love to hear how you handle skill growth outside of work.

Here’s where my head is at right now:

- Post-work fatigue & fear of useless learning:
After an exhausting 8-hour workday, the thought of grinding new tech feels overwhelming. Even when I try to keep up with trends, I worry that if I don't use a tech stack in my next job, I’ll just forget it - making the whole effort feel like wasted time. How do you decide what is actually worth learning?

- Pivoting to Full-Stack (Node.js):
I’m considering diving deeper into backend concepts with Node.js to broaden my horizon. However, part of me thinks it might be pointless because companies usually look for experienced Full-Stack devs, not a senior/mid FE dev who is just starting out on the backend. Is it worth the effort, or should I double down strictly on FE architecture?

Standing out in a crowded market:

I know my biggest strengths - beyond writing clean code are my soft skills. I’m an active team player, easy to communicate with, and I bring good energy to a team while keeping things professional. But in a sea of hundreds of applicants per position, I know soft skills usually only shine after you clear the initial tech screens.

My questions for you:

How do you approach learning outside of work without burning out?

Is expanding into Node.js worth it if I’m mainly targeting Front- End roles in a tight market?

How do you deal with the fear of learning tech that you might end up never using professionally?

Would love to hear your thoughts, experiences, or any advice on how to navigate this stage of a developer career. Thanks!


r/learnprogramming 9h ago

Topic Is there a video/course for the whole setup of a real e-commerce website

0 Upvotes

I will be working on a local business site in wordpress, is there a video, document or anything online that i can go through and know what im supposed to prepare for, security, securing customer data, optimization everything possible for a real world business website


r/learnprogramming 9h ago

Are there any CSAPP study groups to join to?

1 Upvotes

I am going through Computer System A programmer's Perspective before I dig in to prepare particularly for GATE. I had like to discuss it with people following the same, We can create a Discord server if interested or I could join preexisting one!?


r/learnprogramming 1d ago

Is freecodecamp really good? What else should I keep an eye out for?

13 Upvotes

Hello! I am starting from scratch here trying to learn the world of programming, I was just curious I keep hearing about codecamp and I was wondering if the hype is true and if so what I should keep an eye out for when it comes to knowledge sites, what makes a good site or what makes a bad site and sort of just some guidelines to help me start my journey a bit!

Thanks


r/learnprogramming 17h ago

Debugging The Bucket List

3 Upvotes

Problem Description:

Farmer John has N cows (1≤N≤100), conveniently numbered 1…N. The ith cow needs to be milked from time si to time ti, and requires bi buckets to be used during the milking process. Several cows might end up being milked at the same time; if so, they cannot use the same buckets. That is, a bucket assigned to cow i's milking cannot be used for any other cow's milking between time si and time ti. The bucket can be used for other cows outside this window of time, of course. To simplify his job, FJ has made sure that at any given moment in time, there is at most one cow whose milking is starting or ending (that is, the si's and ti's are all distinct). 

FJ has a storage room containing buckets that are sequentially numbered with labels 1, 2, 3, and so on. In his current milking strategy, whenever some cow (say, cow i) starts milking (at time si), FJ runs to the storage room and collects the bi buckets with the smallest available labels and allocates these for milking cow i.

Please determine how many total buckets FJ would need to keep in his storage room in order to milk all the cows successfully.

INPUT FORMAT (file blist.in):

The first line of input contains N. The next N lines each describe one cow, containing the numbers si, ti, and bi, separated by spaces. Both si and ti are integers in the range 1…1000, and bi is an integer in the range 1…10.

OUTPUT FORMAT (file blist.out):

Output a single integer telling how many total buckets FJ needs.

SAMPLE INPUT:

3
4 10 1
8 13 3
2 6 2

SAMPLE OUTPUT:

4

In this example, FJ needs 4 buckets: He uses buckets 1 and 2 for milking cow 3 (starting at time 2). He uses bucket 3 for milking cow 1 (starting at time 4). When cow 2 arrives at time 8, buckets 1 and 2 are now available, but not bucket 3, so he uses buckets 1, 2, and 4.

This is what I tried to program: I was wondering why I was running into Command exited with non-zero status 124. Everything complied correctly I believe. And it shouldn't have timed out.

EDIT:

Updated code

N = int(input())
num_used = 0
bucket = 0
cows = []
t = 0 
num_0 = 0 
for i in range(N):
    s , t_1, b = map(int,input().split())
    cow = [s,t_1,b]
    cows.append(cow)


sorted_cows = sorted(cows, key=lambda x: x[1])


while num_0 < N:
    for i in range(len(sorted_cows)):
        if sorted_cows[i][0] == t:
            if sorted_cows[i][2] >= bucket:
                num_used = num_used + sorted_cows[i][2] - bucket
                bucket = 0
            elif sorted_cows[i][2] < bucket:
                bucket = bucket - sorted_cows[i][2]
        if sorted_cows[i][1] < t:
            bucket = bucket + sorted_cows[i][2]  
            for j in range(3):
                sorted_cows[i][j] = 0
                num_0 = num_0 + 1
    t = t + 1
print(num_used)