Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

01-31-2019 , 01:31 AM
a11y is accessibility. I guess the "11" is for "ccessibilit".
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 01:38 AM
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?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 01:56 AM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 02:07 AM
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)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 02:24 AM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 02:35 AM
Quote:
Originally Posted by PJo336
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!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 02:40 AM
Quote:
Originally Posted by goofyballer
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:
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 11:07 AM
Quote:
Originally Posted by Larry Legend
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 11:17 AM
I had seen something about FormData compatibility before. Should I not use it? I like it though. I guess compatibility is more important.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 11:26 AM
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",
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 12:32 PM
Quote:
Originally Posted by suzzer99
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 03:11 PM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 09:28 PM
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?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 09:33 PM
Add

#TODO: Figure out what needs to be fixed.

and check back in two more years.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 09:37 PM
Your ideas are intriguing to me and I wish to subscribe to your newsletter
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2019 , 11:45 PM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2019 , 04:35 PM
Quote:
Originally Posted by suzzer99


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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2019 , 06:12 PM
Quote:
Originally Posted by Grue
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2019 , 12:06 AM
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)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2019 , 12:44 AM
Quote:
Originally Posted by Victor
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2019 , 12:47 AM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2019 , 12:59 AM
Quote:
Originally Posted by goofyballer
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
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
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2019 , 01:09 AM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2019 , 01:13 AM
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
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2019 , 01:15 AM
Quote:
Originally Posted by goofyballer
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 hated when I assumed the software worked when troubleshooting issues and it turned out to not work...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m