better than; would rather ~
Expresses that something is better than an alternative, often when both options are bad.
This pattern is used to state a preference, especially when the chosen option is not great but still better than the other. It often carries a sense of resignation or strong dislike for the alternative. You can use it with verbs in the past tense, as in 'rather than doing X, doing Y is better', but the construction is simpler: just put the preferred action in past tense and add ほうがましだ. For nouns, use のほうがましだ or simply Xがましだ. Note that this is not a general comparison like より; it's specifically for 'would rather' in bad situations.