Uploading code to ATMega328p SMD

That tutorial has a couple of problems - the quality of much of the hardware advice on the official site is depressingly poor (this is not the only one where they leave out a decoupling capacitor). These apply equally whether SMD or DIP.

You must have a 0.1uF ceramic cap for decoupling between Vcc and Ground, right next to those pins on the chip. It is best practice to put a separate 0.1uF cap for each Vcc pin, as well as for AVcc (so 2 for DIP package, 3 for SMD). Without this essential component, your chip may fail to program, or may accept a program, but reset or hang under unpredictable circumstances; due to manufacturing differences, some individual chips are more or less sensitive to this than others.

The diagram also depicts the crystal and loading cap being several inches away from the pins they connect to; the length of these connections should also be minimized.

Additionally, if you want to program it via serial with a USB-serial adapter, you probably want the DTR autoreset circuit, so you need an additional 0.1uF cap between the DTR line of the serial adapter and the reset line of the chip.