Losing Contact
The recent upsurge in retailers offering contactless payment is set to rise further if figures from Visa are to be believed. Their predictions suggest that the number of contactless terminals will rise to 150,000 in the UK during 2012. That is a rise of 50%.
Busy retailers like McDonalds are increasing the number of stores with contactless payment facilities in a bid to reduce queuing times and with giants such as Tesco, WH Smith and Waitrose set to follow suit, will payment the ‘traditional’ way become a thing of the past?
London 2012 is set to be the first Olympic Games run on contactless payment, and you will soon be able to pay for your bus fare with a wave of your hand.
Barclaycard’s latest offering on the contactless payment front is ‘PayTag’, a stick-on credit card which attaches to any item such as your phone or wallet and can then be waved at a terminal to complete payment. In an effort to speed up the drudgery of queues, payment can be made without PIN verification in cases of transactions under £15.. It comes with 100% fraud protection guarantee in a bid to calm fraud fears.
So, could this be the future? How do you feel about it? Are you sold? Are you left feeling cold?
I’ve just got used to chip and PIN so I’m keeping contact, for now at least.
WebDev Frameworks – CodeIgniter – Part 3: Authentication
One area lacking from the CodeIgniter feature set is user authentication. This is a feature fundamental to a huge number of standard web applications, be they globe-spanning social networks or a shop front for a local business. Indeed, the majority of sites that allow any kind of user experience customisation will at some point require assigning users a username and password to allow these features to be utilised. Many sites, both global and local, now use social media connections to provide authentication which enable users to interact with the application without the need for creating a new account to maintain. This approach has the added benefit (or detrimental consequence, depending on your world view) of allowing an application to potentially interact with more of the user’s data already available through their social networking activities, creating a more personal experience. Believe it or not, however, not everyone is on Facebook, and as such the current online landscape dictates that there must be a way for users to create an account in a web application with nothing more than their email address.
From a development point of view this means having a robust and reliable authentication system is a regular requirement. CodeIgniter doesn’t attempt to fulfil this need whatsoever and the inherent silver lining in that decision is that it helps to preserve the CodeIgniter mission statement of “maximum performance, capability, and flexibility in the smallest, lightest possible package.” There is no half-hearted effort to introduce a feature to CodeIgniter which has been deemed, rightly or wrongly, as non-critical and thus risk compromising the integrity of the framework.
The cloud to this lining, therefore, is how best to implement this functionality.
Not surprisingly, we’re not the first ones to ask this question. A discussion on Stack Overflow spanning over 3 years has hammered out the finer points for us and directly resulted in the creation of a new authentication library built upon comments and recommendations from the thread. This library is called Tank Auth.
Tank Auth is a rock-solid, fully featured user authentication library for CodeIgniter. Functionality includes user registration, activation, password reset and captcha support for new users and login, logout, logging and credential management for current users, all based on a well-defined security model that integrates smoothly in to the CodeIgniter core. This is a great solution to our authentication requirements that can easily be hacked in to shape for specific requirements.
Whilst everything that is present works well, it does still have a little way to go. Account profiles (as opposed to mere account credentials) are included but not implemented in any useful way. There is no ‘role’ management or user differentiation built in. And, as with the rest of CodeIgniter, there is no backend provided whatsoever.
That’s next on our list.
Javascript vs Ruby Hipsters
Over the weekend, there’s been trouble brewing in the web development world… A kerfuffle has broken out over the lack of semi-colons in the Twitter Bootstrap javascript libraries. Nerd slapfights like these would under normal circumstances not be notable but in this particular case programming luminaries such as Douglas Crockford and Brendan Eich have waded deep into the argument.
The authors of the widely used (indeed we have discussed it on this very blog) Twitter Bootstrap library have chosen to omit semi-colons in their javascript code. Javascript, being a C based language uses semi-colons as a statement terminator. However, the javascript parser is able to automatically insert semi-colons if they have been omitted and it detects a newline. Howerver, in his book Javascript: The Good Parts and in various talks he has given on the topic, Douglas Crockford makes it clear that the semi-colon is a necessary statement terminator. Newlines should not be used in its place due to the likelihood of bugs creeping in. Backing up this point of view is Brendan Eich, who we should point out, actually invented Javascript.
The issue has raised its head on a bug opened on the official Github Bootstrap repository wherein Bootstrap is described as not working with JSMin, minification software created by Douglas Crockford. Commentators say the issue could easily be resolved by adding the semi-colons. Crockford himself comments on the thread, his opening gambit being, “That is insanely stupid code. I am not going to dumb down JSMin for this case.” Lines are drawn, sides taken and insults thrown around.
So why are these developers choosing to use new-lines in place of semi colons? Some claim that semi-colon usage arguments are a form of Bikesheding; concerning yourself with trivial issues such as what colour to paint the Bike shed rather than focusing on more complex and relevant issues. Others argue, and indeed in the comments of the Github thread in question it is stated by the project’s owner, that if you are familiar with javascript you can omit semicolons and rely on the automatic semi-colon insertion. Doing so is in some way a showing of skill, mastery over the javascript interpreter. The omission of semi-colons is also an aesthetic choice. By not using them the code is more readable to Ruby developers. This drive to make the language more Ruby-like led to the creation of Coffeescript and it is understandable that developers might way to use standard javascript in a similar way.
However Ruby developers are also seen as San-Fran livin’, fixie riding, floppy haired hipsters with giant egos who are more concerned with image that substance. Developers who are concerned with making code “beautiful”, as if programming were a medieval art like glassblowing or being a blacksmith. People who wear T-shirts proclaiming them to be “Code Poets”; programming Lord Byron’s. It is unsurprising then to find that Bootstrap is the output of Ruby developers.
Having a C based language overridden by the aesthetics of Ruby can be jarring especially when it runs counter to how it is supposed to be used. Indeed as another commentator states in the thread, “Semi-colonless Javascript is an ego-stroking attempt at rejecting standards for the sake of rejecting standards, not for the greater benefit of the community.” That Crockford’s views are assailed by commentators who’s photos have them posing with teddy bears, oversized sunglasses and ironic haircuts doesn’t dissuade the view of hipster Ruby developers.
The bug has now been closed with no resolution and a lot of acrimony, the debate will, we are sure, continue.
Update Your Content Now!
Sorry to sound bossy, but if the content hasn’t been updated on your website for a while, make sure you do it now!
The reason for my urgency is the latest update from Google. This mini amendment to the search engine’s algorithm is rooting out out-of date or spammy content. This means that if you haven’t updated the content on your website for a long time, you may see your keyword rankings drop, or even disappear altogether.
Before you panic at this news, it’s important to remember that Google (usually) makes updates that benefit the user – i.e your customers. No customer wants to read outdated content on your site, so why should Google rate your site if your copy is old?
The most successful websites add fresh content regularly, so you should therefore get into the habit of updating your content often. The easiest way to do this is to start a blog and write posts regularly. This doesn’t have to be a huge job – just a couple of paragraphs weekly would be a good place to start. You can talk about anything you like – industry opinions, company news, new orders, business trips etc – just make sure it’s relevant and well written.
As part of your content overhaul you should also re-write the text on your homepage and about page (plus any other pages that have text present). I have lost count of the number of websites I have seen that display the names of long-gone members of staff, old addresses; or information about an event that happened years ago! Make sure you amend these details as soon as they happen to keep your website fresh and relevant for your customers – and Google will be happy too.
WebDev Frameworks – CodeIgniter – Development
So far we’ve established that CodeIgniter is simple to install, streamlined to develop and efficient to host, but what do we actually get with this package? There are two main areas of functionality provided by CodeIgniter that form the core of its existence: classes and helpers.
Firstly, classes. We are provided a whole heap of pre-built class libraries to help build a back-end that can easily deal with common situations. These are essentially a compilation of well written and thoroughly tested functions designed to simplify the tasks most web-facing applications will require somewhere in their repertoire.
As an example, dealing with user input is notoriously laborious in web development. Collating form data, validating the input, removing malicious entities and formatting the results is the bane of any productive day. However, using the form validation class provided with CodeIgniter is, by comparison, trivial. It allows us to ensure user input is safe and present when required and, coupled with the email class, allows us to quickly generate emails to send back to the user. We can allow file uploads and zip them, we can manipulate images and generate thumbnails and we can keep this all in session data for authentication or displaying errors and notices. The database class ensures we can keep a permanent record of this data easily too, and throughout this whole process we haven’t written a single function of our own.
On the front-end CodeIgniter provides us with a selection of helpers. These are a series of functions designed to literally help with the creation of an interface. Continuing from our scenario above, the form helper can dynamically create text boxes and file upload forms and even populate them with session data or previous input. We also have helpers to format text, HTML, dates and URLs and CAPTCHAs to help us retain our humanity. A full list of CodeIgniter’s classes and helpers can be found in their user guide.
Don’t be fooled by this simplification of CodeIgniter’s rich feature set. Due to the fundamental nature of the framework a certain level of technical knowledge is required to shape CodeIgniter in to something useable – this is not the point-and-click-and-blog service you will find with the likes of WordPress. But nor is it designed to be and the “right tool for the job” axiom is just as appropriate in web development as any other profession. Similarly, there are a few gaps in the CodeIgniter arsenal and we will take a look at these next time.
PHP: The filth and the fury
The favourite whipping boy of programmers everywhere has once again taken its licks in a blistering blog article titled PHP: a fractal of bad design. While no stranger to lengthy lists of its shortcomings the latest attack is a cavalcade of issues that the language suffers from. Apart from the vigorous nodding in agreement, debate online has centred on the most pertinent of questions, “Why would a programmer use this abomination of a language?”
PHP is not universally held in such low regard. It is, for the web layperson looking to dip their toe into the world of development, an easy and forgiving environment which allows them to peruse a few tutorials and have a basic site up and running in almost no time at all. By just creating a text file adding a bit of code, changing the extension to .php and uploading to a web server you can instantly create a site. Skimming a few more articles will have you connecting to a database and proudly running a “real” website. Besides it’s used on some of the largest websites in the world such as Wikipedia and Facebook, they must know what they are doing so it can’t be all bad right?
Detractors would point out that enabling amateur web developers to throw together sites will almost no idea of what they are doing is a recipe for disaster. While the site they produce may indeed work, in the eyes of a developers it is only in the most tenuous sense possible and will most likely be riddled with security holes. When such code bases are inherited the amount of refactoring require means that almost none of the original code will be kept. As a developer you will have to view PHP code that will likely leave you bug eyed in disbelief. For the language itself the bizarre rules of equivalence, the inconsistencies in everything including the standard functions will likely drive you mad. The avoidance of any discussion of parameterized sql statements in the official documentation in favour of telling you to escape your strings is insane. The list goes on and on.
So why use PHP? Simply there is no viable alternative if you need to be able to host your site almost anywhere. Other languages require software stacks and web specific frameworks to run a site, ensuring you will need to have knowledge of more than just the language used. The site produced will probably have to run under Fast CGI on a server resulting in less than grand performance. PHP in contrast is ubiquitous and supported by pretty much all web hosts. It is unavoidable if you are to be a web developer and you will need to know the language even if it is not to be your primary skill. Even then your job most likely will be using PHP given that easily 80% of development jobs will use it.
To know PHP’s shortcomings is to be able to avoid them. You do not need to program in the Cargo Cult, copy and paste method used by beginners. There are a variety of frameworks now available that take care of the boilerplate and require you to structure code with a separation of concerns. While PHP is forgiving when used poorly there is no reason you cannot code in a correct manner following best practices. Doing so will help raise the awareness of these issues with potential developers and allow them to avoid the mess of spaghetti code that has come before. When used with a framework such as Codeigniter PHP becomes almost pleasant to use, but maybe that is the Stockholm syndrome speaking.
Paying for Search Engine Rankings: Part Two
Last month, I shared my thoughts about paying for search engine results with you. We established that the answer to the question ‘Is everyone paying for search engine rankings?’ was yes, yes and thrice YES.
So how on earth is Google currently using its great algorithmic capability to work out search engine results?
I am not going to list every factor for three reasons:
1) I want to concentrate on a big factor here, rather than fill 135 pages and bore you readers rigid!
2) I probably would run out of breath (and brain power!!) to list them all.
3) I don’t every single factor of the algorithm and it’s weighting – nobody does, not even the team at Google!
One thing is for sure, I don’t always agree with the way that the Google algorithm works when it comes to one particular element – links. Google’s official guidelines mention that links should not be bought, or sourced from spammy sites.
However, in practice the opposite often applies…
- The website with the greatest number of links is ranked highest – IMO this is WRONG
- The links do not have to be from a relevant site – IMO this is EVEN MORE WRONG!
This shows that links can be bought easily and utilized to help rankings, despite Google saying that they should not be bought. So does Google have any real way of finding out? – I DON’T THINK SO
WebDev Frameworks – CodeIgniter Overview
CodeIgniter is a Model-View-Controller (MVC)-based application development framework. Essentially this means that each element of an application will be split in to three distinct sections – the model, which deals with data structures; the view, which presents everything to the user; and the controller, which serves to tie the models and views together along with processing other required resources such as user input.
The defining concept behind an MVC architecture is to seperate different aspects of the application whist providing a framework to link them together. For example, since these sections will be the focus of the application’s front-end, our design team can be working away on the view components independently of the rest of the project. This enables the development team to construct the back-end (e.g. model sections) without worrying about conflicting with design changes or, conversely, without preventing the design team from working by forcing them to navigate database issues.
This approach leads to more streamlined coding both front and back. It is easy to define flexible model functions that can be recycled by numerous views. Likewise, views can be created with just presentation in mind and dynamic content can be introduced cleanly and simply by a controller. This structure has the added bonus that models and views are only loaded as they are required which helps keep page load times and resource usage to a minimum.
CodeIgniter provides a well-trimmed solution in other areas too. The first bullet-point in CodeIgniter’s official feature list, entitled “CodeIgniter is right for you if…,” states “You want a framework with a small footprint.” And it certainly delivers. The latest version available for download at the time of writing clocks in at just 3.9 MB uncompressed, positively tiny considering the features we are promised as that list continues. The default installation is also minimal: as simple as copying the files to the web server root. The software doesn’t come bogged down with loads of unnecessary code – in fact, no models are provided whatsoever – just a simple welcome controller and view ensure there exists a default index page. These are easily removed and we’re ready to create our brand new application.
Photoshop CS 6 Beta – Features & Review
Firstly, let me say that I’ve been using Photoshop since Photoshop 3 and I mainly use Photoshop for Web Design so I’ll be looking at the features the will directly effect myself and other Web Designers.
Having used Photoshop CS6 for just over 5 days now the first thing that strikes me is the performance! It feels a lot faster than CS5 and more sturdy. Cmd + N (New document) and the new document panel opens up almost instantaneously – pixels don’t need 4-5 seconds to render properly and even better, applying filters is now faster than ever! I don’t have a particularly fast machine but even I can notice the difference.
Without going into photo effects too deeply I feel I must mention the new blur filters you can apply. The new Tilt-Shift & Bokeh (A design trend which makes me gag) filters are an absolute dream to use, they’re so easy to use you won’t have to invest much time in learning how to use them. The Tilt-shift filter in particular is so powerful you can create the miniature feel to any photo within a minute. Although it was possible to replicate these effects in Photoshop without the aid of these new tools, having the facility to do so really lets you explore the possibilities and puts you in full control of the results.
The visual indicators on CS6 are a massive jump in the right direction. Instead of inserting markers where an object should be, visual indicators tell you the items margins and how far you’ve moved it and if you change the dimensions of an item, they tell you how much you’ve increased it by. When using a brush, the indicators let you know its diameter, hardness and opacity – small stuff I think you’ll agree, but useful none the less.
Layer Search – Yes my friends, the time has finally come. So you’ve designed a websites home page, you’ve racked up nearly 200 layers / 30 groups and you haven’t got the time to trawl though the groups to find THAT layer, this is where layer search comes in. For Web Designers this is something that we’ve been hoping for, for a while now. It works amazingly well too, you can search by name, mode, effect attribute and colour.
Type styles are a great addition to CS6. For front end developers like myself this feature brings the world of CSS closer to Photoshop than ever before. This tool enables us to apply styles to text elements within a single text box which are re-usable throughout the PSD. So you can create classes called Heading1, Heading 2, paragraph, and link etc and Photoshop will use your defined classes through out the PSD. Brilliant!
The new GUI (Graphical User Interface) is interchangeable and great to use. There are four light/dark options which can really make the canvas be the point of interest. My personal preference is the dark option but I’ve only been using it a week so that may change! I think I may change the UI dependant on the design I’m working on at the time.
There are many other new features for photographers and other users alike such as the new set of content aware tools and the video editing suite so there’s plenty to get your teeth stuck into.
Overall, I think there has only been a handful of really impressive Photoshop upgrades, Photoshop 7 & CS2 spring to mind – but I really feel with the features added to CS6 this is a giant leap for Photoshop and really improves its overall usability. The fact that a lot of the new features are aimed at Web professionals helps enormously. Adobe seemed to have realise the we use this application every single day so improving the small things leads to a more pleasurable way of working.
Well it’s fair to say I’m smitten but as I’ve said, I’ve only used it for a week. I’m sure I’ll find a glitch or two!
Whats missing – I believe there is still a gap in photoshop for a tool which makes it easy to add Depth of Field to photographs, sure there are tutorials on how to do this but a specific tool would save time and would be a welcome addition. Maybe a level of theme creation linked to WordPress would also be a good feature, but hey! Thats just me being selfish!
Here’s some useful video’s which illiterate some of the new features of Photoshop CS6
Content Aware:
Video Overview:
Download the Beta for yourself: http://labs.adobe.com/downloads/photoshopcs6.html
About Photoshop CS6 Beta: http://labs.adobe.com/technologies/photoshopcs6/
Facebook Timeline for Businesses – Be Ready!
At the end of this month, Facebook will be changing business pages to the new timeline layout. Timeline has been around for personal accounts for a few months now and you may have noticed that some of your friends have switched to a more graphic, picture based profile. This will eventually become the norm, which is great news, as I personally think timeline looks very attractive.
The main feature of timeline is the eye-catching cover art at the top of the page. You can customise your cover picture, as well as your smaller profile picture in the bottom left hand corner. I find that it usually works best if you use a large picture of the interior of your premises or your products and your logo for your profile picture. A good example is this bakery page:
Other new features of timeline include personal messaging, and customisable modules showing your number of likes and photos. A handy element of the new layout is something called ‘milestones’. You can set this to show key dates in the history of your company such as when the company was founded. This is ideal if you have been established for a long time, but you’re relatively new to Facebook, as you can back-date relevant events.
Status updates have remained similar: you can run competitions through multiple choice questions, post links to your main website and add photos. Users can tag themselves in your photos and this is then shared on their timeline (and therefore visible to all their friends).
With this update, Facebook has made it easier than ever to set up an attractive business page with basic settings for free. Once you get started you have the option to customise your page further by creating your own apps, games and adding e-commerce functionality.
If you need a little extra help getting started, eSterling can provide support with set-up and customised page creation. We also run social media training courses to help you learn how to run your accounts independently so that you can make the most out of your Facebook account.
You can find out more about Facebook pages here: http://www.facebook.com/about/pages