6 visual regression testing tools for UI design

Responsive layouts are very difficult to test. It is more tedious to design and test all of a project’s screen elements at every breakpoint than it is to code them in the first place. Visual regression allows you to make visual comparisons between the baseline versions of the site and the version in development. The complete process is nothing but taking the screenshot of the original design and comparing it with the new, looking for pixel differences. Visual regression comes in various flavors, using a variety of technologies and workflows as mentioned below. Pick any one to suit your purpose.
(more…)

Read More

Automatically create PHP classes from MySQL

Creating a database driven web application involves commonly used paradigms for data modification, which we commonly refer to as CRUD. Frameworks provides nice ORM wrappers to help the programmer. But for small projects frameworks can be an overkill. Still the programmer needs to design the basic database CRUD functionality, which can be quite tedious and repetitive. This is where auto database class generators can be helpful. If you have your database schema ready, you can automatically create the respective class wrappers for the tables.
(more…)

Read More

Adminer – a fast MySQL administration tool

adminer1Before you go ahead and think that you don’t need yet another MySQL management tool, I think you should at least take a quick look at this one. Adminer is a single file (yes! everything in a single php file) tool to manage all your MySQL related tasks. All you have to do is upload the adminer.php file to your server and voila! you are ready to go. No messing around with huge software’s to manage your database. Weighing only 170KB, its easy to upload to any server. A demo of the same is included on the Adminer site.
(more…)

Read More

Detecting duplicate code in PHP files

Duplicated code in projects is a frequent thing and also the one ripe for factoring out in a new class or function. Cut/Paste coding is a common development practice among programmers, a lot of which can lead to code size increase and maintenance nightmares. PHPCPD (php copy paste detector) is a PEAR tool that makes it easier to detect duplicate code in php projects. Below is a short tutorial on the PHPCPD package.
(more…)

Read More

Checking coding standards with PHP_Codesniffer

One of the important factors in developing a successful software product is the application of coding standards. And by successful I mean a product that is easy to develop, modify and maintain. Every developer likes to code in a particular style: in the way he declares variables or function blocks, the number of indentation spaces, commenting style etc. Giving every developer in a team complete freedom to use whatever style he likes will very likely result in a code that is hard to understand, modify and maintain. Even though every coding standard has its good points and bad; the important thing is to try to adhere to a particular one.
(more…)

Read More

Benchmarking PHP code

Code tuning is an essential part of programming. But most programmers would rather try to complete the project in hand then spend time optimizing a piece of code. A well tuned and optimized code block can speedup your application by an order of magnitude or even more.

Many people confuse profiling with benchmarking. A profiler is a analysis tool that lets you measure the performance of code at runtime. Profiling an application lets you find bottlenecks in your application code. You can find which part of your code is taking most of the time, you can than optimize that part of code. For example if there are 4 functions in your application, profiling may report the following distribution:
(more…)

Read More