Then you may want to produce a lesser code. That's fine. You understand that it's not because it takes less time to produce a code that it is any better. Young wines are lesser than old ones, yet you may decide to drink young wines instead.
> The first program is slightly longer, but easily extended to do Y as well as X.
Thanks for this. So here the trick is that you can count X and Y as things that the program does. It's exactly like in accountability. Note that this trick is more powerful that it sounds at first because it gives actually a guidance to when you're over engineering and when you are not. Over engineering is then when you write a longer code than it should for the reason that X is something the program does when it's not. Like in accountability, you can sometimes extrapolate a little bit the results but not stretch them to far.
> suppose the same program to do X can be written in two different languages, but programmers who know language 1 are easier to find and cost less to employ than those who know language 2
Then, again, you may want to produce lesser code - which is none of anyone business. It is up to you to judge what is more profitable: produce a lesser code or buy more expensive programmers - in practice, this is misjudged tremendously by many.