|
I can't read the article either but good luck developing a desktop application that doesn't hard lock and go into a 'not responding' state every time someone triggers an event handler without implementing asynchronous multi threading.
|
|
|
|
|
Asynchronous programming is not needed if you have an advanced OS that can extract the parallelism from your executable and distribute that processing across all of its cores.
Otherwise, you need to learn how to do it. It will probably serve you better than trying to learn the newest sexy programming language that hides the multitasking with a "trust us, we know what you want to do".
It's really cool too.
|
|
|
|
|
If you ever get for a sec outside of website programming and try some multi-threading, there is no way you can do anything without asynchronous calls.
modified 20-Oct-19 21:02pm.
|
|
|
|
|
If your goal is faster individual responses, I agree. I also agree with the point about reducing unnecessary complexity. However, he ignores the argument that using async/await in MVC is more about server resources than user wait time.
Given two servers, one written using sync the other async, each with a single connection the server written using sync code will respond faster. But as the number of connections increases the dynamic will change. The async server will return responses sooner as the sync server begins to slow down as unhandled requests queue up and it eventually begins refusing connections altogether long before the async one does.
He makes the argument that other tools are more worth your time. However, that it subjective. Will learning functional programming and re-writing my application in F# prove more valuable in the long run? Probably. But can I more quickly grasp the async model and implement it along my hot paths? More likely.
Does this mean I should implement async/await from the very start? Be careful of pre-optimization. My last project I wrote using async/await - it took me an afternoon of investigation to determine how to properly use it. It wasn't a significantly large project, but it's in use, under load and stable. I have never found a significant overhead in tracking down async bugs, but that's because I spent time learning how to handle async exceptions and properly implementing logging.
|
|
|
|
|
Naturally before jumping from one bandwagon to another simply because one voice in the crowd shouts "the other one is better", one should at least try to understand the concepts behind the instruments on the first bandwagon.
Of course it also follows that if one actually learned to play some music on the instruments with some modicum of proficiency before discarding them as ill-suited to composing a symphony then that would help.
Probably help even more if one had an idea of what the symphony was supposed to be about in the first place, but one can't ask for everything.
|
|
|
|
|
Well, I agree with going synchronous first, but sometimes you run into situations where that is just dumb. While going to school I was writing changes to a windows app and asked my teacher why I wasn't seeing any changes. This was a puzzle put up as a challenge on the school board.
You can't see any changes until your code is idle... OH!
In the mean time a fellow student came up with an estimate of 6 months to find a solution on the current machines. I felt that was BS, but I could also see what I was doing wasn't efficient and he might be right about that piece of code. Anyway I didn't finish the code, but I did write code that finished in 5 minutes, had several thousand solutions that I could view in the windows app while I'm chugging away to finish the code, and I was able to find several bugs in the logic. Left school, worked on it on my own, found/fixed the bugs, added performance changes, so now I have logic that finishes in 2 minutes with 5 times as many solutions and I am quite confident it is finding all the solutions, but no way to absolutely prove it.
I DO NOT want to sit there for two minutes with no visibility of progress being made. So, while it is running, I see a running total of solutions found, some statistics on how close to the end I am, dynamic interaction with the code so I can have the code slow down and show me the progress.
Now, how could I do that on a Windows app WITHOUT asynchronous programming?
I found a bug in a service app that was built to handle thousands of requests a second. It was built to run several threads solving different requests simultaneously. I didn't even question that. I did question the throttle to keep the thread count to a max amount when it really would go 2 times the step amount past the thread maximum.
IE, there are times when async isn't just good, but required. I agree, that doesn't mean it should be the first goto you use.
|
|
|
|
|
The second hand on your watch is actually the third one...
|
|
|
|
|
Only if you replaced it twice.
|
|
|
|
|
Zero-based array?!?!?
Anything that is unrelated to elephants is irrelephant Anonymous ----- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 ----- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
|
From the title I thought you were talking about something Frank Zappa practiced?
New version: WinHeist Version 2.1.0
When you are dead you don't know it, it's only difficult for others.
It's the same when you're stupid.
|
|
|
|
|
Well, on the other hand, be happy it's not a turd one. Now that would stink!
(I'll get my coat, and some tp as well)
|
|
|
|
|
Also normal use is to glance at a watch - not to watch it.
|
|
|
|
|
On my watch, it's the only one.
(Stop staring at me)
"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 |
|
|
|
|
|
Jacquers wrote: The second hand
Well, it is actually the 'seconds' hand ...
As in refurbished factory seconds, so, it may actually be the n'th one
|
|
|
|
|
Personally I wouldn't care too much about such minute details.
|
|
|
|
|
And we must take such puns in hour stride?
No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde
|
|
|
|
|
Dave Allen[^] approves of this post.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That was funny
I'll need to go check out his other vids.
|
|
|
|
|
I'm calling time on this one...
|
|
|
|
|
I kept them peeled,
But I did not see a thing.
Police down a man.
[clickity][^]
veni bibi saltavi
|
|
|
|
|
Ahh nuts, another part of my childhood gone! Must admit until now I was sure it was Shawn Taylor.
|
|
|
|
|
I love a bacon sandwich[^]
Once you lose your pride the rest is easy.
In the end, only three things matter: how much you loved, how gently you lived, and how gracefully you let go of things not meant for you. – Buddha
Simply Elegant Designs JimmyRopes Designs
|
|
|
|
|
That's bunch-o-bacon, wonder what the bun is for?, looks!
New version: WinHeist Version 2.1.0
When you are dead you don't know it, it's only difficult for others.
It's the same when you're stupid.
|
|
|
|
|
As one of the comments said "too much bread".
Once you lose your pride the rest is easy.
In the end, only three things matter: how much you loved, how gently you lived, and how gracefully you let go of things not meant for you. – Buddha
Simply Elegant Designs JimmyRopes Designs
|
|
|
|