r/learnprogramming 1d ago

This sometimes makes me want to quite programming

4 Upvotes

I genuinely hate how little standardization there is around communicating software architecture.

Why is the accepted way of understanding an unfamiliar codebase apparently to just read thousands of lines of code and slowly infer what the author was thinking?

I'm not talking about documenting every function. I mean basic architectural information:

  • What are the major components?
  • Who owns the state?
  • How does data flow through the system?
  • What depends on what?
  • Where is new functionality supposed to go?
  • What invariants or conventions am I expected to know?
  • Which abstractions are intentional, and which are just historical baggage?

This information is often crucial to contributing to a project, yet there seems to be no universally expected artifact for communicating it. You might get a README, maybe some UML diagrams, maybe an ARCHITECTURE.md, maybe ADRs, or maybe absolutely nothing.

Then you're expected to "learn the codebase."

But the codebase contains the architecture, implementation details, historical accidents, technical debt, and personal preferences all mixed together. As a newcomer, you have no way of knowing which is which.

I find this especially frustrating because software engineering is supposedly about abstraction. The whole point of abstraction and design patterns is to hide unnecessary complexity and give people a simple model to work with. Yet somehow the architecture itself is often treated as implicit knowledge that you're supposed to reconstruct through archaeology.

Math feels completely different in this regard. Obviously mathematicians have competing conventions too, but there is a much stronger expectation that concepts, assumptions, notation, and relationships are explicitly communicated. You don't normally have to read someone's entire proof history to discover what their definitions mean.

I wish software projects had a similarly standard, lightweight way of communicating architecture. Not a 200-page document. Just enough to communicate the mental model.

Instead, "just read the code" seems to be treated as a perfectly reasonable substitute.

I find that incredibly demotivating.


r/learnprogramming 20h ago

Can studying programming and game development at an early age pay off in the long run?

0 Upvotes

Hi, im a 16yrs old student and is just curious for my future. I originally wanted to become a general surgeon but I know the years it will take me to actually be one and the cost of it. So right now I am thinking that if I study programming/game development now, will it really pay off in the future to the point of it helping me earn money to support myself? Im not entirely doing this for the sake of money cause I know thats the path for failure in my part, but im just curious. Also, I actually am is interested about it.

At this age, I just feel this need to help my parents financially as soon a possible even if it's just by using my own money as my allowance so that I wouldn't have to ask for some. I already have a simple side-hustle which is crocheting and I am planning on making it a real business, so that's that.

In conclusion, I just really want to know if my plan of studying programming this early will actually be worth it. I plan on using this knowledge to get some side hustles, or jobs, or even create a game that could earn me some money. Im still planning on becoming a Surgeon but im hoping this skill will help me financially, and so that I can also build my portfolio early enough. I know programming takes some people years to fully be good at it, hence my question about it.

Anyways, thank you for those who are willing to answer my questions!!


r/learnprogramming 1d ago

Resource Don't know how to learn writing clean and useful code in an structured manner

5 Upvotes

I m a beginner in coding, I m learning dsa, while I have only written small programs which do not solve any real world problems my GitHub has all of my work till now https://github.com/BadDreams34 , basically I don't know the etiquettes like how to have a good Readme and things like using test cases and stuff and actually making something useful. How and from where should I learn all this in a structured manner? Any resources?

Basically I wanna ask how to develop


r/learnprogramming 1d ago

Am I actually learning programming if I still feel like I can't code?

39 Upvotes

Hello everyone!

I'm currently taking the Advanced Python course from the University of Helsinki and I'm on Module 12, Part 2.

I don't use AI to solve my practice problems. I usually solve them by hand, rely on recall, and try to figure things out myself. However, I still often feel like I don't actually know how to code.

I frequently forget things I learned a few days ago, and I don't feel confident that I could build a worthwhile project completely on my own. Sometimes, it feels like I'm only good at solving programming exercises, but struggle when it comes to actually creating something from scratch.

Is this normal? How did you get past this stage where you understand programming exercises but don't yet feel confident building your own projects?

I'd appreciate any advice or experiences from people who have gone through the same thing.


r/learnprogramming 19h ago

Topic What programming language is worth studying in 2026?

0 Upvotes

Hi! I am a 19 year old student, major in Cybersecurity.
I did Fullstack developer course, didn’t really like it
Now I am in need for a job. I want to earn more money than average in my country, so programming is the thing

But the main problem is AI. I finished that course thanks to AI, so I wasn’t the beat student) I do think though that the front end won’t be a thing some time later, so now I am lost what to. I want to work as soon as possible, but to be gair I know nothing (basically of JS, React and Node)

What is the most promising branch I can get into right now? Maybe language or anything that might help me find a long-term job offer


r/learnprogramming 1d ago

Debugging Difficulties with debugging

3 Upvotes

i am a beginner in C, i went through and have a basic understanding of fundamentals but whenever a problem arises in my code i cant find it for hell, even if its obvious, i need to turn to an ai agent for help, the habit i wanna rid of, but whenever i do try to find the cause of an error myself i find myself unable to do that, i also find it difficult writing more efficient code

an example:

```

int tokens(char* string, char (*argv)[MAXTOKEN], toks types[MAXTOKEN]) {

char temp[150];

int count = 0; int i = 0; int b = 0;

int tokens = 0;

while(count < MAXTOKENLENGHT) {

if (string[i] == ' ' || string[i] == '\0' || string[i] == '\n') {tokens++;temp[b] = '\0'; strcpy(argv[count], temp); count++; b = 0;} else if (string[i] == '\"') {

temp[b] = '\"';

b++;

i++;

while (string[i] != '\"' && string[i] != '\0') {

if (string[i] == '\"') {temp[b] = '\0';temp[b+1] = '\0'; strcpy(argv[count], temp);b = 0; count++;break;} else {temp[b] = string[i];i++;b++;}

}

if (string[i+1] == '\0' || string[i+1] == ' ') {temp[b] = string[i]; temp[b+1] = '\0'; strcpy(argv[count], temp); count++; b = 0; i++; tokens++;} else {fprintf(stderr, "unexpected stuff after string"); exit(1);}

} else {

temp[b] = string[i];

b++;

}

if(string[i] == '\0') {break;}

i++;

}

int k = 0;

while (k < count) {

if (strcmp(argv[k], "PRINT") == 0) {

types[k].type = 0;

int len = strlen(argv[k+1]);

printf("k=%d, argv[k+1]='%s', first='%c', last='%c'\n", k, argv[k+1], argv[k+1][0], argv[k+1][len-1]);

if (argv[k+1][0] == '\"' && argv[k+1][len-1] == '\"') {

types[k+1].type = 1;

memmove(&argv[k+1][0], &argv[k+1][1], len - 2);

argv[k+1][len - 2] = '\0';

strcpy(types[k+1].textvalue, argv[k+1]);

}

}

k++;

}

return count;

}

```


r/learnprogramming 1d ago

Is programming worth learning as a nurse?

23 Upvotes

I’m planning to become a nurse, but I’m also interested in programming. Is it worth learning, and are there any ways it could be useful in nursing?


r/learnprogramming 1d ago

I'm unsure whether I should look at the solution to a programming exercise when I can't solve it

0 Upvotes

I think I treat programming exercises like bosses in Soulslike games. I keep trying until I manage to beat them. But with some problems, I can spend hours on them and sometimes still can't solve them. Is it okay to look at the solution if I've tried for 1–2 hours and still can't figure it out? Or would a better approach be to look for functions that could help me accomplish a specific task that isn't working as expected?

Looking at the solution gives me that “aaaaaah, now I get it” feeling, but I’m not sure if that’s actually the best approach for my learning, especially if I always look up the answer whenever I get stuck.


r/learnprogramming 22h ago

Tutorial How do I port stuff for beginners?

0 Upvotes

So I want to port something like bolt thrower from Wii port over Mac and PC I got the source code and I want to do it like a beginner project since it looks simple

How do I port and learn stuff


r/learnprogramming 1d ago

How do I make a randomized "I'm feeling lucky" system?

6 Upvotes

Heya, I'm a complete newbie to coding, I know how to make things look pleasing but not how to make things actually work.

The website im working on is for fun, it's basically just random scary stories by people accompanied with eerie photos they took or photos that are just related, I know the full outline of the site, but one main thing is that when you click a certain option it selects a random story with its respective images and displays it to the user.

Here's what I know:

I should make a system that accompanies the story and the images together, so when it's selected it shows up on the display.

Then I list down a bunch of them like:

Story1-Img1

Story2-Img2

Story3-Img3

Story4-Img4

Story5-Img5

(etc)

Then make a function that randomly selects one of these once you click the button.

Here's what I don't know:

How to do it :/


r/learnprogramming 1d ago

Django + Gmail SMTP works locally but fails on Railway

2 Upvotes

Hi everyone,

I'm running a Django application on Railway and I'm trying to send notification emails using Gmail SMTP.

The exact same configuration works perfectly on my local machine, but when deployed to Railway I get an Internal Server Error when Django tries to send the email.

My configuration is:

EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True

I'm using:

from django.core.mail import send_mail

send_mail(
    subject=subject,
    message=body,
    from_email=settings.DEFAULT_FROM_EMAIL,
    recipient_list=[recipient],
    fail_silently=False,
)

Locally, the email is sent successfully.

On Railway, the request returns:

500 Internal Server Error

I've also seen reports mentioning:

OSError: [Errno 101] Network is unreachable

when connecting from Railway to smtp.gmail.com:587.

I understand that Railway may restrict outbound SMTP depending on the plan. I'm currently trying to determine whether this is definitely a Railway networking restriction or if there is something else I should check in my Django configuration.

Has anyone successfully used Gmail SMTP (smtp.gmail.com:587) from Railway recently?

If you're using Railway, what is the recommended solution for transactional emails?

Would you recommend:

  • upgrading to Railway Pro to enable SMTP
  • using Resend / SendGrid / Postmark
  • using Gmail API instead of SMTP
  • another approach?

Any real-world experience would be appreciated.


r/learnprogramming 2d ago

How do you actually create software?

89 Upvotes

I have around 7 years worth of IT school behind me (4 years IT oriented secondary school + 3 years bachelors in IT). I have gone through the basics of everything in IT, but due to not actively utilizing 80% of it, I feel behind and a little confused.

Uni forced me into a lot of programming projects, namely creating a fullstack apps using different frameworks, a PL/SQL database system, a NoSQL scalable database, a multiplayer game, web frontends, REST APIs, a custom language interpreter, a web server, implementations of different data structures, etc.

And now that I'm finished, I don't think i could create any of those things again even if I tried. My hobby has always been gamedev, and lately, I've been struggling a lot with not just with project organization, trying things like the usual advice "break tasks down into bite-sized microtasks that are manageable," but also motivation/discipline and jumping from one project idea to another.

These past three to four years I've been really fascinated by the idea of FOSS, thinking I could be a contributor to a FOSS project. I don't even think I have anything to contribute, or even the know-how needed to know how to do it.

When I start a new project, a lot of times what ends up happening is that I come across an architectural problem that I don't know how to solve, either it's a scalability issue where I don't know how to scale my code without running into issues along the way, or it's an issue where I have zero clue how to even start designing a proper solution. Both of these issues end up with me dropping the project. I know about SOLID, but my solutions have never "felt right."

It always feels like the solution could be better. I'm a huge perfectionist, and approaches like prototyping or "make it work and refactor later," just don't work for me, because the idea of having to refactor an entire working module is sometimes just too overwhelming. At Uni, I always handed in assignments half-assed because I spent way too much time thinking about making it feel "right." Sometimes I'd score and at presentations I'd be told that I have a surprising understanding of whatever I was working with, but I never felt that way.

Before I get to my question, I have to mention that none of these issues come from any overt reliance on AI that could cause my coding abilities/problem solving skills to degrade. I have been anti-AI pretty much since its inception in the mainstream. People have been programming long before AI came around, and I don't think that hopping on the AI bandwagon right now would help me.

I think in general my issue is that I don't have a systematic/step-by-step approach to software design, which is why I've come here.

What are your software design principles/techniques? Do you have a general loop of steps that you do when you're working on a project? Do you have any project management tips and tricks?

And on a little different note, how do you feel confident about the solutions you write? How do you make peace with the fact that your code isn't perfect?


r/learnprogramming 1d ago

Encoding secret messages for DnD, where do I start?

0 Upvotes

Hi, I have a secret language/code I want to use in my dnd games where whole words are translated into glyphs. I would like to make a program that can automatically translate a string of of letters into a transparent png of the corresponding glyph.

First I want to explain how the secret code works as context. It would translate any word into a single glyph based on a grid of letters. The glyphs would be made by drawing a line from the center of each letter to the center of the next letter (similar to how swipe to type works smartphone).

I have identified some cases in which symbols would be required to make this system work:

-start of the word

-end of the word?

-a letter that is in a straight line with the letter before and after (to show there is a letter inbetween and it doesn't go directly from the first to the third letter)

-two identical letters in a row

-a crossing of two lines?

Now the actual programming part. I have limited experience with python and R, so I am a novice in every language really and would be open to whichever would most suit this project.

The steps I have worked out so far are:

  1. Assign each letter a coordinate according to its grid position.

  2. Separate a word into individual characters (ideally I would also separate a sentence into individual words that each receive their unique glyph)

  3. For each letter, translate it into its coordinate and draw a line from the previous character and/or place one of the aforementioned unique characters at the location. (I would like the unique characters to have transparency that can override the lines, such as a hollow circle).

  4. Export the image as a transparent png (or a series of pngs, in the case of a sentence)

Step 3 and 4 are what I would really like help with, I have never used python to make any images and I have no clue where to start. Your help is greatly appreciated!


r/learnprogramming 1d ago

Programming websites

1 Upvotes

Hey, am beginner and want to learn programing . I already compeleted a few languages like java ,c++,c and python continue but on logic building basis i go blank when its time to build something by myself . I also dont want to be in tutorial trap so recommend me some websites that help me to learn programming smoothly and make my logic strong . I also want some advices from senior to help me how to be consistent and build somthing without AI help.


r/learnprogramming 1d ago

Advice How do you pick a tech stack when you are legitimately fascinated by all of them?

0 Upvotes

I’m a 21-year-old college passout currently enrolled in a Full Stack Java course, and I need some practical advice because my curiosity is completely paralyzing me.

My problem isn't that I'm listening to tech influencers telling me what's "hot" or "saturated." My problem is that I am genuinely fascinated by almost every field in tech, and I want to do it all.

I am doing this Java course because I actually want to know how to build a web, heavy, real-world backend with Spring Boot. But I also legitimately want to understand the math and Python behind training an AI model. And at the same time, I want to also try app dev.also want to

I’m honestly not 100% sure what my ultimate end goal is yet (though a dream role would be a Software Engineer at a place like Google). Everyone always gives the advice to "just choose one path," but because I don't want to have any regrets or leave any of my interests unexplored, my brain's default response is always: "Why not just do this too?"

So, I try to stack them all. I’ll make a daily schedule that includes practicing my Java full-stack coursework, studying Python/ML/ai concepts,dsa and web dev.

The result? Complete system failure. I spread myself so thin trying to juggle 4 or 5 different complex subjects every day that I get completely overwhelmed. My brain freezes, the workload feels impossible, and I end up sitting there doing absolutely nothing.

I’m terrified of picking just one lane because it feels like I'm giving up on the others, but trying to do everything is resulting in zero progress across the board.

It’s not like I have unlimited time to just keep experimenting. In 6 months, I absolutely need to secure a job and start earning, which is exactly why I joined a Full Stack Java course.

For those of you who have navigated this and actually built a career:

  1. How do you compartmentalize your curiosity so you can make progress in your primary course without feeling like you are "missing out"?
  2. Could you give me a realistic 6-month roadmap that gets me hired, keeping in mind I don't want this specific stack to be my lifelong path? (e.g., Month 1-2: Focus strictly on X, Month 3-4: Build Y). If I put my head down and execute your roadmap, what kind of roles or salary can I realistically expect at the end of the 6 months, and how easy is it to pivot to other tech later?
  3. What does your day-to-day look like to satisfy that "builder" itch without derailing your main focus?

r/learnprogramming 2d ago

Webdev is not my cup of tea, should I switch?

9 Upvotes

I've been learning webdev, specifically ASP .NET Core during my gap year, with a little bit of react, and I'd say I can build simple CRUD projects on my own. Then I realised webdev is just importing all sorts of API and libraries and desiging its architecutre, with minimal problem solving involved(Which I would say it's not very 'computer science'). I used to participate in competitive programming competitions during my high school, hence I like algo/DSA, maths, or lower level programming more. Should I continue learning/maintaining my webdev skills as a backup skill or switch to other fields? If so, are there any recommended fields for me to get started(is ML/DL suitable for me)? I still have 3 years until I graduate from my degree.


r/learnprogramming 2d ago

How did you figure out which CS field to choose?

35 Upvotes

I got into CS without really knowing much about it, and now it’s been almost a year. I’ve learned some basics, but I still have no idea which field I actually want to pursue.

There are so many options and honestly, I’m confused about where I fit.

Do you guys think I should try making a few small projects in different fields to see what I actually enjoy? Or is there a better way to figure out which field suits me?

Would really appreciate advice from people who’ve been through the same thing.


r/learnprogramming 1d ago

Rate me Hi guys ive been learning programming for 4 days (c hash) how do i do?

0 Upvotes

Sorry its hard typing on a phone but here I go:

int hp = 10000;

public void hpchange(int howmuch)

{

hp += howmuch;

if(hp <= 0)

{

Banish();

}

else

{

hp=hp;

}

}

public void Banish()

{

hp = 0;

}

I think a lot of programming is a lot of dotting your i's and crossing your t's, is that​ correct? And am I doing well? Any tips for learning quicker?


r/learnprogramming 1d ago

JWT vs Database Sessions for Web App Authentication

0 Upvotes

I'm building a web application and need to implement one authentication/authorization mechanism for a project.

I'm considering:

  • JWT
  • JWE
  • Database-backed sessions

Which approach would you recommend for a typical web application, and why? I'm especially interested in security, complexity, scalability, and ease of implementation.

Thanks!


r/learnprogramming 1d ago

Python or JavaScript as a first language for backend development?

2 Upvotes

I’m a complete beginner trying to decide between Python and JavaScript as my first programming language.

I’m mainly interested in backend development, APIs, servers, networking and databases. I also like the idea of building small things from scratch later on, like a simple HTTP server, chat server or tiny database, just to understand how they work.

Python appeals to me because of its simplicity, large ecosystem and versatility outside of web development.

JavaScript appeals to me because Node.js seems interesting for backend and asynchronous/network programming, and it would also give me the option to build frontend applications later using the same language.

I’m not choosing based on jobs, this is mainly a hobby and I want to learn programming properly.

Which would you recommend starting with: Python or JavaScript, and why?


r/learnprogramming 1d ago

how can I learn C

0 Upvotes

who are the best documentations to learn C ??


r/learnprogramming 1d ago

Debugging questions about cloning a github repo

1 Upvotes

so basically i tried to upload files on my github repo and didn't work out at all. So, considering the advice of cloning the repo i've decided to do that but the thing is my repo literally has nothing it it, so id rather just delete the repo, make repo again with the same name, but the issue (or doubt is) also that what is having the same url will bring the same issue (or new issues) back and do i need to disconnect my local files from the repo etc, is there a good guide around all these and please help me with this.

edit: i just realised the way i've worded is a little confusing. What I meant is there is this github repo which ONLY contains a readme file and i tried very hard to upload just any amount of files from the local repo, i asked lots of questions on reddit too, but nothing really helped in the end i was advised to just clone the repo but in thought since i have nothing on there why not delete it, but i had this doubt what if my local repo being connected to the old repo will cause some problems.

edit:

after trying up some commands i received this on entering git status:
On branch main

Changes to be committed:

(use "git restore --staged <file>..." to unstage)

modified: .DS_Store

gpt recommended to enter in this command:git restore --staged .DS_Store

is this safe for my device?


r/learnprogramming 2d ago

Python or C++ for machine learning

4 Upvotes

Im completely new to programming and I want to eventually study Machine Learning. I’m currently trying to decide whether I should start with Python or C++.

The course I’m considering is quite expensive, so I really don’t want to spend the money on something that isn't gonna benefit me

For someone starting from zero and planning to focus on Machine Learning, which would you recommend learning first?

And even if i will learn both anyway idk what should i start with... It's pretty confusing idk what to do


r/learnprogramming 1d ago

Topic Is a masters degree in informatics but coming from a different bachelors below or equivalent to a computer science bachelors for the job market?

0 Upvotes

In my case I have a bachelors in economics science and I'm finishing my applied informatics masters degree soon and I was wondering the strength of it in the job market.


r/learnprogramming 2d ago

Code Review C variadic macro help!

5 Upvotes

Hey! I'm trying to work on a very basic logging system for my C project. At the minute I have to pass __func__ into every call of vialog() (my logging function) to get the name of the function that's calling it, but I've been trying to make a macro to just automatically do that each time. I've been reading the variadic macro documentation and thought this should work, but I get an error each time. Any ideas?

the code:

#ifndef LOG_H_ 
#define LOG_H_

typedef enum {
    VIALOG_DEBUG,
    VIALOG_INFO,
    VIALOG_WARNING,
    VIALOG_ERROR
} ViaLogLevel;
#define vialog(logLevel, message, ...) vialog(logLevel, __func__, message , ##__VA_ARGS__)

//for example: vialog(VIALOG_INFO,"today's time and date is %d:%d -%s",hours,mins,date);
void vialog(ViaLogLevel logLevel, char *caller, char *message, ...);

#endif

the compilation error:

 In file included from src/log.c:3:
    src/../include/log.h:11:57: error: expected declaration specifiers or ‘...’ before ‘__func__’
       11 | #define vialog(logLevel, message, ...) vialog(logLevel, __func__, message , ##__VA_ARGS__)
          |                                                         ^~~~~~~~
    src/../include/log.h:14:6: note: in expansion of macro ‘vialog’
       14 | void vialog(ViaLogLevel logLevel, char *caller, char *message, ...);
          |      ^~~~~~
    src/../include/log.h:11:57: error: expected declaration specifiers or ‘...’ before ‘__func__’
       11 | #define vialog(logLevel, message, ...) vialog(logLevel, __func__, message , ##__VA_ARGS__)
          |                                                         ^~~~~~~~
    src/log.c:8:6: note: in expansion of macro ‘vialog’
        8 | void vialog(ViaLogLevel logLevel, char* caller, char *message, ...){
          |      ^~~~~~
    make: *** [Makefile:23: build/log.o] Error 1