Alamy

HALLOWEEN is still a week away, but homes throughout Silicon Valley are already adorned with images of witches, skeletons and assorted ghouls and gargoyles. Horror stories have also been plentiful in the Valley, courtesy of the region's high-tech companies. On October 21st Yahoo! said it would cut its staff of around 15,000 by at least a tenth. Given the internet firm's woes—its third-quarter profit fell by 64%, to $54m, as online advertising withered—the cuts were perhaps inevitable. Equally striking has been a wave of lay-offs at much smaller start-up companies, which are bracing themselves for a coming recession.

Unlike firms in most other industries, which have not seen a severe downturn since the early 1990s, tech companies still bear the scars of the dotcom bust of 2001. The folk that ran them then learnt painful lessons that many of today's entrepreneurs appear to have taken on board—and that managers in other companies would do well to reflect on. Chief among them are the importance of swift and deep cost-cutting; of focusing scarce resources on core activities; and of convincing investors that your business strategy is a winner.

Given that entrepreneurs tend to be tireless optimists, even experienced hands need a scare. And they are getting it from the venture-capital outfits that have backed many fledgling firms. Sequoia Capital, a leading investor in start-ups, began a recent presentation to bosses of companies in which it owns a stake with a Halloween-style image of a gravestone carrying the words “R.I.P. Good Times”. Sequoia went on to urge the executives to cut costs fast so that their firms would not run out of money before becoming profitable. Other venture capitalists are echoing its message. “Rule number one is to take immediate measures so you can stay in the game,” says Mike Speiser of Sutter Hill Ventures, another VC firm.

Life will be hardest for the many start-ups that are still in the red. Those that need more capital soon will get it only at a very high price if they can get it at all, as venture capitalists tighten their purse strings. According to the National Venture Capital Association, a trade group, and PricewaterhouseCoopers, a consultancy, VC firms provided $7.1 billion of funding in the third quarter of this year, but are likely to cut that amount in coming months.

Venture capitalists are feeling the pinch too. They are finding it harder to unload the stakes they own in start-ups. Big companies which are themselves short of cash are extremely wary of splashing out on the minnows in VC firms' portfolios. At the same time, investors are shunning initial public offerings of venture-backed firms (see chart), which have fallen to their lowest level since 1977. Experts reckon that the market may remain comatose until at least the end of next year.

All this explains why the bosses of several start-ups have started to wield a big axe. Redfin, an online property-broker, and AdBrite, a web-based advertising network, which both had about 100 employees, have slashed their headcount by 20% and 40% respectively this month. Pandora, a music-streaming business, and Searchme, a visual search engine, are among the rapidly growing collection of other start-ups that have also announced job losses. Deep cuts like these may be painful in the short-term, but they are better both for profits and morale than repeated rounds of small lay-offs. In 2001 many firms trimmed too little, too late.

Of course, slashing the workforce now may not make sense for some start-ups. Those focused on areas such as gaming and health care, which may be less vulnerable to a recession, are likely to keep hiring. And companies making big lay-offs could still add new heads in some areas. Announcing a 25% cut in staff numbers at Zillow, another property-related website, Rich Barton, the company's chief executive, said in a blog posting that the firm would still hire people in ad sales and other revenue-generating roles.

Another useful strategy is to shed projects that are not central to a start-up's business. Executives at Jive Software, which produces online collaboration tools for corporate clients, say it is now far better at scrapping initiatives that do not seem to be paying off. Once these have been placed on a “kill list”, there is no further discussion about them. In the past the lack of a formal process for canning ideas meant that many lived on, absorbing time and resources better spent elsewhere.

Elon Musk, boss of Tesla Motors, a start-up that recently began producing an electric sports car, learnt useful lessons from the dotcom bust. He steered PayPal through the early days of the shakeout by maintaining a focus on its core online-payments business and by ditching plans to develop other offerings. Thanks to this discipline, PayPal continued to grow and sold itself to eBay in July 2002. At Tesla Motors, he has delayed plans to add an electric sedan to its product-range from 2010 to mid-2011 so that the company can concentrate more resources on improving margins on its existing car and on expanding its profitable business of building powertrains for other carmakers—a decision partly inspired by his experience at PayPal.

Mr Musk is also trimming jobs at Tesla. “You need to show investors that you have been super-frugal with their money,” he says. More than ever, entrepreneurs need to be able to reassure VC firms on the basic principle that their business models can in future throw off far more cash than investors have pumped into their firms. Mike Kwatinetz of Azure Capital Partners, a VC firm, reckons that many of what he calls “carpetbagger entrepreneurs”—inexperienced youngsters who turned up in Silicon Valley in recent years with a view to getting rich quick—will come a cropper in the downturn because they do not have the foggiest idea of how to turn a profit.

Yet Mr Kwatinetz is bullish about the prospects for those start-ups that manage to survive the crisis. They will face a much less crowded field and their managers will have honed their moneymaking skills in the harshest of all environments. He is on the lookout for firms that could become the next Bill Me Later, which Azure Capital bought into in 2001. Founded the previous year, the company lets internet users make online purchases without using a credit card. After surviving several ups and downs, it was sold to eBay on October 6th for some $945m. It is such Croesus-like sums that make start-ups worth all the toil and trouble.