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 09-11-2018, 11:53 PM   #35151
jjshabado
Carpal Tunnel
 
jjshabado's Avatar
 
Join Date: Jul 2006
Posts: 22,554
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by goofyballer View Post
Glassdoor says "senior software engineer" averages out to $206k. I'm not leaving my job and moving to the South Bay for that, but I also feel like that's probably significantly undercutting what a senior software engineer actually makes there
And, to this, I don't think the average senior software engineer makes more than 206k in cash (and even this seems a bit high).
jjshabado is offline   Reply With Quote
Old 09-11-2018, 11:59 PM   #35152
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,878
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Our company used a third party salary survey and set all titles to have the same salary set at the 55th percentile. Senior engineers ended up getting paid 206k base. So if that’s 55th percentile, then it’s certainly up there.
Barrin6 is offline   Reply With Quote
Old 09-12-2018, 12:07 AM   #35153
jjshabado
Carpal Tunnel
 
jjshabado's Avatar
 
Join Date: Jul 2006
Posts: 22,554
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Blind seems super interesting.
jjshabado is offline   Reply With Quote
Old 09-12-2018, 12:38 AM   #35154
goofyballer
Carpal \'Tunnel
 
goofyballer's Avatar
 
Join Date: Jun 2005
Posts: 66,891
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by blackize5 View Post
I think Netflix forgoes stock in exchange for giving substantially more salary.

Sent from my SM-N960U using Tapatalk
Quote:
Originally Posted by jjshabado View Post
Likely. Netflix pays crazy ass salaries.
...

Quote:
Originally Posted by jjshabado View Post
And, to this, I don't think the average senior software engineer makes more than 206k in cash (and even this seems a bit high).
What happened between these two posts? Is this just a distinction between "cash" and "stock" (which is basically as good as cash for Netflix) which a couple days ago we weren't even sure Netflix made? Stock makes these discussions so confusing (esp for public companies).

Quote:
Originally Posted by Barrin6 View Post
Our company used a third party salary survey and set all titles to have the same salary set at the 55th percentile. Senior engineers ended up getting paid 206k base. So if thatís 55th percentile, then itís certainly up there.
206k base? Is there bonus/stock too? Maybe I should come ball out with Barrin, don't even need to move!
goofyballer is offline   Reply With Quote
Old 09-12-2018, 12:58 AM   #35155
blackize5
old hand
 
Join Date: Sep 2012
Posts: 1,334
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I just looked it up. Netflix has a complicated options program, but from what I can tell they give 5% of your salary in stock per year and you can purchase more if you want, up to 100% of your salary.
blackize5 is offline   Reply With Quote
Old 09-12-2018, 01:07 AM   #35156
iversonian
Carpal \'Tunnel
 
iversonian's Avatar
 
Join Date: Sep 2003
Location: Donkversonian
Posts: 20,814
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

is maxing out your hsa free money?
iversonian is offline   Reply With Quote
Old 09-12-2018, 01:25 AM   #35157
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,119
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

If you're my age it is.
suzzer99 is offline   Reply With Quote
Old 09-12-2018, 06:47 AM   #35158
jjshabado
Carpal Tunnel
 
jjshabado's Avatar
 
Join Date: Jul 2006
Posts: 22,554
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by goofyballer View Post
...







What happened between these two posts? Is this just a distinction between "cash" and "stock" (which is basically as good as cash for Netflix) which a couple days ago we weren't even sure Netflix made? Stock makes these discussions so confusing (esp for public companies).







206k base? Is there bonus/stock too? Maybe I should come ball out with Barrin, don't even need to move!


I think itís mostly the distribution is wide, the data we have is noisy, and yeah stock right now is crazy valuable for public tech companies.

206k for the Ďaverageí developer and for only cash salary comp is likely a bit on the high side. But that leaves a lot of people on the above average side and with non-cash / bonus compensation.

You can sort of see the problem with getting data on blind. There were threads with people from the same company arguing about large differences in comp for the same job levels at the same company. Who knows how much of that is people lying vs wide ranges of compensation at the company.
jjshabado is offline   Reply With Quote
Old 09-12-2018, 08:11 AM   #35159
Grue
Pooh-Bah
 
Grue's Avatar
 
Join Date: Mar 2004
Location: It is pitch black.
Posts: 5,638
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Blind is full of **** lol.
Grue is offline   Reply With Quote
Old 09-12-2018, 08:55 AM   #35160
jjshabado
Carpal Tunnel
 
jjshabado's Avatar
 
Join Date: Jul 2006
Posts: 22,554
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Grue View Post
Blind is full of **** lol.
From my reading last night it definitely seems like useful information with a side helping of bull****.

It's an interesting take though because its such a different data source then something like visa salary databases which aren't self reported (very valuable) but also ignore a lot of other things.
jjshabado is offline   Reply With Quote
Old 09-12-2018, 09:42 AM   #35161
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,878
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by goofyballer View Post
...



What happened between these two posts? Is this just a distinction between "cash" and "stock" (which is basically as good as cash for Netflix) which a couple days ago we weren't even sure Netflix made? Stock makes these discussions so confusing (esp for public companies).



206k base? Is there bonus/stock too? Maybe I should come ball out with Barrin, don't even need to move!
They eliminated bonus and folded it straight into cash. There is stock and thatís the only negotiating factor. Our base is quite high but I think it makes sense given that there is no bonus and our stock is still private.

If you want to check out the office, hit me up!
Barrin6 is offline   Reply With Quote
Old 09-12-2018, 11:09 AM   #35162
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,506
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Any experienced C devs here looking for a challenge in the OC area? I get a recruitment bonus if I can find someone
jmakin is offline   Reply With Quote
Old 09-12-2018, 01:23 PM   #35163
KatoKrazy
Pooh-Bah
 
KatoKrazy's Avatar
 
Join Date: Jan 2009
Location: Orange County, CA
Posts: 4,053
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Would love to if I hadn't just started at my current job.
KatoKrazy is offline   Reply With Quote
Old 09-12-2018, 06:25 PM   #35164
Craggoo
culled
 
Craggoo's Avatar
 
Join Date: Sep 2006
Location: R.I.P. ItzPenzoo 12-09-11
Posts: 12,533
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Just had a coding interview that had 3 questions. The first one was a gimme and was probably just there to make sure I wasn't a poser. The other ones were intentionally a bit tricky. I mentioned recursion on my resume so probably why he picked the 3rd and final one. Can you guys answer these questions and how fast?

Quote:
/** Console.log out 0-4 inside the timeout */
for (i=0;i<5;i++) {
window.setTimeout(function() {
console.log(i)
}, i * 100)
}
Quote:
/** Given an element and a callback, traverse an element and its children (and children's children [recursion]) calling the callback on each element with the element itself as the sole argument. */
function traverse(element, callback) {}
For the first question, I learned something new. I almost never use for loops. I didn't realize that each iteration of a for loop maintains the same scope hence why that first question is actually a bit tricky.

Last edited by Craggoo; 09-12-2018 at 06:39 PM.
Craggoo is offline   Reply With Quote
Old 09-12-2018, 06:47 PM   #35165
PJo336
THRILLHOUSE!
 
PJo336's Avatar
 
Join Date: Mar 2007
Posts: 21,887
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by iversonian View Post
is maxing out your hsa free money?
Some finance guy I talked to (who is prob an idiot shrug) said
1. 401k up to company match
2. Max out hsa
3. Max out rest of 401k
4. Worry about other **** only after 1-3
PJo336 is offline   Reply With Quote
Old 09-12-2018, 06:47 PM   #35166
goofyballer
Carpal \'Tunnel
 
goofyballer's Avatar
 
Join Date: Jun 2005
Posts: 66,891
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

First one = `var j = i` first, log j?
Second one...
Code:
function traverse(element, callback) {
  // assume children are in array element.children...?
  // precondition: if no children, array exists and is empty
  callback(element)
  element.children.forEach(child => traverse(child, callback))
}
? I assume I'm missing something, not sure what the tricky part is.
goofyballer is offline   Reply With Quote
Old 09-12-2018, 07:03 PM   #35167
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,878
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by PJo336 View Post
Some finance guy I talked to (who is prob an idiot shrug) said
1. 401k up to company match
2. Max out hsa
3. Max out rest of 401k
4. Worry about other **** only after 1-3
Hmm I need to look into this. I done both max out 401k and Roth IRA. Havenít considered HSA yet but so far from a quick glance it seems +EV.
Barrin6 is offline   Reply With Quote
Old 09-12-2018, 07:11 PM   #35168
PJo336
THRILLHOUSE!
 
PJo336's Avatar
 
Join Date: Mar 2007
Posts: 21,887
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Barrin6 View Post
Hmm I need to look into this. I done both max out 401k and Roth IRA. Havenít considered HSA yet but so far from a quick glance it seems +EV.
My Understanding was its the only investment you don't pay taxes on either end of, but I too need to get it figured out
PJo336 is offline   Reply With Quote
Old 09-12-2018, 07:22 PM   #35169
Craggoo
culled
 
Craggoo's Avatar
 
Join Date: Sep 2006
Location: R.I.P. ItzPenzoo 12-09-11
Posts: 12,533
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by goofyballer View Post
First one = `var j = i` first, log j?
Second one...
Code:
function traverse(element, callback) {
  // assume children are in array element.children...?
  // precondition: if no children, array exists and is empty
  callback(element)
  element.children.forEach(child => traverse(child, callback))
}
? I assume I'm missing something, not sure what the tricky part is.
That is why the first one is tricky. That doesn't work. That was my first inclination as well but it's wrong.

The second one is mostly right. I was told not to assume that there are any children so you would need to add a check around that then make the next recursive call.
Quote:
var j = i
inside the loop is the equivalent of

Quote:
var j [outside the loop]
j = i [inside the loop]
What that means is, by the time the first console.log runs, j/i has already been incremented to 4 so that gets console logged out 4 times.
Craggoo is offline   Reply With Quote
Old 09-12-2018, 07:35 PM   #35170
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,119
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

A similar thing happens if you console.log an object instead of a primitive. It's by reference and console.log is async. So you often end up seeing just the final state of the object. You have to stringify it to see the states you want.
suzzer99 is offline   Reply With Quote
Old 09-12-2018, 07:39 PM   #35171
Craggoo
culled
 
Craggoo's Avatar
 
Join Date: Sep 2006
Location: R.I.P. ItzPenzoo 12-09-11
Posts: 12,533
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
A similar thing happens if you console.log an object instead of a primitive. It's by reference and console.log is async. So you often end up seeing just the final state of the object. You have to stringify it to see the states you want.
And that was my very next inclination lol. Wrong as well in this case. What you are thinking of is...

Quote:
var j = JSON.parse(JSON.stringify(i))
The key thing to know here (that I didn't know before today) is that the scope inside a for loop is the global scope/enclosing scope. What that means is each time you assign a value to j you're just ovewriting the current value of j in that scope. Since the console.log for j would be in the timeout you would only see the final value that gets assigned to j.
Craggoo is offline   Reply With Quote
Old 09-12-2018, 07:44 PM   #35172
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,119
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Craggoo View Post
That is why the first one is tricky. That doesn't work. That was my first inclination as well but it's wrong.
Seems to work: https://codepen.io/anon/pen/bxYxgp?editors=0012

Code:
function cb(elem) {
  console.log(elem);
};

const myElem = {foo:"bar", children:[
  {foo1:"bar", children:[
    {foo1a:"bar"},
    {foo1b:"bar"}
  ]},
  {foo2:"bar", children:[
    {foo2a:"bar"},
    {foo2b:"bar"}
  ]}
]};

traverse(myElem, cb);

function traverse(element, callback) {
  // assume children are in array element.children...?
  // precondition: if no children, array exists and is empty
  callback(element)
  if (element.children) element.children.forEach(child => traverse(child, callback))
}
Output:
Code:
Object {
  children: [Object {
  children: [Object {
  foo1a: "bar"
}, Object {
  foo1b: "bar"
}],
  foo1: "bar"
}, Object {
  children: [Object {
  foo2a: "bar"
}, Object {
  foo2b: "bar"
}],
  foo2: "bar"
}],
  foo: "bar"
}

Object {
  children: [Object {
  foo1a: "bar"
}, Object {
  foo1b: "bar"
}],
  foo1: "bar"
}
Object {
  foo1a: "bar"
}
Object {
  foo1b: "bar"
}

Object {
  children: [Object {
  foo2a: "bar"
}, Object {
  foo2b: "bar"
}],
  foo2: "bar"
}
Object {
  foo2a: "bar"
}
Object {
  foo2b: "bar"
}
suzzer99 is offline   Reply With Quote
Old 09-12-2018, 07:46 PM   #35173
Craggoo
culled
 
Craggoo's Avatar
 
Join Date: Sep 2006
Location: R.I.P. ItzPenzoo 12-09-11
Posts: 12,533
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I was saying his solution for the setTimeout problem was wrong. The solution for the second one was almost right since I was told not to assume anything.

my solution for traverse in the end...
Code:
function traverse(element, callback) {
  callback(element)
  if (element.hasOwnProperty('children') && children.length) {
    for (var i=0; i<children.length; i++) {
      traverse(element.children[i], callback)
    }
  }
}
Now, I almost never use for loops. This is likely the last for loop I will write (short of another coding interview) this year.

Last edited by Craggoo; 09-12-2018 at 07:52 PM.
Craggoo is offline   Reply With Quote
Old 09-12-2018, 07:49 PM   #35174
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,119
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Craggoo View Post
And that was my very next inclination lol. Wrong as well in this case. What you are thinking of is...
That's what I meant. You can still see it with stringify and no parse just not as pretty. Depends on how deeply you need to drill into your object.



Quote:
The key thing to know here (that I didn't know before today) is that the scope inside a for loop is the global scope/enclosing scope. What that means is each time you assign a value to j you're just ovewriting the current value of j in that scope. Since the console.log for j would be in the timeout you would only see the final value that gets assigned to j.
Makes sense.
suzzer99 is offline   Reply With Quote
Old 09-12-2018, 07:58 PM   #35175
Craggoo
culled
 
Craggoo's Avatar
 
Join Date: Sep 2006
Location: R.I.P. ItzPenzoo 12-09-11
Posts: 12,533
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
That's what I meant. You can still see it with stringify and no parse just not as pretty. Depends on how deeply you need to drill into your object.
Try running it in the browser and see what you get. It always console.logs out to 5 instead of 0, 1, 2, 3, 4 which is the requested solution.

I believe the whole reason he included the setTimeout problem was to see if I ever progressed past basic js. I will tell you right now that someone who hasn't would almost certainly fail to figure it out.

Last edited by Craggoo; 09-12-2018 at 08:05 PM.
Craggoo 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 05:58 PM.


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