Monday, 24 April 2017

Friday, 3 February 2017

Saturday, 5 November 2016

Why we need to move jobs from cities back into towns

"What London really has is an "all the jobs are here and nowhere else" crisis."



In London today, we have a housing crisis - that's the rhetoric at least. Well, we kind of do - there is certainly more demand than there is supply of housing in the capital; the price of rents is completely absurd with £900pm pretty much entry level even for somewhere in zone 3. This was pretty much the line I took until I moved back to the Medway and decided to do a job search from there. What London really has is an "all the jobs are here and nowhere else" crisis. I am not poorly skilled, I have a computer science degree and a number of years of experience in technology roles. However, when I came to find a job, it took me months to find anything - eventually I ended up taking a job in London with a hefty commute attached. The roles I came across in the Medway seemed to come in a few primary flavours:

The Myth: These are job adverts which are posted on a semi-permanent basis. These workplaces, usually retail stores, accept applications on a near permanent basis but are extremely unlikely to get back to you. You normally would find adverts for these jobs in shop windows. These tend to end up being zero hour contracts.

The Christmas Temp: There were a large number of christmas temp positions. This seems to be one of the primary ways of getting into a role in the area. Even office work in technical roles seems to work on this basis - you get into, for instance, a support role as a temp and then eventually get kept on as a permanent staff member. In the meantime, you basically have no job security.

The Recruitment Agency: They will attempt to tempt you in with reasonable sounding roles in the area - although in my experience you will only be given absolutely last notice sick cover work in the middle of nowhere to finish in the dead of night. You see some real gems in the shop windows of these recruiters - one stood out to me advertising a minimum wage position in a town located several miles away, doing a night shift.

The Really Specific Council Position: Pays reasonably well but you have to have a number of years of experience in some sub-specialism of something you've never heard of.

Drive To An Industrial Complex In The Middle of Nowhere: There are a number of roles in the area which are usually technical positions, however to get there you have to drive to work as they are based in rural locations (i.e. cheap rent).

There is some drive to create some new jobs in the area, but only around the well-off dockside area. In the less well off places of the area, you can expect to travel for an hour from some parts. This has a particularly worrying impact when you consider that those in the worse off areas are more likely to be unemployed - these people have far more considerable barriers to entering work not only in terms of the way that employers see them, but in terms of the effort they have to put in to get to work in the first place: They will ultimately end up receiving the same (most likely less) pay for much more time and energy spent.

"They will ultimately end up receiving the same (most likely less) pay for much more time and energy spent."


All but the last category of jobs would pay about the same as minimum wage, most likely lower if they thought they could get away with it.

It seems to be the case that even 40 miles out of London, Medway has been relegated to the position of a commuter town for London - and it would appear to be the same for many other locations in the South of England. In the towns it is the case that there tends to be enough housing but not enough jobs, and in London the other way around.

"In the towns it is the case that there tends to be enough housing but not enough jobs, and in London the other way around."


So why is this a problem? Time, primarily. For me, I spend approximately 3 hours (5 hours if I have to go to another office in Hertfordshire...) traveling to and from work each day. If my commute counted as a part of my work (which it might as well do, it's not exactly leisure time) then I would be working for a minimum of 11 hours a day up to about 13 hours a day. This is certainly not an uncommon reality, seeing as I share my train with many others making the exact same journey every day, with Southeastern failing to provision enough carriages to service many rush hour services.

We put so much emphasis on infrastructure and yet miss the point: Aren't we all so much better off if we can work near to where we live? There are many positives to this: A shorter commute, a tighter knit community, less spent on transport, alleviating some of the strain from the transport network in general and taking some of the pressure off of London to provide work for everyone.

However in the market based way in which we provision work, the best roles seem to be located in a central area where very few can practically afford to live but many can more or less get to through some often very convoluted commute (never mind just getting into London, many commuters have to traverse through the city which can be a stressful and time consuming process in itself). This of course is sort of a reasonable compromise, it seems - where most people can work at any company they are eligible, and the companies don't have to open many offices. However this all comes at the price of our time and energy.

There is also the integration problem.
 
So much of the rhetoric around anti-immigration, particularly from those who seek not to appear to explicitly support racism is the issue of integration of immigrants in local communities. The story usually goes as such: A group of immigrants are moved in, and they are all located near to one another. They all speak the same language and share similar cultural characteristics and as such form a kind of a clique. This clique gives them a kind of community which is parallel to the rest of society and as such gives rise to social tensions.

So we have to wonder, what is it about our communities that enables the isolation of such communities? In times gone by, if you moved into a particular area, you would not only live in that area, but you would work and socialise in that area as well - there were simply not the kinds of transport networks that we have in the 21st century.

If our society was set up in such a way that we not only lived near immigrants and refugees, but also worked and socialised with them, that they would not end up becoming so isolated.

Unfortunately in so many towns, the only work available is retail work or similar, with a very limited number of positions in total - with an exceptionally difficult process of getting a job when you consider that most people will have to apply to tens of positions to get one.

As such I feel that the way our towns and cities are set up is fundamentally broken for many people - particularly if they can't drive ( but even if they can, congested roads are common place). Expecting such a large amount of people to commute to work is untenable - expanding the public infrastructure to enable them to do that becomes increasingly more costly. We need to be looking at opening far more workplaces in our towns - where people can afford to live - and focusing less on simply on swelling London far beyond its point of diminishing returns.

Tuesday, 9 August 2016

An angry rant on the state of housing in London (and most likely elsewhere in the UK)

This was in reply to a friend's facebook comment about salary requirements on rentals:

If your rent is much more than 50% of your income you're going to really struggle unless, at the very least, bills are also taken care of or you plan to overcrowd the flat.

The fact that rent is so high in the first place is the real problem. The government has repeatedly said that it was going to have the private sector build more - although most companies have simply opted to build very high value properties that also aren't going to work for those on low incomes. Social housing could help, but so much of it has been sold off - especially in London - that waiting lists are extremely long.

The Tories have been ideologically opposed to social housing so they're not likely to help the situation and instead seem content to build £450k "starter" homes. Even New Labour was at best luke warm about it. I think it's worth pointing out that Tony Blair made a personal fortune from the property market representing a blatant conflict of interest.

 https://www.theguardian.com/money/2016/mar/14/tony-cherie-blair-property-empire-worth-estimated-27m-pounds

Which, incidentally, is one of the many reasons people have decided the Labour party needs to shift away from its previous status quo.

 The current government and their contractors still have yet to deliver their Ebbsfleet settlement and judging by the view when I go past there between London and Chatham progress is very slow - apparently their target is 300 homes to be completed this year out of 15,000 in total.

Gentrification is also a substantial issue, especially with welfare caps coming into force soon which will almost certainly displace poor sections of the population. In 2014 it was reported by the BBC that over 80,000 residential properties were left unoccupied (http://www.bbc.co.uk/news/uk-england-london-28349374).

All this while homelessness has doubled over the period of Tory government and mayor in the capital. Sadiq Khan seems to have become a bit quiet on trying to solve the issue and it may simply be that as mayor he doesn't have the power to resolve it.

I'm very disappointed that the Northern Powerhouse project appears to have been canned (although it did appear to be mindbogglingly incompetently managed) as a second strong city I believe is necessary to "take the load off" London for people who want to have the kinds of career prospects you often only find in London and other international capitals.

 The situation as it stands in my opinion represents decades of failure, an ideological obsession with increasing house prices and the frankly arbitrary privatisation of everything (also frustrating: when this happens in the context of a single-payer "market") - progressively making it harder and harder for people to get affordable housing. At best, the situation is incompetence - at worst it is a cynical attempt to keep artificially extracting value from the property market at the expense of ordinary people.

And breeeeaaaathe.

Thursday, 4 August 2016

Thoughts on Labour Cardiff leadership competition hustings

While, unfortunately, not a lot of new information was presented in these hustings it rather sums up how the debate has gone in general thus far. It is telling that the hashtag "#IAgreeWithJeremy" has been trending for a couple of hours now as primarily that was the theme of the debate. To understand this, you have to understand the history of the competition  as it started out with a leadership coup - a deliberate attempt to force Jeremy Corbyn to resign through media smears and coordinated resignations. Smith's attempts to emulate Corbyn's policies in this light come across as a cynical attempt to convert Corbyn supporters as Corbyn is currently set to win the leadership contest by a landslide just as he did last year. So from this point on-wards I will focus on the differences between the two candidates:

The EU was a primary point on which the candidates disagreed. Corbyn is of the opinion that we should respect the outcome of the brexit referendum whereas Smith believes that we should hold a second referendum with the option of pulling out before triggering article 50. While many of us were pro-remain (including myself) there are a few issues with Smith's stance - primarily if he is talking about a snap election (which is highly speculatory in itself), it's worth noting that two thirds of constituencies across the UK voted  to leave. Unfortunately this means that in the context of a general election, the single most divisive subject in recent political history will be significantly stacked against Labour simply because of the first past the post electoral system. The other issue that I have with it is that I believe Smith must know this - he also knows that whether or not to respect the referendum is a divisive issue in the Labour party. This is a classic "wedge" strategy, designed to split the pro-Corbyn vote. In light of all this, I am strongly of the opinion that Labour is much better positioned, in the context of a snap election, to campaign on a platform of ensuring and even improving worker's rights and providing a substantial fiscal stimulus to offset the negative financial aspects of the referendum.

There are other points of contention over Brexit such as the controversial TTIP trade deal which, in a leaked draft which was published on the BBC website, indicated that certain public health services including hospitals, if they have been privatised, effectively cannot be brought back into public ownership. If a future government does move back to a single-payer system, then the private company would be allowed to sue the government on the basis of lost profits because of unfair competition. This is effectively a form of "ratchet mechanism" ensuring that public services are run more and more by the private sector. In 2014, David Cameron was very fond of the TTIP trade deal stating that he would put "rocket boosters" on it - so presumably it is the case that the Conservatives are in favour of this kind of ratchet mechanism which puts road up blocks to single-payer health systems. Labour should be putting across the point that they will negotiate trade deals which will not undermine our valuable public services.

A moral obligation of us all, I believe, is to ensure that EU citizens who have settled in the UK and UK citizens settled in the EU should have their rights protected. I believe Labour is much better positioned to do this if they make this a negotiating target rather than going into a general election with a promise to deliver an extremely unpopular referendum.

A problem I had with Smith in particular was that he is too willing to pay anti-immigration sentiments lip service. It came across as though he wanted to appeal to those on the right but does not seem to have any particular idea about what to propose simply saying that he "would not put a finite number on it" when speaking of immigration caps. This seems both at odds with his stance on the EU but this kind of rhetoric is also the kind of thing that has enabled the infamous post-Brexit racism. By contrast, Corbyn channeled Diane Abbot drawing attention to the issue that the immigration policies for those outside the EUs are so restrictive that they stop families from re-uniting.

Another point of significant disagreement was over the trident nuclear deterrent. It is of course not particularly clear how functional it actually is as a deterrent and does cost a large amount with estimates of around £205 billion in costs at a time when we're making massive spending cuts in other areas. Cynically I'd suggest that our biggest nuclear threat is most likely to be Donald Trump acting on his "first strike" nuclear policy and sparking a war - of course that doesn't help us so much as the dead reckoning system on the trident missiles relies on US satellites to calibrate, it is not a particularly independent weapon. The immediate callousness of politicians and their willingness to "push the button" comes across to me as oddly remorseless. It is also the case that primarily our national threats are greatly dispersed, our primary military involvement is in the Middle East and our war against ISIS for which nuclear weapons are grossly inappropriate.

On anti-Semitism within the Labour party, Smith said that he thinks the party should take a zero-tolerance approach and act immediately. Corbyn is of the stance that members should be allowed due process, under his leadership members have indeed been suspended rather swiftly. The socialist Jewish outlet Jewish Voice tweeted:
Fiscal stimulus is another area where they disagree somewhat - while they both agree  that spending packages are necessary, Corbyn proposes a £500bn package involving the creation of a national investment bank whereas Smith is slightly more conservative in suggesting a £300bn spending package.

In general I felt that the hustings largely just reflected the overall debate that we've had so far with fairly little deviance between. In my estimation the crowd seemed to respond more positively toward Corbyn than towards Smith. Some of the points Smith made, particularly on immigration, echoed back to a recent episode of newsnight where he considered "small-c conservatism" to be something he advocated.

Smith also advocated "good, old fashioned socialist policies" although I do not think "old fashioned socialism" is really something many want to get behind.

Smith has a long way to go to win this contest in my estimation, and this charade continues to do more damage to the Labour Party than it is ever likely to resolve.

Sunday, 10 April 2016

A hybrid representative/direct democratic model

There are some problems with the way that we currently implement representative democracy in parliamentary democracies in many countries, including the UK. Part of the issue with this is that your representative is not always going to align with your viewpoint. For instance, I am currently in a constituency with a Conservative MP who is very loyal to the party line and who I am unlikely to change the views of by writing to them. For instance, in a previous post I made, I advocated for proportional representation - however, my MP has come out in favour of FPTP. In some sense, that means that my representative cannot effectively represent my views because of an ideological divide.

Now when you look at direct democracy, where voters can vote on propositions/bills directly, that has some benefits in the sense that it directly acts on a voter's viewpoint. Although it does have some problems such as tyranny of the majority and people who do not vote on particular bills or don't have the time to keep up to date on every little detail of every issue (i.e. most people) end up not having their views represented properly.

The idea that one of my colleagues suggested to me was this: For a particular bill, an MP would have as many votes as the amount of people in their constituency - when an MP votes, they cast all of those votes on their constituents' behalf. However, if a constituent wishes to, they have the option of voting a different way to their MP. So for instance if your MP is voting to cut welfare, then you would have the option of voting the opposite way to them. This also means that if you aren't interested in a particular issue, then you're still represented by your MP. This may also help to balance out "tyranny of the majority" since the representatives are still likely to cast most of the votes on most issues.

The main argument against such a system seems to be that historically it would have been difficult to administer. These days, however, setting up an electronic software system to do it is easily within the realms of possibility. It seems like it would be a good candidate for giving citizens more of a say in the way that their country is run without some of the drawbacks of direct democracy and to help give people power to counter other forms of democratic deficit.

I've had trouble finding any systems that work like this in practice, so if you know of any, let me know! This hybrid democratic model may well be worth voting for.

Thursday, 10 March 2016

People under Proportional Representation 11% happier than those under First Past the Post systems

Having recently come across the fact that Denmark had (although now it would appear to be Switzerland!) the highest happiness rating in the world and that it uses a proportional representation - and it certainly seems like having your voice heard could somehow correspond to happiness - I decided to investigate whether there was a link between proportional representation systems and happiness. To do this, I gathered data from the 2015 world happiness report, which countries use the List PR system (from IDEA, 10/03/2016) and which countries use FPTP (from IDEA, 10/03/2016).

Briefly, proportional representation is a system whereby the number of representatives selected for parliament is proportional to the amount of people who voted for that party. First past the post is a constituency based system whereby members of parliament are selected based on a vote taken in some geographical location; in this system a single MP runs for a particular area. If you live in the UK or USA then you are under first past the post.

Read more on FPTP vs PR

I made a reasonable attempt to make sure as much data as possible could be linked to either of these systems although a significant number of countries did not take part in the world happiness report and so were ignored. The means of the happiness scores were compared in this analysis.

Findings: PR had an 11.56% higher happiness rating than FPTP and 4.8% higher than all countries combined.

Happiness of different electoral systems (NOTE: Non-zeroed graph! Pay attention to scale - I can't figure out how to fix it and feel kind of sick anyway so...)
However, there is the caveat that the difference between the happiness given by the two systems does not exceed the standard deviation.

Countries with FPTP include the United States, the United Kingdom, Canada and India
Countries with PR include Switzerland, Denmark, Sweden, Iceland, Austria and Russia

Other notable countries include Germany who have their own system

So what does this say? It seems to suggest that countries with proportional representation systems are more likely to be happy. Certainly this is a correlation and not a causation - although a plausible cause is that people who feel they are adequately represented in government are more likely to be happy although there are likely to be many confounding factors including the country's history. It seems to be the case that Proportional Representation tends towards creating coalition governments who tend to have to come to consensus based policies rather than guided by ideology or party bias.

Download the data

Sunday, 24 January 2016

The frustrating, fragmented state of programming for mobile devices

If you want to program for a mobile device, you'll find a frustrating set of trade-offs. To introduce this topic, I'll introduce some of the major platforms for the mobile ecosystem.

The native platforms:

Android SDK 

If you go this route, you're stuck with Java. The Android SDK for whatever reason is tied completely to the Java programming language, despite Oracle using it as a rod to try and beat Google with. The API that it provides is fairly usable and there are a large number of tools which make this quite an easy process. However, this is only if you intend to target Android devices and nothing else.

Android NDK

It's curious that Google doesn't put more work into this, it seems that they try to do everything to discourage developers from using it. This is partly because applications which are developed this way will not make architecture agnostic executables. Nonetheless, the NDK has a lot of potential as a LLVM compatible compile target which could support a number of languages targeting it. However, the Google supported libraries with this are limited, it is essentially the case that you call NDK code from an SDK developed application putting limits on what you can do with it. There are some positives in that you can at least write applications using SDL, for instance, this way.

iOS SDK 

Again this is a similar situation as with the Android SDK. You have a couple of options here, you can choose to write applications using Apple's latest and greatest Swift language or you can choose to use Objective-C. Because Objective-C is compatible with C, it is also possible to write applications in C (just like with Android).  Again, though, choosing to use the native libraries ties you to that target platform.

Windows Phone

C# or something. I'm not really familiar but I assume that it's pretty good and again totally analogous with the iOS and Android situations.


What you probably notice here is that all of the provider supported phone platforms have basically zero interoperability with one another.

This goes fairly deep as Google's version of Java does not rely on standard .class files full of Java Byte Code, but instead packages code into its own Dex format (which incidentally is not compatible with any platform bar Android). The consequence of this is that, while the platform is very well optimised with Java code, no other languages in the Java ecosystem are compatible with it (which rules out Clojure, Scala, JPython, JRuby, and so on).

So we've ascertained that the standard toolkits are incompatible with one another. What are we to do? Well there are a number of cross platform SDKs:

Xamarin 

Xamarin is the most popular/best marketed cross platform framework for mobile development. It has the major advantage of creating applications with a "native" look and feel, but unfortunately is not free. It also has the caveat of only supporting C# and since it is a closed platform solution, it is unlikely to gain any developer support in terms of supporting other languages. It also seems to only provide a thin layer of abstraction between Android and iOS, meaning that you'll still have to write a large amount of platform dependent code unless you can shoehorn it into their forms framework.

Qt 

Qt has been around for a long, long time on the desktop and you can program mobile applications with it, too. Applications that you create with it will have a native look and feel, and indeed it's open source so you can use it for free. Again though, it does very little to provide developers any flexibility in terms of the tools they can use with their project and you will be using their QtQuick QML and ECMAScript/JS dialect to write your applications.

JavaScript/HTML5

There are ways to bundle your webpage into an app if you want to. Cordova is one such technology although its documentation is for whatever reason mindbogglingly obtuse to for something which you would want to use to simplify your workflow. There is also the caveat that such applications cannot resemble the native UI, and they will by necessity be running in some kind of VM which may harm battery life (although I cannot confirm this). Attempts at simplifying this include PhoneGap and Intel's XDK - even then these are not exactly seamless

LibGDX 

LibGDX is a Java framework primarily for games which targets Android, iOS, the web (using GWT) and the desktop. It does what it does very well, giving a unified interface to create games for many platforms. However, it has the caveat that it is domain specific (you can see this as a strength or a weakness). It also has a user interface library which you can use to create stylised (but very non-native looking) UIs. This is a strong candidate if you're a game programmer who wants to target multiple devices.

---------

While there are a plethora of solutions for creating different kinds of applications for the mobile platform, some of them even interoperable with desktops, it's striking that there's also no highly unified, open way of creating mobile applications which allows you to use your own tooling, your own choice of language - essentially what I'm trying to get at here is that while there are several highly targeted platforms for mobile development, they are all quite tied down by their limitations. This is not the same on the desktop where you can have a new language, for instance Nim, which can be made compatible with all of your existing libraries through foreign function interfaces or you can develop native-look applications with any of a multitude of free libraries which have wrappers for a vast amount of programming languages.

Even Java, the venerable advocate of portability, has been torn apart by this situation where under Android its implementation is highly non-standard, its implementation is far behind the language specification (Java 8's first stable release was in March 2014 and is still not supported even though it is the platform's major language; the JEPs for the language dating as far back as 2011) and its ecosystem is barely supported at all (with the notable exception of its IDEs). Nobody seems to be attempting to write backends for other major programming languages which target the Android Dex bytecode format. There is, for instance, no Dex backend for LLVM (at least not that I can find).


It's hard to tell what the future holds - I imagine that in the distant future it might turn out that WebAssembly is used as a standard target running in a small VM on phones. Ultimately it would be good if the companies involved could band together and attempt to standardise the situation somehow but of course they have vested interests in trying to make developers focus on one platform or the other. It's important to remember that the reason this happened on the desktop is because the x86 architecture became dominant and everybody just targeted that. In this brave new world of hardware agnostic phone OS vendors that is no longer possible. Of course it's a good thing that hardware vendors can be competitive in the mobile devices industry, but the fact that the abstractions don't play nice together is problematic.

It is worrying that the major player with regards to cross-platform compatibility seems to be Xamarin with their closed, pricey, solution that still requires you to write a lot of device dependent code. Frustratingly it seems that the best solutions at the moment are either to write your application n many times for the platforms you wish to target or use the web as a target since that is also supported everywhere - Qt probably offers the best trade off between these solutions as it stands and LibGDX is great if you're interested in implementing a game.

Wednesday, 23 December 2015

Nimble Explorer

Nimble Explorer is a small website I've knocked up which allows you to search for packages for the Nim language contained in the its package manager Nimble. It's written almost entirely in JavaScript and Nimble, making use of JSONP to retrieve the Nimble's JSON file from Github with a backend which caches the JSON file for browsers which do not support JSONP properly as a fall-back.

It uses Fuse.js to power its search, and explorer.js (the front-end JS file for nimble-explorer) enhances this somewhat by implementing a search narrowing mechanism (specified by space separated words) and searching for tags. The search mechanism was quite easy to work with, although required some tweaking before it worked sensibly.

At this point it's quite usable, and will even work in many browsers in Google's cached version of the page (which is useful in case Linode, my host, decides to perform some surprise maintenance).

This is also the first time I've set up a web deployment mechanism using Git and it's working very smoothly which is nice

Monday, 23 November 2015

HOG+SVM for gun detection in CCTV images

I have made a small collection of training data (currently around 18 images images, in two sets of 9 of people with guns and people without guns) and have made a basic implementation which attempts to guess whether somebody has a gun using support vector machines based off of 128x128 CCTV camera stills of people either carrying a gun or not carrying a gun. The present implementation appears to overfit the data so I will attempt to resolve this; it always correctly classifies everything in the training set but usually errs to the side of false negatives when  classifying test data from casual observation.

Progress to be made on this:

Collect more images (ideally 50 with guns, and I can take the rest of the images from pre-existing person reid datasets like ViPER - edit: may need some images from scenes in which guns appear in case the detector becomes influenced by the lighting/other composition of the scene.)

Find out how to regularise(?)/prevent overfitting in the model I've come up with

Formalise the analysis stage.

The source code for this version of the program can be found here:

http://pastebin.com/nz5cQx3k

To be honest, you can get rid of that opencv dependency.

Sunday, 22 November 2015

An eye for guns

In my upcoming series of posts, I will be exploring ways to automatically detect armed attackers in CCTV feeds using Python and OpenCV. Of course I'm sure the motivation for this given the recent terrorist attacks in Paris, Mali and others is obvious. The scope of this is currently quite broad, so I will attempt to narrow it down to some key points:


  • Reliable detection of an AK-47/Kalashnikov rifle from a low quality video feed.
    •  The motivation for this should be self explanatory
  • Suspicious body language detection
    •     There is some reason to believe that body language can be indicative of unusual behaviour. Being able to detect this may lead to effective tracking of suspicious individuals before they are capable of executing an attack
  •  Suspicious dress behaviour
    •  The attackers in Paris dressed in dark clothing and attacked at night. This could prove challenging, however in combination with body language detection a useful detector could be produced.

Goal one:
AK-47 detection in a still image - this will hopefully lend itself to progress in a real-time video detection scheme. More specifically, this should be a gun currently being carried by somebody rather than just in some luggage. This may be extended to potential containers for an AK-47 as they must be transported somehow.

Literature dump: 
http://www.sciencedirect.com/science/article/pii/S1877050915014076

http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=7253863&url=http%3A%2F%2Fieeexplore.ieee.org%2Fiel7%2F7227935%2F7253613%2F07253863.pdf%3Farnumber%3D7253863
http://cvgl.stanford.edu/teaching/cs231a_winter1415/prev/projects/CS231AGun.pdf

http://airccse.org/journal/ijcseit/papers/2212ijcseit16.pdf

http://staffnet.kingston.ac.uk/~ku33185/MEDUSA.html
... + more but lazy.

Edit: The MEDUSA project looks like a promising source of information, although appears like it may have been underfunded.

Youtube has a large collection of videos involving potential attackers and mock attacks which may contain highly useful training data for supervised learning based detectors.

Labelling data may prove difficult. I will have to evaluate whether it is worth doing it myself, generating the data (3D images can be effectively be used for object recognition in combination with domain adaptation techniques).

I would ultimately like to come up with some affordable way to disable firearms within a room - although my initial thoughts on this remind me of a children's TV show where the contestants would be covered in some kind of gunk - thinking about the way custard works - perhaps a more hardy non-newtonian fluid could be used to jam a rifle? 

Should I be successful in any of these topics, they shall of course be free and open to all so that hopefully these systems can be implemented to help prevent terrorist attacks in major cities and for those who are otherwise interested in learning about computer vision applications. A hefty research grant of course would not go amiss. 

Thursday, 3 September 2015

Google Docs voice recognition (as written with it)


 So this is kind of my first go with Google Docs  voice recognition system and thought I'll give it a try because I've been reading about it a lot [articularly on Facebook. So I thought it would be a good opportunity to write a probably reasonably low quality blog post. Let's talk a little bit about how voice recognition has been used in the past. so most recently with Google we would probably think of the okay Google search feature that has been included in Android phones since  about version 4. Now as I type this I notice that I am having to go back and correct thae reasonable amount of what I've been talking about  I also find myself speaking more slowly and clearly than I normally would in order to give the speech recognition a   reasonable chance. however in general the accuracy does seem to be reasonably high especially given that I think I have quite a blocked nose at the moment which simply cannot be helping the the accuracy of the recognition or least use of the recognition. Since I have to end my sentences manually using a key word which I am not allowed to use  at the moment it does break up the flow of the diction a little bit.

 it's also pisses the way by Walt and fax using the wrong microphone. I'm sorry.  Apparently my microphone was somewhat too quiet and Google was struggling with it a little bit, not that I can blame them. Now that I have adjusted my volume setting it seems to be picking up things much more readily and is a little more responsive in general. So what can I say about this it seems that all you have to do is some fairly common sense configuration but in the end it actually seems to be doing a fairly remarkable job, so remarkable in fact that I'm not going to stop talking simply because it's quite interesting to watch.  Woohoo. in fact that is not what I just said but I actually attempted to use my falsetto to sing to the voice recognition system and apparently it picked that up as a woohoo which I'm going to take to mean that that it was good because  woohoo.

In general what seems to be a fairly solid voice recognition system although there are some keywords which you can't seem to get around not being able to say and I don't know how you work around that. my recommendation would be that you just try it see how you find it see if it works  well with your setup and you know happy Google doc’ing.

Saturday, 29 August 2015

fw2.xyz - a descriptive url service

Let me introduce you to my most newly released little experiment, fw2.xyz 

Forward2Xyz is a service which allows you to build a url, for instance, such as fw2.xyz/the.megas.history.repeating.youtube.full.album (which I choose primarily because that band has been my most recent choice of work music) and have it magically direct you to the appropriate page. In many instances, it also successfully gets preview generation from sites such as Facebook.

Let's talk a little bit about the motivation for this - "why would I want this?" is always a good question to ask yourself. The scenario I have in my head is that a user wants to be able to share something that is reasonably commonly known (hence appears on google - which the site relies on) but cannot remember the exact URL.  Normally this would involve the user going on to find the URL using google, then copying and pasting that into whatever message box they were going to use.

With Foward2Xyz you simply type in some description of what you would like to type in directly into the URL (it will accept spaces, but most social media sites won't recognise the whole thing as a single link so periods or plus signs are recommended - periods are probably easier for most users as they don't require use of the shift key)

So what are the advantages, for a user, of something like this?

The URL is descriptive - it would be quite hard to Rick Roll somebody using a URL like this, for instance, unless you were seriously committed to SEO. Youtube on the other hand obscures the title of the video in their URLs opting for some non-human-readable key fw2.xyz/never.gonna.give.you.up

 It's very easy to type into a text input box and most social media sites will use it appropriately meaning these kinds of links are easy to share.

It's resistant to typos - this is the advantage of using Google's search for the back-end.

The resulting URL is sometimes even shorter than the actual URL of the page - although this definitely depends on how specific you need to be to get the right page.

But as with all things of this nature there are some disadvantages such as:

Non-persistence of URLs - these links are not necessarily reliable as they rely on Google search results. I think this caveat is not necessarily a huge problem as the use case is supposed to be for people sharing things on social media or IM meaning that the lifetime of the link is limited anyway.

You might not get the page you expected.

People may not trust the service (but you should definitely trust me. I'm from the Internet after all!)

Saturday, 11 April 2015

Top 5 Your Game Jokes

So there was a conversation going on between people on #gamedev on twitter with the most amazing type of joke - jokes insulting your game! These are Your Game Jokes. So without further delay here are my top 5 your game jokes.

5. Your game has such little gameplay, they started calling the YouTube videos "Let's Reads"


From @keadin

4. Your game's so bad, not even Anti-Virus programs thinks it's legitimate software.



3. Your game's so bad, you'd even make ET the Atari game wanna leave this plannet!



2. Your game's so bad it killed gravity!



1. Your game's so unbalanced, it needs orthopedic shoes just to avoid falling over.

From @keadin

Saturday, 4 April 2015

436Tap - addicting game released!

Test your concentration with 436Tap, a free casual Android game developed by yours truly from here!

This is of course a google play games free download! :)

https://play.google.com/store/apps/details?id=com.perceptrobyte.match436.game.android

Can you beat my high score?
Here's to this and hopefully more maths games or otherwise addictive mobile things!

I look forward to your feedback!

Just crushed the last couple of issues...

Just crushed the last couple of issues that were keeping me from releasing 436Tap!! - a resource leak and have made a couple of tweaks to the difficulty level. So I will be uploading the current build to the Play store! See you when it's fully published!

Wednesday, 1 April 2015

Tumblr

You can now find all game development related posts mirrored on my new Tumblr account! Check it out here: http://perceptrobyte.tumblr.com

Into the land of mobile development

It has been a recent dream of mine to run away and build a startup - my first tentative step into this is to start building small Android mobile games in the hopes of getting my foot some way into the door of casual gaming. My first real attempt at this is a fairly simple reaction memory game for which I've made a fair amount of progress over the last few days - in the practical sense it is currently functional, however it has a couple of bugs to work out in both the technical sense and the interactive sense.

However I now have a list of features that I can add which should make the game a much more enjoyable experience. These include tweaking the difficulty curve and making sure the user's hand does not obstruct the screen - so for this I'm lucky to have some friends who are willing test subjects. The moral of the story is live, naive user testing is a good idea. Naturally adding the most evil features, social media sharing and ads, took a disproportionate amount of time to get right.

Having looked at the numbers, it seems like getting hold of a low cost iPhone development platform might be a good move. iPhone 3GS's seem to be going for less than £40 on eBay right now.

Anyway, for now here's a screenshot of what you see when you get a game over in the app as it currently stands:

My current highest score :D

The banner at the top was an interesting idea (this also appears at the start screen) - I wondered how I could best get across the gameplay concept simply and decided that indicating that you had to look for the middle value and a sequence of 4,3,6 followed by a tap from the user could be illustrated as it is to the left. However, from what I found, this does not translate well to intuition for the user of the game. As such I will be adding some explicit instructions.

You may also note at the bottom right the new logo (don't steal, it is my eye-P ;)) and identity for my one man shop named after this blog.

I've been using LibGDX for this project - so far it has shown a great amount of promise and a good tradeoff between flexibility and quirks, given it can target most platforms a casual games maker would be interested in. In particular I like its abstractions for hardware accelerated graphics - although I'm finding the UI system somewhat cumbersome. (particularly in terms of skinning - some things are available in code which are not available in JSON, or at least aren't easy to find documentation for); however that does its job well, too. I would definitely recommend for rapid development work when you want to target multiple platforms.

It is surprising how much work can go into designing a relatively simple game if the concept is novel (as far as the designer knows ;)). Hopefully after the next iteration of features it will be ready enough ship and that's what I'll be posting about - and if I don't, I guess I can always just say "April Fools!"

Monday, 9 February 2015

In continuation of my last post...

Here's something interesting.

http://www.immortal.org/5211/new-34-smartphone-device-tests-hiv-syphilis-15-minutes/

A smartphone device which can perform tests on you to determine whether you have syphilis or HIV in a convenient and compact form factor. While this kind of technology no doubt has a legitimate premise and obvious usefulness, given the sort of dealings some tech companies seem to have in ethically questionable research, potentially giving them access to this kind of information could be a little unsettling.

(the aforementioned post)

Saturday, 21 June 2014

Software Engineering - science or marketing?

The software development metholodogy, the essential of the man who wants to organise a band of ragtag programmers into a team of professional engineers who produce a working product that is delivered on time and meets the requirements of the project. The latter statement is always  point of contention as what was a requirement is no longer a requirement, and what wasn't a requirement is now completely critical to the success of the project. The common adage is that there are two things that you can guarantee about software of any reasonable complexity: That it will be late and contain bugs. Modern software development methodologies attempt to tackle this, and so I would like to understand exactly how well they do this - if at all. We will talk about software in the context of experimental science rather than of mathematical science, because that is by and large how the field of software engineering is practiced today outside of some highly specialised fields.

Let's talk about something else for a second. Let's talk about medicine. Medicine is the great bastion of empirical study in the 20th century. The use of experimental science in medicine has gone a long way in terms of treating disease. If you go to a hospital, and your disease is relatively well understood they will tell you how they will treat it and roughly how long it will take for that treatment to take effect or in the case of surgery, how long you're likely to take to recover. To anybody in software, let's be honest, that's magic. The refinement of medicine as a field in this regard is entirely down to the state of research in the field. I'd highly recommend the book Bad Science if you're at all interested in finding out the consequences of ignoring research in a medical setting and leave it as an exercise to the reader to consider how that might be analogous to the same situation for developers. 

So naturally this is a good time to look at the state of research in software engineering. Let's look at the high level. The replication study is an important part of experimental research - it is the thing that says "yes, somebody who didn't think of the original hypothesis is capable of getting those results too." It verifies the fact that the results weren't just a fluke, the result of selection bias or some similar phenomenon. It has been shown that while the state of replication studies in software engineering is improving "but the absolute number of replications is still small," (da Silva, 2014). In a lot of regards, this conclusion makes sense. Replication studies take time to complete and software engineering is still a relatively new field. However, it's worth noting that this highlights the immaturity of the field. 

Let's look at a more typical piece of research that tries to yield some meaningful conclusion about a particular software development methodology. This particular study, entitled Realizing quality improvement through test driven development was conducted by Microsoft Research and published in the journal Empricial Software Engineering. The conclusions drawn by the article are stark and seem to be highly in favour of the Test Driven Development methodology, it reduced defect rates between 40% and 90% in the projects studied, while only increasing development time by 15-35%. Sounds like a good trade-off right?

The paper was based on four case studies. This should ring some alarm bells - this figure isn't statistically significant. Case studies are not worthless, but are not particularly useful for drawing generalised conclusions that imply your project will act similarly. Not to mis-represent the study, the researchers acknowledge this also, stating that "a family of case studies is likely not to yield statistically significant results, though Harrison (2004) observes that statistical significance has not been shown to impact industrial practice." and later go onto say that they hope that the case studies contribute to the pool of empirical software engineering research; that we will hopefully be able to draw conclusions from such studies being conducted in different contexts. The (cited!) statement about statistical validity not affecting industrial practice is an interesting one, though. Indeed the article they cite there is entitled "Propaganda and software development".  Going into that article, it talks a lot about how peddlers of methodologies try to get people to "jump on the bandwagon" and use emotive language rather than reason to try to get people to use a methodology.

So let's briefly talk about Agile. Agile seems to be the poster child of modern development methodology in industry. It represents the antithesis of everything that the waterfall model stood for. It is definitely sold on reason and language more than it is sold on evidence (in the sense of research based evidence that I am talking about in this post). If you look at the Agile Manifesto, what I am saying is highly self evident. It's marketed more than it is argued for. I'm not necessarily saying that Agile or its child methodologies is the wrong way to go, and this post isn't talking about the specifics of the Agile methodology but rather what we really know about it.  Somewhat more sinister is Scrum, an Agile based development framework, which (successfully) sells people training courses. It makes some vague notions about following empiricism on its website, although at a cursory glance does not seem to link to any articles to that effect although does point at a few sciencey-looking graphs (with no citations of which to speak). Again, this is marketing above research.
Graphs!

But let's take off the tinfoil hat for a moment and go back to talking about research. So if we have some research, but realistically we cannot study large samples in one go, what can we do about that to start to draw generalised conclusions? That's right! The meta-analysis (this is the research tool which is used to aggregate many individual studies - so you can take many small studies and treat them as one large one, placing weight on the studies which have been conducted most properly). It turns out that there are some meta-analyses  on the subject of software engineering, which is good. I managed to find a meta analysis on the subject of Test Driven Development, which makes a nice comparison to the Microsoft study above. The conclusion that they came to were that the effects of TDD were relatively small, although larger if you only look at industrial studies rather than academic ones (Rafique, 2013).


What I'm not really trying to do here is to draw any conclusions on what we should or should not be doing in regards to any particular software engineering technique. I am rather trying to understand whether software engineering, as an industry, really knows what it's doing. I suspect that the answer is really "sort of" - in the sense that there are some subjects which have been reasonably well studied, but we're doing a lot of it because management thought it was a good idea or the marketing material for it seemed quite good. Similar problems in terms of research in software engineering are seen in social sciences, because it's very hard to reliably study groups of people. The other spin I had on this post was that I might have titled it "Software engineers are not sociologists, but should they be?" in that same vein. I kind of imagine that all such subjects are kind of like medicine was pre-germ theory, which is incredibly exciting when you consider what might be around the corner when we discover the 'next big thing' in terms of software engineering methodology - although worrying if you consider the analogy of what we're doing at the moment.


References to non-hyper-linked papers (can't link to the full text because I've accessed them through my university and distributing them would likely be naughty):

Silva, Fabio ; Suassuna, Marcos ; França, A. ; Grubb, Alicia ; Gouveia, Tatiana ; Monteiro, Cleviton ; Santos, Igor

Empirical Software Engineering, 2014, Vol.19(3), pp.501-55

Yahya Rafique and Vojislav B. Misic, IEEE transactions on software engineering, 2013