“Computers for the masses, not the classes.”
“Computer business are like fruit market on a Saturday night. If you don't sell it at five o'clock, the price is down tomorrow because the fruit's no good the next day. You'd better sell it now.”
“So when you do board, the first class people, they're sitting there. A lot of them are working as your boarding. They have computers out and calculators. They're looking up at you like, "Hey, we're making money right now! Right now we're making money.”
“It is far easier to design a class to be thread-safe than to retrofit it for thread safety later.”
“From the perspective of a class C, an alien method is one whose behavior is not fully specified by C. This includes methods in other classes as well as overrideable methods (neither private nor final) in C itself. Passing an object to an alien method must also be considered publishing that object. Since you can’t know what code will actually be invoked, you don’t know that the alien method won’t publish the object or retain a reference to it that might later be used from another thread.”
“The possibility of incorrect results in the presence of unlucky timing is so important in concurrent programming that it has a name: a race condition. A race condition occurs when the correctness of a computation depends on the relative timing or interleaving of multiple threads by the runtime; in other words, when getting the right answer relies on lucky timing.”
“Once an object escapes, you have to assume that another class or thread may, maliciously or carelessly, misuse it. This is a compelling reason to use encapsulation: it makes it practical to analyze programs for correctness and harder to violate design constraints accidentally.”