Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Harriet Carker
Jun 2, 2009

Just blew (I think) a phone interview. The question was how to know at site B that the user visited site A at some point in the past, assuming A and B are working jointly. I suggested local storage and the interview said it was ok but not great and pressed me for a better solution but I came up empty. Ideas? I’m still stumped!

Adbot
ADBOT LOVES YOU

Harriet Carker
Jun 2, 2009

roomforthetuna posted:

If you're going to do it by requesting between sites you could use cross-origin resource sharing and make a proper AJAX request of the other site

Can you elaborate a little more here? I don’t understand what sort of request to make. Do you mean something like POST the IP address on A and try to GET it on B and see if it exists in a database? Or am I way off track here?

Harriet Carker
Jun 2, 2009

IAmKale posted:


However, in the case of cross-site visitation analytics, http://foo.com could be configured on the backend to allow requests from http://foo.com AND http://bar.com at which point visitation analytics could be sent from http://bar.com to mingle with similar data sent from the website served at http://foo.com. Does that make sense?

No, and I guess this is why I blew the interview. I don’t know what visitation analytics are or how to store or send them. I also don’t know what you mean by letting the data mingle. Feel free to explain or just let it go - I clearly have a lot to learn.

Harriet Carker
Jun 2, 2009

Thanks for the explanation. I understand all of that, but I still am not sure what exactly I’m tracking. Did I have it right that I would basically grab and post the IP and time stamp to the analytics database and then attempt a GET on the second site to see if it exists in whatever range I’m concerned with?

Harriet Carker
Jun 2, 2009

How can I check if devDependencies are used or not? I ran depcheck but I don’t know much about the build process and there are tons of mystery devDependencies that I would obviously feel unsafe removing. There’s nobody I can ask - I’m the only one on the project now. Obviously the thing to do is not touch it - but I’d like to clean up unused ones someday if it’s safe to do so.

Harriet Carker
Jun 2, 2009

I started a new job recently. The most senior frontend guy is vehemently opposed to TypeScript for reasons I don't quite understand (understanding these reasons is obviously step 1). He put up a ton of resistance when I mentioned introducing it, claiming it's too full of quirks. I don't feel like rocking the boat too much since I'm new but curious if anyone had heard any particularly convincing reasons to not use TS in a modern React app. I've been using it for about 5 years and going back to plain JS feels awful so far.

Harriet Carker
Jun 2, 2009

Thanks for all the great advice everyone. I'm feeling some hardcore imposter syndrome with this guy because he seems like he knows what he's talking about but I don't quite understand, and I'm a little worried about pushing back and being totally off-base.

We have a standard React app with a webpack bundler. I mentioned we could slowly introduce TS into new components without having to touch the old ones until we want to/have time, but he says introducing TS is all-or-nothing because:

quote:

In TS you have to import files like `import { blah } from './world.js` even though it's `world.ts` that's not allowed in TS+ESM. The filename is `world.ts` but because it's actually transpiled to JS and TS is just a lie on top, you have to import all the files as `.js`. You can'd do `./world` in Node.js ESM. It requires the file extension for node native module resolution in ES Modules.

Can anyone help me maybe understand what he means? I've never run into this issue and I'm super unclear, but I don't feel confident enough to engage in the discussion.

Harriet Carker
Jun 2, 2009

fsif posted:

My best professional advice is that if the person is more senior than you are and you're not feeling comfortable enough to refute their arguments without asking for help on the Internet, you're probably best off just following their lead.

This is actually probably really good advice, which I will take. Thanks!

Harriet Carker
Jun 2, 2009

teen phone cutie posted:

yeah sounds like bullshit to me, but either put up a PR to put your money where your mouth is and prove it can be done or just lay off him for a while

For sure. I’m going to sit back and soak it all in for a bit. There’s no rush.

Adbot
ADBOT LOVES YOU

Harriet Carker
Jun 2, 2009

Bruegels Fuckbooks posted:

don't use moment in new code. https://momentjs.com/docs/#/-project-status/

it's funny because there were all these years of "don't use raw dates, use moment", and now it's luxon. oh well.

I like date-fns myself!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply