Currently browsing: Web Development

Best practice

If you did any development in AngularJS, I’m sure you know about the $watch function. On every digest cycle, Angular will evaluate an expression to see if its value changes. If it did, it will fire all the listeners on that particular watch. Of course, this can be very expensive as your app grows and […]

Continue reading →

Protractor taking screenshots

A very useful trick when using protractor with jasmine is the ability to take screenshots when one of your tests fail. Here is a very simple afterEach block that verifies if your test passed. If not, a screenshot of the browser is taken and saved. Very useful for figuring out what is going on with […]

Continue reading →

Protractor testing

I’ve been working a lot with protractor recently. And even though there are still some issues with phantomjs, it is still pretty awesome. It integrates seamlessly with Jasmine and Cucumber, so that’s a bonus. To start using protractor you can follow the official documentation here. One very cool feature I like is multiCapabilities. As E2E […]

Continue reading →

Lazy loading components in AngularJS

There is no need to load everything at first load for an AngularJS application. It only delays initialization, increases the web application’s size and hurts performance. It would be so much simpler if you could just load components when they are used and not sooner. (FYI, a component is one of AngularJS directives/filters/services and even […]

Continue reading →

How to get related posts in WordPress

Much too often, we see a ‘Related posts’ section after reading an article. However, there is no built-in widget/function to get these in WordPress. Many blogs implement their own way to get these or use a plugin to do it, most often finding posts from the same category and with the same tags. For those […]

Continue reading →