Tagged Questions
19
votes
2answers
1k views
Interview screw up after this piece of code
I was screwed up after submitting this piece of work. But I have no feedback to know what "BAD" things inside this block of code.
The requirements are like this:
Connect to the server on a ...
9
votes
3answers
792 views
Am I sending a message to an object in the main thread the good way?
I have written this (truncated) code to fetch some tweets:
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
...
2
votes
2answers
217 views
Is this method thread safe?
Are these methods getNewId() & fetchIdsInReserve() thread safe ?
public final class IdManager {
private static final int NO_OF_USERIDS_TO_KEEP_IN_RESERVE = 200;
private static final ...