Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#26 2015-06-02 13:17:22

BuzzerBee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [C# Tip] Illegal Cross-Thread Operations

Nothing wrong with Thread.Sleep as long as it's properly threaded. Usually.

I myself am a fan of Microsoft's async stuff (e.g. await Task.Delay)


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

Wooted by:

#27 2015-06-02 13:26:58

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: [C# Tip] Illegal Cross-Thread Operations

BuzzerBee wrote:

I myself am a fan of Microsoft's async stuff (e.g. await Task.Delay)

YESSS
YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS


shh i have returned

Offline

#28 2015-06-02 16:08:56, last edited by Tomahawk (2015-06-02 16:14:11)

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [C# Tip] Illegal Cross-Thread Operations

OMG, until the program crashes, do what's easiest ~ i.e. the one liners. If it's not crashing, there's absolutely no point changing the code.

People who wanna invoke and delegate and use background workers can do that and keep it to themselves, and not try to force it on others.

Leave off claiming that you need complex code to write a simple bot, just because it "might" crash and "might" be harmful in some incredibly improbable scenarios.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by:

#29 2015-06-03 04:47:21, last edited by BuzzerBee (2015-06-03 04:48:03)

BuzzerBee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [C# Tip] Illegal Cross-Thread Operations

"Do what's easiest" okay so when a professional company wants you to code something for them are you going to take shortcuts? Programming isn't supposed to be "easy" it's supposed to be a challenge.

Programming is supposed to dare you to try something new and push you to make the best, most responsive program you can.

Sure, if you're just making a simple program for yourself, so whatever. But personally I like to thinking of programming as a fun, dynamic puzzle with code that can always be improved.


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

Wooted by:

#30 2015-06-03 08:15:11

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [C# Tip] Illegal Cross-Thread Operations

BuzzerBee wrote:

"Do what's easiest" okay so when a professional company wants you to code something for them are you going to take shortcuts? Programming isn't supposed to be "easy" it's supposed to be a challenge.

Programming is supposed to dare you to try something new and push you to make the best, most responsive program you can.

Sure, if you're just making a simple program for yourself, so whatever. But personally I like to thinking of programming as a fun, dynamic puzzle with code that can always be improved.

If you want to code everything the hardest way, you are in serious troubles my friend.


http://i.imgur.com/bjvgH5L.png?1

Offline

#31 2015-06-03 08:23:34

Xfrogman43
Member
From: need to find a new home
Joined: 2015-02-15
Posts: 4,174

Re: [C# Tip] Illegal Cross-Thread Operations

marcoantonimsantos wrote:
BuzzerBee wrote:

"Do what's easiest" okay so when a professional company wants you to code something for them are you going to take shortcuts? Programming isn't supposed to be "easy" it's supposed to be a challenge.

Programming is supposed to dare you to try something new and push you to make the best, most responsive program you can.

Sure, if you're just making a simple program for yourself, so whatever. But personally I like to thinking of programming as a fun, dynamic puzzle with code that can always be improved.

If you want to code everything the hardest way, you are in serious troubles my friend.

No, that's called learning how to do stuff differently instead of having to google everything.


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

#32 2015-06-03 08:28:29

BuzzerBee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [C# Tip] Illegal Cross-Thread Operations

I don't want to program the hard way. And I don't.
Invoking is easy.

I just want to program something that won't spontaneously crash.
I just want to program without taking dangerous shortcuts.


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

#33 2015-06-03 08:33:22

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: [C# Tip] Illegal Cross-Thread Operations

When writing software, you should always try to be clean and efficient. You should also anticipate potential faults and correct for them. It's not about making it difficult, it's about making it sane.

Offline

#34 2015-06-03 09:05:59, last edited by DarkDragon4900 (2015-06-03 09:07:32)

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: [C# Tip] Illegal Cross-Thread Operations

The way you take in coding your apps defines your level of experience in programming.
Though they might work the same way, there is a difference between a professional's code and a rookie's.

Offline

#35 2015-06-03 11:05:49

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: [C# Tip] Illegal Cross-Thread Operations

BuzzerBee wrote:

"Do what's easiest" okay so when a professional company wants you to code something for them are you going to take shortcuts? Programming isn't supposed to be "easy" it's supposed to be a challenge.

Programming is supposed to dare you to try something new and push you to make the best, most responsive program you can.

Sure, if you're just making a simple program for yourself, so whatever. But personally I like to thinking of programming as a fun, dynamic puzzle with code that can always be improved.

When in a company it's about the balance between quantity and how long you work on it (how much you cost).
Right now you don't really have to worry about it, but when working you don't have to fix every single bug. Just the ones that the customer might experience.

Offline

#36 2015-06-03 11:16:25

1448
Formerly alkazam1448
From: Numberland
Joined: 2015-04-12
Posts: 683
Website

Re: [C# Tip] Illegal Cross-Thread Operations

den3107 wrote:
BuzzerBee wrote:

"Do what's easiest" okay so when a professional company wants you to code something for them are you going to take shortcuts? Programming isn't supposed to be "easy" it's supposed to be a challenge.

Programming is supposed to dare you to try something new and push you to make the best, most responsive program you can.

Sure, if you're just making a simple program for yourself, so whatever. But personally I like to thinking of programming as a fun, dynamic puzzle with code that can always be improved.

When in a company it's about the balance between quantity and how long you work on it (how much you cost).
Right now you don't really have to worry about it, but when working you don't have to fix every single bug. Just the ones that the customer might experience.

Btw there are many ppl who work in a company, so the person who does checkForIllegalCrossThreadCalls = false; does not have to care. There will be another team to fix these bugs.

Offline

#37 2015-06-03 14:11:39

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: [C# Tip] Illegal Cross-Thread Operations

alkazam1448 wrote:
someqoutes

Btw there are many ppl who work in a company, so the person who does checkForIllegalCrossThreadCalls = false; does not have to care. There will be another team to fix these bugs.

And that's where you'll get fired.
YOU make the program, YOU fix the bugs, YOU are the ones that will be looked at when there is a bug found, YOU will be put to blame and YOU ARE TO BLAME.

Offline

Wooted by: (2)

#38 2015-06-03 14:25:51

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: [C# Tip] Illegal Cross-Thread Operations

Shh.
Quiet.
Use whatever pleases you.
Was it checkforillegalcrossthreadcalls or invoking.
Kthxbai.

Offline

#39 2015-06-03 19:24:16

BuzzerBee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [C# Tip] Illegal Cross-Thread Operations

DarkDragon4900 wrote:

Shh.
Quiet.
Use whatever pleases you.
Was it checkforillegalcrossthreadcalls or invoking.
Kthxbai.

No


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

Wooted by:

#40 2015-06-03 20:35:35

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [C# Tip] Illegal Cross-Thread Operations

BuzzerBee wrote:
DarkDragon4900 wrote:

Shh.
Quiet.
Use whatever pleases you.
Was it checkforillegalcrossthreadcalls or invoking.
Kthxbai.

No

stop forcing newbies to use invoke, seriously...
PLUS, don't force ppl like I or DarkDragon that already know how to code good to use your methods, everyone does what they WANT and know.


http://i.imgur.com/bjvgH5L.png?1

Offline

#41 2015-06-03 21:01:37, last edited by Xfrogman43 (2015-06-03 21:02:00)

Xfrogman43
Member
From: need to find a new home
Joined: 2015-02-15
Posts: 4,174

Re: [C# Tip] Illegal Cross-Thread Operations

He is not forcing anybody to do anything, he is saying it is a good idea. You do not have to do anything anybody tells you to do, so just do whatever you want.


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

#42 2015-06-03 22:00:34

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: [C# Tip] Illegal Cross-Thread Operations

marcoantonimsantos wrote:
BuzzerBee wrote:
DarkDragon4900 wrote:

Shh.
Quiet.
Use whatever pleases you.
Was it checkforillegalcrossthreadcalls or invoking.
Kthxbai.

No

stop forcing newbies to use invoke, seriously...
PLUS, don't force ppl like I or DarkDragon that already know how to code good to use your methods, everyone does what they WANT and know.

Your way is more of a lazy workaround than actually trying to understand why it's a problem and correcting it.

Offline

#43 2015-06-03 22:17:59, last edited by Tomahawk (2015-06-03 22:19:23)

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [C# Tip] Illegal Cross-Thread Operations

Let's just /thread, and let zubberzee code his bot like it's the next Windows OS. Nobody gives a damn; if it works, it works.

Stawp. Pls.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by: (2)

#44 2015-06-03 23:05:51, last edited by lrussell (2015-06-03 23:06:07)

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: [C# Tip] Illegal Cross-Thread Operations

Tomahawk wrote:

Let's just /thread, and let zubberzee code his bot like it's the next Windows OS. Nobody gives a damn; if it works, it works.

Stawp. Pls.

That's like saying this is a good way to convert a string to an integer just because it works.

public static int? ToInt(string value)
        {
            for (int i = 0; i < int.MaxValue; i++)
            {
                if (value == i.ToString())
                {
                    return i;
                }
            }

            return null;
        }

Offline

Wooted by:

#45 2015-06-03 23:18:02

TiKen
Member
Joined: 2015-02-24
Posts: 298

Re: [C# Tip] Illegal Cross-Thread Operations

Lets end this thread on this quote from my dead relative cousin:

Dead far relative cousin wrote:

I never died playing Russian roulette, why should I stop now? Kthxbai plzgo. Yolo swag.

Rest in peace. I'm sad, but deep inside I know it's better for humanity.

Offline

Wooted by: (2)

#46 2015-06-03 23:22:18

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [C# Tip] Illegal Cross-Thread Operations

lrussell wrote:
Tomahawk wrote:

Let's just /thread, and let zubberzee code his bot like it's the next Windows OS. Nobody gives a damn; if it works, it works.

Stawp. Pls.

That's like saying this is a good way to convert a string to an integer just because it works.

public static int? ToInt(string value)
        {
            for (int i = 0; i < int.MaxValue; i++)
            {
                if (value == i.ToString())
                {
                    return i;
                }
            }

            return null;
        }

You're arguing on the wrong website. Find Stack Overflow or a Youtube comment war.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by:

#47 2015-06-03 23:23:23

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: [C# Tip] Illegal Cross-Thread Operations

Lmfao.

Offline

#48 2015-06-04 00:12:03

BuzzerBee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [C# Tip] Illegal Cross-Thread Operations

It's not something arguable... The Boolean for illegal cross-thread calls was only kept in later versions of .NET Framework for backwards compatibility...

The only thing you are arguing is your right to take dangerous shortcuts, which is a right you do possess. So keep doing you and let me know when your app crashes


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

#49 2015-06-04 08:13:27, last edited by realmaster42 (2015-06-04 08:14:03)

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [C# Tip] Illegal Cross-Thread Operations

BuzzerBee wrote:

It's not something arguable... The Boolean for illegal cross-thread calls was only kept in later versions of .NET Framework for backwards compatibility...

The only thing you are arguing is your right to take dangerous shortcuts, which is a right you do possess. So keep doing you and let me know when your app crashes

/thread

for (int i=0;i<99999999*9999999;i++)
{
/thread
System.Threading.Thread.Sleep(1)
}

http://i.imgur.com/bjvgH5L.png?1

Offline

#50 2015-06-04 16:09:10, last edited by Tomahawk (2015-06-04 16:09:51)

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [C# Tip] Illegal Cross-Thread Operations

BuzzerBee wrote:

It's not something arguable... The Boolean for illegal cross-thread calls was only kept in later versions of .NET Framework for backwards compatibility...

The only thing you are arguing is your right to take dangerous shortcuts, which is a right you do possess. So keep doing you and let me know when your app crashes

I'll let you know then when it never crashes. Dangerous shortcut my ****.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by:
BuzzerBee1433870121510952

Board footer

Powered by FluxBB

[ Started around 1732478053.265 - Generated in 0.114 seconds, 14 queries executed - Memory usage: 1.86 MiB (Peak: 2.16 MiB) ]