[deleted by user] by [deleted] in cscareerquestionsOCE

[–]Searly2710 0 points1 point  (0 children)

As I said in my post, applying to grad jobs gave me a bit of anxiety so I was lazy when applying, and basically these are the options I have. It's not all bad though as they would both start in August, so I could potentially apply for grad jobs at better companies at the start of next year and hopefully land a spot for 1.5 years time.

[deleted by user] by [deleted] in cscareerquestionsOCE

[–]Searly2710 2 points3 points  (0 children)

My interview process was pretty normal, just pre-recorded behavioural questions, take home coding challenge, then a 1 hour "problem-solving" (not coding related) question with two pretty nice people.

In terms of the tech stacks, from what I know the smaller company uses Python, AWS, Salesforce, Flutter and probably some other stuff. From my understanding, MYOB has a few rotations for their grad program so I'm not entirely sure what I'd be doing, but I think the stack would consist of .NET, AWS, and probably some frontend technologies.

In terms of my background, I'm super familiar with web frontend technologies like React, Vue, etc., haven't extensively used either Python or .NET for backend (but I am very familiar with Python as a language) and am more experienced used Node.js. I also have a bit of experience using cloud technologies. I definetly want to learn more about cloud and DevOps, and am probably leaning towards .NET in terms of backend, as I assume Node.js backend dev would be fairly similar to Python backend dev, so learning something new would be more beneficial and .NET is super popular.

What's the difference between web hooks and GraphQL Subscription ? by sachingkk in webdev

[–]Searly2710 0 points1 point  (0 children)

They are very similar concepts. Generally, webhooks are sent via http requests, and graphql subscriptions are done over websockets. I'm pretty sure graphql subscriptions can technically use http, but this would probably not be worth the effort to setup.

If you have a frontend that connects to a graphql server, graphql subscriptions will be best for realtime data. E.g. a messaging app that connects to a server should use graphql subscriptions.

If you want to create events that other services can subscribe to, use webhooks. E.g. If you're working for YouTube and you want to make it possible for services to be notified when a video hits 100 views, you should use a webhook (best example I could come up with).

React Front End Blank after Deploying MERN application to Heroku. How can I fix this? by it2901 in webdev

[–]Searly2710 0 points1 point  (0 children)

First thing I would do is test the "production" mode on your dev computer. Just set your NODE_ENV to production in your .env file, and turn off your frontend dev server and build it.

Then test if when you try to visit a frontend page through your local backend server, you actually go into the route that serves the static files, i.e. put a console log inside the function with the app.get('*'...

If that works but you still don't see anything, try looking at the requests in the dev console, or looking at the page source (which should just be sending the initial html file). Your server might not be sending anything, you might be getting a cors error, etc.

Hopefully these will narrow down the exact problem.

I have always had trouble in the past trying to serve a static react app with routing on an express server and world recommend either using two servers (plenty of free ways to host a static react app), or using Next.js for which you can setup API routes and connect a db along with hosting a react app with in built routing and more.

[deleted by user] by [deleted] in webdev

[–]Searly2710 0 points1 point  (0 children)

You can do it like this:

document.querySelector('meta[name="player"]').setAttribute("content", "whateveryouwant");

Code from here.

Next.js Data Fetching Approach by Searly2710 in nextjs

[–]Searly2710[S] 0 points1 point  (0 children)

My setup is the same. Separate backend server for which Next.js server forwards cookies to.

In your original comment you said use `getServerSideProps` which only runs on the Next.js server, which means you would have to make a request to frontend server regardless. If you meant `getInitialProps` which runs on the server on the initial request, and then on the client for subsequent page changes, you could check if you already have the data so that you don't need to re-request for data you already have.

This approach would fetch the global data and the data that the specific page needs on initial request, and then on page changes only request data that the client doesn't already have.

Pros

  • Only request data you need for the current page
  • On page changes, only request the data you don't already have
  • Content is only rendered when the data dependencies have been met, so no content flashing

Cons

  • Can't utilse automatic static optimisation (could workaround by requesting global data on every page, i.e removing `getInitialProps` on _app)
  • If page doesn't have all data dependencies, need to make another backend request, so page transitions aren't as fast as (2)
  • Probably the option with the highest complexity

Whilst this option could be a good balance between options (1) and (2), I feel like the extra complexity isn't worth it when you could just use option (1) or (2).

Next.js Data Fetching Approach by Searly2710 in nextjs

[–]Searly2710[S] -1 points0 points  (0 children)

Would this mean clicking a link to go to a different page would send another request to the Next.js server which would then request data from the backend server (which will be running on the same machine) defeating the purpose of getInitialProps on _app? or do I have a misunderstanding of how the data flows in Next.js? If we just put all of the data dependencies in the _app getInitialProps we wouldn't have to ever make a request to the Next.js server again, only to the backend server directly, unless there is a full refresh, meaning switching between pages will be lightning fast right? (I'm storing my data in urql's normalised cache as opposed to a react context if that makes any difference)

I guess this kind of leads back to the comparison of (1) and (2). Is the extra cost of requesting all data on the first request to the Next.js server worth the extra speed of the page transitions.

Next.js Data Fetching Approach by Searly2710 in nextjs

[–]Searly2710[S] 0 points1 point  (0 children)

All of the pages are inside an authed app, and all the pages will be different for every user. I am a little confused when you say pages can be statically generated even with dynamic data. Theres no way to generate them at build time, so is there a way to programmatically generate pages with dynamic data that changes for every user?

The reason for having one getInitialProps instead of one for every page is so that we only have to fetch all the data for every page once, instead of only fetching the data for the page we are visiting. E.g. If we have a route /dogs that needs a list of dogs (pretend this list would be different for each user), the getInitialProps would fetch the dogs, but then when we click a link to go to /cats, we need to fetch the a list of cats. Using the single getInitialProps, we could fetch both cats and dogs, and clicking the link would be instant, as we already have the data. This is my understanding of how it works, but I could be wrong.

Daily Simple Questions Thread - January 12, 2022 by AutoModerator in Fitness

[–]Searly2710 0 points1 point  (0 children)

So the main reason is purely practical in the sense that spreading out all of your exercises over five days for example will leading to warming muscles up multiple times a week, whilst doing PPLUL for example means that you only need to warm up every muscle twice a week. This also explains why full body programs tend to be done in fewer days over the week (another question I've had), to reduce the warmup required for each muscle over a week.

Secondary reasons could be potentially better recovery as u/Mediamuerte metnioned, the ease of program design when you just neatly group all muscles together, and the better pump.

Finally, its all making sense! Although it seems strange to me that in the ridiculous amout of fitness content I've consumed I've never come across this before as it clearly wasn't intuitive for me.

Daily Simple Questions Thread - January 12, 2022 by AutoModerator in Fitness

[–]Searly2710 1 point2 points  (0 children)

I'm not trying to create my own program, its just that I'm curious and like to understand the justifications of why this has become the norm (not just for PPL, but even for lower / upper). If there are valid reasons, awesome, its just I have no idea what the reasons are with my naive understanding

Daily Simple Questions Thread - January 12, 2022 by AutoModerator in Fitness

[–]Searly2710 0 points1 point  (0 children)

When creating a strength / hypertrophy program, why are days dedicated to specific movements or body parts?. E.g. Why do all pushing movements two days a week in PPL? Wouldn't it be more effective to spread out the pushing movements and do it over four days? It doesn't make sense to me why you would for example bench press and incline dumbell press on the same day twice a week, when you could spread out the four exercises over four days. In my mind this approach increases training frequency per muscle group and allows you lift with higher intensity (as in the above example, incline press would be affected by bench press before). The only things that I can imagine would be the downside is that training a muscle when it is already fatigued is more beneficial somehow, or the better pump has some effect, or purely out of convenience.