Uh, almost nobody I've worked with to date codes in their free time with any kind of regularity.
If you've never encountered the average 9-5 dev that just does the least amount of effort they can get away with, then I have to apploud the HR departments of the companies you've worked for. Whatever they're doing, they're doing splendid work.
And almost all of my coworkers are university grads that do literally the same you've used as an example for non formally taught people: they write abysmally performing code because they often have an unreasonable fixation on practices like inversion of control (as a random example).
As a particularly hilarious example I've had to explain to such a developer that an includes check on a large list in a dynamic language such as JS performs abysmally
Many of these people have a normal life outside of work and different hobbies or a social life. Many of them had been glued to their screens and keyboards too but evolved into a different stage in their lives. Former passions could turn into a discipline. I personally am not on my computer outside of 9-5 because thats already enough. I admit that don’t have the same passion I had in my 20s and yet Im effective in doing my work and am quite fulfilled.
this time I agree that my wording was unclear.
While you definitely loose acuity once you stop exploring new concepts in your free time, the amount of knowledge gained after you've already spend 10-20 yrs coding drops off a cliff, making this time investment in your free time progressively less essential.
My pint was that most of my coworkers never went through an enthusiastic phase in which they coded in their free time. Neither pre university nor during or after. And it's very easy noticeable that they're not particularly good at coding either.
Personally, I think it's just that people that are good at coding inevitably become enthusiastic enough to do it in their free time, at least for a few years. Hence the inverse is true: people that didn't go through such a phase (which most of my coworkers are)... Aren't very good at it. Wherever they went to university and got a degree or not.
> an includes check on a large list in a dynamic language such as JS performs abysmally
Does it perform any better in statically compiled languages?
Depends on the implementation. E.g. Javas HashSets include has the same performance profile as a Map lookup. Its still not particularly performant with large datasets, but significantly less abysmal then a regular JS .includes().
I just didn't want to explore the example to such a depth, as it felt irrelevant to me at the time of writing.