r/learnprogramming • • Mar 26 '17

New? READ ME FIRST!

826 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 • • 5d ago

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

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

Junior dev here: how did you get from "code that works" to senior-level Python?

125 Upvotes

I'm a junior developer at my firm, about 1–2 years in. My code works, but when I compare it to what our seniors write, theirs is cleaner, easier to follow, and holds up better when requirements change. I want to close that gap deliberately instead of hoping it happens over time.

For context, I'm comfortable with functions, loops, classes/OOP, and basic testing. I mostly work on automation and scripts, and I've noticed my scripts tend to start small and turn messy as they grow.

I'd love advice on:

What actually separates senior-level Python from junior-level? Is it mostly design, naming, testing, or something else?

How do you structure automation code so a quick script doesn't turn into an unmaintainable mess?

Books, codebases, or resources that changed how you write code. Are there open-source projects worth reading?

Habits that helped you most, like code reviews, refactoring old code, or writing tests first.

Common junior mistakes you'd tell your younger self to stop making.

Thanks in advance, I really appreciate any pointers.


r/learnprogramming • • 32m ago

What are the most complicated programming topics you want to learn easily?

• Upvotes

Hi all, I am creating a new Youtube channel being a software engineer in one of the top tech giants, suggest a topic for which you want a simple explanation I will create that one for you and broad audience.

Created one for two pointers here: https://www.youtube.com/watch?v=Vv0qD6RbWXg


r/learnprogramming • • 40m ago

is stack memory manages by both os and compiler?

• Upvotes

I'm moving from a higher-level language (Python) to Rust and getting confused about how memory is managed.

my current understanding is that each process gets its own virtual memory, which provides protection and isolation. Within that, there's the stack and the heap. The heap is managed by the programmer, while the stack is managed automatically. But who actually manages the stack?

Is stack memory just a logical abstraction, managed by the OS and the compiler (by moving stack register)?


r/learnprogramming • • 17h ago

When languages "just become about syntax"

33 Upvotes

I have seen a lot of post saying "once I learned C - all other languages just became about syntax"

Has that been true for you? Or did a different language give you the eureka moment - e.g. something like Assembly?

Or is it just a false premise at all to think "once I learn programming language X - then all other languages become **easy**"


r/learnprogramming • • 3h ago

Tutorial Qt Quick + QML GUI App Tutorial Series Suggestions?

2 Upvotes

I am a freshly minted C++ Qt developer in that I just completed an online course for C++ and the basics of the Qt framework within the past few days.

I am looking for video tutorials on how to build a GUI application using the Qt framework using Qt Quick and QML. For reference, I am not completely new to programming. I am a full-stack mobile and web developer who has been developing both types of applications for years. My tech stack in React (Next.js)/React Native on the front-end and pure Django or Django REST Framework + Django Channels on the backend.

What originally got me into web development was Corey Schafer's Django tutorial series which guided me through developing a web application using Django assuming I already knew HTML, CSS, and Python. That is when I learned that I learn best with YouTube video series I can follow along while the instructor explains what I'm coding. Is there any such series for Qt Quick and QML like building a notepad app? YouTube search results only turn up outdated tutorial series using Qt Widgets which IS NOT what I'm using and am avoiding because I want to construct the UI using QML files, not the widget picker.

Thanks in advance for your help!


r/learnprogramming • • 48m ago

Why the Two-Pointer technique actually works: A visual intuition from O(N²) to O(N)

• Upvotes

When first learning array algorithms, a common intuition is to use nested loops: for every element, scan the rest of the array. That gives you an O(N²) quadratic bottleneck.

The Two-Pointer technique eliminates this entirely, reducing time complexity to O(N). But many people memorize the code without understanding *why* it is mathematically guaranteed to work without missing valid pairs.

Here is the core intuition:

  1. The Monotonicity Property:

    The array must be sorted (or possess a monotonic property). This means moving a pointer in one direction guarantees values will strictly increase or decrease.

  2. Pruning Search Space:

    Instead of checking all N² combinations:

    - If sum(Left, Right) > Target: Because the array is sorted, NO element to the right of Left can ever pair with Right to make a smaller sum. You can safely discard the entire Right element (Right--).

    - If sum(Left, Right) < Target: By the same logic, you can safely discard the Left element (Left++).

With every single comparison, you discard one entire row or column of the search space. N elements = at most N operations.

I made a clean visual animation breaking down the step-by-step pointer movement, how the search space shrinks, and the underlying mathematical invariant:

▶️ Watch the visual animation here: https://www.youtube.com/watch?v=Vv0qD6RbWXg

Hope this visual perspective helps anyone currently learning algorithmic fundamentals! Let me know if you have questions on edge cases like duplicate elements or three-pointer variations.


r/learnprogramming • • 1d ago

How to become a Full Stack Developer

66 Upvotes

Can you guys suggest a solid platform or a YouTuber where I can learn to become a full-stack developer?


r/learnprogramming • • 2h ago

What are the tradeoffs between monolithic and microservices architecture

1 Upvotes

When designing an application, one of the key decisions is whether to use a monolithic or microservices architecture. I've seen both approaches used in different projects, and each has its pros and cons. Monolithic architectures can be simpler to develop and maintain, but may become unwieldy as the application grows. Microservices architectures, on the other hand, can provide greater flexibility and scalability, but may introduce additional complexity and communication overhead. What are some factors to consider when deciding between these two approaches, and how do you determine which one is best for a given project?


r/learnprogramming • • 10h ago

how do you get faster at understanding a new codebase?

3 Upvotes

Hi all. I'm a student who recently started contributing to opensource. So far it's been small stuffs like a docs PR and a fix to a tool I was using myself. I've really enjoyed it and want to spend more time on it.

Lately I feel slower than people who use AI. It takes me longer to understand a new codebase and find where to make changes. Also I saw many projects using Ai for code reviews and making issues. Because of this, I find it really hard when I try to contribute.

So I'm curious about a few things:

  • How do you use AI when you contribute code, and for which parts?
  • If you don't use AI, what would you recommend for a beginner like me?

I'm not asking whether AI is good or bad. I just want to hear about your experience.

English isn't my first language, so sorry if anything sounds a bit off.

Thanks.


r/learnprogramming • • 1h ago

How are you handling xHarbour with Modern AI? Seeking tips for a 30-year-old legacy codebase.(Como vocês estão usando IA com xHarbour? Dicas para um sistema legado de 30 anos.)

• Upvotes

Hi everyone,

I’m currently working with a legacy system built on xHarbour that has been running for about 30 years.

As you can imagine, maintaining and expanding a codebase this old comes with its challenges. Lately, I’ve been trying to leverage Claude to help speed up development and assist with coding, but I’ve hit a major roadblock: the AI really struggles with xHarbour.

Because xHarbour is a niche language today, Claude often confuses its syntax, hallucinates functions, and fails to recognize the specific patterns and architecture of our 30-year-old system.

I would love to know:

  • How are you using Claude with xHarbour? Have you found any prompt engineering tricks or specific instructions that actually work?
  • Claude Projects / Context: Is anyone using the Projects feature (in the Pro version) or feeding documentation and large chunks of code into Claude to help it grasp the system's patterns?
  • Alternative Approaches: Are there specific techniques or setups you recommend to make Claude perform better with the Clipper/xHarbour ecosystem?

Any advice, prompts, or experiences you can share would be incredibly helpful! Thanks in advance.

-----

Fala, pessoal! Beleza?

Estou trabalhando atualmente em um sistema legado desenvolvido em xHarbour que já tem cerca de 30 anos de estrada.

Como vocês devem imaginar, manter e expandir uma base de código desse tamanho e dessa idade traz muitos desafios. Recentemente, tentei usar o Claude para agilizar o desenvolvimento e me ajudar com o código, mas esbarrei em um grande problema: a IA tem muita dificuldade com o xHarbour.

Por ser uma linguagem de nicho hoje em dia, o Claude às vezes mistura a sintaxe, inventa funções que não existem e não consegue reconhecer os padrões e a arquitetura de um sistema de 30 anos.

Queria saber da experiência de vocês:

  • Como usam o Claude com xHarbour? Conseguiram criar algum truque de prompt (instruções específicas) que faça ele entender melhor a linguagem?
  • Claude Projects / Contexto: Alguém usa os Projects do Claude (na versão Pro) ou alimenta a IA com a documentação e partes do código para ele conseguir pegar os padrões do sistema?
  • Ferramentas Alternativas: Recomendam alguma extensão ou técnica que ajude o Claude a lidar melhor com o ecossistema Clipper/xHarbour?

Qualquer dica, relato ou compartilhamento de experiência vai me ajudar muito. Valeu!


r/learnprogramming • • 22h ago

Debugging Python code takes 10-20 seconds to start

10 Upvotes

Hello, I started learning python recently I dowloaded it, also vs code and python extension for it.

The poblem is, when I start a programm (even a simple one, whick only takes an input fron the user and prits it) takes 10 or more seconds to start or just dosen't work at all then i clic soething and it kindof crashes itself, but thats my fault for mesinf with it, when I leave it, it just takes really lng dose somone know how to fix it and/or how to make folders proporly and where to keep them (could be the problem)?


r/learnprogramming • • 7h ago

Hit a wall early on. Should I just quit?

0 Upvotes

I took a coding class in high school. I think it was html and javascript. It was honestly terrible. I just copied answers halfway through the course because it got too complicated.

Large projects scare me. I see this wall of text that isn’t in english and I’m expected to understand it.

I‘m in college now and I’m taking a cse course (long story). It’s java, and it was fine for the first couple of weeks. Now we’re on loops. All of this syntax is getting difficult to remember and looping logic (specifically nested loops) takes a long time for me to understand.

I know it will only get worse and more complicated from here. I know looping is relatively simple. Should I just finish the semester and never touch this again?


r/learnprogramming • • 21h ago

Slow at problem solving and stuck for too long - missing eye for detail

5 Upvotes

Hey devs

I am a developer with 4.5 years of experience, mostly backend ( java with AEM ) and some frontend but not crazy animation stuff. I have a few problems and need help to fix that from propele who have faced it.

  • I am slow with my tasks, I stare and overthink too much. I feel like my archiotect does the job in 2 hours that I take a whole day ( like 10-12 hours ) to even finish to an extent. It is not that I use social media or anything in between, i sit down and stay literally glues to my laptop try my best except for the lunch and evening break. But my productivity is very low.
  • 2nd I have a very bad eye for detail. i build things and miss the basics which are always visible to my archietct at just a glance. Certain scenarios, certain edge cases and even a lot of basic obvious things I miss. I am almost at the level of mid senior dev as I am hitting 5Y of experience, I cannot be like this
  • I cannot think like an architect;
  • I cannot rcommend a good solution approach. I cannot even think of the big system which to an extent I am supposed to be able to as per my role .
  • I am afraid of new things ( when a problem comes I become anxious instead of excieted ). My juniors say I am doing good, and I am a good mentor and I have good capability but I do not even feel that way. My thoughts feel limited and I cannot think beyond the small component ( cannot think in terms of systems and integrations).
  • And I am afraid to lead things, to take the role where I am supposed to own my decisons and the whole project.

Anyone with some experience or someone who has overcome this please share your story or how you did it and how I can do things. I need this very badly, cannot talk about these with my seniors exactly but I need a roadmap to actually become more cpable, more competent and a lot better engineer ( not a coopy paste guy or a guy who just does what his architect and manager tells him to do. I do not always want to wait for the instructions )


r/learnprogramming • • 20h ago

Topic Where to start coding games

3 Upvotes

I'm wanting to start learning game dev, and am using python (open to better recommendations), what is the best game engine I should use? Im thinking about making a clicker game as my first project, or just a text based game.


r/learnprogramming • • 1d ago

First job anxiety

28 Upvotes

​

I recently got a job from a totally new field I have not worked in before, software development to be exact. My only experience with this is from school, which was very thin and some very small testing I've done myself.

They all know I'm new to this, but lack of training and guiding is what gives me anxiety. Everything is huge (codebases, databases, everything) and even the field the company's software is for, is very foreign to me.

The HR "training" was good and I was told that the other employees will help me out, but in fact they all seem to be very distant and while they do help a bit, I feel like they want to get out of the situation asap. My first days have been going through codebase and db and trying to figure out how everything works. I was given a task to implement a small feature, but no one is aware of that and the answers I get, don't necessarily answer my questions.

I feel overwhelmed, anxious and exhausted already. I feel like I'm supposed to do stuff already, but I also feel like I'm a burden. The team is quite small and everyone got their hands full of work already.

I know a lot of you have been in this same situation. Did things figure themselves out at a time or how it ended?

Cheers!


r/learnprogramming • • 21h ago

I want to study Data Structure and Algorithms efficiently for my exams and logical building, among C and C++ what should i choose?

3 Upvotes

I've learnt both of these languages in earlier semesters and felt comfortable, but for DSA, i can't decide what to choose...


r/learnprogramming • • 10h ago

Which one on these languages shine the most within Devops, Python, Java, or Golang and why?

0 Upvotes

I am interested in all three although I’d have to start with one realistically.


r/learnprogramming • • 20h ago

Video games recommandation to learn about computer architecture

2 Upvotes

Does anyone know a game that is good for learning about computer architecture ?

The ones I found so far are: turing complete, tis-100 and shenzhen I/O
From what I searched online it looks like tis-100 and shenzhen I/O are only about writing assembly code while turing complete goes beyond that with binary code and such.
I just wanted to know if turing complete would be the better choice here or if anyone has other recommandation for this !


r/learnprogramming • • 1d ago

nowadays, what do you actually need to be able to do without AI?

21 Upvotes

this might not be the best community to ask this but idk much about reddit. if theres a better one pls let me know

ok, lets suppose you were suddenly responsible of three interns at your job for the first time ever. what do they actually need to learn that cant just be done with AI?

that might or might not be my situation lol...

ok but for real. its been just two weeks, but im at a lost about what should i teach them (other than company stuff itself)

i learned to code wayyy before AI so tho i used it nowadays i have no idea how is the experience of learning alongside with it. i have also been working at the same company for many years so idk what the job market is looking for, specially at junior level. therefore idk how exactly to direction them.

they know the foundations since they're all majoring in CS. the company encourages the use of AI and it seems like they can just do everything already... i dont feel like im teaching them anything.

i make them explain everything AI is doing before they can actually use that code but thats too simple. i dont feel like its that useful, more like decorating stuff for your test.

i'm thinking of doing an exercise where each friday i break something on their code and make them fix it manually, but idk. is that a good idea?

i just dont know what they need to know honestly. sorry if that sounds dumb


r/learnprogramming • • 1d ago

How does a typical day of a mid / senior developer looks like?

5 Upvotes

I wonder how much it’s different in comparison to junior level. What are the new challenges? Do you have less time?


r/learnprogramming • • 1d ago

What should i know before starting to learn and building stuff on spring boot?

10 Upvotes

Hi, all i know is java, thats it, the fundamentals oop, object inheritance, and interfaces. THIS IS IT, but should i know knowledge on like how a website works? API? REST? HTTP? i dont know any of this all i know is how to code in java. what should i do?


r/learnprogramming • • 19h ago

Recommendations for developing first Linux native desktop application?

0 Upvotes

Hey everyone!

I'm looking to develop a timer application for Linux with a simple GUI. It's mostly intended to be practice working with software that's not just simple CLI or web-based programs.

In my research I've seen a lot of suggestions and don't feel like I have a good enough understanding of the differences between languages and how programming UI works for me to pick a language/framework without some help. I'm concerned I'll get too deep into the process and realize the choice was not a good pick for what I need. Some of the suggestions I've heard include:

  • C++ and Qt
  • Java
  • C#
  • Vala

I currently have experience with C, C++, Python, HTML/CSS, and some JS. I would consider myself above beginner level with programming, maybe at a late-beginner/early-intermediate level if that makes sense? I'll primarily be developing the application for a KDE Plasma DE but am interested in cross-platform/portable potential. My goal is not necessarily to use the most optimal setup possible, instead a realistic but approachable framework that will help me get started working with GUI programming. I'd appreciate any advice/recommendations you have.

Thanks! :)


r/learnprogramming • • 21h ago

Topic Few questions on using python

1 Upvotes

I'm learning python in boot.dev rn, and I want to know what should I use to turn my code into a game. I'm a bit confused on this, but I know there's gaming languages and then there's stuff like Unity and Unreal engine. What should I use tto start making games? Sorry if I'm not clear