While I haven't been paid to write computer programs since 1993, I've always found that maintaining a hobby interest in coding has offered great benefits when dealing with development issues and especially when debunking IT suppliers' FUD and nonsense. So here's a small hobby project that ticked a number of interesting boxes in 2008 - open source, PHP, web services, AJAX and mashups.
Since I started building my own web sites - for recreational rather than business purposes - about 20 years ago I've had a fascination with who visits my sites and how they find their way there. Since Google Analytics came along it's been easy for webmasters to track this, but one thing that's lacking from an otherwise impressive package is the ability to publish visitor information back to the website itself.
When establishing Cogitant in 2008, I built this quick and simple website with Joomla. Joomla is a free, open-source PHP-based content management system using the equally free mySQL database. Like many open-source frameworks it is designed to be extensible via user-written modules. A great many have been written and shared - some under free-to-use open-source licenses like GPL, others under commercial licenses.
Another great advantage of open source software is that as a developer you can re-use and extend existing functionality. My starting point for building a "where are site visitors located" add-on was the built-in Joomla module whosonline which displays how many users are logged on. This provided the structure for my new Joomla module along with working example of how to access the database, display results etc.
The solution has been built as Joomla modules. One uses a web service (geoplugin.com) with a new visitor's IP subnet address to determine their approximate location and add this to the site database. IP-based geolocation is approximate and unreliable, but fits this purpose quite well. Browsers now generally support accurate geolocation using device information (e.g. GPS if available) but these features quite rightly ask your permission before disclosing your location, so not really useful here. And as the purpose of collecting and holding this data is just to understand broad visitor demographics rather than individual behaviours, it's better to only record approximate location from a data privacy standpoint.
The second module reads locations from the database and uses the Google Maps API to plot approximate visitor locations on a map. Click on the Recent Visitors link on the main menu to see the results. If you are puzzled by the regular visits from distant lands including China, Turkey and Russia, this is where many script-based attacks on websites originate from, looking for a weakness that would allow the attacker to take control of the site. Safe to say that every day someone is trying to break into any internet-connected device you have, so keep those patch levels up to date!
In 2008 there were already around 1.2 million limited companies registered in the UK and the dot-com era promise of internet riches had led to the registration of more than 7 million .uk domain names. Finding an name that was available for use both as a company name and a domain name, that was reasonably short and memorable, and that was related in some way to the activity of the new company proved to be quite a challenge. I came across cogitant during a trawl of Latin words with somewhat relevant meanings - it's the present participle of cogitare, to think - and appears in the OED as a rare English word of the same meaning i.e. "thinking", and also "that thinks".
How do you pronounce it?
For what it's worth, I say it like cogitate rather than like cog. For the linguists among you that's kɒʤɪʈəŋʈ. Latin scholars differ in their opinions about how the Romans might have pronounced it, so as long as you spell it correctly, pronounce it how you like .