The basic principle of robotics and AI

Image
Artificial intelligence applied to robotics development requires a different set of skills from you, the robot designer or developer. You may have made robots before. You probably have a quadcopter or a 3D printer. The familiar world of  Proportional Integral Derivative  ( PID ) controllers, sensor loops, and state machines must give way to artificial neural networks, expert systems, genetic algorithms, and searching path planners. We want a robot that does not just react to its environment as a reflex action, but has goals and intent—and can learn and adapt to the environment. We want to solve problems that would be intractable or impossible otherwise. Robotics or a robotics approach to AI—that is, is the focused learning about robotics or learning about AI? about how to apply AI tools to robotics problems, and thus is primarily an AI using robotics as an example. The tools and techniques learned will have applicability even if you don’t do robotics, but just apply AI to

Introduction to Asynchronous Programming in .NET

Asynchronous programming is generally one of the hardest programming concepts to grasp. It is even harder to understand what it means when it comes to dealing with server applications, notably web applications.

Besides the general concept, the asynchronous programming model in the .NET Framework was also hard to grasp in the early days of the framework. With the introduction of Task Parallel Library (TPL) in .NET version 4.0, it became easier, but the programming model was still not ideal. With the new asynchronous programming language features of C# in .NET 4.5, it got easier still. It now may be said to offer the ideal programming model as well.


In terms of both infrastructure and extensibility points, ASP.NET Web API framework is asynchronous from top to bottom by design. Also, it leverages the Task-based Asynchronous Pattern (or TAP) introduced in .NET 4.0 to enable this. As we will be dealing with asynchrony throughout the book, it would be helpful to ensure upfront that there is a good understanding of asynchronous programming and TAP. So this chapter will focus on asynchronous programming in .NET and, especially at the server level, with IIS Web Server, which is the most commonly used hosting platform for ASP.NET Web API applications.

What Is It All About? 

Put very simply, “asynchronous code” refers to code in an operation (which the code executes) where that code won’t wait till the operation completes; therefore, it doesn’t block the thread it is running on. The need for asynchronous programming comes from the fact that a long-running operation blocks the thread that is executing it until the operation completes. If such an operation is performed synchronously, the result will be an unresponsive software application—one that might risk the health of your entire application.

This may sound a little abstract, so let’s use a scenario from daily life to make sense of it. Assume that a few days ago, after I bought a product from Company A, I began having a problem with it. I called the company’s support center to explain and sort out the problem. After listening to my explanation, the customer service representative asked me to wait a few minutes. While he tried to solve the problem, I was left hanging on the telephone. The important part here is that I couldn’t do anything else until the representative got back to me. Any other tasks I needed to perform were, like me, left on hold while I waited for my call to end. My situation in this scenario can be related to synchronous processing of a long-running operation.


Let’s construct another scenario. This time I bought a product from Company B; again, there was a problem. I called Company B’s support center and explained the problem to a customer service representative. This time, however, since the representative said she would call me back as soon as the problem got sorted out, I could hang up the phone. This allowed me to see other tasks while Company B’s people worked on my problem. Later, the representative called me back and informed me of the problem’s resolution.

It is pretty easy to get confused about asynchronous programming, but it is even easier to get confused about leveraging asynchrony on server applications. The advantage of asynchronous programming is easily recognizable on client applications such as WPF, Windows Forms or Windows Store applications. Let’s look at an example. In a WPF application, for instance, we want to download a web page (let’s say www.apress.com) and insert its HTML code as text somewhere in our window,
asp.net MVC interview  questions

Comments

  1. Thanks a lot for sharing such a good source with all, i appreciate your efforts taken for the same. I found this worth sharing and must share this with all.



    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery








    ReplyDelete

Post a Comment

Popular posts from this blog

iOS 13 Features

Data Science and Machine Learning

Data Scientist Interview Question