CSCE 181 Guest Lecture 8

From Notes
Jump to navigation Jump to search

« previous | Thursday, April 14, 2011 | next »


Jaako Järvi: Algorithms for User Interfaces

Event handlers in GUI: one simple little dialog requires a LOT of code to handle every possible event.

e.g. at Text Box widget has 100 methods and recognizes 200+ actions

Reusing boilerplate code is a way to get rid of complex diagrams and reduce the amount of code.

Adobe Desktop Applications: Event handlers account for over 1/3 of the code and over 1/2 of the bugs that are found.


Simple Algorithm: Binary Search

90% of the generated solutions are wrong!

Multi-way Data Flow

Think of a dialog box as a way of specifying the parameters for a function: command parameter synthesis

Data constraints can require other parameter to be updated. If this is the case, no two methods can output to the same variable field.

Identifying relationships between data and the functions/equations required to convert between relations can significantly reduce the amount of code required. Even better: higher levels of abstraction (scripting) can be used to generate the larger amounts of code so that it is free of bugs.

Fitting into UI

Disabling widgets informs the user that it is irrelevant: any value for that parameter will not affect the algorithm's behavior.