Saturday, 25 August 2018

Getting and Interpretting Feedback

If I'd asked customers what they wanted, they would have said 'a faster horse'.
Henry Ford

Well, there is something slightly wrong with that statement since Henry Ford didn't exactly invent the motor car, rather he invented the process to mass produce cheap cars. Sure, everybody at the time, unless you were something like Warren Buffet sort of rich, still traveled using horses, but the point he is making is quite correct - users don't always know what they want, which is why we need techniques to be able to garner their desires and their frustrations.

Couple on buggy being pulled by a horse
I think they would have preferred a car

Now, as previously mentioned, you do have to sort the proverbial wheat from the chaff, because you are going to have devil's advocates, those that insist on something that pretty much everybody else hates, as well as those who are nitpicking every little problem. However this is the essence of getting feed back, but it is not so much asking, but rather observing. Henry Ford observed that only the filthy rich could afford to drive cars, so looked for a way of lowering the price, much in the way that RyanAir looked for a way of lowering the price of airfares.

Ethnographic Testing

So, we have this concept of ethnography, where people are basically studied in their native environment. Initially it related to tribal people living in remote places, however it has been transferred to our modern society where we study people in their native habitats, whether it be the home, the workplace, or the local pub. Once again, it comes down not so much to asking, but rather to observing what they do. This can be applied to user design, since we can get a lot of information about user's frustrations when we study them using our product in their native environment (though somethings that simply seems to be scrolling through one's Facebook feed while wandering along a crowded street, which is why councils have resorted to painting warnings on the ground, not that they will see it).

There are a few ways we can do this, such as the fly on the wall approach (which could raise the issue of privacy, but then again there is a lot scope within the UX arena that could fall foul of the privacy laws). The day in the life approach involves watching the person go about their daily business, while shadowing involves following what they are doing. Then we have the inventory method, where we study what they own, which can produce some very interesting insights as to their behaviour.

Group in cafe staring at their smart phones
Some friends catching up for some brunch. Image source.

The Lifecycle

Userbility testing isn't a one off process - it is something that is ongoing. Okay, some things work so well that they seem to never change, such as the Google home page, and at other times things are simply being tweaked around the edges. However, UX development is continually progressing as developers find problems, implement fixes, find problems with those fixes, and so on. In a sense, there isn't a time when one can simply relax because as technology advances, new, and easier, implementations come on line. Take uploading pictures - there was a time when to upload a picture you had to open a dialogue box from which you could choose one picture at a time to upload. However, these days pretty much every website that allows you do upload pictures has implemented a drag and drop method, and if you didn't you would pretty much find yourself being left behind, and fast.

The development lifecycle looks a bit like this:

design process

So, how do we get feedback? Well, there are a number of ways, including paper prototypes, surveys, interviews, usability tests, focus groups, and log analysis. For instance, you can ask a user to keep a diary tracking the use of the object. You can have them come in and use the product, while thinking out loud about their experiences. Then there are the surveys and the interviews, where questions are asked specifically of the user.

Now, remember, users probably don't actually know what they want until they are presented with it, which is why observation, and interpretation of those observations, becomes important. Let us go back to the uploading picture example. None of the users may actually say outright that they would like a way of simply dragging and dropping pictures to upload. However, they may express a lot of frustration at having to manually upload the pictures, or even spend time labeling the pictures that they want to upload. It is then our job to think outside the box and work out ways to solve these frustrations.

Now, to get an idea on how some of these methods work, consider this video where they perform a UX analysis on fruit:

Now, one thing that we need to consider are the users of our app. First of all there is going to be a segment of society that we can pretty much exclude - somebody who hates football isn't going to want to use an app that provides updates on the games. However, once we have narrowed this down, we will then need to identify the different types of users. For instance, let us consider a share-trading app. Now, we can assume that pretty much everybody using the app is going to have some interest in share trading. However, not all share traders are created equal. You have the buy and hold, the casual investor, the professional investor, the day trader, and the guy with some dodgy financial advice certificate flogging off a massively overpriced newsletter that isn't worth the electrons used to send it by email. This is the case with pretty much any app.

So, how do we identify the users? Well, through the usual methods. In fact the same methods that we use to get generalised user feedback. The thing is that we aren't just interested in the user of the app, we are interested in the type of user of the app, and how much attention we wish to pay to this user. One of the ways is through a survey, though we can also cast our nets wide through the use of social media. Notice that a lot of apps actually have their own Facebook pages. In one sense this has a lot to do with promotion, but in another sense it is a means of being able to reach out to users and to get their opinion of their product.

We also need to look at behavioral and attitudinal methods, as well as qualitative (formative) and quantitative (summative) methods. This chart outlines a lot of these methods quite well:

3d framework.png

Now, as you can see, the difference between formal and summative assessments is that one is direct, while the other is indirect. The formative assessments are usually conducted prior to the app being developed, and the summative usually occurs afterwards. In a way, once the app has been developed, it is much easier to simply sit back and let the feedback data roll in.

However, let us consider surveys, as they can be one of the cheapest ways of gathering user feedback.

Surveying the Surveyed

In many cases, what applies to surveys also applies to interviews. First and foremost we must remember that people really aren't going to articulate what they like and dislike about a product, so we need to be able to guide them in the direction to get the answers that we want. However, the catch is that we need avoid asking leading questions, so that we don't actually get the answers we are gunning for. Sure, we may have filled out hundreds and hundreds of surveys, but that doesn't mean we are experts in creating surveys, creating a survey is an art in and off itself.

So, first of all we need to get rid of people that we don't really need any answers from. A person that hasn't used Facebook for something like two years isn't going to provide any useful information on its latest incarnation. Sometimes we might not want to get feed back from casual users, so we need to get rid of them as well. Then there comes the problem of being able to identify the correct users, since we might capture some, but we might not catch all of them. Sure, posting the survey on Facebook might help, but that will lead to this problem. We need to capture more than just those users that like our Facebook page.

There are a few other errors we can get as well, such as Nonresponse error, where the questions aren't answered (and that can be solved by not asking so many questions - five minute surveys should be the absolute maximum), and measurement errors. This occurs because, well, the right questions aren't asked. So, we need to not only ask the right question, but ask it in a way that can illicit the right responses. For instance, free form questions are a bit of a no-no. Why, because people can write any old rubbish down there. For instance, if you ask them to outline how the app could be improved, they might suddenly start describing a night out on town where they missed out on a great opportunity, but not actually say how the app could have helped them in that particular instance.

Interviews tend to be much more expensive, particularly since you generally need to compensate the user for their time. But what does help is that you can pick up on body language that can give you ideas that an online survey might not. Further, you can tailor the questions to specific individuals. For instance, a specific answer might suddenly lead you down a track that you never actually considered going down, and would have been impossible for an online survey.

Finally, let us take another look at the leading question, and I believe that this clip from Yes Prime Minister pretty much says everything:

Monday, 6 August 2018

Viva la Revolution - Orwell's Animal Farm

Aristotle once described humanity as being a political animal, though by that saying I suspect that it meant that we were social animals, as opposed to animals who lusted for power. Honestly, not everybody lusts for power, but one friend of mine seems to divide people into three groups: those who are born leaders, those who do what they can to become leaders, and throw their weight around once they are in that position, and those who have absolutely no interest in leadership whatsoever. The problem is that most of the people who end up in leadership positions tend to come from the second group - he calls them beta types.

So, this post, not surprisingly, is about the book Animal Farm, and it is basically about how revolutions never work out for the best. It is one of those books that is so well known that I would be wasting my breath simply describing the story, but in a nutshell, it is set on a farm where the farmer is basically quite negligent and brutal, and one day the animals get sick of his negligence and kick him out. The rest of the book is then about how this power vacuum is filled by the pigs, who proceed to roll back every single gain one by one until the animals are all back where they started (with the exception of the pigs, of course).

One of the biggest misconceptions about the book is that it is a parody of the Russian revolution, and while in a way it is, in many ways it isn't. Orwell wasn't really sitting there pointing his finger at Russia and making statements that they had failed - that wasn't his style. Rather, he was pointing at Russia and through this book warning us against becoming to complacent, and basically handing over our freedoms one by one, until we wake up to discover that we are once again serfs.

The Failed Experiment

However, let us start by looking at Russia for a moment. What we saw was a spontaneous revolution and then a number of months later, in October 1917, a coup-de-tat which installed the Bolsheviks in power. At first Lenin decided to hold elections, however when the results put the more moderate Mensheviks in power, Lenin basically invalidated the election, and pretty much decided that elections weren't working and discarded the whole idea all together. However, things went from bad to worse when he died, because behind the scenes, Joseph Stalin was slowing worming his way to the top, and once Lenin had died, he pretty much seized power, and progressively began removing anybody that opposed him.

Look, I won't go too much further in this, but instead refer to a video I found about the realities of rulership:

I guess the takeaway thing from this video is that 'nobody rules alone'. For every ruler that comes along promising a better life for those that have put him there, there are people hidden behind the scenes that he must keep happy, least they removed him for somebody more compliant. This is the situation that Stalin was facing, because he knew full well that he was only in power at the will of those who put him there.

Yet can we consider Russia a failed experiment? Sure, in the sense of setting up a socialist paradise, sure. There was nothing socialist about Russia - it was an autocracy through and through. Yet compare it with the basketcase dictatorships of places like Africa. Russia went from a backwards agrarian society to an industrial power house in a matter of decades. Russia also managed to beat the Nazis in World War II (though did have help from us Allies, and sacrificed many, many men). They put the first object, animal, man, woman, and space station in, space. Then there is the question of the space shuttle - a part of me isn't fully convinced that the Russians never launched one either.

However, the system collapsed, and while one might champion Ronald Regan for that achievement, in reality it collapsed under its own contradictions. The problem with the Soviet Union was that without any incentive, there is no reason for people to work, and when nobody is working, nothing gets done, and pretty much society collapses. This is one of the strengths of capitalism because we are given incentives to achieve, and to achieve a high standard. Mind you, there is also the sense of competition as well, and that only works to drive us further.

Information Control

However, one of the things with this book is not so much about evil governments, but rather how people manipulate language to remain in power and to control the population. In fact this idea is something that appears no only in Animal Farm, but also in 1984. What I noticed is that both books deal with the same topic, except that Animal Farm looks at it from a broad, top down view, whereas 1984 explores it from the view of a single character. I have even heard some people go as far as to suggest that 1984 is just a much longer version of Animal Farm.

Yet language is very important, but not just language, but memory as well. This is why the Internet is so insidious because it has the effect of messing with our memory. Okay, it may appear that we literally have all the information we could have ever wanted at the tip of our fingers, but the reality is that the information we have could quite well be false. This is actually a tactic that some people use to control information - by spreading so much false information, you suddenly no longer know what is true and what is false. This is how people prevent spoilers of popular movies from being released, and that is through the use of 'false spoilers'.

It sounds a bit like fake news, doesn't it. Actually, isn't it interesting that Donald Trump has actually introduced the concept of fake news into our language. Suddenly, we see people challenging things that they don't like by claiming that it is fake news. Is that the case, is fake news something that we don't like and thus we discredit it by claiming that it is false? Or is this just another way of controlling information, by claiming that there is so much fake news out there that suddenly nobody knows what is true and what isn't.

Animal Farm was slightly different because not everything was written down, and as such because everything was handled verbally, it was much easier to control people's memories. That is the key point here, the control of people's memories. When one controls the past, one can manipulate the past into almost anything that they want. In fact I have had arguments with people that have blatantly lied about the past, and when challenged, they simply ask for evidence. This is another tactic, because if you need to dig up evidence, all of a suddenly, you have given them the victory. Maybe that is a better way of dealing with this assertions - instead of challenging and getting into arguments only to find that you have to produce the evidence, throw it back on the person making the statement and see what they produce.

A Changing Constitution

Isn't it also interesting how straight after the revolution a constitution was placed up on the wall of the barn, but as the book progresses, one by one those laws are changed. The fact that the animals can't read, and those that can, start questioning their memories, is also important. Look, don't get me wrong, constitutions are incredibly powerful documents that separate us advanced democracies from mob rule. The existence of a constitution sets out the powers of government, and limitation of those powers.

It is interesting how here in Australia, there was a lot of political resistance to a bill of rights. The main argument was that a bill of right enshrined in law takes these powers out of the hands of an elected parliament and puts them in the hands of unelected judges. At first that sounds like a good argument, until you realise the politicians generally don't have their constituents concerns at the forefront of their mind. In reality, politicians do not like restraints on their power - no rulers do, and the resistance against the bill of rights is a clear example of that.

Yet, do constitutions really have all that much power? Well, in a way yes, and in a way no, because like all legal instruments it is open to interpretation. Take Animal Farm for instance. The constitution said that no animal was allowed to sleep in a bed, but the problem was that technically, the hay that the animals slept on, was a bed, so it had to be interpreted to allow animals to sleep on hay. Further, there was the rule against drinking alcohol, but surely that couldn't be a blanket ban, so instead it was interpreted to mean no alcohol 'in excess'.

However, Constitutions should be open to interpretation because times change. Things have changed a lot since 1900 when the Australian Constitution came into being. In fact the whole citizenship mess was testament to that. Back in 1900, everybody was a citizen of Britain, but over time, Australian and British Citizenship have become two separate things. There is also the issue of Freedom of Speech. It is interesting the lengths people go to interpret what Freedom of Speech actually is. Do I have the freedom to incite race riots? I don't think so. What about hate speech? Then there is the lawfully constituted militia? Is that a police force or something else (my understanding is that it is something else).

The warning that Orwell is giving us though is to not let history become a thing of the past, to be manipulated and controlled by those in power. We need to take control of history, and to have it accessible, and free. Yet, that isn't necessarily going to stop those who seek to manipulate it for their own ends. However, one needs to equip themselves to be able to take the fight into their own territory.

The Uneducated Massess

This is where the true power lies, to those who are swayed by simple statements, and have no interest in doing any research. In fact the less educated the masses are, the better it is for the people in power to control them. You see, these people are interested in listening to well argued speeches, or tuning into debates. These people, if they vote, tend to vote for those who give them the best goodies. They are susceptible to fear campaigns, and without a doubt tend to always vote against their own interest. Consider the following video from the Chaser (warning, there is some pretty strong language here):

What really stood out were the sheep who kept on bleating 'four legs good, two legs bad', right through the book, until it was no longer convenient. All of a suddenly, out of the blue, their bleating had changed to 'four legs good, two legs better'. Yet, this was put to such success, in that during the debates, the sheep would suddenly start bleating out their sayings and all reason was thrown to the wind.

We saw this with Trump, and we saw this with Abbott in Australia. In fact we continue to see it. Take the refugee advocates. They work long and hard to fight for the rights of refugees, and as soon as it seems that they are gaining traction, all of a sudden the shock jocks hit their airwaves and completely destroy all that work. They don't even need to speak the truth - all they need to do is scream out some blatant half truth, and the main stream media will immediately eat it up. In fact, when the father of Australia's first female Prime Minister died, one of these shock jocks hit the airwaves and said that 'he had died of shame'. Guess what, he is still on the airwaves.

The thing with three word slogans is that not only are they easy to remember, but they can completely destroy a well balanced argument. The same with the idea of the core and non-core promises. The problem is that they never actually tell you which is which until the elections have passed. Sometimes I wonder whether it will actually be possible to hold politicians up to the same standards that we hold companies to with regards to truth in advertising, but then again how are we going to enforce it - all they need to a well rounded argument to justify why they had to break that promise.

It's All a Cycle

This is why I can't say that Orwell is pointing at Russia with this book, namely because at the end the pigs had started negotiating with the humans. In fact they started off selling a few things, but ended up getting more and more, until such a time that they were back where they had started. In a way you could see that this was where they were heading all along. The revolution had happened, and there was a power vacuum, and sure enough the pigs took advantage of this to establish themselves. They were clearly the most intelligent, and also the ones who were able to maintain stability.

Yet we see things aren't going to turn out all that well as soon as the milk disappears, and then when it is discovered that the pigs stole the milk, all of a sudden there is an excuse as to why it was necessary. The other thing were the dogs - Napoleon took control of the puppies straight away, and in that he became the puppies' father, he was able to control them, and keep them in line. Not only that, but they were at his beck and call.

Notice how things also move slowly, and as the years pass, and the memories become ever more distance, things slowly revert back to their mean. Once again, we are constantly reminded that what we have now is better that what it was like back then, and the further in time we move from that period, the less we can remember. In fact it is at that point that the past beings to be manufactured. The past was always worse, and the present is always much better that it ever was, and the thing is that we don't remember the past, and quickly lose any ability to compare the past with the present, to the point were the past is little more than a pure construct.

Creative Commons Licence

Viva la Revolution - Orwell's Animal Farm by David Sarkies is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. This license only applies to the text and any image that is within the public domain. Any images or videos that are the subject of copyright are not covered by this license. Use of these images are for illustrative purposes only are are not intended to assert ownership. If you wish to use this work commercially please feel free to contact me

Thursday, 2 August 2018

Boolean Algebra - The Maths of Computers

I have this theory that most of the inventions that have changed the world in which we live were actually created by a bunch of bored aristocrats who had nothing better to do with their time. Well, that's probably not a bad thing because, well, engaging in scientific and mathematical research is probably much better, and much more stimulating, than going to endless parties, invading foreign countries, and crushing peasant revolts.

George BooleSo, as we looked at before, computers think entirely in terms of 0s and 1s, and this the question arose as to how to address this mathematically. Well, it turned out that some guy named George Boole had already come up with something. Well, that whole thing about mathematicians being aristocrats didn't quite fit with Mr Boole considering that he was the son of a shoe-maker and a primary school teacher, but at the opening of the 19th Century, this did tend to put him in the middle class. However, he did eventually land up with a professorship at a college.

Anyway, enough of Mr Boole, and more on what he was actually on about, and how it applies to computer science. Well, it really comes down to the concept of truth-tables and logic. The thing is that every element, or atom if you will, has a truth value, and when you combine atoms in various ways they will produce various answers. Okay, the original algebra dealt in values of T (true) and F (false), but that was easily converted over to computer science to represent 0 and 1.

So, we have three types of expressions, or as they are termed in computer science, And, Or, and Not. Now, each of these expressions can be combined to produce Nand (And and Not), Nor (Or and Not) and Xor (or exclusive or, which then goes on to produce an Xnor, or not exclusive or). Now, each of these gates has a symbol as follows (and is expressed by the table below - the original can be found here).

Now, each of these gates are represented by a symbol, with '.' being AND, '+' being OR, and the '/' as being NOT (though it can also be represented by a line over the letter). Oh, and XOR is represented with a '+' surrounded by a circle '⊕'. This brings us to an important point, and that as some of the laws that are relevant to this form of algebra, such as the commutative law, and de Morgan's law. Now, de Morgan's law is as follows:

/A+/B = /(A.B) or /(A+B) = /A./B

and then we have the associative law, such as 

(A+B)+C = A + (B + C)

The Truth Tables

The best way to proceed here is through the use of truth tables. Basically, these tables are used to work what comes out through the gates if the certain values are fed into the gates.

Now, this might look a little odd, but they come into play when a circuit, or a boolean Algebraic problem is put before us, such as having to prove deMorgan's Law, which we will proceed to do now:

Now, as you can see, when two inputs pass through the AND gate, the output is only live (or 1), when both inputs are one. With the OR gate, the output is 1 when at least one of the inputs is 1, and the XOR gate is only 1 when only one of the inputs is 1. As for the NOT gate, well, as you can see, it inverts the input, so 0 becomes 1 and 1 becomes 0.

Now, I mentioned that you don't actually need an XOR gate because it is actually just a combination of AND, OR, and NOT gates. In fact, the NAND and NOR gates are just a combination of AND and OR gates. As an interesting side note, when we use 'or' in the English language it is in the form of an exclusive or, namely either one, the other, but certainly not both. In fact, you can create the XOR gate using either only NAND and NOR gates, as you can see with the image below (which was lifted from Wikipedia).

Now, there is a nice little program called Logism which allows you to actually construct these circuits, and to also play around with them, and I have used it to create the actual circuits which we will look at. So, what I have done is created the following circuits, and what we are going to do is to turn this diagram into a Boolean construction, and then create a truth table from it.

So, let us start off with the first gate we encounter - it is a NOT gate, and it has come from input C, so we start of with /C.

Next, we have an AND gate and the NOT gate feeds into the AND gate, so we have /C.B. 

Finally, this AND gate feeds into an OR gate, so the circuit feeds into the OR gate, so the final solution will be (/C.B)+A. 

Now there is an order of operations that is implicit with Boolean algebra, however I do prefer to use brackets to separate out components that are feeding into other components.

What we now need to do is to construct the truth table so we can see how this works, and like I did above, we break it down into components as such:

You will notice that the more inputs that we have the longer the table becomes, namely because we have to cover each of the combinations of 0s and 1s. Anyhow, I have calculated the /C, and then knowing the values of /C and AND it with B, and once we have the values of /C.B we then OR it with A, so we have the outputs for (/C.B)+A

Now, let us see if we can go the other way using the formula (A+B).(A+C).

First: we identify the inputs, which in this case are A, B, and C.

Second: We draw one NOT gate for each variable that has been noted (or rather it's complement, which means opposite). In this case this doesn't seem to happen.

Third: We start with the innermost parentheses and draw the gate in that respect, which we will do here for A+B and A+C:

Finally: We combined the innermost parentheses with the next innermost until the diagram has been completed:

A Few More Laws:

No, let us go through a few more laws to help us understand these constructions. First of all we have the identity law, which states:

x1 = x   x+0 = x

Then there is the Null, or Dominance Law:

x0 = 0   x+1 = 1

However, instead of going through each of them individually, it I'll simply refer to a table that I found here.


Some Diagrams

Now, these diagrams actually represent what is going on inside of an integrated circuit, much like the CPU in your computer (though the modern CPU is so complicated that I'm not even going to try to work it out). These circuits really come down to the interaction of switches turning on and off. So, remember how we talked about adding numbers, well, here is a circuit called a Half Adder, which adds two numbers and if there is a carry, then it sends off the carry. As you can see, it involves two gates, a XOR gate and an AND gate. So, if two 1s come into the circuit, the XOR produces a 0 and the carry produces a 1, which if only a single 1 comes in then the XOR produces a 1, and the AND produces a 0. You can probably guess what happens when two 0s come in.

Now, you could then start 'daisy chaining' these half-adders, as I have done here:

But it doesn't quite work like that because we aren't actually accepting a carry in, nor are we adding two numbers together. So, instead, a full adder needs to take into account that there might be a carry in, and once we have that aspect, we can then start 'daisy chaining' the adders:

I won't go into details on how this works, but see if you can work it our yourself.

Remembering Things

Now, while computer memory doesn't come until a lot later, I want to finish off by showing you a way that a computer remembers things. The following circuit is called a 'Flip-Flop'.

Now, the way this works is that the system will remember its state if no power is sent through. Now Logism doesn't seem to work all that well with this, but it starts off with no power, but once you put power in, it will remember a state until a further instruction is put through. These circuits are still used today, particularly in a section of the CPU known as the 'Cache'. However, as memory it is very expensive, and very power hungry, so it doesn't form a part of the computer's main memory.

Creative Commons Licence

Boolean Algebra - The Maths of Computers by David Sarkies is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. This license only applies to the text and any image that is within the public domain. Any images or videos that are the subject of copyright are not covered by this license. Use of these images are for illustrative purposes only are are not intended to assert ownership. If you wish to use this work commercially please feel free to contact me