On the dependence between $\bar{z}$ and $z$ I was introduced the following example to illustrate the dependence between $z$ and $\bar{z}$, which is the complex conjugate of $z\in \mathbb{C}$:
\begin{equation}
g(z)=\int_{0}^{2 \pi} \frac{d \theta}{2 \pi} \frac{1}{z-e^{i \theta}}=\oint \frac{d w}{2 \pi i} \frac{1}{w(z-w)}
\end{equation}
which appears to only depend on $z$. However, $g\left(z, \bar{z}\right)=\theta\left(|z|^{2}-1\right) / z$  is non-analytic, and depends on $\textbf{both}$ $z$ and $\bar{z}$.
I don't understand this last sentence. 
If we know $z$, then we know $|z|^2$ and also $\bar{z}$. All in all, I do not understand why we have to write $g(z,\bar{z})$ as a function of two different variables.
 A: Don't blame yourself for not understanding it. It is not clear at all.
It seems to me that whoever wrote that was aiming at the concept of Wirtinger derivatives: if $U\subset\mathbb C$ and $f$ is a map from $U$ into $\mathbb C$, then, if you see $f(z)$ as $f(x+yi)$ (with $x,y\in\mathbb R$, we define$$\frac{\partial f}{\partial z}=\frac12\left(\frac{\partial f}{\partial x}-i\frac{\partial f}{\partial y}\right)\text{ and }\frac{\partial f}{\partial\overline z}=\frac12\left(\frac{\partial f}{\partial x}+i\frac{\partial f}{\partial y}\right).$$In a sense, $\frac{\partial}{\partial\overline z}$ measures how much $f$ depends on $\overline z$; for instance, $\frac{\partial\overline z}{\partial z}=0$ and $\frac{\partial\overline z}{\partial\overline z}=1$. And $f$ is differentiable at $z_0$ if and only if $\frac{\partial f}{\partial\overline z}(z_0)=0$.
A: People sometimes say things like "$z^2$ is holomorphic because it depends only on $z$, while $|z|^2=z\overline z$ is not holomorphic because it depends on $z$ and $\overline z$." That's a very useful "intuitive" point of view, giving insight into what is and what is not holomorphic, except that of course taken literally it's nonsense, since $\overline z$ depends only on $z$.
A true version is this:


TV. Suppose $F(s,t)$ is a holomorphic function of two variables, and say $f(z)=F(z,\overline z)$. Then $f$ is holomorphic if and only if $F(s,t)$ depends only on $s$.


So for example taking $F(s,t)=s^2$ shows that $z^2$ is holomorphic, while $F(s,t)=st$ shows that $|z|^2$ is not holomorphic.
Of course that's totally useless for shhowing that $f(z)$ is holomorphic: If we don't already know that $z^2$ is holomorphic then we don't know that $F(s,t)=s^2$ is holomorphic. It can be used to show a function is not holomorphic; we could already know that $F(s,t)=st$ is holomorphic before knowing the status of $|z|^2$. 
But it does give us a test that's useful for polynomials, or power series:


Cor. Say $f(z)=\sum_{j,k\ge0}c_{j,k}z^j(\overline z)^k$. Then $f$ is holomorphic if and only if $c_{j,k}=0$ for all $k>0$.


