Encinitas vs. PB?

Moving to SD next week and I’m looking for a place to live. I’ve got living arrangements in La Jolla for a few months so it’s not quite frantic yet. I’ll be working in Del Mar, but I feel the draw of the city and love house/techno music scenes (I’m 23). I’ve heard that living in PB will be a struggle with the traffic on the commute to work. Is Encinitas a suitable compromise? Thanks in advance.