WTF Bites



  • @topspin said in WTF Bites:

    @scarlet_manuka Isn't the same thing true for the US, though?
    Thanksgiving has meaning, but black friday seems to be nothing more than the day after Thanksgiving where "we'll probably make a bunch of money selling stuff."

    If Thanksgiving is defined, then "the day after Thanksgiving" is defined. So it has meaning in the USA, but not really elsewhere. Attaching it to a big sale actually does seem to have some merit in the USA from what @boomzilla said, but that kind of tradition can hardly have grown up anywhere else in association with that specific day. (Here it's Boxing Day that attracts the big sales.)


  • ♿ (Parody)

    @ben_lubar said in WTF Bites:

    @bb36e said in WTF Bites:

    @ben_lubar one more example where linux fanboys are PROVEN wrong about linux being more secure

    ???????????????????????????

    Let's say you enter your current password into a password change form on a website.

    Would it be reasonable to think that the web server would have access to your current password when processing your password change request?

    Is the web server running Linux?


  • kills Dumbledore

    @mott555 said in WTF Bites:

    Windows 1803

    Wow, they're really inflating those version numbers. Are they catching up with chrome yet?


  • Considered Harmful


  • Considered Harmful

    https://i.imgur.com/V4lCj8W.png
    :thonking:
    edit: you'd think going to another page would fix it, right?
    nah, just decreases it.
    https://i.imgur.com/OCFN2ia.png
    edit edit: almost there...
    https://i.imgur.com/8VVcQZ7.png
    edit edit edit: yay!
    https://i.imgur.com/NwNjOv9.png
    anyway, paging @julianlam.



  • @tsaukpaetra said in WTF Bites:

    After a week, this is my notifs

    Conclusion: I'm the only one that upvote you 🍹



  • For the Alien thing, my guess is that they simply don't have a notion of "unknown field" when loading a file defining the aliens. It's likely they don't have a notion of "whitelist of allowed fields" either, but merely a notion of "into the hashtable it goes".

    And later, when they call GetFieldFromParsedObject("tether") returns null, there's no error either because the field was optional...


  • Trolleybus Mechanic

    I know this is older code but still... whyyyyyyyyyyyyyyyyyyyyyyy

    <h3><%=cname.Text%></h3><asp:Label Visible="false" runat="server" ID="cname"></asp:Label>



  • @pie_flavor said in WTF Bites:

    @ben_lubar said in WTF Bites:

    @gąska said in WTF Bites:

    The only way to have non-rigged elections is to de-anonymize votes.

    You can go look up a list of the 2016 electors if you want. It won't make them elect the same person that the general public did.

    A net total of three electors defected. The rest voted faithfully with their region.

    The sum of winners of regions is not the same as the sum of the general public.


  • 🚽 Regular

    Couldn't remember what the Dell Outlet was called and Googled "Dell Marketplace" instead. This resulted in a bizarre scam shopping site:

    0_1531840636867_3f5dbfe5-0142-4687-84fa-b975254886f7-image.png



  • @ben_lubar said in WTF Bites:

    The sum of winners of regions is not the same as the sum of the general public.

    Some States to all-in, some States do proportional. It's up to each State to determine how it wants to "spend" its electors.



  • @mott555 said in WTF Bites:

    @mott555 Update failed. Reason: The tablet went to sleep while updating, even though it's plugged into the charger and I disabled the power-saving stuff. 😠

    Try it again, but this time sit next to it and touch the screen every two minutes to keep it from sleeping...?
    Yes, it'll take a long time, but surely it would be less than the time spent with fiddling with everything else to try to get it working on its own.



  • On the Microsoft page for Edge mobile

    https://www.microsoft.com/en-us/windows/microsoft-edge-mobile

    0_1531842036062_d5a569d0-b77f-46af-a6c2-b48bd99d8bde-image.png

    Why do you need my phone number?

    Wait a sec, what about the "more ways to get the app"?

    0_1531842090334_03d49241-6d18-412c-a52c-da030bcfd935-image.png

    You sneaky bastard



  • @djls45 said in WTF Bites:

    @mott555 said in WTF Bites:

    @mott555 Update failed. Reason: The tablet went to sleep while updating, even though it's plugged into the charger and I disabled the power-saving stuff. 😠

    Try it again, but this time sit next to it and touch the screen every two minutes to keep it from sleeping...?
    Yes, it'll take a long time, but surely it would be less than the time spent with fiddling with everything else to try to get it working on its own.

    And, finally, success! Now I can use my tablet again! (At least until the Fall Update That's Actually A Full OS Reinstall).



  • @Cursorkeys said in WTF Bites:

    0_1531771014963_e0178f8a-a9f3-40ca-bce8-f9374cf9cb76-image.png

    Does that contain a list of in-game recipes or a list of real-world recipes that mimic in-game dishes?
    I could see it being either (or maybe both).



  • How come when you delete a branch in VSTS it doesn't actually delete it from Git... and there seems to be NO WAY to actually delete it from Git without using the CLI? Ugh.



  • @mott555 said in WTF Bites:

    @djls45 said in WTF Bites:

    @mott555 said in WTF Bites:

    @mott555 Update failed. Reason: The tablet went to sleep while updating, even though it's plugged into the charger and I disabled the power-saving stuff. 😠

    Try it again, but this time sit next to it and touch the screen every two minutes to keep it from sleeping...?
    Yes, it'll take a long time, but surely it would be less than the time spent with fiddling with everything else to try to get it working on its own.

    And, finally, success! Now I can use my tablet again! (At least until the Fall Update That's Actually A Full OS Reinstall).

    All that effort to get just a couple more gigabytes of free space so Windows Updates could run. Now that it's done, I have 14 GB free (half the disk). Could the newer Windows 10 actually be that much smaller than the old one? Or is something massively broken and I haven't noticed yet?


  • Notification Spam Recipient

    @jaloopa said in WTF Bites:

    @mott555 said in WTF Bites:

    Windows 1803

    Wow, they're really inflating those version numbers. Are they catching up with chrome yet?

    IIRC they've switched to yymm of release for those particular numbers. There's actual build version numbers that are much higher.


  • Notification Spam Recipient

    @mott555 said in WTF Bites:

    Or is something massively broken and I haven't noticed yet?

    They did even more hard-linking shenanigans to reduce duplication at the cost of a more complicated "reset" procedure that may or may not involve re-downloading the install image if you have to reinstall Windows for any reason, if memory serves.



  • @scarlet_manuka said in WTF Bites:

    Here it's Boxing Day that attracts the big sales.

    Here, too. "Boxing Day" isn't defined, so they're "After-Christmas Sale!!!1!1!!1!"s. It's when all the stuff you already bought at full price for Christmas gifts gets discounted. It works out great for the handful of Orthodox, who still celebrate holidays according to the Julian calendar, though.


  • ♿ (Parody)

    @hardwaregeek It's also when you buy Christmas decorations for next year.



  • @tsaukpaetra said in WTF Bites:

    @dkf said in WTF Bites:

    @tsaukpaetra said in WTF Bites:

    So, they're probably definitely :doing_it_wrong: , but still, it is quite easy to foot-shoot even if you don't know what you're doing.

    FTFY. Seriously, whining about something unparseable is a supremely good idea, especially if it is in a file that is potentially alterable by users. If that makes your developers whine about the program always complaining about their commits, there's a tool to fix that too.

    The problem is, the compiler doesn't know it's unparseable, that's the point.

    At no point in compilation does the compiler go "How many times is the Load a value from an INI file function called, what are the parameters, what file is it, and does it have such a value in it?"

    Best you can do is use that boolean and do something about it at runtime, but obviously it's trivial to ignore the return from a function, so :mlp_shrug:

    Sounds like the boolean return value is missing the FILE_NOT_FOUND option.


  • Discourse touched me in a no-no place

    @tsaukpaetra said in WTF Bites:

    Best you can do is use that boolean and do something about it at runtime, but obviously it's trivial to ignore the return from a function, so :mlp_shrug:

    No, you can throw an exception (with a nice description of what went wrong) and arrange that if someone turns off exceptions as a compile time option, then make the program just crash hard. Even a pretty dopey QA department might just notice that happening during startup! What you do not do is the equivalent of ON ERROR GOTO NEXT because if you do that, you belong on the main site as one of the people the contributors write about.

    Writing a description of the problem to the log or the console and then carrying on is much better than just swallowing the error, and turning that off in prod is still insane. Error swallowing is always an antipattern, as it almost always hides other trouble.


  • kills Dumbledore

    @hardwaregeek said in WTF Bites:

    It works out great for the handful of Orthodox, who still celebrate holidays according to the Julian calendar, though

    And for parents whose kids' birthdays are in February and March



  • @djls45 said in WTF Bites:

    @Cursorkeys said in WTF Bites:

    0_1531771014963_e0178f8a-a9f3-40ca-bce8-f9374cf9cb76-image.png

    Does that contain a list of in-game recipes or a list of real-world recipes that mimic in-game dishes?
    I could see it being either (or maybe both).

    From what I can tell it is a list of real-world recipes that are based on in-game dishes. Most of World of Warcraft's in game recipes are very simplistic - for example in game Dragonbreath Chili, which has a recipe in the cookbook, is made with mystery meat, a flame sack and hot spices.


  • Notification Spam Recipient

    @dkf said in WTF Bites:

    No, you can throw an exception (with a nice description of what went wrong) and arrange that if someone turns off exceptions as a compile time option, then make the program just crash hard.

    This would be fine, but...

    @tsaukpaetra said in WTF Bites:

    leaving the default value

    A ton of configurable things in the Engine are optional, and throwing exceptions for each and every possible "missing but not necessarily needed" value would be overkill.

    For example, this is an sample entry in the Game.ini file:

    [/Script/UnrealEd.ProjectPackagingSettings]
    UsePakFile=True
    bGenerateChunks=True
    bGenerateNoChunks=False
    bChunkHardReferencesOnly=True
    bBuildHttpChunkInstallData=False
    

    If UsePakFile was missing or False, that's totally fine, it simply won't do it, and there's no need to raise an exception.

    In this case, missing/badly named entries is not a 'ya done wrong', because there's a sensible default that works correctly in most cases (actually, I'm going to see what happens when you set bGenerateChunks and bGenerateNoChunks both True for giggles), and raising an exception from it would only serve to make things more confusing for the end user.

    For example, Windows has a configurable for what KMS activation server it's used. Normally it's blank, because this value is typically auto-discovered or set by the Domain Controller (depending on network setup) and if so, it just uses Microsoft's activation servers on the Internet. Sensible default.
    Imagine if Microsoft did as you mentioned and crashed the "Let's Get Activated! :) " program when it tried to load up that setting and found it not set/missing/renamed/whatever?

    Bad user experience for no reason other than to make sure that any time a setting was read that it actually exists.

    You're only passing the buck by making it an exception, because then every possible setting access would require extra boilerplate just to prevent the app from crashing, especially in the face of optional configurables.


  • 🚽 Regular

    @tsaukpaetra said in WTF Bites:

    actually, I'm going to see what happens when you set bGenerateChunks and bGenerateNoChunks both True for giggles

    That was going to be my question. xD


  • Notification Spam Recipient

    @tsaukpaetra said in WTF Bites:

    I'll see if I can remember to cite some of our source code as an example if I have time tomorrow.

    Oh, yes, here's a snippet:

    
    FHypatiaConfig::FHypatiaConfig()
    {
    	// DEFAULTS
    	bUseLoginHost = false;
    	bIsServerOnLan = true;
    	bDebugUseCredentials = false;
    	bListServers = true;
    	bForceAutoJoin = false;
    	TimefireHostUrl = TEXT("http://127.0.0.1:51862");
    	MasterServerUrl = TEXT("127.0.0.1:9999");
    	ChatServerUrl = TEXT("127.0.0.1:8890");	
    	LoginHostUrl = TEXT("127.0.0.1:8080");
    	DebugLoginName = TEXT("");
    	DebugLoginPassword = TEXT("");
    	// CONFIGS
    	TCHAR* NetGlobals = TEXT("HypatiaNetworkGlobal");
    	if (GConfig->DoesSectionExist(NetGlobals, GGameIni))
    	{
    		GConfig->GetBool(NetGlobals, TEXT("bIsServerOnLan"), bIsServerOnLan, GGameIni);
    		GConfig->GetString(NetGlobals, TEXT("TimefireHostUrl"), TimefireHostUrl, GGameIni);
    		GConfig->GetString(NetGlobals, TEXT("MasterServerUrl"), MasterServerUrl, GGameIni);
    		GConfig->GetString(NetGlobals, TEXT("ChatServerUrl"), ChatServerUrl, GGameIni);
    		GConfig->GetString(NetGlobals, TEXT("OdbcConnectionString"), OdbcConnectionString, GGameIni);
    	}
    	else
    	{
    		UE_LOG(LogTemp, Error, TEXT("Could not find Game.ini section [%s]"), NetGlobals);
    	}
    	TCHAR* LoginGlobals = TEXT("HypatiaLoginGlobal");
    	if (GConfig->DoesSectionExist(LoginGlobals, GGameIni))
    	{
    		GConfig->GetBool(LoginGlobals, TEXT("bUseLoginHost"), bUseLoginHost, GGameIni);
    		GConfig->GetString(LoginGlobals, TEXT("LoginHostUrl"), LoginHostUrl, GGameIni);
    		GConfig->GetBool(LoginGlobals, TEXT("bListServers"), bListServers, GGameIni);
    		GConfig->GetBool(LoginGlobals, TEXT("bForceAutoJoin"), bForceAutoJoin, GGameIni);
    		GConfig->GetBool(LoginGlobals, TEXT("bDebugUseCredentials"), bDebugUseCredentials, GGameIni);
    		GConfig->GetString(LoginGlobals, TEXT("DebugLoginName"), DebugLoginName, GGameIni);
    		GConfig->GetString(LoginGlobals, TEXT("DebugLoginPassword"), DebugLoginPassword, GGameIni);
    	}
    	else
    	{
    		UE_LOG(LogTemp, Error, TEXT("Could not find Game.ini section [%s]"), LoginGlobals);
    	}
    #if !UE_BUILD_SHIPPING
    	UE_LOG(LogTemp, Log, TEXT("Reading Hypatia config file list: %s"), *GetConfigFileList());
    	UE_LOG(LogTemp, Log, TEXT("Reading Hypatia config file results:\n%s"), *GetDebugString());
    #endif // !UE_BUILD_SHIPPING
    }
    

    Sensible defaults (for us. It's immediately obvious when connecting to localhost fails when you're not running a server due to the logging that happens in that case), and if you're not in the shipping build, there's even a "nice" printout function to show what values were actually loaded if you're not in shipping mode (the only difference between Test and Shipping mode is that flag), and regardless, if the section is outright missing it's a definite error (it's more likely for that to happen than a mis-name of a single entry due to automation that's been dogfood-ed).


  • BINNED

    @mott555 said in WTF Bites:

    Now that it's done, I have 14 GB free (half the disk). Could the newer Windows 10 actually be that much smaller than the old one? Or is something massively broken and I haven't noticed yet?

    Before the update you basically had the entire OS twice, maybe? (Once for the OS files and once the downloaded updates)



  • @Tsaukpaetra said in WTF Bites:

    A ton of configurable things in the Engine are optional, and throwing exceptions for each and every possible "missing but not necessarily needed" value would be overkill.

    [...]

    Bad user experience for no reason other than to make sure that any time a setting was read that it actually exists.

    So what could happen instead is that if the program doesn't find the value, it writes in the default. With a tiny bit of tweaking, it can have the further benefit of generating the default config if the config file is totally removed.

    And then it can throw an exception with an error message that required values are missing (the keys having not been found and automatically added to the config file with an empty value or having been found with an invalid/empty value).


  • Notification Spam Recipient

    @djls45 said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    A ton of configurable things in the Engine are optional, and throwing exceptions for each and every possible "missing but not necessarily needed" value would be overkill.

    [...]

    Bad user experience for no reason other than to make sure that any time a setting was read that it actually exists.

    So what could happen instead is that if the program doesn't find the value, it writes in the default. With a tiny bit of tweaking, it can have the further benefit of generating the default config if the config file is totally removed.

    And then it can throw an exception with an error message that required values are missing (the keys having not been found and automatically added to the config file with an empty value or having been found with an invalid/empty value).

    This actually (partially) happens, if the config value in memory changes it will (eventually, probably) be flushed back out and written back.
    Keep in mind that, by default in a packaged shipping-mode game, the ini files are all embedded in the data, and only modifications are written out to separated files.

    The problem is, sometimes these config values aren't meant for user modification, and may control aspects of the game (for example) which (especially for things like achievements) could skew stuff.

    Imagine, if you will, a setting that controls whether AIs are disabled, by default it's False (so, they're enabled), and for testing purposes it can be set to True for allowing focus on other things.
    Now, if we were to automagically write out every default value, this core setting would be exposed, and the user could then take that ini file, turn off all the AIs (by setting it to true), set the game's difficulty to Blood Fest Ravage and effortlessly walk through the game to get the achievement for beating the impossible mode.

    Now, obviously hackers can unpack the game files and extract the built-in ini files to find out what the mod values are, but why make it trivial for the average snot-drooler?

    A workaround could be envisioned to "turn off" these values in shipping, so that said defaults wouldn't be written out for them, but that just makes it all the more complicated and doesn't address the core problem at all...




  • Notification Spam Recipient

    @ben_lubar said in WTF Bites:

    A bad read sufficiently correct in the important data section?



  • @Tsaukpaetra said in WTF Bites:

    Now, if we were to automagically write out every default value, this core setting would be exposed, and the user could then take that ini file, turn off all the AIs (by setting it to true), set the game's difficulty to Blood Fest Ravage and effortlessly walk through the game to get the achievement for beating the impossible mode.

    The AI could be tied to the difficulty setting instead of having separate values for each.
    The achievements could be disabled if certain values are not the default.
    I'm sure there's other options.

    Or it could just be treated as not really a problem. Sid Meier's Alpha Centauri (and maybe other Sid Meier's games – I don't know) has its configuration files for each faction available in the game directory in clear text. Anyone can just open up one of the files and give their faction of choice game-breaking bonuses to everything. The Command & Conquer series are also each fairly easily modded.


  • Notification Spam Recipient

    @djls45 said in WTF Bites:

    Or it could just be treated as not really a problem.

    That's what I've been saying. If it were treated as a problem, there would be all the exception raising and default-writing and cruft.

    Since it's not, it isn't, and if it is there are already-defined practices and resolutions you can use.



  • @tsaukpaetra When it comes to Achievements, Stellaris checks whether its game files have been modified (probably via a hash comparison) before enabling them.



  • @tsaukpaetra said in WTF Bites:

    Now, obviously hackers can unpack the game files and extract the built-in ini files to find out what the mod values are, but why make it trivial for the average snot-drooler?

    But the "average snot-drooler" capable of opening and changing an ini file will also be able to use Google, where somebody will have found the setting to disable the AI and will have posted it.

    Of all the possible ways of solving the problem, this really isn't.


  • Notification Spam Recipient

    @cvi said in WTF Bites:

    solving the problem

    I think we've deviated from "the problem" so much that I don't know what it is anymore.

    Care to reiterate it and enumerate "all the ways"?



  • @ben_lubar said in WTF Bites:

    That'll teach him to swear at them.


  • Discourse touched me in a no-no place

    @tsaukpaetra said in WTF Bites:

    That's what I've been saying.

    What you've been saying is that game development is all a pile of shit with such enormous incompetence the norm that even sane developers get infected.



  • @tsaukpaetra said in WTF Bites:

    I think we've deviated from "the problem" so much that I don't know what it is anymore.
    Care to reiterate it and enumerate "all the ways"?

    In this case, "the problem" referred to what you described in the quoted post, that is, exposing internal variables. Your example was that players would be able to find a variable that could be used to disable the AI, making it easy to "beat" the game and collect otherwise-difficult achievements.

    You suggested that obscuring the flag (by partially hiding it) would help with that problem, something that I disagree about. (This would perhaps have worked like 20 years ago, when the internet wasn't quite as popular as it is now.)

    Other ways to solve this particular problem include the suggestion by Medinoc, where achievements are disabled if certain settings have non-default (or more generally, non-approved) values.

    More generally (and w.r.t. to the original sub-topic), I still believe that invalid values should generate loud errors. If an end-user changes a configuration file in a bad way, erroring out is IMO a valid result -- I'm pretty sure that I can find variables in almost all games that will cause non-recoverable errors when changed badly, so ignoring invalid settings on just certain variables seems pointless.


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    Other ways to solve this particular problem include the suggestion by Medinoc, where achievements are disabled if certain settings have non-default (or more generally, non-approved) values.

    And that can be done by doing a cryptographic checksum of the files (even MD5 would probably be good enough for this) and comparing that against the server side list of approved values prior to actually awarding any achievement. Simple, and uses standard bits of code. You could even do the checksumming on the server side, but it's just achievements so :kneeling_warthog:


  • Fake News

    @blakeyrat said in WTF Bites:

    How come when you delete a branch in VSTS it doesn't actually delete it from Git... and there seems to be NO WAY to actually delete it from Git without using the CLI? Ugh.

    You mean you still see them in your local repo? Because that's another git "feature" where it will keep them until you run git remote prune.

    As for why e.g. Visual Studio doesn't support it: they might not have known about it or didn't prioritize it? There are two feature requests open for pruning: each time you fetch when configured, only when you explicitly ask for a fetch and prune. The first one should have made it into the stable VS 2017 builds if you have updated it recently.



  • @scarlet_manuka said in WTF Bites:

    @ben_lubar said in WTF Bites:

    That'll teach him to swear at them.



  • The new MacBook pro is faster!

    Or maybe not



  • @tsaukpaetra said in WTF Bites:

    (actually, I'm going to see what happens when you set bGenerateChunks and bGenerateNoChunks both True for giggles)

    0_1531917131163_9bfa7605-a425-4244-8efd-5d6ed0329f79-image.png

    RIP in peace,



  • @medinoc Clausewitz Engine games checksum all "important" (not localization, not graphics, but anything that affects events or properties) files at startup into a four-character hash. You can only play against people with the same hash, and there's a whitelist of hashes representing an unmodified (modulo DLC) game for enabling achievements.



  • @timebandit :
    https://www.mac4ever.com/images-articles/57726_mal-ventile-le-macbook-pro-15-2018-core-i9-serait-incapable-de-tenir-ses-frequences.jpg

    The Gigabyte Aero 15X, which is two to three times cheaper than the Macbook Pro, is five-and-a-half times faster with Premiere Pro.

    That being said, it could be worse for Apple. I mean, it's not like they were advertising their "Pro" line as the perfect machines for editing video or anything like that :trollface:



  • @zerosquare I'm sure the Aero has better ventilation :rimshot:



  • @timebandit Meh. Unsurprising. I've yet to meet a (portable) laptop that doesn't have thermal throttling issues.

    A colleague measured performance on a MacBook a few years ago. I half-jokingly suggested that he should hold it out of the window (it was winter, and below zero outside). Didn't expect him to do it, but a day later he returned with the results. There was a quite significant speedup. Don't remember the exact numbers, but it was easily in the region of 15-20%.

    I've also seen similar results on my Surface Pro. Holding it out of the window when it's cold outside will make CPU-bounds stuff go noticeably faster.

    Laptops are crap for anything that has a sustained non-trivial CPU (or GPU) load.


Log in to reply