Skip to main content
Bring tags inline with site policy
Source Link
Peilonrayz
  • 44.4k
  • 7
  • 80
  • 157

Note: This works in both Python 2 and Python 3

Note: This works in both Python 2 and Python 3

Just making a few minor changes to make things a bit nicer to read.
Source Link

I was asked to provide some example code for a job interview and didn't have anything to offer, so I wrote the following function.

  • It's something I recently needed, so it's not entirely contrived.
  • It's simple enough to do in one function, so it can be reviewed easily.
  • It's complex enough that a new programmer would make a mess of it.
  • It's cutevisual. You can render the generated barcoderesult in a browser.
  • It's useful, so I could make a little gist out of it.

The barcode is in the Interleaved 2 of 5 FormatInterleaved 2 of 5 Format. It's a simple format, and there's a Wikipedia article that explainscovers it well.

I was asked to provide some example code for a job interview and didn't have anything to offer, so I wrote the following function.

  • It's something I recently needed, so it's not entirely contrived.
  • It's simple enough to do in one function, so it can be reviewed easily.
  • It's complex enough that a new programmer would make a mess of it.
  • It's cute. You can render the generated barcode in a browser.
  • It's useful, so I could make a little gist out of it.

The barcode is in the Interleaved 2 of 5 Format. It's a simple format, and there's a Wikipedia article that explains it well.

I was asked to provide some example code for a job interview and didn't have anything to offer, so wrote the following function.

  • It's something I recently needed, so not entirely contrived.
  • It's simple enough to do in one function, so it can be reviewed easily.
  • It's complex enough that a new programmer would make a mess of it.
  • It's visual. You can render the result in a browser.
  • It's useful, so I could make a little gist out of it.

The barcode is in the Interleaved 2 of 5 Format. It's a simple format, and there's a Wikipedia article that covers it well.

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

Update: A new version of this code has been posted hereposted here. The new code includes many of the suggestions made below.

Update: A new version of this code has been posted here. The new code includes many of the suggestions made below.

Update: A new version of this code has been posted here. The new code includes many of the suggestions made below.

added 224 characters in body
Source Link
Loading
deleted 1 character in body
Source Link
Loading
deleted 2371 characters in body; edited tags
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238
Loading
added 8 characters in body
Source Link
Loading
deleted 104 characters in body
Source Link
Loading
Simplified explanation.
Source Link
Loading
added 158 characters in body
Source Link
Loading
Source Link
Loading