When the crew of the USS Housatonic looked out into the water on the night of February 17, 1864, they weren't entirely sure what they were seeing.
There was something moving toward them, just four miles off the shore of Charleston, South Carolina. It might have been a log -- but logs don't drift against the current.
That night, the submarine H.L. Hunley, equipped with a torpedo on the end of a 16-foot spar, rammed the 1,240-ton Housatonic. The three-masted Union sloop-of-war sank in about five minutes, and the Hunley made history as the first sub to sink an enemy ship in combat.
Along with that torpedo, the Hunley carried with it some high hopes. If it were successful, the Confederacy could break the Union's blockade of Charleston Harbor. It could perhaps make up for the naval imbalance between the two sides. It could validate the idea of an undersea combat weapon.
But the Hunley was a death trap.
The sub had sunk twice before, killing 13 crew members, including its inventor, Horace Lawson Hunley. But while its builders knew what they needed to do to make a submarine an effective weapon of war, they didn't have the technology to do it. For reasons we still don't know, the Hunley sank that night, too, killing all eight men inside it. It was the sub's third, and last sinking, in six months. The Hunley disappeared into the sediment until it was found 131 years later.
Practically everything about the Hunley's design was flawed. Yet those flaws showed others the problems they needed to solve, leading to advances in navigation, air filtration and propulsion that we now take for granted.
"Even up to the Civil War, submarines were inventions," says Michael Scafuri, a maritime archaeologist at Clemson University, currently working on the Hunley Project. "They were the cutting-edge technology of the day."
Here are a few areas where the Hunley's shortcomings inspired innovation.
So, how exactly does one propel a 7.5-ton, 39-foot-long submarine made in part from an iron steam boiler?
Steam power wouldn't work underwater and electromagnetic batteries weren't good enough yet.
That meant seven crewmen had to sit side by side in the Hunley's cramped interior -- 3 1/2 feet across and 4 feet high -- and turn a hand crank to power the propeller. And they did it for hours in the dark while the captain steered.
This was no one's idea of fun.
Yet it was better than what the French Navy had devised the year before, in 1863. The aptly named Le Plongeur used a compressed air engine fed by 23 air tanks, which tended to run out practically as soon as the sub got underway.
All those air tanks didn't do anything for the 146-foot–long submarine's maneuverability, either. The movement of a single crewman could send her rolling on her axis. It was eventually abandoned.
Power and inefficiency have been in a longstanding feud. One of the main issues with the Hunley's engine, i.e., the crew, was it got weaker over time. When the Hunley set out to destroy the Housatonic, it had to make a two-hour journey out and -- had it survived the battle -- a two-hour trip back.
"It's only with the advent of nuclear power that the ships were unlimited in their ability to stay out," says William Porter, a retired US submarine captain.
When the Hunley submerged, the eight-person crew had enough air for, at most, two hours.
Aside from the freaky prospect of being locked in an airless iron can, the lack of airflow put a cap on the vessel's usefulness. And there's a little thing called carbon dioxide poisoning, when a finite oxygen supply and overexertion can cause headaches, dizziness or even loss of judgment. People could function better if they didn't have to breathe in all that CO2.
But here's the thing: While the air we breathe is made up of 21 percent oxygen, the human body metabolizes only about 4 percent of that. The rest can be cleaned up and reused.
Even during the Hunley's short life, the enemy to the north was exploring chemical scrubbing systems to strip the carbon dioxide out of the air, says Robert Neyland, Hunley Project director and chief archaeologist.
Variations on that idea are used today. Enter rebreathers.
Rebreathers have been used in certain types of underwater dives and even in space, when NASA equipped Apollo astronauts with portable life support systems that scrubbed out carbon dioxide. (Apollo 13, anyone?)
Still, there's only so long a rebreather will last. The International Space Station, much like modern-day nuclear submarines, gets its oxygen by running an electrical current through water to split the hydrogen from the oxygen.
The Hunley wasn't a great place to be -- sweaty, stagnant and, no doubt, dark. Only a single candle would have lit the captain's depth gauge and compass. The young captain George Dixon would have been able to look out of a small view port. And that's the full tour of the Hunley's navigation system.
While periscopes and submarines are fairly synonymous, the Hunley didn't have one, even though the naval periscope had been invented in 1854 by Hippolyte Marié-Davy. The first submarine thought to actually have an effective periscope was the Gustave Zédé, from France, which launched in 1893.
Periscopes can be great for seeing up and out, and not just from under the sea. World War I soldiers in trenches used them to scope out their surroundings. Charles Lindbergh's Spirit of St. Louis even had a periscope so he could peer around the front-mounted fuel tanks.
Though periscopes have undergone changes, switching from prisms to mirrors and becoming adjustable and retractable, nuclear subs are now using video cameras that can see clearly, even if the craft is 60 feet below the water's surface, says Porter.
No one today will use the Hunley as a blueprint of how to make a submarine -- unless they have a death wish. Even so, the vessel holds an important place in history as proof of concept, Scafuri says.
"Everybody had to take note that they were there."
This story appears in the summer 2017 edition of CNET Magazine. Click here for more magazine stories.
Special Reports: CNET's in-depth features in one place.
Technically Literate: Original works of short fiction with unique perspectives on tech, exclusively on CNET.