DEV Community

Ben Steadman
Ben Steadman

Posted on

TPP Topic 15: Estimating

This post originally appeared on steadbytes.com

See the first post in The Pragmatic Programmer 20th Anniversary Edition series for an introduction.

Exercise 9

You are asked "Which has a higher bandwidth: a 1Gbps net connection or a person walking between two computers with a full 1TB of storage device in their pocket?" What constraints will you put on your answer to ensure that the scope of your response is correct? (For example, you might say that the time taken to access the storage device is ignored.)

Assume the following are known quantities:

  • Distance between the two computers
  • Walking speed of the person

Assume the following are true:

  • Time taken to set up the storage device such that data can be accessed is negligible
  • The full 1Gbps bandwidth of the network connection is utilised constantly
  • Time overhead storing the data is approximately equal to the time overhead of sending data over the network

Exercise 10

So, which has the higher bandwidth?

1TB = 8x1012b
1Gbps = 109bps

Time to transfer 1TB at 1Gbps:
8*1012 / 109 = 8000s = ~2.2hrs

Assuming an average walking speed of 5.4Km/hr (expertly sourced from Wikipedia) the person will have a higher bandwidth up to a distance of 5.4*2.2 = 11.88Km - after which the network connection has the higher bandwidth.

Top comments (0)