236
Python
8y

I accidentally created a bug that became an amazing feature at my last job.

It was for a program to read barcode tickets (we created software and web solutions for events), and to register the barcode sacnners to the computer I had to do some magic with USB-detection since it was not specified which brand the scanners would be (so no SDK would be available).

When the scanner was plugged in it would create its own thread so it wouldn't interfere with the UI of the program when it was reading/sending data.

Somehow I messed up with the thread termination for new scanners so it would accept to connect more than one scanner and it would work flawless since it was its own thread in the program.

When I tried to think out a solution for multiple scanners when planning it I got a headache and thought that's something for later. Turned out alright in the end apparently.

Comments
  • 6
    Hack it until you make it
  • 0
    But how did you do it with Ms word and excel only!
    I'm pretty sure you need powerpoint too to make it.
  • 0
    @DonMcCoy I googled some VBA for Excel, now I'm a hacker.
  • 2
    All the scanners I've used simply send keyboard signals. I didn't realize you can even separate them out from keyboard input.
  • 1
    @configurator You can usually set them to a HID-unit so it sends packets of data instead. That was also a tricky part since they all used different formats depending on which brand you used.
  • 0
    Then they had a huge crowd turnout at an even and plugged two scanners in to handle the throughput and suddenly you were the hero! πŸ‘ŒπŸΌπŸ˜
  • 1
    @badcopnodonuts If they only knew it wasn't a feature in the first place. That's the harsh part about being developer, nobody praises you for something they expect to work in the first place.
  • 1
    What's praise?! Ever.
Add Comment