Debug oneliner


To quickly get the rect of a view add this to your .pch

#define RectLog(x) NSLog(@"%s rect: %@",#x, NSStringFromCGRect(x.frame))

Now you can do

UIView *aWellNamedView = [[UIView alloc] initWithFrame:CGRectMake(0,0,250,300)]; RectLog(aWellNamedView);

Which will print out:

aWellNamedView rect: {{0, 0}, {250, 300}}

Which is nice.

“90% of coding is debugging. The other 10% is writing bugs.”

Bram Cohen (of BitTorrent fame)
“Enlightened trial and error succeeds over the planning of the lone genius.”

Proposal for a new acronym


STO

Stating The Obvious.

“Everyone can be taught to sculpt: Michelangelo would have had to be taught how not to. So it is with the great programmers”

“I can work 25 hours a day if necessary, live on any reasonable salary, and don’t give a black damn for job security, office politics, or adverse public relations.”

“For four years we have offered the synchronization service for no charge, predicated on the hypothesis that a business model would emerge to support the free service.”

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”

“This will take science. It will take art. It will take innovation. It will take ambition. And it will take humility. But the fantastic thing is: This is what you get to do.”

‘The future of magazines is now.’

- No, it’s not. The future is never now.

source