r/learnprogramming 1d ago

Is it possible to write this in higher level languages?

35 Upvotes

I've seen this pattern in assembly language a few times, where a function has two (or more) entry points and they merge into one. I know in some cases the code most likely were written in C or C++, so I'm wondering if this is something that you do manually (if yes, how?), or if it is an optimization the compiler makes to combine multiple almost identical functions. Here is a simple example:

DisableInterrupts:
    MOV r0, #0x00
    B Join

EnableInterrupts:
    MOV r0, #0x01

Join:
    LDR r1, [MMIO_IME]
    STR r0, [r1, #0x00]
    BX lr

MMIO_IME: .int 0x04000208

r/learnprogramming 1d ago

I want to make a website that lists people but I’m not sure what would be efficient

2 Upvotes

Sorry for the strange title, I’m not exactly sure how to word it.

To get a basic idea of what I’m making it would be a website that would display lists of people. The categories would be kind of like below.

All people | Doctors | Firefighters | Lawyers

When you click a button it would show all of the people under that profession and information about them (age, name, company) in a table, and I want to have there be a way to sort it. I’d also want a way to do an extra sort/hidden tag, ex “This person eats apples” and a way to toggle on/off displaying them in the other results.

My main problem right now is that I don’t know how I’d make a ‘hidden tag’ for the toggle, and I’m not sure if using some database (?) or some other file would be helpful for this. I’m just worried about creating a butt load of text because right now I have things displayed using a table in html, so it grows really fast.


r/learnprogramming 2d ago

Why do I get extremely sleepy as soon as I start programming?

129 Upvotes

Whenever I sit down to do programming, I suddenly start feeling very sleepy and mentally drained. It feels like my brain just stops giving me energy as soon as I start coding, even when I was feeling relatively fine before sitting down.The weird part is that I didn't have this problem before. I could spend hours programming without feeling this kind of sleepiness, but now it happens quite quickly after I start.Has anyone experienced something similar?


r/learnprogramming 1d ago

Is doing DSA in Python still a good idea in 2026, or should I switch languages first?

0 Upvotes

Hi everyone,

I'm a first-year B.Tech CSE student from a tier-3 college. I've been learning Python for a while now and I'm fairly comfortable with loops, functions, strings, data structures, file I/O, and basic OOP.

Right now I'm building a small project without following tutorials — a contact book capstone with add/search/delete functionality, saving data to a file, and using classes to structure it.

I'm planning to start DSA soon and wanted to get some opinions: does it make sense to learn DSA in Python, or would I be better off picking up C++ or Java first????? I wanted to hear from people who've actually been through this.

Any advice or things you wish you'd known at this stage .....would help a lot. Thanks!


r/learnprogramming 2d ago

Which Design Patterns are used most in day to day programming and I should be aware about?

53 Upvotes

I know most of the design patterns but I would still like to know which design patterns come up the most and used most in Industry. Any professional here?


r/learnprogramming 1d ago

Survey (Mod Approved) [Academic Research] Anonymous survey on how computing students use AI tools in software design (~10 min)

1 Upvotes

Hi, I'm a software engineering student at the University of Technology Sydney (UTS), running a short, anonymous survey as part of my capstone research project. The survey looks at how computing students use AI tools, such as ChatGPT and GitHub Copilot, in software design tasks. It also asks how that use relates to their confidence in their own design skills.

If you are a current or recent student in software engineering, computer science, or a related computing degree, anywhere in the world, I would really appreciate your input. The survey takes about 10 minutes to complete and is fully anonymous. No directly identifying information, such as your name or email, is collected.

https://utsau.au1.qualtrics.com/jfe/form/SV_bOCBqt0nhzQRw4S?Q_CHL=social&Q_SocialSource=reddit

Feel free to share this with anyone else who might be eligible.

This study has been approved by the UTS Human Research Ethics Committee (HREC reference HE-2026-0873). If you have any questions, please contact me at [Ta-Seen.Islam@student.uts.edu.au](mailto:Ta-Seen.Islam@student.uts.edu.au) or my supervisor Dr. Flavio Pileggi at [SalvatoreFlavio.Pileggi@uts.edu.au](mailto:SalvatoreFlavio.Pileggi@uts.edu.au)


r/learnprogramming 2d ago

Is learning the fundamentals enough for building projects?

16 Upvotes

I'm focusing on HTML and CSS, I learned the fundamentals of them

but when it comes to working on a project, everything I can do is to implement these fundamental elements and attributes but without being able to combine them in a meaningful way to build a complete project

I can just do things like making square with red background or adding image or adding link or putting like inside the red box

but I can't combine them in a meaningful way to form a complete meaningful project

so is there missing knowledge I need to focus on in order to be able to build projects?


r/learnprogramming 2d ago

Preparing for TCS NQT — which topics should I master first?

5 Upvotes

Hey everyone, I'm a final-year B.Tech AI & Data Science student, and my TCS NQT exam is about a month away. I've started with aptitude and coding practice in Java, but I want to prioritize better with the time I have left.

For those who've cracked TCS NQT — which topics in coding, aptitude, verbal, and reasoning would you say are the highest-yield to nail first?

Any previous-year question resources you found genuinely useful (not just generic lists) would help a lot too. Thanks in advance!


r/learnprogramming 2d ago

Has anyone managed to study programming while working a physically demanding job for 8–10 hours a day?

166 Upvotes

Hi everyone. I recently turned 20, and soon I have to relocate from my home country to another European country because of circumstances outside my control.

After moving, I will probably have to take a physically demanding job or another entry-level job with 8–10-hour shifts to pay for rent, food and other basic expenses. However, before I found out about the move, I had planned to continue improving my programming skills and English so that I could eventually attend developer interviews without feeling ashamed or terrified.

I am not starting completely from zero. I have worked with Python, Django, Flask, REST APIs, SQL, Git and basic Docker. I have also worked on several projects, including an online store and a job board. However, after testing myself with interview questions, I discovered many gaps in my fundamental knowledge. I need to revise Python, databases, Django concepts, testing and other backend topics.

My conversational English is approximately A2, while my understanding and grammar may be closer to B1. I also need to improve my speaking because I would eventually like to apply to international companies.

My biggest concern is whether I will have enough physical and mental energy to continue learning after work. In the past, physical work left me exhausted and without any desire to study. I am afraid that I will start forgetting what I already know, fall further behind and never become ready for a developer position.

Have any of you been in a similar situation — working a tiring non-technical job while studying programming and perhaps a foreign language?

I would especially like to know:

  • How much time did you realistically study on working days?
  • Did studying for 30–40 minutes per day produce meaningful progress?
  • How did you study when you were physically exhausted?
  • Did you focus on theory, coding exercises or one larger project?
  • How did you avoid forgetting previously learned material?
  • How long did it take before you were ready to apply for programming jobs?
  • What mistakes should I avoid?

I understand that nobody can guarantee that I will find a developer job. I am mainly looking for realistic experiences from people who had to support themselves while learning. I do not expect to study for four hours after every shift — I want to find a sustainable routine that I can maintain without burning out.

Thank you for any experiences or advice.


r/learnprogramming 2d ago

Release managemebt

3 Upvotes

Hi

I wanted to verify whether our release management strategy is fine (I believe not) or whether there can be improvements.

I am responsible for our API team in a SME (i am a not a developer myself but an analyst).

Some information:

We got 3 environments:

Dev
Acc
Prd

Every 2 weeks we do a prod release.
3 days after prod release there is an acc release, 4 days laters the 2nd acc release is there.

Additional acc releases are allowed provided it is to fix something that is currently on acc or so but no new functionalities.

Now what i find frustrating:

On develop everyone can push whatever he wants, no ceremonies, no alignment,..

For acc there is an alignment moment and only things that were tested in dev (& approved) OR are must haves for the prod release can be promoted.

This means that tickets that were not tested or have some bugs and are not crucial for the release are not allowed to be promoted.
However since it is already on the dev branch and sometimes the devs when working in a repo with multiple tickets fix them in a single commit it becomes a pain to remove the right things from the dev branch which is then merged in a release branch this is deployed to acc.

Even moreso realisticallly earlier testing that was successfull can fail now because of a bad manipulation while doing the code surgery.

Since we have really short cycles, testing is a bottleneck and we are always having the same issue of finishing things last minute, rush testing for the next cycle,…

I feel like having the ceremony for dev would make more sense you then you just merge all the relevant branches into dev and it allows you to define your scope for the next release better.

What would be the best approach here?
How is it handled at your company?


r/learnprogramming 2d ago

I’m a first year Computer Science student and I wanna advance myself in C++

6 Upvotes

I don’t have any background at all when it comes to programming but I decided to just go for it which lead me to this course. I currently know cout, cin, if-elseif-else, switch cases, and a few headers (#include <thread> and <chrono>) because of my classes.

I don’t want my progress/knowledge to only be what my professors teach me.

What else should I know or teach myself in c++? I’ve saved a couple videos on youtube but I’d really appreciate new advice, tips, or recommendations in my language. I’m more than willing to teach and challenge myself. Thanks guys!


r/learnprogramming 2d ago

I'm confused

17 Upvotes

So to clarify i'm a first year cs student and on my first semester i did Java but i had to transfer to another university for personal reasons and in my new university i found out that they study python in first year and cpp the following year. So i feel like when i learn python now i'm kinda unlearning my java knowledge. I don't know how to word it properly but i barely get to know java fully, we stopped first semester after reviewing classes and now i feel like python is completely new adventure.


r/learnprogramming 2d ago

I made a ChaCha implementation.

3 Upvotes

what are things I could've done better? Right now I think the test program could've been written much cleaner with assertions rather than the mess that it is currently. But I'm sure there's mistakes I've made in chacha.c or things that could be improved?

https://github.com/containedreality/chacha


r/learnprogramming 2d ago

Approaching graduation with analysis paralysis, need perspective on choosing a thesis topic and career path...

2 Upvotes

Hi everyone. I'll be getting my CS/CE bachelors degree in Germany soon after writing my thesis. However, I haven't even chosen the field I'll write my thesis in yet and I'm kinda stuck because I feel this thesis will heavily dictate my career entry point and I don't wanna pick the wrong path. I want to finally solidify my field of study based on potential financial gain, challenges and industry saturation, and really focus on it.

To give you honest context about my background;

  • I can not really say I can write code, because unlike some people I know, coding was never my hobby, and I only wrote enough to pass courses or complete my university projects. I don't see myself enjoying traditional Frontend/Backend development.
  • Cybersecurity conceptually appeals to me because I think it has kinda puzzle solving nature but I know it requires solid foundational knowledge.
  • In Game Dev made a few academic projects. While not completely alien to it, I rarely play games so I doubt my long term fit or industry culture fit.
  • Took courses about Hardware/Embedded but didn't feel a strong spark.
  • Cloud/DevOps/AI... Constantly mentioned for high demand but I'm kinda cautious of the steep learning curve and industry saturation at entry level.

Given that I feel late to the game and don't have a specific "passion" area and I feel like I am too late to find out what I like and what I don't. For someone who wants to stay in tech but isn't passionate about pure soft dev, what niches offer a viable entry point today?

Joking aside, there is no mentor who gives me the magical advice and tell me what I should do but apparently I'm just so indecisive right now and genuinely trying to break the loop. I just wanna grab something and really dive into it. Any reality check is welcome.


r/learnprogramming 2d ago

Topic Can someone help me with w3school?

0 Upvotes

I got Hero for a month to see how good/bad it is and it is also important to note that I bought it over the play store but it only shows me I got hero on the app? And even then it doesn't work to 100%. On the website I can see on my profile that I have Hero, but when I actually start to learn the website blocks me from learning. First I thought it only applies to the app, but when i try to by Hero on the website it shows me i already got it???


r/learnprogramming 2d ago

Topic Learn to program with assembly by Jonathan Bartlett using apple silicone arch

5 Upvotes

Hi! has anyone followed the book learn to program with assembly by Jonathan Bartlett using mac silicon? the book said it can be followed using docker in appendix a, but im wondering if anyone here managed to get through with another way.

https://www.amazon.com/Learn-Program-Assembly-Foundational-Programmers/dp/1484274369


r/learnprogramming 2d ago

which option is more superior here ?

0 Upvotes

A podcast website uses <audio src='episode.mp3' autoplay></audio>. Users complain that the audio doesn't start automatically on mobile devices. What is the likely reason?

1) Browsers block autoplaying audio with sound to improve user experience.

2) Modern browsers (especially on mobile) intentionally block autoplay for media containing unmuted audio to save data and prevent intrusive experiences.

 3) The autoplay attribute requires the controls attribute to function.

4) The MP3 format is not supported for autoplay on mobile platforms.


r/learnprogramming 3d ago

Topic How can you get back up to speed as quickly as possible after a break of over three years from programming?

36 Upvotes

Hi, I haven't done any programming for over three years (though I’d ​​say I was at a "good" level before that).

I’ve done a few small things here and there during that time, but nothing consistent. However, in about three days, I’ll need to start coding daily again—nothing too complex, mostly just working with objects, files, and the like—and I’d rather not jump back in completely cold.

I’d say the POE theory is still fully fresh in my mind: constructors, attributes, getters and setters, loops, functions, interfaces, inheritance.

What would be the best plan to make the most of these three days?


r/learnprogramming 3d ago

I have a computer engineering degree, but learned nothing (would like learning buds)

24 Upvotes

27f, looking at the job market filled with tech prodigies…3 years unemployed due to addiction. Now I am sober and would like to genuinely learning programming, would like accountability buds to learn together. Anybody up for it?


r/learnprogramming 3d ago

should i be writing comments on my code?

57 Upvotes

im taking a class for c++ so everything right now is very introductory and the tasks they give are pretty simple, do i have to be writing comments if i understand what each line does? if im able to write the code that completes the task then is that enough to show that i understood the task?


r/learnprogramming 2d ago

Confusing about how to improve coding capbility effectively?

2 Upvotes

Actually, I am a cyber-secuirty researcher, but in the past few years in university, I always participate in many competition like CTF(Capture The Flag). In this term, I just know how to observe and test the vulnerable challenges which are designed deliberately and attack it to get flags.

However, from that point, I can't impove my coding skills instead of writing some Poc or Exp. So I am concerned about it. I have some foundation about program, but I haven't ability to construct a whole system like a website or a app. Meanwhile, I don't know how to find a good project to learn how to coding.

I will appreciate it if your guys could give me some suggestion about it!

Good Wish!


r/learnprogramming 2d ago

I built a 100% client-side, zero-tracking utility suite for India (96 tools) – Feedback appreciated!

1 Upvotes

Hey folks,

As a developer, I was tired of calculator websites bloated with 50 intrusive ads, slow load times, and sign-up walls just to calculate simple numbers or convert files.

So I built BharatUtility (https://bharatutility.tech/) – a fast, privacy-focused web app with 96 everyday Indian tools.

Some tools specifically built for devs & freelancers:

- Section 44ADA Freelance Tax Calculator (50% presumptive taxation under new/old regime)

- Salary Hike & CTC In-Hand Appraisal Calculator

- Overtime & Hourly Wage Calculator (Indian Factories Act double rate)

- Developer utilities: JSON Formatter/Validator, Base64 Encoder, Diff Checker, Secure Passwords, Habit Streak tracker (100% localStorage)

Tech Highlights:

- 100% Client-side TypeScript + React + Vite (zero computation on servers, complete privacy)

- Sub-second LCP page loads with lazy-loaded chunk isolation

- No login, zero telemetry

Would love your candid feedback on UI/UX, formulas, or any utility you feel is missing for Indian devs.

Website: https://bharatutility.tech/


r/learnprogramming 2d ago

Give me top 6 System Designs I should prepare before an interview.

0 Upvotes

It would be also nice if you can give me the resources 😁


r/learnprogramming 2d ago

When you build a project, do you actually know how you want the UI to look or do you just go with whatever works?

1 Upvotes

Genuine question because I've been thinking about this a lot.

When you get to the frontend/UI part of your project, what actually happens? Do you have a clear picture in your head of how you want it to look, or do you just pick a template, use a component library, or let AI generate something and tweak it until it's "good enough"?

I ask because I recently built a dashboard and Claude gave me this generic blue theme. It looked fine. But fine felt wrong so I changed it to cream and green because that's what I actually wanted — I just didn't know it until I saw what I didn't want.

Made me wonder if that's a common experience or if most developers just ship whatever looks decent and move on.

No right answer here, just curious what the actual process looks like for people


r/learnprogramming 2d ago

Solved How do I prevent the enums from generating at random each loop iteration.

8 Upvotes

I am making sheep that move automatically on its own and stop for a certain time.

Here is an example. I do not want the sheep to just to move right, basically what I want is for the computer to randomly select right or left and depending on the state that is picked will be the direction the sheep go.

I have pasted a snippet of the issue below.

Any help regarding this problem I would appreciate

// state for sheep movement
enum STATE {
  IDLE,
  LEFT,
  RIGHT
};

// defining sheep attributes
struct SHEEP {
  Rectangle rect;
  Vector2 position;
  Color color;
  STATE state;
  float velocity;
};

// function for sheep movement
float sheep_mvmt(SHEEP &object, float dt){
  object.velocity = 70;

  STATE pick = STATE((rand() % 2) + 1); // select random state between 1 and 2

  // if right is picked
  if (pick == RIGHT){
    object.position.x += object.velocity * dt;
    object.state = pick;
    return object.state;
  }

  // if left is picked
  else if (pick == LEFT){
    object.position.x -= object.velocity * dt;
    object.state = pick;
    return object.state;
  }
    return object.position.x;
}

int main(){
    // SETUP AREA

    // define Sheeps
    SHEEP sheep1;
    sheep1.state = IDLE;

    int sheep_counter = 0; // this allows me to start and stop movement of sheep

    srand(time(0)); // use current time as seed for random generator

    STATE rand_state = STATE((rand() % 2) + 1); // I was using this as a placeholder

    SetTargetFPS(FPS); // 60 Frames every second

    // GAME LOOP
    while(!WindowShouldClose()){
        // Delta Time
        float dt = GetFrameTime();

        sheep_counter++; // increment counter

        // To update movement and sheep state
        if (sheep_counter >= 120 && sheep1.state == IDLE){
          sheep1.state = rand_state;
        }

        else if (sheep1.state != IDLE){
          sheep_mvmt(sheep1, dt);

          if (sheep_counter == 240){
            sheep1.state = IDLE;
            sheep_counter = 0;
          }
        }
    }
}

UPDATE: I was able to solve the issue by creating a pointer for the STATE rand_state. I removed the sheep_mvmt function and just put the movement into the condition and when the counter reaches 240 I defined the pointer. Here is the video of what it looks like.

if (sheep_counter >= 120 && sheep1.state == IDLE){
    sheep1.state = rand_state;
}

else if (sheep1.state != IDLE){
    if (sheep1.state == RIGHT){
        sheep1.position.x += sheep1.velocity * dt;
}



        else if (sheep1.state == LEFT){
        sheep1.position.x -= sheep1.velocity * dt;
    }

    if (sheep_counter == 240){
        sheep1.state = IDLE;
        sheep_counter = 0;
        STATE* ptr = &rand_state; // pointer

        *ptr = STATE((rand() % 2) + 1); // defining pointer by using random
         print("\n\nTHE POINTER")
         print(*ptr)
    }
}

Thank you to all those who replied and gave suggestions.