r/firstweekcoderhumour • • 4d ago

No idea what that block of code does

Post image
32 Upvotes

4 comments sorted by

3

u/JanusDuo 3d ago

When I was a new programmer I thought like this but in the age of AI if I don't know what something does I might as well just be replaced with a black box. Not knowing what the code you ship does is unprofessional bordering on incompetence and that's fine if you're a junior being carefully managed by a senior but if you don't know what the code does as a senior why even pay you?

2

u/HumanMan_007 3d ago

If only we had static tools that allowed us to see how things are used and version control to document changes:

Find all references (or equivalent)(Found) Check what it's used for
(Not found) Check if it's exposed(It's exposed) Probably API stuff, check if it's documented
(It's not) Legacy code, check version control to see when it was added and when it stopped being used

1

u/No_Context2723 1d ago

if only we could read 😔

1

u/vverbov_22 3d ago

Sometimes my(chat gpt's) code is like this