I'd say the ends are more important than the means. Doing good in a stupid way that ends up causing harm to others is often just as bad as being mean on purpose and causing harm to others.
For me, the reason why I feel that intent is more important is because if someone tries to do good and screws up, then it's unlikely that that will happen again unless the person is a terminal screwup who is incapable of learning from his mistakes. On the flipside, however, if something bad happens because the person
intended to cause that outcome, it's very likely that it will happen again unless the person is forcibly stopped.