Mollyycolllinss Categories For later read
7 days
30 days
All time
Recent
Popular
Have you ever worked with pipelines in Laravel?!
Probably you have heard it while having an interview?
It has lots of use cases and one of its usage is middleware implementation in its kernel.
I'm going to write about pipelines and its design pattern.
thread š§µ
1/8
First of all Pipelines in Laravel are implemented based on chain of responsibility design pattern.
In chain of responsibility which is a behavioral design pattern we pass data to receivers and this receivers implement a specific interface that has a handler method.
2/8
Handler methods may deal with the passed argument and pass it to the next handler.
read more about the design pattern here :
https://t.co/XrJKXecyTv
Let's go for the main part :
3/8
Imagine we want to implement a twitter bot that gets some tweets around the trends and filter the words that we don't wanna show finally send as a new tweet from our bot.
About the filtering part, if it was me, I would implement it with pipelines.
Why?!
4/8
Currently I know exactly what words should be filtered but what about the future?! What if I want to add more filters, I will have to modify the source code and add more switch, if else statements, etc.
I want my code to be robust and maintainable keeping SOLID principles.
Probably you have heard it while having an interview?
It has lots of use cases and one of its usage is middleware implementation in its kernel.
I'm going to write about pipelines and its design pattern.
thread š§µ
1/8
First of all Pipelines in Laravel are implemented based on chain of responsibility design pattern.
In chain of responsibility which is a behavioral design pattern we pass data to receivers and this receivers implement a specific interface that has a handler method.
2/8
Handler methods may deal with the passed argument and pass it to the next handler.
read more about the design pattern here :
https://t.co/XrJKXecyTv
Let's go for the main part :
3/8
Imagine we want to implement a twitter bot that gets some tweets around the trends and filter the words that we don't wanna show finally send as a new tweet from our bot.
About the filtering part, if it was me, I would implement it with pipelines.
Why?!
4/8
Currently I know exactly what words should be filtered but what about the future?! What if I want to add more filters, I will have to modify the source code and add more switch, if else statements, etc.
I want my code to be robust and maintainable keeping SOLID principles.
Thanks for tagging me, @BartMLL.
I basically never use FB, but I'm on my (very old) laptop today.
Let's get some screen shots.
"Today I decided to head up the Oldman to see what the coal companies have been getting up to. I forgot, however, that the forestry trunk road is closed at Dutch Creek each winter, ostensibly for wildlife protection. So I parked at the locked gate and started hiking."
#ableg
"Newly gouged test pit for coal wayyyy up on the mountain ridge. Note coal dust deposited downwind on the snow."
#ableg #DefendABParks
#FiretheUCP
"Same ridge, for scale. That whole mountain is meant to disappear, if Atrum gets the okay to mine this lease. Which they will if the UCP stay in charge of things. The new exploration pit is on the right. The rest of their work is out of sight from this angle."
#ableg #FiretheUCP
"The moose shared my opinion, evidently."
#ableg #DefendABParks
#WaterNotCoal #NoToCoalAB
I basically never use FB, but I'm on my (very old) laptop today.
Let's get some screen shots.
https://t.co/FHWkaHrqUj @youseepeeYYC @Dave_Khan @RachelNotley - They already started
— Bart (@BartMLL) January 17, 2021
"Today I decided to head up the Oldman to see what the coal companies have been getting up to. I forgot, however, that the forestry trunk road is closed at Dutch Creek each winter, ostensibly for wildlife protection. So I parked at the locked gate and started hiking."
#ableg

"Newly gouged test pit for coal wayyyy up on the mountain ridge. Note coal dust deposited downwind on the snow."
#ableg #DefendABParks
#FiretheUCP

"Same ridge, for scale. That whole mountain is meant to disappear, if Atrum gets the okay to mine this lease. Which they will if the UCP stay in charge of things. The new exploration pit is on the right. The rest of their work is out of sight from this angle."
#ableg #FiretheUCP

"The moose shared my opinion, evidently."
#ableg #DefendABParks
#WaterNotCoal #NoToCoalAB

1/ What is Right Privilege? Walking around so embedded in your own delusion that you know:
- If you shout "law & order" loud enough, the law is what you say it is
- Cops are on your side, before they're enemies
- The hotel bar is relaxing after the insurrection
#rightprivilege
2/ You know:
- Society blowback for your terrorism is just more repression
- Socialism is hell, but tech platforms should be socialized
- Supporting others' needs is just socialism
- But California subsidizing Oklahoma is federalism
#rightprivilege
3/ You know:
- You're ultra-conservative, so stoking civil war isn't radical
- Camo Chic is cool
- No-Fly Lists only apply to brown people who speak Arabic
- Violence will secure your cause by taking back what's yours
- Terrorists can't be white
#rightprivilege
4/ You know:
- Too much about what you think are your rights from society
- Too little about your responsibilities to society
- A lot about a vague specter of socialism you're afraid of, but can't name any specific ways you've ever been truly oppressed
#rightprivilege
5/ You know:
- A strongman can save you if everyone just give him enough power
- Weakness makes you look like a lib
- Kap dishonors the American flag, but a Trump and confederate flag in the Capitol doesn't
#rightprivilege
- If you shout "law & order" loud enough, the law is what you say it is
- Cops are on your side, before they're enemies
- The hotel bar is relaxing after the insurrection
#rightprivilege
I'm inviting a new term for this:
— Robb Smith (@RobbSmith) January 11, 2021
Right Privilege.#rightprivilege
2/ You know:
- Society blowback for your terrorism is just more repression
- Socialism is hell, but tech platforms should be socialized
- Supporting others' needs is just socialism
- But California subsidizing Oklahoma is federalism
#rightprivilege
3/ You know:
- You're ultra-conservative, so stoking civil war isn't radical
- Camo Chic is cool
- No-Fly Lists only apply to brown people who speak Arabic
- Violence will secure your cause by taking back what's yours
- Terrorists can't be white
#rightprivilege
4/ You know:
- Too much about what you think are your rights from society
- Too little about your responsibilities to society
- A lot about a vague specter of socialism you're afraid of, but can't name any specific ways you've ever been truly oppressed
#rightprivilege
5/ You know:
- A strongman can save you if everyone just give him enough power
- Weakness makes you look like a lib
- Kap dishonors the American flag, but a Trump and confederate flag in the Capitol doesn't
#rightprivilege
In anticipation of the AZ contract publication, a quick walk through of the vaccine contract we do have (which may be different, though I doubt it) and why the Commission's argument is disgraceful
The relevant obligations of the contractor (AZ) are in 1.3 and 1.71.
Those obligations are in three stages.
/2
First two
They must make reasonable best efforts
1. to obtain EU athorisation
2. to manufacture once authorisation granted
/3
Once those are satisfied THEN the contractor must deliver according to the estimated schedule (which may be adjusted for delay).
/4
The Commission's argument is that once the authorise (today!) the first two stages are satisfied. And the strict duty to deliver kicks in.
(see @vonderleyen interview in German here
https://t.co/i3Z7nQuLnE )
/5
The relevant obligations of the contractor (AZ) are in 1.3 and 1.71.
Those obligations are in three stages.
/2
First two
They must make reasonable best efforts
1. to obtain EU athorisation
2. to manufacture once authorisation granted
/3
Once those are satisfied THEN the contractor must deliver according to the estimated schedule (which may be adjusted for delay).
/4
The Commission's argument is that once the authorise (today!) the first two stages are satisfied. And the strict duty to deliver kicks in.
(see @vonderleyen interview in German here
https://t.co/i3Z7nQuLnE )
/5
I've had a lot of positive comments on this theory, and some helpful challenges. The most common of which was: surely a single-day effect wouldn't be big enough to cause the 'twist' in the data that we're seeing in those age groups? So I set out to find out if it was (thread)
This is one of those university / job interview 'order of magnitude' estimation problems. So feel free to disagree with any or all steps on my logic chain, and please explain why - it will help improve / refine (or falsify) the analysis.
So let's focus on the primary-school-age kids as that's where the effect is strongest. We have 3.5m 5-9 year-olds in England. I don't know how many were in school on 4th Jan - we know some regions (London / Kent etc.) didn't go back, and a lot of schools had INSET days etc
So I'm going to make a wild guess and say 40% were in school on that day. Better ideas (particularly if backed by data) very welcome. So that's about 1.4m children in school
Now ONS tells us that about 1.5% of that age group would test positive for coronavirus in early January. So that's about 20,000 kids with the virus heading into school.
So I have a theory on this. And if I'm right, there's bad news about that acceleration in the overall case trend, and possibly good news about vaccines in the over-80s. WARNING: This is going to be another long, maths-y thread (involving cubic coefficients this time!) https://t.co/EiszSAIL9t
— James Ward (@JamesWard73) January 29, 2021
This is one of those university / job interview 'order of magnitude' estimation problems. So feel free to disagree with any or all steps on my logic chain, and please explain why - it will help improve / refine (or falsify) the analysis.
So let's focus on the primary-school-age kids as that's where the effect is strongest. We have 3.5m 5-9 year-olds in England. I don't know how many were in school on 4th Jan - we know some regions (London / Kent etc.) didn't go back, and a lot of schools had INSET days etc
So I'm going to make a wild guess and say 40% were in school on that day. Better ideas (particularly if backed by data) very welcome. So that's about 1.4m children in school
Now ONS tells us that about 1.5% of that age group would test positive for coronavirus in early January. So that's about 20,000 kids with the virus heading into school.
280121 #KAI SM Super Idol League Huya Broadcast Real-Time Trans by EXOUpdates_Subs š»ā¤ļø
@weareoneEXO #EXO #칓ģ“
started the thread since they started the bc~ link is: https://t.co/1Cq8MgZgzU⦠āŗļø
Todayās BC title is āKAI starlight and me are going to accompany you left and rightā
Kai: Yay~ This the 2nd bc of SIL! Hello everyone I am KAI! Letās put on some hand sanitiser~ How has everyone been during the past 1 week? (For me,) Iāve grown less nervous in playing, itās alr the 2nd season! ... Today I must win, and say āgongxiā!
@weareoneEXO #EXOĀ #칓ģ“
Kai: Last bc I always wished others gongxi, this bc i must wish myself gongxi as well~ Hm, how do we play this bc? Letās look at the comments!
@weareoneEXO #EXOĀ #칓ģ“
@weareoneEXO #EXO #칓ģ“
started the thread since they started the bc~ link is: https://t.co/1Cq8MgZgzU⦠āŗļø
Todayās BC title is āKAI starlight and me are going to accompany you left and rightā

Kai: Yay~ This the 2nd bc of SIL! Hello everyone I am KAI! Letās put on some hand sanitiser~ How has everyone been during the past 1 week? (For me,) Iāve grown less nervous in playing, itās alr the 2nd season! ... Today I must win, and say āgongxiā!
@weareoneEXO #EXOĀ #칓ģ“
Kai: Last bc I always wished others gongxi, this bc i must wish myself gongxi as well~ Hm, how do we play this bc? Letās look at the comments!
@weareoneEXO #EXOĀ #칓ģ“