I assume he would be suing for your wages, but like TofuJunkie said, unless it is very specific, I wouldn’t sweat it.
If you do specific development, say for financial institutions and you left to start a company that did the exact same thing, it may be an issue.
Saying that if you leave you can’t do development at all for 2 years just doesn’t hold water.
If he did the contract himself, it may or may not be legal; i would guess that it isn’t. Again contact an attorney.
If the contract is not specific about you being terminated or just quitting, I would probably find another job, come to work and get myself fired rendering the contract null and void.
Does the contract have a geographic limit? Such as, You can’t compete within 2 miles, or in your city, or state etc. If it doesn’t, that could null it.
Also, are “direct competitors” defined in the contract, if not that could null the contract.