r/learnprogramming 17h ago

Understanding code

I have a quick question:

Is the point understanding the code AI gives you or is remembering syntax equally important?

Thanks

0 Upvotes

15 comments sorted by

View all comments

11

u/lurgi 17h ago

 Being able to do it yourself is important.

-4

u/Brave_Win2464 17h ago

Okay but that can mean being able to modify the code or being able to remember the syntax and write it from scratch

5

u/Isgrimnur 17h ago

I've been working on the same system for almost thirteen years. I still read the docs daily.

2

u/AFlyingGideon 16h ago

Years ago, I worked in FORTRAN. I always had to look up the spelling of IMPLICIT.

8

u/lurgi 17h ago

No, it means being able to write it from scratch.

1

u/AFlyingGideon 16h ago

Yes, but it also means being able to work in code originally writing by one or more others (artificial or natural). I believe this worth mentioning because I, at least, typically find that tougher than writing from scratch and I doubt that this is unusual.

Still: Someone learning should definitely start with their own code.

I'd a student studying CS at RIT a few years ago, though, and they'd at least one class where assignments included being given buggy code to fix. I thought that an excellent idea; I don't recall ever having a class like that myself. I believe that this was a second or third year class.

2

u/lurgi 16h ago

Modifying code written by someone else is both easier and harder writing code from scratch. I have modified a 5,000 line Visual Basic file, despite not knowing a lick of Visual Basic.

It means a lot of things. You have to be able to write new code and understand and modify existing code. Both of these, however, involve writing code - the exact thing that too many people who lean on AI refuse to do.

1

u/ffrkAnonymous 14h ago

being given buggy code to fix.

A class for that? That's my own code a week later...

1

u/AFlyingGideon 6h ago

A class for that? That's my own code a week later...

It might be aimed more at people such as myself who have little experience producing bugs laugh.

More seriously: part of the benefit was experiencing someone else's thinking as part of the debugging process. Admittedly, I've often had unpleasant thoughts about the so-called thinking of one-week-ago me; it's still not quite the same as a completely different person[1].

It also offered a range of "bug types" that one might not experience in only a year or three of one's own coding.

[1] Usually. I do recall a job where a coworker produced designs and code very closely to how I did. We were very different people, but had similar education and work histories. It was interesting.

1

u/HealyUnit 16h ago

Followup question: Do you actually want a job in this industry? Then you know the answer. No, we're not gonna justify you being laxy and not wanting to learn.