Children should be encouraged to spend more time online to "save the country", according to the former head of Britain's electronic surveillance agency.
Robert Hannigan, who was the director of GCHQ until earlier this year, says Britain is lagging behind other countries when it comes to cyber skills.
Writing in the Daily Telegraph, he said: "If you are spending a disproportionate amount of your holiday unsuccessfully attempting to separate your children from WiFi or their digital devices, do not despair. Your poor parenting may be helping them and saving the country.
"The assumption that time online or in front of a screen is life wasted needs challenging. It is driven by fear.
"We need young people to explore this digital world just as they explore the physical world.
"We worry about being over-protective when they leave the house; we need to have the same debate about the balance of risk in the world of the internet."
The former head of the agency - referred to as Britain's listening post - was writing after Anne Longfield, the Children's Commissioner for England, warned that parents should not allow their children to use the internet and social media "in the same way they would use sweets or junk food".
She said children should not be left to use their devices without "agreed boundaries" as she launched a guide to promote a positive relationship with technology.
But Mr Hannigan said the country was "desperately" short of computer scientists and engineers - and needed children who "have been allowed to behave like engineers" by exploring, breaking and reassembling things.
He wrote: "None of us as parents would want our children to eat junk food all the time. For those same reasons we shouldn't want our children to do the same with their online time.
"This country ... lacks the broad "cyber skills" needed now, never mind in the next 20 years.
"Traditional methods will not solve this. There are many excellent computer science and engineering teachers, but not enough.
"Fortunately, today's young people have become good at learning through seeing and doing online.
"They are teaching themselves in new ways. It follows that the best thing we can do is to focus less on the time they spend on screens at home and more on the nature of the activity."