> A couple of months ago I did a 'homework' assignment for an interview (it involved writing a simple REST service in go, even though I have at least one personal project demonstrating exactly this skill -- to an even greater degree -- in my github profile).

I would have asked them to look at that code and ask me any question they have about it. If they are not willing to do that I wouldn't have bothered continuing the conversation with them.

> the mid 20-something lead developer

Okay I am going to do something I don't like to do which is judge somebody on their age but a "lead developer" at around 25? Sorry but unless that person is some rockstar programmer (conceived with a copy of K&R in the womb) I find it very hard to believe somebody 3-4 years out of uni has the experience to be a "lead" at very much.

> told me he thought I was a better programmer than him.

Well that is something I guess, at least he didn't think he was God's gift to the programming world!

> Now, what do you suppose happened next? I never heard from them again and all of my attempts at communication were ignored.

Yes drives me insane. It is so fucking rude.

> I'm starting to think my age is becoming a factor (mid 30s)

Could be, hopefully not but a company that puts a mid-20-something as the "lead" developer might only be interested in getting young and therefore cheap employees.

> and also these kids have no sense of respect and professional courtesy.

Very true. That is partly why I don't think a mid-20s person can be a "lead" for much as they don't have the professional experience to lead. A lead developer isn't just a great programmer but also a great leader. Somebody for the regular staff to look up to and rely on for mentorship.

> I'd like to say this was an isolated incident, but that would be a lie.

It happens to us all. Some companies (IT and other) are shit. It is just the way of the world. Don't dwell on it too much, it is just more mental energy wasted and they already wasted a whole Saturday of your life yet were not even respectful enough to call and say "you were great but we prefer this other person". I mostly hate having that conversation (giving and receiving) but it has to be done, it is about respecting that persons time and even though you are not offering them a job you can offer them feedback so they do not walk away from the process empty handed. Sometimes that feedback is all they need to better themselves in the future.

> Stupid me just spent his Saturday doing another such project, though at least this one presented a more interesting problem.

Live and learn. In the future if you already have demonstrations of your work then ask them to look at that first and if they want to continue the process then you look at doing something specific for them. At least you seem to have found a small positive from it in that the problem was interesting :)

> The fact that so many employers treat candidates like this tells me that the whole "it's hard to find good developers" line is a lie.

A lot of the problems with finding a good dev is just finding a good employee for the company as a whole. You might have a good developer who is an asshole and will only cause issues.

Anyway just move on and forget about them. It is cliché relationship advice but you deserve better than them.