With WordPress installations on the rise, security threats are a common concern for users. Below is a small collection of WordPress plugins that I found adequate for use on most WordPress installations to keep security in check. As always security is not 100% achievable, but the following plugins will help you find any loopholes in your site and help you monitor for any security breaches.

With the ever increasing presence of the Web, more people are interested in learning the language of the Web. Designers, artists, and newbie’s unfamiliar with Web development are eager to learn to code so that they can understand the Web better and create something original.

Learning through books can take some time and can be a major hindrance for people who find the learn-by-the-book method dry an uninspiring. In a bid to make learning the language of the Web more interesting, some designers and developers have come together and created some interesting and useful web projects.

My new article describes how to backup your WordPress database to the Amazon S3 cloud infrastructure using a custom plugin. Along with a small description of S3, the article proceeds to build a small plugin to upload your database to Amazon S3. Read the complete article at Smashing Magazine.

The article describes a Lullian poetry generator in PHP, the idea for which was inspired from Clifford Rickover’s wonderful and eclectic, The Loom of God. The idea is attributed to Ramon Lull, a Spanish theologian, who lived around the 13th century. Lull believed that every branch of knowledge was governed by simple basic principles, and that we could explore all knowledge by evaluating all possible combinations of those principles.

The design for the Lullian poetry sprouts from this premise. The Lullian generator works by randomly selecting words and phrases which are then placed in a pre-defined ‘Semantic Schema’. The philosophical idea being that randomly chosen words can be used to stimulate the mind in producing startling fictional plots and verbal imagery that you might not otherwise consider.

Take the following example short poems generated by the program. Although the resulting poems are nothing like the ones you would ordinarily encounter, the real facet of the poems is their whimsical nature of word combinations, sometimes ridiculously so.

Compiler design is a complex endeavor, but also one of the most satisfying projects you can undertake. Lately I’ve been interested in compiler and parser design; my interest piqued by Debasish Ghosh’s wonderful book, DSLs in Action. Web development in general provides a far less opportunity to work in the domain of compiler or interpreter design. So the idea of building DSL’s was the perfect excuse for learning parser design.

To design a good DSL it is necessary to have some compiler design knowledge under your belt. The classic Dragon book is usually the first choice of reference to pickup on compiler design, but it is too theory oriented, and what I needed was something to get me started with writing code quickly, rather than mull over automata theory, syntax trees and other compiler theory concepts. My first choice was Ronald Maks Writing Compilers and Interpreters. Although it is an incredible book, it is rather elaborate in its presentation. What I instead wanted was a cookbook style presentation, using which I could quickly design some working code, and only later refer to the above books for more in-depth understanding.

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.

It is very rare that I have seen some code that employs the PHP XOR logical operator. It is not the case that it is not required or programmers are unfamiliar with it; it probably seems that most programmers have become comfortable with using the more common ‘&&’ and ‘||’ operators to construct all logical comparisons; the XOR operator relegated to the subconscious black hole.

A couple of weeks back I had to write a solution for a client to track the referrer search engine from where the user came to his sites contact page, without using Google Analytics. If a user was to fill the contact form on the website, the referring search engine name and the keyword for which it was refereed was to be emailed along with the contact information. The following is a solution for the same.

To get the referrer information we need to use the $_SERVER['HTTP_REFERER'] variable and store it in a session so that it is not overwritten as the user browses the site before he submits the contact information. If the users comes to the website from a search engine he could land on any page, so we need to add some code to capture the referrer url on each page of the site. We only need to save the referrer if the referrer is from outside the current domain.

Reading is an active process. Weather you are reading a web page, a book or any other media, the information tends to generate ideas in the mind of the reader. An active reader asks questions, considers alternatives, questions assumptions and analyses the argument of the author. An active reader doesn’t passively store up information, but uses the author’s arguments to create a framework to further up his ideas and understanding.