Skip to main content

20 posts tagged with "programming"

View All Tags

· 3 min read

I’ve recently started using QUnit for my JavaScript testing. It’s a unit testing framework for JavaScript. It’s quite an easy framework to learn and I strongly encourage everyone who is doing any decent JavaScript coding to use it or any one of the myriad frameworks out there.

One of the strange problems I faced with QUnit is a strange phenomenon where a custom written plugin fails the test on every alternate invocations of the test.

· 7 min read

As mentioned before in earlier posts, I’m involved in a Web application development project. Recently I had to do some testing on the Web application (although it’s barely beta ready, but that’s a different story). During the testing process, I’ve got to see for myself the implications of not incorporating scalability designs early on into the code.

This post will take a simplistic approach to look at why load times can be improved by consolidating CSS files. At the same time, I will also take a look at naming CSS selectors as the approach to consolidating CSS. By taking a consistent approach to naming CSS selectors and organising the selectors in a structured manner in CSS files, we can minimise the number of CSS files.

· 4 min read

Google Apps Provisioning API is a set of API that allows other programs to access stored on Google’s servers. This is done via the Atom Publishing Protocol and HTTP requests (what the industry terms general as a RESTful interface).

The set of data that Google exposes via the Provisioning API include the user accounts and groups and other related data.

Google has improved its groups mechanism not too long ago. With this came improvements to other Google properties such as Google Docs where sharing documents with groups is possible. Previously, this was not available because the original concept of a group in Google Apps is nothing more than an email list where emailing to the “group” allowed users in the “group” to receive the email as well. But this was all that version 1 of “groups” (technically known as an email list) could do.

· 2 min read

As any respectable JavaScript developer will know, JSON has become the de facto method of holding objects and passing arguments, even using it as a name-spacing mechanism.

Being the conscientious (and careless) programmer that I am, in my e-learning application that I’m developing at the moment, where I’m heavily using JSON, I made a conscious choice to always leave a comma at the end of the last member-value pair like so:

· 13 min read

Finally, I've started on the follow-up post on Zend Framework Unit Testing (link to previous post)! After a whooping four months. I've been really busy - perhaps with the wrong reason. Anyway, this post shall follow up on the previous post by continuing on the AllTests.php file that was created at the end of the last post.

Readers who are first time users of Zend Framework should find this and the last post helpful in getting your feet wet with unit testing with Zend Test. The focus of this post is on preparing the setup and teardown phases of the testing sequence.

· 5 min read

This post describes how to set up automated testing with Zend Test and PHPUnit. The latter is a unit testing package for PHP applications done in PHP. I had searched for posts on how to do this but there weren't any easy-to-understand or straightforward examples to follow, so I decided to write one myself. This post will thus be written in a way that newbies are able to get a test working straight away by following the examples in this article. After reviewing the length of the post, I decided to break this article into several smaller ones that are much easier to digest. It'll be easier for you to get to specific information with smaller articles rather than a large one as well.

I hope this post will help some newbie down the road. Bear in mind that I'm no expert on this - only enough to get it working (and maybe to screw up, which I hope doesn't happen.) So if I make any mistakes, please point them out and I will make amendments where necessary. If you have something to ask or simply want to share, please comment at the end of the post. Hope you find the following useful!