Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Asynchronous programming



  Mastering Async/Await in JavaScript: A Comprehensive Guide with Examples

As a veteran JavaScript developer, I have seen the evolution of JavaScript's asynchronous programming landscape. From callbacks to promises and now async/await, JavaScript has come a long way in making it easier to handle asynchronous operations in a clean and readable manner. In this article, we will delve into the world of async/await and explore why it has become a popular choice for handling asynchronous operations in JavaScript. We will cover the basics of async/await, its syntax, and how i...

   JAVASCRIPT,COMPARISON,PROMISE,ASYNC AWAIT     2023-02-12 07:26:15

  4 asynchronous programming methods in JavaScript

You may know the execution environment of JavaScript is single threaded. The so called single thread means only one task can be running at any time, if there are many tasks, they need to be in a queue and wait for the previous task to be completed. The advantage of this mode is it's easy to implement and the execution environment is relative simple; the disadvantage is that if one task takes long time, the tasks following it must wait in the queue and this will delay other tasks consequently. Th...

   JAVASCRIPT,ASYNCHRONOUS PROGRAMMING, EVENT MODEL,PROMISE     2012-12-25 00:55:47

  How GitHub Works: Be Asynchronous

This is — by far — my favorite aspect of working at GitHub. Everything is asynchronous. Chat GitHub didn’t have an office for the first two years. Chat rooms (in our case, Campfire) is where things got done. Today we’ve moved into our second office, and Campfire is still where we get things done. There’s a reason for that: chat is asynchronous. Asynchronous communication means I can take a step out for lunch and catch up on transcripts when I get back. Async...

   GitHub,Work,Style,Asynchronous,Efficienc     2011-08-19 07:44:20

  The evolving history of asynchronous operation in JavaScript

JavaScript is single threaded, it means there would be only one task running at any point of time. But this would slow down the overall program execution if there is long running task, hence asynchronous task execution is desired in complex cases. To achieve asynchronous task execution, there are a few options introduced in JavaScript. setTimeout/setInterval Event Promise Async/Await setTimeout/setInterval is one of the first mechanisms introduced in JavaScript to simulate asynchronous operati...

   JAVASCRIPT,ASYNC,PROMISE,AWAIT     2019-11-09 08:21:56

  What are your list of must know programming proverbs?

It is in fact a good list of proverbs and here are some of the frequently seen programming proverbs. Keep It Simple Stupid Don’t Repeat Yourself A clever person solves a problem. A wise person avoids it – Einstein Silence is construed as approval  ( Picked from Kevin blog ) There is no smoke without fire Think first, Program later Never assume the computer assumes anything Don't trust anything from the user input Do you have any favorite of the programming proverbs? ...

   PROGRAMMING,TIPS     2011-07-01 07:00:56

  Top 20 programming languages in April 2011

Next picture shows the Top 20 programming languages in April 2011 from TIOBE. From the picture, we can find the most popular programming languages are the different representatives of programming language styles. And some of them are popular because the platforms which use this programming language is very popular.For example C#, because of Microsoft, this language is used in .Net platform. Many users are using this programming language.Also, Java, C and C+ are the top 3 languages in he world. T...

   TIOBE,Ranking,Programming language. C,C+     2011-04-05 14:20:03

  JavaScript finite state machine

Finite state machine is a very useful design model, it can be used to simulate many events in the world. In short, finite state machine has three features: Number of states is finite At any moment, one object can only be in one state In some condition, it will transfer from one state to another state In JavaScript, finite state machine can be applied in many places. For example, one menu element on a webpage. When the mouse hovers on the menu, the menu will show up, while the mouse moves away...

   JavaScript,Finite state machine,State     2013-09-02 11:00:57

  How to monitor user behavior in webpage

Sometimes there is a need for website owners to monitor user behavior on the site so that they can know what pages are mostly visited and which parts are more popular so that they can provide better service to their users. These behavior usually contain user clicks, user mouse over events etc. These data can be sent back to server when triggered with some meta data. In this post, we will cover a few ways to monitor user behavior on a web portal and send data back to backend sever. 1. Synchronous...

   HTML,BEACON API,PING,USER BEHAVIOR     2019-06-29 06:06:59

  How to send asynchronous requests in PHP

It’s easy to make asynchronous calls in PHP with just a little bit of HTTP header knowledge and some library code around PHP sockets. This technique is useful when posting requests to your own server for bits of logic you’d like to run in the background.  If you don’t control the endpoint, you might not be comfortable with some of the limitations, such as the inability to read anything from the response.  So, you couldn’t post data to a we...

   PHP,Asynchronous request,socket     2012-04-28 06:45:51

  The basics of Client/Server socket programming

  While Client/Server communication model is ubiquitous nowadays, most of them involve socket programming knowledge. In this post, I will introduce some rudimentary aspects of it: (1) Short/Long-lived TCP connection.Short-lived TCP connection refers to following pattern: Client creates a connection to server; send message, then close the connection. If Client wants to transmit information again, repeat the above steps. Because establishing and destroying TCP s...

       2017-09-26 19:43:10