Puppy, Lubuntu, Debian, or any other lightweight distro such as those listed here will work fine.
I'd suggest that you don't install a graphical environment and go for a minimum install - i.e. work on text-only console - to avoid wasting resources. While a IDE is nice when doing software development, you can learn a programming language without it. All you need is `gcc` and a couple of other packages.