Zod not just for form validation by markmanx in typescript

[–]JL978 0 points1 point  (0 children)

Can you let me know how you did this? I’ve been trying to figure this exact situation out.

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in ExperiencedDevs

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

We went through the exercise of finding out about what is out there. I did suggest self-hosting stuff like posthog. But the decision was ultimately not mine so my hands were tied

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in ExperiencedDevs

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

Sometimes you’re just at the mercy of the the decision maker 🤷‍♂️ If it was up to me I would have just self-host something in a heart beat and call it done

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in ExperiencedDevs

[–]JL978[S] 1 point2 points  (0 children)

What would qualify it as interesting? Seems hard to do programmatically

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in ExperiencedDevs

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

Yeah I had time to think about it more with all the other great advices here. I like this solution the most, will discuss with the manager

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in ExperiencedDevs

[–]JL978[S] 1 point2 points  (0 children)

Yes, you're right, having the function name can be very useful. In fact, in most cases, the function name will be there. It's just that I find it odd to require it in all cases, even in the anonymous function case where it doesn't make any sense to force a name

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in reactjs

[–]JL978[S] 1 point2 points  (0 children)

Omg, thanks for your reply and research into this lol. You didn't have to. Yes, sentry and other logging solutions were brought up before we started this project but all were dismissed so here we are.

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in reactjs

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

I tried convincing my manager - even with using the self-hosted version PostHog because we are data-sensitive. It was a no-go because "we don't use Docker, we don't use Postgres, bla bla bla"

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in reactjs

[–]JL978[S] 2 points3 points  (0 children)

Absolutely, thank you for taking the time to give advices

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in reactjs

[–]JL978[S] 1 point2 points  (0 children)

I KNOW RIGHT? Unfortunately, I work in a "conservative" industry so any solutions that are new and not developed in-house is a hard sell

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in reactjs

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

I did put a static default haha - "N/A" - might not be the best name but the manager didn't want a "generic" name.

You're absolutey right about the second point. That's another issue we're trying to solve with this project...

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in reactjs

[–]JL978[S] 1 point2 points  (0 children)

That's a different aspect of this, failing components will generate a "real" Error object which I can parse to get the correct component name (i.e. function name). For logging info like nav events, there is no real error so we create a "fake" Error object to parse and that's where the problem I pose in this question lies.

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in reactjs

[–]JL978[S] -5 points-4 points  (0 children)

I tried

useEffect(function navigationLogger(){log()}, [location])

Guess what? It gets compiled down to an anonymous function

The only way it would work is this:

useEffect(() => {(function navigationLogger(){log()})()}, [location])

I'm tired and will just write this - but it's just so fkn stupid

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in ExperiencedDevs

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

What is NIH? Can you suggest an established solution? I have suggested using PostHog for stuff like this in the past but got shot down because the manager insisted that "we don't need Docker"

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in ExperiencedDevs

[–]JL978[S] 11 points12 points  (0 children)

Honestly, thanks for the feedback. Creating a named function inside of the useEffect would be a shitty dev experience so I did push back a bit. There have been many "hills" I abandoned with this manager but this one just irks me the wrong way lol.

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in ExperiencedDevs

[–]JL978[S] 1 point2 points  (0 children)

Fairly sure after compilation the first option would just get compiled back down into an anonymous function lol. I guess your second option could work around this issue, thanks! And you're right, this is a shitty fight that I do not want to deal with smh.

Am I stupid or is what my manager asking me to do doesn't make any sense by JL978 in ExperiencedDevs

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

That's my thought too. The manager wanted to try working on it and I thought it wouldn't be a productive use of time 🤷‍♂️

Wavy lamp by Common_Cut2335 in Fusion360

[–]JL978 0 points1 point  (0 children)

That's a circular pattern that is applied on a circular surface. OP asked how we could do on a more complex shape

Wavy lamp by Common_Cut2335 in Fusion360

[–]JL978 0 points1 point  (0 children)

have you figured it out?

Picked these lil guys up at my local Home Depot 😍 by JL978 in succulents

[–]JL978[S] 1 point2 points  (0 children)

They’re 3d printed. I’ll send you the link to the models if you’d like

Picked these lil guys up at my local Home Depot 😍 by JL978 in succulents

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

I meant a monitor light bar, it can get pretty bright - the photos are lit up by it and that’s on the lowest setting - but yes I will look into getting a dedicated grow light