I want to find:
$$\int_{\gamma}\frac{\mathrm{d}z}{z}$$
where $\gamma$ is the curve with orientation as follows (the circle and the square are centered at the origin)
I'm not sure on how to find this result. I saw a proof where $z = \rho e^{i\theta}$, and then we obtain:
$$\int_\gamma \frac{\mathrm{d}z} z = \int_\gamma \frac{\mathrm{d}\rho}{\rho} + i \, \mathrm{d}\theta = 0$$
Since $\gamma$ is a closed curve. However, I'm not sure whether this proof is appropriate or not, I thought that parametrizations of curves in $\mathbb{C}$ were only with one parameter rather than the parameters $\rho$ and $\theta$. As well, isn't $\rho$ changing along the curve $\gamma$? (hence it would not be a constant). Can't we just simply state that since $1/z$ has a primitive inside $\gamma$, then the line integral is 0 instead of doing the above complicated procedure?
Thanks for the help and sorry for the low quality picture.

You can use the definition of the path integral.
CIRCLE:
$\int_{\gamma}f(z)\ dz = \int_a^bf(\gamma(\theta))\gamma^{\prime}(\theta)\ d\theta$
Here we are using the path $\gamma = \rho e^{i\theta}$, where $\theta$ runs from 2$\pi$ to $0$. Putting this in the formula gives:
$\int_{2\pi}^0\frac{1}{\rho e^{i\theta}}i\rho e^{i\theta}\ d\theta = -\int_0^{2\pi}\frac{1}{\rho e^{i\theta}}i\rho e^{i\theta}\ d\theta = -i\int_0^{2\pi}d\theta = -2\pi i$
Which is the answer. And this implies precicely that $\frac{1}{z}$ does not have a primitive inside the curve.
EDIT:
(I was confused about what the contour was, the below should be correct)
The paramaterization of curves can depend on either one or two parameters. Here it is used by writing $z = \rho e^{i\theta}$ and thus $dz = e^{i\theta} d\rho + i\rho e^{i\theta} d\theta$. $\rho$ is changing along the contour. And you are correct, we can say that since the function analytic inside the contour, it's integral is zero by Cauchy's integral theorem, and it has a primitive. That is probably the easist way to do this. The only reason that I can think of that they used the other procedure in the book is if they didn't cover Cauchy's theorem yet and they only just introduced contour integration.