Readit News logoReadit News
F-W-M commented on Demystifying decorators: They don't need to be cryptic   thepythoncodingstack.com/... · Posted by u/rbanffy
maleldil · 4 months ago
This is about Python decorators: https://docs.python.org/3/glossary.html#term-decorator. In summary, they are functions that return functions, which allow you to wrap their behaviour (e.g. add a cache, transform a function into an HTTP API handler, etc.)

As far as I can tell, they're not related to the design pattern, but I never had to use that.

F-W-M · 4 months ago
They implement the design pattern.
F-W-M commented on Universal basic income: German experiment bring surprising results   ctvnews.ca/lifestyle/arti... · Posted by u/janandonly
jasonsb · 5 months ago
Yeah, I'm really surprised how useless this study is. They just gave some money away and that's the end of it. That being said, I do think that it's really hard (if not impossible) to simulate how UBI would work in the real world.
F-W-M · 5 months ago
It's not useless in promoting UBI given the uncritical news coverage in Germany.
F-W-M commented on The Frontend Treadmill   polotek.net/posts/the-fro... · Posted by u/Kerrick
folago · 5 months ago
Maybe hire BE devs and use htmx.
F-W-M · 5 months ago
Doesn't help. I just cannot center that div or make it look pretty.
F-W-M commented on Tech terms I was pronouncing wrong   wonger.dev/posts/pronunci... · Posted by u/twapi
delichon · 5 months ago
Idempotent anyone? Eye-dempotent or id-empotent?
F-W-M · 5 months ago
I'd say it's e-dem-po-tent. Not eye, but eagle.
F-W-M commented on Breaking Up with On-Call   reflector.dev/articles/br... · Posted by u/0xlosh
F-W-M · 6 months ago
I am on-call for a week every ~8 weeks. I get 500 € and two additional days of vacation for it. If I do get a call, the additional hours go to my time account.

Fair deal, I'd say. Only problem is that most of the applications are from vendors, so getting problems fixed is an ordeal.

F-W-M commented on But how to get to that European cloud?   berthub.eu/articles/posts... · Posted by u/zdw
elric · 6 months ago
I've done quite a bit of government contracting for governments in Europe, including various government levels in Belgium and the EU itself. Every single time, I encountered a lot of friction regarding hosting. The applications were always hosted by a partner [1] that won a large public tender, usually by virtue of supposedly being the cheapest. Those hosting partners were invariably awful and incompetent. Simple tasks would take weeks. Complex tasks wouldn't happen at all. There was enough red tape to go to the moon and back.

Every project I worked on, developers (consultants like me) advocated for finding a way of bypassing the hosting partner, and either doing their thing on top of platforms like Hetzner, or switching to AWS/Azure. Not because they particularly love AWS, but because the default hosting solution sucks so much arse.

I can totally see EU cloud infrastructure working for the public sector, but ONLY if they come with the same level of self-service management as the big cloud providers. Without that, it's a non-starter.

[1] One of those is a large French company on the verge of banruptcy.

F-W-M · 6 months ago
I have been working for large European utilities and even within AWS/Azure deploying something takes weeks.
F-W-M commented on Zelensky leaves White House after angry meeting   bbc.com/news/live/c625ex2... · Posted by u/yakkomajuri
etc-hosts · 6 months ago
I hate being that guy sometimes but US Marines use donkeys.

https://www.marines.mil/News/News-Display/Article/500002/mar...

F-W-M · 6 months ago
Wehrmacht was mostly supplied by horses.
F-W-M commented on Why I don't do Domain Driven Design (2018)   tonymarston.net/php-mysql... · Posted by u/lr0
rockyj · 8 months ago
This article provides a lot of validation from my own experience. I was always weary of DDD fanatics, I always thought I was not bright enough to understand statements like -

- In domain-driven design, the Domain layer is one of the common layers in an object-oriented multi-layered architecture.

- DDD is against the idea of having a single unified model; instead it divides a large system into bounded contexts, each of which have their own model.

I do not know what these mean and I have found no real good explanations. In my 20+ years of experience I have not seen any problem which is solved elegantly with DDD based development and/or CQRS etc.

My simple rule of new tech / random things such is these is - what is the adoption rate and what are the major success stories. With technologies like RoR, React, Spring Boot, Kotlin etc. it is easy to see the reason for their adoption and success. I have heard no such stories for DDD. In fact, I have found the developers which advocate these have been the hardest to work with (rich on theory and opinion and poor in actual written software).

F-W-M · 8 months ago
> DDD is against the idea of having a single unified model; instead it divides a large system into bounded contexts, each of which have their own model.

If you have a large system it makes sense to divide it into smaller independent pieces. If you have a (micro)-service architecture you have distinct services, in a monolith you might have modules.

It is a hard problem to know where exactly the boundaries between services or modules should be, in any case DDD calls the things that make sense to decouple bounded contexts.

F-W-M commented on Cognitive load is what matters   minds.md/zakirullin/cogni... · Posted by u/zdw
lr4444lr · 8 months ago
If the variables were clearly named, I wouldn't have to read much at all, unless I was interested in the details. I reitrate: why does the length of the single function with no reuse matter?
F-W-M · 8 months ago
It does not matter if function foo is reused, only if the code inside foo that is to be pulled into new function bar is.
F-W-M commented on Cognitive load is what matters   minds.md/zakirullin/cogni... · Posted by u/zdw
runevault · 8 months ago
For me it depends. Sometimes I find value in making a function for a block of work I can give its own name to, because that can make the flow more obvious when looking at what the function does at a high level. But arbitrarily breaking up a function just because is silly and pointless.
F-W-M · 8 months ago
Define that function directly in the place where it is used (e.g. as a lambda, if nesting of function definitions is not allowed). Keeps the locality and makes it obvious that you could just have put a comment instead.

u/F-W-M

KarmaCake day93December 16, 2022View Original