This is one of my constant struggles actually. Give intern or relatively inexperienced person what I think is a pretty simple task with clear instructions I lay out (eg write unit tests, these are exactly what they should do, go for it) and they come up with some crazy overengineered or shitty thing. So my choices are to completely rebuild it myself, tell them to rebuild it which may take forever and a day, or just try to use it.
This typescript stuff is aids, it’s completely unreadable to me.
Another example - asked an intern to just write me a loop in bash or python, whatever he preferred, to iterate through some matrix of possible configurations for a test suite. It would be like N * M configurations. There’s probably a very simple single loop solution, 2 loops would be fine, whatever. I could write it but I’m so short on bandwidth and it can be challenging finding interns tasks they can actually do, so I delegate these things.
He comes up with monstrosity of a function that I shit you not, that had 4 nested loops. I have never seen anything like that in my life. On top of that he had some super complicated dynamic variable naming he was trying to do, and when I showed him an easier way to do it (just the bash equivalent of a foreach loop, iterating through a string of his configs via IFS delimiter) he looked at me like I was a total moron.
I guess this is an intern rant not a typescript rant.