No I recommend. 2nd command means: echo 'sampleusername ALL=(ALL) ALL' >> /etc/sudoers
I guess you mean you don't recommend to use 2nd option? right?