How do people pick $\delta$ so fast in $\epsilon$-$\delta$ proofs For example, in a proof that shows $f(x) = \sqrt x$ is uniformly continuous on the positive real line, the proof goes like:

Let $\epsilon > 0$ be given, and $\delta = \epsilon^2$....

Or to show that every Lipschitz continuous function is uniformly continuous

Let $\epsilon > 0$ be given, and $\delta = \epsilon$....

Do these people have a magic ball that let them see what the $\delta$ value is going to work?
I often find myself struggling coming up with the $\delta$ value after doing a bunch of inequalities on $|f(x) - f(y)|< \delta$ to make it less than $\epsilon$. How do people know what $\delta$ is going to be in the first line of their proof?
 A: Here is how everyone actually does it.  You start by supposing that $|x-y|<\delta$, for some unspecified $\delta$.  Then you use this assumption to prove that $|f(x)-f(y)|$ is at most some expression in terms of $\delta$; for instance, you might be able to prove that $|f(x)-f(y)|<3\sqrt{\delta}$.  Then you figure out what $\delta$ needs to be in order for this final expression to be at most $\epsilon$.  For instance, in this case, to get $3\sqrt{\delta}\leq \epsilon$, you want $\delta\leq \frac{\epsilon^2}{9}$.  So you choose $\delta=\frac{\epsilon^2}{9}$.
In other words, no one actually magically knows the right value of $\delta$ at the start (although with experience you might be able to make a reasonable guess).  They work through the proof without saying what $\delta$ is, figure out what it needs to be from the end of the proof, and then insert that definition back at the beginning.
A: I had posted another answer but my answer didn't really answered your issue. I believe this one will fit much better. The answer frequently is: They proved it before and they remember the suitable $\delta$. To see this is true, just take some very weird and non-obvious limit to your professor and see if (s)he finds a $\delta$ fast. 
From my experience teaching mathematics, I guess there is a reason people do this: People try to deduce what is happening in others minds, for example: You've deduced that "your professor did it so fast" not that "he could know the answer", not that "he could have done that thousands of times before."
I've tried to teach mathematics a lot of times pretending the student and me both don't know the answer, I proceed heuristically: "We have this, but what do we need to reach that?" And I try to use tools available to the student, which frequently is nothing. A lot of things in mathematics can be answered almost mechanically with enoughly powerful tools. But without those tools, things can be painful and confusing even for very basic problems, I've seen professors I consider extremely intelligent struggle to solve problems with very basic tools. Do you know what they (these students) ended up thinking about me? That I didn't know how to answer or that I was stupid. 
It is much better to be seen as "someone who find $\delta$'s very fast" than as "someone stupid who doesn't know the answer" specially when you do know the answer and the student barely knows how to read the question. Sometimes, other people are more interested in the game of "labeling stupidity"[1] than in learning something. 
[1] : Which can be useful for a student who wants to justify his/her shortcomings.  
A: I have also wondered this too many times, and my analysis professor told us straight up why he does it.
He said, "I prove the limit first, find δ , then write it at the beginning in the final proof to make it seem like I knew all along."
A: The OP mentioned uniform continuity twice in his question. Calculus professors, knowing about the derivative and the functions shape/texture/attributes, can somethime cheat - they can visualize the graph and pull something out of, uh, thin air.
Consider the function $f(x) = \sqrt x$. Well, if there is any $(\varepsilon \; \delta)$ horror show, it must surely be around $x = 0$. But if you want $f(0 + \delta) - f(0) \le \varepsilon$, you're looking at $\delta \le \varepsilon^2$.
So that should work everywhere!
