Source Code Signatures in PHP

This post is based on Ward Cunningham’s Signature Survey: A Method for Browsing Unfamiliar Code article. Ward suggests that when studying new and unfamiliar source codes, it is vital that a programmer get a intuitive sense of the code structure under consideration. One method he suggests is that of summarizing on a single line select punctuation characters from each source file. He calls this the file’s “signature”. This will help the developer gauge the complexity of the code base.

So for example, if we only consider using braces ‘{}’, and semicolon ‘;’ – one of the common punctuation elements in a PHP program, a programmer can get a feel for the structure of a source file. Usually braces delimit blocks and functions in PHP, and many other languages, so this can give a programmer a sense of the length of code blocks or function sizes.
(more…)

Read More

Creating win/win projects using Project Value Analysis

From a client’s perspective, the most important criteria when developing any new software is that it adds some ‘value’ to his company. Every software application has some financial and some intangible value attached with it. Without it there would be no reason for a client to invest in developing new software or for that matter, upgrading an existing one. The client has some financial goals in his mind when he proposes to develop some software. He plans to make some profit (financial or otherwise) from the development of the software. Whether the financial gains are immediate or peripheral is a different matter.
(more…)

Read More

Where did that bug come from?

This is the second time this week that I encountered a annoying bug, introduced just by a small change in the code. Just when you think you can get away with minor changes without testing, you are in for a surprise.

The most common sense thing you can do is to test your code even for small changes; whether you are testing it yourself or sending it to the testing team. Seems simple, but how many times have you really done that. Its not that we are stupid, rather software was never so simple. Maybe we are careless sometimes. The moral is plain – treat even small changes important, and move it through a test before committing it to a version control.
(more…)

Read More

Software Peter Principle

Having to scrap a project after working on it for more than a year is not really an interesting way to up your morale. But it is one the most common things to occur in software development.

To take a real world example; A development company I know has been developing a shopping cart for the last 14 months ( beats me why anyone has to develop a shopping cart when so many free and excellent are already available ). But it is still nowhere near production ready. There is always something left to be added or cleaned. During the development period more than half a dozen programmers have worked on the project and left, producing a convoluted piece of software, which every new member dreads to touch in fear of breaking something somewhere. Salvaging the project is getting harder by the day.
(more…)

Read More

Why clients want software developed cheap.

railsA couple of weeks back I was asked by a client to quote for a 25 page ecommerce website. After looking at his requirements I quoted him $450, which is quite low by any standards. The client called me with a surprised tone in his voice and told me that in that amount he would be able to buy a new computer and he was willing to pay me not more than $200 for the same. This is not an isolated case, but one from a dozen or so client interactions. I don’t want to imply that the clients are cheap; all of the clients I have dealt with are very good business people. Its just that they don’t know the value of software; and one of the main reasons for that is piracy.
(more…)

Read More

Which is the most popular version of PHP today

The graphic below displays the market share of each PHP version as on march 2008. The blue graph represents the sum of all preceding versions.

PHP 5.2.5 now is the most popular version of PHP followed closely by PHP 4.4.8 and 4.4.7. This information can be helpful if you are planning on creating an Open source project or are thinking of moving past the version 4 mark in your professional career but are hesitant regarding the version 5 support on servers. (more…)

Read More

6 books to master PHP

PHP is a wonderful dynamic language, and the addition of Unicode support, namespaces in the upcoming version 6 will make it even better.
If you are new to PHP or are thinking of moving to PHP form other language then the following list of books will provide you with the required knowledge to become a seasoned PHP programmer. Of course, the list is subjective and you may have a different list of books in mind. (more…)

Read More