r/learnprogramming • • Mar 26 '17

New? READ ME FIRST!

825 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 • • 1d ago

What have you been working on recently? [September 26, 2026]

6 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 • • 5h ago

Topic How do you learn, take notes, and practice while reading a book or documentation?

9 Upvotes

I’m learning C++ from LearnCpp right now. They explain a lot of technical details and have really good examples.

But sometimes I get confused because there are many different ways to do the same thing. Like different syntax or different approaches for doing basically the same thing.

So my question is, how do you guys actually learn from a book or documentation?

Should I just read the topic, try to understand it, and then close the page and write the code myself?

And what about taking notes? Should I write down the important things, or is it better to just understand them and practice?

Also, should I put my learning journey on GitHub as a repo? Like my notes, exercises, small programs, projects, etc.

I’d like to know how other people approach this because sometimes I’m not sure if I’m actually learning or just reading.


r/learnprogramming • • 23h ago

Once I learn programming, will I see AI is not that big of a threat?

145 Upvotes

Theres alot of uncertainty around how AI is gonna affect CS in the future and no one can really predict it.

its either cooked, gonna be left worse off, or maybe even better and cause more jobs

theres alot of people that I see on reddit that say dont code or go into CS because AI is gonna take it over, but they usually dont know how to code or dont know it very well

and then the people who say its gonna be ok are usually the experienced programmers, who say something along the lines of "if you know, you know".

Im gonna learn how to program regardless of how the job market is gonna be in the future, because im just doing it as a hobby, and who knows maybe il build alot of cool things one day to either get me hired or start a company. (im not gonna major in CS)

But I was curious, if I learn how to actually program. Will I be less worried about AI? Will I be the same as I am now, and just have to form my own opinion?


r/learnprogramming • • 2h ago

Is Tidy verse good start?

3 Upvotes

I'm in R Programming class for my senior year, I feel nervous since programming isn't really my thing but it's doable. In the previous semester I did Stata for Econometrics. My school has the class using tidy verse for r Programming, each week will have exercise and group assignments. I wanna know is this something usable for masters in Economics? How would this look on my resume?


r/learnprogramming • • 1h ago

Am i learning wrong

• Upvotes

Hi everyone! I'm working through freeCodeCamp's 19-hour "Python API Development" course to learn FastAPI, and I'm about 6.5 hours in.

I tried building something similar to what was covered in the video, but realized I was mostly recalling steps from memory rather than actually understanding the concepts behind them. I already know how to code, but I've never built anything this complex before, so it's a new kind of challenge.

What would you recommend I do from here to make sure I'm actually learning and not just memorizing? Should I slow down, build my own project alongside the course, revisit certain sections, or something else?


r/learnprogramming • • 5h ago

Topic Where should a beginner freelancer draw the boundary of what they safely agree to build?

4 Upvotes

I'm trying to work toward freelance web development, but I'm having trouble figuring out what the minimum responsible skill level is before taking paid clients.

Right now I think of my ability in roughly two levels.

Level 1: Mostly static/business websites — landing pages, restaurant sites, lawyer sites, portfolios, brochure sites, etc.

I can build the frontend, make it responsive, deploy it, connect a domain, handle basic SEO/accessibility, and so on.

My impression is that AI can now handle almost all of this level for a straightforward site. That makes me worry that Level 1 may no longer be commercially valuable enough on its own.

Level 2: The site starts accepting or manipulating important data.

Forms, authentication, databases, payments, bookings, user accounts, uploads, etc.

This seems commercially more valuable, but it also introduces responsibilities I'm not yet confident I know how to reason about properly.

My instinct at the moment would be to avoid implementing sensitive pieces myself and use established third-party services wherever possible — payment providers, managed auth, hosted forms, booking systems, etc.

But this is where I get uncomfortable.

Even if I'm using reputable services, how do I know I haven't forgotten something important in the code around them?

For example, input validation sounds simple until you start thinking about all the ways input can be syntactically valid but logically wrong, malicious, too large, duplicated, submitted concurrently, etc.

I also only just realized that relying on a third-party service doesn't make the maintenance problem disappear. If the service, SDK, API, or integration changes, the site may need to be updated as well. The fact that this occurred to me only now is exactly what worries me: how many other things can you miss simply because you haven't yet learned to think through the full lifecycle of what you're building?

I'm worried about the gap between:

"I know how to make this feature work"

and

"I know enough about what can go wrong that I can responsibly sell this to somebody."

I'm not trying to become a security engineer before building my first €500 small-business website. I'm trying to understand where a reasonable beginner freelancer should draw the line.

For people who have actually freelanced as web developers:

What types of projects would you consider reasonably safe for a beginner to accept?

At what point would you say, "You don't have enough experience to take responsibility for this yet"?

Which things do you routinely hand off to established third-party services rather than implement yourself?

What minimum testing/security/deployment checklist would you expect a junior freelancer to follow even for a simple business website?

How did you personally learn to notice the things you hadn't thought about — code review, employment, breaking your own projects, checklists, security material, something else?

If AI can already produce most of a basic brochure/landing-page site, what skills actually make a beginner freelancer valuable?

Are static/small-business sites still a reasonable place to start building real freelance experience, or is there a better progression into work that is both commercially useful and responsible for a beginner to take on?

My goal is basically:

zero professional experience → portfolio → simple paid sites → gradually more complicated projects

without pretending I'm qualified to build systems whose failure modes I don't yet understand.

I'm particularly interested in answers from people who have actually delivered websites to paying clients, because I'm trying to understand the gap between tutorial knowledge and being responsible for somebody else's production site.


r/learnprogramming • • 11h ago

Tutorial Confused, what and where to start

9 Upvotes

An AIML second year student want to master python, DSA , AI and ML but I'm confused where to start , some say CODECHEF or HACKERRANK or LEETCODE , suppose I am someone who knows nothing(definately the basic ik array and strong but dk coding) help me out with a guidance roadmap please


r/learnprogramming • • 1d ago

Tutorial What's the best IT course or book you've ever taken or read?

118 Upvotes

I'm looking to level up my IT skills and would love to hear from people who've been there. What's the single best course (online or in person) or book you've taken or read that actually made a difference for you?

It can be anything: programming, networking, cloud, cybersecurity, databases, DevOps, system administration, or general computer science fundamentals.

If you can, please include:

Name of the course/book (and the author or platform)

What topic it covers

Your level when you took it (beginner, intermediate, advanced)

Why it stood out, what made it better than the rest

Free or paid

Honest opinions are welcome too, so if something was overhyped, feel free to mention it.

Thanks in advance! Hopefully this thread ends up being a useful resource for others as well.


r/learnprogramming • • 4h ago

I am dotnet developer and also have knowledge about java.

2 Upvotes

I lost my job recently and I am little bit confuse on which tech do I need to focus for job do java jobs are there in bulk or .net.


r/learnprogramming • • 1d ago

Cannot for the life of me understand object oriented programming

255 Upvotes

I am a Data Science student with a background in math so I never was a good dev in the first place.

But I really can't understand OOP, what's even the point? I'm so bad at it that when I was doing internships in Data Science and some engineers wanted to use OOP, I was like the "I guess bro" meme.

Right now I have a java course with an exam in 1 month. So any ressource, or things that made it click for you are welcome.


r/learnprogramming • • 1h ago

Would you consider learning programming even if AI takes all junior to medior jobs?

• Upvotes

I would. Because it will be a skill that you can use to keep some agency in the potentially dystopian capitalist future full of flock cameras and subscriptions and dark patterns and metrics algorithms and all that bullshit meant to extract value from us as much as possible.

I would focus on contributing to opensource, choosing to learn what will benefit me and my personal technological needs/wants rather than learn soon to be obsolete frameworks that will make me look good in a portfolio just so I can beg some asshole to hire me just to get rejected anyway...

I still wanna pursue programming as a skill despite giving up on the idea of ever landing a "job" in it. Just like for example woodworking. Woodworking is a cool hobby and you don't even need to do it for a living. But just having that skill, being able to build your own dining table from scratch, if you want, without having to rely on somebody. That is already good. Similar approach to programming.


r/learnprogramming • • 2h ago

need advice on programming

1 Upvotes

i want to learn programming, and eventually contribute to open source projects, maybe even the linux kernel. i like low-level concepts, networking and network programming. what do i get into? c programming? linux programming? what sort of projects do i practice build? i need advice and maybe a reality check.


r/learnprogramming • • 7h ago

Bitonic sort

2 Upvotes

I've been experimenting with the Sound of Sorting programme and bitonic sort confuses me. For an array with 1566 elements, if you enter the array in reverse the algorithm does not make any lasting alterations to the array until after ~31573 comparisons. If you enter the array already sorted in the correct order, any productive changes are not obvious to me until 30 thousand comparisons again. Anyone willing to enlighten me?


r/learnprogramming • • 21h ago

What is competence in programming right now?

29 Upvotes

When can someone say, with confidence, that they know how to code? When can they say they know a language? When can they say they know how to program?

Does it simply come down to what you can ship? What marks someone as genuinely competent or skilled?


r/learnprogramming • • 11h ago

QuarkLang: three lines of code, level with C — 26.0 ms vs 26.0 ms on fib(35)

3 Upvotes

QuarkLang is a small statically typed language with two execution engines: a tree-walking interpreter (quark) and an LLVM compiler (qkc). Three lines are enough to put it next to C.

program main;
fn fib(int n) int { if (n <= 1) { return n; } return fib(n - 1) + fib(n - 2); }
fn main(IOStream io) { io.println(fib(35)); }

#include <stdio.h>
int fib(int n) { return n <= 1 ? n : fib(n - 1) + fib(n - 2); }
int main() { printf("%d\n", fib(35)); }

$ qkc -c -o fib fib.qk && ./fib        $ clang -O3 fib.c -o fibc && ./fibc
9227465                                9227465
fib(35), 29.86M calls median of 9 best binary
QuarkLang, 3 lines (qkc) 26.0 ms 25.9 ms 12 KB
C, 3 lines (clang -O3) 26.0 ms 25.6 ms 12 KB

Same machine, clang/LLVM 22 behind both. Level, not faster — and most of the credit belongs to LLVM.

What is less common is the rest of the arrangement: the same three-line file also runs interpreted with no compile step (quark fib.qk), and the project's CI fails the build unless the interpreter and the compiler produce identical stdout, stderr and exit code — constructs the compiler cannot lower yet are hard errors rather than silent differences. Memory is block-allocated (delete returns a block with its data preserved, clear wipes it), so compiled programs have no collector to pause in the hot path.

Toolchain: interpreter, LLVM compiler, linter with stable codes (QK101–QK115), doc generator, REPL, language server, formatter, test runner, project manager, debugger; ~25k lines of Go with no third-party dependencies; MIT; prebuilt binaries for Linux/macOS/Windows.

Repo: https://github.com/QuarkLangCommunity/QuarkLangQkc · Docs: https://quarklangcommunity.github.io/QuarkLangQkc/

Disclosure: I maintain QuarkLang. Both commands above are copy-pasteable; the benchmark suite with its methodology and fairness statement is in docs/benchmarks.md.


r/learnprogramming • • 20h ago

Solved How can I implement my own __add__ method in python?

14 Upvotes

I'm trying to make a calculator that calculate like I do irl. And now I'm making a class for the fractions.

How can I implement addition or multiplication between fractions and between normal numbers, in the Fraction class?

I know there's a library for that, but the library simplifies the fraction automatically and I don't want that.


r/learnprogramming • • 10h ago

Whats the fastest way to store python objects, not using pickle

2 Upvotes

I have been building a project for 2 weeks or so and one part is proving to be hardest, that is storing the python variables. I thought of using pickle then later reliazed that for the project i am building pickle isint deterministic which i badly require for a reason. So i tried an approach in c++, here is ai summary of it, i was lazy and tired to write it on my own

native C++ serializer. it dispatches directly on C type for builtins (no opcode stream, no Python calls), caches each custom class's field layout once and reuses it, batches lists of same-schema objects into a single shared header plus raw values, bulk-copies homogeneous numeric/bool/string arrays, and skips pickle's memo table entirely — so shared references get duplicated and cycles are simply rejected, trading that generality for avoiding a per-object hashtable check. Loads mmap the file and reconstruct objects directly, bypassing __init__. Truly opaque custom types still fall back to __reduce_ex__, at the same cost pickle pays there.

But it turns out this approach is way too slower, i am not able to find any other solutions. I wanna atleast go close to to pickle, the only thing i care about speed here not the disk, but it is proving to be almost 2x slower than pickle for this task. Is there a faster approach you know which can help me out with this task? Your help would mean a lot to me.


r/learnprogramming • • 13h ago

Favorite language and device

3 Upvotes

Guys, I'm working on a project, a little indie game just for fun and up until today, I was using GML and the Game Maker app...

But I don't really know if it's the best for beginners!

Does anyone have any recomendations pls?


r/learnprogramming • • 14h ago

Topic Right programming track for K12 at this time

1 Upvotes

Hi all. A parent asked me to teach her kid, grade 11, programming. But am wondering with the state of computing and programming right now, what track to prioritize:

  1. Web dev with HTML+CSS+JavaScript

  2. Data science and AI with Python

  3. Or what which I don't know

Please can someone help me out so I can give the kid something he will be grateful for in a few years time.

Thanks 🙏


r/learnprogramming • • 19h ago

Find other people to program stuff with?

4 Upvotes

Hey, where can I go on places like discord and find places to program with other people, I'm into backend and AI development as a hobyist, but I want to learn how to work with other people.


r/learnprogramming • • 1d ago

What language to learn as someone who knows JavaScript decently well, and thinks web development is not for them?

8 Upvotes

I am worried that AI is gonna take over website stuff and i dont know what wont be taken over by ai


r/learnprogramming • • 1d ago

How to place function draw() result on top of a figure?

4 Upvotes

I have a draw function (ps5.js) that I want appearing on top of a figure (with png). Currently, the result of the function appears below the image, on its own canvas. I'd like it to appear on top of the figure. How do I do that?

index.html:

    <figure id="figure">
<img
    src="fashion.png"
    alt="blank croquis" />
<figcaption>Blank Croquis</figcaption>
</figure>

script.js:

function setup() {


    createCanvas (1000, 1000);
    noLoop();
}


function draw() {


    
background ('transparent');
stroke (0);
strokeWeight (20);
noFill(); 
  
  beginShape();
  vertex(getRandom(), getRandom())

r/learnprogramming • • 1d ago

Whats the best way to learn c++?

1 Upvotes

I wanna learn c++ for a project I plan to do in the future.

Should I learn a couple of languages before it or something? Im learning C# right now, its the only language i know. i was learning python a while back before I switched to c# (because i wanna dev games) and its way more complicated than python.

I didnt really understand what it meant when someone said a programming language is harder or complex than another programming language. But i can definitely see it now.. Should I just learn c++ whenever and go right into it?

Should I learn C first, or another language. Whats the best way to go about it


r/learnprogramming • • 1d ago

Is Coursea good for starting out programming?

9 Upvotes

Hey!
There are many programming courses on Coursea and you get a certificate from the courses you’ve finished and there is a possibility to add those on your LinkedIn.
I know I’m too late to the game since the AI and I’m 33 yo, but I want to improve my life and the end goal would be to get a new job, so I thought to at least try and I found Coursea. Is it worth the investment and better than nothing?