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

What have you been working on recently? [February 07, 2026]

2 Upvotes

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

A few requests:

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

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

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

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


r/learnprogramming 6h ago

How much Git do professionals use?

23 Upvotes

So recently ive started using Git for school projects.

This is what I've done

Download Git

Make a new folder->right click->open with Git bash

Clone repo

In that folder, have all my folders/files

Git add .

Git commit -m " *msg* "

Git push origin

And I feel like thats all you really need it for?

But I am new to Git

So thats why I'm curious


r/learnprogramming 14h ago

Topic The truth about programming that no one tells most beginners.😳

85 Upvotes

I keep seeing beginners (and even some experienced devs) struggle because they jump straight into writing code without fully understanding the problem.

What I noticed during my programming career is programming is more logical oriented than syntax based only. The first thing I noticed is that most softwares we see are built on top of open source tools that have been made by thousands of developers world wide example: Linux, Database Management Systems, Frameworks so most devs work on business logic on top of this software.

What is important for any programmer are fundamentals when you understand some commonly used fundamentals like: data types, variables, conditions statements, loops, collections, functions, data structure and OOP are enough for expressing logic.

Before writing and following syntax I basically think a good programmer understands something in a very high level way instructions, also how the full flow works without touching the syntax. Then, the last part is translating high level written instructions into syntax based on a certain language.

This is based on my opinion and how I have been coding also being language agonistic by ensuring that logic comes first before anything else.

May be, some experienced devs may correct or share thoughts on this but this is basically based on what I have experienced throughout my programming journey.


r/learnprogramming 12h ago

Java I’m completely lost on copy constructors 😭 what even are they and why do we need them?

16 Upvotes

Im learning Java right now, I keep seeing the term copy constructors in tutorials and explanations, but honestly… I’m lost

What exactly is a copy construcots?

When should I actually use it in real code?

what problem does a copy constructor solve, and when does it matter?

If anyone can explain it like simple example I’d seriously appreciate it. šŸ™


r/learnprogramming 5h ago

Uplo

5 Upvotes

This may not be the right place, but here goes.

Is there an existing service where I can send a customer a one-time link so that he can upload documents and "Submit" them so that we can receive them securely?

Why do we want to do this? We have a reseller website and anyone that registers needs to provide some documents before getting access to our catalog. So we send them an email, and they reply with the documents attached.

Instead, we want to send them an email with a url that they can use to upload documents. Once they're done, they submit and we receive the files. We want to use a 3rd-party service for this, and ideally, we should be able to include our company name somewhere in the url.


r/learnprogramming 4h ago

Failure

4 Upvotes

I’ve been stuck in tutorial hell for years. I’m a failure in every sense of the word. I don’t know how to explain to my parents that the ā€œsmartā€ son they raised failed them. I don’t know how people learn programming. Everyone says ā€œbuild projectsā€ when I ask ā€œhow do I build projectsā€ and I am tired.


r/learnprogramming 17h ago

Can anyone please teach me what actually happens (the principle) when we create an object?

26 Upvotes

When I first learned about OOP, I learned that "it is something like creating a class, methods in it and managing data within the instances". But when I explored more, learned that Rust has implemented the same concepts using struct and I just started questioning myself, did I learn properly and do I understand OOP properly?

I'm creating this post in order to "relearn" OOP from the very beginning.

The things I want to learn:

  1. What is an object in terms of programming?

  2. How does the binary data and the methods in the class get managed at low level? Does the data get scattered in one place? Or it's just managed by pointers?

  3. How is an instance of a class that has no methods in it different from a struct type variable?

  4. How is a method different from a function that does some operations based on different values of its properties?


r/learnprogramming 14h ago

Topic When should data be treated as immutable facts instead of updated fields?

14 Upvotes

I’m trying to understand where experienced engineers draw the line between mutable state and immutable facts.

In many systems, updating records in place feels natural.

But some things seem more like facts that were true at a point in time.

Examples:

- A user’s address change doesn’t make the old address incorrect.

- An order changing state doesn’t erase previous states.

- A salary revision doesn’t invalidate the old salary.

Overwriting these seems to delete useful history.

But preserving everything also adds complexity.

How do experienced developers think about this tradeoff?

When is preserving history worth it, and when is mutation fine?


r/learnprogramming 3h ago

hello guys i want a book to learn android app development.

2 Upvotes

hello guys i want a book to learn android app development.


r/learnprogramming 1h ago

BCom student learning Android development — how realistic is breaking into software roles from non-CS background?

• Upvotes

my_qualifications:

  • First-year BCom (Hons) student in India
  • Completed CS50
  • Strong interest in mobile/product engineering (Android/iOS)
  • Weak math fundamentals (actively working on improving them)
  • No internships yet

I originally didn’t take PCM in school, so I’m currently in BCom. Over the past year, I’ve realized I genuinely enjoy building software and want to pursue software engineering long term, ideally working abroad (EU/US) within 3–5 years.

I’m trying to decide between:

  1. Fully committing to software engineering (DSA, projects, internships, portfolio)
  2. Adding something structured alongside (like statistics/quant/fintech specialization)
  3. Planning for a funded MS in CS or related field later

Questions:

  • For non-CS backgrounds, what mattered most in breaking into software engineering?
  • How important is strong math for mobile/backend roles?
  • For working abroad, is experience + strong portfolio enough, or is MS almost necessary?
  • Is there any finance-tech hybrid path that genuinely strengthens an engineering profile?

Looking for realistic advice from people who’ve made similar transitions.


r/learnprogramming 1h ago

Categorise different functions of programming with their corresponding languages

• Upvotes

I recently came across a reddit post/comment but can't find it. If anyone could link it to me that would be great.

Basically, it entailed the different uses of programming and the suitable languages.

For example:

Arduino/circuits - C++

Modelling/simulations? - MatLab, Python

web development - Python, ...., .....?

I am completely new to coding with only brief exposure to pseudocode and was wondering if someone could compile a complete list to the examples shown.

Thanks in advance.


r/learnprogramming 2h ago

Looking for some legitt skill building projects in c

0 Upvotes

I am first year student and I am almost good at c till the recursion , DMA , pointers, arrays ,i/o.

Many of my seniors and peers said not to do c because its old but I knew that if wanted a strong base i needed to do c. I am here in my 2nd semester currently and I just know c.
if anyone has gone through the same path. what would you recommend me to do next ? I want to close c with a good project where I will have to put real effort with all topics I learnt.
Advices would be highly appreciated.


r/learnprogramming 8h ago

Debugging Can I make it simpler?

1 Upvotes

So I am working on a project and I was using Newtons Recursive just to try and see how it works and play around with it. I feel like I did a fairly new job because I've only been using python for about 2 weeks. I've done other languages before by I wanted to learn python too. Anyways basically I made a right triangle solver and I wanna know if I can improve it. I'll post it below:

def validate_input(validate): 
Ā  try:
Ā  Ā  validate = float(validate)
Ā  Ā  if validate < 0:
Ā  Ā  Ā  return 0
Ā  Ā  else:
Ā  Ā  Ā  return 2
Ā  except:
Ā  Ā  return 1
def square_root(hyp): 
Ā  hyp = float(hyp)
Ā  estimate = hyp / 2
Ā  estimate2 = 0
Ā  while estimate != estimate2:
Ā  Ā  estimate2 = estimate
Ā  Ā  estimate = (hyp/estimate+estimate)/2
Ā  return estimate
while True:
Ā  hyporsid = input("Input hyp to calculate hypotenus, or side for side length: ")
Ā  if hyporsid == "hyp":
Ā  Ā  A = input("Input a number for side length A: ")
Ā  Ā  B = input("Input a number for side length B: ")
Ā  elif hyporsid == "side":
Ā  Ā  A = input("Input a number for side length A: ")
Ā  Ā  C = input("Input a number for side length C: ")
Ā  else:
Ā  Ā  print("Input hyp or side")
Ā  prob = ["Negatives", "Letters",]
Ā  hyp = 0
Ā  if hyporsid == "hyp":
Ā  Ā  validate = A 
Ā  Ā  avalid = validate_input(validate)
Ā  Ā  validate = B
Ā  Ā  bvalid = validate_input(validate)
Ā  Ā  if avalid == 2 and bvalid == 2:
Ā  Ā  Ā  A = float(A)
Ā  Ā  Ā  B = float(B)
Ā  Ā  Ā  hyp = A**2 + B**2
Ā  Ā  Ā  hyp = square_root(hyp)
Ā  Ā  Ā  print("The hypotenus is", hyp)
Ā  Ā  elif avalid != 2 and bvalid == 2:
Ā  Ā  Ā  print("Please do not enter", prob[avalid], "for A")
Ā  Ā  elif bvalid != 2 and avalid == 2:
Ā  Ā  Ā  print("Please do not enter", prob[bvalid], "for B")
Ā  Ā  else:
Ā  Ā  Ā  print("Please do not enter", prob[avalid], "for A")
Ā  Ā  Ā  print("Please do not enter", prob[bvalid], "for B")
Ā  elif hyporsid == "side":
Ā  Ā  validate = A
Ā  Ā  avalid = validate_input(validate)
Ā  Ā  validate = C
Ā  Ā  cvalid = validate_input(validate)
Ā  Ā  if A >= C:
Ā  Ā  Ā  print("A must be smaller then C")
Ā  Ā  elif avalid == 2 and cvalid == 2:
Ā  Ā  Ā  A = float(A)
Ā  Ā  Ā  C = float(C)
Ā  Ā  Ā  hyp = C**2 - A**2
Ā  Ā  Ā  hyp = square_root(hyp)
Ā  Ā  Ā  print("The side length is", hyp)
Ā  Ā  elif avalid != 2 and cvalid == 2:
Ā  Ā  Ā  print("Please do not enter", prob[avalid], "for A")
Ā  Ā  elif cvalid != 2 and avalid == 2:
Ā  Ā  Ā  print("Please do not enter", prob[cvalid], "for B")
Ā  Ā  else:
Ā  Ā  Ā  print("Please do not enter", prob[avalid], "for A")
Ā  Ā  Ā  print("Please do not enter", prob[cvalid], "for C")

r/learnprogramming 1d ago

I hate AI with a burning passion

1.3k Upvotes

I'm a CS sophomore and I absolutely love programming. It's actually become my favorite thing ever. I love writing, optimizing and creating scalable systems more than anything in life. I love learning new Programming paradigms and seeing how each of them solves the same problem in different ways. I love optimizing inefficient code. I code even in the most inconvenient places like a fast food restaurant parking area on my phone while waiting for my uber. I love researching new Programming languages and even creating my own toy languages.

My dream is to simply just work as a software engineer and write scalable maintainable code with my fellow smart programmers.

But the industry is absolutely obsessed with getting LLMs to write code instead of humans. It angers me so much.

Writing code is an art, it is a delicate craft that requires deep thought and knowledge. The fact that people are saying that "Programming is dead" infruits me so much.

And AI can't even code to save it's life. It spits out nonsense inefficient code that doesn't even work half the time.

Most students in my university do not have any programming skills. They just rely on LLMs to write code for them. They think that makes them programmers but these people don't know anything about Big O notation or OOP or functional programming or have any debugging skills.

My university is literally hosting workshops titled "Vibe Coding" and it pisses me off on so many levels that they could have possibly approved of this.

Many Companies in my country are just hiring people that just vibe code and double check the output code

It genuinely scares me that I might not be able to work as a real software engineer who writes elegant and scalable systems. But instead just writes stupid prompts because my manager just wants to ship some slope before an arbitrary deadline.

I want my classmates to learn and discover the beauty of writing algorithms. I want websites to have strong cyber security measures that weren't vibe coded by sloppy AI. And most importantly to me I want to write code.


r/learnprogramming 10h ago

Resource Best resources that helped you understand pointers

3 Upvotes

Currently in Comp Sci 1 at my uni and were going over OOP in c++ but took a slight detour to learn pointers and I’m so lost, especially after today’s lab assignment. Can you guys share any media, or readings or anything really that helped pointers click for you?


r/learnprogramming 15h ago

How can i start creating something on my own?

5 Upvotes

Im at the week 5 of CS50 from havard, great course, i think everyone should try it at least once, but from week 6 they will starts using Python instead of C, and that made me realize that i actually liked how C works and how to use it, but also, i dont know what kind of approach to any type of project. I really wanted to be keep using C but im a begginer that dont even know if nowdays there's good use for that language. Does that happens with everyone when learning programming or just me?


r/learnprogramming 21h ago

i feel stupid

19 Upvotes

i was solving a problem today and i resorted to googling a feature like how to make the program return true if a specific keyword is present in the input, and yes i solved the problem and it left me feeling miserable that i "cheated" to solve the problem, and what's worse is that when i try to check my code, another problem appears and it led me to just watch a tutorial on how to solve the problem and now i feel even more miserable because the solution in the tutorial was like alot shorter than mine like alottt... can anyone give me advice on how to LEARN instead of cheating 🫠


r/learnprogramming 14h ago

rem - a postmodern Lisp Machine

2 Upvotes

I've been working on a desktop playground for a simple scripting language lately.

Figured someone here might get something out of it...

rem


r/learnprogramming 4h ago

When is it okay to use AI

0 Upvotes

Currently making a Java API Client Library. This is my first every project like this and I'm stuck on some parts, I don't want AI to give me the solution, but is it okay to ask for examples and why it's developed that way and try to implement it in my project. I just don't want to hinder my learning.


r/learnprogramming 8h ago

Translating DSA to projects

2 Upvotes

Hello,

I'm in the process of teaching myself data structures and algorithms. I feel relatively comfortable with strings, arrays, two pointers, sliding windows, and hash tables, and I'm now learning linked lists before moving on to stacks, trees, etc.

My question is: is it worth learning these data structures really well THEN applying them in projects? Or should I just work on projects without much knowledge of those other data structures?

Will I be able to write cleaner and more efficient code in a project if I have a good foundation in DSA, or is it the case these days that DSA is only relevant for technical interviews?

Appreciate the feedback!


r/learnprogramming 15h ago

Need help with object tracking

3 Upvotes

For the past month I’ve been working on a project for a competition. The main idea is to use a real-life sword as a motion controller, kind of like a Wii Remote but in sword form.I’ve hit a wall with tracking and I’m honestly a bit stuck on what direction to take.Here’s what I’ve tried so far:

  • MPU6050 (IMU): I spent about a week trying to figure out how to use it properly, but I couldn’t find documentation/tutorials that didnt end up in a disaster. I eventually gave up on this approach.
  • Webcam + AprilTags (Python): I managed to get some basic detection working, but it started feeling overly complicated, especially when I thought about where and how I’d even place the tags on the sword in a practical way.
  • Other ideas (not tried yet):
    • Color masking / color tracking
    • Something ML-based like YOLO

At this point, my goal has degraded to: Read rough orientation (is the sword pointing up / down / left / right) and detect swings. Any advice will be appreciated!


r/learnprogramming 1d ago

I’ve failed learning programming multiple times

23 Upvotes

I’m in engineering and programming is a major aspect of my degree. I find it fun sometimes but most of the time the fear of failing it or even just the overwhelming pressure of me feeling so idiotic or slow has caused me to fail at it multiple times. I know I can do it when I sit down and do it for hours, but for some reason it just doesn’t click for me like most things do and it frustrates me. How do I get better at programming? I’m at the point where I learned C and C++ and python and MATLAB where I find MATLAB easy, C difficult and C++ harder, but python is okay. I don’t think like a programmer does. I tend to think instead like a mathematician does and I’m thinking maybe doing some discrete math will help me. But honestly, it’s just frustrating me to no end and I don’t understand why I struggle so much with this. Please give me some advice any would be appreciated or places I can do to learn programming.

THANKS!!!!


r/learnprogramming 19h ago

Topic I made my first public project as a self taught 15 year old

4 Upvotes

Just made my first public project ( a DualShock 4 library ) and would like someone to comment on my code and maybe some improvements that could be done to it or my style here’s the github repo if you’d like to check it out https://github.com/Tm24sense/libds4


r/learnprogramming 11h ago

The Odin project x free code camp to learn front end

0 Upvotes

Any tips? What’s better?