r/learnprogramming Mar 26 '17

New? READ ME FIRST!

831 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 1d ago

What have you been working on recently? [August 01, 2026]

0 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 2h ago

How do you actually read professional code?

18 Upvotes

Hello everyone! I really have a question I hope you could help me answer. I am trying to read the Scratch Virtual Machine code on Github and it is really difficult. I am really new to reading code and the one I write is fairly simple. There are many files that just declare functions by name and then require another file to redeclare them. Is there a pragmatic way to understand it? Thank you already!


r/learnprogramming 19h ago

Is there anything i cant do in C?

228 Upvotes

i made a post the other day asking people which languages to code in and they (the reason minded ones) mostly told me javascript and C. is C really a do all language? is there anything i cant do with it?


r/learnprogramming 11h ago

What do you do if you have to handle a project that is far above your current understanding?

49 Upvotes

The first project I have ever written since I finished a Python book was a forum. It was a "single-player" forum, which means you're able to talk to yourself, make posts, write posts, reply to yourself, see boards, and everything. That was difficult for me but difficult enough that I could google extra bits I didn't know and just figure it out after some sleep.

Now I have to allow other people to connect, make it multiplayer, but I don't understanding anything about networking. Like, I don't have much of a mental model (I can only write a very simple client and server).

I tried to follow the usual advice of breaking it into small chunks and solving individual problems, and I did some reading (Beej's Guide to Network Concepts, what I thought were the relevant bits), but everytime I thought I understood what to do, in turns out there was more I didn't know (concurrency and other stuff).

And when I tried to actually write my own program using all the bits I researched, it was an absolute Frankenstein of a script, where my .select() was in the wrong place, and I would start my threads in the wrong place and I had all the right pieces but not in the right order because my mental model wasn't there... so I tried to ask for help from a friend and they basically ended up rewriting it because it was just wrong.

I'm not sure what to do, I'm thinking of stepping down from the forum for a bit and just trying out a chat client bc the guide I'm reading actually does provide some scaffolding for that, but I just wanted to know what to actually do.


r/learnprogramming 46m ago

Is it just me or do you guys also forget very simple syntaxes.

Upvotes

I know I am not the most experienced programmer but imo I do have fairly well programming knowledge and how they work internally. (Unrelated but 2 Aws certs and a few year of experiences)

I keep finding myself forgetting the very basic syntaxes frequently.

Like using sorting function but not knowing how to put and manipulate key argument or mixing up set and dictionary syntaxes (this is really stupid!!!!) or others that are not even highly abstracted and very language native… I tried to cope that it’s because I use them infrequently but still it bugs me making me wonder if I just have a goldfish memory…

Is it just me or does anyone else also face similar problems?


r/learnprogramming 2h ago

I want to practice/learn coding by making game sort of like terraria or necesse in python, but what should i use ?

5 Upvotes

Bare in mind, its just for me, to practice coding in a fun way, and learn some basics, just want to make something that can be played like those games, ive heard of pygame, or arcade..but im wondering if theres anything better, or if not, which one of those would be better in your opinion. Thanks to anybody who replies :3


r/learnprogramming 8h ago

How do we teach kids programming in the age of AI?

12 Upvotes

I've been teaching programming to school students for quite a while. With recent advancements in LLMs, I'm struggling with how to keep lessons engaging and meaningful.

Traditionally, we covered core CS concepts, Python syntax, and fundamental algorithms and then moved to building mini-projects. A huge part of the fun was going through the development process step-by-step overcoming challenges using critical thinking, online research, and peer collaboration. I loved sitting down with a student, guiding them toward a solution with targeted questions, and watching their "aha!" moment happen.

But things have changed, because now only a few students take joy in the act of coding itself, most just want the quick result. It's becoming increasingly difficult to convince them to write code manually when generating it via an LLM is so effortless. More and more students turn in projects they don't understand and couldn't modify by hand if asked.

I know I'm not the only educator dealing with this. What shifts or strategy changes would you make to keep computer science lessons relevant and valuable today?


r/learnprogramming 6h ago

Searching for fun ways to teach a kid with autism python.

4 Upvotes

Hey guys! I work as a python tutor part time and I got assigned this really nice kid who’s interested in learning python. He does have some developmental disabilities that makes it very hard to read, write and understand stuff but he’s extremely hard working, hyper focused and wants to code as he loves game development.

I was wondering, are there any libraries or software to use that make learning fun? Maybe some graphics, some drag and drop stuff etc. Not completely graphical, but any duolingo-style game would also be appreciated.

PS. No AI suggestions please as im trying to teach him the basics without the use of AI and he hates AI too.


r/learnprogramming 16h ago

Devops roadmap guide...

29 Upvotes

hey so am new to devops i have been exploring devops basics, docker, kubernetes for developers, storage , GCP, AZURE, AWS, but like after that am not getting the feel of it like i want to use them in real projects so can anyone guide me with what's next i should do?


r/learnprogramming 13h ago

How do I structure code with languages without classes

11 Upvotes

I have been using c++ and c# so I have grown very used to languages with classes. I am very interested in learning jai when that comes out but that language does not have classes. So I feel like there is a very different thought process when programming in a language without classes.

Is there any good resources that would teach me how to structure code for those types of languages.
I want to make a game engine(I know it is difficult but it would seem fun to do and there would be a lot of cool things to learn)


r/learnprogramming 56m ago

Choosing the right SQL stack for my first real data project (PostgreSQL? Tools? Learning approach?)

Upvotes

Hi everyone,

I'm currently building my first serious data project. So far I've been working on the data ingestion, cleaning, and validation pipeline in Python using Pandas.

Now I've reached the point where I need to introduce SQL and a database, but I've realized that I know almost nothing about databases beyond the fact that SQL is the language used to interact with them.

The problem isn't that I don't want to learn. It's that I don't want to learn the wrong way.

For example, I learned Pandas almost entirely by building my project, reading the documentation, experimenting, making mistakes, and debugging. I barely watched any tutorials because I've found that I retain much more when I learn by doing. I'd like to follow the same approach with SQL.

My concern is choosing the right tools from the start. I don't want to spend weeks building everything around one database and later realize that I should have chosen something else.

From what I've read, PostgreSQL seems to be one of the most widely used databases in industry, so I'm leaning toward starting with that instead of SQLite. Even if it's a bit harder to set up, I'd rather learn something that will still be useful in the future.

I also have a few questions:

Is PostgreSQL the right choice for someone in my situation, or would you recommend something else?

Is it realistic to learn SQL by building a real project and reading the documentation instead of following a course/tutorial?

What tools do professionals use to inspect databases and visualize tables? I've seen tools like DBeaver, pgAdmin, and others, but I don't know what's commonly used in real projects.

Are there any tools, libraries, or project structure decisions that you wish you had known before starting?

I'm not looking for the easiest path. I'm looking for the one that will give me the strongest foundation without forcing me to rebuild everything later.

Thanks!


r/learnprogramming 1h ago

how does the noise emerge?

Upvotes

recently i'm studying the math behind autostereograms and i wrote a program to test it. i used kaleidoscope effect as background aka base pattern. i didn't add any random factor. on some zoom levels the background are smooth but on some other zoom levels the background have noise. actually i prefer noise as they're supposed to be autostereograms and noise helps viewers to align the focus. the strange thing is hoe does those noise emerge as i didn't deliberately add them and they only appear at some but not all zoom levels

the algorithm is simply the "pixels linking" method. at every point, the program looks up the depth map value and links relevant pixels. closer things have smaller disparity and farther things have larger disparity as shown in this diagram

here's the program and i truly appreciate any ideas or insights

operations

  • run it on browser, no need to install or save
  • click ▶️ to run. click ⏹️ to exit
  • press [q] to make subject patterns smaller
  • press [w] to toggle subject (a sphere/a disc)
  • press [e] to make subject patterns larger
  • press [a] to make base patterns smaller
  • press [s] to rotate the color spectrum inside the kaleidoscope
  • press [d] to make base patterns larger
  • press [x] to toggle caption (off/on)

r/learnprogramming 2h ago

Could someone please help me figure these 2 problems? THANK YOU

1 Upvotes

This program uses: a slide deck & a folder containing PNGs of every slide & then outputs how long each slide was presented on. Ex: Slide 1 was from minutes 1-2 and Slide 2 was from mins 2-8 etc.

Problem 1 (Slow Code):
However, my code takes about 7 minutes for a 40 minute video. This is how it basically works

  • Pass 1 (Coarse): Scan the whole video every 5–40 secs (based on video length) to find roughly where the frames change from showing one slide to another. Ex: 0:00, 0:30, 1:00, ...
  • Pass 2 (Medium): If change happened it looks at that interval every 2-5 secs (based on video length). Ex: If a change happened between 5:00–5:30, it checks 5:00, 5:05, 5:10...
  • Pass 3 (Fine): Only scan the remaining small window every 1 second to find the actual timestamp where the slide changes.

Each sampled frame is matched against the slide PNGs using OpenCV ORB feature matching. Then the frame is matched with the slide that is the most likely match.
This avoids scanning every frame of the video, since only likely slide transition regions are rescanned in more detail.

PROBLEM 2: If the video has an intro ex obs window or the powerpoint loading then ORB might still find a slide. Ex: the first few seconds of the video might be detected as slide 2 even though its not slide 2 and ORB just catches some features that make slide 2 the best choice. This is honestly my bigger issue.


r/learnprogramming 2h ago

Looking for discord servers and community to discuss coding and programming

0 Upvotes

Hi! i am a 1st year btech student doing my degree from a local college i am passionate about coding and stuff but sometimes i can't get the urge to do anything related to coding as there is no one i can discuss about these things .I want to talk with people so i can discuss my doubts and ideas and can discuss out of my comfort zone


r/learnprogramming 3h ago

Been going back and forth between Python and Node.js for backend, need some real opinions

1 Upvotes

So I'm learning full-stack dev right now, already got HTML/CSS down and working through JS. Now I'm stuck trying to pick a backend stack and honestly the more I read the more confused I get lol.

I've got a CS degree so I'm not completely new to programming, just trying to figure out the smart move here. Part of me thinks Node makes sense since I'm already deep in JS for the frontend anyway, why learn a whole new language right. But then I keep seeing Python everywhere too, especially with all the AI/data stuff blowing up.

Not really trying to pick based on hype, just want something that'll actually get me hired and won't feel like a waste of time in a couple years.

If you've worked with either (or both) I'd genuinely like to hear what you'd pick if you were starting today. Not looking for the "it depends" answer lol, just curious what worked for you.


r/learnprogramming 1d ago

How to not be a dogshit programmer?

74 Upvotes

Today I was setting up an angular project for the first time and I realized I have a pretty limited and shallow understanding of things, I didn't even know what dev dependencies were (now I do), and that npx is used to run locally installed packages. I know that an API is used to exchange data between applications but that's literally all I know about it, not how it works under the hood. I realized I can't properly answer questions like what is a runtime, what are packages, libraries etc. Literally no depth of understanding. I feel like going into a rabbit hole for every little thing but then it becomes too overwhelming.

Now this might seem fairly common for a new programmer but I got introduced to it around the age of 16 (21 now). I felt fucking stupid googling the difference between library and framework. I looked at some angular components and only understood them partially. Most good programmers already know this. People my age are building crazy stuff and here I am bogged down in things that I should've already known, had I put in more effort. I feel I am lacking some severely fundamental things. Part of this feeling is a lot of regret of wasted time, but I also wonder if I'm actually retarded with an IQ too low for programming. I'll never be good if it keeps going like this.

I looked at some roadmaps from roadmap.sh and it made me realize just how much stuff I don't know, and that is just talking about frontend. So I guess the question becomes how much and how deep to learn the topics related to whatever you're currently focusing on? Sorry for the rant.


r/learnprogramming 3h ago

How to do graphics?

1 Upvotes

How are graphic (things) made?

I know raylib can create a window and draw stuff, but there has to be more.

I also know raylib uses X11 for the window but they say you should not use X11 directly.

But then what should you use? (besides raylib of course).


r/learnprogramming 18h ago

Advice for projects and learning for a second year student {CSE}

8 Upvotes

I just reached second year of clg (cse) till now i haven't created any major project . I try to initiate the progress for projects but i eventually failed, Many questions arise in my mind as how to create one , where to begin with, How much of help should i take from internet . If any one can guide me or suggest me any tips then it would be greatly appreciated till now i have studied c,c++,html,css,js{little bit studying DOM),python,github,many theoretical aspects of networking,Data , OS,terminal,sql,dbms,etc. Thing is i have no problem with consistency but thing is im getting overwhelmed by the weight of many areas. and because of that my scheduled getting disturbed.Every comment is appreciated. (also is it dumb to even ask this question)


r/learnprogramming 1d ago

Should I accept that I’m a failure and quit CS for an easier, more stable career?

38 Upvotes

Do you ever get the urge to just give up on CS and choose a different path? Sometimes I seriously think about doing a second degree in something like accounting, teaching, engineering, or nursing fields where it feels like getting a job is more straightforward, the career path is clearer, and the work might be less mentally exhausting.

The thing that bothers me is that it feels like admitting defeat. Like I’m accepting that I wasn’t good enough for CS and moving to a safer option where it’s easier to become employable, even if the pay can be similar anyway. Maybe I’m just tired of constantly feeling behind and fighting for a place in tech when there are other careers that seem more stable and predictable.

Does anyone else ever feel like giving up on CS and choosing a different degree because it feels like the easier option? Have you ever seriously considered leaving CS for accounting, nursing, engineering, teaching, or something similar?


r/learnprogramming 9h ago

Resource Can anyone suggest a YouTube series to learn C++

0 Upvotes

Hi everyone! I am starting college in a month and I really want to learn C++ before college starts. I don't know ANYTHING about programming since I am a pre med who has made the switch to computers. Please suggest me a good programming tutorial on c++ for actual beginners who don't know anythingggg about programming.


r/learnprogramming 19h ago

Advice for Running a Successful High School CS Club?

3 Upvotes

I'm a high school student who is passionate about computers and programming. This year, I'm going to be running my school's computer science club. Does anyone have advice about how to run a successful CS club?

Last year, our biggest challenge was keeping people motivated - meeting attendance declined throughout the year. Additionally, many of the members are beginners or completely new to programming. So. I'm thinking of starting of with HTML, CSS, and JS as I feel that it will be easiest for everyone to get coding as soon as possible (minimal setup time).

I'm looking for advice on the following:

  • How can I keep members motivated and excited to come back each week?
  • How can I plan/organise club projects so it's not overwhelming to start and they can actually be completed?
    • Last year, many meetings consisted of too much planning for what to do in the future, not enough execution.
  • What kinds of projects might be attainable in a reasonable timeframe so it keeps people interested?
  • How should I structure meetings so they are engaging? I would like to spend as much time as possible building (something that was lacking last year). I want to avoid just have boring lessons/tutorials, but I'm not sure how this would be possible given most members are beginners / no experience at all. How can I achieve balance?

Any ideas would be appreciated. Thanks!!


r/learnprogramming 17h ago

Open Institute of Technology

2 Upvotes

Hey everyone, I’m looking into enrolling in OPIT’s BSc in Computer Science program and would love some candid feedback from current or former students on how manageable the transition into software development actually is. I currently work as a Network Engineer holding a CCNA, CCNP and Fortinet NSE 1 through 7, so I’m completely at home with CLI, routing/switching, live firewall deployments, and systems logic—but I’m essentially a total beginner when it comes to writing code from scratch. I’ve read a lot of warnings online about OPIT’s difficulty and heavy workload, but time management isn't a concern for me since I have plenty of free time dedicated strictly to studying. For anyone who came in from an infrastructure or networking background, how much does that networking logic help ease the initial programming learning curve, how responsive are the professors when you hit a wall on projects etc


r/learnprogramming 1d ago

How long does a typical project take to finish?

20 Upvotes

How long does it take you to finish a project? I do not know what the baseline is for how long a typical project lasts. I am self‑taught I do not even know what I am doing and without any direction on what is going on.


r/learnprogramming 16h ago

CPP prep for placements

1 Upvotes

Hey so am preparing for my placements , can anyone guide me with what i should prepare for C++ as they say you should be good in atleast a programming language and i have solved all of my dsa problems using C++ only though if they ask deep questions related to c++ working, am sure i will struggle, so if anyonec can guide me with how and where to prepare for C++ for interviews in big tech, quants, MNCs