If you experience issues with the Dock or you went to far with the customizations, you can easily reset it to factory settings.
This trick will remove any manually added apps to the dock, restore all the default Dock apps and reset the size, magnification settings and location of your Dock.
1. Open Terminal
2. Type defaults delete com.apple.dock; killall Dock
3. You’re done
NOTE: in the .gif above, you can see there are three missing apps in the Dock after reseting it. That’s because I don’t have Pages, Numbers and Keynote installed. If you have the iWork suite installed, the icons will properly display in the Dock after performing the reset.