Currently browsing author

Page 2

CSS Animations – @keyframes and the animation property

There are generally two types of animations in CSS. The easiest one is the transition property. This post illustrates a more advanced method that is a bit more complex – @keyframes. For the browser performance, it’s best to only ever animate two different properties. One is opacity, which is the one that we’re using here, and the other one is the transform property. That’s what the browsers are optimized for, for these two properties. Continue reading →

JavaScript – Scope Chain and Scoping

Scope chain is the second step in the execution context creation phase. What is Scoping? Scoping answers the question “where can we access a certain variable or function?” In JavaScript, each new function creates a scope: the space/environment, in which the variables that it defines are accessible. In some programming languages, scope can also be created by if/for/while blocks, but not in JavaScript. Continue reading →

How a Marketing Student Got Into Programming.

“Oh wow, so.. you are currently a marketing student, then why… why did you want to learn programming? ” Unsurprisingly, the question I’ve received the most, no matter offline or online. And yes, I’m an undergraduate marketing student at the University of Southampton. But… Yeah…. why not? Who owns the right to decide and influence what you want to pursue? Programming is fun, attractive, addictive yet complicated, challenging and frustrating. Continue reading →

JavaScript – Execution Contexts in Detail: Creation, Execution Phases and Hoisting

As mentioned in the previous note, we can associate an execution context with an object: execution context object. This object has three properties: (Recap: properties are variables stored in objects) Variable Object(VO): a special object contains  function arguments/ parameters, inner variable, and function declarations. Scope chain: contains the current variable object as well as the variable objects of all its parents. Continue reading →

Laravel Collective : Form Components – Maybe You Should Give It A Try

  If the forms in your application are quite simple, identical, and  do not require many customizable fields, then using LaravelCollective for forms creation can be fairly beneficial, as it reduces code writing and allows us to reuse the form template instead of hard coding one every time. The form builder provided by Laravel Collective actually makes building forms easier and more manageable. Continue reading →

JavaScript – Execution Contexts and the Execution Stack

  Execution Contexts All JavaScript code needs to run in an environment, and these environments are called execution contexts. We can think of execution contexts as a box, a container, or a wrapper which stores variables and in which a piece of our code is evaluated and executed. The default execution context is always the global context (Global Execution Context). Continue reading →

JavaScript – Execution Contexts in Detail: Creation, Execution Phases and Hoisting

As mentioned in the previous note, we can associate an execution context with an object: execution context object. This object has three properties: (Recap: properties are variables stored in objects) Variable Object(VO):  also known as activation object that is composed of all the variables, function declarations, and arguments defined inside the execution context. Scope chain: contains the current variable object as well as the variable objects of all its parents. “This” variable. Continue reading →

How JavaScript Works Behind the Scenes

JavaScript is mostly hosted in some environment, and that is most typically a browser, such as Google Chrome, Firefox, Safari etc. This is where JavaScript runs. There may also be another host such as the node.js web server, or even some applications that accept JavaScript input. However, here we’ll just focus on browsers. When we write JavaScript code and actually want to run it, there is a lot of stuff happen behind the scenes. Continue reading →

JavaScript – Loops & Iteration

Besides the if/else statement, there are more control structures. So here we have, Loops. Loops are an very important aspects to any programming language. If you want to solve a very repetitive task, you won’t want to write the same function multiple times. So basically, we can automate repetitive task using loops. For loop console.log(1); console.log(2); console.log(3); console.log(4); console.log(5); console.log(6); ==> we can transform this into a for loop. Continue reading →