Skip to content

Sifar 0.2.0 released

I have rewritten Sifar, a gem that validates and generates strong passwords. The last version was based on one of my old PHP libraries, and it felt clumsy when simply ported to ruby.

Sifar gives you a lot of control over the parameters that make a password weak or strong. You can check for passwords that sound or spell similar to a given word (like user name), apart from the usual checks for length, dictionary words, etc.



Posted in Ruby.

Tagged with , , .

Application specific Zend_Tool providers in Zend Framework

Currently the only way for Zend_Tool to pick up your custom providers is to add the provider directory to the php include path. This is especially problematic if you have multiple applications in one server.

One workaround I use is to create a script wrapping in [APP_ROOT]/script:






`which zf` $@

If you have integrated the Zend library in your application, you can add the zf scripts in the same folder as the script. The last line then becomes:

$(pwd)/script/ $@

Now you can use script/zfc instead of zf and all of your custom providers should get loaded correctly.

Posted in PHP, Zend Framework.

Tagged with , .

Active Merchant CCAvenue integration

CCAvenue is an Indian payment gateway; they claim to be the biggest in South Asia. Last week I was looking for an Active Merchant plugin to integrate CCAvenue in a Rails application, but apparently none has been made public so far. So here it is.

EDIT: Documentation is available here.



Posted in Rails.

Tagged with , , , , , , .

Latest rubygems on Ubuntu

At NDTV, we tend to stick to LTS releases of Ubuntu in our servers. Due to the update restrictions, we usually end up building rubygems from source as the default package is outdated. I don’t like this solution as it messes up package dependencies. Turns out there is a PPA for rubygems that seems to be more frequently updated.

On releases older than 9.10, you have add the following lines to your sources.list

deb jaunty main

deb-src jaunty main

Replace jaunty with your Ubuntu release name

You will have to import the repository key as well

sudo apt-key adv –keyserver –recv-keys 81C0BE11

On 9.10 and newer, adding the repository is as simple as:

sudo add-apt-repository ppa:ubuntu-on-rails/ppa

At this point, you can install/update rubygems like before

sudo aptitude update

sudo aptitude install rubygems

UPDATE: It seems ubuntu-on-rails does not contain rubygems 1.4+ yet. There is an alternative at ppa:voronov84/andreyv, but it also contains other updates for ruby, etc – so be careful while upgrading packages en masse.

Posted in Rails, Technology, Ubuntu.

Tagged with , , , , .

India soon to be the biggest source of PHP developers?

From Manuel Lemos of PHPClasses:

The number of Indian PHP developers has been growing at a large pace in the last few years, when compared to other countries. A few years ago, India was just one of the top ten countries with more PHP developers. Now India is number 2 and is almost surpassing United States, which is still number 1.

While it is difficult to take such broad conclusions seriously based on member statistics of a single community, PHPClasses does have a large user base and can arguably be considered representative. Any article tagged India and software these days attract the usual crap about how Indian developers are the worst and how everybody who outsources to India never does it again. So I was surprised when some of the usually ‘silent’ majority of the client base who continue outsourcing development to India came out to defend their decision.

I did come away with a very interesting statistic; Indian developers have won most awards this year for their contribution against sizable competition. Most Indian developers I meet have difficulty understanding the concept of giving back to the community, so it’s always refreshing to see a number of people doing exactly that.

Posted in PHP.

Tagged with , , , .

MySQL sale: Implications for LAMP

Very few would relate the Sun MySQL deal with the recent final release of PHP4. With the ‘M’ of LAMP under the control of a traditional rival and death of the technology that almost single handedly popularized the LAMP stack, what does the future of the PHP and LAMP in general look like?

PHP is different now from the time when I started working with it. It was almost impossible to sell PHP to the so called ‘enterprise’. In sharp contrast, recently I was in a meeting with a major software services company who has big teams for Java and .Net but was desperate for a partner who would help them build PHP capabilities.

Companies like Zend deserve major credit for this shift. Over the last few years they have been trying to be more acceptable to the enterprise market. The results are apparent; Windows/IIS is trying to play nice with PHP, IBM/Oracle has made significant contributions to improve PHP’s integration with their products. No wonder, Zend increasingly looks like another prime candidate for acquisition by one of the big boys.

Perhaps this move was necessary to ensure the long term survival of PHP. The ‘P’ of LAMP no longer means only PHP; it has grown to encompass technologies like Python and Ruby. Frameworks like Rails have a low enough entry barrier for the bulk of PHP developers to consider them as alternatives. PHP benefited a lot from its early adoption by shared hosting providers. Now, hosts offer other technologies as well and VPS hosting has become affordable enough to be an alternative.

What about MySQL and Sun? For MySQL this deal is hard to top, they finally got the global sales, support and delivery potential to compete with the likes of Oracle and SQL Server. For Sun, this is great for multiple reasons. It has been steadily losing new developers and mindshare to LAMP technologies. This acquisition, among other developments allows them to fuzzy the distinction a bit … sounds similar to what Microsoft is trying to do with Linux, isn’t it? It does not hurt that they finally have a strong database offering. I suspect Sun will shortly develop an alternative to InnoDB as well.

Perhaps technologies like JRuby and Groovy point towards the future, where scripting languages and frameworks exist inside the Java ecosystem rather than with an alternative stack. How much these developments would affect an internet increasingly accessed via devices and rich internet applications, remains to be seen.

Posted in Technology.

Tagged with , , , .

WordPress or Serendipity ?

Recently when I moved this domain away from TYPO3, I wanted to use it for a blog. I thought I had already decided on the engine to use, but various factors left me mulling for weeks on the final decision.

Until a few months ago, I had to maintain a multi user blogging system based on Serendipity. I actually wrote a one click installer for this purpose, but that’s another story. Though I was never a user of the software, I was impressed with the code quality and did not look much beyond Serendipity at the beginning. However, I decided to install WordPress as well for a comparison. Though there are comparisons available, I found that all of them were written from very different perspectives and did not address my needs from the software. Continued…

Posted in Technology.

Tagged with , , , .