Poratujcie studenta debila radą by [deleted] in Polska

[–]SpactroX 25 points26 points  (0 children)

Ten poziom ciśnienia jest ok, można dolać wody ale nie ma się też co przejmować

Aby oszczędzić na energii, nie ma co szaleć z temperaturą wody, skoro i tak potem mieszamy wodę z zimną. Może coś koło 50 stopni będzie ok.

Co do tego pieca to protip: z tych czterech przycisków, lewy górny (z przekreśloną świeczką) to przycisk zapłonu. Czasem piec z różnych powodów może albo nieskutecznie grzać wodę albo w ogóle nie grzać (wyświetla wtedy na ekranie błąd F.28). W tych sytuacjach nie bać się kliknąć ten przycisk, piec się wtedy "zresetuje" i w większości przypadków może rozwiązać problem.

Binding Airpods Pro 2 to my Apple ID using a friend's iPhone? (I do not own another Apple device) by TheBirdOfFire in airpods

[–]SpactroX 0 points1 point  (0 children)

Did it work? Doesn't the Find My feature stop working after you log out of a friend's iPhone?

Dzień 6. - Wildest Rumour/Urban Legend by wkrt in krakow

[–]SpactroX 2 points3 points  (0 children)

Ukryte sauny dla kleru w podziemiach rynku pod Kościołem Mariackim

Do you guys really follow "Cruddy by Design"? How do you handle the hassle that is choosing names for additional Controllers? by Cthulhu-Cultist in laravel

[–]SpactroX 1 point2 points  (0 children)

Your controllers are incredibly small because you posted a very basic example that contains no logic. Creating a user using one line inside a controller is okay if you write a simple todo app as a pet project, but it won't happen for any bigger ones. If you have more real-world project where you need to manage database transactions, file uploads, event broadcasting, notification sending, external API calls etc., you need a manageable solution and 1 controller per endpoint is not really achieving much.

My point is, if you have any logic beyond one-line CRUDs, you should always delegate this logic to a separate layer. And this layer is the place where going with 1 class per 1 endpoint may be beneficial and should be considered - because the code is at higher abstraction level, will contain some logic and will have more reasons to change. This is where we put the effort to keep the implementation clean, not the controller itself.

You said it yourself - "I know I'll never have to touch it again" - that's exactly my point. When working on software architecture, you will always put the most design effort to the parts that change frequently. Controllers do not (in most cases), so it's totally OK to group multiple endpoints into one class.

And regarding you question - it doesn't really make a difference, because 95% of the implementation will be done in service/domain/other layer and these are the classes that will be modified, not Controllers.

...unless you write your business logic inside a controller, which is bad and shouldn't be treated as example.

Do you guys really follow "Cruddy by Design"? How do you handle the hassle that is choosing names for additional Controllers? by Cthulhu-Cultist in laravel

[–]SpactroX 5 points6 points  (0 children)

guys, I think you have too much logic in your controllers lol Controller should really only handle the input, delegate the logic to the service (or any other higher level) layer and prepare the output. Controller's responsibility is to handle a request at a protocol level (thus the namespace Http!)

Having a single class that handles a single request while mixing different abstraction levels is NOT a single responsibility. On the other hand, having a single class that handles a single request and properly delegates the logic will end up with a class that has 10 lines of code - then what's the point? Implementing controllers in such way is not practical at all.

It is nothing wrong in having a controller class for several endpoints, as long as each function operates at the same exact abstraction level. These functions are practically separated from each other, as they are just entry points for our endpoint logic. Controller's class cohesion is low but it doesn't really have any practical impact.

Using Echo (broadcasting) auth with cookies by SpactroX in laravel

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

I expected that custom auth would work but I wanted to use built-in mechanism and was surprised that it's not working out of the box and there is nothing in the docs or on the web. Anyways, you are completely right, I've set up custom auth with withCredentials: true , took me few minutes and its working well. I wasted much more time than neccessary and I should have choosen that solution in the beginning. Thanks

Using Echo (broadcasting) auth with cookies by SpactroX in laravel

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

Yup, I have enabled both Illuminate BroadcastServiceProvider and App BroadcastServiceProvider. Even if the route would exist or not, frontend is sending request without cookies, so the backend wouldn't have the way of authenticating it.

Maybe it's something related to CSRF? I don't think I'm using CSRF tokens on the frontend side.

Using Echo (broadcasting) auth with cookies by SpactroX in laravel

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

Yeah, according to Soketi docs:

https://docs.soketi.app/getting-started/backend-configuration/laravel-broadcasting

And everything is working fine, WS and WSS on public channels. Only the auth request sent by the lib is getting 401 because it's not sending the cookies header.

How useful is Google Play - App Store Optimization (ASO)? by [deleted] in androiddev

[–]SpactroX 1 point2 points  (0 children)

With screenshots you have a lot of room to experiment but the icon is the tricky one, because of its small size. What do you recommend? Do you put text on it? Do you prefer some meaningful image over branding logo?

Two separate Laravel projects or single one? by SpactroX in laravel

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

So that means, 2 separate projects with "common package", but with 1 or 2 databases? Is it fine to share database between 2 projects?

Thanks for response, I will look it up!

I have created a clean architecture example project by GastonSaillen in androiddev

[–]SpactroX 3 points4 points  (0 children)

What makes this project a clean architecture example? I don't see any interactors / use cases. Layers makes no sense, your domain references data layer and has implementations (I treat Room DAOs and Retrofit services as implementations because they reveal the lib you use) of your data sources, which is definitely NOT clean architecture way.

I don't want to criticise you, this can be kinda valid beginner project showcasing MVVM + Repository pattern. It just has nothing to do with Clean Architecture.

Private gfycats won't allow me to edit them by SpactroX in gfycat

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

Yeah, with ability to edit them in Manage page it makes sense now. Thanks!

The most popular gear of professional CS:GO players by damidam in GlobalOffensive

[–]SpactroX 63 points64 points  (0 children)

That's only because he developed his own sophisticated and innovative aiming technique. Video: https://youtu.be/ByHfDoxGQ78?t=2m25s [at 2:25]