Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
No, but that's only because I have so little respect for "tech journalism" that I can be bothered to pay attention.
-
@IntrusionCM
"Some tribal knowledge from another system makes this check necessary."
I can't believe anyone enjoys that language. Just the sheer verbosity of what should be a Mailer(Strategy)(Record) slays me. Java or C# that whole expression would just be a builder or deconstruction pattern. -
@SortOfTested
Fluent Interfaces are no problem at all...
The thing that really pisses me off - and this is true for any language - that you should _never_ take input from a request and stuff it in "somewhere".
If done properly... That would be an DTO.
And that DTO would be passed to an service.
And that service would _exactly_ like you said use an pattern to send the mail via the _internal_ mailing library, which is completely hidden for the user of the service.
I really want to spank people with hot frying iron pans who take this as an screenshot because it's so utter poor garbage code that shouldn't even exist.
🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬 -
@IntrusionCM
It's not fluent though, it's
Declare object;
Mutate;
Mutate;
Mutate;
Mutate;
Mutate;
Do; -
@SortOfTested yes.
I'm aware of that. And that's exactly why I hate this code. XD
I think we mean the same thing.
For me, the above code is utterly broken garbage which shouldn't exist.
I meant that you could use fluent interfaces ____if done properly_____
Related Rants
Doesn't it happen to you that you examine too much stock code photos?
"'new Mail()'? Now I want to know what library that is."
(It was just an example, it is probably just a masked PHPMailer)
random
mail
php
stock code
stock photo