What your friend probably means is that you want to get a 'crossover' cable. This does as you describe and allows two devices to talk to each other with a hub between.