These days, "learn to code" is the conventional wisdom doled out to anyone who's been laid off or feels stalled professionally. But bestselling management author and CNBC contributor Suzy Welch says you'll want to think carefully before pursuing something that's being presented as a professional quick-fix. "Coding is great for some people," she tells CNBC Make It. "I have a nephew who was born doing calculus. He majored in comp sci at college, and now earns a six-figure salary at 24 years old. That kind of story is why boot camps are popping up everywhere and their classrooms are full."

CNBC Contributor Suzy Welch

But Welch says there is a "cold, hard truth" you won't often hear about boot camps: "Most of them only teach the basics." As a result, many graduates don't leave boot camp with the knowledge they'd need to take on a high-paying engineering job. In fact, Welch says, boot camp graduates often fall victim to a common pattern: Big companies hire boot camp coders in huge groups, fully expecting to lay off half of them. "Boot camps promise you a job paying $60 or $70K upon graduation, and they typically deliver. But they very rarely say that afterward, most big companies put you through their own in-house training programs, and for every hundred boot camp graduates hired, 50 are screened out after six months." Welch notes that in a tight labor market, boot camp-trained coders shouldn't worry — the odds they'll get hired again are strong. "But," she says, "that reality suggests boot camp mainly makes sense under two circumstances."﻿

1. You're talented

An excellent reason to go to a coding boot camp, says Welch, is if you have "an actual aptitude for coding." "You have to have some skill to succeed," she says. "Before handing over your credit card, do yourself a favor and take one of the many online classes or tests to see if you have an aptitude for coding, which — hello! — is actually an inextricable prerequisite for a real dev career."

2. You've exhausted other options