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? [October 24, 2026]

10 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 • • 10h ago

At what point did programming stop feeling like memorizing random rules and start making sense?

64 Upvotes

Something I've been thinking about while learning programming is how different it feels to understand a concept in a tutorial versus actually being able to use it on your own.

You can watch someone explain loops, functions, data structures, or algorithms, and everything seems to make sense at the time. Then you open a blank editor, try to build something without following a tutorial, and suddenly you don't even know where to start.

I wonder if this is just a normal stage of learning or if there's a better way to approach it.

For those of you who have been programming for a while, was there a particular point when things started to click? Was it building your first project, solving problems on platforms like LeetCode, reading other people's code, or struggling through bugs until you finally understood what was happening?

I'm also curious how you balance learning new concepts with actually building things. Sometimes it feels like there's an endless amount of material to study, and it's difficult to tell when you know enough to move on to the next thing.

I'd appreciate hearing what genuinely helped you improve, especially things you wish you'd done differently when you were starting out.


r/learnprogramming • • 8h ago

Discussion When people mention having a "personal style" in programming, What does that actually mean?

34 Upvotes

With all of the AI code thats out there now, I've heard people say that most code has lost the unique style of the developers. I can assume its just how they have structured the code and solved the problems but I'm not sure. If that is correct how can I have/develop that as I learn?


r/learnprogramming • • 6h ago

Trying to learn how to code, is CS50 the way to go?

14 Upvotes

Hi guys I'm a high schooler who recently got interested in coding but I have been almost solely relying on ai. I know that I need to actually understand whats going on so I plan to learn how to code proficiently. I can code and understand basic python so far, but I am wondering if CS50 will allow me to progress more efficiently and faster.


r/learnprogramming • • 12h ago

Help! I want to learn coding and game design but am completely clueless!

28 Upvotes

I'm 19 female, and I'm interested in learning to code for game design as a career and trying to decide if I should go to college. I was homeschooled my whole life so careers/college was never a topic so now I'm completely lost. I'm interested in coding because I love the details of game design and I'm pretty sure that's a wide field but I know nothing about the business nor how to code so I'm looking for advice and some insight into what I'd be getting myself into, and mostly where I can learn coding/where to start/maybe a website to teach me or two. I am completely new to this, I don't know anything about the difference "languages" and all that so any advice/tips would be helpful! Thanks for reading.


r/learnprogramming • • 46m ago

Question Early Exits in small sections

• Upvotes

Hello, I have been practicing early exits throughout my code and was told I probably shouldn't be using them in small cases like the following where nesting wouldn't bring the code out too much, this is c++ code:

int findMaxInArray(const int arr[], const int num_elements) {  
  int maxIndex = 0;

  for (int i = 1; i < num_elements; i++) {
    if (!(arr[i] > arr[maxIndex])) {
      continue;
    }
    maxIndex = i;
  }
  return arr[maxIndex];
}

r/learnprogramming • • 3h ago

Tutorial I built a free, open-source Data Engineering roadmap with 579 interview-style questions (with hidden reference answers) to check if you actually learned each topic (and because i want to leave my country after elections)

4 Upvotes

Hey everyone! I’m a data intern at Itaú and I’m working toward a data engineering role abroad. To organize and track my studies, I built (with help from Claude) a free, open-source roadmap that goes from zero to expert level.

It has 579 questions, each with a hidden reference answer, plus an active-review mode that works like flashcards: you answer, flip to the reference, rate yourself, and the ones you got wrong come back more often.

Feel free to use it for your own studies or to contribute. The content was written with AI help and I’m reviewing it as I study, so if you spot any mistakes, let me know. It was written in Portuguese, and the English version uses machine translation.

🔗 https://thiscesarr.github.io/data-engineering-roadmap/
💻 https://github.com/Thiscesarr/data-engineering-roadmap


r/learnprogramming • • 10h ago

Topic How do I improve programming fundamentals and basics?

9 Upvotes

How do I improve my coding ?


r/learnprogramming • • 6h ago

Tutorial Any road map or tips to learn programming, coding nd software stuff from 0

6 Upvotes

I'm not majored in computer science nd all i know is some common knowledge


r/learnprogramming • • 2h ago

Topic trying to implement libc for windows to learn about c programming

2 Upvotes

Repo is here, welcome for contributions and anyone interested:
https://github.com/NHCM-dev/nwlibc

Trying to do a simple C standard library implementation for windows using WinAPI, which I think would be pretty useful for those who want to dive deep into C programming and learn about the mechanism about how programs really run


r/learnprogramming • • 6h ago

I made a youtube automation tool

2 Upvotes

it takes top rated stories from reddit narrates them using a local model adds a satisfying background to activate dopamine receptors of youtube shorts enjoyers and posts automatically using youtubes api without you moving a finger. i actually got better results then i thought in a week (100k+ views). reach me out if you want to check out my github repo and give suggestions to improve or just use it urself maybe.


r/learnprogramming • • 5h ago

Resource What is the best way to read python's (crash course edition 3)?

1 Upvotes

I am trying to learn python with crash course then move to CS50p.

i suffer from a learning disablity and i hear people with such disability still learn python.

How should i read the books entirety then make projects or should i read it all and connect what i want for projects?

i want to figure out the best way to learn for me.


r/learnprogramming • • 15h ago

Need help learning

6 Upvotes

Hello, I'm gonna deviate a little from the usual questions that I've seen so far on this subreddit.

I'm 34 yo and have always had a passion for coding, scripts, mods, and the like. I'm not here to switch over to programming or coding for job-related reasons, but mainly for myself and expanding on my interests. With how fast AI has been "evolving," I'm getting more and more intrigued by the idea of working with it. I would love to make smaller games at some point, or more sophisticated mods for games I like. I understand that I do not "need" AI to help me code or study, but I feel like if I don't hop into learning how to properly and safely use it, I will miss out or slow myself down unnecessarily.

What would be a good way of starting to learn, for example, C#? There isn't really a strong reason why I have chosen C# over anything else, besides the fact that I have some basic knowledge of it. I've tried, and still am trying, to go through "The C# Player Guide" book, but I would love to integrate AI somehow too so I'm not left behind, if that makes sense. I do not wanna take shortcuts or want AI to write code for me so I can cheat, but I would like to work with it if possible.

Do people recommend me to get an OpenRouter account going and start working with it to help me learn, or are there other options that I haven't explored yet?

Again, my focus is on learning it. While I do have goals as mentioned above, I understand that I can't just do it overnight.


r/learnprogramming • • 6h ago

Programming Books That Read Like a Dictionary?

1 Upvotes

Hello. I’ve been wanting to start actually learning more about different programming languages, specifically applications and languages such as C#. I am a learner who loves reading in order to discover new things, but already know a lot about how programming languages work, and how each functions syntax-wise. So I have two questions:

  1. Are there any programming books that specifically work sort of like a dictionary with its documentation, where I can just look to a certain part to know about its syntax for a specific task?

  2. Is C# the way to go for what I want? If needed I can elaborate further. I don’t have an exact thing I want to do. All I know is that C# is a language that works well to build applications and is able to still perform its own tasks math and science wise.

Thanks!


r/learnprogramming • • 7h ago

I have $500 and my goal is to learning programing stuff in online courses , should I buy a pc or laptop? ......(earning $500 as a 17 year old student is not easy, as an example my entire college fees is $2000 for 2 years )

0 Upvotes

Anyone wanna help ?


r/learnprogramming • • 13h ago

How to level up when work is repetitive

2 Upvotes

I have 2 years of experience as Java dev working as a consultant in DC area. I want to start applying for mid level roles next year but I feel like at my current role I not (and won’t) get any hands on experience for more advance issues other than fixing bugs and implementing small features here and there. My main concern is, regardless of what team I join, most of the projects are functional and it’s more maintenance. How can I gain more experience and what topics are expected for mid level devs to be efficient in.


r/learnprogramming • • 8h ago

Code Review Please help me find out why formState goes stale in React Hook Form

0 Upvotes

I recently dabbled in react forms and got React Hook Forms setup to be used with my Zod schemas, it all works perfectly... that is until I reset the form. The reset causes the formState (to my knowledge) go stale as validation messages show that the title input is empty, but inspecting its value property through code and looking at the display of typed characters on the screen proves otherwise.

I tried multiple stuff and went through the React Hook Form docs, but tbh the docs were utterly useless as I couldn't make heads or tails of any of it. Interestingly tho, using watcher to re-render the react component causes all of it to work so I suspect its a synchronization issue, but I'm still starting out so I don't know for sure...

Schemas:

const PLAIN_DATETIME_REGEX =
  /^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?$/;


const DISPLAY_TIME_REGEX = /\bMoments\b|[hm]$/;


export const taskSchema = z.object({
  id: z.uuid().default(() => crypto.randomUUID()),
  status: z.literal(["complete", "incomplete"]).default("incomplete"),
  title: z
    .string()
    .trim()
    .min(1, "Title cannot be empty")
    .max(100, "Title cannot exceed 100 characters"),
  description: z.preprocess(
    (raw: string) => raw?.trim() || undefined,
    z
      .string()
      .max(2000, "Description cannot exceed 2000 characters")
      .optional(),
  ),
  createdAt: z.iso.datetime().default(() => Temporal.Now.instant().toString()),
  deadline: z.preprocess(
    (raw: string) => raw?.trim() || undefined,
    z
      .string()
      .regex(
        PLAIN_DATETIME_REGEX,
        "Deadline must be a valid ISO 8601 plain date and time",
      )
      .optional(),
  ),
  priority: z.literal(["low", "medium", "high"]),
});


export const taskFormSchema = taskSchema.omit({
  id: true,
  status: true,
  createdAt: true,
});


export const taskViewSchema = taskSchema.transform(
  ({ description, createdAt, deadline, ...rest }) => ({
    ...rest,
    description: description,
    createdAt: formatDateTimeSince(createdAt),
    deadline: formatDateTimeUntil(deadline),
  }),
);


export type Task = z.infer<typeof taskSchema>;
export type TaskForm = z.infer<typeof taskFormSchema>;
export type TaskView = z.infer<typeof taskViewSchema>;

Form Component:

export default function TaskSaver() {
  const {
    register,
    handleSubmit,
    reset,
    formState: { errors },
  } = useForm<TaskForm>({
    resolver: zodResolver(taskFormSchema),
    mode: "onChange",
    defaultValues: {
      title: "",
      description: "",
      deadline: "",
      priority: "low",
    },
  });


  const addTask = useTasksStore((state) => state.addTask);
  const id = useId();


  const onSubmit: SubmitHandler<TaskForm> = (data) => {
    const result = taskSchema.safeParse(data);


    if (!result.success) {
      console.error(result.error);
      return;
    }


    addTask(result.data);
    reset();
  };


  return (
    <form onSubmit={handleSubmit(onSubmit)} className={styles.root}>
      <div className={styles.group}>
        <label htmlFor={`title-${id}`} className="sr-only">
          Title
        </label>


        <input
          type="text"
          {...register("title")}
          id={`title-${id}`}
          className={clsx(styles.input, styles.inline)}
          placeholder="Title"
        />


        {errors.title && <p className={styles.error}>{errors.title.message}</p>}
      </div>


      <div className={styles.group}>
        <label htmlFor={`description-${id}`} className="sr-only">
          Description
        </label>


        <textarea
          {...register("description")}
          id={`description-${id}`}
          className={clsx(styles.input, styles.multiline)}
          placeholder="Description"
        ></textarea>


        {errors.description && (
          <p className={styles.error}>{errors.description.message}</p>
        )}
      </div>


      {/* Needs to be worked on: below */}
      <div className={styles.group}>
        <label htmlFor={`deadline-${id}`} className="sr-only">
          Deadline
        </label>


        <input
          {...register("deadline")}
          id={`deadline-${id}`}
          className={clsx(styles.input, styles.inline)}
          placeholder="Deadline"
        />


        {errors.deadline && (
          <p className={styles.error}>{errors.deadline.message}</p>
        )}
      </div>


      <div className={styles.group}>
        <label htmlFor={`priority-${id}`} className="sr-only">
          Priority
        </label>


        <select
          {...register("priority")}
          id={`priority-${id}`}
          className={clsx(styles.input, styles.dropdown)}
        >
          <option value="low">Low</option>
          <option value="medium">Medium</option>
          <option value="high">High</option>
        </select>
      </div>


      <div className={styles.group}>
        <button type="button" className={clsx(styles.button, styles.reject)}>
          Cancel
        </button>


        <button type="submit" className={clsx(styles.button, styles.accept)}>
          Save
        </button>
      </div>
    </form>
  );
}

r/learnprogramming • • 10h ago

Help Help continuing?

1 Upvotes

Hello! I've had a problem doing things I genuinely love, I have a huge passion for coding and it is so fun, but I suck at it T-T. I've been trying to learn for so long but I've never actually got anything to be able to stick, I'm still only 18 so I have time. I'd love to go to college but sadly I can't drive for many reasons and also I don't want to do online, it's not something that works for me. Recently (And this could possibly get looked down upon) around 6 months ago I decided to try and teach myself with AI and honestly it has worked wonders I've learned a good bit, except I have a problem which goes to a lot of other things as well, I start something no matter how passionate I am or how fun it is, Usually if I get distracted off of it for one day or even want to just take a break its like I stop doing it entirely, I was learning python for a month then stopped, 3 months later I started learning C# and I've got it down a lot, but I had to buy a new PC cause mine broke and I tried to do it again but like I stopped for some reason. Maybe some will say "Oh well then your not passionate about it" but I genuinely love it, I just get distracted and I dont know how to fix that. I do have an Attention Deficit Disorder so I thought maybe that could be why but I dont want to make excuses.

The only thing to really keep me on it which I loved and had so much fun was friends doing similar things like my friends did 3D modeling and I started it cause I wanted to learn it eventually and put many hours into it. But they stopped and I continued for about a month then stopped, but only cause I got distracted by some other things.


r/learnprogramming • • 1d ago

How you would start your learning in 2026?

15 Upvotes

Hey everyone,

I’ve always dreamed of learning how to code and landing a remote job with a decent salary. I’m 27, living in Brazil, and currently studying Electrical Engineering.

My main question is about the current state of the industry. With new AI models dropping practically every week, all I see online is people saying entry-level tech is doomed and salaries are tanking. Is that actually true, or do self-taught newcomers still stand a chance in 2026?

Also, if you were starting from scratch today, how would you approach learning?

I completed CS50, absolutely loved it, and then naturally transitioned to The Odin Project (TOP). But honestly, my progress has hit a wall. I ended up beating myself up trying to get through data structures and algorithms it’s been pretty frustrating. Is TOP still the go-to path in 2026, or are there better alternatives for full-stack/web development nowadays?

and whats the fastest way of landing a job on the industry, fullstack?

Would appreciate any honest advice or reality checks!


r/learnprogramming • • 13h ago

I’m 20, living on my own, and currently working a pretty tough job just to pay the bills. In my spare time, I’m grinding backend development under the guidance of my dad (a Senior Engineer).

0 Upvotes

Hey everyone,

I’m 20, living on my own, and currently working a pretty tough job just to pay the bills. In my spare time, I’m grinding backend development under the guidance of my dad (a Senior Engineer).

My current status & stack:

  • Stack: Python, Django, SQL, PostgreSQL, Docker, Git, REST APIs, JSON, OOP.
  • Learning method: I don't code purely from memory. I search for solutions, watch tutorials, use LLMs, and — most importantly — cross-check AI answers against official documentation to filter out hallucinations.
  • English level: Reading & listening comprehension is around B1–B2. I can read docs and understand native speakers easily. However, my spoken English feels like A2 — I get stuck and stumble over words. I recently started practicing with a native US speaker, but it's still tough.

Where my anxiety comes from: My brother recently landed a Junior dev role at a European company (the hiring process was in Russian because of the team structure). In my case, I'll need to pass technical interviews fully in English.

I’m constantly worried that:

  1. The EU junior market is moving too fast and I’ll be left behind despite all this effort.
  2. Relying on Google, docs, and AI means I'm "doing it wrong" or not learning properly.
  3. My weak spoken English will instantly disqualify me during behavioral/technical interviews.

My questions to the community:

  • Is my learning methodology (using AI + verifying with docs) acceptable for a Junior, or should I be memorizing more?
  • How high is the language barrier for Junior Backend roles in the EU? Is basic tech-communicative English enough to get hired?
  • Any advice on pushing through the fatigue of balancing a bad job, living alone, and studying?

TL;DR: 20yo living alone, balancing a bad job while learning Python/Django + Docker with my Senior dev dad. Reading B1-B2 English, speaking A2. Worried about EU market shifts and failing English interviews. Looking for feedback and reality checks.


r/learnprogramming • • 11h ago

Topic been coding for a bit, cannot manage stress, need advice.

0 Upvotes

i love results, i made a bit of tools, simple games and all and plan on doing allot more.

but the second i get into somewhat unfamiliar territory or my code doesn't run the first or second time i spiral, stop really thinking and just play with values hoping it works, that'll last as long as the problem isn't done

my leg starts shaking and my chest hurts, my breathing gets worse ect, avarage stress session

i thought it'd get better the more i solve problems but that doesn't really work, it only makes me better at solving problems i solved before, but i still stress when i mess them up. i tried music, breathing techniques and stopping caffeine intake, really does nothing for me

i am able to make stuff but the process is mentally tiring which i assume only makes it worse, and i take so so much longer than i should. this happens with any type of problem solving (especially math) but the most with programming, i'm wondering if anyone has experienced/knows how to deal with this and eliminate it


r/learnprogramming • • 1d ago

Would you write if-else in this example deliberately even if the for loop can handle it actually?

7 Upvotes

For example, there is a for loop to list the difference of scores at each time (in JavaScript):

for(let i = 1 ; i < scores.length ; i++){
    console.log("Score changes: " + (scores[i] - scores[i - 1]));
}

If there is no score or only have one score, the loop would not run, which meets the current requirement.

I'm curious if you would prefer add the if-else deliberately like the following:

if(scores.length >= 2){
  for(let i = 1 ; i < scores.length ; i++){
    console.log("Score changes: " + (scores[i] - scores[i - 1]));
  }
}

in order to remind yourself or other teammates that this loop is designed for scores with 2 or more elements only (especially for maintain and requirement changes). Is it necessary?


r/learnprogramming • • 1d ago

Termux/Shizuku

4 Upvotes

Can termux be run with shizuku and get the same privileges and freedom as if my device was rooted??? If not what are the differences and limitations between the two? I'm just practicing on a cheap non-rooted android ran moto g 2025 phone. TIA


r/learnprogramming • • 1d ago

How to improve at reading documentation?

10 Upvotes

Hey everyone, so I know reading documentation isn't the glamorous part of programming, and I'm still learning, but reading documentation is very difficult for me. Or at least that's how it feels.

Maybe I just need to focus on the parts I find practical?

I'm doing an externship and it's not supposed to be to difficult, but one of the assignments is to read about Java Spring Boot and learn about a cloud hosting platform, then write a formal proposal and design document for creating a system to keep track of a list of employees. We'll implement it later. Honestly, I'm not sure what I'm supposed to be doing when reading. Do I need to remember key details? Maybe it's better to just focus on the question and the work I need to do, and then focus on pulling what I need for the assignment? Or, maybe I'm just bad at reading and remembering things?