Original image

The Lesser-Known Military Careers of 11 U.S. Presidents

Original image

We know the good ones: Washington coaxing his tattered troops through the winter at Valley Forge, Andrew Jackson bidding the Redcoats adieu in New Orleans, Ike masterminding the invasion of Normandy. Throughout history, American presidents have more often than not been former leaders of the military. Here's a list of eleven presidents and their service records you might not have known about.

1. James Monroe

In June 1775, at the tender age of 17, Monroe took a break from his studies at the College of William and Mary to assist a raid on the Governor's Palace in Virginia. The results? A haul of hundreds of muskets and swords that were used by militia in the Revolutionary War. The next spring he dropped out of school to join the Continental Army, where he rose to the rank of Major, crossed the Delaware River with George Washington, and was wounded at the Battle of Trenton.

2. William Henry Harrison

Perhaps best known for his one-month term in office, Harrison first achieved notoriety as a soldier before his brief occupation of the White House. As the Governor of Indiana, he was the prime antagonist of Tecumseh's Native American confederacy. In 1811 he led a force of 1,000 men against the confederacy while Tecumseh was away, destroying their village in the Battle of Tippacanoe and indirectly contributing to the War of 1812. Tecumseh himself was killed by Harrison's forces a few years later at the Battle of the Thames.

3. Franklin Pierce

With the outbreak of the Mexican-American War, Pierce successfully appealed to President James Polk for an officer's commission. In 1847, having attained the rank of brigadier general despite a complete lack of military experience, he took sail for Veracruz with several thousand men under his command. Things went swimmingly until he fell off his horse at the Battle of Contreras, which effectively ended his military career.

4. Abraham Lincoln

Lincoln's military service lasted less than three months with the Illinois militia during the Black Hawk War. He was elected by the soldiers of his unit to be their Captain, an event he later described as "a success which gave me more pleasure than any I have had since." The future president saw no combat but witnessed its consequences, including many corpses that had been mangled and scalped. He described on such experience in these words:

"The red light of the morning sun was streaming upon them as they lay head towards us on the ground. And ever man had a round red spot on top of his head, about as big as a dollar where the redskins had taken his scalp. It was frightful, but it was grotesque; and the red sunlight seemed to paint everything all over."

5. & 6. Rutherford B. Hayes and William McKinley

These two future presidents served together in the 23rd Ohio Infantry Regiment during the Civil War. Hayes (left) was a middle-aged lawyer who received an officer's commission and eventually rose to brevet major general. McKinley (right) was an eighteen year old private under Hayes' command. Hayes spoke highly of Private McKinley and eventually promoted him. They were separated after Hayes was shot in the arm and left the unit to recuperate. McKinley went on to serve in the bloodiest single-day battle in U.S. history at Antietam. By the end of the war, he achieved the rank of brevet major.

7. Harry S. Truman

Overcoming extremely poor eyesight by allegedly memorizing the eye exam chart, Truman entered the Missouri National Guard. He served from 1905 to 1911, then re-enlisted with the outbreak of WWI and became an officer. While in France, his unit provided support to Patton's tank brigade in the Hundred Days Offensive. On the last day of the war, his unit fired some of the final rounds into German territory before the ceasefire took effect.

8. Lyndon Baines Johnson

When Pearl Harbor was bombed in 1941, Johnson was a sitting Congressman for Texas' 10th district. He quickly became an officer in the Naval Reserve, seeking combat duties before being denied. In 1942 he took part in a three-man review of the South Pacific theater at President Roosevelt's request. The Silver Star he was awarded by General MacArthur has been criticized as a political move by many, who noted his lack of active combat experience. Here's the actual citation that accompanied the award:

"While on a mission of obtaining information in the Southwest Pacific Area, Lieutenant Commander Johnson, in order to obtain personal knowledge of combat conditions, volunteered as an observer on a hazardous aerial combat mission over hostile positions in New Guinea. As our planes neared the target area, they were intercepted by eight hostile fighters. When, at this time the plane in which Lieutenant Commander Johnson was an observer developed mechanical trouble and was forced to turn back alone, presenting a favorable target to the enemy fighters, he evidenced coolness in spite of the hazard involved. His gallant action enabled him to obtain and return with valuable information."

9. Richard Nixon

Nixon, who was born a Quaker, could have been exempted from service during World War II. Despite this, he left his job in the Office of Price Administration for a commission in the U.S. Navy. His first post was at a Naval Air station based, inexplicably, in Iowa. He later asked for and was granted a transfer to the Pacific Theater, where he handled logistics operations. He returned to America without seeing combat and resigned his commission on January 1, 1946.

10. Jimmy Carter

Georgia's only president first left his home state to attend the Naval Academy in 1943. After graduation, he served under Admiral Hyman Rickover in the nascent nuclear submarine program. In 1952 he took part in the clean-up of radioactive materials from an overheated reactor in Chalk River, Canada. He resigned his commission in 1953 after the death of his father.

11. Ronald Reagan

The Gipper had the same problem as Harry Truman: terrible vision. He was called to active duty in 1942 and limited to domestic service, where he served in the Los Angeles area and New York City. For most of the war, he was part of the First Motion Picture Unit (FMPU), an Army Air Force unit made up entirely of cinema personnel. Other famous members included Jimmy Stewart, Clarke Gable, and William Holden. The FMPU was responsible for the production of promotional films for the U.S. military. Projects Reagan worked on ranged from the tasteless (Target Tokyo) to the inspiring (Wings for This Man, one of the first movies to portray the Tuskeegee Airmen).

Original image
iStock // Ekaterina Minaeva
Man Buys Two Metric Tons of LEGO Bricks; Sorts Them Via Machine Learning
Original image
iStock // Ekaterina Minaeva

Jacques Mattheij made a small, but awesome, mistake. He went on eBay one evening and bid on a bunch of bulk LEGO brick auctions, then went to sleep. Upon waking, he discovered that he was the high bidder on many, and was now the proud owner of two tons of LEGO bricks. (This is about 4400 pounds.) He wrote, "[L]esson 1: if you win almost all bids you are bidding too high."

Mattheij had noticed that bulk, unsorted bricks sell for something like €10/kilogram, whereas sets are roughly €40/kg and rare parts go for up to €100/kg. Much of the value of the bricks is in their sorting. If he could reduce the entropy of these bins of unsorted bricks, he could make a tidy profit. While many people do this work by hand, the problem is enormous—just the kind of challenge for a computer. Mattheij writes:

There are 38000+ shapes and there are 100+ possible shades of color (you can roughly tell how old someone is by asking them what lego colors they remember from their youth).

In the following months, Mattheij built a proof-of-concept sorting system using, of course, LEGO. He broke the problem down into a series of sub-problems (including "feeding LEGO reliably from a hopper is surprisingly hard," one of those facts of nature that will stymie even the best system design). After tinkering with the prototype at length, he expanded the system to a surprisingly complex system of conveyer belts (powered by a home treadmill), various pieces of cabinetry, and "copious quantities of crazy glue."

Here's a video showing the current system running at low speed:

The key part of the system was running the bricks past a camera paired with a computer running a neural net-based image classifier. That allows the computer (when sufficiently trained on brick images) to recognize bricks and thus categorize them by color, shape, or other parameters. Remember that as bricks pass by, they can be in any orientation, can be dirty, can even be stuck to other pieces. So having a flexible software system is key to recognizing—in a fraction of a second—what a given brick is, in order to sort it out. When a match is found, a jet of compressed air pops the piece off the conveyer belt and into a waiting bin.

After much experimentation, Mattheij rewrote the software (several times in fact) to accomplish a variety of basic tasks. At its core, the system takes images from a webcam and feeds them to a neural network to do the classification. Of course, the neural net needs to be "trained" by showing it lots of images, and telling it what those images represent. Mattheij's breakthrough was allowing the machine to effectively train itself, with guidance: Running pieces through allows the system to take its own photos, make a guess, and build on that guess. As long as Mattheij corrects the incorrect guesses, he ends up with a decent (and self-reinforcing) corpus of training data. As the machine continues running, it can rack up more training, allowing it to recognize a broad variety of pieces on the fly.

Here's another video, focusing on how the pieces move on conveyer belts (running at slow speed so puny humans can follow). You can also see the air jets in action:

In an email interview, Mattheij told Mental Floss that the system currently sorts LEGO bricks into more than 50 categories. It can also be run in a color-sorting mode to bin the parts across 12 color groups. (Thus at present you'd likely do a two-pass sort on the bricks: once for shape, then a separate pass for color.) He continues to refine the system, with a focus on making its recognition abilities faster. At some point down the line, he plans to make the software portion open source. You're on your own as far as building conveyer belts, bins, and so forth.

Check out Mattheij's writeup in two parts for more information. It starts with an overview of the story, followed up with a deep dive on the software. He's also tweeting about the project (among other things). And if you look around a bit, you'll find bulk LEGO brick auctions online—it's definitely a thing!

Original image
Why Your iPhone Doesn't Always Show You the 'Decline Call' Button
Original image

When you get an incoming call to your iPhone, the options that light up your screen aren't always the same. Sometimes you have the option to decline a call, and sometimes you only see a slider that allows you to answer, without an option to send the caller straight to voicemail. Why the difference?

A while back, Business Insider tracked down the answer to this conundrum of modern communication, and the answer turns out to be fairly simple.

If you get a call while your phone is locked, you’ll see the "slide to answer" button. In order to decline the call, you have to double-tap the power button on the top of the phone.

If your phone is unlocked, however, the screen that appears during an incoming call is different. You’ll see the two buttons, "accept" or "decline."

Either way, you get the options to set a reminder to call that person back or to immediately send them a text message. ("Dad, stop calling me at work, it’s 9 a.m.!")

[h/t Business Insider]