Skip to content

Instantly share code, notes, and snippets.

View joseignaciorc's full-sized avatar

Jose Ignacio Riano joseignaciorc

View GitHub Profile

Falsehoods programmers believe about prices

  1. You can store a price in a floating point variable.
  2. All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
  3. All currencies are subdivided in decimal units (like dinar/fils)
  4. All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
  5. All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
  6. Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
  7. For any currency you can have a price of 1. (ZWL)
  8. Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
@joseignaciorc
joseignaciorc / tmux_local_install.sh
Last active June 23, 2019 22:20 — forked from ryin/tmux_local_install.sh
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# To start a session run: ~/local/bin/tmux new
# To connect to an existing session run: ~/local/bin/tmux attach
# More info: see http://hyperpolyglot.org/multiplexers
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error