Edd Mann Developer

Database Migrations with CodeIgniter

I first became aware of database migrations a few years ago when I was exploring the world of Rails. However, it has not been to recently, with a gentle nudge from SE-Radio (Episode 186) and a large web application build that they have re-entered my development lifecycle. As a result of current events I for one do not wish them to leave any time soon.

DNSMasq, your local development DNS

Setting up a single-user web development environment is easy. One-click (OS)AMP installers do all the work and internal domains are all stored in one easy to reach host file. However, expanding this to a multi-user development team, all of which needing access to the same resources, is a whole different beast. On-top of this, they may require access from multiple devices, some of which may not include a host file, such as a mobile phone.

IE6, IE7 & IE8, meet VMWare Fusion

Unfortunately as a web developer you will undoubtedly encounter the need to support one (or more) of the three browsers mentioned in this article’s title. It is a sad but true state we are in and making it as seamless as possible goes someway in taking the sting out of it.

Sphinx, up and running

Sphinx (SQL Phrase Index) is an open-source, full-text search engine, independent of any one data-store implementation. The origin of the data does not concern Sphinx, as interaction with the data-source is abstracted by the many drivers available. Currently built-in to the product are drivers for MySQL, PostgreSQL, ODBC-compliant databases and the ability to parse XML formatted streams (via pipes). It must be noted however, that each data record is required to have a single unique field ID.

Ten ways to reverse a string in JavaScript

In a recent job interview I was asked to write a simple C# function that would reverse a string and return the result. However, there was a catch, I was unable to use the provided string objects ‘reverse()’ function. I successfully created a function that did as requested (using a decrementing for-loop and concatenation), though I realised that using concatenation would result in a new string being created in memory upon each iteration - as strings are immutable objects. I solved this by using a StringBuilder to append each character to and returning the result. On the way home I began to think of the endless ways in which you could reverse a string in code (extremely sad I know).