Note: Given that minification doesn't actually exist, this answer will simply focus on code-size-optimization.
There are four possible logical uses of code-size-optimization:
- A compiled language requires a minimal executable size, usually because it's being used in an embedded system.
- The user just wants their code size to be smaller for whatever reason.
- Code Golf.
So, let's address these points one at a time...
1. Minimize executable size.
Minimizing the size of an executable and minimizing the size of the source code are two drastically different things. Whether I name my variable as
i or as
numberOfTimesIteratedThroughForLoopAtLine752, once the compiler gets through with it, the machine code is ultimately going to be the same.
Minimizing the size of your executable is about reducing the number of instructions and has nothing to do with how many lines (or characters) are in your source code file. Using code-size-optimization for these questions is arguably misleading. Moreover, outside deploying to embedded systems, worrying about the size of your executable isn't something that gets done any more these days. And if it is something you're worried about, your question isn't likely to be a good fit for Code Review. Instead, you probably need to think about your applications design from a bigger picture and probably formulate a question that's a good fit for Programmers.
So, for a question that's about minimizing the executable size of your program:
- code-size-optimization is misleading.
- embedded probably covers it.
- If embedded doesn't cover it, your question probably isn't a good fit for Code Review. You probably need to ask more of a whiteboard type question.
2. Shrinking interpreted script sizes.
Arguably, this would be an appropriate use-case for code-size-optimization. However, creating & using minification might be more appropriate. It's more specific, and to me, it seems to make it more clear that this tag is for discussing a very real constraint on code. More importantly, proper moderation of the tag could mean it's only allowed to be used in cases where it makes sense (effectively, when we're talking about interpreted language scripts that need to be smaller so they can be transferred more efficiently).
3. Asker just wants less source code.
While this is a logical use of the tag, it's not an appropriate use of the tag. Using the tag in this way is using it as a meta tag, and we don't allow meta tags.
One of the most common ways to reduce the amount of source code is through effective refactoring, and applying "DRY" principles. Well, guess what? refactor doesn't exist, and dry has already been burninated (as a meta tag).
While there's nothing wrong with asking for help reducing your source code size (generally speaking), you shouldn't be using tags to communicate that desire.
4. Code Golf
Again, code golf would be a logical use of the tag, but it can't be an appropriate use of the tag, as questions asking for help golfing code are all off-topic. So this will never be a valid use of code-size-optimization for Code Review.
So in summary, really, the only valid use of code-size-optimization would be for questions asking for help minifying their code. Yet by my eyes, of the 6 total questions tagged code-size-optimization, none of them are actually asking about this.
Given that there are only six, we could simply clean this tag up manually. Without making any edits myself, here are my recommendations for the six questions (domain experts should handle these at their own discretion):
- PHP cron job for updating broadcast status - Again, none of the plain-English on this question makes it clear at all why it should have the code-size-optimization tag. PHP is a server-side language, so this isn't a minification issue. It seems most likely, the tag simply exists because the user was trying to add optimization and stumbled across code-size-optimization in the auto-complete list (and the asker is looking for any optimization). Seems like a meta use, so we can probably simply remove the tag from this question.
- Roman numeral to decimal converter - This question actually is explicitly asking for optimizing the code for size. However, that doesn't make it any less of a meta tag. I don't know anything about TI-Basic. Presumably this is for or related to TI calculators? I'm not going to make the case for using the embedded tag or simply removing the tag. But either way, I can't see a strong case for code-size-optimization here. If there are any domain experts for TI-Basic, please advise or take appropriate action.
Once these six usages of the tag are cleaned up, the tag will simply cease to exist. We will only have to worry about it again if someone else creates it.