Joined devRant on 1/1/2018
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
Fuck social media websites that don't allow you to embed their content with a simple iframe
Good example 👍 :
<iframe src="https://youtube.com/embed/..." allow="..." allowfullscreen></iframe>
Bad example 👎:
<blockquote class="reddit-card" ...><a href="https://www.reddit.com/r/.../...">...</a></blockquote>
<script async src="//embed.redditmedia.com/widgets/platform.js"></script>
With an iframe it's at least somewhat contained.5
Holy shit firefox, 3 retarded problems in the last 24h and I haven't fixed any of them.
My project: an infinite scrolling website that loads data from an external API (CORS hehe). All Chromium browsers of course work perfectly fine. But firefox wants to be special...
(tested on 2 different devices)
(Terminology: CORS: a request to a resource that isn't on the current websites domain, like any external API)
For the infinite scrolling to work new html elements have to be silently appended to the end of the page and removed from the beginning. Which works great in all browsers. BUT IF YOU HAPPEN TO BE SCROLLING DURING THE APPENDING & REMOVING FIREFOX TELEPORTS YOU RANDOMLY TO THE END OR START OF PAGE!
Guess I'll just debug it and see what's happening step by step. Oh how wrong I was. First, the problem can't be reproduced when debugging FUCK! But I notice something else very disturbing...
The Inspector view (hierarchical display of all html elements on the page) ISN'T SHOWING THE TRUE STATE OF THE DOM! ELEMENTS THAT HAVE JUST BEEN ADDED AREN'T SHOWING UP AND ELEMENT THAT WERE JUST REMOVED ARE STILL VISIBLE! WTF????? You have to do some black magic fuckery just to get firefox to update the list of DOM elements. HOW AM I SUPPOSED TO DEBUG MY WEBSITE ON FIREFOX IF IT'S SHOWING ME PLAIN WRONG DATA???!!!!
During all of this I just randomly decided to open my website in private (incognito) mode in firefox. Huh what's that? Why isn't anything loading and error are thrown left and right? Let's just look at the console. AND IT'S A FUCKING CORS ERROR! FUCK ME! Also a small warning says some URLs have been "blocked because content blocking is enabled." Content Blocking? What is that? Well it appears to be a supper special supper privacy mode by firefox (turned on automatically in private mode), THAT BLOCKS ALL CORS REQUESTS, THAT MAY OR MAY NOT DO SOME TRACKING. AN API THAT 100% CORS COMPLIANT CAN'T BE USED IN FIREFOXs PRIVATE MODE! HOW IS THE END USER SUPPOSED TO KNOW THAT??? AND OF COURSE THE THROWN EXCEPTION JUST SAYS "NETWORK ERROR". HOW AM I SUPPOSED TO TELL THE USER THAT FIREFOX HAS A FEAUTRE THAT BREAKS THE VERY BASIS OF MY WEBSITE???
WHY CAN'T YOU JUST BE NORMAL FIREFOX??????????????????
I actually managed to come up with fix for 1. that works like < 50% of the time -_-5
My nightmares are made of CORS errors.
Fuck inconsistent CORS implementations across browsers.
Everyone who is about to say "Once you understand CORS it's not a problem anymore".
FUCK YOU TOO!!!!!!!8
Why the fuck does Arduino use C++ macros for min, max, abs, etc. ???????
For those who don't know what a macro is, basic example:
#define abs(x) (x > 0 ? x : -(x))
Which looks like a function, but instead abs() will be replaced by the expression and all x will be replaced literally with what you pass to abs
would evaluate to
(i++ > 0 ? i++ : -(i++))
which would call i++ twice
I guess I will have to double check every built in function and rewrite it if it's a macro -_-. Not taking any chances. Btw all Arduino functions are in one big file, so now I have to pollute my code with namespaces.
Macros can be great but what the fuck.15
How do you remove a category (jokes/memes) from you rant feed on the desktop website?
In the app you just simply click the tags you don't want.
Or does someone have a script ready that you can inject into the website?2
Bold of me to assume that a project that solely exists as an example on how to use a library would include said library in the download.
(In the project file structure already exists a folder for libraries and in it was a folder with the name of the library. And I of course didn't check if the [library name] folder contained any files)1
I am honestly surprised in how many different ways C++, VS, and libraries are able to fail over and over and over again.
Fuck you C++ libraries
Especially fuck Visual freeze Studio5
Haven't used ssh in a while. Just spent 30 minutes figuring out why my Pi was rejecting my password.
Turns out I wrote ssh <ip> instead of ssh pi@<ip>7
There is a bug that causes a second notch to appear in the pixel 3xl. On the right side.