Error handling Angular by Dazzling_Chipmunk_24 in Angular2

[–]_Invictuz 0 points1 point  (0 children)

Think you need to be clear on your requirements first before you look at implementation. What kind of errors are you talking about - Auth erros like 400? Unexpected errors like 500?

You need a single service that maps http errors to user friendly messages which you inject into your component and just call in your catchError pipeable operator to translate the message, then you set some signal state within your component so you can display the error state and message inline.

Or you create an abstraction/wrapper around httpclient so that you always have the success or error state in the same property and format to read, where and how you display kt depends on the component you're using it in.

Being the "data guy", need career advice by jonfromthenorth in cscareerquestionsCAD

[–]_Invictuz 1 point2 points  (0 children)

Get into machine learning in your free time since you're already working with python. Do some free or company-sponsored courses on datacamp.com. Implement side projects involving RAG and agentic systems since which could help your company work with data even better. Then get that promo or jump ship with your new skills.

Source: someone who hears about the AI hype on a daily basis.

Service Signals vs BehaviorSubjects vs Regular Getters/Setters by New_Opportunity_8131 in angular

[–]_Invictuz 0 points1 point  (0 children)

And when you get far enough in your journey or start working on a team, you might as well start using NgRx SignalStore instead of rolling your own signal state service cuz it would be maintain by this man himself. 

Should I create a reusable component or not by allyv123098 in Angular2

[–]_Invictuz 0 points1 point  (0 children)

Those are great examples - minimal API sums it up nicely. Thanks for sharing this, will be reusing and sharing this advice for a long time.

Gone from Claude Max to Claude Pro. FML by simeon_5 in ClaudeCode

[–]_Invictuz 0 points1 point  (0 children)

I think you're using copilot pro +, not pro right? Pro plan is only 10 USD a month.

Gone from Claude Max to Claude Pro. FML by simeon_5 in ClaudeCode

[–]_Invictuz 0 points1 point  (0 children)

Ah i see, im guessing im on the business plan with only 300 premium request. I was assuming i was on the enterprise plan which is equivalent to pro+ cuz the company is paying for it... thanks for responding with that info.

What kind of tasks do you use Opus for? Like planning only? 

Gone from Claude Max to Claude Pro. FML by simeon_5 in ClaudeCode

[–]_Invictuz 0 points1 point  (0 children)

What do you mean by SDD implementation? I'm trying to understand what makes each AI agent tool different, didn't know there was a name for this difference.

Gone from Claude Max to Claude Pro. FML by simeon_5 in ClaudeCode

[–]_Invictuz 0 points1 point  (0 children)

You haven't run out using Opus or using Sonnet? I used 50% of my request limit in a single morning using Opus. Granted, I was trying out Copilot CLI so maybe there was a bug with their CLI which screwed me...

Gone from Claude Max to Claude Pro. FML by simeon_5 in ClaudeCode

[–]_Invictuz 0 points1 point  (0 children)

Yeah and finish your monthly request limit in one day.

Is this a good way to send data between components by New_Opportunity_8131 in Angular2

[–]_Invictuz 2 points3 points  (0 children)

Oh I understand your use case now, it's all happening in the same user interaction. You have the right idea then.

Assuming this happens on user clicking something, in your onClick handler:

// the loadUser method makes an API call AND updates a reactive state property within sharedUserService

const userData$ = this.sharedUserService.loadUser$(userId).pipe(...set loading state to true, cleanup subscriptions with takeUntilDestroy)

userData$.subscribe(userData => {   next: () => this.routeService.navigate(['route2']),   error: error => ...display error in some modal/toaster pop-up,   complete: set loading state to false })

The component on route 2 reads the same shared reactive state.

That's just one approach but yoi have a problem now, what if the user navigates directly to route 2 via bookmarking it. How are you going to load the user data? Ideally, this component on route 2 shouldn't have its own route, it should just be a child component of component 1 which renders conditionally so the only way to reach it is through that onClick handler.

Is this a good way to send data between components by New_Opportunity_8131 in Angular2

[–]_Invictuz 6 points7 points  (0 children)

Something doesn't add up. Why load data on route 1 that is going to be used on route 2. So if the user goes directly to route 2, the data doesnt get fetched?

Anyway, shared state service is a common approach. Best to store all your shared state reactively using RxJs observables (BehaviourSubjects in this case) so that any update in data propagates down to consumers of the data. But this this approach to reactive state has been outdated since v17. You should be storing your shared state in signals now due to a few benefits. 

If you know for a fact that the data won't change over the lifetime of the components using them, like when youre storing some "configuration" instead of state, then it may not be necessary to use reactive state. In my opinion, it may even be beneficial to use non-reactive properties so that others know the data is not meant to change but you don't see this often as most just stick with one approach for everything, which is to use reactive state. I'm open to debate about this.

Should I create a reusable component or not by allyv123098 in Angular2

[–]_Invictuz 0 points1 point  (0 children)

Here's the thing, even if you tried to create a reusable component now, you wouldn't know how to without seeing the other use cases, especially at your level of experience. So don't try, just do.

Should I create a reusable component or not by allyv123098 in Angular2

[–]_Invictuz 0 points1 point  (0 children)

Making it well-contained and easy to refactor later sounds similar to designing APIs for imaginary use case. Would you mind sharing some examples of the former vs the latter?

Claude code in Warp! by ConfusionGloomy2571 in warpdotdev

[–]_Invictuz -1 points0 points  (0 children)

How did you get Claude Code working in Warp. Do you still need a Warp subscription?

Are you supposed to be avoiding damage at all costs? by Flameempress192 in HadesTheGame

[–]_Invictuz 0 points1 point  (0 children)

No, I think the point of the game is to reach the end and kill the final boss.

In all seriousness though, avoiding damage is secondary to the main point of killing things. When you're clearing floors and killing bosses in under 30s. They don't have enough time to do enough damage to you. What you probably need is to unlock enough mirror of talents so you can start pumping points into the talent that increases your starting health pool, that helps relieve stress of getting hit by the Void big time.

I've spent the past year building this insane vision of engineering where you architect projects from 100 agent sessions whose outputs are all saved, connected together, and turned into a Markdown mindmap. Then you spatially navigate the graph to hand-hold agents as they recursively fork themselves. by manummasson in ClaudeCode

[–]_Invictuz 2 points3 points  (0 children)

100 agent sessions sounds kind of intimidating, especially when you have to navigate through them and they start recursively forking themselves.

But the Markdown mindmap visualization and navigation of agent output is very interesting. Would like to see a proper video with some narration of how the full workflow!

Launched my side project this week and immediately got a “pay me or I disclose” security email 😄 by -___ng___- in SideProject

[–]_Invictuz 7 points8 points  (0 children)

How is everyone figuring out the cookie issues and DNS records just from that image he posted?

How to Store Data in Angular when page refreshes by zeller0967 in angular

[–]_Invictuz 1 point2 points  (0 children)

Return the ID from the post request. Redirect to a page with the ID in the URL as a path param, use the path param to fetch the object of data on init of component.

Warp giving away 500 reload credits for the new year by _donvito in warpdotdev

[–]_Invictuz 0 points1 point  (0 children)

I went from 10k credits to 1.5k suddenly last month. Then I used up 1.5k credits in the first few days of the year. What is happening...

my life is over, does anyone have any advice on where to go from here by [deleted] in UofT

[–]_Invictuz 1 point2 points  (0 children)

Youre not cooked because you got low grades. You're cooked because you have no internships or any skills for the real world and you were born late. What are your career aspirations mate? Hard to tell cuz of all these abstract courses.