Easy solution: fire 50% of middle management and use the saved money to raise software developer salaries. Firing 50% of middle management alone will (for most companies) increase productivity. Especially if you fire the middle managers who are busy in meetings all the time (they are the incompetent ones).