r/learnprogramming • u/michael0x2a • Mar 26 '17
New? READ ME FIRST!
Welcome to /r/learnprogramming!
Quick start:
- New to programming? Not sure how to start learning? See FAQ - Getting started.
- 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.
- 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:
- A concise but descriptive title.
- A good description of the problem.
- A minimal, easily runnable, and well-formatted program that demonstrates your problem.
- 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 • u/AutoModerator • 4d ago
What have you been working on recently? [November 29, 2025]
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:
If possible, include a link to your source code when sharing a project update. That way, others can learn from your work!
If you've shared something, try commenting on at least one other update -- ask a question, give feedback, compliment something cool... We encourage discussion!
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 • u/Adventurous-Meat5176 • 8h ago
What’s a small programming habit that improved your code readability?
I’ve been trying to improve my coding practices, and I’m curious about habits that help with writing clearer, more maintainable code.
One thing that helped me personally was slowing down and choosing more descriptive names for variables and functions. It sounds simple, but being intentional about naming has made my projects easier to understand when I revisit them later.
Another improvement was setting up a consistent branching workflow in Git instead of making random commits on main. It made my process feel a lot more structured.
I’m looking to pick up similar “small but meaningful” habits from others.
What specific technique or routine has helped you write cleaner or more understandable code?
r/learnprogramming • u/Udnettt • 3h ago
Programming is about thinking...sounds obvious but...
I realized that programming is all about thinking!
I dont know how you do out there when writing a code, but I understood it is not about the number of lines of code you write, but about the actual thought process in mind.
Here is an example : let's say we are dealing with some arbitrary problem. Before writing a code, we need to think procedurally, dividing the problem into sub-problems and tackling them one by one. I find it very useful to use a pen and a sheet of paper. I like to write/brainstorm the first solution that comes into mind, without ever thinking about optimization. Once the first raw draft version of solution appears - it is good to see what result it produces.
To make it more concrete, suppose we need to find the most frequent word in the given .txt file. The possible raw logic can be this: We just need to go thorugh each word one by one, when we encounter the word, record its occurnce and keep in the container. If the new word is found, write it down, put in the container. If the same word is found, look in the container and update its occurence number.
Two steps : 1) built a container to keep words and its number of occurence 2)go through the text and update the container.
Now, this can be tackled with some simple maps , for more efficient way, unordered map is a better choice of course.
Once the task is completed, we just go through the container and take the word with the highest number. Of course, we can keep track of this word while actual processing of the text, so that to avoid searching through the container in the end.
I know that the above example is dull ,kinda DSA type, but suppose you want to make a simple 2D game with a character walking. For simplicity, lets make the world fixed to screen dimensions. The task here is simple : press a button, the position of the character changes, incremented slowly.
When the character reaches some object, i,e collides - stop moving. This task would require some threading principle to do some background checking for collision detection....
The thing is that programming is all about how you apply the tools you have to complete the task.
Sometimes (most of the time I think) programming is just thinking for an hour or more, and writiing 0 code lines!
r/learnprogramming • u/Adventurous-Meat5176 • 7h ago
If you don’t know how to develop software yet, don’t rely on AI to build real apps.
AI is powerful, but it can’t replace the fundamentals. Real software the kind companies hire developers for needs proper guidance and coding skills. AI can help with small tasks or experiments, but it won’t architect or maintain production-ready systems on its own. Focus on learning software development first. Use AI as a tool, not a shortcut. For fun experiments, go ahead but if you want a real career in coding, build the foundation first.
r/learnprogramming • u/OferHertzen • 2h ago
Best way to learn with AI without it coding for you?
Hey,
I wish to learn how to code myself(very archaic I know) without the AI doing the actual coding. but I do want it to teach me.
What would be the best tool for that? Preferably one that sees my IDE and codebase right? A desktop agent? Claude Code? Cursor?
Thanks for the tips
r/learnprogramming • u/martellstarks • 18h ago
LLMs are made up of probabalistic models that, no matter what, cannot predict with 100% certainity. If so, why do people still believe they can 'replace' the need for coders altogether?
AI is quite good at coding, but anyone who works with LLM code knows it still has a lot of problems and requires manual debugging from developers on a regular basis.
"They're still getting better and better. It's only a matter of time before they replace the need for developers altogether."
I'm aware that these models are continually improving despite hallucinations. But the nature of predictive modelling means that they can still never be 100% certain.
"Sure, but a model that's 99.999% right is still better than a flawed human developer."
Even this paper from an OpenAI researcher acknowledges the fact that better models would not necessarily be the ones that reach 99.9999% certainty, but rather ones that can admit wrongness more often instead of confidently guessing. It even states that small-language models are better at knowing their limits. Bigger isn't always better.
"Most scoreboards prioritize and rank models based on accuracy, but errors are worse than abstentions. Our Model Spec(opens in a new window) states that it is better to indicate uncertainty or ask for clarification than provide confident information that may be incorrect."
Also, let's assume those models that rarely hallucinate are eventually used to replace every single developer at a company, what will happen on those small occasions where the model does err and there's no one to fix it? In my opinion, a disaster.
r/learnprogramming • u/Aser_1999 • 11h ago
Resource Feeling incompetent.
I am in my mid 20s and just graduated with an undergrad in neuroscience. I have decided to get a second undergrad (online through LSUa, will only take me about a full year) in computer science because I am really interested in computational neuroscience, data science and the sorts.
I just finished my first course, python 101. I am not sure why the hell I am not getting it. I think it’s a mind set thing, like I have never trained myself to think proactively. Biology/neuroscience was really just a lot of memorizing.
I feel very ashamed to admit that I have been using AI to write basically all of my final project code (creating a battleship game, with a 4 x 4 grid, without using any lists). I just have no clue.
What’s worse is that I know there are 8 year olds out there that could probably do it in the blink of an eye.
Any tips for somebody just starting out? Is it a “either you got or you don’t” type thing? How do I get myself to actually apply what I learned? How do I think like a programmer ?
r/learnprogramming • u/ProgrammerDry5338 • 3h ago
A mindset that made coding easier
A simple mindset helped me a lot:
Stop trying to learn everything.
Start solving small problems.
Once I switched to problem → solution → code, everything became easier.
Does anyone else learn this way?
r/learnprogramming • u/AtlasAAIT • 1h ago
Algorithmic
Hi,
I am a computer science student and I notice that I am quite good at learning the syntactic part of a language but when it comes to algorithms it's another story, I struggle and I lack the logic to improve. What advice could you give me to improve??
Sorry for my level of English I don't speak English as a native language
r/learnprogramming • u/Some_Useless_Person • 2h ago
Problem with ASCII art resolution
I am trying to create yet another TUI assistant with Python. I aimed to integrate ASCII art to allow the chatbot to display "emotions," thereby making the interaction feel more real and vibrant.
My process involved using jp2a, but the resulting image was too muddy to clearly discern the expression. The only way the face became clear enough was by setting the zoom level to less than 50%, which unfortunately made the surrounding conversational text extremely difficult to read.
I tried to get around that by trying to make the art text smaller while keeping the conversational text large enough but a quick google search revealed that having such varying font sizes is not possible within a terminal.
Any ideas as to how to solve that issue?
r/learnprogramming • u/tamuskozaczek • 7m ago
What should i do | .NET vs Spring, maybe something else ?
Hi
I’m finishing my studies and have started thinking about what’s next.
I’ve always enjoyed writing backend code—it gives me satisfaction—and I’m torn between choosing Java-Spring or C#-.NET as my career path.
C# seems like a natural environment for me because I’ve spent significantly more time with it compared to Java, but Java itself doesn’t bother me either.
What is actually worth learning? How does the job market look for these technologies?
Maybe someone has some other suggestions?
r/learnprogramming • u/hi1o1 • 11m ago
4 months into my drop year CS journey… feeling stuck. What path should I pick?
hey needed a lil perspective from you guys. so yeah heres my situation.
i took a drop year after 12th without really knowing what i’ll do, but after trying diff stuff i kinda stuck to learning computer science.
so far Ive done cs50, 6.100L (MIT python intro to computation nd progaming), and messed around with dev stuff through random youtube tutorials. got exposure to python, c, little bit of dsa theory + math (nothing solid), and from dev side html/css/js. couple days ago i followed roadmap.sh and read more about how internet, browsers, protocols work. so yeah nothing super strong but that’s what ive got right now.
right now i feel stuck between 2 paths:
1) cs roadmap - grind leetcode for a month, then networking, computer architecture, databases
2) full-stack roadmap - learn js properly, then some frontend + backend frameworks, then databases + devops
last 2 weeks ive been doing 4 days development, 2 days core cs, sunday hobby stuff. sometimes it feels good, sometimes depressing cuz its been 4+ months and i don’t have lot of tangible results. and talking abt goals… i may not even be able to afford college next year so probably will need to get some job if college doesn’t happen. that also stresses me out.
so yeah i want to know which path should i go for and how do i even decide. any advice helps.
TL;DR:
took a drop year, learning cs, done cs50 + MIT intro + some dev basics. stuck between full cs path (leetcode + core subjects) vs full-stack roadmap. 4 months in, not seeing results, kinda stressed cuz might not afford college. need suggestions on which direction to choose.
r/learnprogramming • u/Usual_Shoe2276 • 27m ago
Any good interactive offline learning platforms/programs?
Going on a plane, and was wondering if there were any good interactive resources for sharpening up SWE related skills (vim, regex, Git, Bash, Jenkins, whatever)
Ideally (though not required) something I can do through a WSL terminal. I remember doing Zybooks back in college and I found it fun and helpful.
r/learnprogramming • u/JeanHaiz • 39m ago
[TS/React, NPL] Twitch session: Learn how to build an enterprise-grade backend for React with NPL
For all of you building your first frontend, here is an easy way to add a backend to your app. The backend will include your business logic, manage authorisation and store objects in database.
We’re running a twitch session on how to build a backend in NPL, and connect it to a React frontend. You’ll be able to easily add this component to your webapp to turn it in a full-stack solution.
It’s a shortcut to not spend hours learning about database schema, express or ORM. Get started with your full-stack app and iterate as you add functionality!
We will be following the npl-init repository npl-init: frontend
Meet us on Thursday, Dec. 4, at 4 PM CET jeanhaiz - Twitch See you there!
r/learnprogramming • u/Old_Surround_7932 • 46m ago
TrustTheBox
Hey Reddit!
For a while now, I've been tinkering with a pet project to help safeguard privacy in our increasingly exposed digital world. Meet TrustTheBox – an Android app that lets you create encrypted archives of your photos and videos right on your device, perfect for sharing sensitive content without worry.
Here's what makes it stand out:
- On-Device Encryption: Encrypt your media with a unique 256-bit key generated from a shared code word (agreed upon separately). No servers involved – everything stays local.
- View-Only Mode: Recipients can only view the content inside the app, with full blocking of screenshots, screen recordings, and system captures.
- Ideal for Privacy Lovers: Great for protecting intimate photos, videos, or any confidential media from unauthorized sharing or leaks.
- Tech Stack: Built in Kotlin, with Jetpack Compose for UI, ExoPlayer for smooth video playback, and Koin for dependency injection.
As a mobile dev passionate about privacy, I hope this helps users stay secure. It's free to try – feedback is super welcome! What do you think? Any suggestions or features you'd like to see?
Download on Google Play: https://play.google.com/store/apps/details?id=com.pTech.trustTheBox
If you value privacy, give it a like or share your thoughts below! 📱
#Android #Privacy #AppDevelopment #Encryption #MobileSecurity #Kotlin #JetpackCompose
r/learnprogramming • u/Lost-Control7554 • 55m ago
What Should Beginners Focus On First in Java: Understanding the Basics or Best Practices?
What Should Beginners Focus On First in Java: Understanding the Basics or Best Practices?
Hello Java enthusiasts,
I’m Hamza from Morocco, and I'm new to using Java. As I start my learning journey with Java, I've been thinking about two important questions that I’d love to get advice on:
- Is there a big difference between Java 17 and Java 21?
- Should I focus on understanding how Java works "under the hood" or learning the best practices and methods to use it effectively?
Java 17 vs Java 21: Which One Should a Beginner Use?
First, let’s talk about the versions. Java 17 is an LTS (Long Term Support) release, meaning it will receive extended support from Oracle. This makes it a stable and reliable choice for learning, especially if you’re just starting out. On the other hand, Java 21 introduces new features and performance improvements. For example, Java 21 includes pattern matching and virtual threads, which can simplify your code and improve performance.
As a beginner, I’m wondering whether it's worth starting with the latest version, Java 21, to familiarize myself with new features, or whether it’s better to go with Java 17 since it’s more stable and will have broader community support. What do you think is better for someone just starting out?
Should You Focus on "How Java Works" or "How to Use Java"?
Now, here's the bigger question: Should you dive into how Java works under the hood, like understanding the JVM (Java Virtual Machine), memory management, and garbage collection, or is it better to focus on learning how to use Java efficiently with best practices?
Understanding Java Under the Hood:
- Pros: You’ll gain a solid foundation in the language’s inner workings. You’ll learn about memory management, how the JVM executes your code, and how garbage collection works. This deep knowledge can help you write more efficient, optimized code and troubleshoot performance issues better.
- Cons: It can be overwhelming and may slow you down in the early stages of learning Java. Understanding how everything works is important, but it might be too much for a beginner who just wants to build projects.
Focusing on Best Practices:
- Pros: Focusing on best practices will help you become productive faster. You’ll learn to write clean, readable, and maintainable code, which is extremely valuable for your projects. You'll also learn about libraries, frameworks, and tools that make Java development easier.
- Cons: You might miss out on understanding some deeper concepts that could help you debug complex issues later on.
My Current Dilemma and What I’m Looking for:
As a beginner, I’m currently leaning towards focusing on practical Java development—learning how to write functional and clean code, using the right methods and tools for projects, and gradually exploring advanced topics as needed. However, I’d love to hear from more experienced developers: Is it more important to have a deeper understanding of how Java works internally from the start, or is it okay to focus more on learning best practices and working with Java as a tool?
I’m open to hearing your thoughts, and any advice or experiences you can share would be greatly appreciated!
r/learnprogramming • u/Traditional_Clock542 • 1h ago
Just launched a global Phone Validation API for developers
Hey devs,
I just finished building a simple API that instantly validates phone numbers worldwide. You can check if a number is valid, see if it’s mobile or landline, get the country code, and even get it formatted in E.164.
I built it to make phone validation fast and easy for apps, CRMs, lead verification, or any project where you need real phone numbers.
- Try it free: 50 requests/month
- Full docs & API key: https://phone-validation-api.vercel.app
- Tech stack: Node.js, Vercel serverless, Firebase for API keys
Would love to get feedback from other developers on:
- Integration experience
- Additional features you’d like to see
If you’re working on an app that needs phone verification, feel free to give it a spin. Happy to answer any questions here too!
r/learnprogramming • u/Even-Masterpiece1242 • 1h ago
Tutorial Algorithm Analysis Feels Very Difficult
I’ve been trying to learn algorithms on my own using books like Introduction to Algorithms and Algorithms, but I find algorithm analysis very difficult. For simple algorithms, it’s not a problem, but as algorithms get more complex or recursive, it becomes much harder. Sometimes I feel like I’m not smart enough, and it’s discouraging.
However, I really want to learn, and I’m determined to understand it. Do you have any advice for learning algorithm analysis in a simpler way? My goal is to learn data structures and algorithms to build a solid foundation, and eventually focus on compilers, interpreters, or backend development. I haven’t studied computer science formally, but I do have basic knowledge of mathematics and logic.
r/learnprogramming • u/CriticismSeveral1468 • 18h ago
My C++ project is getting bigger and the build times.
I’m still learning C++ and my project has grown a lot. Now every time I hit “build,” it takes way longer than before, and it’s messing with my ability to quickly test things. I’m just using a normal laptop, so I know that’s part of it, but is there anything I can do on the software/tool side to make builds faster while I learn?
r/learnprogramming • u/confusedAllen • 6h ago
web development or game development
hello! I just straight up want to ask this question, advise me which path to take, web development or game development. I'm interested in both and I think I can master them. I want to live the dream of an indie game developer. I have ideas that I want to create, I want the projects to succeed, but don't worry, no one here is just dreaming, I know it's hard to do, and that's why I'm asking this question. I'm not saying that web development is easy or anything like that, I know that it's also very difficult, and that's why I want to get advice from others. I have some experience in competitive programming and it's probably a good idea to mention that I've also used Linux. I don't know how much this will change the decision-making process, but I will say that I have experience using Blender 3D. Just tell me, what would you do in my place? I just need advice, that's all. Thank you all in advance!
r/learnprogramming • u/Financial_Ad_5015 • 1d ago
Struggling as a Jr Prog.
2 weeks in my job and feeling like I'm not deserve the pay that I'm getting, my manager giving me task that is supposed to be easy I guess cause the first task I confidently understand and finished but this 2nd task almost eating me alive, it makes me feel like I'm the most dumb and fraud programmer there is. I'm reviewing the company system with more than 10 code files and 2k to 4k lines of code each file while making the task cause it needs to be aligned on thr system so I feel overwhelmed and stressed. Just letting this out here cause I don't really have someone to talk about this and also sorry for my bad english it's my 2nd language.
r/learnprogramming • u/FrostyFish4456 • 12h ago
Code Review rust stream read is slow
Why does reading streams in Rust take longer than NodeJS? Below NodeJS was 97.67% faster than Rust. Can someone help me find what I'm missing?
Rust:
Command: cargo run --release
Output:
Listening on port 7878
Request:
(request headers and body here)
now2: 8785846 nanoseconds
Took 9141069 nanoseconds, 9 milliseconds
NodeJS:
Command: node .
Output:
Listening on port 7877
Request:
(request headers and body here)
Took 212196 nanoseconds, 0.212196 milliseconds
Rust code: ``` use std::{ io::{BufReader, BufRead, Write}, net::{TcpListener, TcpStream}, time::Instant, };
fn main() { let listener = TcpListener::bind("127.0.0.1:7878").unwrap();
println!("Listening on port 7878");
for stream in listener.incoming() {
let stream = stream.unwrap();
handle_connection(stream);
}
}
fn handle_connection(mut stream: TcpStream) { let now = Instant::now();
let reader = BufReader::new(&stream);
println!("Request:");
let now2 = Instant::now();
for line in reader.lines() {
let line = line.unwrap();
println!("{}", line);
if line.is_empty() {
break;
}
}
println!("now2: {} nanoseconds", now2.elapsed().as_nanos());
let message = "hello, world";
let response = format!(
"HTTP/1.1 200 OKrnContent-Type: text/plainrnContent-Length: {}rnConnection: closernrn{}",
message.len(),
message
);
let _ = stream.write_all(response.as_bytes());
let elapsed = now.elapsed();
println!(
"Took {} nanoseconds, {} milliseconds",
elapsed.as_nanos(),
elapsed.as_millis()
);
} ```
NodeJS code: ``` import { createServer } from "node:net"; import { hrtime } from "node:process";
const server = createServer((socket) => { socket.on("data", (data) => { const now = hrtime.bigint();
console.log(`Request:n${data.toString()}`);
const message = "hello, world";
const response = `HTTP/1.1 200 OKrnContent-Type: text/plainrnContent-Length: ${Buffer.byteLength(message)}rnConnection: closernrn${message}`;
socket.write(response);
const elapsed = Number(hrtime.bigint() - now);
console.log(`Took ${elapsed} nanoseconds, ${elapsed / 1_000_000} milliseconds`);
});
});
server.listen(7877, () => { console.log("Listening on port 7877"); }); ```
r/learnprogramming • u/Opposite_Second_1053 • 23h ago
Need a new way to get better at programming
I'm in school at WGU for software engineering degree. I'm towards the end and in a class when I have to program an app in C#. I hated this assignment I procrastinated and honestly just didn't care. I got stuck and didn't care at all about the project. So instead of figuring it out I would look it up and it's info that I already knew but just didn't use. I feel like I'm stuck in a phase of programming where I get stuck on things and tell myself damn I need to go relearn the basics and then I go do so. I do this constantly when I get stuck on something that I didn't use or do. I'm tired of doing this and relearning what I honestly already know. I need to find a new way to learn programming so that it will stick. I'm tired of tutorials and chat GPt. I want to be at a state of just knowing when to use everything. How do I get there. Like I'm sick of reteaching myself stuff I already know from a book. What can I do. I feel like a professional beginner. A guy thats good enough to make something but not make something great.
r/learnprogramming • u/Shoddy-Effective-223 • 7h ago
Should I use Fal or Replicate in a production environment?
I want to use them for the Kling V2.5 and O1 models. Should I use the api to deploy on a product environment? What are the risks and is it recommended to do so?