I'll bend beneath my weight

I'll bend beneath my weight

Few songs express my love for software engineering as much as "The Place I Want To Be" by Badly Drawn Boy and Saint Saviour. They express my love and my passion for software engineering - for something that I just found or that just found me and I dropped everything I had in my life for it gladly and willingly - and followed it blindly.

Just a few points on async

JavaScript is a single threaded programming language. 

The execution of the code occurs in a single, sequential order. Therefore, only one set of instructions can be executed at a time. 

That's funny. 

It sounds a bit like me and my neurodiversity.

One call stack

"In a single-threaded language, there is only one call stack". What is a call stack?

"A data structure that keeps track of the sequence of function calls in a program."

"Each function call is added to the call stack, and when the function returns, it is removed from the call stack".

Promises

From my course: 

"A Promise is used to handle an asynchronous operation in JavaScript as they are objects that represent a value that may not be available yet but will be resolved eventually".

A Promise has three possible states:
  • Pending
  • Fulfilled
  • Rejected
Let's take a closer look:
  • Pending = awaiting resolution
  • Fulfilled = successful asynchronous operation
  • Rejected = unsuccessful asynchronous operation

.then

This is a method. It is called on a Promise object.

It takes two arguments:
  • A success callback
  • An error callback

When I get sad I stop being sad and I look at the offshore wind farms instead


And that's it really



Comments

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing