The 9850H is going to crush the 6820HQ in anything CPU intensive. Your GPU won't matter much for programming, but the former laptop being several years newer should be faster there as well. (Both integrated only or both dedicated).
If the screen size is a deal breaker, then do for that, but if you want the faster machine, the 9850H is significantly ahead. This would have tangible benefits in things like compile times if that is something you deal with frequently.