# Programming in Windows - detecting whether an application has finished running & writing file?

**URL:** <https://boards.straightdope.com/t/programming-in-windows-detecting-whether-an-application-has-finished-running-writing-file/525562>\
**Category:** Factual Questions\
**Created:** [January 19, 2010, 3:34pm UTC](https://boards.straightdope.com/t/programming-in-windows-detecting-whether-an-application-has-finished-running-writing-file/525562 "2010-01-19T15:34:25Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Digital\_Stimulus](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Digital\_Stimulus](https://boards.straightdope.com/u/Digital_Stimulus)\
**Post date:** [January 24, 2010, 2:20am UTC](https://boards.straightdope.com/t/programming-in-windows-detecting-whether-an-application-has-finished-running-writing-file/525562/21 "2010-01-24T02:20:34Z")

</div>

> [@Sage\_Rat](#):
>
> To me it sounds like, essentially, you’re trying to get around having to debug your programs. That they hang and are unpredictable is the issue, not how to counteract that, unless you’re working with some sort of complex cloud computing sort of deal.

Or, no matter what it sounds like to you, it could be _glue code_. Y’know, connecting (functional) black boxes together so as to avoid reimplementing (and subsequent debugging) of (complex) code, neither open source nor written by him, that (mostly) _already works_. And, in my case, _also_ doing some sort of “complex cloud computing sort of deal” (though my framework is more flexible than that).

I think you hit a nerve – sorry for my reaction. But, rereading it, I still think the above stands, so I’m posting it anyway.

> [@](#):
>
> Ultimately, halfbaked code is halfbaked. If you’re the one who made it, adding further layers of complexity just means that there’s further layers of halfbaked code.

You’re half right – halfbaked code is halfbaked. But – even though it’s usually not the best way to go (in both my opinion and experience) – further layers of complexity _can_ handle crap code fairly cleanly and make it both usable and much better. Again, not the preferable way to do things, but sometimes the best way.

As an aside: the one thing I remember from [All Tomorrow’s Parties](http://www.amazon.com/All-Tomorrows-Parties-William-Gibson/dp/0425190447/ref=pd_bxgy_b_text_b) by William Gibson was his conjecture that future code will progress via _accretion_. That is, pieces/parts will be layered onto one another in a big, messy, inefficient mass – coders will take what works and ignore what doesn’t, eventually reaching the point where the core is mostly inviolable. Not only because it’d be too much time/effort to go back, tease the stuff apart, and reimplement it, but because no one had enough knowledge to do so.

The more I thought about it, the more I came to believe that Gibson’s right. Consider **Napier** to just have a head start on a cyberpunk future. 😉

---

<div class="post-metadata">

**Author:** ![Napier](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Napier](https://boards.straightdope.com/u/Napier)\
**Post date:** [January 24, 2010, 1:03pm UTC](https://boards.straightdope.com/t/programming-in-windows-detecting-whether-an-application-has-finished-running-writing-file/525562/22 "2010-01-24T13:03:15Z")

</div>

> [@Digital\_Stimulus](#):
>
> […] Consider Napier to just have a head start on a cyberpunk future.

Gee, thanks.

The inner program I’m working with the most these days is somebody else’s product, and it is a very good one. It does something mathematically challenging in very versatile and straightforward ways. It seems like most programs do more interacting with the user and moving information around than anything else, but there was a time we called computers “computers” because of the computational work they did, and this program really does some heavy lifting. On some machines, running this program sounds funny, because some processor fan that’s never kicked on does so, and stays on for minutes.

I wish the inner program didn’t ever crash, but I’ve been using it for 10 years and never found any competitors that were even close, in the ways that are important in my work.

By the way, Gibson’s big, messy, inefficient mass conjecture is the most offensive idea I’ve heard so far this year. I mean, not his thinking that it might be, but its existence per se. I already harbor daydreams that a day will dawn when programming languages have no compromises or unappealing features, and any program useful enough to have multiple users will have been completely cleaned and debugged. I think one way of describing software is “a category of machines that can be perfect”, and it’s fiendish that software machines are the most unreliable category of machines I deal with.

---

<div class="post-metadata">

**Author:** ![Digital\_Stimulus](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Digital\_Stimulus](https://boards.straightdope.com/u/Digital_Stimulus)\
**Post date:** [January 24, 2010, 5:33pm UTC](https://boards.straightdope.com/t/programming-in-windows-detecting-whether-an-application-has-finished-running-writing-file/525562/23 "2010-01-24T17:33:31Z")

</div>

> [@Napier](#):
>
> …I think one way of describing software is “a category of machines that can be perfect”…

Not so long as software is written by humans. Unless, of course, consumer software ends up being written the way the [space shuttle software](http://www.fastcompany.com/node/28121/print) is.

Theoretically possible, ideologically comforting…but realistically? Utter bunkum.

[Previous page](https://boards.straightdope.com/t/programming-in-windows-detecting-whether-an-application-has-finished-running-writing-file/525562.md?page=1)
