Regarding the on-topic policy for programming questions, a few considerations pop into my mind:

 - There is no reason whatsoever to create a strict line between the
   different SE sites. On the contrary, *some* overlap is extremely
   useful. It is non-sens furthermore to assume strictly Ubuntu-related
   programming even exists.
-  Note that it is quite weird to allow (for example) text processing,
   as long as it is awk, grep, sed, wc or alike, then suddenly say if we
   do the same with (e.g.) python, it is off-topic. Also note that all
   of these tools *aren't specifically Ubuntu at all*, not even
   Linux-specific.
   
- On a personal note: I am programming for Ubuntu on a daily base. I
   the early years, I learned *a lot* by writing stuff on Ask Ubuntu;
   scripts, tools, mini-apps. Some more or less specifically for Ubuntu,
   but much stuff could and would easily be considered off-topic in a
   rigid conception. Would I be better off on SO? I doubt that, but it
   simply wasn't my environment.

In short: If there is no way to relate a question or answer to Ubuntu or programming for- or on Ubuntu, let's close it. But also: let's not too eager to create an artificial line that does not exist in reality, closing off a big potential of the site.