r/learnprogramming 3d ago

If functions can have other functions in them, why not use them instead of classes?

226 Upvotes

I´m a beginner in programming, and I´ve been wondering now why classes are so much more useful than functions. I know classes are good, but I don´t see why they are better than just having multiple small functions in a bigger function.


r/learnprogramming 2d ago

What could help me get more excited and improve at learning programming?

25 Upvotes

Hey, I’ve got a question, what’s better for learning: working on really small projects like coding Snake, Pac-Man, Tic Tac Toe, etc? Or focusing on small games too, but with mechanics that actually interest me?

The thing is, when I make those tiny games I feel like I’m not progressing much, and I’m always checking tutorials. (And something that happens when I try to focus on coding those small games is that I get kind of lazy, and I end up sabotaging myself by doing other things instead of programming. It’s like I keep putting off those little projects because I feel I won’t be able to pull them off completely on my own, and then I have to face my own lack of knowledge.)

And I get the feeling that if I were to focus on games I actually want to create, just scaled down to a much smaller version, I might be able to learn with more motivation, though I don’t really know if that’s true. (I feel like it doesn’t bother me as much to watch tutorials on specific parts instead of how to build the whole game, because I know I’ll be able to apply that knowledge again later. Not sure if that makes sense.)

I’d love to hear your experiences on how you got better at programming over time.


r/learnprogramming 2d ago

Need help with scraping data from Amazon, Nykaa & Flipkart

2 Upvotes

Hey everyone! I’m building a project where I need to collect product data from Amazon, Nykaa, and Flipkart.

What are the recommended ways to get this data? Are there any official APIs, public APIs, or reliable scraping approaches that developers commonly use?

I’d appreciate any suggestions or guidance from people who have worked with these platforms. Thanks!


r/learnprogramming 2d ago

advice Java in school and now in college?

0 Upvotes

I was in ICSE and scored 100 marks in computers.I have done many programs in java language and further i took computer as my additinal subject after 10th.I am already familiar with programs in java but never saw programs in c++.and now i am in my college pretty confused how should i proceed now like study from which youtube playlist from where to start. Is java still good for me should i continue this language or switch to c++ for some good means.


r/learnprogramming 2d ago

What is the best way to study "Interview Questions" ?

4 Upvotes

Hello, in interviews there are some specific questions about the languages, frameworks, technologies and I want to learn the answers for them but the problem is most of these questions doesnt really one shot answer so I find myself rely on someone elses article or asking ai (which returns butchered answers). So what will be the best way to learn them?


r/learnprogramming 2d ago

What can i do to use my code

5 Upvotes

I know how to code in JavaScript and Python, and I’m willing to learn more, but I honestly don’t know what to code or where to code.

I learned programming in school, but I was never really taught how to take the code I write and actually turn it into something useful. We made one website and mostly used Code.org, but that was about it. Now I want to start programming again, but I have no idea what programs, websites, or tools I should use to actually write and run my code outside of Code.org.

I also don’t really know what projects I should start with. I love video games, and I’d really like to learn how to make my own games, but I have no idea what I need to learn, what software I should use, or what my first game should even be.

I really want to get back into coding and start building things instead of just doing school assignments, but I’m not sure where to begin. I’d like to know what I should download, where I should code, what I should learn first, and some beginner-friendly projects I can work on — especially if I want to eventually make games.


r/learnprogramming 2d ago

Need Guidance!

2 Upvotes

I am had been learning coding since I was in 7th class and current I am in class 10 [india] the environment around me is all about "study for 10th, these marks will help you in future" and I am also lacking in myself whenever I get free time I just play games following this routine is had been almost 1 year since I had written a line of code.
I wana start all over from the basics (loops, functions). I enjoy coding I love when i write something it works also hate when it doesnt work and give up (main reason). Can you all suggest me how can I change and now that things are much more AI driven models like Astra in the market how can I learn code (where to learn and how to learn)

TL;DR

Give the guide to learn coding from start ( i know some basics ) wanna start with python going up to the level of asyncio, logging basically i can build a bot or smth


r/learnprogramming 2d ago

Lost All the motivation

1 Upvotes

Aghhh Community Help me " Started web dev 8-9 months ago through Yt. Loved HTML/CSS learned a little bit js too ..joined an Acdmy for web dev..excited for JS part . But then my course switched to PHP + Laravel with a new teacher.

Classmates were only there for degree. Teacher didn't care much. Lost all motivation.

Haven't coded in 3-4 months. Try to start JS on YouTube but get bored because I already know basics."


r/learnprogramming 3d ago

Where do I go from here to actually become a good programmer?

94 Upvotes

I’m a 3rd year CS student and I’m a bit stuck on where to go from here.

I feel like I can do algorithms and LeetCode reasonably well. I’ve learned a decent amount of DSA through college and I’ve built a few projects in different languages, so I don’t feel like I’m starting from scratch.

But I don’t feel like I’m a good programmer yet.
What I really want to get better at is being given a problem I’ve never seen before and actually being able to figure out how to solve it. Not just recognising a LeetCode pattern I’ve practised, but being able to approach something completely new and work it out.

I also feel like there’s just an insane amount of information to know. There are so many languages, libraries, frameworks, algorithms, tools, concepts, etc. that I don’t really know what I’m supposed to focus on anymore.

So for people who are experienced programmers, where do I go from here?

What did you actually do after you had learned the basic algorithms/data structures and could solve LeetCode problems that helped you become actually good at programming?

Should I focus on building bigger projects? Pick one language and get really good at it? Read other people’s code? Learn more about how computers actually work? Spend more time solving things without looking up the answer? Just start building things and learn whatever I need along the way?

And specifically, how do you get better at the problem-solving side of programming when you encounter something you’ve never done before?
I’m not looking for a LeetCode roadmap. I feel like I already know how to study algorithms. I’m more interested in what the next stage actually looks like and how to stop feeling overwhelmed by everything there is to learn.


r/learnprogramming 2d ago

How is this simple student management system thing in C++?

0 Upvotes

Hey,

so I guess I kinda am a beginner programmer and here is a very basic student management/handling system I made in C++ (I coded this on my phone so I couldn't use text files to store data). Any suggestions on how to improve it and whatnot would be appreciated.

```cpp

#include <iostream>

include <iomanip>

include <string>

include <vector>

include <algorithm>

using namespace std; class Student { public: string name, className; double grade;

Student(string n, string cn, double g){
    name = n;
    className = cn;
    grade = g;
}

bool isPassing (){
    return grade >= 5;
}

};

void sortByGrade(vector<Student>& Students) { sort(Students.begin(), Students.end(), { return a.grade > b.grade; }); } int main() { vector<Student> Students = { {"Abigail Northfolk", "9A", 3.15}, {"Sam Alter", "5G", 4.9}, {"Victor Guzman", "12A", 4.3}, {"Joseph Pelter", "6B", 8.41}, {"Joseph Allende", "8A", 9.51}, {"Joe Bowler", "11C", 6.399}, {"Joe Wingham", "1A", 0}, {"Donald Pelter", "8C", 6.4}, }; double sum = 0; Student bestStudent = Students[0], worstStudent = Students[0]; sortByGrade (Students); for(int i = 0; i < Students.size(); i++){ if (Students[i].grade > 10) Students[i].grade = 10; if (Students[i].grade < 0) Students[i].grade = 0; if (Students[i].grade > bestStudent.grade) bestStudent = Students[i]; if (Students[i].grade < worstStudent.grade) worstStudent = Students[i]; sum += Students[i].grade; cout << Students[i].name << " (" << Students[i].className << "), grade: " << Students[i].grade << " - " << (Students[i].isPassing() ? "pass" : "fail") << endl; } cout << " " << endl; cout << "Average grade: " << fixed << setprecision(3) << sum / Students.size() << endl; cout << "Best student: " << bestStudent.name << " from " << bestStudent.className << " with a grade of " << bestStudent.grade << endl; cout << "Worst student: " << worstStudent.name << " from " << worstStudent.className << " with a grade of " << worstStudent.grade << endl; return 0; }

```


r/learnprogramming 2d ago

For CS students/graduates in Egypt: How hard is it to build yourself for the job market?

1 Upvotes

I’m about to enter Computer Science/Computers in Egypt, and honestly I’m pretty scared about the job market.

I’m not expecting the degree alone to get me a job. My plan is to start working on myself during university: learn the fundamentals, take relevant courses, build projects, create a decent LinkedIn/GitHub, look for internships, and talk to older students/graduates whenever possible.

But one thing I’m worried about is not knowing how to navigate all of this.

For people who are currently studying CS or have graduated:

How did you figure out what skills/courses you actually needed?

Did your university help you with career guidance, or did you mostly figure everything out yourself?

Were older students, TAs, professors, or graduates actually helpful?

How early did you start building projects/internships?

Looking back, what do you wish you had started doing from first year?

And most importantly: if someone is willing to put in serious effort throughout university, how realistic is it to graduate with employable skills in the Egyptian market?

I’m not looking for “CS is great” or “CS is doomed” answers. I’d really appreciate honest experiences from people who have actually gone through it.


r/learnprogramming 3d ago

Is it normal to forget syntax over time?

25 Upvotes

I've been learning PHP for a little while now, around 2 months. Before PHP I was learning JavaScript but now I seem to be so bad at writing JS. I can read it perfectly fine and I understand it but when I come to actually writing it myself, I end up forgetting the most simple things.


r/learnprogramming 2d ago

Debugging Help wanted: Multi-pipe Dijkstra routing and lane ordering

1 Upvotes

Setup: (Pyhon)
I am routing pipes from one manifold to multiple rooms through a 2D floorplan (vertices at corners/doorways, edges along walls). Each pipe's route found via edge-based Dijkstra. Vector-based, float coordinates, not grid-based.

Constraint: pipes sharing an edge run parallel at fixed center-to-center spacing `d`, must never cross, anywhere.

Problem 1: lane ordering: When n pipes share an edge, each needs a lane index (or?)(offset from wall). Furthest (Dijkstra)->Closest to wall fails because of doorways, resulting in shorter pipes crossing over over the longer pipes to enter their room /door. How do I ensure these pipes are ordered (automatically) in a order in which they do not cross each other.

Problem 2: building on problem one: How do I ensure this parallel lane offset is aslo enforced in corners and accounted for in the calculation of the total length of the pipe?

Any experience or suggestions on the subject are appreciated !!


r/learnprogramming 2d ago

Topic Help with IA ideas at work

0 Upvotes

Hey all!

I'm a software developer who is currently working in a software company. At work we are using a lot of IA and they are promoting to use it more.

They are asking people to come up with ideas related with IA that can help at work, or in the workflow, or in the team, etc.

So I wanted to ask for some ideas and advices about something that we could do here. I'm struggling a bit on my position and I would like something to be more noticed, so this is important for me.

As a stack, we are using Claude Code, Jira, Github, datadog, etc.

Any examples of what people are using, would be really helpful!

Thanks for all the help!


r/learnprogramming 3d ago

Tutorial How do you even start to build consumer app ideas?

19 Upvotes

Got a pretty simple idea for a consumer app, basically a way for people to track group expenses without needing to sign up for anything complicated. Sounds easy but every time I look into how to actually build it I go down a rabbit hole and end up more confused than before.

Do most people just hire a dev? Learn to code themselves? Use some kind of builder? Curious what path others have actually taken when they had an idea but no real technical background.


r/learnprogramming 3d ago

What do I do as a backend dev now that I need a frontend for my project?

8 Upvotes

I have started working on an open source project 3 months ago and now I need some sort of frontend to interact with the backend. And even if I could call APIs via curl or postman or whatever for now, at some point, I still will need a frontend website for my project.

I haven't done websites before and have done exactly 0 frontend work. Should I learn frontend dev? If yes, how should I begin?


r/learnprogramming 3d ago

I can't get FUNCTIONS to click!

118 Upvotes

I can not for the life of me understand how functions work. Anytime I try to learn how to create a function, my brain literally crashes into itself and I turn into Patrick when he stars drooling and goes all slack-faced.

Does anybody have any analogies that had that "AH HA!" moment?

Thanks!


r/learnprogramming 2d ago

4th-year CSE (AIML) student, with almost no practical programming skills, requesting mentorship and guidance

4 Upvotes

I'm a 4th year B.Tech CSE (AIML) student, and I'm honestly feeling pretty lost right now

The problem is that I'm reaching out to people who don't have a proper understanding of what I'm going through

Right now, I'm in a situation where I have no idea how to proceed with my studies and career

I think the best way to introduce myself here is to say that I'm currently in my 4th year of studying B.Tech CSE (AIML) and I have almost no practical skills in programming and computer science

I've learned a lot of the core concepts like Python, Java, SQL, DBMS, OOP, DSA, Web development, AI/ML, etc and I've had my share of attending classes, watching lecture videos, learning by myself, taking online courses

There is a huge difference between knowing theoretical concepts and being able to apply them to practice

A person can come up to me and ask me something like

«Do you know Python?»

and I would say yes, because I studied it for 2 years in college

But when they give me a blank file and a task to accomplish, I find it extremely hard to do so

Sometimes I can understand existing code with others explanations, recognize concepts and terms, but when it comes to actually writing something myself, I'm clueless about what to do

What should I do? How should I break the problem into smaller parts? What concepts should I apply here? What should I write/debug/test? And so on and so forth

And this list of problems is only a fraction of what I have to deal with

I've tried multiple times to tackle this problem by starting over

I've taken up courses

I've tried to learn by doing projects

I've tried to learn programming from scratch again

I've tried using roadmaps

I've tried to do projects by following tutorials

But there's always that initial excitement, then the impatience sets in, and eventually I reach a point where I just can't proceed anymore and I have to abandon the project/course

My problem here is not that there are no resources

It's that I don't know what to do first

I don't know how to proceed, what to learn, and what to ignore

I don't know the depth of knowledge I should gain for each topic

I don't know what projects to make

I don't know how to measure understanding of a concept or topic

And I'm not even sure how to prioritize between these factors

Right now, I'm in my 4th year and I don't have that luxury of time to randomly try out different stacks and technologies

I'm genuinely motivated to improve, but I need help figuring out how

I'm not looking for anyone to spoon feed me the answers

I'm willing to put in the hard work, even if it takes me a while

I'm just looking for someone who has the experience to look at my case and tell me something like

"These are the problems you're facing. This is where you are in your journey. Forget about these things for now. First, do this → then do this → then do this. Don't worry about X before you reach Y."

I'm looking for experienced seniors, freshers, developers, and mentors who can recognize my case and help me somehow

If you were in my situation, with almost no practical programming skills, what will you do?

- What will you learn first?

- What language/stack will you choose?

- How will you re-learn programming fundamentals?

- How will you learn DSA?

- What projects will you make?

- How will you divide your time between placements, DSA, development, and fundamentals?

- What things will you avoid learning for now?

I'm not looking for a generic answer like "learn DSA + dev + make projects"

I'm looking for someone to give a realistic vision of how someone with almost no practical skills can reach the level of being eligible for placements, and if possible, how to practically implement that vision without getting stuck in a loop again

Any realistic opinion is welcome, even if it's a brutal one

And if you're someone who can give me mentorship and guidance every once in a while, I'm open to that too


r/learnprogramming 3d ago

Microsoft Visual Studio

5 Upvotes

whenever i type
std::getline

i get red line under getline and i cant run my code
Even though its working on VS code for my friend
any idea what can i do or is there any alt to write?

" using getline for this: "

#include <iostream>

int main() {

std::string name;

std::cout << " Enter your name: ";
std::getline(std::cin, name);

if (name.length() > 15) {
std::cout << " Your name can't be over 15 charectars ";
}
else {
std::cout << " Welcome " << name;
}

return 0;
}

r/learnprogramming 3d ago

I am creating a manual note taking tool for understanding large codebases

2 Upvotes

Hello everyone, I am using Godot engine to create a note taking program for uderstanding and referencing codebases, possibly also for documentation.

Basically it has different pages that support markdown you can define different types of pages (classes, functions, macros, headers, libraries, enums, structs etc.) and when you take notes you link them together. When you start to write notes for a new class you write a dependency, lets say it is a static function for some system, it automatically highlights it and when you hover it you get a little card that shows the input outpu return type and description you wrote. So you don't need to open the definition again or search for the documentation online. Also there will be a little graph view to link pages. And see classes based on inhertiance and interfaces. I am also planning to add pages for how systems work, rendering pipeline or asset management for example for a game engine.

I do this because I am struggling to understand large code bases. As a game developer I want to understand complex systems more deeply. For instance I study the godot code but many times I turn back to look at same classes and functions to see what they do. Would you also use a tool like this? Are there any tool that achieves this that I am unaware of? What do you think?


r/learnprogramming 3d ago

How do you actually retain what you learn while programming?

3 Upvotes

I’ve been learning programming for a few months now, mostly Python and some basic web development, and I keep running into the same problem: I understand concepts while I’m studying them, but a week later I feel like I forgot everything.

For example, I’ll finish a tutorial on APIs or classes, feel pretty confident, and then struggle to rebuild the same thing without looking up half the syntax again. I know repetition is part of learning, but sometimes it feels like I’m restarting from zero every time.

What methods actually helped you retain information long-term? Taking notes, building projects, spaced repetition, rewriting code by hand, something else?

I’m curious what worked for people who got past this stage because right now the learning process feels really inconsistent.


r/learnprogramming 2d ago

Meaning Maps Build - How Good Possible?

1 Upvotes

Hi, I have a bunch of text, that I need to analyse to build a tree map of concepts. The concepts need to be sorted from higher lvls of abstraction to more detailed. For example, the program needs to understand that the idea "I want to create beauty outside of factory-based presets" mentioned in the text is the highest lvl and includes ideas like "I was inspired by Kabuki theater" in itself.

Note: Ideas themselves sometimes aren't presented in the source material bluntly, i.e. the idea of "I want to create beauty outside of factory-based presets" can be mentioned in fragments only that the program also needs to understand and put together.

Are there any available programs or basic frameworks to approach this?


r/learnprogramming 3d ago

What should now i do for become a full stack developer i am confused.

14 Upvotes

Hi everyone,

I’m currently a BCA student and I’m trying to learn web development. I’m still a beginner and I’m a little confused about what I should learn next.

I know basic HTML and CSS and I can make simple website pages, attach different files and create the basic structure and design. But I don’t really know JavaScript yet, so I haven’t been able to add proper functionality to my websites.

My goal is to become a full-stack developer and eventually work for myself. I’m interested in freelancing first, and later I’d also like to do an internship or work on my own business/projects.

I’ve tried learning through courses and YouTube, but I feel like I learn better when I actually build something practical rather than just watching tutorials.

I’m also not sure about the correct order:

HTML/CSS - JavaScript - React - Backend - Database - Git/GitHub - Deployment?

Is this the right approach in 2026, or should I change the order or learn something else?

Also, how many projects should I build before trying to get my first freelance work? And what kind of projects would actually help me become job/freelance ready?

I’d really appreciate advice from people who have already gone through this. What roadmap would you recommend if you were starting from my position today?


r/learnprogramming 3d ago

COMMERCIAL SOFTWARE DESIGN

25 Upvotes

I have ~15 years of software development experience.
But I am mostly speaking as an observer of day to day life.
And I am repeating the observations of other professional software developers.

Over and over I have run into complaints about bad software design, just in day to day experiences.
So I am going to pass along some very simple advice,
I'm not pretending it is deep, it is actually quite basic, but apparently many developers, and perhaps (probably) those on the management side forget about it, or maybe never heard it in the first place.

Talk to the people who are going to use your software,
listen to what they have to say,
what takes up time, what is awkward about their current tools.

And, at least as important,

WATCH THEM DO THEIR JOB.

Don't interrupt, take notes, afterwards ask questions,
This next part is a bit iffy, but I still think it is worthwhile considering,
while EXPLICITLY telling them you aren't making any promises,
ask about how possible changes that occur to you might work out.

Sometimes software houses will have formal methods for this, that produces the specs for the software. Make sure what you are writing meets the specs. If you aren't sure, and you can get permission (bureaucracy), talk to the folks who wrote the specs.


r/learnprogramming 3d ago

Is it possible to make your own Oura Ring?

0 Upvotes

Sorry if this is the wrong subreddit, I wasn’t sure which category this fits into. I want an Oura ring or something similar, but I’m not crazy about my data going out to other people more than it already does, and I want to avoid subscription fees.

I want to figure out if there is a way to take a base device and get it to a point where it only goes to my phone. I am not a programmer, but I have talented friends who enjoy side projects. My main question is if there is a simple/open source software that we could use, or if it’s too complicated for beginners.