Two Plus Two Publishing LLC
Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 03-22-2019, 03:33 AM   #38001
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,377
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Almost all the engineering managers I've ever worked with are former devs. The few exceptions sounded like the above - product managers in another name.
RustyBrooks is offline   Reply With Quote
Old 03-22-2019, 09:34 AM   #38002
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,520
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I hate dealing with non technical managers

Or even worse are guys that think they’re technical but are not at all
jmakin is offline   Reply With Quote
Old 03-22-2019, 12:04 PM   #38003
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,150
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Totally non-technical is fine at a certain level - because all they know is results. But the front-line manager directly over devs has to be technical imo to keep things headed in the right direction.
suzzer99 is offline   Reply With Quote
Old 03-22-2019, 11:30 PM   #38004
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,075
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Barrin,

Have you told the manager that the Jr guy is really good?
microbet is offline   Reply With Quote
Old 03-23-2019, 12:26 PM   #38005
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,880
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I have given nothing but good feedback about him to my manager. Perhaps I need to be more explicit. Next time on our 1-1s I’m going to ask my manager when will he get promoted. It better be end of the next quarter, or I’m seriously switching teams or getting a new job. I feel like our staff engineer might be holding him back as well. Since the junior engineer is not a “yes man” with him.
Barrin6 is offline   Reply With Quote
Old 03-26-2019, 12:45 PM   #38006
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,520
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I'm sure you're right barrin but why does it matter to you so much?
jmakin is offline   Reply With Quote
Old 03-26-2019, 12:53 PM   #38007
KatoKrazy
Pooh-Bah
 
KatoKrazy's Avatar
 
Join Date: Jan 2009
Location: Orange County, CA
Posts: 4,054
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

There's a superstar young engineer on my team as well. I went to tell his manager he needs promotion this year and thankfully it was already in the works and approved.

I don't want to speak for barrin, but in my case it was important to me because I want to see talented people get the comp and recognition they deserve -- it's nice to be in a culture that rewards high performance.
KatoKrazy is offline   Reply With Quote
Old 03-26-2019, 12:55 PM   #38008
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,520
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Ah i guess my company’s getting me pretty jaded
jmakin is offline   Reply With Quote
Old 03-26-2019, 10:37 PM   #38009
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,150
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I swear I thought there was some way to do this in desctructuring wonderland (w/o having to use Object.assign or looping):

Code:
const crmUserInfo = {
  profile: {someObject: "some stuff"},
  receiptBio: {someOtherObject: "some other stuff"},
  givingHistory: {"someGivingObject": "yay giving"}  
};


const multipleDupesOneMissing = { 
  Success: {
    cognitoMatches: trimCognitoUsers(cognitoMultipleMatchesOneMissingCrm),
    ...crmUserInfo // NO - BAD!! BUT WHY DAMMIT?
  }
};
I want a flat object that looks like this:

Code:
const multipleDupesOneMissing = { 
  Success: {
    cognitoMatches: trimCognitoUsers(cognitoMultipleMatchesOneMissingCrm),
    profile: {someObject: "some stuff"},
    receiptBio: {someOtherObject: "some other stuff"},
    givingHistory: {"someGivingObject": "yay giving"}  
  }
};
No matter what I try to google I always land on the damn MDN page which just goes on and on and on and never seems to have what I want.

EDIT: Never mind. It worked the way I want. My ES LINT version was set to 8 instead of 2018.

Last edited by suzzer99; 03-26-2019 at 10:44 PM. Reason: dumb
suzzer99 is offline   Reply With Quote
Old 03-27-2019, 01:52 AM   #38010
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,880
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by KatoKrazy View Post
There's a superstar young engineer on my team as well. I went to tell his manager he needs promotion this year and thankfully it was already in the works and approved.

I don't want to speak for barrin, but in my case it was important to me because I want to see talented people get the comp and recognition they deserve -- it's nice to be in a culture that rewards high performance.
+100. Generally I like to see people I work well with get promoted. It makes them happy, less likely to leave the team or the company. If all the smart people left your team, I would be very disappointed. If it wasn’t for him, I wouldn’t be learning much, get much **** done and I would have left by now.
Barrin6 is offline   Reply With Quote
Old 03-27-2019, 06:02 PM   #38011
Grue
Pooh-Bah
 
Grue's Avatar
 
Join Date: Mar 2004
Location: It is pitch black.
Posts: 5,638
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Had my first annual review with the company I joined in late 2017. First section: list of what I got done/delivered. Second section: what my coworkers thought of me - cliffs, some of them think I can be a bit of a dick (shocker).

Results:

Spoiler:
Grue is offline   Reply With Quote
Old 03-27-2019, 06:03 PM   #38012
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,075
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Congrats!
microbet is offline   Reply With Quote
Old 03-27-2019, 08:02 PM   #38013
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,150
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Nice job Grue!
suzzer99 is offline   Reply With Quote
Old 03-27-2019, 08:08 PM   #38014
Grue
Pooh-Bah
 
Grue's Avatar
 
Join Date: Mar 2004
Location: It is pitch black.
Posts: 5,638
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Have to work on the dick thing. Thought I was hiding it better ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
Grue is offline   Reply With Quote
Old 03-27-2019, 08:19 PM   #38015
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,150
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I am really stuck on C# Moq. I know I must be doing something wrong. Basically I am trying to return a value from an asynchronous method that's buried in a line of asynchronous methods.

Code:
var mockBBClient = new Mock<IAppFxClient>();
  mockBBClient.Setup(x => x.RequestAsync("ping", "ping", 1))
  .Returns(Task.FromResult("sdsd"));
The mockBBClient is then passed around and winds up in the code below as Client.

The weird part is SO seems to suggest that the "sdsd" above is ignored. Task.FromResult just needs some value in there that matches the Task return type. So if that's true how the heck do I get a mock response to the methods that are calling RequestAsync in my code?

The method I'm mocking (RequestAsync) returns Task<string>. The compiler is fine with my code. But I only get a blank response in the method of code that's calling RequestAsync on the mock db access client.

So I broke down the response when running live vs. running in test mode. First I output the Task (promise I guess) before awaiting it, then after.

Code:
public async Task<string> GetData(InputsT inputs, DataListLoadOptions options)
{
    var response = Client.RequestAsync("DataListLoad", "XYZ");
            
    Console.WriteLine("pre await response");
    Console.WriteLine(response);

    var response2 = await response;
    Console.WriteLine("post await response");
    Console.WriteLine(response2);
    Console.WriteLine("FINISH");

    return response2;
}
For live results I get:
Code:
response
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[System.String,EA.Blackbaud.SoapClient+<RequestAsync>d__9]
response2
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"

... buncha XML ...

</soap:Envelope>
FINISH
For mock results I get:

Code:
response
System.Threading.Tasks.Task`1[System.String]
response2

FINISH
Is it something weird because we have a task within a task?

Last edited by suzzer99; 03-27-2019 at 08:35 PM.
suzzer99 is offline   Reply With Quote
Old 03-27-2019, 08:22 PM   #38016
OmgGlutten!
Pooh-Bah
 
OmgGlutten!'s Avatar
 
Join Date: Aug 2016
Posts: 4,999
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

it seems so much easier to just change jobs than to wait for promotions and raises.
OmgGlutten! is offline   Reply With Quote
Old 03-27-2019, 09:34 PM   #38017
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,150
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

It is at a lot of places.
suzzer99 is offline   Reply With Quote
Old 03-27-2019, 09:39 PM   #38018
Victor
Carpal \'Tunnel
 
Victor's Avatar
 
Join Date: Jul 2003
Posts: 61,355
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

ya ive bitched about my situation a lot. I am on the promo list now. its still absurd to me. the best dev Ive worked with at my job is like the model "lead" and hes not even close to being compensated.

the problem is children. get married and pump out a bunch of kids and you arent gonna be looking to change jobs even if you are losing a bit of money. big companies just own you then.

anyway...heres a great email I just got forwarded. for context, someone from another team sent an email to our QA. not any dev. just straight to the single QA on our team. obv she forwarded it to the devs but like, its not hard to send the email to the entire team.

Quote:
Hello!
xxxx we have an API and we think the issue is not on our end. The api is whatever” and we’re receiving a 500 response code. Is there someone on the team that can help us figure out what’s going on or does another team write the APIs? The path is whatever . The error message is quite lengthy so I won’t include it here but will be happy to share if needed. Any help would be greatly appreciate. Feel free to reach out to me or Jim. Thank you!
my favorite part is that they are getting an error, but they arent gonna tell what that error is just yet. and ya Im not even gonna try to ask wtf data they were calling the api with.
Victor is offline   Reply With Quote
Old 03-27-2019, 09:40 PM   #38019
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,520
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Lol i think i’d be tempted to verbally abuse anyone who sent me something like that

Or at the very least “the solution is whatever”
jmakin is offline   Reply With Quote
Old 03-27-2019, 10:12 PM   #38020
Victor
Carpal \'Tunnel
 
Victor's Avatar
 
Join Date: Jul 2003
Posts: 61,355
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

hmm, her email did not have "whatever", I was just removing the sensitive info from this post. sorry for the confusion.
Victor is offline   Reply With Quote
Old 03-27-2019, 10:48 PM   #38021
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,520
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Oh than that looks like one of 14 emails i get a day
jmakin is offline   Reply With Quote
Old 03-27-2019, 10:50 PM   #38022
KatoKrazy
Pooh-Bah
 
KatoKrazy's Avatar
 
Join Date: Jan 2009
Location: Orange County, CA
Posts: 4,054
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by OmgGlutten! View Post
it seems so much easier to just change jobs than to wait for promotions and raises.
Quote:
Originally Posted by suzzer99 View Post
It is at a lot of places.
The even dumber part is they would gladly pay some unknown off the street market rate to replace you if you left.
KatoKrazy is offline   Reply With Quote
Old 03-27-2019, 10:59 PM   #38023
Grue
Pooh-Bah
 
Grue's Avatar
 
Join Date: Mar 2004
Location: It is pitch black.
Posts: 5,638
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I've hopped too much in the past 6 years and yeah tbh my comp has topped out until I get that principal roll where I can apparently sit at home and show up for calls and thats about it.
Grue is offline   Reply With Quote
Old 03-28-2019, 12:25 AM   #38024
muttiah
Carpal \'Tunnel
 
muttiah's Avatar
 
Join Date: Aug 2004
Posts: 23,463
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by OmgGlutten! View Post
it seems so much easier to just change jobs than to wait for promotions and raises.
It is, but you also have to restart again. In big companies the real money is at the upper principal/staff and partner levels. So it can pay to stay at giant corp for 10+ years, develop deep expertise, and the payday at the end is pretty huge (if you reach director/partner levels)
muttiah is online now   Reply With Quote
Old 03-28-2019, 12:53 AM   #38025
ChrisV
Carpal \'Tunnel
 
ChrisV's Avatar
 
Join Date: Jul 2004
Location: Adelaide, Australia
Posts: 40,285
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
The weird part is SO seems to suggest that the "sdsd" above is ignored. Task.FromResult just needs some value in there that matches the Task return type. So if that's true how the heck do I get a mock response to the methods that are calling RequestAsync in my code?
No, that's not the case. In your link, the question involves someone returning a base Task rather than a Task<T>. Prior to .NET 4.6 there was no easy way to create a completed base Task, so people would hack it with stuff like FromResult(default(int)). By this:

Quote:
As shown in this answer, in .NET 4.6 this is simplified to .Returns(Task.CompletedTask);
The poster means "in .NET 4.6 there's this easier way, don't need to hack it".

Quote:
The method I'm mocking (RequestAsync) returns Task<string>. The compiler is fine with my code. But I only get a blank response in the method of code that's calling RequestAsync on the mock db access client.
Hard to say without messing around with it. Breakpoint before you await the mocked task. What is response.Result?

My first guess at the problem is simply that your method signatures aren't the same.

Quote:
mockBBClient.Setup(x => x.RequestAsync("ping", "ping", 1))

var response = Client.RequestAsync("DataListLoad", "XYZ");
If you don't set MoqBehavior.Strict, Moq will allow you to call undefined methods on your mock. Usually, for reference types, that means you get null back, but in this instance I'm not sure if you'd get null or Task<string>.FromResult(null).
ChrisV is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 02:54 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online