Just added some information from going to the airport to the City Center. From city center you would need another transportation to go the Hackathon Venue.
Taxi: From the airport to Barcelona Center (Plaza Cataluña) a taxi would be around 27 to 35€ (depending on traffic and time of the day).
Aerobus: These buses goes from T1 or T2, to Plaza Catalunya in around 30 motinutes, it cost 5.90€. From T1 they live each 5 minutes, from T2 each 10 minutes, from 5AM to 1AM.
Train (Not metro): This is the cheapest option, you can take train from T2 (there are free buses from T1 to T2), using the standard local transportation tickets. Single ticket is 2.35€, but you can also get T10 (1 zone)ticket, with 10 trips for 9.95€. You can use that ticket for the Metro and buses inside Barcelona. You can also get a T10 (2 zones), for 20.10€, that would be useful to arrive to the hackthon veneu, without needing to pay any other ticket.
Metro: You can take the metro from T1, paying a single ticket 4.50€.