Criticism and Best Practice
Event-driven programming is widely used in graphical user interfaces because it has been adopted by most commercial widget toolkits as the model for interaction. The design of those toolkits has been criticized for promoting an over-simplified model of event-action, leading programmers to create error prone, difficult to extend and excessively complex application code:
Such an approach is fertile ground for bugs for at least two reasons:
- It can lead to writing code within the event handler for each possible value of various values in the program, making the source code hard to understand.
- In places where the event code changes variables shared throughout the program, it can require the programmer to write convoluted algorithms to avoid unwanted ripple effects.
Read more about this topic: Event-driven Programming
Famous quotes containing the words criticism and/or practice:
“When you overpay small people you frighten them. They know that their merits or activities entitle them to no such sums as they are receiving. As a result their boss soars out of economic into magic significance. He becomes a source of blessings rather than wages. Criticism is sacrilege, doubt is heresy.”
—Ben Hecht (1893–1964)
“Toddlers who don’t learn gradually about disappointment lose their resilience through lack of practice in give-and-take with other people’s needs. They can become self-centered, demanding, and difficult to like or to be with.”
—Alicia F. Lieberman (20th century)