The line is vague and blurry and comes down to how you and other community members place the question on this diagram (which is prominently displayed in the FAQ:
A lot of questions do fall outside the blue area, but there are some general sounding questions that do fall inside it as they do require the expertise and experience that only another software developer can bring. It's difficult to describe what such a question would look like and I don't always see it even when others point it out, but they do exist.
I don't know why one question attracted close votes (and possibly flags) and the other didn't, but clearly at least two community members thought that the first question didn't fit.
There isn't a "one size fits all" solution to this problem. Each question must be taken on it's merits and treated individually. What you should consider doing (in no particular order):
- Edit the question so that it does fit - but without losing the intent of the author.
- Vote to close where the question cannot be made to fit. Flag if you have less than 3,000 reputation.
- Vote to reopen where you think a question has been incorrectly closed. You may want to discuss in in chat or here on meta to get other user's views. If absolutely necessary flag it for moderator attention. Please note however, that you are more likely to get a question reopened if you have edited it to correct the original defects.
So, if you think that https://softwareengineering.stackexchange.com/questions/154565/where-does-a-technical-programmer-fit-in-and-what-does-the-title-mean was unfairly closed, do items 1 and 3 above.
Equally if you think that Does it work when a developer is the project manager's boss? should be closed, do item 2 above.