If a random country is in debt, is printing money a good way to pay it off at the expense of the citizens?
For example, lets say you owe an entity $100. If you print an extra $100 bill you pay off your debt, but unbeknownst to the entity the $100 that they lent you is now worth less.
Would the barter system be a good way of combating this?
Not barter but a universal credit rating system can help in facilitating foreign exchange market. Every item of international importance should be given some fixed rating for example, one gallon of petrol worth 5 ratings while 100 kg of onion worth 4 ratings, etc. These ratings could be periodically adjusted due to variation in supply/demand.
Now any country can import goods from any other country without paying real money. The whole system will work on credit system. Debt of one item can be paid off using the credits earned by exporting other items.
If any country is in need of cash flow then it can sell the credits to certain mediator like IMF/World Bank which pay the equivalent amount in fiat currencies by assessing the country's economy. Stronger economies will get better exchange rates for their credits as compared to weaker economies.
This could be the solution to Venezuela's hyperinflation rate as of the moment. The country's been in a bad debt lately and their money pretty much is worthless right now. They have little to none to work out, so basically what they could just do to alleviate this is to sell stuff they already have. I don't further details regarding the issue in Venezuela's economy but as I was saying thsi could be a viable solution.