Did you know: you can modify the URL as you see fit 🙃

For data binding in JavaScript, many would turn to tried and true frameworks such as knockout.js or angular.js. I'm by all means not against the use of these, but I love figuring out how to do things on my own. My logic is that by understanding how things work in their most basic form, using a framework will only make things easier when the need arises. I apply this concept to many things in life, such as baking or cooking without a recipe (how do certain ingredients affect the outcome), or fixing broken electronics (which part is responsible for what action). By understanding how things work, you can gain a deeper understanding than by just blindly following instructions.

Which brings me to my main point: how can we achieve data binding without relying on a framework? The Object.observe() method can be used to listen for changes to an object. According to MDN, this method calls your callback every time the object is modified. This may be extremely useful, but browser support is extremely limited for now, with only Chrome 36+ and Opera 23+ having this ability.

read on »

May 24, 2015 | 4 comments

Many people seem be annoyed at people who bring their laptops to coffee shops such as Starbucks. "What are they really doing there?" some may wonder. "Are they really working, or are they just browsing social media sites?" To some, it may seem weird to bring a laptop to Starbucks. After all, tablets were introduced as the device to have for content consumption. But for me, bringing a laptop to a coffee shop is more than just for browsing the web.

Often, I find myself wanting to find a place where I can just open my laptop and work on a project. Why not work at home? Don't get me wrong: working at home is great. I have dual monitors and a very comfortable mouse and keyboard, so productivity is through the roof. But sometimes there are distractions, such as wanting to play the piano for a bit. For me, working mobile means I need a power source for my laptop and some air conditioning (it's hot in Taipei). It's also nice to be able to have a snack of some sort when I want to. Taipei's public libraries would have been a great choice, but unfortunately eating or drinking is prohibited. My favorite choice is the Mr Brown coffee shop across from National Taipei University of Technology (Zhongxiao Xinsheng station).

read on »

May 18, 2015 | no comments
© 2019 Michael Cheng
made in Taiwan