My initial proposal is to change the on-topic wording to:
Questions you may ask:
...
Writing software for Ubuntu or setting up a software development environment on Ubuntu. Note that general-programming questions are better suited for Stack Overflow and may be closed or migrated.
With the link to this Meta post (or a future Community Wiki) with examples (to be added) of questions that would be appropriate and those that would not.
The small wording change puts the burden on the question being about Ubuntu, rather than just something that the developer may be tangentially using. It also prevents boat-meme types of questions, where "on Ubuntu" is appended just to try to make a general programming question on-topic.
Examples and guidance for on-topic questions
An answer to the question is likely to be Ubuntu-specific.
Shell-scripting questions, within reason, since shell-scripting is a common system-administration task of high importance to Ubuntu users.
Installing or fixing issues with development tools or libraries on Ubuntu.
More to be added
Examples and guidance for off-topic questions
To be added