Is it possible to edit Views code instead of the ui? I'm aware that I can export and import a Views code. I'm wondering if there is a way to edit and add relationships or contextual filters of a current view within the code instead of the UI.

The reason is sometimes its just easier to add the code rather than drilling down to the relationship within the UI. 

If not, I guess the workaround would be to export, then change, then import and overwrite. Not sure how this will effect the site if the views were created from a module installation.
An easy way to do this would be if you had the features module that will contain the code of the view.  Otherwise this information is stored in the database.  Simply enable the module, create a new feature and add your view to it.  Then it will be stored in code for you to alter.