AboutI hate everyone and everything. But, above all, I hate Laravel.
Joined devRant on 3/12/2019
Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
I was wondering why my tutor needs a whole ass week to accept my MR.
Today he rejected one, so I got a chance to look at whatever he's doing.
He's checking line by line every single test I make and creates a variable for each dumb thing.
𝘦𝘹𝘱𝘦𝘤𝘵(𝘴𝘰𝘮𝘦𝘵𝘩𝘪𝘯𝘨.𝘪𝘥).𝘵𝘰𝘚𝘵𝘳𝘪𝘤𝘵𝘌𝘲𝘶𝘢𝘭(𝘴𝘰𝘮𝘦𝘖𝘵𝘩𝘦𝘳𝘛𝘩𝘪𝘯𝘨.𝘪𝘥)? No, this is bullshit.
𝘤𝘰𝘯𝘴𝘵 𝘴𝘰𝘮𝘦𝘵𝘩𝘪𝘯𝘨𝘐𝘋 = 𝘴𝘰𝘮𝘦𝘵𝘩𝘪𝘯𝘨.𝘪𝘥
𝘤𝘰𝘯𝘴𝘵 𝘴𝘰𝘮𝘦𝘖𝘵𝘩𝘦𝘳𝘛𝘩𝘪𝘯𝘨.𝘪𝘥 = 𝘴𝘰𝘮𝘦𝘖𝘵𝘩𝘦𝘳𝘛𝘩𝘪𝘯𝘨.𝘪𝘥
I don't even know why you would take a week to accept a merge request when all you're doing is creating variables for things you use only once. I'm not even mad, I'm not ranting, I just need to know why would you do such a thing17
> Some unit test is not behaving well in my local environment
> Weird, I should print the response from the server, maybe the client isn't receiving what I think it's receiving
> see this
SAY SIKE RIGHT NOW9
Starting to work with merge requests, unit testing, a shitload of different environments, Docker, Jira and stuff like that can be overwhelming for the first time, but it sure feels good to finally sit in the table with the big boys1
Interview for a new job
Team leader: well yes, we have this webapp with Angular, it's a bit convoluted so we need help working on it
Me: sounds good enough, I have no experience with Angular though, I'll need to learn on the road
Team leader: no worries :)
A couple of weeks later, after joining the team
Me: wait a moment, that's not Angular you got there. That's AngularJS, it's like 10 years old
Team leader: 😊
Aaaaand my team leader once again worked directly on the DB without touching the code, so I can't reproduce his local DB on my machine.
One poor pepega like me will spend days optimizing a web app, reducing the bundle size, reusing components as much as possible to save space, carefully choosing the right libraries for the right jobs and doing some careful tayloring to bring them in line with your needs, choosing the right webpack plugins to compile everything exactly like you want and keeping track of every dependency to make sure nothing unwanted makes its way to the final product, caching results to avoid any unnecessary call to the server, then some random team leader randomly forces you to drop in jquery-era plugins just because they look nice and won't listen to a word you're saying.
I KNOW WHAT THE FUCK IS A SWEET ALERT; I DIDN'T USE IT FOR A FUCKING REASON.2
Me vs my other personalities trying to figure out why we wrote whatever this thing is even supposed to be8
I need to quickly test how my web app works on mobile
PROBLEM: some of my features require https. I can test from my pc on localhost just fine, since localhost works.
From Android, however, those features are blocked, since I reach my webapp with my IP address; it is not localhost so Chrome raises a middle finger when I try to access the camera from an unsecured website -and rightly so.
I really need to get these tests done, how am I supposed to do?
I install an SSL certificate on my pc?!?
I disable Chrome security checks on my Android?!? (is that even possible?)
I install bluestacks real quick and hope everything works fine?!?
I wasn't even interested in badges and regular working hour until our HR made us use an Android app to stamp the badge.
IDGAF, I will break it. That's a promise.5
The intern: FUUUUCK, WHY ISN'T MY CODE WORKING?
Me: Lemme check real quick... ok, that's a null pointer exception.
The intern: Again? Man, I'm growing desperate. How do I stop making these errors?
My dumb ass with my 4 years coding experience, who encountered a nullpointerexception literally 5 minutes earlier: """"°-°""""11
My teamleader blabbering about how I shouldn't listen to late shows with my earbuds while I work is rubbing me the wrong way.
"How can you focus while listening to them hurr durr", as if we didn't all do 20 tasks at once on a daily basis anyway.7
If I see one more Laravel dev I'mma commit a war crime
If I see one more Laravel dev dropping env(something) around the code I'mma commit _SEVERAL_ war crimes
Remember kids: you don't work with Laravel. If you do (you don't, but let's assume), ENV IS USED ONLY IN CONFIGURATION FILES, OR LARAVEL CACHING SYSTEM FUCKING BREAKS. Ok?11
> Mister IHateForALiving, we need a new table on the website do to thing
No biggie, we know there's a datatable plugin somewhere.
> No, you can't use that, it doesn't have pagination
Oh, right. I also see here it was last updated 4 years ago, it's kinda shit too, it's like the inbred cousin of a real datatable. Ok, how did you tackle the thing until now?
> There's a script template somewhere in the page, we iterate over that to create our tables
Ok, but I'll have to write some logic for that, how much time do I have?
> I want this to be online by this evening
Can't be done, what if we used a normal datatable like normal people?
> No, it looks too different from the real site
How am I supposed to manage the thing then?
> IDK, just reload the page every time
And here we are, triggering a full page reload on an already bloated Laravel app (something like 600-800ms) for 20 lines of json. Great idea mister team leader, but consider the following: fuck you and your bastard lineage.4
I'm using the @use directive to avoid bundling the same thing a hundred thousand times.
Sass doesn't give a flying fuck and bundles the same thing a hundred thousand times
Why you must hurt me like this5
But what did Webpack do to my named capture groups?4
Hurr durr master-slave is racist blacklist is racist robot is racist ('cause in some language it apparently means "slave"...?)
just let me coode ffs8
> mmmmh this old code I wrote for my previous job could be handy now, lemme just git pull the thing real quick
> clone the repository in my new pc
> can't deploy because I intentionally didn't commit any of my old credentials, no env files other than the example, and everything is smooth clean to prevent some dumb fuck like me from just grabbing the project and do whatever
There's an old IHateForALiving giving me the middle finger.
> Laravel lets you create migrations to manage the state of the DB
> your colleague doesn't give a flying fuck, just raw SQL on the db to perform every change
> performed initial insertions without seeders, can't reproduce his db on my local environment
> can't even run migrations anymore 'cause it would break everything7
> new job, receive new pc
> everything looks cool, but they didn't go with Windows's setup
> it pops up now
> whatever, let's make windows happy
> No I don't want Edge
> No I don't want Office
> No I don't want OneDrive
> Windows move everything inside onedrive folder anyway
> have a heart attack when all of my fucking codebase disappeared
Luckily it was just moved (didn't know where, though), but wtf Windows, if I wanted to deal with these antics I'd buy Apple. I'm sticking with Windows precisely to avoid these strange unmotivamed fuckeries, why are you doing this to me12
Laravel being easy to use is far from a strong point. "Easy to use" is a cool thing for pro developers who know what's going on under the hood and don't wanna write the same thing a hundred times.
It should translate into good developers being able to work immediately, not in bad developers getting away with whatever without getting even a slight warning just because the framework itself accepts whatever weird crap you can come up with while you're training.
But that's what it became: a free for all for every noob out there. You find yourself working with a slow application (and by "slow" I mean "slow even by Laravel's standards", which are fairly low), and as soon as you look what's going on you find someone decided to load a hundred thousand middlewares, queries optimized like ass on top of Eloquent, and the whole application breaks as soon as you just run config:cache to try speeding it up a little bit, because env-ing your way out of whatever problem is so quick. Easy to use needs to be there for pro developers; give such a tool to a newbie, you end up with a maintenance nightmare3
LARAVEL MEME OF THE DAY
If 60> requests are sent in a short amount of time (and you have Laravel Passport installed) you will not receive an IlluminateResponse instance anymore; you will instead receive a slightly different SymfonyResponse.
Why? For the glory of Satan, of course.
If your code doesn't account for that undocumented garbage, your code will start throwing middle fingers here and there.
Tell me again the productivity joke with Laravel, I've just lost an hour and a half 'cause unit tests were failing and I had no idea why.6
DAILY LARAVEL PROBLEMS
I need to parse a JWT with some custom claims. There's a JWT library with Laravel; documentation really lacking, kinda hardcoded to work with Laravel but whatever; it's already installed, let's see what can I do with it.
It turns out I can't say something like "take this token, parse it, tell me it's valid". Let's see how that goes.
You need to build a parsing class with a manager, some auth stuff, a parser.
To build said manager you need a provider that implements a contract, a blacklist, a factory (of what?)
To build the factory (of what?) you need a claim factory and a payload validator
To build the claim factory you need a request
To build the blacklist you need a Storage
To build the storage you need a CacheContract
To build a CacheContract you need IDK it's a mess
To build the contract you need... IDK for real
WHY LARAVEL IS SHIT: 'cause only in this framework it seems reasonable to build this clusterfuck to parse a base64 encoded string, throw some json_decode and check a signature. And have it work only to authenticate a user.1