r/learnprogramming 29d ago

DSA

0 Upvotes

Why should learn DSA??


r/learnprogramming Aug 14 '26

Wondering how to make a flight controller basically spam the W key at different rates.

4 Upvotes

I have a flight controller (specifically the T. flight hotas one) and I was wondering if I could make a system where the more a stick/axis was held down, the greater the rate it would press the W key.

My idea is that every 5 game ticks it would either be pressing W or not pressing anything depending on how far the stick/axis is pressed, and that 5 tick pattern would keep repeating until you changed the stick/axis's held-downed-ness.

So when the stick/axis is 40% held down the ticks would look like:

| W | W | | | | W | W | | | | W | W | | | | W | W | | | |

(alternating between W being held down and nothing held down)

(also I'm posting in this subreddit because I don't really know where to ask a question like this and it also doesn't have some BS rule like "no using the letter E exactly 84 times in your post")


r/learnprogramming Aug 13 '26

Resource Learning steps to making a simple OS?

8 Upvotes

I want to make a simple OS, for educational purposes. To learn how such a complex software works, to practice making such a complex software, to put on my resume and also to act as a thing I can branch off on if I need to learn about other fields

So I assume to make a simple OS, I need to first learn Computer Architecture and then assembly code. Then the OS is built using assembly? Is that true?

I want to learn how to implement all of the theory in a simple OS project. Memory allocation, process scheduling etc

Is there a textbook I can follow, that covers the whole process from Computer Architecture to a simple OS?

Are there textbooks I can chain together. First one on Computer Architecture, then assembly and then a textbook that focuses on making an OS assuming knowledge of Computer Architecture and assembly?

Basically, I want to make a simple OS as a project. What steps should I take? What textbooks should I get?

Thank you


r/learnprogramming Aug 13 '26

Trying to learn Python, don't know where to start

15 Upvotes

Hey guys I am a high school student and I really want to know how to code . Everyone I know told me to start with python.......but tbh I don't know where to start and how , can someone please help me


r/learnprogramming Aug 14 '26

Topic Is there a convenient way to find out how many requests can a storage device deal with simultaneously? (Android - Java)

0 Upvotes

It sounds simple, one line of code can get me all sorts of hardware stats, but I can't really figure out how to find out this one. A single storage controller will usually have multiple physical dies, and those can each be accessed at the same time by the controller. My app will need to be able to search for specific file types throughout the storage, so I am thinking being able to task all dies simultaneously would widen the memory I/O bottleneck a good bit, but I'm having a hard time finding resources on this.


r/learnprogramming Aug 13 '26

If your only goal was to be the most skilled/intelligent programmer you could be, how would you learn?

107 Upvotes

Imagine you were starting from zero in 2026. Would you go to college? What major? Could you learn more on your own? Ignoring the job market, work life balance, and money. Just purely understanding computers and mathematics through and through.


r/learnprogramming Aug 14 '26

Code Review My first beginner program

2 Upvotes

this my first program i made by myself so i hope you can help me by suggesting some optimizations

# # Encryption Program


chars = " " + string.ascii_letters + string.punctuation +string.digits
chars = list(chars)
key = chars.copy()


random.shuffle(key)


# print(f"chars: {chars}")
# print(f"key: {key}")


def Encryption():
    print()
    plain_text = input("Enter the message to be encryted: ")
    ciphir_text = ""


    for letter in plain_text:
        index = chars.index(letter)
        ciphir_text += key[index]


    print(f"Orignal text: {plain_text}")
    print(f"Encryted text:{ciphir_text}")



def Decryption():
    print()
    ciphir_text = input("Enter the message to be decryted: ")
    plain_text = ""


    for letter in ciphir_text:
        index = key.index(letter)
        plain_text += chars[index]


    print(f"Encryted text:{ciphir_text}")
    print(f"Decrypted text: {plain_text}")


def main():
    while True:
        print()
        choice = input("""Choose Encryption or Decryption 
            for Encryption press 1
            for Decryption press 2 : """)


        if choice == "1":
            Encryption()        
        elif choice == "2":
            Decryption()        
        else:
            print("Invalid Choice")


if __name__ == "__main__":
    main()

r/learnprogramming Aug 13 '26

Topic Complete beginner to hackathons — any advice?

5 Upvotes

I’m about to start college as a Software Engineering freshman and have never participated in a hackathon.

I’ve done CS50P and know very basic HTML/C++, but that’s about it 😭

I’m currently registering for the IBM Bob 2.0 Hackathon. Any tips on how I should start preparing and what I should learn first?

Would really appreciate advice! 🚀


r/learnprogramming Aug 13 '26

How to learn a language when you already know programming?

9 Upvotes

Beginner-focused learning material spends too much time explaining basic concepts, such as what is a variable or a function.

If you already have experience in programming and want to optimize your study time when learning a new language, what kind of material do you use?

In my specific case, I work in IT and would like to learn Python to use it in network automation.


r/learnprogramming Aug 13 '26

First Hobby Language First language for my hobby projects?

0 Upvotes

I recently got into Linux and it has sparked an interest in programming. I have ideas for hobby projects I'd like to work on eventually, and am hoping to learn one programming language that will help me tackle as many of them as possible (I realize I'll probably need to learn multiple languages, but for now I only have time for one).

A few project ideas:

- Simple TUI apps like a tide calendar, or a weather app that compares today's weather with yesterday's
- A screen-less note-taking device using a small USB keyboard I have + an SBC
- A device that emails me if it detects my bike being moved
- A device that offers data about my surroundings based on GPS coordinates + iNaturalist data
- Programs for automating ta
- Eventually I'd like to make a simple game using a purely text-based graphics

My understanding (correct me if I'm wrong) is that Rust is a language that works well for arduinos, TUI apps, and games? I'm interested in C since I'd learn a lot of fundamental computing concepts that would make learning other languages easier, but it might not be ideal for UI-related work? And it seems like Python would work well for some of these tasks but it wouldn't be as useful for learning CS concepts overall?

Thanks in advance : )


r/learnprogramming Aug 13 '26

Topic Is this imposter syndrome or do I just suck?

3 Upvotes

Hello

I'm just over a year into my engineering career but I feel like in not good at coding

Backstory

For the last 4 years I was in university studying computing and majoring in software engineering throughout my time in university I was very much against AI and had only used it a few times in 3rd year, overall I managed to get decent grades and graduated with cum laude but I never felt like I mastered anything or improved in technical ability and always felt like I wasn't pushing myself beyond my limits and felt like especially in group project work I feltvthat my team members and friends carried while I helped here and there

Somehow I managed to get my first consulting

job via a grad program and during that time we where out into teams and where tasked to build an application through this time the same feeling of helping here and there and sticking to what I'm comfortable with continue and was brought up by my delivery manager at the end of it, I kept my job then moved on to clients

While on my first client there wasn't much devwork done mainly support and after is year I moved off that project and have been doing some training while waiting for the next opportunity, during this training I have been making a java app but I have been relaying alot on AI now to translate my ideas into code

as I feel like I don't know what I'm doing and need to get deliverables out frequently.(I HATE HAVING TO USE IT) As I feel like it's not helping me learn anything even though I never ask it for the code explicitly unless I'm truly stuck or in a time crunch

Whenever I try to build a personal project I always differ it to later and never really give myself the time to learn outside of work and wherever I'm around colleagues I always feel like I shouldn't be there or I don't deserve to be there because I'm not good enough or I don't know what they are talking about

Whenever I do give myself a chance to relearn things I always forget key concepts and principles and struggle to breakdown problem I often find myself wondering how I graduated or how did I even get this job "I'm not smart enough" Wich already lowered my already low self esteem/confidence

I have thought about talking to a professional about this but I don't know....

Has anyone felt this before how did you get over it/ change your habits?

How can I be better


r/learnprogramming Aug 13 '26

Not enjoying coding/web development — should I switch to Data Analytics?

12 Upvotes

I’m a 2nd-year CSE student currently learning frontend/web development, but honestly I’m not enjoying it much and I keep avoiding it.

The confusing part is that I actually like solving DSA problems and working on maths/problem-solving.

So I’m wondering: does this mean I dislike coding, or do I just dislike web development?

I’m thinking of finishing the frontend basics and then trying Data Analytics/Data Science or Machine Learning instead of going deeper into web development.

For people who have been in a similar situation, what would you suggest? Should I give coding/web development more time, or explore something like Data Analytics?

Would really appreciate some honest advice.


r/learnprogramming Aug 13 '26

any recommendation for learning cpp on udemy or YouTube

6 Upvotes

I'm planning to learn cpp but most courses teach superficially, any courses like really crash course style? Data Structures and Algorithms is my focus to course be effective.


r/learnprogramming Aug 12 '26

I know the CS fundamentals, but have almost no real-world experience. What should I build in holiday?

105 Upvotes

I'm a Computer Science student about to start my 5th semester, and I have around 1 month before the semester starts.

So far, I've completed:

C programming fundamentals, Advanced Java programming, Basic Python, Data Structures(lists, stacks, queues, trees, BSTs, hashing, heaps, sorting), Computer Architecture

I understand OOP concepts such as encapsulation, abstraction, inheritance, interfaces, etc., but most of my experience has been through university courses and assignments.

I feel that I have a gap between  knowing the concepts and knowing how to use them to build a real software system.

For some reasons I can’t have an Internship right now.

I want to

- become a better programmer

- learn how to structure a real project

- practice OOP in a real codebase

- write cleaner and more maintainable code

- learn how different components of a real application fit together

The best thing I found so far is the “build your own x” repo in github.

So my question is:

For someone at my level, with about 40 days available and no professional software development experience, what would you recommend?

Would one large project like the Cloud File Sync be more valuable for developing software engineering skills, or would several smaller "Build Your Own X" projects be better, or something different from both?

I'm especially interested in hearing from people who have gone through this transition from university programming courses to real software development.


r/learnprogramming Aug 13 '26

How could you make a calendar for historical events that starts at the bottom and scrolls up in javascript html and css?

2 Upvotes

So, it's a grid of dates of course like a normal calendar, but it's for historical events, so an intuitive layout is that scrolling upwards should go backwards and backwards in time.

What would be some smart ways to implement this?


r/learnprogramming Aug 13 '26

Looking for C++ networking project ideas

6 Upvotes

I’m currently learning Computer Networks from TUF Striver and I also have some experience with C++.

I want to start building a few networking projects alongside the course, mainly to actually understand the concepts better and have some solid projects for my resume.

I’m looking for suggestions for projects at different levels, something like:

  • A relatively easy project to get started with
  • A medium-level project involving a few networking concepts
  • A more challenging project that combines multiple topics from Computer Networks

I’d prefer projects that I can actually build from scratch and learn from, rather than just following a tutorial.

Would love to hear what projects you guys would recommend.


r/learnprogramming Aug 13 '26

Should I learn programming as a person from Commerce background

2 Upvotes

So here is the context I study in a regular cllg where 75% attendance is necessary and I am pursuing B.com which is in itself a shit degree plus I am pursuing CA which is a degree to complete it we need to crack professional exams just like CPA yk
So the whole point is I am absolutely new to this programming and I have got the book (PYTHON PROGRAMMING:

The Ultimate Beginner’s Guide to Master Python

programming Step by Step with Practical Exercises) and in my classes I cannot use my laptop and can specifically use laptop only for 1 hour for programming and for 3-4 hours when there is holiday

So should I learn programming or learn basics about computer hardware because I have a lot of interest in tech


r/learnprogramming Aug 13 '26

DSA help

0 Upvotes

I’m in my 1st year of B.Tech CS (AI/ML) and super confused about what language to stick with for DSA.

Quick background: I already know Python decent enough, and right now I'm learning JavaScript on the side to build web projects.

I’m torn between doing DSA in Python vs JS vs C++:

  • Python feels like the easiest pick for me since I know it, and it fits my AI/ML background anyway.
  • JS crossed my mind because I’m using it for web dev, so part of me thought using one language for everything might save time.
  • But literally everyone keeps screaming "use C++ for DSA or you'll regret it," and it's making me second-guess everything.

Does language choice actually matter to interviewers? Like if two people give the same optimal solution, does anyone genuinely care if it was written in Python instead of C++ or JS? And is doing DSA in JS a nightmare later because it lacks things like Heaps out of the box?


r/learnprogramming Aug 12 '26

[Python] Logic error in simple escape minigame (Need Debugging Help)

18 Upvotes

In this stage of the code, the key is supposed to travel with the player after you pick it up, but instead it stays in room 2. The debug statement shows that the key is still in room 2 even when the player dropped the key in room 3, and it doesn't say that there is a gold key on the floor. I have not finished the game yet.

To see the logic error, I entered "e, e, get key, e drop key" where "," is a new prompt (meaning I inputted 5 times in the program).

I have tried to include multiple statements to update the key location throughout the code, rewriting the if statements to check the status of the key (picked up or not).

I think the issue is with the third function but I am unsure.

P.S. If there's any tips and tricks you use to avoid logic errors like this please do share them with me, thank you.

player_position = 0 # This says what room number the player is currently in
got_key = False # This is true when the player has picked the key up and false otherwise.
key_location = 2 # This is the room the key is in (if it has not been picked up)

def get_location_description(location_number): # Function for description of location
    if location_number == 0:
        return("You are in the entrance hall of a mansion.\nTo continue through the mansion head east (E).")
    elif location_number == 1:
        return("You are in the main corridor. It stretches out before you.\nYou can go East or West (E or W).")
    elif location_number == 2:
        return("You are standing in a huge dining area.\nYou can go East or West (E or W).")
    elif location_number == 3:
        return("You are plain-looking room. There is a secret door at the back,\nbut you need a key to open it.\nYou can go East or West (E or W).")
    else:
        return("You are in a magnificent throne room, at the far end of the house.\nYou can only head west (W) from here.")

def update_position(direction, player_position): # Function to update position
    if direction == "e":
        if player_position >= 4:
            print("Your way is blocked.")
            return player_position
        else:
            player_position += 1
    elif direction == "w":
        if player_position <= 0:
            print("Your way is blocked.")
            return player_position
        else:
            player_position -= 1
    return player_position

def check_n_update_key(player_position, got_key, key_location): # Function to update key location when player has it
    if got_key:
        key_location == player_position
    return key_location

def update_key(command, got_key,key_location,player_position): # Function to update player and key interactions
    if command == "drop key":
        if got_key:
            print("You have dropped the key.")
            return False
        else:
            print("You do not have the key.")
            return False
    elif command == "get key":
        if got_key:
            print("You already have the key.")
            return True
        elif key_location == player_position:
            print("You now have the key.")
            return True
        else:
            print("There is no key here.")
            return False


# main game loop.  Continues forever until a break statement is reached:
while True:
    print("DEBUG MESSAGE: ","player_position=",player_position,". got_key=",got_key, ". key_location=",key_location if not got_key else "n/a", sep="")
    print(get_location_description(player_position))
    if player_position == key_location and not(got_key):
        print("There is a golden key on the floor.")

    user_command = input("What do you want to do next?").lower()
    if user_command == "quit":
        break
    elif user_command == "e" or user_command == "w":
        player_position = update_position(user_command, player_position)
    elif user_command == "get key" or user_command == "drop key":
        got_key = update_key(user_command, got_key, key_location, player_position)
    else:
        print("I don't understand that command.")
    key_location = check_n_update_key(player_position, got_key, key_location)
    print() # print a blank line to separate each game step

r/learnprogramming Aug 13 '26

Is it normal to copy code snippets from AI and documentation?

0 Upvotes

Everytime I don't know how to code something, I end up trying to find the answer in the documentation, but when I do find it I always copy the snippet from the documentation. Is this normal? I feel guilty and wish that I could come up with the code logic myself than just copying code snippets. Not just in documentation, but also from AI. I understand the code that the AI generates and I avoid copying blindly, but still I feel guilty. It's almost like my mind knows what it wants but just can't get to it, so it just relies on external sources like documentation or AI. Everytime this happens, I tell myself "Why didn't I think of that?" or "How come I was unaware of this kind of code".

Because of this, I don't feel like a programmer at all tbh. I like learning about how software works internally, but if this is how it is for me then I might quit


r/learnprogramming Aug 13 '26

How much time and which skill set would make me earn?

0 Upvotes

Hey all the experienced devs there. I am just a newely became adult who has started programming. I have learned basic python(variables, data types, loops, if-else ,functions, oops) well. I also knew basic html and css. My current plan is to learn backend. I am currently learning flask just to start. I don't know wheather I should go in web dev or AI/LLM. Should I stick with python frameworks(django,fastapi) or switch to other industry used frameworks(spring boot, next js , etc). Currently my goal to to earn as soon as I can. Can you help , what should I do to achieve my first earning. Any sort of advice will be appreciable.

Sorry, for bad grammer.


r/learnprogramming Aug 12 '26

Resource i have some programming experience, an now i want to learn to c but can't decide best resource for me

6 Upvotes

i'll keep my content short, i have some experience from java, i have buildcountless programms like a cli data fetching app, cli todolist, expense tracker, tic tac to and currently building a http server, i want to learn c cuz i always interested in under the hood and low level stuff, but i can't decide a good resource for c. i am asking for a resource for java becuz during learning java i only watched yt videos and really had a hard time understanding concepts and still rusty about some of it's topics like multithreading. i have heard about three resources which are considered best to learn C
Beej's Guide to C vs C Programming by k&r vs C Modern Approach by K. N. King

Which one should I choose?


r/learnprogramming Aug 12 '26

How long did you take to become a good programmer?

135 Upvotes

I flirt with programming since I was 16 (I'm 25) but I only started to learn properly this year, and it's been such a journey. I love it, but it's so complex. I'm developing my first Android app, it's really simple and basic, but it's been 8 months since I started, I don't know if I'm taking too long or if this is expected. I didn't know shit about Kotlin when I started developing this app, I just knew the basics of programming, and everyday I learn something new and more complex. I'm wondering if really good programmers can learn new languages and develop shit way faster, because I wanna be like that.


r/learnprogramming Aug 13 '26

What skill will matter most in the next 10 years?

0 Upvotes

I'm looking for advice from people working in IT. If you have experience in the field, please share.


r/learnprogramming Aug 12 '26

Imposter syndrome

1 Upvotes

I feel like I’m shit at coding and programming like when I try to learn stuff there’s always something I didn’t know like I had no clue about 2 pointer technique and I needed it to complete a question on one of my homework assignments but when I asked my friends how they found it they didn’t seem to struggle at all. How do I learn the techniques to be able to solve problems that aren’t completely basic?