35

How to stop a uboot macro using itest was closed as "not about programming or software development"?

Aren't shell programming languages like Bash or in this case U-Boot CLI in the scope of Stack Overflow?

8
  • 3
    I'm stumped how this isn't about programming, but the question might need more focus - it seems to ask about 2-3 separate things (step 2, "compound statement in the if/else/endif clause", "an "abort macro" step in one of those clauses"). Commented Mar 16 at 14:28
  • 15
    This is gunna be one of those subjects everyone disagrees on. IMO, this question is not about programming. There is a line between using shell commands and actually doing shell scripting/programming. Just like there's a difference between using basic excel formulae, and effectively programming in them. Unfortunately the line here is more like a thick grey blur; where one shell question might be off-topic, another might be on-topic. Commented Mar 16 at 14:48
  • 21
    @Nickistired that particular question does look like programming to me. It's basically asking about how to conditionally exit a script. It's not about just running a single command. Commented Mar 16 at 15:05
  • 2
    Something to be aware of: the "not about programming or software development" close reason is displayed both when a majority of close votes choose that reason and sometimes when there is no majority reason (i.e. when the three votes cited different reasons). I do not know how to tell the difference without asking the people who voted to close (or asking someone who peeked at the votes after two were cast).
    – JaMiT
    Commented Mar 17 at 4:52
  • 2
    Ending in the open-ended "Suggestions?" does not help it. It is trivially transformable, so it doesn't appear to be too broad. Stack Overflow is not a forum. Commented Mar 17 at 19:44
  • 1
    Unfortunately in my eyes you're a victim of a choice made long ago to allow questions on Stack Overflow which are only tangibly related to programming and thus have a far higher chance of spawning questions which are either off-topic or on the line, and thus you're subjected to people's personal opinions with really random results. A hard problem to solve now. just keep it in mind for the future. This is going to happen again.
    – Gimby
    Commented Mar 19 at 8:25
  • 3
    @Gimby tangibly -> tangentially?
    – matt
    Commented Mar 19 at 10:52

1 Answer 1

37

First: questions are very rarely actually about a programming language. Maybe if you're wondering about the history of the language's development, or a justification for a design decision the language makes. But those questions are often off-topic because they lack practical value.

Rather, practical programming questions are generally about the task. Therefore, the idea that "questions about X language/technology are inherently on/off topic" is a red herring.

For shell languages, there is a pretty well established principle: if you are using the language to write a script - if you create a .sh file or type in a function in Bash to use later or edit such functions into a .bashrc etc. file, so as to record actions to take and perform automation - then you are scripting, and therefore programming, and therefore have a programming question, which is therefore on topic.

If, on the other hand, you are simply using a command line to input commands one at a time, then you do not have a programming question and the question is off topic. In this case you are simply using the computer in an ordinary manner as designed by the operating system authors. Even if such commands are nominally part of a "shell language", you are not actually using them to automate any future process. The question in this case should instead be asked on https://superuser.com, https://apple.stackexchange.com or https://unix.stackexchange.com as appropriate.

Similarly: we do accept questions about using a formula in a spreadsheet, since they're fundamentally about a process that's used to calculate a result, and about creating instructions for that process rather than doing the calculation oneself. We would not accept questions about the UI of a spreadsheet program, since that's simply about using a program used by ordinary computer users, in an ordinary way.

In this case: I have to admit that I've never heard of U-Boot before, and hadn't even considered that a bootloader might be designed to run user scripts. However, there is a tag there with over a thousand questions (and it even has well-received questions from within the last year, so this clearly isn't just an artifact of the attitude towards topicality changing over time); and this question describes an intent to write a "macro" (definitely a programming concept) which implements a multiple-step process using conditional logic expressed in statements; and the clear purpose is to implement some logic which is repeatedly, automatically followed by some other program or tool (i.e., this is clearly an attempt to script it).

So this is definitely a programming question, and I cast the last reopen vote.

Further, since the question is definitely asking about just one step in that multi-step process, and it's a how-to question (rather than asking people to debug code that isn't shown), I can't see another good reason to re-close it.

That said, I think the question would definitely be improved by framing it in terms of a code sample - because it would be more readily obvious that you are trying to write code, and because it would be easier to understand what exactly it is that you're missing. The question claims "I don't know how to create a compound statement in the if/else/endif clause"; but this implies knowing how to create such a clause in the macro language (which in turn implies that this is possible). It would be easier to follow if we saw a code sample which does this, and a description of a problem either with specifying an adequate condition, or with making more than one thing happen when the condition is met, or whatever it is exactly that's the sticking point. (While this was unclear to me, I suspect that has more to do with my unfamiliarity with the system, rather than the explanation.)

37
  • 12
    If, on the other hand, you are simply using a command line to input commands one at a time, then you do not have a programming question and the question is off topic. That feels like splitting hairs. Wouldn't syntax related questions of any other language be on-topic? I don't know why this specific exception is only made for shell language? Also, how exactly would this difference be enforced? If I wanted to ask about say cp, what's stopping me from just saying that this is used inside a .sh file or just put a dummy loop to prove "automation"?
    – TheMaster
    Commented Mar 17 at 14:31
  • 4
    I'm pretty sure this distinction(IMO, without a difference) is discussed before and there was this consensus. But if someone could point out some relevant links, that'd be helpful in increasing the depth of the conversation.
    – TheMaster
    Commented Mar 17 at 14:36
  • 4
    @MatthieuM. Then again, if you ask about how to use Python's shutil.copyfile or Node's fs.copyFile both would be on topic again, making it somewhat arbitrary that just because a user could directly invoke cp from the terminal directly it it would be different. I mean, there is definitely a historic difference on how it was originally intended to be used, but that's not really relevant when judging the present day. Commented Mar 17 at 19:25
  • 25
    This kind of pointless distinction contributes to the overall toxicity of SO in general.
    – Phil
    Commented Mar 17 at 22:50
  • 7
    @KarlKnechtel Phil is saying the distinction is pointless and therefore the end result is neither organized nor searchable. It's unreasonable to expect a opinion of a powerful small minority to be followed by people or be punished by that minority.
    – TheMaster
    Commented Mar 18 at 4:33
  • 4
    @TheMaster totally agree, the system we have here makes it really hard to get help. Otherwise SO wouldn't lose as much traffic to ChatGPT and the like. Commented Mar 18 at 4:49
  • 8
    @MatthieuM. It's precisely because I want a well-curated Q&A site that I disagree with stances like the one in this answer. If the details of how a shell command works are gonna tend to be relevant to scripting, IMO that's entirely enough to make questions about them on-topic. Requiring the question to explicitly indicate it's being asked in a programming context at best means requiring "this is for a script, honest!" which is pointless noise (like "this isn't homework" disclaimers) and at worst means adding a code dump and making the question less broadly applicable. Both results are bad!
    – Mark Amery
    Commented Mar 18 at 11:44
  • 10
    @Phil your definition of "toxicity" could use some work. Belittling people is toxic. Racism/sexism/anti-LGBTQA+ is toxic. Saying "I'm sorry we can't help you with your landscaping because this is a home appliance store" is not toxic. If somebody tried that IRL at a bricks-and-mortar store we'd all laugh at them. But because this is the internet, or because it's free, or because both things involved using computers, or for whatever reason it's never the fault of the asker who refused all the feedback the UI tried to give them about what's on topic here, no no, it's because SO is "toxic" Commented Mar 18 at 13:29
  • 4
    @oguzismail Stack Overflow traffic going down is by and large a good thing for the site. It means, among other things, that people who misuse the site are going away. If their problems are solved by a ChatGPT model trained on SO data, and this means they don't flood the site with vague non-question debugging requests where the code has multiple issues that are separately addressed by common duplicates, great! We never wanted those questions in the first place. Commented Mar 18 at 13:57
  • 7
    @JaredSmith The analogy is wrong on so many levels. Who made you sellers/owners? Why are askers considered buyers? A new user/asker is a contributor to the site just like you. All are sellers. Furthermore the actual difference is pointless, whereas your analogy exalts the difference between them to the difference between landscaping and appliances store. It's toxic, because a small organized minority decided that they will shutdown by force, anyone who tries to sell a replacement part for a particular brand of machine, while replacement parts for all other brand of machines are allowed.
    – TheMaster
    Commented Mar 18 at 14:21
  • 5
    @TheMaster ok I think your critique of my analogy is a little nitpicky but lets clean it up anyway to nail this down: lets say that you have a local Linux users group that you are a part of. Everyone is a contributor to the group, there aren't, in your words, "the privileged". Some people in the group start discussing World of Warcraft because they are trying to get it to run on Linux. But over time the discussion morphs from "how to run WoW on Linux" to more general discussion about playing WoW. This takes up more and more of the meeting time. Now, there's nothing wrong with... Commented Mar 18 at 14:38
  • 5
    ...playing World of Warcraft, or talking about playing WoW and bonding over a shared hobby, but it also isn't toxic for the rest of the group to ask those folks to take their WoW discussion elsewhere to stay on topic about using Linux, i.e. the intended purpose of the meetup. They're even welcome to stay and talk about using Linux, just not take it over to turn it into a WoW meetup. And this is totally fair and not toxic even if the WoW players are a majority of the group. Commented Mar 18 at 14:39
  • 6
    Bad analogies aside... I think it's far more gray than this answer is insinuating. Yes, general CLI questions are off topic, but it's certainly possible to have a CLI question that is programmatic in nature rather than "How do i delete a file" that would be a useful addition to the knowledgebase for programmers. Just because the code isn't being saved in a script file doesn't mean it isn't a useful problem to solve and store the answer to.
    – Kevin B
    Commented Mar 18 at 16:06
  • 7
    So if I type ls .. . | sort | comm -first .g - | randline -n 50 | while read f; do echo "fetching $f"; httpget -O -preserve -sslquiet https://www.rfc-editor.org/rfc/$f; sleep 10; done interactively at the shell command line — which I did 5 minutes ago, this is not a made-up example — am I "programming", or just using the computer in an ordinary manner as designed by the operating system authors? (You don't have to answer that, but my point is, for Unix shells, the distinction between "using" and "scripting" is super, super blurry.) Commented Mar 19 at 0:36
  • 6
    @SteveSummit I don't think there's ever going to be a consensus about what SO is: that's a moving target. There will always be people who for whatever reason want to turn SO into a bad clone of Reddit or (God forbid) Quora. I'm fine with the never-ending argument about this, what irks me is the assumption of ill-will: like the folks who try to keep the site true to its original mission are somehow bad actors who have seized the reigns of power to enforce their will on the oppressed. It's for folks to disagree with the rules, but I'm tired of being labelled toxic for just trying to follow them. Commented Mar 19 at 12:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .