Barcelona is a wonderful city. Like any other place, it has it’s darker side. Take the Ramblas. A fantastic place for having a stroll, watching people go by, buy some flowers… And then, you are suddenly thirsty, or hungry. Bad thing… Be aware that BCN is like any tourist place… If you want an expresso on St Mark’s square in Venice, you pay the price! Same thing here. Also, be aware that all those restaurants with tables on the Rambla, serve overpriced and awful food. With very very few exceptions. My advice, leave the Ramblas, take any street into the Raval or the Barri Gotic, much better food, much less money!!! Not to mention the dozens (yep: dozens) of pickpockets, totally fearless due at the laxity of spanish laws. Maximum 3 days in jail if they are caught, and only if they stole more than 400 euros.
Just use common sense.