somewhen 2014:

- foreach pdf in a directory, appending a text line to the index file, which has the same name but a different extension

- me, writes the code real quick
"you tried it?"
"nah trust me"

- appended text to pdf instead of index files, all files were destroyed

  • 2
    Had a backup?
  • 2

    sort of... actually no... but the customer had... was embarassing, because we guaranteed 7years of revision safe storage hehe
  • 6
    Did you at least learn from that?

    For everything like this I've had to do I've always done a dry-run with 2-3 files that are copied over specifically for the test; then, when I know what's up, I know I can run the thing on the real files.
  • 6

    sure, i'd been senior architect for years at that time, preaching to my people the exact thing you said,
    over and over again.. but theres that one moment when you get overconfident, and time runs out, and then you do it.
  • 0
  • 4
    well... in theory... if you append a text to whatever file, destroying the file, removing the appendedText.Length number of characters from its end might un-destroy those files?

    did you give that a try?
  • 2
    @devnulli Cool, at least it's a little comforting to know that people do stupid mistakes regardless of their seniority.
  • 0
    Anything that goes by customer has to be double-triple-quadruple tested. That's 24 times testing whether every little change works.

    Learned it hard way as well. But not that hard.

    But my first ever script in Python that looks more like Bash and does backup works on several customers' systems.
  • 1
    yea but it didnt work
  • 1

    yea when you stop making mistakes you should quit. you work the code, you make mistakes.

    luckily, in the last years, coding practices let the detection of those mistakes get shifted more and more to the left.

    never making them, thats only happening when you get away from the code. to the slides. i hate slides. i rather make mistakes
Add Comment