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 01-31-2019, 01:25 AM   #37476
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,137
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I don't know what any of that means. But we have a crappy react dev/CSS guy who I'm basically stepping in for because he's so terrible. So he's definitely not doing any of that.

We do have a good react guy and CSS person - but they're swamped on another project. I can at least go to him for advice and bounce ideas.

Also we're using BrowserRouter and it's surprisingly hard to pass props from say App.js to the Routes themselves. The withRouter HOC seems to at least provide the history API we're using to do in-app routing. But maybe all of that stuff isn't the right choice.
suzzer99 is offline   Reply With Quote
Old 01-31-2019, 01:31 AM   #37477
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,074
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

a11y is accessibility. I guess the "11" is for "ccessibilit".
microbet is offline   Reply With Quote
Old 01-31-2019, 01:38 AM   #37478
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,137
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Should I be using redux for this relatively simple app that's mostly just a bunch of pages and not a ton of in-page craziness?
suzzer99 is offline   Reply With Quote
Old 01-31-2019, 01:56 AM   #37479
Grue
Pooh-Bah
 
Grue's Avatar
 
Join Date: Mar 2004
Location: It is pitch black.
Posts: 5,638
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

ugh uh short answer: most people nowadays use UI libraries that extract "real" html into react components. And with the introduction of context in react 16.6 and useContext in react 16.8 you probably don't need redux for much if at all now outside of handling ajax. Also yeah sounds like you're close on react-router, just look closely at Route's render prop its probably what you want.
Grue is offline   Reply With Quote
Old 01-31-2019, 02:07 AM   #37480
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,137
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Yeah I can do it with render I guess but it seems painful and I also don't like App.js having to know what each route needs and then feeding it. Passing global stuff should either be automatic to all routes, or a route can ask for it in its own code (like it's doing now).

I'm also very proud of my auto-registering Route prototype. It's so freaking annoying to me how just to make a new route you have to import the route into App.js, then specify it in the BrowserRouter element. Routes should register themselves imo - just by virtue of living in a Routes folder and by declaring their own route internally. And they do! (with my hacky method I came up with)
suzzer99 is offline   Reply With Quote
Old 01-31-2019, 02:24 AM   #37481
Larry Legend
Celtic Pride
 
Larry Legend's Avatar
 
Join Date: Jul 2009
Location: Kyrie's earth
Posts: 42,713
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Code:
const {location} = this.props;
const {state} = location;
const {registerVerify} = state;
const {password,email} = registerVerify;
wat

Code:
this.setState({emailVal:email,passwordVal:password,crmId:crmIdVal});
    try {
            await Auth.confirmSignUp(this.state.emailVal, verificationCode);
            const user = await Auth.signIn(this.state.emailVal, this.state.passwordVal);
            console.log(user, 'user');
            this.props.history.push({pathname: crmIdVal ? '/verifyduplicate':'/dashboard', state: { email: this.state.emailVal}})
    }
Unless I'm missing something recent, that setState call is async and batched inside react so trying to set emailVal and immediately using it wont work. You can provide a callback to setState if you need to use that value after setting it, but if you are setting state with that value you should have it anyway.

That code is complete dog****.

Last edited by Larry Legend; 01-31-2019 at 02:31 AM.
Larry Legend is offline   Reply With Quote
Old 01-31-2019, 02:35 AM   #37482
goofyballer
Carpal \'Tunnel
 
goofyballer's Avatar
 
Join Date: Jun 2005
Posts: 66,896
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by PJo336 View Post
Also, before I asked about how to know if you are receiving fair pay or when you should start looking. I got a promotion today, but a really **** raise, so I guess I have my answer now :/
After my recent job search, the numbers on levels.fyi seem realistic to me (if you're curious what "fair pay" is for someone at your level at larger companies where they have more of a sample).

Forget if I ever posted on here about the conclusion to my story, but my last day at my current job is Friday and my first day at DBAM is Monday. Woohoo!
goofyballer is offline   Reply With Quote
Old 01-31-2019, 02:40 AM   #37483
PJo336
THRILLHOUSE!
 
PJo336's Avatar
 
Join Date: Mar 2007
Posts: 21,896
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by goofyballer View Post
After my recent job search, the numbers on levels.fyi seem realistic to me (if you're curious what "fair pay" is for someone at your level at larger companies where they have more of a sample).

Forget if I ever posted on here about the conclusion to my story, but my last day at my current job is Friday and my first day at DBAM is Monday. Woohoo!
Cool, I'll check it out. I have heard its better than glass door, but I have always found glass door to be in the correct neighborhood.

2 of my friends with less exp left for 10-20% more than I make after a raise, so I assume I could do better. Just figuring out if money is all I am really after or not

Last edited by PJo336; 01-31-2019 at 02:41 AM. Reason: congrats! but i always take time off in between :cool:
PJo336 is offline   Reply With Quote
Old 01-31-2019, 11:07 AM   #37484
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,137
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Larry Legend View Post
Code:
const {location} = this.props;
const {state} = location;
const {registerVerify} = state;
const {password,email} = registerVerify;
wat

Code:
this.setState({emailVal:email,passwordVal:password,crmId:crmIdVal});
    try {
            await Auth.confirmSignUp(this.state.emailVal, verificationCode);
            const user = await Auth.signIn(this.state.emailVal, this.state.passwordVal);
            console.log(user, 'user');
            this.props.history.push({pathname: crmIdVal ? '/verifyduplicate':'/dashboard', state: { email: this.state.emailVal}})
    }
Unless I'm missing something recent, that setState call is async and batched inside react so trying to set emailVal and immediately using it wont work. You can provide a callback to setState if you need to use that value after setting it, but if you are setting state with that value you should have it anyway.

That code is complete dog****.
Yep I've already had to clean this up because the state wasn't there for the subsequent calls. No idea how he had this working. Also I have no idea what he's trying to do with the first 4 lines that he can't doin one line.
suzzer99 is offline   Reply With Quote
Old 01-31-2019, 11:17 AM   #37485
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,074
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I had seen something about FormData compatibility before. Should I not use it? I like it though. I guess compatibility is more important.
microbet is offline   Reply With Quote
Old 01-31-2019, 11:26 AM   #37486
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,137
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Looks like you need to use a shim: https://developer.mozilla.org/en-US/...b/API/FormData

Btw normally caniuse.com is the resource for this stuff, but their entry on FormData is folded in with other stuff and confusing: https://caniuse.com/#feat=xhr2

We use this in package.json: "formdata-polyfill": "^3.0.12",
suzzer99 is offline   Reply With Quote
Old 01-31-2019, 12:32 PM   #37487
_dave_
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK (or what remains of it)
Posts: 12,951
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
I just realized this same dev also doesn't believe in using form tags. Just bare input tags with onChange that set state. Then the "submit" button is just a link with onClick to process the form.

Please tell me this is not some common react paradigm.
It's not clear if your beef was only the missing form tag, but input tags with value=state.something and an onChange that does setState is very much a common react paradigm. These are "controlled inputs".

It was interesting to see use of FormData.get, I've only ever needed .append since usually everything is in state already. By the look of your link a shim isn't needed for .append, but I don't need to support IE anyhow.

I'm not sure I buy the "Form tags are super important" thought, but if it breaks lastpass etc that's worth bearing in mind.
_dave_ is offline   Reply With Quote
Old 01-31-2019, 03:11 PM   #37488
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,137
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I'm not saying there's anything wrong with onChange for stuff that's supposed to happen as the user types. But in this case he was using it only for stuff that happens after the user clicks submit.
suzzer99 is offline   Reply With Quote
Old 01-31-2019, 09:28 PM   #37489
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,373
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I came across a #FIXME comment in my code from 2 years ago. I can't remember what needs fixing and I can't really tell by looking at it. It's possible that whatever it was got fixed and the comment didn't get removed but I'm not sure.

Given that I don't feel bothered by the code, should I just remove the comment?
RustyBrooks is offline   Reply With Quote
Old 01-31-2019, 09:33 PM   #37490
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,074
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Add

#TODO: Figure out what needs to be fixed.

and check back in two more years.
microbet is offline   Reply With Quote
Old 01-31-2019, 09:37 PM   #37491
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,373
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Your ideas are intriguing to me and I wish to subscribe to your newsletter
RustyBrooks is offline   Reply With Quote
Old 01-31-2019, 11:45 PM   #37492
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,137
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Code:
  "scripts": {
    "start": "env-cmd .env.development react-scripts start",
    "test": "react-scripts test",
    "build-dev": "env-cmd .env.development node generate-build.js && react-scripts build",
    "build-stage": "env-cmd .env.stage node generate-build.js && react-scripts build",
    "build-prod": "node generate-build.js && react-scripts build",
    "eject": "react-scripts eject",

    "------------------------------": "------------------------------------",
    "IMPORTANT": "These scripts are for AWS CodeBuild - do not run them locally",
    "---------": "Check in to develop or stage branch to trigger builds to those environments",
    "--------------------------------": "------------------------------------",
    "test-ci": "CI=true react-scripts test --env=jsdom",
    "pushtos3": "aws s3 sync build s3://portal-web-dev --delete",
    "pushtos3-stage": "aws s3 sync build s3://portal-web-stage --delete",
    "deploy": "npm run build && npm run pushtos3"
  },
The crap you gotta go through to put comments in package.json.
suzzer99 is offline   Reply With Quote
Old 02-01-2019, 04:35 PM   #37493
Victor
Carpal \'Tunnel
 
Victor's Avatar
 
Join Date: Jul 2003
Posts: 61,341
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post


Let's say you had a senior front end developer who has been developing a react app for a month or so. You get a look at what he's done and this is the naming and organizational scheme he's come up with for the react components.

What would you think?
  1. Naming consistency isn't that important, seems fine.
  2. A little messy but fine.
  3. Not good, need to keep an eye on this guy and clean this up.
  4. Wtf - this is not senior dev work and a major red flag.
looks really bad to me. sometimes he names with a dash and sometimes with Pascal case. Sometimes he appends component on the folders or files and sometimes not.

Why are some of the components so deeply nested? I mean, normally I would think it was fine and necessary but given this dudes naming, I would def be checking on that.

heres how I name stuff.

folders have dashes and no component. files have dashes and end with .component if they are a component. no caps anywhere.
Victor is offline   Reply With Quote
Old 02-01-2019, 06:12 PM   #37494
Victor
Carpal \'Tunnel
 
Victor's Avatar
 
Join Date: Jul 2003
Posts: 61,341
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Grue View Post
That sounds fine other than props != routeProps, routeProps is the argument passed to render in react-router-dom but yeah I'm sure you know, I'm a stickler etc.



Much more competent people than me who do all the a11y stuff i.e. material-ui, antd, semantic-ui, whatever. I don't do much "real" html/jsx stuff at all lately, I import components that handle that and then don't have to worry about other nonsense.
ya same here. screw all that noise. let someone else build the library and let business tell me what they like. I can import and focus on going and finding the data.
Victor is offline   Reply With Quote
Old 02-02-2019, 12:06 AM   #37495
goofyballer
Carpal \'Tunnel
 
goofyballer's Avatar
 
Join Date: Jun 2005
Posts: 66,896
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I picture Grubhub as being a decently large company that must care about software, but multiple times now I've hit a (almost) site-breaking bug when trying to order food from them:

Any restaurant that has "$0" for their minimum order will, when you open their page, suddenly show a $40 minimum. You can't check out for that restaurant with less than $40 in your cart. It happens (for me, idk if it's global) on any restaurant with a $0 min (but not restaurants that actually specify their own minimum, which behave normally).

This first happened to me a few months ago, and I shrugged it off figuring it must be a one-time issue, but it's happening again for me right now. How is it possible to let the same bug **** your software repeatedly?


(I also had a fun experience last time trying to explain to a customer service chat agent what the problem was, while he repeatedly told me what my own eyes said was happening was in fact not happening)
goofyballer is offline   Reply With Quote
Old 02-02-2019, 12:44 AM   #37496
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,137
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Victor View Post
looks really bad to me. sometimes he names with a dash and sometimes with Pascal case. Sometimes he appends component on the folders or files and sometimes not.

Why are some of the components so deeply nested? I mean, normally I would think it was fine and necessary but given this dudes naming, I would def be checking on that.

heres how I name stuff.

folders have dashes and no component. files have dashes and end with .component if they are a component. no caps anywhere.
Yeah I had to look at it for 2 days and it was burning my eyeballs out of their sockets. I was just wondering if everyone else is as anal as me about naming conventions and consistency.

My boss was going through coniptions trying to decide what to do about him. I was like - it's more work having him on the project than not. But I think it makes her look bad if contractors flame out or something.

And then his work visa extension got denied (supposedly, but he could just be lying because he clearly didn't want to be here). But if true it's apparently something that never used happen but now happens a lot because of Trump.

So his last day was yesterday and I basically spent the day today cleaning up all his code. Dude clearly had no idea what he was doing. I don't think he understands asynchronous programming at all.
suzzer99 is offline   Reply With Quote
Old 02-02-2019, 12:47 AM   #37497
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,137
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

So now that I'm back in the front end and doing node lambdas - I've been doing a ton of async/await and promises. Couldn't be more on board. As usual I don't always get the decisions the ES standards teams makes at first, but after working with it a bit I'm like these guys are brilliant - this is perfect.

But it's freaking annoying that all that trivia I got grilled about in my interviews is literally just stuff any decent dev would know if they'd worked with async/await intensely for a few weeks. I don't know what they think they're testing for - familiarity? Just give me a good dev who can think, and they'll learn what they need to know.

Somehow knowledge seems to have trumped critical thinking skills in the interview process, when it should be the exact opposite.
suzzer99 is offline   Reply With Quote
Old 02-02-2019, 12:59 AM   #37498
PJo336
THRILLHOUSE!
 
PJo336's Avatar
 
Join Date: Mar 2007
Posts: 21,896
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by goofyballer View Post
I picture Grubhub as being a decently large company that must care about software, but multiple times now I've hit a (almost) site-breaking bug when trying to order food from them:

Any restaurant that has "$0" for their minimum order will, when you open their page, suddenly show a $40 minimum. You can't check out for that restaurant with less than $40 in your cart. It happens (for me, idk if it's global) on any restaurant with a $0 min (but not restaurants that actually specify their own minimum, which behave normally).

This first happened to me a few months ago, and I shrugged it off figuring it must be a one-time issue, but it's happening again for me right now. How is it possible to let the same bug **** your software repeatedly?


(I also had a fun experience last time trying to explain to a customer service chat agent what the problem was, while he repeatedly told me what my own eyes said was happening was in fact not happening)
I have had this for at least 6 months as well. I just shrug it off and move on. I wonder if thats the common action, so they dont get enough bug reports? Either way, I assume its probably another company that grew too quick and is now incompetent :P

Quote:
Originally Posted by suzzer99 View Post
So now that I'm back in the front end and doing node lambdas - I've been doing a ton of async/await and promises. Couldn't be more on board. As usual I don't always get the decisions the ES standards teams makes at first, but after working with it a bit I'm like these guys are brilliant - this is perfect.

But it's freaking annoying that all that trivia I got grilled about in my interviews is literally just stuff any decent dev would know if they'd worked with async/await intensely for a few weeks. I don't know what they think they're testing for - familiarity? Just give me a good dev who can think, and they'll learn what they need to know.

Somehow knowledge seems to have trumped critical thinking skills in the interview process, when it should be the exact opposite.
I understand that people hate the project concept, but this is why I think having a candidate throw together a small feature on their own time is more than enough. Live should be reserved for culture fit and actual conversation. Instead we waste that time with whiteboarding and have 0 time to ask them questions or let them ask questions. Its such a bad process
PJo336 is offline   Reply With Quote
Old 02-02-2019, 01:09 AM   #37499
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,137
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Yeah I think this guy that I referenced in my blog post has the right approach: https://www.karllhughes.com/posts/rethinking-hiring

Quote:
Step 2: An In-Person Pairing Project

This is the meat of the interview, and it’s much more similar to what I do with team members in real life. We pick an open source project with a few issues we can make progress on in 2-3 hours, schedule a time to get together, and then pair program on the issues. This helps me assess their critical thinking ability (especially when they’re the navigator), their communication skills, the speed at which they pick up new things, and our ability to work closely together. Similarly, (I hope) it allows them to see whether or not they’d like to work next to me for the next few years. Finally, we’ll do more questions and answers if there is anything that I feel like wasn’t answered in the first informational session.
Of all my interviews BloomNation was my favorite - we basically worked through building a like button widget - how we would package it for browsers and support it in the back end. But that place was in the worst location (literally right in the middle of 3rd St. Promenade in Santa Monica - one of the most cluster-**** shopping districts to get in and out of in LA), the average age looked to be about 25, and the hiring guy was visibly not happy with my previous salary.
suzzer99 is offline   Reply With Quote
Old 02-02-2019, 01:13 AM   #37500
PJo336
THRILLHOUSE!
 
PJo336's Avatar
 
Join Date: Mar 2007
Posts: 21,896
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

My buddy interviewed at 3 places, one was a project, one was pairing on an issue, and 1 involved 0 coding and just talking. Seemed to run pretty hot not getting stupid lang specific teasers that no one ever needs to know to build a project
PJo336 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 12:56 AM.


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