Posts

User Interface Usability Checklist Part 2

So you made it through part 1 of the usability check list, how about part 2? 21. Poor Label Alignment If you have been through design 101 you have probably heard of the wonderful acronym for the basic principles of design, C.R.A.P. This of course stands for Contrast, Repetition, Alignment and Proximity. Proximity is very important when identifying which label belongs to which input. Each different form of alignment has its advantages and disadvantages. Left Alignment The label appearing on the left of a box is a common practice. This often helps with vertical space and keeping all of the elements of a form on a single page, which can be beneficial in aiding the user in form completion and making them aware of all of the possible options they can, or made need to provide information for. It does however have a few disadvantages. Long labels cause short label's input boxes to be far away from the end of the label, this damages that basic principle of proximity. In extreme...

Procedural VS Object Oriented

What is the correct way to write code? If you have worked with PHP long enough you may well have come across the website  PHP The Right Way . This website is dedicated to helping developers learn the industry best practices. Interestingly another site appeared afterwards called  PHP The Wrong Way . In essence this website is a rebuttal to the many of the recommendations made in PHP The Right Way. With any sphere of learning it is important to keep an open mind, to listen and critically evaluate the received wisdom and determine if it is indeed wisdom or opinion built on shaky ground. There is one part of the argument I would like to focus on and this is the argument for and against " Always use object-oriented Programming ". While PHP The Right Way does not appear to explicitly state that you should always use an object oriented approach it is implicit from the examples and the recommendations to use design patterns. While there are programming approaches available othe...

CORNING GORILLA GLASS 5 what does up to 80% mean for the Note 7.

To quote Corning "Introducing Corning Gorilla Glass 5, a new glass solution that raises the bar for protection against drops higher than ever, surviving 1.6-meter, shoulder-height drops onto hard, rough surfaces up to 80% of the time." They then go on to say "...That’s up to 4X better in drop failure height than competitive glasses...". They seem to be very careful to say up to  in both cases. That caveat seems rather extreme. Unfortunately the published information only has a graph with "Normalized Average Height to Failure" based on "Incremental face drop on 180 grit sandpaper". Was it this test that they used for the derivation of the up to 80%? Are hard, rough surfaces "180 grit sandpaper". What does "surviving" mean, are there no signs of damage? I would have assumed that you would have written "no signs of damage" rather than "surviving" as to me it sounds a lot better... Additionally when t...

Black and Blue or Gold and White Dress - The emperors new clothes

Image
I was in the office when I received a message saying, what colour is this dress? Now I could see the glare in the top right so I though this photo was not taken under the best lighting conditions and so it would be difficult to be certain of the exact hue, but my best guess would be white and gold. I was happy to be slightly wrong, that the white was some sort of light hue, it had a purple tint, but lots of camera throw in blue or purple tints erroneously and the gold could have been anywhere from yellow to brown. Apparently I am wrong, the dress is blue and black. Now this would not bother me, but apparently lots of people, perhaps the majority see it as black and blue, where as some see it as white and gold. So I took different segments of the dress in isolation and performed and analysis of the colour composition of each portion. In HSV terms this comes up with an average colour of bright drab violet (RGB  B9,AD,C4)  and medium faded orange (RGB 7A,63,48). So the ...

Hypotheses are for testing, but assumption is the mother of disaster

If I were to ask what is the most important element to being a good programmer I would say the ability to avoid making assumptions and instead make hypotheses that can be tested. Knowing you are right because you have data to back it up will allow projects to remain on track. Ploughing on based on guess work and things a colleague told you once (without providing you with data & methodology to back up these statements) will likely lead to ruin. I does not matter how long someone is programming it is always possible that someone heard something once, took it as gospel and never tested it to make sure it was true. I encountered this with a couple of colleagues and an SQL query. The SQL query was built from a ORM-like query generator and included the syntax WHERE 1=1. Both my manager and a senior developer stated, "well that is the problem WHERE 1=1 will always cause a full table scan rather than use indexes". When I looked at the same query I thought that the table...

User Interface Usability Checklist Part 1

User interfaces are changing quickly, and it can be default to keep up with new designs and trends. The smaller the team the more corners are cut to try and get the product to market. Lots of people advocate the creating and releasing the minimum viable product. This is fine, but companies try to do so without the minimum viable staff level. Creating a great user interface takes good design, user testing and lots of iteration. Unfortunately user testing is often the first "cost" that is abandoned. The next is the available design time. So when you become incredibly constrained then making good design choices becomes your only course to prevent a horrible mess at the end of the project. I have created a usability check list of common design mistakes. I have seen all of these mistakes in projects from the most expensive to the most basic free apps, and if you can avoid all of them you are well on the way to producing a high quality application. User Interface Usability Che...

Why should you use PDO?

I was recently asked if I could think of any good questions to ask a PHP programmer in an interview. Obviously this got me curious as to what Google might return for this query. I noticed that a few people recommended asking questions in relation to PDO. All people suggesting questions on PDO were forming questions where the answer essentially was that PDO should be implemented so that switching database is easy/easier. I have worked on numerous commercial products for a number of years and none of these have ever switched database. How common a change it is to switch database on a project? I can't imagine the % is very high, although I have not been able to find any figures on this. Additionally of the systems that require switching I suspect they are probably moving from an archaic language / database which does not support the system they are moving to, and so you are largely doing a complete rewrite anyway. Will SuperSQL++ 2040 support your PDO queries from PHP 5.6? Perha...

More weird adventures in Cache SQL - SOLVED

Well made a new interesting discovery today. Combining TOP with ORDER BY can severely slow down a query. I was looking into a slow query which was taking around 10 seconds to return 69 results. It was getting the "TOP 100" from a specific date range and then ordering by ID descending. It was fascinating to me to discover that removing the TOP 100 returned the results in 0.005 seconds. Removing the ORDER BY instead of the TOP 100 also resulted in again producing the results in 0.005 seconds. So the moral of the story is don't use TOP and ORDER BY if you want your results back quickly. I have no idea why this kills performance right now, but it is perhaps even more interesting that even though the query TOP 100 ORDER BY ID ASC results in the same set of results as TOP 100 without an ORDER BY command, it takes 8.8 seconds rather than 0.005 seconds. There are definitely some huge optimisations available in respect to these queries. Update Well after reporting this t...

So which is the best mobile keyboard 2014

Image
Photographer :  Cindy J Grady I have been lucky enough to experienced using keyboards on iOS, Android and Windows Phone (8 and 8.1) which has really shown me how important a good input method is in the mobile experience. Each keyboard has unique features which makes choosing the best keyboard a bit of a struggle. Until recently I had completely dismissed iOS keyboard for the following reasons 1. 4" display means that the keys are harder to press accurately 2. Selecting & deleting words is trickier than both Android and Windows Phone not just due to the smaller target area, but also the implementation requires a "long press" to activate the magnifying glass to achieve accurate cursor location. 3. Lack of swype / shape writing style input. While options 1 and 2 were of just minor inconvenience option 3 is a major issue. Swyping / Shape writing There are three great features of shape writing 1. It is a much faster input method on the whole than key p...

How to improve the speed of your web page, the basics

Image
Is saving a few seconds really important? Image by  FracFx While practically any change, no matter how sure you are that it is a positive improvement, can be met with anger from the user base performance improvements are not one of them. In an ideal world all webpages would appear the instant we demanded them, however achieving good performance has costs, and those costs need to be offset against the benefits. Features and complexity sells and performance is just one of those features which can be easily ignored and tough to sell, especially if it is say the difference between 10 seconds and 5 seconds. The benefits of speed are often underrated and can be difficult to appreciate. For example a fast application is easier to use, not just because of the reduced frustration of waiting, but because it is easier to explore. If you click in the wrong place as the next piece of information appears instantly you can easily explore the options on the page. If every option takes a...

The big constraint in Development and how it can bring down a team

I always consider the primary constraint in software development to be time. While technically this constraint could be considered a function of money, it is difficult for a developer to assert direct influence over budget. Most organisations require developers to go quite high up the chain of influence in order to try affect the proportion of budget development have access to. Supply and demand factors for the product that development are supplying is difficult for them to directly influence, in most corporate structures sales and marketing are the real influencers of this factor. Yes they rely on the quality of product that development provide, but it is unlikely that and improvement in the product quality will have an equivalent impact on sales. The ability of sales and marketing to reach new customers and alter demand is a much more influential factor. It is one of the great features of software development that you can essentially do anything the customer asks for, but only if y...

Intersystems Cache - Write Performance

Image
In previous blog posts I have mentioned that Cache has good write performance, in fact in certain circumstances it is faster than many other databases. However, it is rarely the case that optimising performance is not desirable. Every one loves a performance boost, it is the most universally loved product change. The closest I have ever experienced to a complaint about a performance boost is "its so fast I didn't believe it had worked". Any way I was working on improving query performance on a server when I noticed some intermittent slow down. I traced the performance issue to a task which performs a huge burst of write operations. The write operations were so heavy that the rest of the server was experiencing slow down. Obviously the code is under review to see if the amount of data being written is necessary, but I was curious about optimising the write operation itself. With read operations I have noticed that dynamic SQL is slower than compiled SQL which is i...

When will the S5 get a working CyanogedMod 11?

As of today (17th July) CyanogenMod 11 is only available in a semi-functional version. With both GPS and the camera not working it could not be considered a daily driver, and of course there are plenty of other minor niggles. Samsung has introduced lots of great features in its latest version of TouchWiz, and I have always liked the swipe left and right on contacts to send a message or initiate a phone call since it was on the original Galaxy S, but this single likeable feature is does not compare to stock Android. The cleaner look, the instant responsiveness and now with Android L the promise of better battery life we all know that TouchWiz cannot compete. So far I have turned off most of Samsung's proprietary functionality, and found the finger print scanner and heart rate monitor to be next to useless. The Galaxy S5 is still the best phone I have ever owned, but a Google Play edition or CyanogenMod would be a massive step up in usability, speed and enjoyment.

Dearth of Intersystems Code Examples

When I first started my current job I was told that the database was an Intersystems database, I had not heard of this before on researching it I found out a number of things. 1. It was ranked number 63 on DB-Engines most popular databases 2. Cache is not a good name for a piece of software if you want to find information in Google 3. There was a distinct lack of examples and people discussing real code This 3rd issue is perhaps the most important. In programming most of what you want to do has been done by thousands of people before you. Want to parse a CSV file, well if your language does not have a built in function someone will have posted a solution on the internet. Not only will you have a working solution it will probably have been commented on by a number of programmers and improved to a level which would have probably taken you several live iterations to achieve. The code examples in the documentation are basic, out of context and ignore even simple advise on field fil...

Response to making a better password fields

Image
Photo credit: Flickr user FORMALFALLACY via Creative Commons Paul Lewis wrote an article attempting to reduce friction on password fields . He even referenced the wonderful xkcd cartoon on the subject, but I feel concentrating on ways of helping users to see how they can enter a valid password misses the main point of the friction. The friction is primarily caused by the requirements, be they minimum requirements symbols numbers etc. or maximum requirements like no more than 16 characters, or even worse the password must be between 8-12 characters! Being forced to modify a password to add extra features is likely to cause you to forget it, in the same way that preventing a user from certain length passwords or use of specific symbols will also annoy and lead to forgotten passwords. These restrictions add friction to the password entry screen and anything that can be done to remove these restrictions will reduce friction more than attempting to improve the clarity of the restri...

The power of Intersystems Cache

Image
It is interesting to see Intersystem's struggle to have a working system too...

Intersystems Cache Indexing Shocker - How to Fix Sluggish Queries

Image
Photo: Markus Spiske / www.temporausch.com / CC-BY When going through a performance review of a grid on the website, I was struggling to see why the query was taking so long. It was a single table query with a single where clause which was on an indexed field. This indexed field could only contain 5 different values and the query was return fewer than 100 entries but was taking over 1 second. On other lower powered servers the query was taking less than a third of a second and often returning more data albeit on a smaller total data set. Checking the query plan revealed something interesting, the query was not using the index but was instead performing a whole table scan. Further testing revealed that only "=" queries use indexes. "!=" ignore indexes as do any queries with "OR" or "IN". After further investigation I found that if you only return the ID then NOT, OR , IN queries do use indexes, however, if you return any other field inc...

MVC Frameworks - CakePHP a quick Evaluation

A real project always throws up more issues than following the tutorials, I find that you not only tend to learn faster, but to a deeper level. To try and evaluate CakePHP I made up a simple application. This was a simple car database to allow direct comparison of different makes and models comparing the following characteristics: Price, Seats, 0-60 MPH time, MPG, Age, Road tax. Within an hour of downloading CakePHP I had a working create, read, update, delete (CRUD) application. After 2 hours the filtering of the available fields to restrict the list to various required maximums or minimums and 20 cars details were manually entered. The application was essentially built working and tested to a basic level in 2 hours with 200 lines of code. The real advantage though was those 2 hours were not hard pressed programming, it was a relaxed pace, and I am unsure without a framework I could get a CRUD application to the same level without a reasonable amount of planning time. The fr...

Zend Framework VS CodeIgniter VS CakePHP VS Symfony Part 1

The annoying thing about programming is that the "right" way is not always obvious until you have done a lot of work on a project, sometimes design flaws only become obvious much later in production environments, when the real world starts to attack your lovely code. The best way to avoid the wrong way is to try to arm yourself with as much knowledge about what is available as possible to reduce the chances of incorrect decisions. As such I have been looking into various PHP frameworks to try to establish which will be optimal for a project I am working on. All four frameworks are designed to try and help you produce software as quickly and efficiently as possible. The goal is to assist you making the correct design decisions from the outset so that code is more reusable and easy to understand. All the frameworks essentially rely on the Model View Controller (MVC) design pattern and the main learning curve to each is understanding how the Model, View and Controllers are...