WTF Bites



  • @anonymous234 I've got a tree tab plugin on Opera that works pretty well, but the fit-and-finish isn't the best


  • BINNED

    :trwtf: is everyone's apparent difficulties with tabs.
    25776f61-04de-4feb-9888-e56f033c2be2-image.png


    Filed under: if this is wrong then I don't want to do it right


  • 🚽 Regular

    @kazitor I don't see how your post helps. What are you trying to demonstrate?

    The two different unread counters?


  • BINNED

    @Zecc I have two open (well, three now)

    I once had dozens, set to reopen all at startup. Then Firefox removed those "tab groups", and I took that opportunity to bookmark some stuff cull everything I didn't really need. You might be surprised how little you actually need at any one time, and how easy pages are to re-find later.


  • Notification Spam Recipient

    @kazitor said in WTF Bites:

    how easy pages are to re-find later.

    Especially when they're organized into trees?

    94e9d257-e07a-4cc2-99b7-3f05da489a5f-image.png



  • @Tsaukpaetra said in WTF Bites:

    it's about 15 miles west and three miles south of the actual location. Speed and time is correct though.

    Date and Time in GPS data is in UTC, but I guess you are shown local time. And worse: speed in non-metric units.
    You see, there are a couple of problems...


  • Notification Spam Recipient

    @BernieTheBernie said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    it's about 15 miles west and three miles south of the actual location. Speed and time is correct though.

    Date and Time in GPS data is in UTC, but I guess you are shown local time. And worse: speed in non-metric units.
    You see, there are a couple of problems...

    I can deal with local time, and non-metric units. I cannot handle multi-kilometer discrepancy.



  • @Tsaukpaetra said in WTF Bites:

    I can deal with local time

    Perhaps it's you who can do it. But the progrummer of that piece of code? He might mix up time zones DST etc., thus show you e.g. the position of an hour ago. Or of May 9 instead of Sep 5, or ...
    You remember my posts about my cow-orkers' capability of handling date and time?


  • Notification Spam Recipient

    @BernieTheBernie said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    I can deal with local time

    Perhaps it's you who can do it. But the progrummer of that piece of code? He might mix up time zones DST etc., thus show you e.g. the position of an hour ago. Or of May 9 instead of Sep 5, or ...
    You remember my posts about my cow-orkers' capability of handling date and time?

    Date and time are currently irrelevant to this discussion.


  • Discourse touched me in a no-no place

    @Bulb said in WTF Bites:

    And it is as much an urban myth that women can. At most they are a bit better at scheduling mental timer interrupts.

    I think that it's more that they're more likely to have to suffer from lots of external non-maskable interrupts, aka children. I'm guessing that they just have to practice not holding so much context state… which limits the complexity of what can be done. It's not a fundamental difference of biology between genders, but rather that the biomorphology of the brain changes to accommodate working that way.

    The more you learn about the brain, the less you see fundamental gender differences and the more you see the impact of socialization and culture on brain structure.


  • Discourse touched me in a no-no place

    @Vixen said in WTF Bites:

    you think your tab backlog is high....
    i have four windows that are maximized open. all four windows have so many tabs open there's not enough room to show the favicons without squishing them.
    it's probably time to open a fifth window so i can find the tabs i'm using again...

    I'm at about 50 browser windows, each with multiple tabs (sometimes with a lot of tabs, but usually no more than 6 or 7). I perhaps ought to close a few sometime.


  • 🚽 Regular


  • Banned

    @levicki said in WTF Bites:

    @Mason_Wheeler said in WTF Bites:

    Past experience shows that doing the same thing with and without reflection generally results in a speed difference of 1-2 orders of magnitude. Is there any good reason why this specific case should be any different?

    So you are saying that this would be 10-100 times slower than just accessing the properties directly? I find it hard to believe that hence the request for proof.

    Reflections basically preclude any optimizations, on top of adding additional indirection in the most roundabout way possible. I wouldn't be surprised if it was 1000x or more, to be honest. I know for a fact that the default tuple equality operator is over 100x slower than comparing each element separately, and it's exactly because of reflections.

    Finally, if something external to your code changes and your code relies on that not changing you will have a problem, reflection or not.

    The difference is, will you find out you have a problem at compile time or at runtime?


  • Discourse touched me in a no-no place

    @Gąska said in WTF Bites:

    I wouldn't be surprised if it was 1000x or more, to be honest.

    I would. With experience, I'd expect the overhead to be in the range of 20–50× when calling code where inlining isn't possible, of which quite a lot is going to be the cost of boxing and unboxing the arguments and results (because that's really expensive); when arguments and results are all objects anyway then the cost won't be too bad, and might even be less than 10×.

    (Be very careful if testing this BTW. The interaction of JIT with microbenchmarking is particularly terrible.)


  • Banned

    @dkf I used to think so too, but then I've got first-hand experience with how much faster C# programs get when you stop using reflections. It's not just the missed optimization opportunities that are the problem - it's that the entire architecture of reflections system wasn't designed with performance in mind (because why would it?)


  • Discourse touched me in a no-no place

    @Gąska Ah, I might be more used to systems that are designed to be good at reflective uses. (Some of the critical things there are at what level any caching is done.)


  • Notification Spam Recipient

    In my particular case, even if it is technically more performant to not reflect, the expected call rate is so low that the impact effectively can't be measured (think once every maybe fifteen seconds, if the user is feeling spammy).

    But still. Would rather have the obviousness and readability from my code (with adjustments noted above) than the gobbledygook reflection introduces for no real benefit.



  • @dkf said in WTF Bites:

    external non-maskable interrupts, aka children.

    I'm not sure the analogy is sound. Nobody cares if you tie a NMI pin to ground, but if you do the same thing to a child...


  • Banned

    @levicki said in WTF Bites:

    My conclusion is that, like every other absolutist piece of programming advice, advice to not use reflection at all is ridiculous.

    Likewise, the advice to not worry about performance of reflections is just as ridiculous. And even more ridiculous are any claims about readability, as it's entirely subjective.

    And you could at least post the source code of your benchmark, so we know what you're measuring there.



  • @Gąska said in WTF Bites:

    And you could at least post the source code of your benchmark, so we know what you're measuring there.

    If a result is not reproduceable it isn't science.

    Post your code so we can review, audit, and reproduce your results!


  • Banned

    @Vixen I don't even care about reproducing. It's more about whether the result string concatenation is included in that time or not (it shouldn't be).



  • @Gąska said in WTF Bites:

    @Vixen I don't even care about reproducing. It's more about whether the result string concatenation is included in that time or not (it shouldn't be).

    But..... SCIENCE!

    c7b91967-d1f3-42c6-82b3-c28f64c5ed1d-image.png


  • Banned

    @Vixen he posted some numbers. Isn't that good enough!?



  • @Gąska said in WTF Bites:

    @Vixen he posted some numbers. Isn't that good enough!?

    No! We don't know how the numbers were obtained so we can't reproduce the results! we cannot investigate the method to determine if it included bias (intended or unintended) and we cannot review the raw results and the statistical methods used to create the reported numbers and determine if the statistics applied were applied improperly.

    it's CRITICAL! that we do this before we put any faith in the numbers so reported. Otherwise we would be doing the equivalent of "A bloke inthe pub told me that the sky was red, and he's my friend so he wouldn't lie."


  • ♿ (Parody)

    @Gąska said in WTF Bites:

    @levicki said in WTF Bites:

    My conclusion is that, like every other absolutist piece of programming advice, advice to not use reflection at all is ridiculous.

    Likewise, the advice to not worry about performance of reflections is just as ridiculous.

    Meh. I could reflect my ass off and not notice the difference. In fact, because I use JSF and Java Beans and shit, I do! My performance is seriously dominated by DB access. Nothing else even comes close.


  • Banned

    @boomzilla I'm always amazed by your ability to completely miss the point. Yes, there are use cases where it doesn't matter if something takes 15 nanoseconds or 15 hours. But there are use cases where it does. That's what I was saying.



  • @boomzilla said in WTF Bites:

    @Gąska said in WTF Bites:

    @levicki said in WTF Bites:

    My conclusion is that, like every other absolutist piece of programming advice, advice to not use reflection at all is ridiculous.

    Likewise, the advice to not worry about performance of reflections is just as ridiculous.

    Meh. I could reflect my ass off and not notice the difference. In fact, because I use JSF and Java Beans and shit, I do! My performance is seriously dominated by DB access. Nothing else even comes close.

    This is key. The effect of reflection (or just about anything else) depends on what the system is being used for and where the bottlenecks are. If it's dominated by "waiting for DB access" or "waiting for user input" (like 99% of non-game GUI programs are), then the added milliseconds for reflection just don't matter and maintainability/testability/ease of writing are paramount. In an inner loop in a real-time calculation? Sure.



  • @levicki said in WTF Bites:

    @Mason_Wheeler said in WTF Bites:

    Past experience shows that doing the same thing with and without reflection generally results in a speed difference of 1-2 orders of magnitude. Is there any good reason why this specific case should be any different?

    So you are saying that this would be 10-100 times slower than just accessing the properties directly? I find it hard to believe that hence the request for proof.

    It's not that difficult to prove: just benchmark it.

    What is difficult is understanding why you find this hard to believe. Direct property access compiles down to a single method call, or even a direct field access if the JIT can inline a trivial property; on any modern CPU these will require 1-2 instructions. Do you really find it difficult to imagine how going to metadata tables, (which may not even be loaded into memory yet,) performing lookups on them, and then invoking a method call via dynamic invocation (which can't be optimized down to a field access because IL metadata doesn't contain the relevant information to make this decision) could be 10-100x more work than that? (Heck, the dynamic invocation mechanism alone could account for that; it's notoriously slow!)

    Finally, if something external to your code changes and your code relies on that not changing you will have a problem, reflection or not.

    IOW, your argument seems like a strawman to me.

    No. You're correct that a problem will exist regardless; the difference is that if the code is compiled, you'll immediately find out that the problem exists when you build it, but if the code is dynamic, you won't. Depending on how thorough your testing process is, you might not even find out until you ship it and some customer submits a ticket.


  • ♿ (Parody)

    @Gąska said in WTF Bites:

    @boomzilla I'm always amazed by your ability to completely miss the point. Yes, there are use cases where it doesn't matter if something takes 15 nanoseconds or 15 hours. But there are use cases where it does. That's what I was saying.

    No you weren't, but I'd believe it's what you meant to say.


  • Banned

    @levicki said in WTF Bites:

    And even more ridiculous are any claims about readability, as it's entirely subjective.

    I think of it this way, if it is harder to maintain then it is less readable as well so that makes it not subjective.

    Agreed. The question is, which one is harder to maintain?

    @Gąska said in WTF Bites:

    And you could at least post the source code of your benchmark, so we know what you're measuring there.

    I don't think that is how arguing between normal adults works -- you made a ridiculous claim about reflection being slower by a factor of "1000x or more" so it should be you proving that number you pulled out of your ass, not me disproving it.

    When will you learn to read? "I wouldn't be surprised if it was 1000x" doesn't mean "there's no way in hell you'll ever go below 1000x". I never claimed it'll definitely be over 1000x. Just that it can be as high as 1000x at times, even though normally it's just about 50x.

    And your benchmark didn't clear up anything. All we know is that some unspecified code compiled with unspecified config run 6 times faster than some other unspecified code. Wowzers. Impossibru.

    @Gąska said in WTF Bites:

    It's more about whether the result string concatenation is included in that time or not (it shouldn't be).

    Why do you think it shouldn't be?

    Because we're talking about performance of reflections, not performance of string concatenation.

    The code in question would be useless without adding those strings to the array/list/dictionary

    And without the entire rest of the game server - so why won't we implement the entire rest of the game server and measure it as well? The difference would be even smaller!

    @Gąska said in WTF Bites:

    @boomzilla I'm always amazed by your ability to completely miss the point. Yes, there are use cases where it doesn't matter if something takes 15 nanoseconds or 15 hours. But there are use cases where it does. That's what I was saying.

    And I was saying that @Tsaukpaetra's use case is probably not one of those where it would matter.

    Hey, don't break his dreams. They still hope to break that 1000 players online barrier one day.

    And no, you didn't say it wouldn't matter. Or maybe you did in passing, but more importantly, you also said - and here's an exact quote - "So you are saying that this would be 10-100 times slower than just accessing the properties directly? I find it hard to believe that hence the request for proof." Note that nowhere in that paragraph it says you're talking about anything else than just accessing the properties alone. Understandably, I took it as you not believing that property access alone can be 10x slower through reflection.


    Anyway. Thank you for coming forward and making it clear your benchmark is bullshit and @Mason_Wheeler was right with his 10-100x estimate.


  • Discourse touched me in a no-no place

    @anonymous234 said in WTF Bites:

    @Vixen
    VERTICAL
    TABS

    BOOK
    MARKS


  • Java Dev

    @anonymous234 said in WTF Bites:

    @Vixen
    VERTICAL
    TABS

    I didn't think there were any modern terminals that attached meaning to \v (\013, )


  • Notification Spam Recipient

    @Gąska said in WTF Bites:

    @Vixen he posted some numbers. Isn't that good enough!?

    Ask that to the butthurt gaming PC enthusiasts.


  • Notification Spam Recipient

    @levicki said in WTF Bites:

    I don't think that is how arguing between normal adults works

    YMBNH.


  • Notification Spam Recipient

    @Gąska said in WTF Bites:

    Hey, don't break his dreams. They still hope to break that 1000 players online barrier one day.

    1k? I want to see 50 first.


  • Fake News

    @cvi said in WTF Bites:

    @Vixen I miss the vimperator plugin. It would print the number of open tabs in the status line. (Well, besides making firefox's UI somewhat tolerable. None of the webbly extension clones really work as nicely.)

    Oh, so that's what those numbers mean...

    Pentadactyl-corner.png

    Luckily this is still around:


  • Banned

    @Tsaukpaetra said in WTF Bites:

    @Gąska said in WTF Bites:

    Hey, don't break his dreams. They still hope to break that 1000 players online barrier one day.

    1k? I want to see 50 first.

    I didn't know the historical numbers, and didn't want to make it sound overly mocking - wasn't sure how many zeroes to include (if any).


  • Notification Spam Recipient

    @Gąska said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    @Gąska said in WTF Bites:

    Hey, don't break his dreams. They still hope to break that 1000 players online barrier one day.

    1k? I want to see 50 first.

    I didn't know the historical numbers, and didn't want to make it sound overly mocking - wasn't sure how many zeroes to include (if any).

    Here's some numbers: player registrations (the people who managed to launch the game long enough to click "next" on the "choose ur name" screen) are just over 9100. The average play time is about five minutes spread that over two-ish years....



  • @JBert said in WTF Bites:

    Luckily this is still around:

    Hmm. Tempted to try that out. How's Pale Moon these days?


  • BINNED

    @dkf said in WTF Bites:

    @Vixen said in WTF Bites:

    you think your tab backlog is high....
    i have four windows that are maximized open. all four windows have so many tabs open there's not enough room to show the favicons without squishing them.
    it's probably time to open a fifth window so i can find the tabs i'm using again...

    I'm at about 50 browser windows, each with multiple tabs (sometimes with a lot of tabs, but usually no more than 6 or 7). I perhaps ought to close a few sometime.

    So you have about the same total as me, but with the window / tab counts reversed?
    Somehow, that seems even worse.


  • BINNED

    @Gąska said in WTF Bites:

    @Vixen I don't even care about reproducing. It's more about whether the result string concatenation is included in that time or not (it shouldn't be).

    To measure how slow reflection is? No it shouldn’t.
    To measure how much slower the implementation in question using reflection is compared to a hand-rolled one? Yes it should.


  • Notification Spam Recipient

    Status: I REALLY wish I could find out where the logger is being told to shove the logs into the program's directory... But I'm too :kneeling_warthog:



  • @Tsaukpaetra said in WTF Bites:

    where the logger is being told to shove the logs into the program's directory

    When was that program designed, 2005? :wtf:


  • Notification Spam Recipient

    @TimeBandit said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    where the logger is being told to shove the logs into the program's directory

    When was that program designed, 2005? :wtf:

    Four years ago, by not-me. I have a feeling it's just doing a file.open('blah.log') and the current working directory happens to be the program's base directory (which makes it so much more fun when it crashes and restarts, because then the working directory becomes %SystemRoot%\System32 (because why wouldn't it?) and the log fails to open and it then has no logging at all...



  • @Tsaukpaetra said in WTF Bites:

    which makes it so much more fun when it crashes and restarts, because then the working directory becomes %SystemRoot%\System32 (because why wouldn't it?)

    If only you built that on a properly engineered platform, not that open sour crap.

    Oh, wait... 🍹


  • Discourse touched me in a no-no place

    @Mason_Wheeler said in WTF Bites:

    it's notoriously slow!

    Be careful with such assertions, at least without qualification by the performance measurements, as the people originating them are often keen on comparing with the very fastest option while pushing some biased agenda not grounded in fact. The serious JIT developers won't be saying such things; they're aware of the deep subtleties in this area.


  • Banned

    @topspin said in WTF Bites:

    @Gąska said in WTF Bites:

    @Vixen I don't even care about reproducing. It's more about whether the result string concatenation is included in that time or not (it shouldn't be).

    To measure how slow reflection is? No it shouldn’t.
    To measure how much slower the implementation in question using reflection is compared to a hand-rolled one? Yes it should.

    And the question was the former.




  • Notification Spam Recipient

    @Rhywden Ah, catching up in the News, eh?



  • @Tsaukpaetra said in WTF Bites:

    @Gąska said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    @Gąska said in WTF Bites:

    Hey, don't break his dreams. They still hope to break that 1000 players online barrier one day.

    1k? I want to see 50 first.

    I didn't know the historical numbers, and didn't want to make it sound overly mocking - wasn't sure how many zeroes to include (if any).

    Here's some numbers: player registrations (the people who managed to launch the game long enough to click "next" on the "choose ur name" screen) are just over 9100. The average play time is about five minutes spread that over two-ish years....

    Is there any way for people to play without having to have a 3D headset?


Log in to reply