Sometimes aubergine and courgette tastes fine when cooked as is, but other times they are so bitter that they're almost inedible. I've tried dry salting and leaving the slices in salt water beforehand for various lengths of time, but this is a mission and can often make them too salty. Also the outcome seems pretty random given that sometimes this isn't necessary. Is it to do with freshness?
In Turkish cuisine the tradition is to peal the eggplant lengthwise in zebra stripes an inch wide and to slice the eggplant into thick wedges which are then soaked in very salty cold water for at least a quarter hour. Just before cutting smaller and cooking you squeeze out the salt water.
This should help against them turning dark and bitterness.