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
Search - "should i sleep instead?"
-
The programmer and the interns part 2.
We will discuss numerous events that happened over the past week or so.
Case 0:
We had our weekly engineering meeting. The interns were invited as well.
We hold meetings in the generic, big, corporate meeting rooms with a huge table in the middle.
There were more than enough chairs for everyone yet the most motivated and awkward intern (let's call him Simon) chose to stand, cause "it's cool man, I always stand". At this point we all know that he probably read about Agile stand up meetings and is confusing it with this one. Otherwise he's simply trying to stand out from the rest. (See what I did there?)
Anyway the meeting has started way later than planned (what a surprise) and took much longer than Simon expected. Everybody is sitting and listening to the CTO while occasionally glancing at the weird looking intern standing awkwardly and refusing to sit because it would make his original intentions pointless. He even tried to nod whith a serious face and his hands crossed when the CTO said something and looked at his general direction. The meeting was about a hour and a half long but with the delay it was at least 2.5 hours.
At the end Simon was so exhausted that he fell asleep on the office puff, was forgotten and locked inside. 3 hours later when I was home I received a call from him with his sleepy-trying-to-sound-awake voice telling the news. Lucky there's a 24/7 Noc team that could rescue him.
Case 1:
An intern who was late on his Linux test connected to every test VM (should I remind you that each one has a personal VM but they share passwords for their roots?) and tried to reset it with "sleep 10s; shutdown -h now".
He took down all 13 of those so I had to turn them on and switch passwords again.
Case 2:
One of the interns didn't do any of his training chores. Apparently he forgot what he was told to use, ignored all online documentation and used Windows CMD with Linux commands for almost a week already.
Case 3:
Simon uses Vim to write all text possible. Even mails, he then selects all and copies into the mail body. He spent half a day on a homework task I gave them. He wrote everything inside one text file using Vim. When he was done he saved the file and quit the editor. He then said "Oh shit! I've forgot to sign my name!". I explicitly told him that theres absolutely no need for that because I see which mail the file was sent from. He said "I don't even need a program for that!" and gave a couple of strokes on the keyboard.
Later I received an email from him with a .txt attachment. When I opened it the only text that was inside was "by Simon ;)".
I logged to his machine and checked the last command ran on the file:
echo "by Simon ;)" > linuxtasks.txt
Case 4:
The girl here uses a MacBook. She keeps getting confused with the terminal windows and rebooting her own machine instead of the remote VM.
Case 5:
Haven't checked yet how this happened but one of the interns deleted the gui from his local Centos.33 -
Me : The website renewal bill is up and it will due in 30 days
Client : Sleep
Me : 14 days
Client : Sleep
Me : 7 days
Client : Sleep
Me : Last notice, it'll be dead tommorow if we dont pay today
Client : Sleep
*website dies*
Me : F
Client the day after suspension : Hey, we can't access the site.
Me : Play dead
***
I think i should say "email service will die if you don't pay the renewal bill" instead
based on how quick they react when shit stopped working8 -
The state of the web in 2020:
discussion sites as a medium are dying. chalk that up to censorship.
reddit is an echochamber. twitter is mostly a marketing platform disguised as (anti)social media. instagram is a self promotion/wannabe eceleb site, and youtube is the new hollywood..quickly becoming irrelevant.
facebook is where I (dont) go to (totally not) ignore all the people important to me.
and email is where I go to send letters bordering on hatespeech to my various local and federal "representatives", in between borderline cyberbullying people stupid enough not to automate their spam marketing in 2020. or talking to left/right self-help grifters about the state of society.
in the grim dark future of 2020, the last bastion of intelligent conversation, free speech, and civility, the one shining icon of hope in a dark world..
is the comment section of pornhub videos where a women got stuck under a bed for the 50,000th time. And all I can think is "wow I never knew how easy it was to get trapped under a bed. They should look into fixing this safety hazard."
newsmedia has jumped so many sharks, the fonz now spins in his grave so fast we could hook him up to a generator. meanwhile people hide in their homes for a disease so deadly you have to be tested to know if you even have it.
while ever more car commercials
are released, set to somber but hopeful piano music to the tune of "in this time of social distancing its important to stay close even when we're apart."
Im beginning to think media has become a poison on society, both television and the internet, and like an ersatz cargo cultist worshipping the great-charles- manson-in-the-sky we should all take a page from the unabomber and smash our televisions with hammers before going outside and sawing down the telephone polls.
I jest of course. But there is no denying the inherent appeal of moving from the unsettling uncertainty of complex societies, driven by expertly manipulated fear cycles, to the beatitude-esque simplicty of pastoral protestant style living, sans witch burning and shoe buckles.
And against the reckoning of utopians who are still fresh from the womb as it were, wet behind the ears and smelling of their mother's pussy, I reject the notion that "up" is a synonym for "forward."
Were it the case, every drinking binge, followed by throwing up, would bring us, with each vomitting, one step closer to heaven. Rather the state of affairs is what it is, and what it is, like most of nature, is a cruel master and a harsh teacher. And while we may binge on digital delusions of grandeur and a greater society, rest easy in the nihilistic and sobering thought that we are little more than 200,000 year old cave men wielding magic bricks, and atomic bombs.
..where water flows more readily from metal tubes in our houses than it does from the nile. where food comes to our door at little more than our beck and call.
where we may bath, and sleep, and *shit*, cleanly, comfortably, and safely, wrapped in the (failing) bubble of delusion we all tenaciously grasp collectively, the thing we call "civilization".
an empire of needful things, wanton and fragile.
if we have not gone mad from boredom, I have no doubt we one day will.
it becomes more and more obvious to me every day, had war never existed, it would have been necessary for man to invent it just to have something to do, that didnt include farming, fucking, or building.
And so enters "political idealogy."
How would we ever have enemies if we were allowed to speak our piece instead of being given the means (and reflex dogwhistle training) to silence and destroy one another?
give a man a gun, he'll rob a bank. give a man a bank, he'll rob the world.
give him a media empire or a tech platform, and he'll lie about the theft and convince one half of millions of lemmings to hate all the other lemmings.11 -
*plays game for 10h consecutive*
.. yeah yeah I know what you're thinking. This guy doesn't have a life. And you're probably right.
*gets hungry*
… I could really use a hamburger right now 🤔
… But the fast food tent is ~30 minutes walking distance away, and this game automatically logs you out after 30 mins inactivity...
What if I could program in some delayed input?
*jazz hand routine engages*
Hmm.. so if I do something like:
PS C:\Users\Condor> $wshell.AppActivate('BlueStacks'); Sleep 1; $wshell.SendKeys('abusing this chat~'); Sleep 1; $wshell.SendKeys('for upkeep of 10h play~'); Sleep 1; $wshell.SendKeys('while I get myself a hamburger~'); Sleep 1; $wshell.SendKeys('sorry~');
that should work, no?
Le output:
abusing this chat
sorry
Well, even for PowerShit.. good enough, right? It gets the message across 🙃
Hmm.. let's just put an afk message instead, as I'm using the guild chat and don't want any of the members to think that I'm a freak
PS C:\Users\Condor> Sleep 1; $wshell.AppActivate('BlueStacks'); Sleep 1; $wshell.SendKeys('afk~');
.. which seems to work like a charm.. alright, perhaps I can entrust PowerShell to do that again after a 900 second delay, which should give me enough time to get that hamburger.
*comes back home*
"Logged out due to 30 minutes of inactivity."
MICROSOFT POWERSHIT, YOU'VE HAD BUT ONE FUCKING JOB!!!!
Well, guess I'll do that no-life 10+h gaming session somewhere next year again then. Thanks Powercunt!21 -
This is going to be a rant, but personally, I'm pleased with the outcome of my life now.
I was part of a community for a few years and decided to help them out with my knowledge of programming Lua nearly 2 years ago since they lacked developers for the project itself.
Since it was sort of a custom language that they modified how Lua worked on it, it took me a bit to adapt, but within a few weeks, I was pretty fluent in this so-called custom language they had. Began working on some major updates, additions, removals, and just optimizing this code base. It was a pretty old code base and needed a good chunk of love.
A few months later, I've implemented loads of features, optimized the base whenever I could, and then things start taking a turn for the worse. We get new 'developers' who haven't ever coded the language, and worse they couldn't afford to provide them development servers thus they ended up breaking my servers. I helped them and they learned, they were decent, but now the Seniors and CEO's of the project began to take a toll on me.
I was told that this community had a reputation of driving out developers, ruining their reputations, and that is what started happening. I started getting questioned if I was loyal to helping them, that I've become lazy, even though they were explained I've had mental health issues for a few years and have been hospitalized multiple times.
These sort of attacks kept happening for months, and then they finally pushed my buttons, where I was talking to another Senior of how we should redo the base since it's just so massive and a few tiny updates to the base take a few days to implement across the entire code. What instead happened was that I went to sleep, and this Senior told the CEO I was going to steal the code base and go sell it...
I woke up to messages of how the CEO is all pissed off, and that this what the Senior said. At this point, I started responding with, fuck it. I was so sick and fucking tired of their bullshit. I was the only fucking competent developer, and I did more work in the few months I was there then some people did in 2 or 3 years.
A few hours later I decided to go chat with the CEO and explained what was truly brought up, and he just brushed it off like I was lying. At that point, I lost it. I told him why the code base was horrible since he hired stupid ass developers. He didn't know how to code. People wanted certain items, and he wouldn't be able to add them for fucking months and players sit there making fun of it. Some people state the only differences they see within the code is the code I've done. Basically, he was an incompetent fuck that said he knew what he was doing, and had all these big plans for the future yet couldn't listen to the only competent developer and fucking claimed bullshit.
Now a few months have gone by, I'm looking at their community and it's basically dead with no proper updates except for copy and paste updates claiming to be custom coded. While I'm working on my real life businesses (Which are currently being a headache, but within the year should resolve its issues), starting University for my Computer Science degree here soon, and even considering building my own game here.
Basically, karma is a bitch and that's why when you get loyal people in your life, keep them. (Writing this at 3 am after a few drinks, hopefully, it made sense, I think it does.)
Anyways, goodnight everyone.5 -
Because I’m a fucking cowboy and a charlatan, and because I hate sleep and despise feeling refreshed and happy, I’m working pretty much full time as a contractor (I’m the full stack dev. I do everything) on a (well funded) startup alongside my day job.
Tonight I had to make some quick (lol “quick”) changes to a core piece of the platform.
Now before continuing please refer back to the first line of this rant.
So instead of writing new functionality, I copied and pasted another section.
I renamed all references of “new_order” to, cleverly “new_order2”.
I know.
I deploy to production...
My phone starts blowing up. In short, everything is fucked.
I’m going over the query, checking the production database. Why is this manifesting like this? It all looks correct.
2 HOURS of broken sales, pissed off customers, pissed off service agents and I see that there was still one reference of “new_order” that should have been “new_order2”.
I am a piece of shit.4 -
What a shitty day.
3h sleep
Lead very pissed bcuz backend don't know specs
Boring meeting where everything is repeated like 6 times
In a few hours boss wants to talk with the whole team
My co-workers jokingly say they want to fire me.
I should be the "hero that will make things better"
Please just kill me instead...
Edit: started working there 3 weeks ago2 -
Stress made me fall into old habits of instead of saying stop and letting my team now that I was falling apart (not realising it myself even) I just kept saying "Yes, I fix that." to every single request that was made in the project.
The closer we got to the deadline, the more I hyperfocused and ignored the signs. I just kept working. The last two days I didn't even sleep.
Of course the launch botched. I finally broke down and both my mind and my body have given up, since yesterday I'm in a mental feedback loop causing continuous anxiety attacks and migraines. I literally CAN'T do anything but trying to not go back into fight- or flight mode and remember to breathe.
I FINALLY made my project manager aware (something I should have done days ago) that I am incapacitated and now I am waiting for medication (Oxazepam) to be picked up at the pharmacy by my husband.
I almost literally worked myself into the ground.
I've been here before. Never again.
This is what happens if you don't listen to your mind and body and put up a white flag in time.11 -
I have a VP constantly harassing my people about some reports that we need to do as per federal law.
The thing is, these live inside of such system that I get to see exactly how many "hits" they get on a yearly basis. The only traffic we have on those sections is of people going ahead and putting the information from our reports there.
That's it, literally. Our user base does not go there. Federal agencies do not go there. No one gives two blips of shit about those sections. Yet she continuously acts like they are the most important thing in the fucking world. To make it better, I was told not to generate actual analytical data from said reports, since people with PHDs will come down on me to ask me who the fuck do I think I am from gauging them with such systems. So shit is a mute point on all fucking accounts.
I told my VP I can generate traffic information to let them know that shit is not really the most important thing in the fucking universe. His eyes glowed.
I don't want to see head rolls, but from staying till the next morning awake trying to give the best to our userbase, and just to be called out on shit like this as if I did not do enough for our people just.....well....it fucking hits man.
The worse part was me literally getting 30 minutes of sitting down after an all nighter, doing something for my users, to get to a meeting the next morning (I should not have driven there honestly) to hear this bitch complain about us not doing enough or not caring or whatever other bullshit she would spew.
I was livid, lack of sleep makes me dangerous. I turned to say something when my boss stopped me and took care of business. I seriously love this man. By all accounts and generational gaps a boomer, but one of the few good golden ones.
I just hate how unappreciated the realm of software development is by people that think that our shit is as simple as making a fucking powerpoint presentation.
Consolidate that with a director from another department taking all fucking glory during a major event of an application that I built by myself with 2 fucking weeks of no sleeping. And shit just gets glorious.
I have considered moving to other places, and heck, have gotten amazing offers, what with having a degree with a big fucking GPA and having the credentials of a senior, lead, full stack and manager role, the sky is the limit. But i know that if I leave then my users suffer, and I just can't fucking have that.
I have heard them speaking about doing something with X app that I built (with my department) I have even heard one of them saying "how is this made?" and a part of me hoped that it would be a good time to grab them and tell them of the field and the things that they can do. But I don't like announcing myself that way, always seemed to presumptuous, so I just smile, fuck yeah, my users are doing their thing with what I built to better their lives, what more can I have?
I have gotten criticisms from them, one recognized me, told me about his pain points and how it makes it hard for him to do what he must. Getting the data from the user base in an effort to make shit better for them drives me, my challenge being "how about this? better eh?"
But fucking execs man, think only of themselves, not the users, they forget about the users. Much like a shitty rock band forgetting about the music, about the fans.
I can't let that slide. But this fucking field. I sometimes fucking hate it, and I hate it because of the normies that don't understand and do not want to understand.
I do way too much, my guys do way too much and all I want is for the recognition to go to them. They do not need the ego boost, but to see my guys sitting in a meeting in which some dumb fuck is trying to drill us for taking to long, not doing something and what not, it fucking pisses me off. As their boss I always stand up and tell bitches off, but instead of learning, the bitches just keep pressing on their already defeated points.
Everything in human life gets fucking erradicated by: humans. People really do fucking suck.
I sometimes wish to go back, redo my diesel tech license and just work there, where I think one would be better of talking to an engine. But no, even then you get people, you have to interact with people, deal with people, and I am so far up my game and in my field that starting from scratch is a fucking mute point.
Maybe I need to keep fucking with stocks, get rich and just keep investing on bullshit. Whatever the fuck it takes me from having to feel the urge to choke a motherfucker in public.1 -
First company:
- being sat at an office that didn't have chairs with proper back support. It would kill my back every day. Like sitting on a bar stool coding.
- not having access to basic resources (cafeteria, salary bonuses)
- being seriously underpaid ($200 under)
- not having an IT process pipeline (yeah, this is a huge one): no JIRA, no git, no VCS, no continuous integration, etc. I fucking spend 45% of the time fixing coding-unrelated shit.
Second company (very aggravating):
- dumb frontend bitch and privileged colleague who both kept telling me months on end to shut up and who wouldn't listen to my advice on anything, while my advice would actually help the company advance in productive ways. The key here is being told to shut up while stagnating. i.e. dead end job.
- people advancing in the company based on nepotism and favoritism, based on having tits and ass, rather than skills and independence.
- pointlessssssssss meetings where decisions are made solely based on the opinion of Mr. favorite senior dev. The rest just sits there like a bunch of sad saps and yay-nodders. Incompetent PO's who "would like to hear your input" but then when you give it, they completely dismiss you.
- pointlessssssssss monthly meetings with stakeholders, where the dev teams do nothing but clash and act like pussies in front of the PM just to get in his favor, but behind scenes continue to make the same mistakes and telling the CEO everything is fine. Goodness, how can it get more unproductive.
- completely antisocial and nepotistic 'colleagues' who won't even talk to you, let alone smile at you or be friendly. You saying good morning and them pretending you're vapor that doesn't exist. Go go company atmosphere! Especially during lunch, those are the worst times. Imagine sitting at lunch where everyone looks like you killed their dog and the rest is huddled up in little high school groups.
What else? The incessant and pointless smalltalk that makes me want to bang my head against the wall. Talking about dogs, kids, what show was on tv last night. The fuck man, do you have a brain?!
Third company:
- HR bitches who think they are the shit and developers are antisocial, helpless misfits, but they work with computers and they don't even fucking know what a status bar is! The irony!
- forced socializing and stigmatization for the opposite. Imagine coming into a company and you don't say good morning. Should that be a problem? No. Instead, everyone starts dogging on you and hating you just because you didn't smile in their faces and said: hiiiiiiiiiiii how did you sleep? Did you feed your dog? Fuck you.
Elliot (Mr. Robot): "Wouldn't it be awesome if there was a mute button for life?" -boop, boop, boop, boop...- Ahh.. there.. that's much better."
- CEO's sucking up to you but when it comes to salary increase, they say shit like: "Ahhh ya know, it's kinda difficult." Yet another dead end job.2 -
People who take 2 places on a busy busride deserve to moved to the toilet.
Rude, selfless scum, go sleep with the shit of other people instead of making my life harder. I've been traveling for 16 hours. There's still 8 hours left and I would like to sleep, recharge my phone and that next to my traveling companion... But you egoistic creatures just have to be a fucking waste of space. To me you are almost the lowest trash of society.
I should simply sit down on your worthless gadgets.
I should simply smash your feet with my luggage.
I should simply remove you from the history of this planet
EAT FUCKING SHIT AND DIE
Edit: can't even do math anymore. I have 10 hours of travel left6 -
So just babbling my shit down here.
(Tldr : i am a crazy guy who followed my half slept brain, went onto a stage , gave some kind of motivating , stammering talk to a large group of professional strangers, enjoyed that day with a red embarrassed face and just got my first pic of me speaking on stage and that is so awesome !)
Last Saturday i went to a gdg meetup and i embarrassed the hell out of me.
I went there with just 2 hours of sleep from the previous night.
After a few talks there comes a guy who is taking some time to install is setup and the host calls for lightning round session ( ie he asks if anyone from the audience would like to share something about their product or something).
I am a fucking nutt guy. I can explain something to you nicely in a hacky way as long as i have done enough work on that and you speak my native language.
But giving a talk on English stage, hell no! I stammer, mix hindi with English and start speaking werd shit.. And that's what happened.
I don't know what went into me but as some guy went to the stage and talked for 2 mins, i was like yeah i want to do that too. So in next turn when he asked for a show of hands, i raised mine and fucking went to stage!
I forgot that if you go on stage you should have something to talk to . But the moment i was on stage, i was like... "Nope, we will do this differently".
I had been working on a video ads module from the last week which could be easily explained in 2 mins. But i felt like giving a non techy talk instead.
It went something like this: i introduced myself with my experience details ( who gives experience details on stage !?!) Then host said to speak loudly and i went like "Bharat mata ki jai!"( Victory to mother india (wtf!?😆) .
Then started talking about how the developers feel disheartened when searching on internet where the resources are scattered . And the solution i told them was :"don't be disheartened. You will eventually find it (like wow dude wtf, as if they didn't knew that) . Look on the youtube and other resources " and then went full on explaining/marketing about some online tutor who gives advice/consultancy via a subscription based payment ( tbf that guy really helped solve a lot of my doubts, he has written books on Android dev and is the top so answerer for Android).
Then i went on sharing my thoughts live on that fuckin stage ! ( Live because i usually post my thoughts here on devrant before discussing them out with real people, you guys are my safe space) but there i discussed my thoughts on libraries!
I have this believe that Android devs these days are having lesser knowledge of the system because we have all the libraries and templates available to us. But when we have to customize stuff, we need to go deep into docs and source classes and find ourselves in trouble there. So i kind of said this out loud and that we should try to read more the code and implement stuff ourselves instead of using the library 😅🙈)
I was feeling so fucking embarrassing after that all stuff! It was so full of stammering , broken English and worst attempt at motivation. At that time i was regretting this and about to burst cry and run away, but somehow i gathered my self, got my mood back to the event games and talks, later went to the organizers and apologized(and they were very nice and didn't cared about it), and overall enjoyed my weirdest day!
When i came home, my mom gave me a little more confidence about it. Now i think i shouldn't be that much instinctive. Next day i went hack to work and everything got normal.
But Yesterday i found a link to the public repository of the photos. Ohh fuck, someone had took my image! and that was too in full hd!!! 🙈🙈🙈😅😆😆 Oh mann I can't stop looking at that cool stage speaker image, i love it ! I, the shy-est and the most uncool awkward person , present on the stage with a mike, oof , i think i lived my dream !
I hope i could get enough confidence and speaking skills to take a real stage talk next time ( and maybe enough interesting talks and confidence to talk with girls of our office, ¯\_(ツ)_/¯ )5 -
Shutting down Windows instead of putting it into sleep should not save state. It did, in my case.
I had Chrome opened before shutting down. It's still there.
This is very nice fail-safe method, I must say.11 -
So I was looking into phone app development again (as you do) and I'm working on a simple QoL app for me and my SO that will help us automate some home management and finances stuff. Naturally I delved down the rabbit hole deep and wanted to have push notifications so we don't have to check the app periodically to know when certain things happen... Oh boy... Why is mobile development so convoluted, especially if you don't want to rely on Google Services...
It seems that the most accepted way of doing this is Firebase (FCM). Well me being me, I refuse to use google services for this and I prefer self hosted solutions (for data privacy reasons) which eliminates most products out there.
It also didn't help that my framework of choice is Flutter/Dart, because fuck Android Studio and the insane buggy XML stuff and fuck Android and it's constantly changing APIs...
Well In the end I decided on a rather simple solution and self hosted an AMQP service (RabbitMQ in my case, as I have some experience with it already) and implemented a foreground service in android platform specific code on top of my flutter project to kickstart it and made my phone a queue listener... This now means I can push notifications from my server to the Messaging Queue and it will be pushed into my App automatically!
One thing I found out on this journey was that Android now kills most background services and enforces foreground services to have a visible notification in the status drawer... which I actually approve of. It's a bit annoying that you can start a reliable background service, but I'm absolutely on-board with long running processes started by my apps are constantly visible...
Long story short, I love reinventing all the wheels, especially if it's for free and private... And I also went to sleep at 2AM again because this took longer that I'd like to tune... but it works, and it's google free...
I'm thinking of trying to package this up as a flutter module later, but first I want to do testing on battery life and the general life cycle of the service. RabbitMQ says they have the client library optimized for long-lasting connections and it should be just using a tcp socket, which should pretty much be what all the push notification services are doing anyway. I'm also not completely satisfied with how the permanent notification looks.. it isn't collapsible like some of the other ones from other apps and it's about 2 lines high instead of single line... which is something quite annoying and I'm struggling to find any relevant docs on how this is done other than possible making a custom Notification Style... but I just can't believe that everyone is doing that.. there must be a built-in somewhere -_-... Ugh Android is hell...
Anyway, if any android devs here have some hints, tips and tricks on how to handle this type of background/foreground process stuff and I'm doing something wrong let me know, cause googling this shit is a nightmare too!6 -
I really shouldn't use devRant before going to sleep, but that's at least currently the only own and peaceful time I have during week days because of really busy school and work schedule. (Yey, it's weekend!)
If I don't realize that I should stop using devRant at night it moves my sleeping time so that I don't get enough sleep or I won't be able to wake up in a timely manner.
I just immerse in the reading, commenting or even ranting so that I forget the passing of time. Making thing worse is that when I'm writing something my inner perfectionism wakes up and I try to make the text as good as possible and so I get more and more active when I should be relaxing and getting ready to sleep.
Do not worry about my sleep. I'll probably just start to read a book instead. But when it's a good time to use devRant then... 🤔
When or how do you use devRant?
What kind of sleep routines do you have? -
Fuck my sleep habits. Why I cant go to sleep like normal human instead in 7 AM? What kind of monster am I? Should I switch to Insomnia instead of Postman? Is that what life is trying to say to me?
Have a great Monday everyone.3 -
#Suphle Rant 6: Deptrac, phparkitect
This entry isn't necessarily a rant but a tale of victory. I'm no more as sad as I used to be. I don't work as hard as I used to, so lesser challenges to frustrate my life. On top of that, I'm not bitter about the pace of progress. I'm at a state of contentment regarding Suphle's release
An opportunity to gain publicity presented itself last month when cfp for a php event was announced last month. I submitted and reviewed a post introducing suphle to the community. In the post, I assured readers that I won't be changing anything soon ie the apis are cast in stone. Then php 7.4 officially "went out of circulation". It hit me that even though the code supports php 8 on paper, it's kind of a red herring that decorators don't use php 8 attributes. So I doubled down, suspending documentation.
The container won't support union and intersection types cuz I dislike the ambiguity. Enums can't be hydrated. So I refactored implementation and usages of decorators from interfaces to native attributes. Tried automating typing for all class properties but psalm is using docblocks instead of native typing. So I disabled it and am doing it by hand whenever something takes me to an unfixed class (difficulty: 1). But the good news is, we are php 8 compliant as anybody can ask for!
I decided to ride that wave and implement other things that have been bothering me:
1) 2 commands for automating project setup for collaborators and user facing developers (CHECK)
2) transferring some operations from runtime to compile/build TIME (CHECK)
3) re-attempt implementing container scopes
I tried automating Deptrac usage ie adding the newly created module to the list of regulated architectural layers but their config is in yaml, so I moved to phparkitect which uses php to set the rules. I still can't find a library for programmatically updating php filed/classes but this is more dynamic for me than yaml. I set out to implement their library, turns out the entire logic is dumped into the command class, so I can neither control it without the cli or automate tests to it. I take the command apart, connect it to suphle and run. Guess what, it detects class parents as violations to the rule. Wtflyingfuck?!
As if that's not bad enough, roadrunner (that old biatch!) server setup doesn't fail if an initialization script fails. If initialization script is moved to the application code itself, server setup crumbles and takes the your initialization stuff down with it. I ping the maintainer, rustacian (god bless his soul), who informs me point blank that what I'm trying to do is not possible. Fuck it. I have to write a wrapper command for sequentially starting the server (or not starting if initialization operations don't all succeed).
Legitimate case to reinvent the wheel. I restored my deleted decorators that did dependency sanitation for me at runtime. The remaining piece of the puzzle was a recursive film iterator to feed the decorators. I checked my file system reader for clues on how to implement one and boom! The one I'd written for two other features was compatible. All I had to do was refactor decorators into dependency rules, give them fancy interfaces for customising and filtering what classes each rule should actually evaluate. In a night's work (if you're discrediting how long writing the original sanitization decorators and directory iterator), I coupled the Deptrac/phparkitect library of my dreams. This is one of the those few times I feel like a supreme deity
Hope I can eat better and get some sleep. This meme is me after getting bounced by those three library rejections