Using NPM Scripts Correctly

A little bit of background info on package.json

Nowadays, most frontend projects and JavaScript projects use NPM (Node Package Manager) to manage dependencies. This is often done through the file package.json. This file, as the name extension suggests, contains a JSON object about the project. The follow snippet shows a very simple example of what a package.json file might contain, for more information about what each section means browsenpm will offer a much better explanation. If you have not seen a package.json file before, it might be best if you do some quick reading before continuing reading.

Read More

Easy Ways to Mange Email Inbox

Keep a clean Inbox is not an easy task for even the most organised people because there are simply too many spams. There is only so many filters you can set up before it gets really annoying and tedious. Here are just some simple, but useful ways to keep a clean Email Inbox.

Read More

Fixed Windows 10 Cannot Shutdown Issue

I normally bounce around between Linux, Mac OS and Windows for different tasks. I mainly use Windows for gaming or consuming media, so there isn’t much software installed on my machine. Not too sure when it started, but I have been having this weird issue where Windows doesn’t turn off my machine when I click on Shutdown. It would just Log me out rather than do a full shutdown. What’s even weirder is that Restart works just fine. I was doing a bit of searching around, I managed to resolve it. But I didn’t find any of the instructions that was easy to follow. Hence why I’m creating this post.

Read More

Stopping Ng-Click From Being Fired in Angular (1.x) Directive

In the project I’m working on right now, we needed a way to disable some input fields based on a condition which is pretty common. I ended up writing a directive to reduce the amount of duplicated code and keeping it clean and simple. However, there was one problem, we didn’t use the default checkboxes. Instead, we ended up using the icons from fonts-awesome library (Checked Icon, Unchecked Icon).

Read More

Use Brain or Password Manager

I struggled with this question for a long time. It is contradictory in a way that using a password manager should make everything more secure, but using a master password introduces a single point of failure. So is it more or less secure? Given the number of accounts I have created over the years, I would say going with a password manager is the better choice and stop repeating same passwords on different sites. This way hackers can only hack into one of your accounts if they hack into a site.

Read More

What I Love and Hate About JavaScript

JavaScript is a dynamic language, and that gives it a lot of edge in my opinion. It is one of the most used programming language right now. So definitely worth learning even if people do not want to head towards this direction in their careers.

Read More

Learning React and Flux - Introduction & Comparison With AngularJS 1.x

Recently, the community of React has been exploding. AngularJS 2.0 has not convinced me that it is worth investing time in. So I have decided to start learning React with Flux Architecture. This blog is the summary of my recent learning of React and Flux. I am just writing about my thinking/learning process, so apologies if the structure is not very easy to understand.

Read More

Hidden Skills of a Good Developer

Programming is a skill like any other, it is easy to get something done but difficult to do it well. Everyone can learn to code, there are so many resources teaching anyone to write their mobile app or website. So what defines a good developer from the crowed? Here’s what I believe.

Read More

How to Implement Correct REST API & RESTful Web Services?

Introduction

It is always easy to assume that you’ve understood something before someone showed you the correct solution. When I tried to follow someone’s tutorial on how to create REST APIs using node.js and express.js, I found out I didn’t get REST APIs completely right. I have also found out a few more things on the side, which I will also be sharing in this blog.

Read More

The Trend of 'Clever' Software

There are plenty of companies researching into Artificial Intelligence (AI) and Machine Learning. Products such as Google Now, Siri and Cortana are all examples of combinations these. Apart from these big players, the trend is moving toward “vague” software usages, where the user specify something without being very exact. From these non-deterministic instructions, the software will be able to understand and execute and product the correct results. The following are just two examples I came across recently, both are pretty cool.

Read More