The Official Status Thread



  • Representative line of code I was reviewing...

    for (int i = 0; i < (int)array.size(); i ++) { if (somecomplexcondition) doSomething(); array[i] += DoSomethingElse(); }
    

    Yes. All one line. Stop it. Just stop it. And met with resistance when I point out that's not our coding style.



  • @hungrier said in The Official Status Thread:

    @cursorkeys said in The Official Status Thread:

    Status: Changed the data directory in a program's settings and watched as it then migrated all of the data (about a gig of flat files and an sqlite database) from one drive to another while the program remained online and 100% functional.
    It then neatly deleted the old directory after itself. No progress bars, no lag, no messages. It just worked quietly in the background and did it. Flawlessly.

    And then you woke up

    It's a bit sad that working as you'd like seems magical. I think I'll send them an email from my corporate account tomorrow and say how nice it was that it worked so well. I was really expecting that it would fail in some weird way half way through. Somebody obviously put a lot of effort into that feature.


  • Grade A Premium Asshole

    Status: Finally getting around to watching "Rogue One". I am ~25 minutes in and I see a Death Star about to be completed. I hope to hell they don't fire a small missile down the exhaust pipe in to the core again to destroy it.

    I am going to be disappointed, aren't I?



  • @polygeekery nah, it,'s a lot darker than that


  • Discourse touched me in a no-no place

    For fuck's sake.

    So last week I ordered some stuff on Amazon.

    It vanished in transit. After the requisite waiting period, I had Amazon refund me (not all the items were in stock so it was easiest to refund and reorder equivalents).

    So I ordered replacements.
    Guess what showed up today?
    A GIANT PILE OF PACKAGES!
    Both the replacements, for which I have already been refunded, and the originals.
    The website doesn't actually reflect the refund, somehow, and so if I try to return the originals, it wants to refund me for them a second time.

    I guess I'm going to have to talk to a human.


  • Discourse touched me in a no-no place

    Friend of mine sends me a text in the middle of the day today that starts with "I'm going to delete this message but..." and then goes off about how her 5-year relationship is going nowhere and she wants out, etc.

    We talk for a few minutes about her moving out and what I can do to help.

    She apparently never got around to that "deleting" bit, and 6 hours later, dude picks up her phone to look at a message I had sent her last week (I asked her to pick something up for me, and she was sending him to do it, and he wanted to check a detail).

    YEP. That's happened.


  • Impossible Mission Players - A

    @dcon said in The Official Status Thread:

    Representative line of code I was reviewing...

    for (int i = 0; i < (int)array.size(); i ++) { if (somecomplexcondition) doSomething(); array[i] += DoSomethingElse(); }
    

    Yes. All one line. Stop it. Just stop it. And met with resistance when I point out that's not our coding style.

    /me walks away slowly.
    No I did not literally just do something not too dissimilar with a in-query Linq query...


  • SockDev

    @weng said in The Official Status Thread:

    YEP. That's happened.

    that's.......

    .....

    nope, by the goddess i can't think of a more awkward outcome to that situation......

    do you want a hug?


  • Discourse touched me in a no-no place

    @accalia said in The Official Status Thread:

    @weng said in The Official Status Thread:

    YEP. That's happened.

    that's.......

    .....

    nope, by the goddess i can't think of a more awkward outcome to that situation......

    do you want a hug?

    Oh, I can think of a few more awkward outcomes (she lives on the other coast and my helping her move out would be the first time I've ever met this guy, so "not awkward" was never in the playbook) but not many. And I don't think any of them involve me wearing pants.



  • Status: My friend and I were playing Path of Exile, and the following discussion commenced:

    magus: My Red Ring of Death build is pretty great!
    0_1502424942818_7cbf7e4f-45cf-4baf-b46e-0d603c1eea54-image.png

    👨: Oh yeah? The Destroyer of XBoxes?
    magus: More like the destroyer of X-FACES!

    👨: Aha. ahaha........... ha....


  • kills Dumbledore

    @weng said in The Official Status Thread:

    And I don't think any of them involve me wearing pants.

    What about kilts?


  • SockDev

    Watches VS Online build fail to install Newtonsoft.JSON despite the three builds immediately before all successfully installing it.

    Status: undefined



  • @raceprouk said in The Official Status Thread:

    Watches VS Online build fail to install Newtonsoft.JSON despite the three builds immediately before all successfully installing it.

    Status: undefined

    In a similar vein

    Gradle sync failed: Could not find com.android.tools.build:gradle:3.0.0-alpha9

    It was there 5 minutes ago, what have you done with it since then!


    Edit: Also, this thing:

    Consult IDE log for more details (Help | Show Log) (23s 123ms)

    Of course Help or Show Log aren't clickable, that would be helpful and make sense.



  • STATUS:

    Got a job candidate with a bunch of porn sites in resume.

    Colleagues are wondering why I have porn on screen during work (instead of after hours, as usual).

    IT'S RESEARCH, OK!?



  • @cartman82 So he's probably good at sorting bananas and melons


  • Impossible Mission Players - A

    @cartman82
    BRB, making resume to send to myself to screen...



  • status $deity dammit Quicken!

    I have 3 accounts at Chase (well, technically 4, but I guess I never linked my mortgage). Quicken will download all 3 for a while and then just forget one. I then have to go and unlink/relink the online access. FINE. I just won't sync my savings acct anymore (checking and credit card are much more important). I had done that for a while, but after an upgrade put #3 back. It worked for several months. Until a week or 2 ago...


  • kills Dumbledore

    Status: struggling to optimise some SQL so it will run to completion within the 30 seconds the command timeout is set to. Without query plan rights, so trying to infer what's going on from client statistics only

    The timeout period is set in code so changing that, while an easy "fix" means waiting for the next scheduled update of the application and I'd like to fix this shit before then, especially since there's a growing backlog of what it needs to process so the time to run is only going to go up



  • @dcon said in The Official Status Thread:

    if (somecomplexcondition) doSomething(); array[i] += DoSomethingElse();
    

    0_1502461798657_7fb39145-18bb-4f6c-aeb1-57255359cb17-simpsons-fire.gif


  • Impossible Mission Players - A

    @jaloopa
    Yay troubleshooting stored procedures without any useful information and without being able to change the shape of the inputs or outputs! :cheerleader:


  • kills Dumbledore

    @izzion and it only taking the full amount the first time I run it, because the caching speeds it up massively.

    The pain point seems to be a left join/is null anti join on a CTE that links a couple of tables. I've played around with changing it to subqueries and temp tables, and switching to not exists or not in predicates instead, but there seems to be negligible difference between them.


  • Impossible Mission Players - A

    @jaloopa
    If you want a second set of eyes on it, feel free to DM me a lightly anonymized version.



  • @weng said in The Official Status Thread:

    So I ordered replacements.
    Guess what showed up today?
    A GIANT PILE OF PACKAGES!
    Both the replacements, for which I have already been refunded, and the originals.

    I had this happen at Christmas. Sorta.

    I ordered a 300 quid coffee machine and 3 quid filter.

    The machine arrived and the filter did not.

    As it was a gift I got a bit shirty and Amazon sent out a replacement on next day delivery with apologies. The new package arrived with the original filter which had obviously been un-lost by the carrier.

    Except what Amazon had re-shipped was another 300 quid coffee machine, not a 3 quid filter.


    It was a bit of a pain in the bum to send it back. But it's nice Amazon trusts customers enough that you can get a reshipping of a 3 quid item as easily as a 300 quid item. It's nice that you can get them on the phone too, unlike PayPal.



  • @cartman82 said in The Official Status Thread:

    STATUS:
    Got a job candidate with a bunch of porn sites in resume.
    Colleagues are wondering why I have porn on screen during work (instead of after hours, as usual).
    IT'S RESEARCH, OK!?

    No time for testing, said Boss.

    Just added him to a dumpster fire project with the code leaker guy and another contractor. YOLO.


  • Impossible Mission Players - A

    status: Dangit our new stove has suffered the IoT worm, hasn't it?

    0_1502467365026_15024673521991170081664.jpg


  • Impossible Mission Players - A

    Status: Confused

    0_1502473537398_546ba6d7-1d1f-4ae7-be9e-0c0837ddcb8b-image.png

    0_1502473568629_a9300a63-d38d-4156-9407-009f7a5a2884-image.png

    99% of these folders is one big folder, yet Windows stops being able to copy it fast-like after a bit (two different machines in the screenshots).


  • Impossible Mission Players - A

    @tsaukpaetra said in The Official Status Thread:

    @dcon said in The Official Status Thread:

    Representative line of code I was reviewing...

    for (int i = 0; i < (int)array.size(); i ++) { if (somecomplexcondition) doSomething(); array[i] += DoSomethingElse(); }
    

    Yes. All one line. Stop it. Just stop it. And met with resistance when I point out that's not our coding style.

    /me walks away slowly.
    No I did not literally just do something not too dissimilar with a in-query Linq query...

    For the curious:

                //Get their current character
                aCHAR_Characters character = usr.CHAR_Characters
                    .Where(x=>x.Name == usr.CharacterName)
                    .Select( x => new aCHAR_Characters()
                    {
    //...snip
                        CHAR_HeadsOwned = db.CHAR_Parts.Where(k => k.PartType == 0).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_TorsosOwned = db.CHAR_Parts.Where(k => k.PartType == 1).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_LHandsOwned = db.CHAR_Parts.Where(k => k.PartType == 2).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_RHandsOwned = db.CHAR_Parts.Where(k => k.PartType == 3).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_ULegsOwned = db.CHAR_Parts.Where(k => k.PartType == 4).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_LLegsOwned = db.CHAR_Parts.Where(k => k.PartType == 5).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_FeetOwned = db.CHAR_Parts.Where(k => k.PartType == 6).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList()
    }).FirstOrDefault();
    

    This because I merged seven tables that were nearly identical (with exception to the name) with a single one.

    I'm really curious to know if the resultant query is any more performant...



  • @raceprouk said in The Official Status Thread:

    Status: Found this very interesting:

    And to anyone who's taking security advice from people who aren't security experts, I have a undefined I'd like you to meet... 😈

    I dunno why Google is pushing https so hard, but I don't believe it's just for users's security.



  • @wharrgarbl Because they control referer data that way.

    Well, there's probably more to it than that. But it does mean if you want referer data from Google searches, you gotta fucking talk to Google-- you can't just grab the search terms from the headers like you used to be able to.



  • ESLint:

    Severity Code Description Project File Line Suppression State
    Warning no-extra-parens (ESLint) Gratuitous parentheses around expression. Miscellaneous Files xxx.js 382

    Code:

    		result = (offset.left <= cursorX)
    			&& (offset.left + element.offsetWidth > cursorX)
    			&& (offset.top <= cursorY)
    			&& (offset.top + element.offsetHeight > cursorY);
    

    Srsly ESLint? Fuck your suggestion.


  • Discourse touched me in a no-no place

    @tsaukpaetra said in The Official Status Thread:

    99% of these folders is one big folder, yet Windows stops being able to copy it fast-like after a bit (two different machines in the screenshots).

    Each file has quite a bit of fixed overhead in copying, so the cost really ought to include some extra time/cost for each file. (I think it's for stuff like synching metadata, virus-scanning the header of each file, etc.) Instead, it just uses the aggregate sizes, and that's wrong as a directory that contains a lot of small files (annoyingly common on Windows IME) ends up being claimed to be far cheaper than it really is. Stupidity and lies.

    I think it's something that doesn't show up so much in their testing environments, as I suspect those work with either lots of small files or some large files, but with largely balanced sizes in both cases, making the time/cost calculations using file sizes appear correct.


  • Discourse touched me in a no-no place

    @blakeyrat said in The Official Status Thread:

    @wharrgarbl Because they control referer data that way.

    Well, there's probably more to it than that. But it does mean if you want referer data from Google searches, you gotta fucking talk to Google-- you can't just grab the search terms from the headers like you used to be able to.

    I'm not convinced that makes sense. HTTPS just locks down the communications channel that the HTTP traffic is going over; the server will still get headers that they expected. Other random servers won't get anything, but shouldn't have been doing so anyway. Perhaps there's some subtlety I'm missing; it's Friday evening and I feel a bit hard-of-thinking right now.

    No, it smells more to me like someone at Google has a bee in their bonnet over this, and has managed to convince quite a few of his colleagues. That sort of thing happens.



  • @dkf said in The Official Status Thread:

    I'm not convinced that makes sense. HTTPS just locks down the communications channel that the HTTP traffic is going over; the server will still get headers that they expected.

    They won't get referer. Try it. Unless something's changed very recently.


  • Discourse touched me in a no-no place

    @blakeyrat said in The Official Status Thread:

    They won't get referer. Try it. Unless something's changed very recently.

    You might be right (given that it would be a cross-domain reference). I've never cared to try logging that stuff in my sites in the first place. 😆



  • @dkf Google made their search HTTPS-default to strong-arm website owners into signing up for Google Analytics, because that's the only way to get search terms now.

    Now the question is: why do they care if the REST of the internetz is HTTPS? I don't know.


  • SockDev

    @blakeyrat bonus points for the Referrer policy controls in Content Security Policy 1.1 where you can even restrict what referer might be sent...



  • Status: just saw this pic
    0_1502484278244_1502483701161.jpg

    How can something so simple be so accurate...


  • Grade A Premium Asshole

    @tsaukpaetra said in The Official Status Thread:

    status: Dangit our new stove has suffered the IoT worm, hasn't it?

    0_1502467365026_15024673521991170081664.jpg

    Connect a device to the internet that can output 5KW of heat and can heat up to 900F that is usually enclosed in a wooden cabinet to be controlled by anyone who figures out your slipshod protocols. What could possibly go wrong?


  • Impossible Mission Players - A

    @dkf said in The Official Status Thread:

    @tsaukpaetra said in The Official Status Thread:

    99% of these folders is one big folder, yet Windows stops being able to copy it fast-like after a bit (two different machines in the screenshots).

    Each file has quite a bit of fixed overhead in copying, so the cost really ought to include some extra time/cost for each file. (I think it's for stuff like synching metadata, virus-scanning the header of each file, etc.) Instead, it just uses the aggregate sizes, and that's wrong as a directory that contains a lot of small files (annoyingly common on Windows IME) ends up being claimed to be far cheaper than it really is. Stupidity and lies.

    I think it's something that doesn't show up so much in their testing environments, as I suspect those work with either lots of small files or some large files, but with largely balanced sizes in both cases, making the time/cost calculations using file sizes appear correct.

    Well what's happening is there's about 50 mb worth of about 178-ish files, those transfer ok, and then it gets to the big one it goes fine until suddenly slowing down for no apparent reason. I did the same test just transferring the big file alone later.



  • "This thing will burn your house down if you leave it on while you're not looking."

    "We'd better make a remote on/off switch for it so you can stop that from happening!"

    "Wait, an on switch?"

    [scene missing]

    @tsaukpaetra said in The Official Status Thread:

    status: Dangit our new stove has suffered the IoT worm, hasn't it?

    0_1502467365026_15024673521991170081664.jpg



  • @tsaukpaetra said in The Official Status Thread:

    @tsaukpaetra said in The Official Status Thread:

    @dcon said in The Official Status Thread:

    Representative line of code I was reviewing...

    for (int i = 0; i < (int)array.size(); i ++) { if (somecomplexcondition) doSomething(); array[i] += DoSomethingElse(); }
    

    Yes. All one line. Stop it. Just stop it. And met with resistance when I point out that's not our coding style.

    /me walks away slowly.
    No I did not literally just do something not too dissimilar with a in-query Linq query...

    For the curious:

                //Get their current character
                aCHAR_Characters character = usr.CHAR_Characters
                    .Where(x=>x.Name == usr.CharacterName)
                    .Select( x => new aCHAR_Characters()
                    {
    //...snip
                        CHAR_HeadsOwned = db.CHAR_Parts.Where(k => k.PartType == 0).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_TorsosOwned = db.CHAR_Parts.Where(k => k.PartType == 1).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_LHandsOwned = db.CHAR_Parts.Where(k => k.PartType == 2).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_RHandsOwned = db.CHAR_Parts.Where(k => k.PartType == 3).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_ULegsOwned = db.CHAR_Parts.Where(k => k.PartType == 4).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_LLegsOwned = db.CHAR_Parts.Where(k => k.PartType == 5).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_FeetOwned = db.CHAR_Parts.Where(k => k.PartType == 6).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList()
    }).FirstOrDefault();
    

    This because I merged seven tables that were nearly identical (with exception to the name) with a single one.

    I'm really curious to know if the resultant query is any more performant...

    arm_ok?



  • @blakeyrat said in The Official Status Thread:

    @wharrgarbl Because they control referer data that way.

    Well, there's probably more to it than that. But it does mean if you want referer data from Google searches, you gotta fucking talk to Google-- you can't just grab the search terms from the headers like you used to be able to.

    If Google wanted to hide search terms that people used, they could just put the search parameters after # in the URL. That part of the URL isn't included in the referer.



  • 0_1502513357540_42099e78-18e3-4846-bc58-aa42f125d5fc-image.png


  • Discourse touched me in a no-no place

    Status: Why did my brain have to shut down so damn early on Friday? There were interesting discussions here, but I could only think of how tired I was. I don't even have the excuse of it being chemically-induced: I was stone-cold sober.

    Now it is Saturday and I woke at an ungodly hour. Bleah…


  • Impossible Mission Players - A

    @ben_lubar said in The Official Status Thread:

    @tsaukpaetra said in The Official Status Thread:

    @tsaukpaetra said in The Official Status Thread:

    @dcon said in The Official Status Thread:

    Representative line of code I was reviewing...

    for (int i = 0; i < (int)array.size(); i ++) { if (somecomplexcondition) doSomething(); array[i] += DoSomethingElse(); }
    

    Yes. All one line. Stop it. Just stop it. And met with resistance when I point out that's not our coding style.

    /me walks away slowly.
    No I did not literally just do something not too dissimilar with a in-query Linq query...

    For the curious:

                //Get their current character
                aCHAR_Characters character = usr.CHAR_Characters
                    .Where(x=>x.Name == usr.CharacterName)
                    .Select( x => new aCHAR_Characters()
                    {
    //...snip
                        CHAR_HeadsOwned = db.CHAR_Parts.Where(k => k.PartType == 0).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_TorsosOwned = db.CHAR_Parts.Where(k => k.PartType == 1).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_LHandsOwned = db.CHAR_Parts.Where(k => k.PartType == 2).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_RHandsOwned = db.CHAR_Parts.Where(k => k.PartType == 3).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_ULegsOwned = db.CHAR_Parts.Where(k => k.PartType == 4).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_LLegsOwned = db.CHAR_Parts.Where(k => k.PartType == 5).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_FeetOwned = db.CHAR_Parts.Where(k => k.PartType == 6).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList()
    }).FirstOrDefault();
    

    This because I merged seven tables that were nearly identical (with exception to the name) with a single one.

    I'm really curious to know if the resultant query is any more performant...

    arm_ok?

    I have no idea?



  • @tsaukpaetra said in The Official Status Thread:

    @ben_lubar said in The Official Status Thread:

    @tsaukpaetra said in The Official Status Thread:

    @tsaukpaetra said in The Official Status Thread:

    @dcon said in The Official Status Thread:

    Representative line of code I was reviewing...

    for (int i = 0; i < (int)array.size(); i ++) { if (somecomplexcondition) doSomething(); array[i] += DoSomethingElse(); }
    

    Yes. All one line. Stop it. Just stop it. And met with resistance when I point out that's not our coding style.

    /me walks away slowly.
    No I did not literally just do something not too dissimilar with a in-query Linq query...

    For the curious:

                //Get their current character
                aCHAR_Characters character = usr.CHAR_Characters
                    .Where(x=>x.Name == usr.CharacterName)
                    .Select( x => new aCHAR_Characters()
                    {
    //...snip
                        CHAR_HeadsOwned = db.CHAR_Parts.Where(k => k.PartType == 0).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_TorsosOwned = db.CHAR_Parts.Where(k => k.PartType == 1).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_LHandsOwned = db.CHAR_Parts.Where(k => k.PartType == 2).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_RHandsOwned = db.CHAR_Parts.Where(k => k.PartType == 3).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_ULegsOwned = db.CHAR_Parts.Where(k => k.PartType == 4).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_LLegsOwned = db.CHAR_Parts.Where(k => k.PartType == 5).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_FeetOwned = db.CHAR_Parts.Where(k => k.PartType == 6).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList()
    }).FirstOrDefault();
    

    This because I merged seven tables that were nearly identical (with exception to the name) with a single one.

    I'm really curious to know if the resultant query is any more performant...

    arm_ok?

    I have no idea?

    Here, have some sources.


  • Impossible Mission Players - A

    @ben_lubar said in The Official Status Thread:

    @tsaukpaetra said in The Official Status Thread:

    @ben_lubar said in The Official Status Thread:

    @tsaukpaetra said in The Official Status Thread:

    @tsaukpaetra said in The Official Status Thread:

    @dcon said in The Official Status Thread:

    Representative line of code I was reviewing...

    for (int i = 0; i < (int)array.size(); i ++) { if (somecomplexcondition) doSomething(); array[i] += DoSomethingElse(); }
    

    Yes. All one line. Stop it. Just stop it. And met with resistance when I point out that's not our coding style.

    /me walks away slowly.
    No I did not literally just do something not too dissimilar with a in-query Linq query...

    For the curious:

                //Get their current character
                aCHAR_Characters character = usr.CHAR_Characters
                    .Where(x=>x.Name == usr.CharacterName)
                    .Select( x => new aCHAR_Characters()
                    {
    //...snip
                        CHAR_HeadsOwned = db.CHAR_Parts.Where(k => k.PartType == 0).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_TorsosOwned = db.CHAR_Parts.Where(k => k.PartType == 1).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_LHandsOwned = db.CHAR_Parts.Where(k => k.PartType == 2).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_RHandsOwned = db.CHAR_Parts.Where(k => k.PartType == 3).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_ULegsOwned = db.CHAR_Parts.Where(k => k.PartType == 4).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_LLegsOwned = db.CHAR_Parts.Where(k => k.PartType == 5).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList(),
                        CHAR_FeetOwned = db.CHAR_Parts.Where(k => k.PartType == 6).Join(x.CHAR_PartsOwned, pp => pp.Id, po => po.PartID, (pp, po) => po).ToList()
    }).FirstOrDefault();
    

    This because I merged seven tables that were nearly identical (with exception to the name) with a single one.

    I'm really curious to know if the resultant query is any more performant...

    arm_ok?

    I have no idea?

    Here, have some sources.

    Now was that so hard?

    Quote in context:

    named after "arm_ok", a variable that counts the number of arms you have left, for inventory purposes.



  • My daughter tried surströmming yesternight:

    👧 A thousand trolls just farted in my mouth!


  • Winner of the 2016 Presidential Election

    Status: Currently trying to figure out how to cash a US check in Germany. Because apparently, a wire transfer to my US bank account is too complicated. 😠

    Can you please join the 21st century, guys?



  • Status: listening to music through cheap bluetooth headphones with annoying voice messages

    🎶🎵🎶🎵 DISCONNECTEDCONNECTED 🎶🎵 🎶🎵 🎶🎵


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.