By my understanding it certainly isn't legally enforceable in the UK. It isn't actually illegal to have such a clause in the contract, but if it were to come to court it would be thrown out as an unreasonable clause.
The problem from the employee's point of view though is that it may have to come to court before the employer will back down and there are costs in terms of money, time, and relationships associated with that especially if the company goes for the appeal cycle afterwards. Most individuals can't afford the time or cost of such a case (though costs are likely to be recovered from the company eventually, you need to find the funds up front) if it comes to that, and the software industry can be fairly judgemental and nepotistic so it'll be hard work getting a new job (once life becomes unpleasant at the old one due to the court case) now you have a reputation for being difficult. These considerations are why individuals back down quickly, as the assume the conversation will go:
Company: We own that.
Individual: No you don't.
Company: Contract says so.
Individual: You can't enforce that.
Company: We can try. Wanna fight?
Individual: Er, no. Here, take it.
Companies
know the clause is not legally enforceable, but they have it in there because they know it generally doesn't have to be as most people will not argue as far as the legal status of the clause being relevant (in fact most people don't even
know that it isn't legally enforceable). This is particularly the case for younger people or those otherwise near the start of their career.
Most non-compete clauses are in a similar legal position.