ATmega168 GND and AVCC not needed when programming?
Leaving AVCC or a GND pin disconnected is an error -- this diagram is wrong! The chip may work with these pins disconnected, but it may also cause damage. Don't chance it.

A crystal is not always needed, as the AVR has an internal oscillator, which runs at roughly 8 MHz. However, the AVR must be configured to use that internal oscillator, and cannot be reprogrammed (even to change the oscillator settings!) if it isn't receiving a clock signal.