|
Quote: Static Using Syntax
I'm also struggling to see a good use for this. Maybe if you had a huge number of Console.WriteLine() statements in a block?
Quote: Auto-Property Initializers
I like this. Having to move the initialization to the constructor is one of the things I find mildly annoying about properties.
Quote: Dictionary Initializers
Cleaner looking perhaps, but I don't see how it's supposed to be less error prone.
Quote: String Interpolation
Meh. Combined with nameof() this might make writing a custom ToString() for debug purposes a bit better ( return "{nameof(var1)} = {var1}, {nameof(var2)} = {var2}, ..."; ); but you're supposed to use a different syntax for that instead of abusing ToString() anyway.
Quote: nameOf Expression
You could do this with reflection before but IIRC it was rather fugly. It'd be nice to see if this could make some reflection heavy code I wrote years ago easier to read and less brittle.
Quote: Expression Bodied Function & Property
Yuck! I'm only not doing my giant [^] here for space reasons.
Quote: Exception Filters
Not sure. His example sucks, but I could see this potentially being useful in other cases.
Quote: Await in a Catch and Finally Block
Sounds useful but I haven't written any async code yet so not sure.
Quote: Null Conditional Operator
I've wanted this for years. The example isn't that bad with the old syntax, but try drilling down through 3 or 4 levels of nullable properties/members and checking at each point. Saying elephant it and slapping a try/catch for null reference exceptions was the least unreadable version if not something you'd want to do in hot loops.
BEST NEW FEATURE EVER!!!!!!!!!!!!!!!!!!!!!!!!!111oneoneone111elventyone11!11
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Michael Crump wrote: throw new Exception(...
No, no, no, no NO!!!
I wish the authors of the BCL had made the base Exception class abstract , to stop people from doing this.
If you want to throw an exception, throw a specific exception type. In this case, it's a problem with an argument being null , so an ArgumentNullException would be appropriate.
Throwing the base System.Exception class is just lazy, and makes your code harder to call - to the extent that Microsoft had to mess with the exception handling[^] to make catch (Exception) do the right thing.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I used several of this. Then was told my applet had to run on .NET 4.5.1 and had to take them out.
|
|
|
|
|
Most of them are compiler features. So long as you're compiling in VS2015, they should still work even if you're targeting an earlier version of the framework.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Should and do are two different things.
|
|
|
|
|
In Disconnecting Distraction Graham tells how he finally dealt with the incessant distraction of the Internet — he simply disconnected his main computer from the network. The simplicity and possible effectiveness of this really intrigued me.
So, for the past two nights of programming, my own computer has been completely disconnected from the network. But how will I look at cat pictures?
|
|
|
|
|
There are times I feel I need to concentrate on a problem, so I take my laptop somewhere away from such distractions.
The last time was a week ago Tuesday -- though having access to MSDN on my phone was still a big help.
|
|
|
|
|
I would consider the fact that he used the offline documentation – which is the same as the online documentation only hosted on his local machine – as cheating; he's been online while offline.
|
|
|
|
|
Yes, it is shocking, why on earth hasn't he memorized the entire content of MSDN by now?
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Rob Grainger wrote: Yes, it is shocking, why on earth hasn't he memorized the entire content of MSDN by now? That's not the point. Of course you can keep and use a local copy of the documentation (I have a local copy of the essential parts of MSDN as well), but I wouldn't deliberately go offline just for the sake of it. It doesn't make sense. If the content is the same, it doesn't matter whether you're online or offline. He maybe has a point in that other helpful resources, like StackOverflow (or CodeProject, while we're at it ) won't be available when offline so you actually have to find the solution to a specific problem on your own, but do you really need to unplug the cable and shutdown your WiFi for that? It's always tempting, I know, but personally, I cannot count the hours I've spend trying to figure out why something doesn't work as expected, and to me sites like StackOverflow or this one are really one of the lasts resorts when nothing else helps.
|
|
|
|
|
In the semiconductor business, it is called the “red brick wall” — the limit of the industry’s ability to shrink transistors beyond a certain size.
On Thursday, however, IBM scientists reported that they now believe they see a path around the wall. Tear down this wall!
|
|
|
|
|
|
Quote: The challenge of carbon nanotubes in their typical state is that they form what scientists call a giant “hairball” of interwoven molecules.
Well spit it out then!
New version: WinHeist Version When you have eliminated the JavaScript, whatever remains must be an empty page. Unknown
|
|
|
|
|
|
A group of researchers are arguing that humanity needs a ‘Biosphere Code’ that makes sure we control our algorithms before they destroy the environment. Forget global warming, algorithms are the true danger lurking in shadows.
|
|
|
|
|
"Ah, this is obviously a use of the word 'algorithm' of which I was not previously aware." -- Arthur Dent
|
|
|
|
|
Wow it's getting deep in here.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Smartphone users can do "very little" to stop security services getting "total control" over their devices, US whistleblower Edward Snowden has said.
The former intelligence contractor told the BBC's Panorama that UK intelligence agency GCHQ had the power to hack into phones without their owners' knowledge.
Mr Snowden said GCHQ could gain access to a handset by sending it an encrypted text message and use it for such things as taking pictures and listening in.
The UK government declined to comment. And that's surprising to people...?
|
|
|
|
|
|
The emergency dispatchers who handle calls to 911 must grapple with urgent situations, frantic callers and garbled messages.
As if that's not enough, now they're facing another challenge: butt dialing. I fully stand behind the 911 dispatchers and pledge to do my part to crack down on this important issue.
|
|
|
|
|
Kevin Priddle wrote: pledge to do my part to crack down
Great word play.
Also, why do smart phones have that stupid little "EMERGENCY CALL" link that is bound to get pressed by accident?
Ridiculous!
|
|
|
|
|
faster calling in a genuine emergency, and though less an issue now when mobile phones were less common being able to use the phone on the belt holster of the guy who just collapsed on the sidewalk instead of running into the nearest store/pounding on a house door because you don't have a phone of your own was a major factor. For parents of young children (who don't have a phone of their own) it still is relevant.
OTOH I have a case with a flip cover. Preventing butt dialing is one of the reasons.
On the gripping hand when my brother used to butt dial me while practicing his Sax was rather amusing. He got a few 'thanks for the concert' type voice mails a while back.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Dan Neely wrote: faster calling in a genuine emergency
It's bad logic, really. Just because now technology supports "fast dialing" via a quicklink then that is a standard.
FYI - I'm not arguing with you. I'm arguing the case of this entire idea.
It is bad design.
Consider this...now voice commands are entirely feasible so now if you whisper "help" isn't it the absolute responsibility of your phone to dial the authorities immediately?
I'm sure this is a misguided attempt by cell phone manufacturers -- who have no clue -- to put a line on their sales brochure that says, "easily dial 911 with only the click of a button".
Voice Dial 911 by simply whispering "help".
Next, revision...
Simply think the word "help" and your phone dials 911.
Next revision...
Robot VOICE: My human just experienced a spasmodic pain. I (iPhone) am is dialing 9-1-1!!! Hold on, Human, I wil help you.
Sheesh...
|
|
|
|
|
Not to mention the slower response due to the call center lines being loaded with butt-mergencies.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|