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

OPA : new generation of web development platform

Opa is a new generation of web development platform – it is a new programming language, a new web server, a new database and a new distributed execution engine, all of them tightly integrated to provide a great experience for web developers.

OPA is concise, simple and readable, it is also provides concurrent, dynamically distributed, and extremely secure programming model. Opa is designed to make web development fun, secure and right. Opa is a complete language and not just a framework, the unified approach of Opa delivers a new level of developing experience with unmatched ease of use and security.
(more…)

Read More

How not to create a Random string

It is surprising to see how after all the code floating around people still find it hard to create random numbers. In a recent piece of code I encountered, the following was used to generate a string of random numbers. The code was written to provide a random string to be passed to a email verifier system – the type wherein a new user when he subscribes to a website needs to verify his email by clicking on a provided link.
(more…)

Read More

Measuring user effectiveness with the Apdex metric

Creating a business application is one thing, measuring user-satisfaction another. Most software houses in recent years have woken up to the importance of user-facing metrics, the knowledge that user satisfaction regarding software application performance is an integral part of business success. But the problem in application performance measurement is that there are too many metrics and measurements which in the end adds nothing of real value to the performance reports. What most people need is a metric that is easy to calculate and interpret. Apdex is one such metric.
(more…)

Read More

Importance of logging in web development

Software development is an exercise in managing complexity, and the more tools and methods we have at our disposal the easier it gets. One of my favorites is logging – recording important code execution points that I think are important, especially during debugging. Whenever developing functions or class methods I make it a point to add logging capabilities to the same. Logging helps one to quickly tracks bugs and evaluate the health of the system under development.
(more…)

Read More

For whom do we develop software!

badaman_hands_on_clayInterface design is hard. Which is why most programmers turn a blind eye to it. During collaborative development I frequently encounter fellow programmers remark something to the following effect: ‘…do not worry, the users are not idiots, they will understand for what these buttons have been provided, no need to provide tool-tips or any help, lets get these code working and show it to the client.’
Interface design or rather usability design is usually left as an after thought; a colorful facade that you stick on to your backend code.

The following two videos provide a stark reminder, that for most of the time these are the people we develop software for.
(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