Theory and Practice of online learning