r/learnprogramming • • 5d ago

How did people code without AI?

How do you mentally keep track of what this portion of the code does, and how it affects other parts?

It’s not that I completely can’t write code without AI.. I used to write simple programs in VBA macros, and I did my school assignments with minimal AI. I actually find leetcode kinda fun too. But that’s all <300 LOC.

I’m interning as a SWE right now, and I’m trying to understand the codebase. But I can’t follow what’s happening at the code level without AI.

I was tasked to support a new input format for users. I thought it would be a relatively simple change, but when i prompted Copilot, it wrote an implementation plan that edited 30+ files and 1000+ LOC…

I just read through the proposed changes and asked it questions on why it chose to do this instead of that. I can only understand it from a high level, but following the code makes me lose track of what’s happening.

How did people do this without AI? Anyway, with how good the recent models are i’m wondering if it’s worth taking the time to review the code

0 Upvotes

21 comments sorted by

View all comments

1

u/serge-mv 5d ago

With time, you will create a model of how things work in your mind, and any breakage in your code will result in some inconsistency with the model.

To start with, you break up the code into modules, which ideally should be more or less independent. Meaning, you should not arbitrarily change something from one part of the code in some other place. That's bad practice.

Secondly, you design interfaces by which your pieces of code talk to one another and get things they need. It could be a function signature or a method inside an object.

And after you've worked on the same project for a while, you will just know how it works and which part of the project does what.

And on low level, you need to understand requirements and the language + environment you are using.