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 - "mouse hover"
-
Fact=!rant
Gf: Hey look, YouTube shows a preview of the video on mouse hover
Me: pornhub did it first
Gf:what?
Me:wut?10 -
I’m surrounded by idiots.
I’m continually reminded of that fact, but today I found something that really drives that point home.
Gather ‘round, everybody, it’s story time!
While working on a slow query ticket, I perused the code, finding several causes, and decided to run git blame on the files to see what dummy authored the mental diarrhea currently befouling my screen. As it turns out, the entire feature was written by mister legendary Apple golden boy “Finder’s Keeper” dev himself.
To give you the full scope of this mess, let me start at the frontend and work my way backward.
He wrote a javascript method that tracks whatever row was/is under the mouse in a table and dynamically removes/adds a “.row_selected” class on it. At least the js uses events (jQuery…) instead of a `setTimeout()` so it could be worse. But still, has he never heard of :hover? The function literally does nothing else, and the `selectedRow` var he stores the element reference in isn’t used elsewhere.
This function allows the user to better see the rows in the API Calls table, for which there is a also search feature — the very thing I’m tasked with fixing.
It’s worth noting that above the search feature are two inputs for a date range, with some helpful links like “last week” and “last month” … and “All”. It’s also worth noting that this table is for displaying search results of all the API requests and their responses for a given merchant… this table is enormous.
This search field for this table queries the backend on every character the user types. There’s no debouncing, no submit event, etc., so it triggers on every keystroke. The actual request runs through a layer of abstraction to parse out and log the user-entered date range, figure out where the request came from, and to map out some column names or add additional ones. It also does some hard to follow (and amazingly not injectable) orm condition building. It’s a mess of functional ugly.
The important columns in the table this query ultimately searches are not indexed, despite it only looking for “create_order” records — the largest of twenty-some types in the table. It also uses partial text matching (again: on. every. single. keystroke.) across two varchar(255)s that only ever hold <16 chars — and of which users only ever care about one at a time. After all of this, it filters the results based on some uncommented regexes, and worst of all: instead of fetching only one page’s worth of results like you’d expect, it fetches all of them at once and then discards what isn’t included by the paginator. So not only is this a guaranteed full table scan with partial text matching for every query (over millions to hundreds of millions of records), it’s that same full table scan for every single keystroke while the user types, and all but 25 records (user-selectable) get discarded — and then requeried when the user looks at the next page of results.
What the bloody fucking hell? I’d swear this idiot is an intern, but his code does (amazingly) actually work.
No wonder this search field nearly crashed one of the servers when someone actually tried using it.
Asdfajsdfk.rant fucking moron even when taking down the server hey bob pass me all the paperclips mysql murder terrible code slow query idiot can do no wrong but he’s the golden boy idiots repeatedly murdered mysql in the face21 -
On a company meeting there was a discussion wether to trigger an event by hover or mouse click for 20 minutes. then..
Me: "There is no mouse click without hover."
-- silence --5 -
Tl;dr: owning and pranking other people with a wireless mouse is hacking and illegal.
Okay, so I wanted to fuck around with some people one day so I decide to bring a usb wireless mouse to my secondary school.
My first target was my science teacher (was a bitch). I got into class before everyone else and plugged in the small usb receiver then sat down and pretended as if nothing had happened. The lesson starts and here is where the fun begins. Her screen is projected onto a whiteboard so I could see what she was doing. Under the table I had my mouse and every time she tried clicking a dialogue, I would move the mouse ever so slightly so she would miss. After a couple of times, she started to get suspicious, maybe even slightly paranoid; my friend keked. I never got found out by that teacher.
Fast forward to next lesson: I already planted the receiver in my next victims pc. The victim was a bitch I hated so much at the time. She would used to bully me to an extent and was a loud noisy bitch. I really didn't like the person. I digress. When the time was right, I went to her folder, highlighted all her files, right click, hover over delete. But I wasn't so shallow to delete her stuff. That's not the person I am. I guess it was more of a threat really. But the teacher saw what was going on and she saw my wireless mouse and connected 2 and 2 together. She called the behaviour people, removed the reciever and the mouse from me.
Within a few minutes, I was in a room on my own talking to this woman talking about how hacking is bad/illegal and she knows I'm into it etc. But I wasn't hacking? I did no damage and was pulling a prank. Bitch didn't listen to me. She made me sign this document which said that if I fuck around with computers, I could be expelled and I won't be allowed to use to computers again or use them with many restrictions.
I didn't really care. To this day, I still don't have my mouse back. :(7 -
Ok, which idiot at jetBrains thought it was a good idea to have "CRTL + Y" be a "cut line" (instead of redo) and "CRTL + SHIFT + F6" be "rename" (instead of just simply "F2")...
And also, which idiot thought it was a good idea to not allow us to properly change it (doing so will result in the right shortcuts doing nothing at all)...
Fuck you and your "Adobe-style" shortcuts.
Minor edit: Some idiot decided that it'd be a good idea to *only* have a custom rename shortcut work *if* I already grabbed my mouse, right-clicked the file/folder and hover refactor...
Might as fucking well continue my mouse-movement and click "rename" you fucking morons.13 -
NO MICROSOFT FOR FUCK SAKE NO!
I have a fucking 15inch screen and that left side menu is eating 25% of it! IF you gonna throw in a new "Creative" design, make the damn menu re sizable, NO I DO NOT WANT TO HIDE THE LABELS AND MEMORIZE YOUR STUPID ICONS!
At least do what Gitlab did, a nice small menu that DOES NOT EAT HALF THE DAMN SCREEN!
Oh, did I say anything about sub menu hell that pops up whenever your mouse hover over any of the items on the left? Yaaa... that goes to a brand new rant!19 -
Twas the night before deadline,
And all through my house,
tons of bugs were scurrying from the
onClick event of the mouse.
Seriously though... Dreamweaver CC needs to revamp the way they implement bootstrap snippets. Specifically the navbar hover and click on <ul> dropdown menus.3 -
Reading code takes time!
Everytime I read:
"var" or "auto" Add: 10s
- Just use the type
Everytime I read:
if(Expression1 && Expression() ? GetNumber() : 0 > 0) Add: 30s
- Just write two if statements or create two bools the line above.
Everytime I read:
delegate = () => {} Add another 5 minutes of reading time.
- Just write a separate function for it. It helps with searching and understand what it does
Please code like the person that needs to check your code or change it just knows basic coding skills and logics.
I do know all these concepts I just never use them because it makes the code unreadable. hard to follow, mistakes that can happen everywhere. difficult to search.
And it frustrates that I need to read 10 extra lines to understand code flow or hover my mouse in an IDE to figure out what type object it is.
It's properly just me... I just like clean readable code. that is logical and failsafe and strict and deterministic with its behavior9 -
OK - so I have a new job which I am loving but I am needing to use a Mac book which is a little frustrating. Coming from Linux with I3wm I have stuff just so.
The biggest change I miss is that I can't hover the mouse over windows to give them focus. Also middle click pasting would be awesome. Does anyone have any advice / solutions to make me feel at home? -
https://github.com/ilechuks73/...
its been a while I ranted on here. A lot has been happening and I'm going to take a day off to let it out on here. oh yes 😂😂😂.
the link up there is a little feature I want to implement in a bigger project. I cant seem to get the resizing feature to work in firefox. you hover over the handles in between the divs and drag to resize them but don't work in firefox. I have hosted this on github pages and the link to the page is available in the readme file. works only with a mouse.
thanks ahead.2