701
Sometimes, it's backwards (sh.itjust.works)
submitted 2 months ago* (last edited 2 months ago) by 0x4E4F@sh.itjust.works to c/programmer_humor@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] Klicnik@sh.itjust.works -1 points 2 months ago

I tried using VScode to play around with Golang. I had to quit coding to take care of something else. I hit save, and suddenly I have way fewer lines of code. WTF? Why did/would saving delete code? After much digging, it turns out because the all knowing VSCode thought because I had not yet referenced my variables, I never would, and since my code I wanted to save and continue later wouldn't compile, it must be quelled. Off with its head!

Anyway, I decided to use vim instead. When I did :wq, the file was saved exactly as I had typed it.

[-] masterspace@lemmy.ca 0 points 2 months ago* (last edited 2 months ago)

This is either false, or you didn't understand the environment you were working in.

You have to explicitly turn on the setting to have VSCode reformat on save, it's not on by default, and when it is on, it's there for a reason, because having software developers that do not all follow the same standard for code formatting creates unpredictable needless chaos on git merge. This is literally 'working as a software developer on a team 101'.

this post was submitted on 28 Sep 2024
701 points (96.2% liked)

Programmer Humor

19813 readers
227 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS