Berlin, definitely. It is the best mix of everything you need.
Except sun light in the winter...
Yes, winters are an issue for much of Europe and especially for the northern part where much of software industry resides.
If that is important for you, then try the cheaper parts near Mediterranean - say, Slovenia is quite nice.