The nastiest typos are autocompleted similarly named (and correctly typed) variables, functions, or types. Which is why it’s a good idea to avoid such name clashes in the first place. If this is impossible or not practical, at least put the part that differs at the start of the name.
Comment on Why LLMs can't really build software
HubertManne@piefed.social 1 week agomaybe its just me but I find typos to be the most difficult because my brain and easily see it as correct so the whole code looks correct. Its like the way you can take the vowels out of sentences and people can still immediately read it.
wols@lemmy.zip 6 days ago
HubertManne@piefed.social 6 days ago
Thing is that having the differ part at the end is nicer for sorting.
wols@lemmy.zip 6 days ago
What do you mean? For what purpose would you sort variables or functions?
HubertManne@piefed.social 5 days ago
Sorry. I was thinking hostnames or other endpoints and was thinking that way back with typos. dev78usc03 instead of dev78usc02 or such.
ganryuu@lemmy.ca 6 days ago
Probably why they talked about looking at a stack trace, you’ll see immediately that you made a typo in a variable’s name or language keyword when compiling or executing.