Boolean

Is PHP Agile?

A client recently asked if PHP was an Agile programming language, and during the (rather lengthy) explanation a few principles worth exploring were covered:

In the context of software development Agile is really no more than a set of principles and values. At a meeting in February 2001 people who were then developing software differently to traditional processes drew up a manifesto; they formalised practices favouring constant feedback and change, flat hierachy, and delivered early and often.

PHP is generally considered a lightweight language, – often it is used because it can get things done quicker than with other languages. A language is never agile because it does not generally define the processes used when developing with it. However it can have qualities that can make its development quicker; PHP is light, interpreted, and it is simple. Unfortunately these reasons have also attracted people unconcerned with best practices in order to ‘just get their sites up and running’

Agile doesnt mean doing the job quickly, – dont expect to finish the project earlier, but you will deliver earlier. A part of the system that is testable, usable, and something that adds value. From the feedback the team and customer will decide what will be delivered next. The iterations are closer together than other approaches and in order to deliver quickly you will only deliver what you need.

As far as web application development is concerned, being an interpreted, lightweight, embeddable, simple language, with fairly reasonable object oriented support, PHP is in a fairly unique position to fulfill the needs of agile development teams. The elements are available, but of course it is up to the enterprises to take the step and use what is there for setting up their own agile development environment.

Is PHP Agile? Read More »

Obfuscating email with PHP

This is a function to protect email addresses on your website from bots or spiders that harvest email addresses for spam purposes; it uses a substitution cipher generating a unique key for every page load.
PHP encrypts your email address and generates javascript to decrypt it because most bots and spiders can’t execute javascript. A visitor of your web page will not notice this as long as they have javascript enabled, otherwise they will see “[javascript protected email address]”

As the script contains quite a lot of special characters, a downloadable version is available here

Usage
echo hide_email(‘test@test.com’);

Further reading
Ross Killen’s implementation here
Methods to hide email addresses in page source here

Obfuscating email with PHP Read More »

WordPress Setup

Wordpress Logo

A great advantage of WordPress being open source is that it has a large community of talented developers creating thousands of plugins to enhance the default funtionality.

Of course these plugins vary drastically in purpose and quality so here is a short list installed for almost every Boolean client; – you should seriously consider adding them to your own.

Askimet
To use this feature you will need a WordPress API key
If you have comments enabled on your blog then Akismet is absolutely essential as a spam filter. Once configured you will be able to view a list of all spam received in order to confirm that the plugin didn’t catch a real comment. On the rare occasion you can mark it as ‘Not Spam’ and then select ‘Delete All’ in order to flush the remaing spam comments.

You can enter your API key under the Plugins tab, and manage spam under the Comments tab. (Askimet is installed by default, so take a few minutes to configure it correctly)

Google Analytics
Google Analytics is a popular statistical analysis package available to track a comprehensive amount of visitor information. The number of visitors to your site, how they found the site, and even what web browser they are using is all available for comparision.

Analyzing the trends of your visitors gives a picture of the most popular content on your site, the terms people are using to find you, and which pages people are linking to on your site so that you can provide more helpful content. It can also give you a better idea of how you can update your site for better search engine optimization.

You can add the tracking code near the end of your footer.php file, just above the </body> tag.

Permalinks
This is one of the first items that should be setup in WordPress giving your posts and pages a ‘pretty’ url eg. sitename.com/category/post-name/ as opposed to sitename.com/p=?1234 This is undoubtably easier on the eyes but more importantly is more SEO friendly since it can incorporate keywords in the URL.

This is a quick and easy setting to change; occasionally however the .htaccess file requires manual editing for this to work properly.

You can update your Permalink structure under the Settings tab in the Admin area.

Permalink Redirect
Once permalinks have been set up, it makes strong sense to install the Permalink Redirect plugin. This plugin extends the basic Permalink settings by ensuring that there are no excess characters in the URL. In the event excess items are present Permalink Redirect sends users to the correct URL by stripping the unnecessary data. Simple.

This plugin requires installation but there is no configuration required.

WP DB Backup
Absolutely essential for WordPress installations is the WP DB Backup plugin which backs up your entire MySQL database. This plugin provides multiple options: manual backup to your own computer or server, or sending it via email.

Best practice is to set the plugin to run automatically, letting you backup your database periodically on a schedule suited to your own requirements.

Backup options are configurable under the Tools tab.
Remember that this just backs up the Database tables and you will occasionally want to download site files files (PHP files, images, etc.) via FTP (or another plugin that I will cover later)

WordPress Setup Read More »

Mono Develop


Version 2.2 just released!

MonoDevelop is an IDE primarily designed for C# and other .NET languages. MonoDevelop enables developers to quickly write desktop and ASP.NET Web applications on Linux, Windows and Mac OSX. MonoDevelop makes it easy for developers to port .NET applications created with Visual Studio to Linux and to maintain a single code base for all platforms.

MonoDevelop is a free GNOME IDE primarily designed for C# and other .NET languages, although open to any kind of language. However, MonoDevelop hopes to be more than just an IDE: it intends to be an extensible platform upon which any kind of development tool can be built.

Get it here

Mono Develop Read More »

Pencil prototyping tool

Came across an interesting project today: Pencil. Pencil is a GUI prototyping and simple sketching plugin for Firefox (released under the GPL.) According to the website: The Pencil Project’s unique mission is to build a free and opensource tool for making diagrams and GUI prototyping that everyone can use.

Features include:

  • Built-in stencils for diagraming and prototyping
  • Multi-page documents with background page
  • On-screen text editing with rich-text support
  • PNG rasterizing
  • Undo/redo support
  • User-defined stencils
  • Standard drawing operations: alignment, z-ordering, scaling, rotation
  • Cross-platform

As a free option it seems to compete quite well with the likes of Visio, Omnigraffle, Axure, iRise etc, – especially considering its cost. Whilst it lacks some of the more advanced features of its competitors it seems to have great potential, even at version 1.1.

Have a look at it here

Pencil prototyping tool Read More »

Windows XP Safely Remove Hardware trick

WindowsXP

For some reason the Windows XP taskbar icon for safely removing USB flash drives and hard drives disappears from XP systems from time to time. Running this command (or creating a shortcut to execute it) can bring up the necessary window to safely remove the disk.

%SystemRoot%\System32\RUNDLL32.EXE shell32.dll,Control_RunDLL hotplug.dll

Obviously Windows XP isnt the Boolean operating system of choice (usually OSX 10.5, or Windows7) but sometimes the XP test environment is utilised under VMWare Fusion, and this solves an annoying problem.

Windows XP Safely Remove Hardware trick Read More »