r/learnprogramming • • 22h ago

What is the point of object oriented design?

147 Upvotes

Hello! I am still relatively new to programming, so my apologies if this is an obvious question, or if this is the wrong subreddit, but I never saw the point of using classes. For context, I only really use Fortran and C++. I used python before that, but nothing else.

When I am programming, I always find myself using data structures like the thing that you say struct for, and namespaces to organise data and functions. My thinkatron never really considers using classes, so I don't really see the point or indeed how they are different to the datatype defined with the struct keyword. Thank you!


r/learnprogramming • • 18h ago

Code Review Why do we use return?

94 Upvotes

I'm starting the Harvard CS50 Course (I'm on Lecture 1), and I noticed that the dude uses "return n" at the end of the code. He explained it... Well... returns, but I don't really get it. What does "returning" mean? I've seen people explain it but they go, "Oh, that basically returns a value," like ????

Can someone please explain using non-coding terms? I know beginner Python up to like loops and defining functions.


r/learnprogramming • • 6h ago

HOW TO BE FREAKING GOOD AT WEB DEVELOPMENT?

19 Upvotes

I recently started learning stuff about web development and I have started from basics like html,css and javascript but now iam stuck I don't know what to do after this.So can someone give some advice and tips on how to ace web development that I can make that as my primary preference.


r/learnprogramming • • 3h ago

What are some good resources to learn how to properly structure large scale codebases?

14 Upvotes

This is specifically about going from "I know how to write a 700 line program and solve individual problems" to "I need to write maintainable and organized code for possibly thousands upon thousands of lines"
I am already confident enough to be able to solve most if not all problems I encounter given enough googling and time, but I have heard enough horror stories about projects becoming unmaintable messes

It would be nice to have something to learn how to compose programs in a way that is logical, I heard the terms "software enginering" "software architechture" and "software design" being thrown around, but most youtube videos mostly worry with teaching some specific software design paterns, but I am aware enough to know that attaching yourself to one type of patern and trying to apply it to everything would be logical, in theory I could only learn ECS and use that for everything since I mostly make games, but that would be like using a hammer for everything, in theory it could work, but it is far from ideal, and following common conventions doesn't make code good either
Plus, software design paterns like "use composition over inheritence" and OOP are not (and should not) be the underlying philosophy behind every decision within a large codebase

I've seen some recomendations, structure and interpretation of computer programs (SICP) and how to design programs (HTDP), both SICP and HTDP have the problem of using lisp-like languages to teach, which isn't that bad but does make studying a bit unnecesarially confusing since lisp is so different than anything you deal with on a daily basis (less you code in clojure or something)
with SICP that can be mitigated by using the javascript edition of the book (or better yet, the comparasion edition)

I did not read SICP yet but but I did give HTDP a try and it seemed a bit overtly abstract and verbose, as well as over-explaining topics that, at least for me, don't need explaining

Anyways, do you guys have other recomendations or should I stick with SICP/HTDP?


r/learnprogramming • • 20h ago

20 years old, in my 4th year of pharmacy school, but thinking about exploring a completely different career path. Any advice?

8 Upvotes

So I'm 20 years old, currently in my 4th year of pharmacy school. My grades are great and everything, but honestly, I just don't see myself doing this long-term.

I'm not planning on dropping out or anything, and I'll probably still end up working as a pharmacist, but I don't want to limit myself to just one career path.

Lately, I've been thinking about picking up some new skills and teaching myself something online. The problem is, I genuinely have no idea what to get into.

I've considered software development, but with how quickly AI is advancing, I sometimes wonder whether it's even worth getting into at this point. I'd especially love to hear from people already working in tech. If you were starting from scratch today, would you still recommend software development? Are there other tech-related skills or fields you'd suggest looking into?

I'm not necessarily looking for something that'll make me money overnight. I don't mind spending months, or even years, learning a skill as long as it's worthwhile and could open up other opportunities for me.

I guess I'm just looking for some direction. Would love to hear your thoughts, especially from people who've been in a similar position or have experience in tech.


r/learnprogramming • • 2h ago

Code Review My very first bash script

6 Upvotes

Hi everyone!

I've recently (around 3 weeks ago) developed an interest in cybersecurity. A friend of mine suggested me to learn bash scripting before going further into programming languages.

Some days ago I've found the roadmap.sh site and today I've completed my very first script/program of my life! It's hella fun but also kind of an overall-hell (it took me 6h and 20m to complete), but I guess that's because this is not my job (I'm a builder) and I'm still a complete beginner.

I've completed the first project and as said by the site, posted it on GitHub. Here's also the roadmap link to the solution which I don't know why but seem to ask for ten upvotes? (If someone knows what's going on explain to me please).
Could someone give it a look and tell me if it's good?

To be honest all of this has made me pop up even more questions:

  1. I often find myself going around all over google to find something that if I modify it enough could be a solution (at some point I had +45 tabs open). That's because I really can't remember syntax and sometimes I make stupid mistakes. Is this normal and the good way of doing this and to learn?
  2. Could you suggest me the best way to learn? I've done this project because it was flagged as "beginner" but tbh if I didn't look for answers I think I would have got stuck several times.
  3. Should one use AI to help himself? I dindn't but I don't really understand if it is considered "cheating" or not?
  4. Do you guys actually learn all the syntax by memory? Mine really sucks and I'm having trouble remembering all the flags for each command
  5. How would you have improved this?

Thanks in advance for you help :)


r/learnprogramming • • 21h ago

My colleague Franceska Xhakaj's intro programming course at Carnegie Mellon (15-110) is now free on YouTube

5 Upvotes

Disclosure: Franceska is my colleague at CMU, and I help run CS Learn, the program that publishes the recordings.

15-110, Principles of Computing, is Carnegie Mellon's introduction to programming for students with no experience at all. Franceska is a terrific teacher, and the full classroom lectures are now free, edited with captions and chapters. The first three are up, and a new one goes up every Monday.

It's the real course as CMU students take it, so it moves at a university pace and builds from the basics of programming toward how computers solve problems.

Links are in my first comment.


r/learnprogramming • • 18h ago

Development Path in C# .NET Backend and Motivation

2 Upvotes

Hi everyone! To give you some background: I graduated from university with top marks. That’s where I first started programming—we were taught a little bit of everything, including Pascal, C++, PHP, Python, C#, and so on.
Our coursework always covered up to OOP (Object-Oriented Programming), but never went any further.
I also studied C# and Python on my own, but again, I never really ventured much beyond OOP.

During my studies, I tried to avoid web development because it didn’t particularly interest me; however, after graduating, I realized that most of the job market is in web development, so I need to find a way to get comfortable with it. Since I’m most familiar with C#—and it’s the language I enjoy the most—I’ve decided to focus on C# backend development. But a few issues have come up:

It’s been a 2 years since I graduated, at that time, I had to find a job quickly, and it wasn’t in the field I had actually studied for; now, I want to return to my studies so that I can finally work in my chosen profession. and I’m not sure what tech stack I actually need to know to build a project of my own. Also, how can I recover the knowledge I gained during my studies? This uncertainty makes me procrastinate whenever I set out to learn something new, or I end up not dedicating enough time to actually master anything.

A crisis of ideas. Even back in university, I struggled to come up with projects to build. I have a persistent feeling that everything has already been created by more skilled programmers. Is it even worth working on a project if a more successful version already exists? How does one go about choosing a suitable project topic?

AI. The rise of AI happened around my third year of university, and we even started experimenting with it a little bit back then. It’s one thing to enter a prompt to get some guidance for a specific task, but it’s quite another to actually learn something and build a project of your own. How should one interact with AI models when learning? Should you even use them at all? I recall plenty of times spent endlessly tweaking prompts, trying to get a decent result—when, in reality, it would have been faster to just write the code from scratch myself. What is the right way to learn programming today using AI (given that AI is clearly here to stay)?

Right now, I’m trying to learn ASP.NET through a course by Teddy Smith on YouTube, but I’m struggling to grasp a lot of it. Plus, I’m essentially just following along and mimicking what he does—which isn’t really the kind of learning process I’m used to.


r/learnprogramming • • 17h ago

I want to recreate a simple program I made in C++ but as an unofficial apk/app so I can use it on my phone, how can I go about doing that?

1 Upvotes

The program is extremely basic. It is a quiz that takes input in a way where it checks to see what keywords are included in the answer to verify if it is true or not, as opposed to manually having to have the answer be word-for-word correct. It was great for not only practicing programming, but for studying as it was related to a topic I wanted to learn.

I know nothing about app development. I know AI can create apps, and I was gonna search to see if AI can make it, but then I realized how absurd that would be considering what I want to create is something I already created before in another language.

How can I go about making it and running it on my phone? There isn't gonna be graphics or anything like that.


r/learnprogramming • • 18h ago

Is it normal to feel down during situations like this?

1 Upvotes

Hello, I'm a university student in my final year, going to work on my final year project soon.

I found interest in backend development, been struggling with studies cause I can't use a day to understand a concept so I go through several times to know how it works and what to do about it.

Now, in a week's time, I will be meeting my project supervisor about what to do cause he suggested we work on a health management system, and my group and I will be doing more research before we start anything. My problem is that, among the group, I see myself a little bit ahead cause I try to understand what it takes to build a system(software development), and from what the project supervisor said to me, he wants us to implement an ML model. I'm yet to know more about it.

I feel we can do this together as a team, but they feel that, with the help of AI, which will help sometimes, things will be easy cause they will upload the whole project documentation, prompt it, and get the final results, and if it doesn't match, more prompting.

I'm still learning, and I feel we can't finish this before the academic year ends. Cause when we start now:

  1. I don't know how to host an application.
  2. Buy a domain and link it to the site.
  3. Security measures to ensure the app works fine.
  4. I feel the whole load will be on me.
  5. What it takes to build a whole functional mobile application.

I honestly don't know what to do now. The programming language I'm learning is Python, and I haven't started with Django yet.

Please advise, or anything will help. Thank you for your time.

I asked what they could all do when we start; the response I got was that we can do this, and they believe I'm here and AI is also here, so things will be easy.


r/learnprogramming • • 22h ago

What should I do as a 2nd year CS student interested in low level programming ?

1 Upvotes

I already have a project - GPU accelerated terminal emulator


r/learnprogramming • • 5h ago

Question about vibecoding...

0 Upvotes

So, I’m learning C#. After a failed attempt at creating a game using "vibecoding" (relying 100% on AI-generated code), I realized that programming is, in fact, an art form. I am staunchly opposed to the use of AI in creative work, which is why I decided to learn a programming language from scratch. To be honest, I’m not a mathematician, so I find this quite challenging.

I spent some time with Microsoft’s official C# documentation—specifically the section supposedly designed for beginners—only to realize it’s written more for MIT graduates than for actual novices. That’s when I decided that the very same AI that used to write all my code could perhaps assist with my learning. I set strict ground rules, which it still follows today: it is not allowed to generate a single line of finished code. Instead, it simply provides the necessary information—explaining operators, how to implement them, the correct syntax, and so on.

Currently, I’m developing a console-based program—a sort of interactive, text-based "temple." The thing is, I’ve started to wonder if I’m compromising my own principles. I am not copying *anything* at all. My interactions with the AI ​​look like this: "I want to implement [feature X]; how would I go about that?" The AI ​​then explains the logic and suggests the functions or operators that might help me achieve it. While I’m not copying—and I fully understand how my code works, maintaining 100% control over every single line—I can’t help but feel that this approach is... "dirty"

What do you think? Is it acceptable to use AI in this way—keeping in mind my specific commitment to avoiding "vibecoding"? Does this count as "vibecoding"?

(This text was translated from Russian to English using Google Translate; please excuse it if it sounds unnatural to you.)


r/learnprogramming • • 5h ago

Is it still worth specializing in one area of programming with AI getting better?

0 Upvotes

Guys, I've been thinking about this lately. With AI getting better at writing code, I'm starting to wonder what we should actually focus on learning as developers. Back then, getting really good at one thing, like backend, frontend, or mobile development, seemed like the obvious way to go. But now I'm not so sure. Should we still spend years mastering one area? Or is it better to learn a bit of everything, including stuff outside programming like business, product design, or communication? I mean, being a specialist still has value, right? But if AI can handle more and more of the technical work, what actually makes a good developer stand out?

I'm curious how you guys are approaching this. Are you going deeper into your specialty, picking up other skills, or just sticking with what you've always done?Especially those who've been coding long before AI became a thing. Has your approach to learning changed at all?


r/learnprogramming • • 19h ago

How do i code a theme for a website without having any prior knowledge to programming?

0 Upvotes

Hi everyone, i am not a programmer nor have done anything similar or related in the past but due to some current circumstances id like to know how to create a specific, but very easy theme layout for a brand website. I already have a clear inspo to in general.

the brand website is on a server/platform similar to “shopify” (an e-commerce platform where u create a store for a brand or so etc..)

Only issue is i couldn’t find any already available themes suitable for my liking or my vision.

Is there a way i could create a theme with Claude? Or maybe learn from a trusted course or a tutorial?

How do i do that? Any tutorials?
or what should i know?

Thanks help is very much appreciated


r/learnprogramming • • 5h ago

HOW TO WIN ANY HACKATHONS?

0 Upvotes

What is the secret of winning any hackthons? I have participated in many hackathons but never made it to the final rounds. I have got feedbacks that problem statement is good but the architecture ia not so great. So give me some advice and tips to master hackathons.


r/learnprogramming • • 5h ago

Need help

0 Upvotes

Chat im building a AI type bubble software that has multiple agents giving answers at a time, but what I want is to apply another api on top of it so that it will analyse all the answers and give me one result.

Few things in which i would like to get some help -

• for the concept - do you think this is good for a self project or should I add another thing in this

• I tried to apply a separate agent over all others but all the time I get errors.

• third is about responsiveness, sometimes the api model didn't work at all stating 'server too busy'

My base language is python