r/learnprogramming • • Mar 26 '17

New? READ ME FIRST!

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

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

5 Upvotes

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

A few requests:

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

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

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

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


r/learnprogramming • • 15h ago

Solved im kinda proud of this solution i wrote even though it was an "easy" i still felt like i grew a lot

125 Upvotes

the problem:

Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

An input string is valid if:

  1. Open brackets must be closed by the same type of brackets.
  2. Open brackets must be closed in the correct order.
  3. Every close bracket has a corresponding open bracket of the same type.

 

Example 1:

Input: s = "()"

Output: true

Example 2:

Input: s = "()[]{}"

Output: true

Example 3:

Input: s = "(]"

Output: false

Example 4:

Input: s = "([])"

Output: true

Example 5:

Input: s = "([)]"

Output: false

my solution: (on leetcode)

class Solution:
    def isValid(self, s: str) -> bool:
        inputs = {
        "(":1,
        ")":9,
        "{":2,
        "}":8,
        "[":3,
        "]":7}
        
        prev_bracket=[]
        if(len(s)%2!=0):
            return False
        
        for a in s:
            if inputs[a]<4:
                prev_bracket.append(inputs[a])
            else:
                if len(prev_bracket)==0:
                    return False
                x=prev_bracket.pop()
                if x+inputs[a]!=10:
                    return False
        return len(prev_bracket)==0

r/learnprogramming • • 1h ago

How would you go about translating programming language keywords, documentation and error messages to other non-English languages?

• Upvotes

Take Python for instance.

>>> listss = [1, 2, "sfd"]
>>> kook = listss + 2
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    kook = listss + 2
           ~~~~~~~^~~
TypeError: can only concatenate list (not "int") to list
>>>

How would I translate all the results given to me by Python into another language of my choosing, and get something like below (written in Kinyarwanda):

>>> listss = [1, 2, "sfd"]
>>> kook = listss + 2
Ibisobanuro (Ihamagarwa rya mbere riri hejuru yurutonde):
  Inyandiko "<python-ha-1>", umurongo wa 1, muri <igitabo>
    kook = listss + 2
           ~~~~~~~^~~
Ikosa ry'ubwoko: urutonde ugendana nurundi rutonde; ntabwo rugendana numubare wuzuye.
>>>

The intention is not to create custom messages, exceptions, and documentation that sits beside or on top of python. I want python itself to respond like this, from the get-go?

I would like the translation to be complete. CLI options, help messages, information on built-in modules, keywords, everything.

While thinking about this, I realized that the end result would just be a completely new language, and I'm fine with that, but I also don't know enough about creating languages or where to get the source code of an existing language to translate it to a new language, so I come here to ask for guidance.

I'd like to preface this by saying that this doesn't need to be useful to anybody, and if you're wondering why I would want to do such a project, the answer is because I can and want to see the end results.

It's completely fine if no one else ever uses it.


r/learnprogramming • • 12h ago

the missing semester of your cs education

8 Upvotes

I am watching "the missing semester of your cs education"

the profiling and debugging lecture

it explains debuggers like GDP, PDB, and tracing with strace

anyone needed to use that in real life?

I have never used them and fully depended on the IDE debugging


r/learnprogramming • • 6m ago

Has anyone emailed a professor from an online course (MOOC/OCW) and actually gotten a reply?

• Upvotes

I’m teaching myself Python through MIT OCW’s 6.100L course, and I plan to learn C afterward. A few days ago, I emailed Professor Bell to ask how much of what I’m learning—things like problem decomposition, debugging, and recursion—would carry over to C, and what’s specific to Python.

It’s been about two or three days, and I haven’t heard back. I know professors are busy, so I’m not reading too much into it. Still, I’d be happy to get even a short reply.

For those who’ve emailed a professor about an online course you were taking, did you hear back? How long did it take? I’m just curious whether this is typical.


r/learnprogramming • • 18m ago

Hey everyone

• Upvotes

I want to start to build drones, blutooth jammer, rc cars etc I am currently learning python and c++ but when I saw on internet everybody can build it even now kids so I am afraid to that "this is not useful for career" can someone suggest am i right or wrong ????😭


r/learnprogramming • • 5h ago

Which programming field should I focus on

2 Upvotes

I know web development a good amount (eg backends: Laravel, Rails, Django, Springboot

and for frontend I know React)

but people say it's over saturated and going to be replaced with AI

so I think it's not a good choice

then what programming fields do you recommend?

actually not only programming field but anything related to technology

Thank


r/learnprogramming • • 8h ago

Learning Java

3 Upvotes

Hello. I’m trying to learn Java, I’ve done the mooc.fi course a while back. I understand the ground principles of Java but I cannot “make” something out of nothing, always questioning myself and get stuck.

I was thinking of going the way everyone seems to recommend by building your own projects. The problem is if im going to make something like banking account etc. Found some good projects for beginner/intermediate.

What do I do when I’m stuck or don’t know my next step?
Do I google or ask AI for help (not making it write my code).

Any tips would be appreciated, like what did you guys do?


r/learnprogramming • • 18h ago

Topic can two programs produce the same correct output while one is fundamentally wrong?

18 Upvotes

consider two programs that pass every test you give them. one uses a straightforward algorithm, while the other relies on a fragile assumption about the input, an accidental side effect, or a very specific execution order

for the examples you've encountered, how did you distinguish a genuinely correct solution from one that merely survived the available tests?

this seems like an interesting problem for beginners because passing tests is often treated as proof that the implementation is correct, even though the tests can only cover so much

what would be a good small exercise for teaching the difference?


r/learnprogramming • • 14h ago

Once you learn how to make mods for one game, how much of that knowledge can you carry over to mod other games?

9 Upvotes

There’s a game that just came out a month ago, and there are already 50+ mods for it. Like… how do people just “know” how to make mods? From my understanding, all the game files on your computer are compiled into binary so that nobody can replicate it for copyright reasons. So how do modders figure out how to add/change components of the game if they can’t read the source code? Going back to the question in my title, is there just general modding knowledge you need to have that can be applied to all/most games? It would be so cool to be able to tweak any game to my liking, but that just seems like an overwhelmingly big goal to achieve. I know how to code (higher than intermediate, but lower than advanced), but I have no idea where to even start when it comes to modding. And I don’t want to just do it, I want to understand it. I know I can probably just ask AI to do the work for me, but that will teach me nothing.


r/learnprogramming • • 21h ago

Web-development beginner seeking advise

18 Upvotes

HI everyone I am a beginner in web development aspiring to be full-stack developer.

I have started my learning phase and i am currently on The Odin project and W3Schools Pathfinder hoping to gain as much knowledge as there is in that field.

To any pro Programmer or full-stack developer what advise would u give me and what were you doing to sharpen your skills as you were building yourself. I am open to all ideas especially practical related ones .

Thanks for your advice?


r/learnprogramming • • 11h ago

Is this Linux project worth building, or should I try something else?

2 Upvotes

Hey! I'm a second-year CS student looking to build a serious side project to improve my skills and have something worth showing on GitHub.

I'm considering making a Linux tool in C that tracks processes and lets you visually compare different runs of a program (forks, execution times, crashes, etc.).

I'm not sure how useful or original this would be, though.

Do you think it's worth building? Or would you suggest a different project that could be more interesting or useful?

I'm open to completely different ideas. I'd appreciate some honest feedback before spending months on something!


r/learnprogramming • • 11h ago

How to contribute to open sources?

2 Upvotes

Hai, I really want to contribute to open sources project. Whenever i tried to pick a project to contribute,someone else took the bug and He starts to work onit. I felt demotivated and achieving nothing. My question is, do beginners face this usually or are these part of the beginners journey? Can anyone give tips to get open source projects?


r/learnprogramming • • 18h ago

Roadmap query

6 Upvotes

I'm interested in getting into web development. I know basic Java but I'm not interested in Python. Which language should I learn next? Should I continue with Java, learn JavaScript, explore Rust or consider something else? What would be the best choice for a beginner looking to build web applications?


r/learnprogramming • • 12h ago

What to do as beginner programmer? What to code? C/Zig

0 Upvotes

I really struggle with what to do as programmer, i know some basics of C and Zig (mostly just C). I did some stuff in raylib but it doesnt feel like real programming.

In raylib im just drawing shit on the screen and call it a day, there's no memory management. If there is, its very minimal. I could just use Godot at this point and have better results.

I could start with some CLI stuff but that feels like pretty limiting, i could use some TUI libs and work in them but still, im just using library with already made functions and management of resources instead of actually learning how OS works, how memory works and all.

Im currently making a small project called 'salt' which is just CLI installer for my theme (theme is wip, like wip-wip.)

I'd be really glad if someone could help me out with this problem of mine. ^^


r/learnprogramming • • 1d ago

Topic C# or Java?

19 Upvotes

If you had to choose one class between the two, which would you select and why? I tried to Google the purpose of them; the immediate answers from Google felt very vague and like both of the languages are common. Is one course better for web development as opposed to apps or something? Looking at the courses I'm taking, down the line I will select one of the two. The only thing I know so far is C++, so I'm quite new.

Also, side question: why are there so many languages? The only logical thing I can imagine is there were problems that couldn't be solved with say for example C++ so someone created something new. But why not just build on the original language? Why did they need to reinvent the wheel? Or is it as simple as that: someone wanted to create their own thing?


r/learnprogramming • • 16h ago

Help wanted Tutorial for dummies

2 Upvotes

Help please.I don't know anything about github but I would like to learn how to use it since people are always posting resources?(idk If that's what they're called) that would be really helpful to me. The thing is just looking at the site gets me confused sometimes it's like words don't have meaning anymore lol(English is not my first language). How and what should I start learning first so I at least can use the things posted on the site? Should I learn basic coding first?


r/learnprogramming • • 1d ago

How should I start everything from scratch with Unity?

7 Upvotes

Hi, I am a college student studying Game Design. I am in my first year. That I can say genuinely, I love game design.

Back in my high school years, I tried many things through Unity. One year to comprehend Unity. Six months to dive deeper into C#. Then some fundamentals like moving objects, animation basics etc. were fulfilled. After that, it was the time for advancing. I had started to integrate my high school math information into games which required me to use more advanced tricks, techniques. Finally, my dreams started to come to life, with me beginning to FPS mechanics. I had tried to master myself on it for 1 year. As a result, The outcomes were pleasent.

Whereas, my journey came to an end, since University Entrance Exam was approaching. Due to this, I was interrupted for 2 years. If I were to sit down at the computer, I could do NOTHING, except for some basics.

So I want to start everything from scratch with Unity and game programming. I want to learn everything of it with necessary things like mechanics, c#...


r/learnprogramming • • 17h ago

Resource Free and open-source visual Git learning tools / resources

2 Upvotes

Hi all,

I've seen some posts here recently asking about resources / tools to help learn Git. Over the years I've created several free and open source visual Git learning tools (and free resources built on top of them) for this purpose. Personally I found Git to be very abstract and difficult to wrap my head around initially, so I wanted to share to try and help newer Git learners on their journey.

The first is a free and open-source tool called git-sim (https://github.com/initialcommit-com/git-sim), which I released in early 2023 that lets you visually simulate any Git command directly in your own repo before actually running the command. It basically shows you a clear interactive animation of exactly how any Git command will impact your specific repo so you can learn from it, and so you don't need to be scared about what that command will do before running it. The animations open in your browser in less than a second, and it can even be run in "live mode" where it watches your repo in real-time and animates any Git commands that you run. So you can essentially record your entire Git workflow, save it, learn from it, share it, create your own learning resources, etc. (git-sim also works inside VS Code or Jupyter notebooks if you're using those).

The cool thing about being able to easily generate these web-first Git animations, is I was able to use them to build other Git learning resources. I used git-sim to create a set of 16 free visual, interactive Git lessons that use the analogy of a Git repo as a scrapbook that you glue different "mementos" (files and commits) into: https://initialcommit.com/learn/git

I also used git-sim to build an animated, customizable Git cheat sheet with 128 Git command visualizations (https://initialcommit.com/learn/git/animated-cheat-sheet). The sheet can be easily filtered, customized specifically to the commands you need/want, downloaded, and printed. The printed version has a QR code you can scan to load up that exact set of commands in animated-form on the website. (Note: to download/print there is an email submission form, but it is free.)

Lastly, around the time I originally released git-sim, I created git-dummy (https://github.com/initialcommit-com/git-dummy), a free and open source tool that lets you auto-generate realistic, dummy Git repos with a variety of different structures. I've found that one of the difficulties practicing Git commands is that you often don't want to do it on a real repo because you don't want to mess up your work, so being able to generate these fake, safe repos to play around in can be really useful for learning. (I also happen to constantly need repos of specific structures to test my tools, so it serves multiple purposes).

Anyway, that's about it. Good luck with Git everyone 🙂


r/learnprogramming • • 1d ago

Code Review PR Reviews

11 Upvotes

Been getting tasked with reviewing PRs more and more at work. Happy to have that responsibility and grow in that fashion. However, i'm also nervous about doing it properly.

Atm i have a process of sorts to work through things. Understand the change being made (filtering out a column value, combining datasets, manipulation etc). Approach to the change (drop nulls, join v union etc, creating an additional column from scratch or something). Execution of the change. Was it overly verbose and wasteful. Were certain downstream effects not properly accounted for etc

If it all looks good to me. Then I approve. Sometimes I might meet with the programmer to ask questions based on notes as I go through the PR. Other times I don't as it's not needed and I get things clearly.

Would like to know what approach some of you use? Why/how you it? Do you have different tactics for different situations?

Any advice/tips will be appreciated. Just looking to improve and get better at this process as I think it'll also help me get a better understanding of system design and large scale architecture which is something I want/need to get better at


r/learnprogramming • • 19h ago

feeling very inefficient

0 Upvotes

I'm learning HTML as my first "language" because my school requires it. I'm just starting out and I feel inefficient. Why is that? Does every programmer start out like this? A contributor also might be AI because I made AI web apps in the past and it was mind blowing. If I wanted to make a web app like the AI did in 12 minutes I don't think I could finish it in 2027😂.


r/learnprogramming • • 20h ago

Debugging Self Supervised[Vit] vs. Supervised[CNN]Discussion

0 Upvotes

Hi everyone,

I am working in the Multi-Task ML projects in that i have done many experiments to train the model
Key finding:

CNN based architecture outperform the Vision transformer based architecture

Question:
is the Dataset only be the problem for Vit architecture to underperform the CNN bases architecture?


r/learnprogramming • • 1d ago

Honest advice needed: How should I learn DSA in C++ from basic to advanced as an average student?

3 Upvotes

Hi everyone,

I’m a 2nd-year B.Tech CSE student, and I want to start learning DSA seriously for internships and placements.

To be honest, I consider myself an average student. My maths is average, and I’m also quite lazy and struggle with consistency sometimes. I know I need to improve my discipline, and I genuinely want to work on it instead of wasting more time.

I have a few questions and would really appreciate honest advice from people who have already gone through this journey.

  1. Where should I learn DSA from scratch to an advanced level?

I’ve seen people recommend Striver’s A2Z DSA sheet, various YouTube playlists, and other courses. There are so many resources that I’m confused about which one to follow.

Which resource would you recommend if you were starting again as a beginner? I want to build strong fundamentals, understand the logic behind problems, and eventually become good at solving interview questions.

  1. Should I complete C++ first or learn it alongside DSA?

Suppose I want to do DSA using C++. Should I finish the entire C++ language before starting DSA, or is it better to learn the basics first (loops, functions, arrays, pointers, references, basic OOP, STL, etc.) and then start DSA while improving my C++ skills along the way?

I don’t want to waste months learning every detail of C++ before even beginning DSA, but I also don’t want weak programming fundamentals to become a problem later.

  1. How much time does it realistically take?

If I study consistently for 1–2 hours daily, how long might it take to become comfortable with DSA, solve problems independently, and reach an interview-ready level?

  1. What mistakes should I avoid?

If you were in your second year again, what would you do differently? Should I follow one course, solve problems daily, maintain notes, revise regularly, or do something else?

I’m not looking for shortcuts or fake motivation. I want practical advice from people who have actually learned DSA and used it for interviews or placements.

Please be honest, especially about the consistency required and what I should realistically expect as a beginner.

Thanks!


r/learnprogramming • • 20h ago

Concerned Kid Concern about AI.

0 Upvotes

This is probably every beginners concern since AI went mainstream, and so is my.

I am in grade 8 and have always liked the idea of programming as a kid and recently decided to give it a try with python and the CS50’s (haven't yet).

First of all, its not that i am programming only for money, but it natural to feel it can provide a sustainable income or some other financial value.

Second of all, I know that its impossible to pinpoint or predict the state of AI especially by the time i become an adult.

And that's where AI comes.

Can i still code? Yes
Can it provide a value in the future? ...?

I don't think i need to explain how AI plays a role here.

sorry if the post is trash.

Edit: I have decided to pursue programming, but more of like a side thing, after all i am in 8th grade and plenty of time to decide.