New bill would ban auto-scrolling and auto-play videos
-
@Applied-Mediocrity Because the overload you're talking about is an array of objects, a detail that's merely hidden by the params keyword. You're just another step behind what @levicki did with inlining the format variables like PHP does. It's not wrong just because I was explicit or you don't like the new keyword.
-
@levicki said in New bill would ban auto-scrolling and auto-play videos:
You must admit
Guaranteed that won't happen.
-
@levicki Eh, we might still end up in the wrong. Care to interpret the JIT-ed result?
All I can tell is the obvious: the call to
Format
got inlined, but does it actually help or not?
What I'm dead sure is that simple
Concat
is much less wasteful either way, and more readable, too, but because it's Jeff who's running that code, I think it's time I get the point.
-
@heterodox said in New bill would ban auto-scrolling and auto-play videos:
@levicki said in New bill would ban auto-scrolling and auto-play videos:
You must admit
Guaranteed that won't happen.
Come on. In his 11 months since joining this forum, he admitted an error exactly once. That's a far better record than most other users combined!
-
@Applied-Mediocrity said in New bill would ban auto-scrolling and auto-play videos:
What I'm dead sure is that simple Concat is much less wasteful either way, and more readable, too, but because it's Jeff who's running that code, I think it's time I get the point.
Well, really, since it's Jeff, I don't even have to parrot back out the feature at all because every request is denied no matter what it is.
@levicki said in New bill would ban auto-scrolling and auto-play videos:
@Zenith I am not sure whether C# compiler is smart enough to avoid making a copy of that string object if you pass it via new array like you did. What you said amounts to "here is this string object, use it to initialize new string array object with one element of type string which you will get by copying this existing string and then pass that to Format and then pass the result to the WriteLine". You must admit it's at least convoluted if not worse.
I would think that it has to be since that's such a common case? So, let's say I do this instead:
public static T[] DeclareArray<T> (params T[] Array_Shortcut) { return Array_Shortcut; } System.String.Format("You don't need {0}.", Zenith.Functions.DeclareArray<System.Object>(System.Console.ReadLine()));
There's no new keyword but it does add another stack frame so is it better or worse?
If you look at the .NET reference source, you'll see that all Format() calls do some form of this:
return FormatHelper(provider, format, new ParamsArray(args));
And, like I said, the framework also does this:
// Writes out a formatted string and a new line. Uses the same // semantics as String.Format. // public virtual void WriteLine (String format, params Object[] arg) { WriteLine(String.Format(FormatProvider, format, arg)); }
Don't read too much from there at once, though, especially the Windows Forms area...
@Gąska said in New bill would ban auto-scrolling and auto-play videos:
Come on. In his 11 months since joining this forum, he admitted an error exactly once. That's a far better record than most other users combined!
Actually, I've admitted multiple errors. In the programming confessions thread, I admitted I sent data over a socket one byte at a time because I didn't understand buffers. In the entrepreneur thread, I admitted I never expected to take a massive loss on so much inventory. In this thread, I admitted I didn't know WriteLine() had a formatting overload. There are probably others. This industry has a problem where some people think anybody that's not a doormat is "difficult."
-
@topspin said in New bill would ban auto-scrolling and auto-play videos:
Bitches get scritches!
I need this on a t-shirt immediately.
-
@levicki said in New bill would ban auto-scrolling and auto-play videos:
Visiting a website to see one thing and having it automatically shove another thing down your throat right after you finish with the first one is the same as a waiter bringing you another drink after the one you ordered without asking.
I'd be upset if he let me sit there with an empty glass for long, TBH.
-
@heterodox said in New bill would ban auto-scrolling and auto-play videos:
@levicki said in New bill would ban auto-scrolling and auto-play videos:
You must admit
Guaranteed that won't happen.
ITYM YMBNH
Filed under: HTH HAND YMMV IANAL
-
@levicki said in New bill would ban auto-scrolling and auto-play videos:
I guess you meant to say "Which, is what someone who is addicted will NOT do." because that's the only way your sentence would make any sense.
Did you read the article? It proposes that it will lock you out after 30 minutes, but it can be disabled. So my statement makes perfect sense, anyone who wants to navigate for more than 30minutes at a time will just disable it.
Closing the tab and then going to the same site to watch something else I actually want to watch? How convenient.
If you are changing the content after the video you want is over, what is the issue to begin with?
Nope
Okay? You asked, I answered. Do you have any rationale here or just being obtuse?
So if I willingly chose to go through a dark alley I also consented to be raped, mugged or killed? If being raped, mugged or killed is such an issue just don't go outside?
Do you consent? no. Do you accept that as a possibility? Yes.
Well, inside isn't that safe either, a lot of rapes happen in peoples own homes.
-
@levicki said in New bill would ban auto-scrolling and auto-play videos:
I can't believe that you lot are against a law that would ban infini-scroll and autoplay, but you are for a law that would force car manufacturers to detect babies left in cars. In one case you don't want government to babysit people and in the other you do. Such hypocrisy
I am against all of those things.
-
@Dragoon said in New bill would ban auto-scrolling and auto-play videos:
Do you have any rationale here or just being obtuse?
Consider the source.
-
@Applied-Mediocrity said in New bill would ban auto-scrolling and auto-play videos:
Ok, screw that. Here's a multiple-choice question. Which is the right bit to put in a Speed-up loop, given the chance?
A)
System.Console.WriteLine(System.String.Format("You don't need {0}.", new System.Object[]{String_Feature}));
B)System.Console.WriteLine(System.String.Format("You don't need {0}.", String_Feature));
C)System.Console.WriteLine("You don't need " + String_Feature + ".");
E)return Boolean.Parse("FILE_NOT_FOUND");
Use version 1. It is the most verbous and convoluted version of all. Hardly anyone will understand that.
-
Now then. @levicki has not commented on the machine code provided (it probably isn't worth the bother), I must admit I was wrong about @Zenith being wrong on the internets.
It seems unwieldy not to use shortcuts provided by the compiler and the framework, but that's all it is.
-
@Applied-Mediocrity said in New bill would ban auto-scrolling and auto-play videos:
Ok, screw that. Here's a multiple-choice question. Which is the right bit to put in a Speed-up loop, given the chance?
A)
System.Console.WriteLine(System.String.Format("You don't need {0}.", new System.Object[]{String_Feature}));
B)System.Console.WriteLine(System.String.Format("You don't need {0}.", String_Feature));
C)System.Console.WriteLine("You don't need " + String_Feature + ".");
E)return Boolean.Parse("FILE_NOT_FOUND");
System.Console.WriteLine($"You don't need {String_Feature}.");
-
@BernieTheBernie said in New bill would ban auto-scrolling and auto-play videos:
@Applied-Mediocrity said in New bill would ban auto-scrolling and auto-play videos:
Ok, screw that. Here's a multiple-choice question. Which is the right bit to put in a Speed-up loop, given the chance?
A)
System.Console.WriteLine(System.String.Format("You don't need {0}.", new System.Object[]{String_Feature}));
B)System.Console.WriteLine(System.String.Format("You don't need {0}.", String_Feature));
C)System.Console.WriteLine("You don't need " + String_Feature + ".");
E)return Boolean.Parse("FILE_NOT_FOUND");
Use version 1. It is the most verbous and convoluted version of all. Hardly anyone will understand that.
I vote for
D
-
@topspin said in New bill would ban auto-scrolling and auto-play videos:
@Zerosquare said in New bill would ban auto-scrolling and auto-play videos:
And what about the Garage? It's highly addictive...
It comes with free house burnings so the problem is self-regulating
TANSTAAFHB