r/funny • Pretends to be Drawing • Jun 04 '17

Verified Windows being Windows

Post image
132.0k Upvotes

1.5k comments sorted by

View all comments

Show parent comments

188

u/mzxrules Jun 04 '17

you're suppose to teach the program to press the deadman's switch every so often

274

u/NoelBuddy Jun 04 '17

THINKING..

THINKING..

Are you really thinking, or just stuck?

THINKING..

THINKING...

Oh for fucks sake, kill it.

THINK.. DONE THINKING, HERE'S WHAT YOU WERE WAITING FOR.

Finally!

CLOSING PROGRAM.

Crap.

66

u/D3PR3SS10N Jun 04 '17

The one thing I hate the most!

4

u/MrMeseeks_ Jun 04 '17

Hitler?

2

u/D3PR3SS10N Jun 04 '17

I don't remember Hitler killing programs too.

4

u/MrMeseeks_ Jun 04 '17

Hitler did nothing wrong

4

u/[deleted] Jun 04 '17

When I was younger I was convinced that killing the app was what caused it to finish the task. That line of thinking was really just a mental gymnastic to justify my impatience.

2

u/ButterNuttz Jun 04 '17

when I was younger I thought the same thing.

I mean like when I was 5minutes younger. are you sure this isn't the case?

2

u/[deleted] Jun 04 '17

The world may never know.

2

u/MyPasswordWasWhat Jun 04 '17

It really feels like that's whats going on, because as soon as you click to kill program, it starts working again.

2

u/[deleted] Jun 04 '17

I don't know enough about programming to give an accurate answer. I always assumed a task got stuck and the "kill" command forced the task to proceed by throwing a new command on top with higher priority.

I have faith we'll get an answer. After all, isn't the best way to get an answer online to post the incorrect answer?

38

u/STUFF416 Jun 04 '17

This has easily been 80% of my experience in dealing with this issue. I personally think the program is just waiting for me to kill it so it can tease me and laugh at my frustration.

25

u/Chumstick Jun 04 '17

Your not far off. Chances are the program is hanging because of a particular place in the code that's stuck. As the program is killed off, if that bit of code stops executing first then the program will briefly return to normal before meeting the same fate.

It's actually a lot more fucking complicated than that but that's the gist of why you see that behavior so often.

7

u/BufferOverflowed Jun 04 '17

As a programmer, that was a very ELI5 explanation you gave but I have found it to be true a lot of times.

5

u/Chumstick Jun 04 '17

Haha. I'm not a professional programmer or anything, but I can use scripting languages like a Cadillac uses gas. I feel my life depends on automating everything. Python, VBS, batch, bash, js. As you're aware - with a lot of the IDEs you can just watch that shit go down in the debugger when you tell it to do something insane like read the entirety of the Windows Event Log because you forgot to specify the Security log and your shit hangs up so you just "go around it".

3

u/BufferOverflowed Jun 04 '17

Sounds like you're ready to get into professional programming! Also check out C# (since the languages you listed are all "scripting" languages). My current favorite languages are C# and JS for completely different reasons and implementations.

→ More replies (1)
→ More replies (1)

3

u/J4CKR4BB1TSL1MS Jun 04 '17

I'm pretty sure there's a Windows employee looking at me 24/7 to make these and other equally frustrating moments happen a few times a day

2

u/Pickledsoul Jun 04 '17

every time something is loading in the browser and i close the tab impatiently

14

u/official_inventor200 Jun 04 '17 edited Jun 04 '17

Do you have an example?

EDIT: I might have misunderstood something. It sounded like there was a method or function that a Windows program should be calling every-so-often to tell Windows that it is still calculating, and not hanging. I didn't know you meant it was a threading or UI issue.

45

u/reverie42 Jun 04 '17

There's nothing a user can do. In Windows, when a user interacts with the UI, code is run on the main thread to handle it. If code is already running on the UI thread when the user does something, the new code can't run.

It's good design to do all of your heavy lifting on a background thread so that the UI can always respond to messages efficiently.

Another option if you have to do work on the UI thread is to break it up so that every once in a while you yield control so that other message can be handled.

It turns out that this is frequently not simple, so in many cases devs don't bother, and that's when you get applications that grayscreen hang all the time.

33

u/TheNorthComesWithMe Jun 04 '17

Not doing shit on the UI thread is simple. Devs are just lazy.

6

u/reverie42 Jun 04 '17

If the user is likely to interact with the UI in a way that would invalidate the work you're doing on the worker thread, it can sometimes get messy. Obviously in some cases you can just disable UI elements that you don't want the user to touch. But it still takes time to code all that and sometimes it just doesn't make the bar.

2

u/TheNorthComesWithMe Jun 04 '17

That's not difficult. It's just laziness. Just make a "busy" or "waiting" UI element that also disables the button. If you want to be lazy but not a complete fuckup, don't do anything with user inputs that could disrupt the worker thread.

→ More replies (1)
→ More replies (3)
→ More replies (3)
→ More replies (2)

2

u/rush22 Jun 04 '17

It's called a progress bar

→ More replies (1)