The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Ever been asked to do this? I seem to be encountering this more and more -- the last company I worked for, I left because that was stated explicitly by the CTO as the new policy.
What would you do if you were told to do that? And by dumbing down, I mean doing things like avoiding LINQ (except for basic things), metadata, reflection, extension methods, and any of the C# 7.0 language features.
It seems that long gone are the days when companies actually invest in keeping developer skills up to par with the technologies the company uses. Or even more amusingly (not) keeping those technologies up to date.
Is it more a question of using the latest language tricks versus making the code more readable ?
I agree, though I have no problem reading those examples. But I didn't know (and nothing comes up in google) that a ^ is what you use to index from the end of the array. If that's actually the case, I wish they'd just done what Ruby and Python do -- use negative numbers.
But really, I'm not talking "tricky" code -- I'm talking about simple things like knowing how to use reflection, or how extension methods work and guidelines on when to use them, or basic things like threading -- async/await, Task, TPL, even Thread.
If we use negative numbers, we could make it work for ranges in cases like a[1..-1]. However, we would not be able to make a[-1] work since it already has a meaning in the language. In fact, it would be a pretty a scary breaking change to try and introduce that since it would no longer throw a runtime exception and would instead start returning unexpected values.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Conversely, how does having first-class code help the business, compared to having "mediocre" code? If the end result works, and doesn't require massively more expensive hardware to run at an appropriate speed, then why not? "Simple" code helps the business by reducing staff costs, increasing the pool of potential recruits, reducing "up to speed" time for new joiners ... all these things are helping the business far more than using Linq where it's not necessary. Each new language feature or concept is another thing to learn and get expert in - or not. Keeping things "simple" with a smaller subset arguably allows all staff members to become "expert" in the entire gamut of techniques, and therefore able to pick up and work on any bit of the code, regardless of their seniority / experience.
Maybe playing devil's advocate a bit here, but if you look at things from management's point of view, there's something to be said for it. And if it means experienced (expensive) developers leaving in frustration - to be replaced by cheaper juniors - that's yet another win for the bottom line.
The examples given of technologies to avoid are actually in the language to reduce code complexity and do a fantastic job of that. This won't make the code more readable for junior devs it will model the bad habits of the previous generation of programmers for the new generation. More likely this is a policy put in place by a manager who wants to micromanage developers and does not want to keep up with the new language features.