The plane ticket



  • While source control is a wonderful tool, people still find way to abuse it beyond recognition. Still, some year ago, me and my coworker found one of the strangest thing that could be commited : a plane ticket. The electronic file sent by the airplane company had been renamed as ".pdf", put in some folder of the code, apparently by "error".

    What made this even more baffling is that the file was hidden - we work on linux, and our source control file don't add hidden file without an explicit add command. The culprit wasn't hard to found, both by checking source code and reading the name on the plane ticket, and since he was just hired he was let go quickly after that. (if you are curious, they were other reason for that, but not as funny as this one)



  • Sounds like he was trying to follow a rule, no code changes without a ticket.

     

     



  • And so the guy says "You told me no code changes without a ticket"




  • @TheLazyHase said:

    The electronic file sent by the airplane company had been renamed as ".pdf", put in some folder of the code, apparently by "error".

    Some distros have CUPS configured in a way that makes this easy to do by accident: the default printer is Print To File, the default filename is empty, the default filetype is PDF and the default directory is whatever something got saved in last. It's easy to miss that it's happened, too, because the resulting filename is ".pdf" which is hidden by virtue of starting with a dot - especially if you're expecting the more usual CUPS PDF printer behavior, where the print job just gets saved silently inside ~/PDF with a sensible name. Having observed that this didn't happen, it's not immediately obvious that rogue print job output exists and ought to be tracked down and removed.



  • @flabdablet said:

    @TheLazyHase said:
    The electronic file sent by the airplane company had been renamed as ".pdf", put in some folder of the code, apparently by "error".

    Some distros have CUPS configured in a way that makes this easy to do by accident: the default printer is Print To File, the default filename is empty, the default filetype is PDF and the default directory is whatever something got saved in last. It's easy to miss that it's happened, too, because the resulting filename is ".pdf" which is hidden by virtue of starting with a dot - especially if you're expecting the more usual CUPS PDF printer behavior, where the print job just gets saved silently inside ~/PDF with a sensible name. Having observed that this didn't happen, it's not immediately obvious that rogue print job output exists and ought to be tracked down and removed.

    That is possibly the most retarded default behavior ever. But still doesn't explain how the file got into source control.



  • @The_Assimilator said:

    @flabdablet said:
    @TheLazyHase said:
    The electronic file sent by the airplane company had been renamed as ".pdf", put in some folder of the code, apparently by "error".

    Some distros have CUPS configured in a way that makes this easy to do by accident: the default printer is Print To File, the default filename is empty, the default filetype is PDF and the default directory is whatever something got saved in last. It's easy to miss that it's happened, too, because the resulting filename is ".pdf" which is hidden by virtue of starting with a dot - especially if you're expecting the more usual CUPS PDF printer behavior, where the print job just gets saved silently inside ~/PDF with a sensible name. Having observed that this didn't happen, it's not immediately obvious that rogue print job output exists and ought to be tracked down and removed.

    That is possibly the most retarded default behavior ever. But still doesn't explain how the file got into source control.

    Yes it does.


  • @The123king said:

    @The_Assimilator said:
    @flabdablet said:
    @TheLazyHase said:
    The electronic file sent by the airplane company had been renamed as ".pdf", put in some folder of the code, apparently by "error".

    Some distros have CUPS configured in a way that makes this easy to do by accident: the default printer is Print To File, the default filename is empty, the default filetype is PDF and the default directory is whatever something got saved in last. It's easy to miss that it's happened, too, because the resulting filename is ".pdf" which is hidden by virtue of starting with a dot - especially if you're expecting the more usual CUPS PDF printer behavior, where the print job just gets saved silently inside ~/PDF with a sensible name. Having observed that this didn't happen, it's not immediately obvious that rogue print job output exists and ought to be tracked down and removed.

    That is possibly the most retarded default behavior ever. But still doesn't explain how the file got into source control.

    Yes it does.
     

    Did you miss the "our source control file don't add hidden file without an explicit add command" line in the OP?

     

    Also, my Ubuntu uses "mozilla.pdf" in Firefox and "output.pdf" in Chrome as default filenames when printing as PDF. Never saw ".pdf" as a default filename.

     


  • Discourse touched me in a no-no place

    @The_Assimilator said:

    But still doesn't explain how the file got into source control.
    Some SCMs have a “commit all the changes, even the totally irrelevant one” mode. I even know of people — very good programmers — who think it is a wonderful thing. I disagree.



  • @TheLazyHase said:

    me and my coworker found one of the strangest thing that could be commited : a plane ticket.

     

    Non-Code Things I've Found In Codebases: An Incomplete List—

    • "Lowes Paint Selection Guide" PDF
    • Video of skateboarding grannies
    • Pirated copy of Dreamweaver
    • Script to cheat at online poker
    • .NFO file containing license keys of dubious origin
    • "The Complete Guide To The HTML 3.2 (Wilbur) W3C Recommendation"
    • Fetish pornography
    • Angry-looking picture of Beyoncé
    • Scanned crude drawing of unicorn
    • Plaintext SQL and/or CSV dumps of customer information (including credit card and CVV2 numbers)
    • XML documents containing fantasy-football teams and scoring information
    • The original developer's list of passwords for all his other clients' accounts
    • Random confidential spec documents from the developers other clients

     



  • @flabdablet said:

    Some distros have CUPS configured in a way that makes this easy to do by accident...
     

    Bloody hell, that is retarded!

    Defaults should never result in something as asanine as this. Anyone flagged it up on a bugtracker?



  • @dkf said:

    @The_Assimilator said:
    But still doesn't explain how the file got into source control.
    Some SCMs have a “commit all the changes, even the totally irrelevant one” mode. I even know of people — very good programmers — who think it is a wonderful thing. I disagree.

    Sometimes when I'm too lazy to type a partial filename and push tab, I do git add .



  • @Cassidy said:

    Defaults should never result in something as asanine as this. Anyone flagged it up on a bugtracker?

    I remember it happened to me with Debian. It was a long time ago and I can't recall which version. I had not installed cups-pdf (which Ubuntu comes with by default, IIRC). I also can't recall which application was responsible. Iceweasel in Wheezy certainly doesn't do that any more, and neither does the PDF viewer that comes with Xfce.



  • @Ben L. said:

    Sometimes when I'm too lazy to type a partial filename and push tab, I do git add .

    Some shells like zsh auto-complete based on the command, so if you type git add <space> and then press tab it'll only autocomplete for unstaged files.

    That said I'm not sure if there's a way to make it auto-complete all the files that need staging, so unless you want to do <space><tab><space><tab> over and over until all the files are listed, git add . is easier.



  • Well, it's not that hard to type git status and add every file that need adding. git add . is a good way to have problem. Even if it ignore hidden files*, you can easily add problematic stuff. And conflict on binary file is not what you want, nor big files that make git a lot slower.

    That a bit like calling every variable a, b, c, d, ... It's faster to type, but it will bite you in the ass.

    • hidden file as in according to a config file, not according to the system ; in this case, hidden file were in the gitignore.


  • If your compilation or testing process creates files in your source tree that aren't ignored by your scm, whoever set it up is a moron.

    If you find such a moron, inform them they they are, in fact, a moron, and then add the files to the ignored files list.



  • I had a fun hack of XSLT and CVS. Gotta confess. This is more like WhoTF cares about some plane ticket? He probably was on Cygwin or something, and you come off like a distro jerk.



  • And the day you create a file but decide to change its name, or put some temporary script somewhere, or store a diff in a file, it end up in source control.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.