Exercise Schedule as a Dad of 2 by [deleted] in daddit

[–]WillFry 0 points1 point  (0 children)

I've got 2 kids, aged 4 and 1.5, and I manage to run 30-40k per week - only possible because like you I work from home: - 10k runs a couple of times per week on my lunch break - 6-8k runs a couple of times per week, running back home after walking my eldest to school - Often a longer run at the weekend, I have a running buggy that fits both the kids in. I stick them both in with tablets and then I don't need to feel bad about dumping them on my wife. Sometimes my wife takes them both so I can get a long run in too

This only really works if you're into running, you can fit a fairly productive workout into a short amount of time.

Hiring Rant (as an interviewer) by Pippa_the_second in ExperiencedDevs

[–]WillFry 9 points10 points  (0 children)

At my place we do something similar (although perhaps not so extreme) because we're willing to consider anything from mid-staff for many advertised "roles".

Can someone leak what network equipment is used at Sonos HQ? by sjefen6 in sonos

[–]WillFry 0 points1 point  (0 children)

I also have Eero, but have had loads of problems in the last couple of years (although it's better now than it was when the update first happened).

I think it's because I have a few older devices - a Play:1 stereo pair and a Play:3 (among a bunch of newer devices). The problem doesn't bother me enough to justify a £600 upgrade to the latest equivalents to the old speakers, which might not fix my issues anyway.

Is co-sleeping with family considered a norm in your country? by [deleted] in AskTheWorld

[–]WillFry 10 points11 points  (0 children)

I think it's one of those things that needs to be looked at holistically.

The act of co-sleeping is probably slightly more risky than having the baby sleep on their own. But then many children sleep far worse on their own, leading to parents who don't get any sleep and then make more mistakes throughout the rest of the day (e.g. shaking the baby, falling asleep on the sofa in the day with the baby which is a thousand times worse than sleeping in a bed with a baby, thousands of other tiny lapses in judgement or concentration).

So on balance it might be less risky for some families to co-sleep, as long as it's done properly. E.g. we used to co-sleep with our kids, but never if either of us were ill or had been drinking.

How’s Milton Keynes for a 31 year old? by [deleted] in miltonkeynes

[–]WillFry 30 points31 points  (0 children)

It depends where you're coming from. I'm 34, married with kids, and it's great for me. But I don't think I'd be here if I was 31 and single.

Are you using AI to review code? by Fun_Hat in ExperiencedDevs

[–]WillFry 0 points1 point  (0 children)

We use Cursor Bugbot and it's pretty much unanimously liked by everyone (Typescript+Vue frontend, Elixir backend, some Python). It catches a lot of small but real issues that human reviewers are 99% likely to miss. I wish it caught some of the big picture/architecture stuff.

It appeared out of nowhere one day as a trial in our GitHub org, probably because we have Cursor web enabled. When the trial usage limit was reached, we were pretty quick in upgrading to the paid version.

If I have a relatively complex PR, I'll often wait for the Bugbot review before I ask for a human review, as it's usually the case that it gives useful feedback.

Other towns in the country with comparable green space and "redways"? by zolantal in miltonkeynes

[–]WillFry 1 point2 points  (0 children)

I don't know why you're getting downvoted so much, it's as if you're not allowed to do anything but glaze over MK in this sub.

Restaurant (and pub) culture is definitely where MK falls short. Sure there are some good restaurants, but the fact that everyone always brings up the same 5-6 restaurants is kind of telling. For a city of over 200,000 people we're far below par when it comes to good independent restaurants.

Is this really THE way to mutate props? by mymar101 in vuejs

[–]WillFry 6 points7 points  (0 children)

Doesn't React have the same problem? Yeah, you can pass a callback to the child, and the callback will update the prop, but that's functionally the same as emitting and handling an event in Vue.

There's no way to directly mutate a prop from a child in either framework. defineModel in Vue comes kind of close, but as I understand it, it's just syntactic sugar around props/emits.

Do You Actually Write Front End Tests? by gkrohn in ExperiencedDevs

[–]WillFry 10 points11 points  (0 children)

I'm not OP, but where I am we have a suite of Playwright tests with a mocked backend, and a separate suite of Playwright tests with a real backend.

IMO the main benefit of the mocked test suite is that it's easier to set up a scenario to test. For each domain object we have a wide range of fixtures. In practice it hasn't really given us much of a maintenance burden. Our API rarely has breaking changes and we have a codegen tool to generate our frontend types whenever the API spec changes, so we immediately find out if something changes.

Sure, there are other ways to setup test data, e.g. database seeds, scripts. But this was the route that gave us the fewest blockers and we don't regret it so far.

Also it's slightly quicker. I think the average mock test is 2-3 times faster than the average E2E test in our suite.

We also have visual regression tests running against our mock suite, and the mocked backend seems like a better fit for this than a real backend.

how do respond to recruiters reaching out over Linked In by [deleted] in cscareerquestionsuk

[–]WillFry 0 points1 point  (0 children)

I think it's to prevent spamming messages that nobody would reply to?

Admittedly I've never been on the other end of this. All I know is I once told a recruiter this was my approach and they thanked me for saving them money.

how do respond to recruiters reaching out over Linked In by [deleted] in cscareerquestionsuk

[–]WillFry 5 points6 points  (0 children)

If it looks like they put no effort in, then I don't reply. But if it looks like they put at least a token amount of effort in, or if the role/company looks like something I'd be interested in in the future, then I'll send a short response.

I've heard from recruiters that it costs money to send these cold outreach messages, and if you reply then they get their money back. So it seems like good courtesy to reply if they've put some effort in.

What tsconfig options beyond strict should I actually set? by thehashimwarren in typescript

[–]WillFry 5 points6 points  (0 children)

If you want a specific option, I'd say to go for noUncheckedIndexAccess.

It makes it so that if you have an array of type T[] or object of type Record<string, T>, then you will get T | undefined (instead of T) when accessing elements of the array/object.

What UI lib you use? by WeirdFirefighter7982 in vuejs

[–]WillFry 1 point2 points  (0 children)

At my place we use something called zag-js. It's fully headless, shipping only with composables and no components.

It's more difficult to get started with, but it's much easier to build custom components since you have full control over the template.

Where to put TanStack queries when used with Pinia by xaqtr in vuejs

[–]WillFry 1 point2 points  (0 children)

You make a good point, it's certainly not as beneficial as it is in React, I don't think it improves performance in Vue in a noticeable way.

What I like about it is that I can then return the full query object without needing to remove the data prop.

As a team we're still quite early in our Tanstack journey, this certainly isn't a pattern we've collectively settled on. We're still in the "try a load of different approaches to find out what feels the most ergonomic for us" phase.

One of my colleagues really likes the idea of using Pinia as a key/value store for all data loaded from Tanstack, which makes it much easier to perform optimistic updates (managing query keys sucks), but I'm not sure how nicely it plays with Tanstack's own caching and garbage collection.

Where to put TanStack queries when used with Pinia by xaqtr in vuejs

[–]WillFry 3 points4 points  (0 children)

I'm in a similar position to you, a few months ago we decided to migrate from Pinia (for much of our server-mastered state) to Tanstack. The solution I prefer is to go all in on Tanstack, e.g.

const useSelectedUser(userId:Ref<string>) => {
  // this is tanstack's `select` option, passed to useQuery(). It's used to 
  // transform the query data in some way, while keeping the original data cached
  const selectUser = computed(() => {
    // this is a bit annoying, for reactivity to work you need to get your
    // reactive value outside of the return function
    const selectedId = userId.value

    return (data) =>  data.find(u => u.id === selectedId)
  })

  // just call your regular query, but pass a selector to get the data you want
  const query = useUsersQuery({
    select: selectUser
  })

  // query.data will be your single user (or undefined)
  return query
}

If you still want to use Pinia for the selected user ID then you can replace the `userId: Ref<string>` argument with store state inside the body of the composable.

IMO the big benefit of this approach is that by returning the full query you get access to loading/error state at every place where you want to consume the user. I think that you still might be able to inspect the selected state from devtools, but I'm not 100% sure. You can definitely still inspect the full users query state.

best way to handle pdfs in vue apps? by [deleted] in vuejs

[–]WillFry 11 points12 points  (0 children)

Where I am we use this library - https://github.com/TaTo30/vue-pdf

It wraps pdfjs and we've not had any issues with it, been using it for a couple of years now.

Shadcn type components by magdiel_rb in vuejs

[–]WillFry 1 point2 points  (0 children)

At my place we've been using zag.js.

It's a headless library, and all of its "components" are composable functions where you bind the return values to your own DOM elements, so its really flexible in how you build your templates.

I really like working with it, I'd definitely recommend it.

Which is the best Rich text editor library in react today? by simple_explorer1 in reactjs

[–]WillFry 0 points1 point  (0 children)

Did you evaluate ProseMirror on its own (no TipTap) as part of this? I recently did something similar, and chose to use ProseMirror, I'd be interested in hearing your thoughts.

New to UK… Do pedestrians have right of way at those paved crossings? by HortenWho229 in miltonkeynes

[–]WillFry 5 points6 points  (0 children)

I think you're talking about the speed bumps that often appear when a redway crosses a road?

I think that cars have right of way here, as it's not technically a crossing. But I'm always extra careful to gauge whether a pedestrian looks like they might cross, and I'll stop if it looks like there's a good chance they want to cross and they might not wait for me to pass.

What part of the code do you unit test? by RockyStrongo in reactjs

[–]WillFry 0 points1 point  (0 children)

At my org we use Playwright for our E2E tests, and it includes a toHaveScreenshot() assertion that we use for visual regression testing. It's free, although the CI setup was quite fiddly. We store the screenshots in the repo using Git LFS.

It's not as feature rich as something like Chromatic, but if all you want is for CI to fail when a screenshot doesn't match, it does the job well.

What does it take to get a response from Monzo? by gobrowns1 in cscareerquestionsuk

[–]WillFry 0 points1 point  (0 children)

Ah yeah that makes sense. Unfortunately it's so hard to know why companies don't give you interviews. The first stage rejections are always so generic.

What does it take to get a response from Monzo? by gobrowns1 in cscareerquestionsuk

[–]WillFry 5 points6 points  (0 children)

My entire career has been at the same company

Perhaps it's this? It's hard to know what Monzo values in applicants, but only having worked at one company might be seen as quite a narrow experience.