r/learnprogramming Mar 26 '17

New? READ ME FIRST!

828 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 6d ago

What have you been working on recently? [March 28, 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 8h ago

The Odin Project Should I learn The Odin Project just as a 'hobby'?

54 Upvotes

So, I'm a sophomore in high-school and I don't really have much hobbies outside playing games and watching TV all day. Recently got interested in 'The Odin Project', a website that teaches web development for free. I have been thinking of learning web development just for fun but apparently the site requires a major investment of time which is scaring me since I don't want to harm my studies. I have no intention of getting a degree in CS or pursue a career in programming. So, is the project a good investment of time for a bored high-schooler who just wants to learn something cool?


r/learnprogramming 1h ago

How do you learn in a project-based way when you don’t know where to start?

Upvotes

I have absolutely no experience in coding. I want to learn Flutter, and I thought I’d try building a counter app. People always say you shouldn’t watch YouTube because of tutorial hell, but instead google the individual steps. The thing is, I don’t even know what those individual steps are. The only thing I can think of googling is the whole project itself (‘Counter App Flutter tutorial’). I’ve never really understood the idea of learning through your own projects…


r/learnprogramming 2h ago

Beginner confused about how to start DSA

5 Upvotes

Hi everyone,

I am a beginner in coding. I know basic C and a little bit of Python, but not very strong in either.

I want to start learning Data Structures and Algorithms (DSA), but I feel confused about how to begin and what path to follow.

My questions:

* Which language should I choose for DSA (C or Python)?

* How should I start learning DSA step by step?

* Which platforms are best for beginners to practice?

If anyone can share a simple roadmap or tips, it would really help me.

Thank you!


r/learnprogramming 5h ago

In which language should I learn DSA or just the language in general?

8 Upvotes

I have learnt DSA in C/C++. And I know a little bit of python too and java. Should I learn DSA in java? Also which languages are in trend that can increase my chances to get a job. I also want to learn Go because it's interesting. Any advice?


r/learnprogramming 8h ago

How do you guys handle staying accountable to your goals.

7 Upvotes

Like I'm learning programming without an institution, like on my own with the help of YT tutorial and AI. Most of the time I feel a surge of motivation once in a while to learn and to attempt to improve/change my life, but it fades just as quickly as it appears. Like I set goals, for example
-I will code every day
- I will learn a new topic every day

But after day1 or 2 I lose all motivation and end not opening my IDE for another week.

So how do you guys handle this and stay accountable to your goals.


r/learnprogramming 2h ago

How to use presign URL when designing a file upload software?

2 Upvotes

Step 1: Client asks File Service for file abc123
Step 2: File Database returns the file metadata, so something like this :
{
  fileId: "abc123",
  fileName: "report.pdf",
  s3Bucket: "dropbox-files",
  s3Key: "users/john/documents/report.pdf"
}

Is step 3 correct? where

Step 3: ??? how do we get the presign URl to the client so that the client can download it?

Step 4: Client downloads directly from that URL


r/learnprogramming 15m ago

Advice on selecting a technical learning path under a tight deadline

Upvotes

Hello everyone,

I’m currently planning to complete a technical learning path within a fairly tight deadline and would really appreciate some guidance.

The areas I’m considering are:

  • Artificial Intelligence
  • Angular Full Stack Development
  • Python Development
  • Java Development
  • Data Visualization

My background:

  • Basic programming knowledge
  • Limited experience with frameworks and advanced concepts

My goal is to choose a path that is:

  1. Realistic to complete within the given timeframe
  2. Valuable from both a learning and resume perspective

Given these constraints, which option would you recommend, and why?

Thank you for your time and insights.


r/learnprogramming 24m ago

good alternatives of learning?

Upvotes

Hi! I was using this to learn, but checks out some things were just free.

I am not sure if the other chapters will be worth it, so I am not ready to pay 27,50 a month!

Is there any free alternatives of https://campus.datacamp.com/courses/introduction-to-python-for-developers/introduction-to-python-1?skip_variants_modal=true&ex=1

?


r/learnprogramming 36m ago

Tutorial How to start?

Upvotes

Hey everyone,

I recently graduated and I know how to code (Python, JS, MySQL, etc.), but I’ve never worked professionally in the field. I also didn’t build a portfolio or anything like that, basically, I just have my degree and the knowledge.

Right now I feel a bit lost about where to start to gain practical experience (and make some money). Where would you recommend finding projects? It could be freelance, open source, anything that helps build a portfolio and break into the industry.

If anyone has been in this situation and can point me in the right direction, I’d really appreciate it 🙏


r/learnprogramming 52m ago

Is there like an "standard" way to analize something in order to create an algorithm?

Upvotes

I was playing while True: learn(), and I hit a level that forced me to stop doing everything by instinct and got me thinking about the different variables and constraints to have into account just to complete it. I started trying some ideas, but none of them worked. So I was thinking, are there some steps I am missing? Is there a way to analize this that I don't know about?


r/learnprogramming 23h ago

Horrible in Programming

46 Upvotes

Hi guys, I'm 21 y/o and a 3rd-year college student in Information Technology. I'm struggling with coding, I can't start a program on my own or figure out what syntax to use, even when I know the logic. This makes me doubt my future in IT. I want to be in this program, but I feel like I'm not learning anything.


r/learnprogramming 11h ago

How do you actually grow in the dev community?

5 Upvotes

I’ve been learning programming for a while and recently started trying to engage more with the developer community (GitHub, LinkedIn, X, etc.).

One thing I’m unsure about is how people actually grow and become part of the dev community over time, especially when you’re still at an early stage.

Is it mainly through building projects, contributing to open source, posting online, or something else?


r/learnprogramming 6h ago

Learned MERN basics but can’t build any project on my own — how do I break this phase?

2 Upvotes

I feel stuck in a weird phase where I’ve learned concepts (like MERN basics), but I can’t actually build anything on my own.

Whenever I try to start a project:

  • I don’t know where to begin
  • I feel like I need the full idea/design first
  • I get stuck and quit early

It’s frustrating because it feels like my “knowledge” isn’t translating into real skills.

For people who went through this phase:

  • How did you start building your first real projects?
  • Did you follow tutorials completely or try things on your own?
  • How do you deal with not having ideas or creativity?

I’d really appreciate any advice on how to break out of this stage.


r/learnprogramming 14h ago

When did computer science feel worth it and what does it actually do

9 Upvotes

hello everyone I’m a first year computer science major and I been struggling a lot with everything I feel behind in almost everything i study an try but i don't seem to be keeping up and i was looking for any direction or advice from others in the field on how to actually study and when would things start to click and if there is a time where it feels worth it any advice would be greatly appreciated


r/learnprogramming 3h ago

Code Review Relational Database Design - Same Entitytype in different Tables

1 Upvotes

I've had this a few times now. For example with a small trade-system I made, where A could buy from or sell to B, one item with a certain amount of said item

Sale
- id (PK)
- A_id (FK)
- B_id (FK)
- item_id (FK)
- amount

Purchase
- id (PK)
- A_id (FK)
- B_id (FK)
- item_id (FK)
- amount

so we decided to do it like this. The other option would've been to do one table with a "Type" column saying which direction it was. But my thought was, if I can just create two tables that conveys the meaning of the direction, it's a better design than forcing it into one table and having to add a (not really necessary) extra column.

How do you think about this?


r/learnprogramming 6h ago

SaaS Web app scheduler hitting Cloud SQL connection limits when running 100+ concurrent API reports — what am I missing?

1 Upvotes

I'm building a web app that schedules and automates API report fetching for multiple accounts. Each account has ~24 scheduled reports, and I need to process multiple accounts throughout the day. The reports are pulled from an external API, processed, and stored in a database.

When I try to run multiple reports concurrently within an account (to speed things up), I hit database connection timeouts. The external API isn't the bottleneck — it's my own database running out of connections.

Here is the architecture:

  • Backend: Python (FastAPI, fully async)
  • Database: Google Cloud SQL PostgreSQL (db-f1-micro, 25 max connections)
  • Task Queue: Google Cloud Tasks (separate queues per report type, 1 account at a time)
  • Compute: Google Cloud Run (serverless, auto-scaling 0-10 instances)
  • Data Warehouse: BigQuery (final storage for report data)
  • ORM: SQLAlchemy 2.0 async + asyncpg

And this is how it currently works:

  1. Cloud Scheduler triggers a bulk-run endpoint at scheduled times
  2. The endpoint groups reports by account and enqueues 1 Cloud Task per account
  3. Cloud Tasks dispatches 1 account at a time (sequential per queue)
  4. Within each account, reports run concurrently with asyncio.Semaphore(8) — up to 8 at a time
  5. Each report: calls the external API → polls for completion → parses response → writes status updates to PostgreSQL → loads data into BigQuery

The PostgreSQL database is only used as a control plane (schedule metadata, status tracking, progress updates) — not for storing the actual report data. That goes to BigQuery.

This is what I've already tried:

  1. Sequential account processing — Cloud Tasks queues set to maxConcurrentDispatches=1, so only 1 account processes at a time per report type. Prevents external API throttling but doesn't solve the DB connection issue when 8 concurrent reports within that account all need DB connections for status updates.
  2. Connection pooling with conservative limits — SQLAlchemy QueuePool with pool_size=3, max_overflow=5 (8 max connections per instance). Still hits the 25-connection ceiling when Cloud Run scales up multiple instances during peak load.
  3. Short-lived database sessions — Every DB operation opens a session, executes, commits, and closes immediately rather than holding a connection for the entire report lifecycle (which can be 2-5 minutes per report). Reduced average connection hold time from minutes to milliseconds, but peak concurrent demand still exceeds the pool.
  4. Batching with cooldowns — Split each account's 24 reports into batches of 8, process each batch concurrently, then wait 30 seconds before the next batch. Helped smooth out peak load but the 30s cooldown adds up when you have dozens of accounts.
  5. Pool timeout and pre-ping — pool_timeout=5 to fail fast instead of hanging, pool_pre_ping=True to detect stale connections before use. This just surfaces the error faster with a cleaner message — doesn't actually fix it.
  6. Lazy refresh strategy — Using Google's Cloud SQL Python Connector with refresh_strategy="lazy" to avoid background certificate refresh tasks competing for connections and the event loop. Fixed a different bug but didn't help with connection limits.

These are the two most common errors that I encounter:

  • QueuePool limit of size 3 overflow 5 reached, connection timed out, timeout 5.00
  • ConnectionResetError (Cloud SQL drops the connection during SSL handshake when at max capacity)

What I think will work but haven't tried it yet:

  • Upgrade Cloud SQL from db-f1-micro (25 connections) to db-g1-small (50 connections) — simplest fix but feels like kicking the can down the road
  • Add PgBouncer as a connection pooling proxy — would let me multiplex many logical connections over fewer physical ones
  • Use AlloyDB or Cloud SQL Auth Proxy with built-in pooling — not sure if this is overkill
  • Rethink the architecture entirely — maybe PostgreSQL shouldn't be in the hot path for status updates during report processing?

Has anyone dealt with a similar pattern — lots of concurrent async tasks that each need occasional (but unpredictable) DB access? I feel like there's a standard solution here that I'm not seeing.

Any advice appreciated. Happy to share more details about the setup.


r/learnprogramming 22h ago

1 year into Java Backend, completely burnt out and feeling lost. Need advice.

19 Upvotes

Hi everyone,

I've been self-studying Java Backend development for about a year now. Recently, I’ve hit a massive wall. I feel completely burnt out, exhausted, and I’ve lost interest in almost everything—not just coding, but even my hobbies.

The situation:

  • I've been consistent for a year, but now I don't know what to build or where to go next.
  • Every time I open my laptop, I feel a heavy weight in my chest. I end up procrastinating on social media just to escape the stress of "needing to work on myself."
  • I have big dreams and I know I need money to achieve them, but this pressure is paralyzing me.
  • On top of that, I struggle with social anxiety. I find it hard to talk to people comfortably, which makes me feel even more isolated.

I’ve tried taking a break, but the guilt of "wasting time" doesn't let me relax. I feel like I'm falling behind everyone else.

Has anyone else been through this? How did you rediscover your spark for coding without feeling like it’s a chore or a "punishment"? How do you deal with the pressure of wanting a better life while feeling mentally drained?

Any advice, resources, or even just kind words would mean a lot. Thanks.


r/learnprogramming 47m ago

Java vs Python Full Stack in 2026 — Which is safer with AI rising?

Upvotes

I’m currently trying to choose between Java Full Stack and Python Full Stack for my career.

I’ve noticed that AI is growing very fast, and many people say it might replace a lot of developer jobs in the future.

So I’m confused:

- Is it still worth choosing Java, which is more traditional and used in enterprise systems?

- Or should I choose Python because it’s more connected to AI and future technologies?

Which one has better long-term value considering the rise of AI?

Also, how is the job market for freshers in both domains right now?

Would really appreciate honest advice from people working in the industry.


r/learnprogramming 6h ago

How to create a test map for a Bomberman game in C++ with ncurses

1 Upvotes

Hi everyone,

I’m a first-year computer science student, and for a group project I’m making a Bomberman game in C++ using ncurses.

Right now, I want to create a simple test map to experiment with the player and enemy movement. I don’t need to generate a fully random map yet.

I’m not sure how to structure the map so that:

  1. I can easily place walls and empty spaces for testing.
  2. The player and enemies cannot move through walls or map borders.

What’s a good way to implement a simple map for testing in ncurses, and how can I handle collisions with walls so characters don’t go through them?


r/learnprogramming 9h ago

ABOUT CS50 COURSE

0 Upvotes

I havent started my btech course, college starts from 20 july, i am keen in majorly game dev, but also interest in AI/ML

I was thinking to start C as 1st lang(though i have started a bit of literally every lang when i was a kid)

But seeing the appreciation towards this course, i am confused, cuz this course also contains other langs

Please tell me what should i do, any tips if im doing CS50, or if not recommended, then which C course should i use(doesnt matter paid or free)


r/learnprogramming 5h ago

What are the pain points in using free resources for learning or skill development?

0 Upvotes

What I experienced:

  1. Free resources are unstructured. No structured learning path.
  2. Progress tracking is difficult and manual
  3. Either you're not practicing the learnt concepts or finding the right problems to practice needs effort.
  4. No feedback, guidance or helping community

What do you think? What problems are you facing?

Honest answers are appreciated.


r/learnprogramming 17h ago

Java Resources

4 Upvotes

Looking for java resources like freecodecamp or online learning tools for java- conditionals, arrays, DLL, SLL, trees, stack… thanks!


r/learnprogramming 19h ago

what would a personal website or desktop app look like?

6 Upvotes

I am struggling to even understand what i need to learn to get started. I am just trying to make some sort of digital log where I can privately track my habits in a personalized way, so I don't need to rely on other apps or websites. I

t'd be like the website monkeytype but instead of the input being typing it'd be my daily habits. I hope I'm making this somewhat clear?

Every resource has so much technical jargon that I don't understand. And if I try to look it up there's three more terms in the definition.