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:
“Parents sometimes feel that if they dont criticize their child, their child will never learn. Criticism doesnt make people want to change; it makes them defensive.”
—Laurence Steinberg (20th century)
“Alas for the cripple Practice when it seeks to come up with the bird Theory, which flies before it. Try your design on the best school. The scholars are of all ages and temperaments and capacities. It is difficult to class them, some are too young, some are slow, some perverse. Each requires so much consideration, that the morning hope of the teacher, of a day of love and progress, is often closed at evening by despair.”
—Ralph Waldo Emerson (18031882)