The Theory and Practice of Online Learning