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.
but for someone not familiar with it the drawback is that it's less understandable than the classic syntax.
Anyone and everyone that is writing production code (vs, say, hobby code for yourself and to learn) should know the syntax of the language like the back of their hand. One may not choose to use a particular syntactical sugar, but it should NOT result in a "WTF does this mean?"
Conversely, we all start from a place of "not knowing" and that's fine. But any code a junior dev writes should be reviewed by the senior people and the junior person should be educated. It's better for them, it's better for the company and the code base.
I also look at his commits to learn things!
Writing dumbed down code simply so it's more readable for the less educated - why? That's absurd.
Also, should I pay back the company for the lines of deleted code?
Hell no. They should pay you! Less code == less things that can go wrong.
I'm blaming Resharper for that. It knows about the latest and greatest syntax "improvements" (ahem), and won't shut up until you make it happy.
While it's a useful tool, I've always found it to be a memory hog, and VS is always doing more than its fair share of that. So I don't use it. But one of my coworkers keeps it up to date, and is a big believer in compiling clean (0 error, 0 warning).
But I definitely remember one instance where Resharper made a suggestion that had implications that broke code elsewhere. I know I'm too busy to make changes for the sake of making changes.
I use the newest language constructs wherever I can.
Mostly because Visual Studio draws a small squiggly line and advises me to change it to the latest standards (and even does it for me).
I do like them though, less nesting, less variables (like with the inline out parameters), etc.
I'm not going to revisit old code unless I have to though.
Don't fix what isn't broken and all that.
Also, should I pay back the company for the lines of deleted code? :P
Since productivity is measuered in LOC/day, your productivity is currently negative.
..but I agree with the others - don't "fix" it; every edit might introduce a new bug and the changes are NOT an improvement that yields enough result to justify spending the time on it. Economically, it always costs more than it yields.
I'd argue that you'd be better of playing a game.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
Just remember that usings are disposed in the reverse order of their declaration. If you have function scoped disposable variables then this new syntax is really nice as it avoids unnecessary code block nesting. If, however, you need to dispose the object as soon as it's released, then use the traditional syntax.
Confused non-social abutting chief information officer assigned to compose provisional circumlocutions comprising one of the longest words in the English language. ((0b11 << 0b100) - 0b11)
This should be very easy. Don't cheat, the word length is encoded because there is a very small pool of words with that letter length. Someone is bound to google it and find it immediately. Because the puzzle is so easy... I am only accepting a complete answer including all operators/indicators.
There is a secondary bonus puzzle embedded inside the overall primary puzzle with a hint of tū-te-ngaehe but I highly doubt anyone will solve the complex second layer. The secondary puzzle is not necessary.
I checked the dictionary of @Richard-MacCutchan through the kitchen window to make sure it was listed there.
confused (anagram indicator)
non-social (first letter set: nonsocial)
abutting (merge indicator)
chief information officer (second letter set: cio)
assigned to (insertion indicator)
compose provisional circumlocutions (third letter set: composeprovisionalcircumlocutions)
comprising one of the longest words in the English language (definition)
The letters in bold stay together when anagrammed.
The pinnacle of puzzle setting is to embed double puzzles into a single set. It's not always easy and takes quite a bit of thought. I've seen @Tim-Deveaux do it a few times... although I think it may be unintentional and caused by his short clues.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!