24 May Data binding in plain JavaScript
For data binding in JavaScript, many would turn to tried and true frameworks such as [knockout.js](http://knockoutjs.com) or [angular.js](http://angularjs.org/). 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()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/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.
continue reading
18 May Laptops and cafes
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](https://www.google.com/maps/place/Mr.+Brown+Coffee/@25.041716,121.5349513,20z/data=!4m2!3m1!1s0x0000000000000000:0x4bb263acc4f6c677) across from National Taipei University of Technology (Zhongxiao Xinsheng station).
continue reading