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, I have only recently used them again, prompted by a gentle nudge from SE-Radio (Episode 186) and a large web application build which re-introduced them into my development lifecycle. Due to current events, I, for one, do not wish to see them go 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 store internal domains in an easily accessible host file. However, expanding this to a multi-user development team, all of whom need access to the same resources, is a completely different challenge. Moreover, they may require access from multiple devices, some of which do not have a host file, such as mobile phones.

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 some way 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 object’s 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 and then 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).