5 ms·
My advice for new programmers: Don't use expletives in any log message, debugging alert, or even code comments. The chance of this coming back to haunt you is n
by VBprogrammer 5y ago
My advice for new programmers: Don't use expletives in any log message, debugging alert, or even code comments. The chance of this coming back to haunt you is not worth the momentary satisfaction it gives you.
- dgfitz 5y agoYou ever grep the linux codebase for expletives? Give it a shot some time. I wouldn't make it at a company that frowns upon a 'God Damnit' in a log message.
- BoxOfRain 5y ago"I wrote this under duress" is my favourite comment I've personally left, mostly so the poor bastard who maintains that code after me doesn't hate me quite as much.
- VBprogrammer 5y agoI probably wouldn't either. It's not that I wouldn't like to write those things, or enjoy reading them in the tribulations of those who'd been there before me. The problem is more when it reaches a customer via some error prompt which you modified for debugging or some logging output which ends up in their console.
- aeternum 5y agoIt's still not a good practice. Customers do sometimes see log files and when they do it's because things are broken and they're typically not in a good mood. Perhaps you have a highly orthodox individual as a user, should they be forced to read or even repeat a 'God Damnit' in a log or error message while on the phone with support? Should an atomic-bomb survivor be told that their files were nuked?
- JTbane 5y agoThis is good advice, I was in an interview and was asked why "add the X shit" appeared in one of my commit messages in my personal github repo.
- deleted 5y ago[deleted]
- DaemonAlchemist 5y agoAgreed. I once worked for a company that built custom e-commerce sites. One of our clients decided to bring development in-house, and wanted the codebase for their site. I had to go through every source file line by line to remove all of the expletives the core team had put in the comments before handing over the code.
- Trufa 5y agoDarn, I made the mistake once and never again, the face of the CEO pointing at the word "PENIS" on the site was a good enough lesson I guess. I guess it was as lucky as you can get since we had made the joke together and I just forgot to delete it. Still remember the code, I thought I was sooooo funny. I apologize on behalf of my former self. *:after { content: 'PENIS'; }