u/JohnSka7 - Archived Voat Post in v/programming
u/JohnSka7
  • home
  • search

u/JohnSka7

0 posts · 1 comment · 1 total

Active in: v/programming (1)

  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››
Comment on: Funny Code Comments Thread

In one piece of code I work on there is a php function that calls a command line program to split a PDF. The guy who wrote the program did it incorrectly, so if the command to do the split doesn't work (like, you pass it a doc or some other non-pdf file), it would just fail to return and, instead of catching the error, he had a comment like

// Sometimes this doesn't return anything - X

Problem is that it left the user with a blank screen and no explanation. This was replaced with a proper call to the cli function and error handling, and an updated comment:

// Sometimes this doesn't return anything - X

// Comments like the above is why X got fired. Make sure your programs work properly. - Me

4 08 Oct 2016 01:03 u/JohnSka7 in v/programming
  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››

archive has 9,592 posts and 65,719 comments. source code.