For those who say it wasn't necessary...even "barbaric", what would they have proposed as an alternative? Continued firebombing by 21st Bomber Command (MGen Curtis LeMay)? of the two target cities plus other Japanese cities? Invasion of Japan by U.S. & Allied forces, against fanatical military and civilian Japanese, with over a million casualties on each side? The potential for the Japanese nuclear program (oh, YES, they had one), to have produced a bomb of their own to use on our fleet and troops? What about the Japanese militarists who refused to surrender, and even the few of them who tried to overthrow their own emperor?
What if the U.S. had not had the four-year lead on the Soviet Union in developing the a-bomb? When Truman told Stalin at Potsdam that the Trinity test had been successful, Stalin wasn't very surprised and basically told Truman the Russians were working on their own (their first test occurred in 1949).
Might Putin be more tempted to use tactical nukes against Ukraine or NATO if our own deterrent forces weren't available?
Those who think the use of the nukes against Japan "controversial", ought to consider these factors. Thankfully, at least so far, there have been no further use of nuclear weapons!