I wander if it coincidence? I’m sure that long time ago I read about benefits from kissing, now I managed to find those information on wikipedia:
Affection in general has stress-reducing effects. Kissing in particular has been studied in a controlled experiment: increasing the frequency of kissing in marital and cohabiting relationships was found to result in a reduction of perceived stress, an increase in relationship satisfaction, and a lowering of cholesterol levels.
So yesterday we came into situation that we have two separate entities in our system – costs and incomes. Costs are already fully implemented, we started to work on incomes. There are a lot of constraints that costs need to respect (concerning relations with other elements like invoices, workers which generates them and so). Now we wanted to implement incomes, but sometimes those should be auto-generated after saving cost, sometimes not (I mean not necessary). So aftersave dependencies started to look ugly, become heavy and turned on red light with warning “Hard as hell sourcecode maintain ahead!”.
So we looked again at the project and realized that incomes are not only symmetric to costs (the same ammount, assigned to the same workers, just when company A has cost, which need to be payed for company B – at the same time company B has income which should be payed by A), but actually they’re the same!
It’s good to understand the concept, but can drive You too bad design. Actually there’s only one thing – MoneyThingy. The same entity is cost for one company, and income for another.
So straight to the point – four or five tables were removed, the same with one or two models (we’re lucky – no much code inside yet) and lots of concerns were removed with that junk. So now we can thing we have costs and incomes, our client can think that also, and when adding new cost – symmetric income is added automatically without single line of code.