Which Linux distribution is the best for a programmer?

You need to specify what sort of engineering:
Software engineering/IT/Web—you’re better off sticking with Debian, Ubuntu, or RedHat/CentOS if you want to use the computer to write your own software and/or manage commonly-used platforms without constantly tweaking with the guts of it.
Computer Engineering/System Programming—use a source-based distribution like Gentoo, Slackware, or Linux From Scratch.
Learning to tweak the system is good for you.
Hardware Engineering—also Gentoo, Slackware or Linux From Scratch, because you’ll be writing drivers and using embedded distributions like Yocto, which are very similar to the distributions listed.
Or, just determine where you fit on this chart:

You may also like:
C++: Reading Elements from Vector until EOL
C++: Singly Linked List using Template (Data Structure)
What to use endl or "\n"
C++: Implementation of Heapsort
C++: Check if the String is Palindrome