Is it better to hard code everything or use the ui? Is it better to hard code everything or to use the ui?  For example, is it better to field and entity with the UI or to add fields/instances programmatically?  Does it really matter?  What is the 'best practice'?
If you use code you can:


Version control the field settings.
Lock the field, so it can't be deleted or altered in the UI.


It's always a good idea to keep as much as possible in code, for when you need to roll out changes etc. This is why i prefer the above method, even though it is more time consuming during development. Depending on your use case, you may save a lot of time doing this however.