TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Writing Multithreaded Code Is Like Juggling Chainsaws

16 pointsby davidblairover 15 years ago

4 comments

jwsover 15 years ago
Apropos <i>Juggling Chainsaws</i>, (but not this post) From an article about "Mad Chad"…<p><i>Tim Newman, a commercial director and cousin of Grammy-winning musician Randy Newman, asked if I could juggle chainsaws? In my naïve enthusiasm I said sure. I had opened my big mouth and the clock was ticking, with only 10 days to figure out how to juggle a live chainsaw without seriously injuring or killing myself. The first four days I was so nervous that I wouldn’t even start the chainsaw. Finally I pulled the cord and on my first attempt, I missed. The chainsaw hit the ground and went crazy, buzzing at full speed. Two policemen ran up and asked, “What the hell are you doing, kid?” I explained my dire situation and they thought it was cool. They began cheering me on. They wanted to see me do it!<p>On shoot day I show up for the commercial and get prepared. I fire up the chainsaw and Tim Newman says, “Whoa, what are you doing?” Long story short, after 10 days of practice, I find out they didn’t want the chainsaw running during the commercial (insurance won’t cover a stunt like that). The plan was to just add the sound effect in post-production. I felt a little stupid but it turned out to be the best mistake I ever made. The seed had been planted and soon I was juggling three saws at the same time. No one in Venice was doing a more extreme act.</i><p>There is a lesson about requirements gathering in there somewhere, and probably one about stepping outside your comfort zone.<p>Whole article: <a href="http://www.venicebeachbook.com/vbb2c.html" rel="nofollow">http://www.venicebeachbook.com/vbb2c.html</a>
mottersover 15 years ago
Indeed. And this is why I think the current multithreading paradigm isn't going to scale well when we start getting into tens and hundreds of CPU cores. Something is going to have to change.
drtse4over 15 years ago
Completely agree, i've dealt myself with an access bottleneck as the one he describes. But i found multi-threaded code debugging quite entertaining (sometimes ;)).
评论 #1084375 未加载
DanielBMarkhamover 15 years ago
I agree.<p>I'd like to point out that the use of immutable data structures solves some threading issues. Unfortunately, as in this example, it's easy to get hung up somewhere in your technology stack without realizing what's going on.