Chinese spam – a source of eternal amusement.

This article should take around 1 minutes 53 seconds to read.

One of my spam black holes does nothing but pick up Chinese spam.

None of it ever has links in it so I don’t normally do anything with it however sometimes when I feel like being confused I run it through Google Translate.

Apparently, the blue text in this message reads

Support text <quiet edge sound> word and language <rock stone wear empty> sound chat <evoke two clear Qing dynasty> day mode <蓦山溪>, the highest <驿外断桥边> can <tear marks residual> get 58<白鹤 江入京>8电<凡九阕>子游<卮酒向人时时>Art<近中秋>15<年年年为花愁>重<不卷卷幕人>曲,巨 <杯再拜> cost-effective . <正目断>Company’s entry into the <Jun Watch> section no <Qingmen are scrap> upper limit

This is not some Chinese fortune cookie spam but down to hidden elements within the text, the original text doesn’t contain any “< >” characters yet the translated text does

Looking at the HTML of the message confirms this.

Removing the “< >” from the input text give a much more sensible translation.

Support text and voice chat mode, up to 588 electronic entertainment 15 songs, huge cost-effective. No deposit limit for company deposit

Still no links etc. but at least I know what it’s about.

Continue Reading

Keeping users safe from hate.

This article should take around 2 minutes 56 seconds to read.

Facebook and Twitter, two of the most popular (in the “west” at any rate) social media platforms both have a (well deserved) reputation for being places where hate festers.

Both Facebook and Twitter are worldwide communities, anyone with a working internet connection can signup and become friends with anyone else in the world.

The flip side of that is they can harass and intimidate anyone else in the world.

That hate is not only bad for the users, but it’s also bad for the company, people harassed tend to leave the service.

This isn’t a technical people so much as a social one. Of course, hatred of others is a problem as old as humans, over time it’s served us well, when we lived in small groups of up to 150 odd people, distrusting the village on the other side of the hill, or people who didn’t do as the wider community did, was a successful system. However, as time’s gone on, we have lived in larger and larger community’s and the hatred and distrust of other groups have become less and less useful.

Technology such as content filters are a technological solution and are an important but limited solution. Another prong is to combat the social problem directly.

Of the two social media platforms noted above it is Twitter which has the worst problem with online hated, I believe this is in part due to how Twitter allows interaction. In order to see a post on Facebook, you must either be a member of a group and have a post posted to that group, or friends with another user, whose posts you then can see. In order to be friends with someone, you need to request a friendship and have them confirm that friendship. With Twitter in contrast by default all posts are public and can be responded to by anyone. This open model has allowed Twitter to grow rapidly but also allows anyone to contact anyone else, giving harassers an opening.

It appears, and my personal observations support this, that friends don’t harass you, but friends of friends do. Once you’re removed from knowing the person you’re talking to its far easier to harass them.

Given the above point, it appears the root cause of the bulk of the harassment on Facebook and Twitter is the comments of people you don’t know. And so, assuming, the goal is to minimise harassment, a Facebook-like “friend” system (rather than Twitters follow system) where you can’t see the comment of people, you’re not friends with sounds like a good solution. However, this limits what you can see, it may be better to allow users to “see” anything but only to be able to respond to things if they are friends of the OP, and throes comment be invisible anyone other than the OP and commentator (and backend services).

Continue Reading

Universities: Is free speech under threat?

This article should take around 11 minutes 21 seconds to read.

In this article, the BBC asks the question “Is free speech under threat?“, And I hope to add to that discussion with this post.

But first, let’s discuss what exactly is meant by “free speech”. The concept of free speech hasn’t always existed, it came about due to a group of thinkers called the utilitarians who professed that the best way to govern actions was for the maximum “utility” i.e. what was in the best interest of the majority or as the movement’s founder, Jeremy Bentham, is reported to say “the sum of all pleasure that results from an action, minus the suffering of anyone involved in the action.” (Theory of Knowlege).

One of the most famous proponents of Utilitarianism, John Stuart Mill summed the notion of free speech up as :

I choose, by preference the cases which are least favourable to me – In which the argument opposing freedom of opinion, both on truth and that of utility, is considered the strongest. Let the opinions impugned be the belief of God and in a future state, or any of the commonly received doctrines of morality… But I must be permitted to observe that it is not the feeling sure of a doctrine (be it what it may) which I call an assumption of infallibility. It is the undertaking to decide that question for others, without allowing them to hear what can be said on the contrary side. And I denounce and reprobate this pretension not the less if it is put forth on the side of my most solemn convictions. However, positive anyone’s persuasion may be, not only of the faculty but of the pernicious consequences, but (to adopt expressions which I altogether condemn) the immorality and impiety of opinion. – yet if, in pursuance of that private judgement, though backed by the public judgement of his country or contemporaries, he prevents the opinion from being heard in its defence, he assumes infallibility. And so far from the assumption being less objectionable or less dangerous because the opinion is called immoral or impious, this is the case of all others in which it is most fatal. (“On Liberty” 1859. ed. Gertrude Himmelfarb, UK: Penguin, 1985, pp. 83–84)

It has also been described, more restrictively, as governments not being allowed to forbid people from expressing their ideas, however as JS Mill is closer to the original concept of free speech then I and, his views are more maximalist than restricting the concept to government interference I think it is right to use his notion.

So is free speech under threat in UK Universities?

I will argue that free speech, as described by JS Mill doesn’t exist, either at UK Universities or in the UK in general, and moreover isn’t something that is desirable or even possible, but in the scope that it can be enacted, the limiting of free speech isn’t from the direction the BBC article suggests it is.

In my reading, the key section from the passage above is “It is the undertaking to decide that question for others, without allowing them to hear what can be said on the contrary side.”, I.E. in order to be fair and come to the right decision one must hear both sides of an argument. Is this what we seeing within UK Universities? Are students and staff having their access to “both” sides of a discussion restricted?

Firstly the phrase “contrary side” in JS Mills quote is interesting, It assumes only two sides to an argument. However, as anyone who has ever discussed/argued anything with anyone will know there tends to be more than just to points of view within an argument, to quote ambassador Kosh Naranek “Understanding is a three edged sword: your side, their side, and the truth.”, but let’s assume that JS Mill et al, really mean you need to hear all sides. Is that something that should happen? What would it mean to hear all sides of an argument? Let’s imagine it for a second, let’s pick a self-evident truth, 2+2=4,  according to the expanded JS Mill’s statement, we should not accept this until be first hear, not only that 2+2=5, but that they equal six, seven, eight ad infinitum.

Those who argue for a maximalist free speech position have argued that in the marketplace of ideas the notion that 2+2=5 will be shown as false and people will gradually see that 2+2=4. Firstly this assumes a linear progression of ideas, it assumes we never go backwards while personally, I find that notion quite reassuring there is surprisedly little evidence for it. Additionally, and more importantly, it assumes the neutral observer is able to know a priori the correct answer. If we go back to the question of what 2+2 make, if I were to choose to argue the answer as 5, I would say something like “The + sign mean add and add 1 to the numbers either side of it so 2+2 becomes 2 add 2 add 1, which equals 5”, someone else may argue that in fact the + sign means subtract 2 from the number to the left and add it to the number on the right, giving an answer of 2. People may, of course, ask for proof that the + symbol does mean what I say it means and of course I could produce any number of mathematical texts showing that to be the case.

How then is a neutral observer, unaware of the standard meaning of the + sign, to determine who (if anyone) is correct? Clearly, all this is going to do is prevent our understanding, rather than help us move forward. We, therefore, need something between blindly accepting 2+2=4 and the navel-gazing of exploring every possible option, with no means of determining its validity?

Of course, those who argue for free speech aren’t calling for the discussion of every possible option, they want to limit the range of options to a socially acceptable sub-set. The BBC article linked to at the top acknowledges that the NUS has banned six far-right groups from speaking and doesn’t question the legitimacy that, but other incidents, additionally, the Former Met Police Assistant Commissioner, Mark Rowley, says giving extremists “air time… plays to what extremists are looking for” And no one condemns him for limiting Choudary’s freedom of speech.

Where are these boundaries? What is fair to say and what isn’t?

Far from being fixed these boundaries, are of dependent on the audience and to a lesser extent organizers view of what is an acetabular view at that moment in time. It is important to note that these views change over time, even a relatively short space of time, and for those who miss the change in norms the result can leave them falling foul of such changing values. For example, in September 2013 the British politician Ian Davidson suggested that the debate on Scottish independence was continuing only “in the sense there is a large number of wounded still to be bayoneted”, this drew the ire of some in Scotland, but little beyond that, however in June 2016, the Labour MP Jo Cox was murdered because of her pro-Europe views this lead to a sea change in the way politics was discussed and the appropriateness of inflammatory language such as Ian Davidson’s. To the extent that in 2018 when some Tory backbencher was quoted as saying: “The moment is coming when the knife gets heated, stuck in her front and twisted. She’ll be dead soon.” there was a huge outcry from all political parties. Clearly, there has been a shift in what is acceptable language to use within political debates within the UK.

But this isn’t uniform across a population, different people have different norms they accept. So for example what would be an acceptable language for a far-right meeting would most likely not be acceptable for a far left meeting.

Clearly what is meant by “free speech” is very much down to the audience.

As we’ve seen the idea of a universal maximum “free speech” is not something we have, not something we’re ever likely to get and not even something we should desire. Instead the concept of “free speech” appears to be nothing more than the ability to say things your audience doesn’t find abhorrent.

Even so the idea that we should allow a wide range of views is an important one. With just a narrow range of views being heard it become difficult, if not imposable to move our understanding and society forward.

The what are we to make of the student protests against a number of recent speakers at UK University?

To understand the effect of these student protests it is worth understanding what the protests were protesting against.

To quote from the article

Feminist writer Germaine Greer and LGBT rights campaigner Peter Tatchell both delivered talks despite complaints at their presence.

There have been cases – like that of YouTuber Sargon of Akkad, whose talk at King’s College London was interrupted by protesters, or ex-Muslim feminist campaigner Maryam Namazie, who was heckled by some students at Goldsmiths – where speaking events have been disrupted by a small number of vocal students. These were not institutional bans.

Warwick students’ union did try to block Ms Namazie from speaking, a decision which was reversed after public pressure.

In all these cases the protests where against talks delivered by individuals. There may be some who misunderstand what a talk (or lecture) is. Normally the invited speaker stands an talks to a self-selected audience of students, faculty members and sometimes members of the wider community who are interested in what the speaker has to say. At the end of the 45 minutes to an hour talk, there is sometimes (but not always) time for questions, there are often more questions then the speaker has time to answer and most speakers are able to string out questions if they haven’t planted them with students who look favourably upon the speakers point of view.

The whole set-up doesn’t encourage debate and the consumption of multiple views instead it only provides a single view, there is, however, a counter view in the scenarios listed above, the student protestors themselves.

It can be argued that far from limiting free speech the by protesting they are in fact providing the counter position that is missing from the talk, and so, therefore, the “proponents” of free speech who are critical of the are limiting the discourse in that instance, they of course arn’t in the instance of the meta discussion, as their view is as unabhorrent as mine.

Continue Reading

Can we use PHP for machine learning?

This article should take around 2 minutes 57 seconds to read.

In response to a question asked on a facebook group…

The simple answer is, yes you can. but before I explain how, I need to give a quick explanation of what “Machine learning” or “Artificial Intelligence” is.

At its heart “Machine learning” isn’t magic, it isn’t a black art, it is a set of algorithms which used mathematical functions which can be used to look for patterns in data.

Imagine you have two groups each containing a number of items.



and you have a single number you know belongs in one of the two groups but your not sure which one


Which group do you think the number belongs in? The first set contains mostly lower numbers and the second set mostly numbers above seven. So it’s likely that the item belongs in set one.

Automate this and you have machine learning.

Machine learning, therefore, can be implemented in almost any language, you just need to implement the relevant algorithms.

Sadly for all but trivial cases, such algorithms are hard to implement.

Thankfully Microsoft, Google, and Amazon all have API that can be used to implement Artificial Intelligence within your own applications.

Since all the API are web-based they can be accessed by any application which can make web-based calls, and so PHP can be used with the API’s.

Microsoft has five main types of cognitive services.

  • Vision – Image-processing algorithms to smartly identify, caption and moderate your pictures.
  • Knowledge – Map complex information and data in order to solve tasks such as intelligent recommendations and semantic search.
  • Language – Allow your apps to process natural language with pre-built scripts, evaluate sentiment and learn how to recognize what users want.
  • Speech – Convert spoken audio into text, use voice for verification, or add speaker recognition to your app.
  • Search – Add Bing Search APIs to your apps and harness the ability to comb billions of web pages, images, videos, and news with a single API call.

Which allow you to implement a wide range of functionality. Best of all, if you don’t already have an Azure account you can sign up for one for free and get more than enough free credits to build something amazing.

Continue Reading