Connascence of Execution Order
Connascence of Execution Order (CoEO) happens when the caller of a component must have some unexpressed knowledge about the correct order of the methods to be called. It is quite common in imperative languages and in the weakest of the dynamic forms of connascence. Nevertheless, it can become a source of deep pain in the maintenance phase because often it's quite difficult and time consuming to figure it out by just reading the code.
Let's see a short example of a class that is supposed to send and archive receipts:
public void SendReceipts(){ var receiptSender = new ReceiptSender(); var receiptId = NextUnsentReceiptId(); while(receiptId != null){ receiptSender.SendToCustomer(receiptId); receiptSender.Archive(receiptId); receiptId...