Could java.util.concurrent.lock.Lock use a static list of all threads that have locks and ThreadLocal locks lists to know about all in use locks and then check for incorrect order when lock() is called.
Check the ThreadLocal list and if there are no other locks then proceed.
Else if there are other locks then look through other threads to determine if any have any of the same locks in a different order.
Add current lock to ThreadLocal list.
Remove current lock from ThreadLocal list.
On a real-life desktop I will often move toward an object to work with it. i.e. When I want to look at the calendar I will move closer to it. That allows better use of my desktop because some objects are "zoomed out" and therefore take less space (in my field of view). I received an iPod Touch for Christmas and the zooming of web pages and pictures works well. Of course adding a touch screen to a normal computer would help zooming work better.
Has anyone ever tried to incorporate a similar idea into a GUI? Icons, minimize/maximize, and resizing are somewhat like that but not quite enough. It would be nice to resize something to a "zoomed out size". i.e. I could set a size for my email program when it isn't in use and it would be shrunk to fit in that space when desired. That would allow me to "watch" the output of windows without it being large enough to read it.
Normally I see abstract classes named as AbstractClass. But when there are many abstract classes that requires typing at least AbstractC when using code completion. Therefore I suggest that abstract classes be named ClassAbstract so that code completion is more usable. "Abstract" is a modifier on the class name anyway and it doesn't need to be in the primary position. What do you think?
I know this isn't a huge deal -- I am just suggesting it as a minor improvement.
I wish I had a terminal program that distinguished (i.e. with different colors) standard output, standard error, standard input, command input, and the command prompt. It would be obvious when I wrote a command that is waiting for user input so that I don't wait for my program to finish when it is waiting for me to enter input (this usually happens with shell scripting when I forget to provide the standard input to a long list of piped commands).
Does such a program exist? Do you think it would be beneficial?