gusl: (Default)
[personal profile] gusl
When debugging, we sometimes observe information being transformed on the GUI, and we want to know *WHO* is doing that processing. Say, you want to find out who is sorting the string "d-f-a" into "a-d-f".

If you don't know the source that well (which is always the case in large enough projects), this can be very time-consuming.

My solution:
Write a script to modify ALL methods in your source that take strings. The script will add to the beginning of these methods the following code:

if (s.equals("d-f-a")){ //CRAZY-DEBUGGER
   System.out.println("foo: s = " + s); //CRAZY-DEBUGGER
} //CRAZY-DEBUGGER


for each method foo and string s in the list of arguments. For methods taking two strings, the scripts adds the above code twice.

*Even* if you forget to back-up your code, the prints are very easy to remove, since they all have string "//CRAZY-DEBUGGER" in them.


But this is only a hack towards my general goal: transparency between code and interface. Mapping visual properties (i.e. the user's concepts) into variables (i.e. the programmer's concepts) should be automatic.

Am I the only one with this dream?
(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags