Online learning coding