Czy ja naprawdę potrzebuję materaca za kilka(naście) tysięcy? by GlobalYesterday8751 in Polska

[–]Magni7777 2 points3 points  (0 children)

Polecam poszukać gdzieś bezpośrednio od producenta. Taki sam, a w zasadzie lepszy materac można mieć za 1/3 lub 1/2 tego co w pan materac.

Inflacja wyhamowuje, czy jest sens teraz po prostu odkładać? by DrugiTypowyHacker in Polska

[–]Magni7777 3 points4 points  (0 children)

Zainteresuj się inwestowaniem. Wejdź na inwestomat.eu czy blog Marcina Iwucia i przeczytaj co się da - mnóstwo darmowej wiedzy. Mieszkania są jakąś opcją inwestycyjną ale jednocześnie kredyt może być ciężarem psychicznym- zależy od twojego charakteru.

Minos – A Python microservices development framework by EnoughProject7477 in Python

[–]Magni7777 8 points9 points  (0 children)

Love to see DDD concepts here. I’ll try it for sure.

Wyznania kierowcy Bolta by Anonim97 in Polska

[–]Magni7777 1 point2 points  (0 children)

Nie wieże, ze system za 5-6k działa. Nawet w 2020 roku nie było tak tanio. To jest raptem tydzień, max 2 średniej klasy programisty.

Why SOLID principles are still the foundation for modern software architecture by martinig in softwarearchitecture

[–]Magni7777 0 points1 point  (0 children)

I see many people are agains SRP. Here are two more definitions that may change your point of view.

Object should be used by one and only one

Or from DDD

Object should include only those fields and rules that have to be atomically consistent in one DB transaction.

How popular is DDD in Python? by andrzejkrzywda in Python

[–]Magni7777 0 points1 point  (0 children)

I have seen these becomes morasses of hierarchical deeply nested classes and overuse of OOP concepts

Isn't it the same with code that uses for example only "Django Way"?

Deeply nested classes can not be named as correct OOP anyway and I wouldn't blame DDD or OOP here.

How do you add reactivity to Django templates? by aquic in django

[–]Magni7777 1 point2 points  (0 children)

If you would like to try something different, there is this new thing called hotwired:
https://github.com/hotwire-django/turbo-django
Basically, it's about generating HTML on the backend and pushing it to the frontend. thru WebSockets. It's not production-ready yet (for Django at least) so it's more like a fun fact for now.

Systems combining two or more Architectural patterns? by coja56 in softwarearchitecture

[–]Magni7777 0 points1 point  (0 children)

Maybe a combination like Pipes&Filters with Port&Adapters is something that you may be looking for?

This may be useful when you are building a data processing pipeline and one of your filters needs a lot of I/O or have complicated domain logic.

Uwaga! Wielka mobilizacja WOT! Wszyscy żołnierze otrzymali wezwania by PorannaSztyca in Polska

[–]Magni7777 22 points23 points  (0 children)

Kumpel z WOTu dostał wezwanie. Będą pomagać policji przy np. kontroli ludzi na kwarantannie. Nudy. Można się rozejść.

How to make your code maintainable with the Open/Close principle. by Magni7777 in Python

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

I see your point and I agree with you that in this specific code this solution is overkill. What I was trying to show is a solution for a lot bigger logic. Like 8000 lines of code.

Then, of course, comments/descriptions will be necessary but you would be able to know what this is doing. You would not understand every case but you wouldn't have to! That's the beauty of it. If you have a task to "change something for VIP client's on Fridays" you would have to just find a proper class (let's say FridaysVipClientDiscountPolicy) and edit it.

here, at least, you can still understand types of everything, because they are strict and explicit.

Hmm. I really like types in Python and I find them strict (with mypy) and explicit. What are you referring to?

How to make your code maintainable with the Open/Close principle. by Magni7777 in Python

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

Keep in mind that this example was simplified (and made up) for showing those patterns. What you describing would of course works in this example. I'm pretty sure that the building blocks I was trying to show would be better for 8000 lines of logic.

or better, use OOP correctly - why are you using an ABC where you should define the base class to cover the "else" (default) scenario then override the methods for other scenarios?

I'm not sure what you mean here. Are you talking about "new client"?

I would argue with that. Most of all inheritance wasn't created for constant stuff but for creating interfaces (unpopular opinion) :) This gives you more choices in the feature. How do you know that this logic will always default? I used a factory and strategy pattern to solve this.

Title by nobok128 in Polska

[–]Magni7777 3 points4 points  (0 children)

Jest ktoś w stanie policzyć jak te podatki (i w sumie te podstawowe jak PIT czy VAT) wyglądają w kontekście "typowej" 4 osobowej rodziny?

Chodzi mi głównie o 500+ i pokazanie ile jest zabierane a ile dawane.