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.
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
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
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.
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Ā  #ģ¹“ģ“