Details
-
Aboutstudent of bachelor in computer science
-
SkillsPython, React, Django, Flask, c++
-
LocationPakistan
-
Website
-
Github
Joined devRant on 6/24/2021
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
-
Entire fucking world:
Shift + Enter == New Line
Spreadsheets:
Alt + Enter == New Line
Spreadsheets are America of digital world.5 -
Well, apparently, I have windows 11 now.
I was in Windows Insider program, but I had selected the option to opt-out at next update (maybe 4 months ago).
Either that didn't work correctly or Windows 11 was technically the next update because last night I did a little update (it really only took like half an hour, which isn't unheard of for some Windows updates) and when I turned on the PC today, I have Windows 11 Pro
Okay!...5 -
🎶 Fixing production issues 🎶
🎶 Fixing production issues 🎶
🎶 In other people’s code! 🎶
Seriously, how am I still in a good mood when I have to deal with this?14 -
A sidebar.
Literally just a sidebar.
And yes, this was in Hell.
Its code was spread across at least 40 files, and it used a bunch of freaking global variables to unfurl accordion sections, hide other sections/items, highlight the active item, etc. These were set (and unset!) in controller actions, so if you didn’t unset one, it remained open and highlighted until another action unset it.
Some of the global variable checks (and permissions checks) were done in the individual views, some outside of the `render` statements that include them. Some of them inherited variables from the parent, some from the controller, some from globals. Getting a view to work was trial and error. Oh, and some had their own inline css, some used css classes.
Subsections were separate views, so were some individual items, both sometimes rendered using shared templates, and all of the views and templates had the exact. same. filename. (They were located in different directories, and thus located automagically via implicit relative paths.) So, it was a virtually endless parade of`render partial => “sidebar”`. Which file does that point to? Good luck figuring it out!
Also, comments in several places said adding a new section required a database migration. I never did figure out why.
Anyway, I discovered this because I had an innocuous-sounding ticket to rearrange the sidebar, group some sections/items under different permissions, move some items to another menu, and nest some others differently.
It took me two bloody weeks, and this was when I was extremely productive every day.
Afterward, I was so disgusted by it that I took a day and removed every trace of the sidebar I could find, and rewrote it. I defined the sidebar in a hash, and wrote a simple recursive builder to generate the markup. It supported optional icons, n-level nesting, automatic highlighting of the current item and all parent nodes, compound and inherited permissions, wrapping of long names, hover and unfurl animations, etc. Took me a couple hundred lines of Ruby at the most, plus about the same of css.
Felt so good to remove that blight.5 -
Fuck it, I think I'm going full Kotlin.
Looks SO cute.
Any advice?
I'll use VSCode btw. Only VScode.9 -
What is your "WTF" commit message you see in your project?
For my case my Junior wrote this "Hey, Senior can I f** your girl for one night?" which lately he got fired as I showed that to my Manager.32 -
As for programming: (will do a cyber one later)
Don't *ALWAYS* only study/learn programming solely for learning it as this can be demotivating at times, find a cool project to do and learn while developing that!
This is how I learned programming in a fun way :)5 -
A little headpat for those who have suffered so much in making wrapper code for managed languages for native libraries
Because I know how painful it is to make one16