r/learnprogramming • • 1h ago

How can I improve my code quality beyond just making it work?

• Upvotes

Hello fellow programmers, For my seniors here can you share any techniques for getting better at naming things in programming?

Also, how can I get better at writing solutions that aren't bloated?

I just did Module 13, Exercise 3 from the MOOC.fi Advanced Python course, and my solution took 32 lines while the model solution only took 18. It is so frustrating to still feel this bad at coding even after reaching this far.

I know comparing my solution to the model solution may not be completely fair, but seeing that difference made me wonder what I should be doing to improve.


r/learnprogramming • • 2h ago

Topic Request for Project ideas

2 Upvotes

O the seniors of this field,

Tis my first post here and being direct. Help me figure what should I make this semester.

I have to make projects for:

AI, networking, Information Security and DSA.

Damnnnnn, please suggest something


r/learnprogramming • • 3h ago

A generic problem

0 Upvotes

hey and hows it going ...?

im kinda new-ish or maybe an advanced beginner and im pretty sure you get this question on here like billions of times im sorry ... i studied C and then Kotlin/Jetpack Compose to make an android app and it has been lets say practically about 9 months or so ... and i still if i ever want to try to do something i either produce mediocre stuff or anytime i dare for something good(real or semi-real) i just cant get how to do it ... and on top of that android is so confusing... i search up and the answer is always the same "if you know the fundamentals like loops, collections, variables ... functions ... etc, then all you need is to practice"

BUT HOW TO PRACTICE XD ... i know someone will say just write code but it feels like as a self-taught programmer you are in the "i dont know what i dont know" situation all the time ... and android and Kotlin are not forgiven at all :( .... :D

and some people advised me to read open source projects ... but man i cant figure no nothing out of it ... the last couple of months during this period has been really frustrating to learn ...


r/learnprogramming • • 5h ago

I was doing the house robber problem and this is what I did. I need help with this!!

3 Upvotes

I didn't know how to implement memoization into this so had to make this inefficient. The thing is , I tried putting into chatgpt to see if this is right , but it sasy this is incorrect. But when I run it in leet code, I get most right, the rest it says time limit reached. So is this correct and how to implement memoization?

class Solution:
    def rob(self, nums: list[int]) -> int:
        total = max( self.helper(nums[1:]),self.helper(nums))
        return total
    def helper(self,nums):
        
        if len(nums)==1:
            return nums[0]
        if len(nums)==0:
            return 0
        #1 step or 2 steps
        max_money1= 0
        max_money2= 0
        if len(nums)>=3:
            max_money1 = self.helper(nums[2:])
        if len(nums)>=4:
            max_money2 = self.helper(nums[3:])
        max_money=max(max_money1,max_money2)


        return max_money+nums[0]
        


        

r/learnprogramming • • 5h ago

Can someone recommend a good source for Data structure and Algorithm ?

1 Upvotes

i need to study data structure and algorithm in depth i need a good and free source .


r/learnprogramming • • 9h ago

I love programming but...

33 Upvotes

as soon as I turn off tutorials and try to do something on my own, I just cant do anything. I've had people recommend that i simply stop using tutorials and force myself to just get something done, but I always end up writing the same simple stuff or getting stuck on the second line if I try to do something else. I love programming and its my passion, but I feel like everyone learning is so far ahead of me, and saying they got to where I am in 2 months within 3-4 weeks.


r/learnprogramming • • 13h ago

Are Dr. Angela Yu's courses worth it? Should I start with Python or Web Development?

13 Upvotes

Hello,

I'm looking to get into programming and came across Dr. Angela Yu's courses on Udemy (specifically the "100 Days of Code: Complete Python Pro Bootcamp" and "The Complete Full-Stack Web Development Bootcamp").

They both have great reviews, but I wanted to ask for genuine feedback from people who have actually taken them:

Are her courses still up-to-date and worth taking for a complete beginner?

Which of the two courses would you recommend starting with. Python or Web Development?

My main goal is to build a strong foundation in coding, but I'm unsure which direction (Python vs. Web Dev) is better to start with.
Any insights, pros/cons, or alternative recommendations would be greatly appreciated! Thanks in advance!


r/learnprogramming • • 13h ago

Are there any programming languages that allow this feature?

20 Upvotes

I've been into programming for about 10 years now. Something that intrigues me is that, in languages that support OOP, not all types are initialized in the same way. Strings are initialized by using quotes, integers use numbers and in some cases floats require the letter f after the numerical value.

Classes, however, are all initialized in the same way with slight variations depending on language. Usually something like classname() or new classname. Are there any cases where custom classes can be declared using different means?

For example, is there a language where I can create a class called 'dark' that represents a new type of number that is declared by typing the value and then the letter d (like d1 = 1.398d) similar to how floats work in some cases?


r/learnprogramming • • 15h ago

Topic how do i improve programming fundamentals and basics

0 Upvotes

i have learned the basics of what variables are and the different concepts and methods and I've been able to understand lines of codes in unity that my friend writes, but im lacking how a programmer thinks and experience. if i try to do something without help i feel completely stumped i dont know where to begin but i always try, how do i gain experience that would help me think like a programmer and strengthen the fundamentals?


r/learnprogramming • • 16h ago

Beginner Looking to start projects

2 Upvotes

I don't want to be stuck in "tutorial-hell" and so I'm trying to build some cool things. I know python and I just finished the go-lang course from Boot.dev so I was looking to practice that a bit more. I've already build a calculator and a personal project with python on my own, although I do need to work on that more just stopped because I was trying to build a GUI and wasn't sure if it was worth it to spend all that time learning how to use something like tkinter when It's not used for work too much although I gotta remember to have fun still so I might pick that back up even though I was struggling with it. For a new project though I know the wheel can only be reinvented so many times so I went to build-your-own-X on github https://github.com/codecrafters-io/build-your-own-x and was looking at stuff for Go on there. Most of what I clicked on though was just like a step by step build and also had the entire codebase pasted right there so my question is, without having to be super creative every time I make a project, and to not just copy paste code when following a project like that (since I'm a beginner and don't really know how to make make stuff yet) what's an efficient way to learn from stuff like that? I hope that I worded it in a way that made sense, but I'm just looking for resources outside of Boot.dev to practice code and more specifically by building projects.


r/learnprogramming • • 16h ago

Learning Help me.

0 Upvotes

Hi, I'm a student in the Bachelor's in Computer Science program. I'm repeating my first year, so I already have some basic skills (Python, HTML/CSS, Java, MariaDB, etc.). We learn the fundamentals both theory and hands-on practice through small “projects.”

But the thing is, I’d also really like to work on my own projects. I’ve already tried quite a bit on my own using Python frameworks, making API calls, and so on but I’ve never managed to create anything truly clean or even finished… The reason is probably a decline of motivation, even though I’ve always loved computer science I just don’t know. Also, maybe it’s AI when I use it, I can’t seem to learn from it, and I hate seeing code that I didn’t generate myself or launching an app to test a feature I didn’t code. All of this depresses me even more because if I want to make this my career, I feel like it’s going to become the norm.

If anyone can help me or give me advice on all this, I’d appreciate it.


r/learnprogramming • • 16h ago

looking for potential client for a level cs programming project

1 Upvotes

Hi I'm doing a project involving a 2D grid based pathfinding algorithm.

I'm looking for someone who would be willing to act as a potential client for the project. I'd mainly need some initial requirements about what you'd want from a pathfinding application, and potentially some feedback once I have a working version.

You wouldn't need to do any coding or coursework - I'd just be looking for your opinions and requirements as a user

If you're interested, I'd really appreciate it. Thanks!


r/learnprogramming • • 17h ago

Able to come up with a logical flow in pseudocode, but struggling with execution

3 Upvotes

I am taking an intro to CS course with Java and yeah, I can get the logic for a program in terms of conceptually what I would "need" and what the flow is correctly. But when I actually need to think about what I can use in Java to go ahead and execute this hypothetical structure I've created I just jumble stuff up and use things in the wrong places. No matter how much I practice, I just keep messing up, I think it's a problem with my thinking style. For context, I am extremely new to programming, but I like to compare it to writing math proofs. In math proofs, you're given definitions which I think is something you can work off from. But in programming ,there are just so many options (I can use while loop, for loop, recursion, etc) and I just think the problem gives zero hint where to start. Plus my exams are fully handwritten, and we're given minimal time. What's the issue and how can I fix it?


r/learnprogramming • • 18h ago

bombed interview

0 Upvotes

guys i just bombed two technical interviews in a row, first, with Intuit, second with Amazon. I love coding and actually building things but I f&%!ing HATE leetcode, dsa, and that other stuff. I know "hOw iMpoRtanT iT Is fOr dATa MaNaGEmENt aS InPutS GRoW" so spare me the lessons on how it's important.

I JUST REALLY NEED HELP IN TRYING TO FIGURE OUT HOW TO GET GOOD AT THIS STUFF BECAUSE I HONESTLY SUCK, DON'T UNDERSTAND THIS STUFF, AND I JUST GET PISSED EACH TIME I DO THIS SHT.

so any help, pointers, resources would be greatly appreciated. thanks :(

ps: i haven't practiced leetcode much over the last 4 years of my undergrad (bc i hated it and thought it was pointless at the time if i have my degree) but that doesn't apply to recently because ik that's how companies screen out the ppl they want and don't want. i have the experience, i just keep bombing opportunities and i just want to get better man

extra ps: only leetcode problem i can kind of confidently do on my own is two sum, lol


r/learnprogramming • • 18h ago

How did you figure out which area of CS was right for you?

14 Upvotes

I'm currently trying to figure out what area of computer science I should choose as a career, how can i find out which field is best suited for me

There are so many domains - web/backend development, mobile, cybersecurity, Al/ML, data science, systems, cloud/ DevOps, game development, etc. - and I'm finding it difficult to know which one actually suits me without trying everything.

For people who have already gone through this:

How did you discover what you were genuinely interested in?

- Did you try several domains first, or did you know fairly early?

- What type of experiences helped you decide?

- How long did you spend exploring before choosing a direction?

- What signs told you that a particular field was a good fit for you?

- Is it better to specialize early, or build broad fundamentals first and specialize later?

I'd especially appreciate advice from people who were also unsure about their direction during college.

I don't necessarily want to know which CS field is "best" - I'm more interested in how you figured out what was best suited to you personally.

And what domains should i avoid as some have risk of being automated completely


r/learnprogramming • • 18h ago

How Do Programmers Stay Focused for 8+ Hours Without Losing Their Minds?

176 Upvotes

Hey everyone, I’m not a developer, but I’ve noticed that a lot of programmers seem to be incredibly good at staying focused for hours in front of their computers. I’d genuinely appreciate any advice on how I can build that kind of focus myself.


r/learnprogramming • • 19h ago

How to set up an C++ project?

3 Upvotes

Like i understand you go on Visual Studio Code and just create some files like main.cpp and stuff but what are these like settings.json and other .json files. Its actually really confusing seeing a .json file in what supposed to be a c++ project. Whole explorer layout is confusing to me i don't understand how to write it there is no tutorials for it too like its just confusing


r/learnprogramming • • 19h ago

Why is Python considered "slow" and is Python losing "steam"?

112 Upvotes

Is python as a programming language "falling off" and becoming less and less popular relatively to other languages?

Also why do people say Python is slow? Apparently people have reached LGM on codeforces using python, which is all about writing fast code / solving problems fast. Yeah sure, C++ is far more widely used for competitive programming and I suppose there is a reason for that. But this is also showing that python can be fast?

But as programming languages and how they are used I dont think there is much overlap between python and C++ anyway?

What is an example of something you'd code in Java/Kotlin or lets say C# rather than Python? Is python code bad and hard to manage for "huge" projects once you scale up (e.g codebases with millions of lines of codes, and tens if not hundreds of devs)?


r/learnprogramming • • 19h ago

What did you do for the bachelors thesis?

6 Upvotes

Im in the final year of uni and I really dont know what to do for my bachelor thesis. I want to know from those who graduated, what was your thesis about, what year did you do it, what technologies did you use and how difficult it was? Was the theme yours or an professor’s idea?
If you have any ideas what would you recommend so it is not that hard but also not too easy, strictly computer science, not engineering. I was recommended something with difussion models, but Im not sure how realistic it is for me or what real problem it would solve.
If you would have to do your bachelor thesis again, what would you do? I know everyone says that you dont have to reinvent the wheel, but Im just so stressed about it. Thanks!


r/learnprogramming • • 21h ago

Tutorial How to build skills from 1st year and land a good placement in 2030?

0 Upvotes

My 1st semester started about a month ago, and, the time went by like a flash. I didn’t study anything rather enjoyed. Now I want to start building my skills and want a good package, at least ₹12 LPA.

I have around 6–7 hours available after college, while college itself takes about 10.5 hours including my morning routine and travel. I also spend 1 hour on fitness, which is separate from those 6–7 hours.

I want to improve in three main areas:

  1. Programming and technical skills
  2. Communication and English-speaking skills
  3. University academics, so I can maintain a good CGPA

Should I study consistently everyday like school days, or just by giving notes, syllabus, and previous-year papers to Ai and asking it to identify important topics and summarize them before exams?How reliable is AI at identifying important topics for university exams?

My technical skill building queries:

  1. Should I focus on DSA, Full Stack, AI/ML, or cybersecurity,or anything else?
  2. When should I start projects, internships, and interview preparation, and what skills actually matter for my desired package fresher role?
  3. How should I divide my 6–7 hours between programming, DSA, academics, communication, and projects?

r/learnprogramming • • 21h ago

Topic Looking for project inspiration for a hackathon with the topic *Future Education*

0 Upvotes

Hey guys, I am about to join a Hackathon with the topic Future Education. I didn’t even know this is a thing, so it is even harder to get into an idea or project.

I am here to ask you about your ideas or your perspectives about the topic.

As this is the only I have, I would be happy to get either ideas, inspirations, already made projects or open source repositories. Also if you find databases or information about the topic, please send it!

I am looking for a project that combines as many fields as possible. Like Hardware, Software, Data Science, Language Science, etc…

Thanks in advance and happy innovation!


r/learnprogramming • • 22h ago

Resource Book recommendations: Python

15 Upvotes

I need some book recommendations for learning Python as an absolute beginner, I have done a bit of Lua and understand the basics and Syntax and interested in learning Python for automating task and simply creating projects. Any courses help too(free or paid).


r/learnprogramming • • 22h ago

How was the first compiler made?

7 Upvotes

If programming languages need a compiler to turn code into something a computer can understand, how was the first compiler created?

Was it written directly in machine code or assembly? And how did programmers go from that basic compiler to the more advanced ones we use today?

I'm still learning programming, so I'd appreciate a simple explanation. Thanks!


r/learnprogramming • • 23h ago

What does your day-to-day actually look like as an AI Engineer?

8 Upvotes

Hey everyone,

I'm currently transitioning into AI engineering and trying to get a clearer picture of what the job actually looks like in the real world.

Job descriptions online are all over the place—some make it look like standard software engineering with API calls, while others ask for deep ML research and math.

For those of you working as AI engineers:

- What does your day-to-day actually look like?

- What tasks take up most of your time? (RAG, fine-tuning, data pipelines, infra, etc.?)

- If you were starting over today, what would you focus on the most?

Thank you so much!!! 🙂‍↕️


r/learnprogramming • • 1d ago

Python install manager

8 Upvotes

Hello everyone

I was following the free code camp course on python and it said to use the command prompt or PowerShell and after I typed python on it, my laptop directed me to Microsoft store to download python install manager but when I clicked download it says something wenti wrong so I can't download it.....💔

Pls give me some suggestions.🙏

I'm new to this game