16-Grid Drag and Drop

Implement a 16-grid page as shown below, where each numbered box can be dragged and swapped with another. The horizontal and vertical header bars ABC and XYZ allow pairwise swapping of positions, causing entire columns (or rows) to swap together.

Read more

Notes on JavaScript: The Definitive Guide

  1. When the JavaScript interpreter starts, it creates a new global object and gives it a set of defined initial properties.
  2. Whenever a property of a string literal is referenced, the string value is converted to an object by calling new String(), and once the reference ends, this temporary object is destroyed.
  3. The “==” operator treats primitive values and their wrapper objects as equal, while “===” does not.
  4. Primitive values are immutable; object references are mutable.
  5. undefined converted to number:

    NaN, while null converted to number: 0, empty string converts to 0 and false.

Read more

Don't Call Me a Programmer, I'm a Front-End Engineer

I first discovered front-end development toward the end of last semester. At the time, I was busy running experiments, writing papers, and submitting articles, so I didn’t dive deep into it. I thought it was quite fun, so I eagerly went and borrowed a copy of HTML and CSS: A Beginner’s Guide. I was so confused back then. At first, I had borrowed Thinking in Java and Android 4.X: From Beginner to Expert, planning to brush up on Java and then try writing some Android apps before graduating into Android development – but I never followed through. The beginner’s guide was very basic and easy to read, and my interest gradually grew.

Read more