Quick Facts
Facts and trivia too short for a full post. External facts will be linked and/or attributed.
Simple Throughput Formula
To calculate throughput in megabits per second (Mbps), divide 8192 by the time it takes to copy a 1 gigabyte file (2^30 bytes, or 1,073,741,824).
v = 8,192 / t
v – Throughput in Mbps
t – Time in seconds, that it takes to copy a 1 gigabyte file
This simple throughput test allows you to quickly check actual throughput for storage or network connections, and can be a valuable troubleshooting tool.
Example:
A 1 gig file takes 300 seconds to copy.
8,192 / 300 = 27.3 Mbps (Megabits per second)
How does this work?
Throughput is the number of bits transferred, in a specified amount of time (in seconds).
File size is measured in bytes, while throughput is measured in bits per second. As there are 8 bits in a byte, the first step is to multiply the file size by 8, to get the total number of bits.
If we have a 1 gig file, that’s 1,073,741,824 bytes, or 8,589,934,592 total bits to transfer.
If we divide at this point, we will get a really large number, representing “bits per second” (bps).
When dealing with network or internet throughput rates, we typically use a much larger scale, such as megabits per second. A kilobit is 1024 bits, and a megabit is 1024 kilobits (or 1024 * 1024 bits). To go from bits to megabits, we divide by 1024 * 1024 ( 1,048,576 ).
So for a given file size f, taking time t in seconds to copy, the throughput v is as follows:
v = ( f * 8 / ( 1024 * 1024 ) ) / t)
v = ( f * 8 ) / ( 1024^2 * t )
With a file size of 1 gigabyte (1024 * 1024 * 1024 bytes), the equation looks like this:
v = ( 1024^3 * 8 ) / ( 1024^2 * t )
Since 1024^3 / 1024^2 = 1024, the above can be simplified to:
v = ( 1024 * 8 ) / t
v = 8,192 / t
Variations
To specify throughput in Gbps (Gigabits per second), simply divide 8 by the time in seconds. Since you would be dividing 8192 by 1024 to go from megabits to gigabits, the answer, 8 represents the original 1 gig (abyte) file converted to bits, which is simply 1 (the file size) times 8 (the number of bits in a byte).
v (Gbps) = 8 / t
The problem is that, as the time taken to copy the file approaches 1 second or less, you lose precision.
Let’s say your 1 gig file takes 0.9 seconds. The throughput is 8 / 0.9 = 8.9 Gbps. The problem is that measuring 9/10 of one second, which is 900 milliseconds, takes a sensitive and precise timer.
One way around this is to scale everything up – for example, using a 10 gig file means we simply multiply the number of gigabits by 10:
v (Gbps) = 80 / t
Now, our 10 gig file might take 9 seconds, a quantity of time we can easily count using a stopwatch, but yields the same result: 80 / 9 = 8.9 Gbps.
As storage and networking become faster, larger file sizes are required, to make an accurate measurement.
How Do I Create a 1 Gig File?
In Windows, use these commands at a command prompt:
echo ABCDEF>test.txt for /L %i in (1,1,27) do type test.txt >> test.txt
The first line creates an 8 byte file. 6 bytes are in the string “ABCDEF”, followed by a Carriage Return and Line Feed, that you don’t see, are also stored in the file.
The second line counts from 1 to 27, and adds the file to the bottom of itself, doubling the file each time.
Since the original file is 2^3 bytes, if we double it, the resulting file is 2^4 bytes. If we double it 27 times, the file size is 2^(3 + 27), or 2^30, which is exactly 1 gig.
The Best Solution for Cleaning a Coffee Maker
Buy the cheapest vodka you can get – usually about $12 for a 750ml bottle, and mix it 25% with water.
Conventional wisdom says you can clean your coffee maker by brewing a pot of water, which is ineffective, or vinegar, which smells and tastes horrible.
Vodka has no smell and no flavor, but the alcohol acts as a pretty powerful solvent and detergent to remove coffee or tea residue.
If someone makes tea in your coffee maker, or if your coffee is starting to taste a little “off”, run a pot of vodka through your coffee maker!
Canned Air Hack
As you use a can of air, the power of the air stream slowly diminishes.
Have you ever noticed that the can gets colder as you use it?
This happens because temperature and pressure are related, when volume is constant.
This is part of the ideal gas law:
http://en.wikipedia.org/wiki/Ideal_gas_law
As air leaves the can, the pressure drops. Because the volume of the can is constant, temperature drops, and eventually, you may notice frost or ice on the outside of the can!
Heat is energy, and cold is simply the lack of heat energy (just as a shadow is the absence of light).
How do I get a few more blasts out of my frozen can of air?
You COULD wait until the can absorbs heat from the ambient air. “Room temperature” air is typically 75 F, and air is a decent conductor, but not as good as liquid. It might take a while!
OR…
You could run the can under some warm (LESS than 100 F) water for a few seconds.
This washes away the ice / frost on the outside of the can, and because water (and most liquids) are such a good conductor of heat, the can rapidly absorbs heat energy from the liquid, thus increasing the pressure of the gas inside the can.
List of Nerd Holidays
- e Day: 2/7
Math constant, e - Pi Day: 3/14
Math constant, pi - Holiday not Found: 4/04
HTTP Result Code, 404 (Not Found) - Star Wars Day: 5/4
“May the Fourth (be with you)” - Revenge of the Fifth: 5/5
Reference to “Star Wars: Episode III, Revenge of the Sith“ - Towel Day: 5/25
Two weeks after the passing of Douglas Adams, 5/11/2001 - Tau Day: 6/28
Math constant, tau - Judgement Day: 8/29
“Terminator” reference - Mole Day: 10/23
Reference to Avagadro’s constant
Interesting Beer Facts
- Drink your beer cold, to make your body burn a few extra calories, vs. drinking your beer at room temperature.
http://justinparrtech.com/JustinParr-Tech/why-you-should-drink-beer-cold/ - Buy and store import beer by the case, fully-enclosed in cardboard, to avoid skunky beer.
Skunky beer can result from being exposed to ultraviolet light. This is why beer bottles are often green or dark amber to prevent light from breaking down the hops. Domestic beer uses a special kind of hops that doesn’t break down as quickly, but many import beers use regular hops. If you buy a six pack of import beer (any color of glass), and it has been sitting on the shelf for a while, it might be skunky. Instead, buy an unopened case – it will taste much better.
http://blog.beeriety.com/2009/06/29/skunky-beer-how-it-happens-and-how-to-avoid-letting-it-happen/ - Most American beers are lagers.
Lager beer is brewed and stored cold.
http://en.wikipedia.org/wiki/Lager
Originally, in Germany, lager beer was stored in caves during the winter, and “lager” is German for “stock” (or store).
https://www.google.com/search?num=30&newwindow=1&q=translate+”lager”+to+english&oq=translate+”lager”+to+english - It’s LEGAL to make beer or wine for your own consumption.
There is no federal restriction from brewing your own beer or wine, up to 24% ABV (Alcohol By Volume). There might be state or local laws where you live, so be sure to check first!
Conversely, it’s illegal to make or sell distilled spirits of any kind, in any volume, without a federal distiller’s license.
(update: 4/27/2014)
- Those stupid aluminum beer bottles are expensive, and don’t keep your beer cold! I don’t know who came up with the idea, but supposedly, it keeps your beer cold, longer. People tend to think of cold as something, when in reality, cold is a lack of heat energy (a lack of something).
Working for the aluminum bottles, they are usually 16oz rather than 12oz (standard can or bottle). This means that there is 33% more fluid to absorb (relatively) the same amount of heat. If a standard can or bottle absorbs one kilocalorie of heat energy, each ounce absorbs about 83 calories. Likewise, a 16oz aluminum bottle of beer only absorbs about 63 calories per ounce. Of course, more beer per vessel takes longer to drink, providing more time to absorb heat, so perhaps this is NOT an advantage!
Working against the aluminum bottles, aluminum is an excellent conductor of heat! Compared to a standard 12oz aluminum can, there is simply no advantage based on material, while glass is actually a much better insulator than aluminum. Since greater surface area means faster heat transfer, the aluminum bottle’s greater surface-area-to-volume ratio means that it will absorb heat faster (per volume) than an aluminum can. Although the aluminum and glass bottles have similar surface-area-to-volume ratios, the glass bottle is better-insulated, meaning it absorbs heat slower.
On a cost-basis, aluminum bottles will typically cost much more than glass or a standard can. Most aluminum bottles are 16oz compared to 12, but you are also paying for a big hunk of aluminum. Typically, the cost per fluid ounce is 20% more (or higher) than glass or can.
Aluminum bottles are convenient on beaches and other areas where glass is not allowed. If you end up having to purchase aluminum bottles, either use a foam coozie that covers the entire outside area of the bottle, or simply wrap it in duct tape. Your beer will stay cold much longer, compared to “naked” aluminum.
The Lost Art of the Ribbon Cable
Ribbon cables used to be used for floppy drive, hard drive, and CD / DVD connections.
Ribbon cables were eventually phased out, as floppies are no longer used, and IDE was replaced with SATA.
Early Ribbon Cables
Ribbon cables usually terminate in a pin or edge connector. Ribbon cables are marked on one edge.
Pin and edge connectors have the individual conductors numbered, starting with pin (or path) #1
Ribbon cables must be connected from pin 1 on the host device (motherboard) to pin 1 on the remote device (peripheral). In order to identify “pin 1”, ribbon cables are marked along one edge, usually with a black or red stripe.
On the motherboard or peripheral, look for a large dot (white writing on the board), or “PIN 1” or “1” near pin 1. Install the ribbon cable with the marked edge connecting to pin 1 on both the motherboard and peripheral.
Later Ribbon Cables
Later, ribbon cables had “keyed” connectors that could only be connected in one direction, thus forcing the alignment of pin 1 to pin 1 on the ribbon cable, and pin 1 on the peripheral.
In many situations, one end was keyed, while the other was not. Knowing how to read a circuit board to find pin 1 would save time, effort, and possible damage to components.
End State
Toward the end of their lifecycle, all connectors were keyed.
Subsequently, the replacement standards, including SATA, USB, and “FireWire” (IEEE 1384) connectors were all keyed.
Initially, SCSI (Small Computer System Interface — “Server” hard drive interface) used a 50-pin ribbon cable, compared to the 40 pin IDE (Integrated Drive Electronics — “standard” PC hard drive) interface. SCSI cables had up to 15 connectors on one cable, and followed the same “Pin 1” alignment rules. Later variants of SCSI used keyed connectors.
The modern version of SCSI, called “SAS” (Serial-Attached SCSI), uses SATA style connectors, encapsulating the SCSI protocol within a serial interface. Like SATA, SAS interfaces are keyed.
Pin 1
Finding “Pin 1” is a lost art, but if you work on older hardware, occasionally, having this skill can be a benefit.
Floppy Disks
Not sure why I started thinking about this today, but here it is…
Floppy?
Floppy disks were removable media, in various formats and sizes, used in the 70’s through 90’s.
Floppy disks consisted of a single-layer, thin plastic substrate covered in magnetic particles, plus its dust jacket with various apertures for read/write, index, and read-only mode.
Floppy disks were called “floppy” because both the substrate and the dust jacket of the 8″ and 5.25″ media were flexible.
Later, the 3.5″ format employed a non-flexible, cartridge format for the dust jacket, sparking the misnomer “hard disk”. It was common in the 90’s for people to say “I saved it on the hard disk” when they really meant 3.5″ floppy disk (a removable storage cartridge), rather than “hard drive” (a fixed-media, high-density secondary storage device inside the machine)
Hard-sectored vs soft-sectored
For 8″ and 5.25″ disks, hard-sectored means that there were multiple index holes in the disk, while soft-sectored means that there is only one index hole in the disk itself. The index hole is read through the index hole of the dust jacket. If you use two fingers against the inner edge of the hub, to gently spin the floppy within its jacket, you will eventually see the index hole (or holes) in the disk substrate line up with the index hole in the dust jacket.
I think all 3.5″ disks were explicitly soft-sectored, indexed by the drive latch hole in the hub.
Alphabet soup!
It was not uncommon for a specific floppy disk media to come in multiple formats.
Disks could be single-sided (SS), meaning only one side (usually the bottom) is writable, or double-sided (DS), meaning that both the top and the bottom are writable.
Disks came in various densities, including single density (SD), double density (DD), and high-density (HD).
8″ and 5.25″ disks could be single or double sided. Some computer systems could only read or write to one side (usually the bottom), so punching an extra read-write hole on the edge allowed the disk to be inserted topside-down, to leverage the opposite writable surface. I assume that drives set up for this had an extra sensor to account for the index hole being transposed — most “double-sided” 5.25″ disks didn’t have two index holes in the dust jacket.
3.5″ disks were explicitly double-sided.
Common Formats:
- 8″ DSDD “Double Sided, Double Density”, 1.2 meg. Used in the late 70’s and early 80’s, most notably in the Tandy TRS-80 systems.
- 5.25″ SSSD “Single Sided, Single Density”, 90K, and DSSD, 180K.
- 5.25″ DSDD “Double Sided, Double Density”, 360K. This was the standard format for most microcomputers during the 80’s.
- 5.25″ DSHD “Double Sided, High Density”, 1.2 meg. This format was designed to extend the life of the 5.25″ form factor, as data storage requirements increased. This format was not very common, as the 5.25″ form factor was largely replaced with the 3.5″ form factor in the late 80’s — the 3.5″ DSHD format was more convenient to carry, and held slightly more data.
- 3.5″ DSDD, 720K. Used in the late 80’s and early 90’s.
- 3.5″ DSHD, 1.44 meg. This was the standard format for most PCs from about 1993 onward.
Trivia
- The original IBM PC shipped with the 360K DSDD 5.25″ floppy format. Many other manufacturers, including Apple, Atari, and Commodore supported the same format, making it a defacto standard.
- The IBM PC-AT had an option for the 1.2 meg DSHD 5.25″ floppy format. This format was not widely adopted due to the prevalence of 360K drives and media.
- The IBM PS/2 series was introduced with the 3.5″ DSDD (720K) and DSHD (1.44 meg) formats. IBM drives supporting the DSHD format had “1.44” written on the disk-eject button.
- All 5.25″ floppies, including the 1.2 meg format, were largely phased out by the early 90’s. Most people either used 5.25″ or 3.5″ but not both.
- TEAC sold a “dual media” drive, that was really two floppy drives inside a single 1/2 height (and later, 1/3 height) housing. The 1.2 meg 5.25″ slot was on top, and used a standard 5.25″ lever-style lock, while the 1.44 meg 3.5″ slot was just below it, using a standard eject button.
- Amiga, Apple Macintosh, and Sun, among others, used the 3.5″ floppy format.
- Sun had an “eject” binary whose sole purpose was to eject the floppy disk from its housing, as the Sun drive didn’t have a manual eject button.
- Due to the demand for increased storage capacity, floppies were eventually phased out. Other cartridge-based systems such as the Syquest EZ-135, Iomega ZIP drive, and Imation LS-120 provided high-speed, high-capacity, removable cartridges.
- In the late 90’s and early 2000’s, many computer systems included either internal ZIP or LS-120 drives as the primary removable media.
- Re-writable CD drives and USB flash drives eventually replaced floppies and cartridge-based schemes.
- Each Floppy Drive Controller (FDC) could support 2 drives. A standard floppy cable had a twist after the first connector, called the “address twist”. The first device (or A: drive) was at the end of the cable (above the address twist), while the second device (or B: drive) was below the address twist.
- Older cables had only edge-style connectors used by 5.25″ drives, requiring a pin-to-edge adapter for 3.5″ drives. Later, most cables included both connector styles in both the “A” and “B” positions, so that either type of drive could be connected in either position. As 5.25″ was phased out, floppy cables eventually ONLY supported the 3.5″ pin-style connector.