Proper generation of Complex white Gaussian noise using Matlab
Refer to the code below that generates some noise at a given SNR:

N = 100000;

% Generate some random signal
signal = randn(N, 1) + 1j*randn(N,1);

% Here, the signal power is 2 (1 for real and imaginary component)
signalPower_lin = 1/N*signal'*signal

% This corresponds to 3dB (assuming power=1 is 0dB)
signalPower_dB = 10*log10(signalPower_lin)

noisePower_dB = signalPower_dB - 30  % do 30dB SNR
noisePower_lin = 10^(noisePower_dB/10)

noise = sqrt(noisePower_lin/2) * (randn(N,1) + 1j*randn(N,1));

received = signal + noise;


The program outputs:

signalPower_lin =

   2.0042 + 0.0000i


signalPower_dB =

   3.0193 + 0.0000i


noisePower_dB =

 -26.9807 + 0.0000i


noisePower_lin =

   0.0020 + 0.0000i


Note that generating a complex noise of variance 1, you need to do

noise = sqrt(1/2) * (randn(N,1) + 1j*randn(N,1))


Since each component (real and imaginary) needs to have variance 1/2, such that their sum becomes 1.

To answer your points:
1) As a rule of thumb when to use 20 and when to use 10:
If you describe Powers or Energies, the factor is 10. If you describe amplitudes, the factor is 20. Then, in dB-scale both would have the same value, since:

$$
\begin{align}
P&amp;=A^2 \text{ (Power = Amplitude squared)}\\
10\log(P) &amp;= 10\log(A^2)\\
&amp;=20\log(A)
\end{align}
$$

So, anytime you use a values which creates something meaningful when squared (like amplitude), use 20. Everytime, you have something that is meaningful when taken the square root from (like Power), use 10. 

Note that in my code, I use noise = sqrt(noise_power/2) * randn(...) to generate the noise, i.e. I transform the noise power into the noise amplitude prior to multiplying the normal random variable (which corresponds to changing the factor 10 to 20 in the exponent). Also remember the rule
$$Var(aX) = a^2Var(X)$$
which is exactly the reason why you need to take the square root of the power, such that your resulting noise has the required power.

2) Here, I just transform noisePower_db into noisePower_linear, which is by definition linear=10^(db/10). Note that $10^{-SNR/10}$ is similar, since SNR=Signal/Noise, i.e. the noise is in the denominator (consider $10^{-1/x}=10^x$.