The following is a short interview with Succinctly series author Dirk
Struass, whose latest book, Asynchronous
Programming Succinctly, was published recently. You can download the
book here.
What should people
know about the subject of your book? Why is it important?
Asynchronous
programming allows developers an elegant way to avoid bottlenecks in code and
write more responsive applications. Traditionally, this was somewhat cumbersome
to do. With async and await, the code is clearer and easier to understand and
maintain.
When did you first become interested in this subject?
Early on in my career I was faced with very
long running VB Scripts used inside ERP software. A lot of that work was ported
out to hosted .NET controls, and it was here that performance was key.
I started thinking more about optimization of code and it just stuck.
By writing this
e-book, did you learn anything new yourself?
I always learn while writing. In order to
explain something, you need to really dig down and understand the topic in
order to convey that message to others. Writing about something (be it a blog
post, article, or help document) is the best way to learn.
How will this subject
change over the next few years?
I think as the framework continues to mature,
so will the ease of use and implementation of asynchronous code. The
"learning curve" of asynchronous programming will flatten even more
than it already has. I mean, what could be easier than writing httpClient.GetStringAsync?
Do you see the
subject as part of a larger trend in software development?
Asynchronous programming is an essential part
of software development. If you can use it and you think it will add benefit,
you should. Developers must keep two things in mind when writing software. The
first is security. Always think if what you are writing is the most secure way
to do it. Second is performance. If you foresee having to process large volumes
of data, chances are you should be using async in there anyway.
What other books or
resources on this topic do you recommend?
The first port of call for me is always the
Microsoft Docs site. The information is always current and has great examples of
the code needed (https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/asynchronous-programming). Also, the
ability to add comments to the document makes it even better, because you get a
feel of what other developers are thinking or find challenging. The other
resource I find very useful is Experts Exchange (https://www.experts-exchange.com). If you are
facing challenges, chances are your solution might already be addressed by
someone. If not, you can post a question and have the community of devs (or
Experts) answer your query. You can also ask questions anonymously, which is
great for those I-think-I-should-know-this types of questions.