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 - "stackoverflow.com"
-
Testivus On Test Coverage
Early one morning, a programmer asked the great master:
“I am ready to write some unit tests. What code coverage should I aim for?”
The great master replied:
“Don’t worry about coverage, just write some good tests.”
The programmer smiled, bowed, and left.
...
Later that day, a second programmer asked the same question.
The great master pointed at a pot of boiling water and said:
“How many grains of rice should I put in that pot?”
The programmer, looking puzzled, replied:
“How can I possibly tell you? It depends on how many people you need to feed, how hungry they are, what other food you are serving, how much rice you have available, and so on.”
“Exactly,” said the great master.
The second programmer smiled, bowed, and left.
...
Toward the end of the day, a third programmer came and asked the same question about code coverage.
“Eighty percent and no less!” Replied the master in a stern voice, pounding his fist on the table.
The third programmer smiled, bowed, and left.
...
After this last reply, a young apprentice approached the great master:
“Great master, today I overheard you answer the same question about code coverage with three different answers. Why?”
The great master stood up from his chair:
“Come get some fresh tea with me and let’s talk about it.”
After they filled their cups with smoking hot green tea, the great master began to answer:
“The first programmer is new and just getting started with testing. Right now he has a lot of code and no tests. He has a long way to go; focusing on code coverage at this time would be depressing and quite useless. He’s better off just getting used to writing and running some tests. He can worry about coverage later.”
“The second programmer, on the other hand, is quite experience both at programming and testing. When I replied by asking her how many grains of rice I should put in a pot, I helped her realize that the amount of testing necessary depends on a number of factors, and she knows those factors better than I do – it’s her code after all. There is no single, simple, answer, and she’s smart enough to handle the truth and work with that.”
“I see,” said the young apprentice, “but if there is no single simple answer, then why did you answer the third programmer ‘Eighty percent and no less’?”
The great master laughed so hard and loud that his belly, evidence that he drank more than just green tea, flopped up and down.
“The third programmer wants only simple answers – even when there are no simple answers … and then does not follow them anyway.”
The young apprentice and the grizzled great master finished drinking their tea in contemplative silence.
Found on stack overflow https://stackoverflow.com/questions...8 -
I'm never making fun of people who go to Stack Overflow for answers ever again.
I mean, have you guys seen this? A leap-second causing 100% CPU use in MySQL, and a dude figures it out like it was nothing, and provides a quick solution!
https://stackoverflow.com/a/...12 -
Lol 😂. I was expecting a mnemonic of some kind but this works too.
https://stackoverflow.com/questions...2 -
For my fellow javascript devs:
var floored = 12.68 | 0;
Is much faster than:
var floored = Math.floor(12.68);
And in both cases floored === 12
#JustJavascriptThings ¯\_(ツ)_/¯
Source: http://stackoverflow.com/questions/...
Performance test: https://measurethat.net/Benchmarks/...5 -
Don't do "git pull" quickly. Always do a "git fetch" THEN "git log HEAD..origin" OR "git log -p HEAD..origin". It is like previewing first what you will "git pull".
OR something like (example):
- git fetch
- git diff origin/master
- git pull --rebase origin master
Sometimes it is a trap, you will pull other unknown or unwanted files that will cause some errors after quickly doing a git pull when working in a team. Better safe than sorry.
Other tips and tricks related are welcome 😀
Credits: https://stackoverflow.com/questions...5 -
I actually never had to deal with that so far and wondered too.
https://stackoverflow.com/questions...6 -
Had a "Fatal error stack overflow"
All google searches lead to irrelevant links in stackoverflow.com
Now I can add this error to my "special errors I had" list. #onceinalifetime6 -
An ancient scripture describing our impending doom found on Stack Overflow
https://stackoverflow.com/questions...6 -
I DID IT :D
I VERTICALLY ALIGNED A DIV IN CSS
I'm a noob in front-end development, I usually use bootstrap but now I did it in vanilla CSS inside ReactJs =D
or is it lol, I don't know, I used these:
position: "relative",
top: "50%",
transform: "translateY(-50%)"
source: https://stackoverflow.com/a/441616615 -
I have to rant a bit about the toxic reactions to a constructive Q&A website.
People keep complaining that they get downvotes and corrections, or stuff like that.
Are you fucking kidding me?
So you expect people to spend their own time for absolutely free, to help you, while you don't even want to invest in describing the issue you're having properly? And then complain that people are having issues in understanding your questions?
Let's look at this scientifically. Let's gather up some questions that have been received badly on SO in the last few hours. From the top (simply put https://stackoverflow.com/questions... in front of the id):
47619033 - person wants a discussion about an algorithm while not providing any information about what worked and what failed. "Please write a program for me". Breaking at least 2 rules.
47619027 - "check out my videos" spam
47619030 - "Here's the manual that has my answer but I can't find my answer in it".
47619004 - "how do I keep variables in memory"
47618997 - debug this exception, I'll give you no info on what I tried and failed. Screw this, you guys figure this out, I'm going out for beer.
47618993 - expects everyone to guess what the input is, what the expected output is, and whether he has read what HashMap is in the manual. But sure, this question is so far the best out of all the bad ones.
47618985 - please write code according to my specifications
Should I go on? There wasn't a single clear question about problems in code in this entire small set. Be free to continue searching, let me know if you find something that:
1. You understand what's being asked
2. Answer is clear and non-ambiguous (ex. NOT "which language is the coolest?")
3. Not asking someone to write a program for them.
4. Answer is not found in the most basic form of manuals (ex. php.net)
5. Is about programming.
The point is:
If you get downvoted on Stackoverflow - then you wrote a shitty question. Instead of coming over here and venting uselessly, simply address the concerns and at least TRY to write a clear question if you expect any answers.5 -
It's always so uplifting to see this post on SO. With _that_ accepted answer. After so long... :D
http://stackoverflow.com/a/1801327/... -
A list of hilarious comment in code:
http://stackoverflow.com/questions/...
One that I liked in particular:2 -
So I just made a throwaway SO account because I had a 'risky' question and I don't wanna loose my 22 hard earned reputation points on my main account.
Maybe it's just me but I think it's very sad that asking a question on SO that doesn't get downvotes is so difficult.
Anyways, if anyone knows about UMDF drivers, here's the question: https://stackoverflow.com/q/...5 -
Best way to handle any exception...
try{
something
} catch(e) {
window.location.href =
"http://stackoverflow.com/search/...]+"
+ e.message;
}joke/meme coding c++ tip of the day tricks stack overflow random rant try catch joke but will be useful 😂😂😂 programmer hacks8 -
Check out the revision history of this ~humble~ answer in stackoverflow for a good laugh: http://stackoverflow.com/posts/...2
-
I read this in stackoverflow today:
Welcome to every C/C++ programmers bestest friend: Undefined Behavior.
There is a lot that is not specified by the language standard, for a variety of reasons. This is one of them.
In general, whenever you encounter undefined behavior, anything might happen. The application may crash, it may freeze, it may eject your CD-ROM drive or make demons come out of your nose. It may format your harddrive or email all your porn to your grandmother.
source:
http://stackoverflow.com/questions/...1 -
My learning process :
Open library's homepage
Read.
Don't fully get.
Search stackoverflow.com for examples
Not quite yet.
Sleep
Got it!
AM I a bad developer?9 -
"You always know when you have a good tester, because you're always a little annoyed when that person comes around your desk/cube. The reason for this is that you know that if the tester is in your general vicinity, they've found something wrong with what you've written. All the excuses start to pile up in your mind of 'Well, you're not using it right!', etc, but in the end, you know that the tester is right, and you've just made a mistake in your programming."
-https://stackoverflow.com/a/5256734 -
try {
// something...
}
catch (Exception ex)
{
string uriToLaunch = "http://stackoverflow.com/search?q=" + ex.Message;
var uri = new Uri(uriToLaunch );
var success = await Windows.System.Launcher.LaunchUriAsync(uri );
}1 -
Took the risk and asked a question at SO. Yay! No downvotes so far
https://stackoverflow.com/questions...6 -
StackOverflow survey 2016 is out! Do the stats correspond to the opinions here on devRant?
http://stackoverflow.com/research/...5 -
Javascript.
All devices in the world:
Dev: can you gently copy the content of this dynamically generated <input> element and copy it to the clipboard?
Devices: Sure thing brah!
...
iOS: LOL
(and proposed solution on SO, ridiculous)
https://stackoverflow.com/a/...8 -
"SO culture is so mean, they downvote good questions for no reason!"
Meanwhile, most of the downvoted questions in my list:
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
Translation:
- OP1: "Do my homework for me"
- OP2: "I am too lazy to google this"
- OP3: "Gimme code, here is a shitload of requirements"
- SO: "No."
- OP1/2/3/DevRant: "Oh mah gawd mah question was so gud, SO such toxic, very mean, much wow qq."
Kk.11 -
Around 2 years ago, I had first discovered DevRant.
I was an intern in a startup then, and I was working on ElasticSearch. I remember making rants about it. The internship ended. So did my relationship with ElasticSearch.
This week, a new intern joined our organisation (a different organisation). He was assigned the task of deploying ElasticSearch, with me as his mentor. All was going good, we migrated data from MongoDB to ElasticSearch and all.
Back then, I used to curse the team lead (leading a team of interns mostly), for not helping me properly...
I wanted a publicly accessible dashboard, since we can't really see the Kibana dashboard with SSH :P... So, we implemented user authentication using X-Pack security. And here we are, stuck... Again... I'm unable to help the intern. The World has come to a full circle.
PS: I have to just guide him while doing my own User Stories.
https://stackoverflow.com/questions... -
Some people seem to dislike Stack Overflow, but I remember it from the time when it was much funnier. In those days I, for some reason, thought the web is a scam(free _correct_ answers? kiddin' right?).
Here you have some pearls from comments and even code. It's worth reading! ^^
http://stackoverflow.com/q/184618/...1 -
I swear I NEVER hated PHP before, but after seeing this shit, I just can't love it anymore, I feel betrayed
I mean, WTF? Just bc I'm using the variable as a reference in the NEXT loop the LAST element changes? What even is the fucking reason?
Yeah, I read the answer on StackOverflow, but seriously...
SO ref: https://stackoverflow.com/questions...12 -
NSA is seriously hiring on SO. Even with happy YouTube video under it. Like nothing is happening.
It must be freezing in hell atm I guess
https://stackoverflow.com/jobs/...5 -
In case you need to kill some time and would like to see some funny stuff, here you go: https://stackoverflow.com/questions...
thank me later4 -
My hatered for stack overflow has been incredibly increasing every day.
-Was struck in a basic problem for last 16 hours.. finally solved it at 2:am, was very happy.
- its quite a nice situation with fragments in Android, so thought of writing an example q/a on stack overflow.
- its FUCKING 7 am. It took me an hour to document my code(mind you, i always document in the best way possible, created a nice readme.md file) , and when it comes to uploading, it says " your question seems to have mismatch index". Well, fuck it, but okay i will edit it.
-Edited whole code, made sure it looks fine in preview pane , pressed upload.
-same fucking answer... for past 3 hours i have been trying to add questions and answer in various possible ways but that shit don't want to accept it..at the end uploaded the md to my github profile and added a fucking link there...
Please, someone upvote that damning link, i qant some repo their so i could ask other authors with questions in the comment sections(and if possible, add back my code into my answer) ;____;
https://stackoverflow.com/questions...7 -
Okay, sorry, I apologize to those to whom I claimed that properly asked Questions do not get downvoted on StackOverflow.
I have 600+ rep, 20+ Answers and questions.
I was doing something, it wasn't work, it wasn't homework or assignment. I was doing it purely out of interest. I got stuck and having no clue whatsoever, I asked a question. Got 3 down votes, close flags, and someone commented that they aren't there to do my homework.
-_-
The question was, after applying huffman encoding on an image (array of pixels) , how do I save it where it actually occupies less memory?
And this https://stackoverflow.com/questions...4 -
Everyone shitting on SO answers being mean (which sometimes they are), meanwhile:
https://stackoverflow.com/questions...
Garbage like this is how you become a misanthrope.11 -
I know this really isn't the place for this, but I REALLY need help..
I need to add app scaling inside my game.
To do this, I need to listen for a MouseDragEvent (or similar) on a JavaFX object like a Label or Image.
Here is my SO post:
http://stackoverflow.com/questions/...
Thanks in advance!22 -
Most of you probably know this one but still, it's my favorite I couldn't resist:
http://stackoverflow.com/questions/...1 -
When you are searching a solution for your problem so desperately that Google sends you to the Russian version of Stackoverflow.com (and you don't speak Russian).13
-
So I found these stack overflow questions and thought they were particularly humorous.
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
The answers were pretty good. But I wanted to actually "break out of an if statement" like the ops asked for. So I created these monstrosities:6 -
//Something great
try
{
//Some code.
}
catch(Exception ex)
{
string url = "http://stackoverflow.com/search?q=";
System.Diagnostics.Process.Start($"{url}{ex.Message}");
}1 -
Android development sucks assssssssssss.
They FINALLY made a design system that doesn't look ugly so I thought might as well upgrade my old apps to it.
Publish and tonnnnes of crashes hours after launch.
Test on older devices and turns out some @color/material_xyz was missing in a lower API code BUT available in higher ones? No fallback, no error in AndroidStudio, just a runtime crash. Amazing
Then the location permissions glitch up. On lower androids even if you aren't actively tracking the user, the system tries to call some method which if you haven't overridden, the app crashes at launch.
And no amount of wrapping in try-catch-ignore helps (https://stackoverflow.com/questions... helped)
OH AND THEN the above solution if used on latest Android code33, CRASHES ON RUNTIME. so more sets of 'if VCODE this then ask this else that' bullshit.
I don't even need location it's just for better ad money ffs.
I've been team-android since Froyo and hate apple's monopoly, but if this is the level of their competence, many will jump ship sooner or later.
PS: yes I know I should've checked for lower versions before hand but Im not gonna make 8 android VMs to test all when different things fail in different versions.
I did have to do that in the end, but for a meh pet project one shouldn't have to. The system should have enough fallbacks and graceful fails.3 -
One more easter egg. What a coincidence Thanksgiving and easter egg. Is there some AI ?
https://stackoverflow.com/questions...3 -
> be me
> post reasonable question on SO
> get downvoted the next minute without explanation
> come to see that downvote has been removed
> yay.exe
> come to see someone explained that why is that question wrong
> totally unrelated comment
> gets downvoted again
> https://stackoverflow.com/questions...9 -
OMG... this client is killing me...
So they are writing a Java / SpringBoot app for whatever. For some reason they decided to write it in the overcomplicated way, i.e. using a custom Spring's BeanPostProcessor that changes the eventual type of some beans, causing some weird ass issues, causing the app to fail to boot up if built on some systems and start up just fine if built on others (https://stackoverflow.com/questions...).
I've advised the client (devs) to simplify the architecture and avoid using type-mutating BPPs (bcz.. you know.. noone does that..).
Instead, the client created a task for me to "remove the build logic creating JAR packages" and another "Create a shell script manually assembling the CLASSPATH list and launching the application"
omg... what the hell is going on? Am I on camera? This can't be real... in 202-fucking-4 in a greenfield project!!!
wtf...1 -
FFFUUUUCCCCCKKKKKIIIINNNNGGGG GGGGGGGOOOOOOOOOOOGGGGGGGGGGGGGGGGGLLLLLLLLLLLLLEEEEEEEEEEEEEEEE.......
Spent 2 days trying to figure out why the template app didn't work, debugging and commenting out code....
The solution was somehow the XML elements need to be flipped... AKA... the template ***written by a Google monkey*** is WRONG!!!!
https://stackoverflow.com/questions...6 -
I know it's a weekend, but there are a few lifeless developers who work even on Sundays. Stackoverflow.com is down :/4
-
Goodbye world, I will not miss you, I will not regret leaving you BUT THIS! I MEAN THIS !!! I cannot stand -_-
https://stackoverflow.com/a/...
For fuck sake! Why don't you put comma at the end of the line!! please someone delete his answer no commas at the beginning. Please, show mercy for a second T_T10 -
So apparently south korean maps are top secret and do not allow for styling in google maps:
"Yes , Korea does not support some features offered by Google Map due to national law. Google Map Korea can not be export map data for data centers abroad or including the ability to dynamically change the map image. Many South Korea Maps and services are limited to the domestic uses and Google is striving to make this a better service."
sources:
https://snazzymaps.com/help
https://stackoverflow.com/questions...
https://productforums.google.com/fo...3 -
What is the result of i == (i = 2) ?
Want to add something ??
Source : https://stackoverflow.com/questions...6 -
"C# is better than JavaScript"
I only see ruminations of people who are so far gone mentally they can't even see the forest from the trees anymore:
https://stackoverflow.com/questions...
Imagine having 100s of garbage ways to choose from for something that should have trivial built-in functionality.
🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡
oh and don't give me the shit "enums are bad pattern" grow up and learn to code43 -
Stackoverflow moderator election, time to down vote those who are going mark our question as duplicate!
https://stackoverflow.com/election/...1 -
Any flutter dev, please help.
I asked a question on stackoverflow but seems like nobody's ready to help.
Please help.
https://stackoverflow.com/questions...5 -
I just scroll past this question asking how to get good at Git commands (https://devrant.com/rants/9997784/...). Figured I'd share my thoughts as a separate rant cause it's a topic I've tinkered with a bit.
So, My initial engagement with git-related queries on StackOverflow dates back to around 2021.. Surprisingly, one of my short and straight-to-the-point replies got a hand full of attention. You can check it here: https://stackoverflow.com/a/...
Now, about mastering Git commands – from my own trial and error:
1). Instead of trying to cram everything into your big brain, scribble down notes. Trust me, it’s more practical. I kept a cheat sheet of sorts as notes on my PC, noting down the commands I used day in, day out. Super handy beyond just work stuff.
2). You gotta get what each command does, but you don't need to nail it all at once. Spend a day diving into the basic commands. Leave the trickier ones for later; they start making sense as you get more into it.
3). I had this aha moment when dealing with a merge mess using a GUI tool. Switched to the command line, and bam! It made way more sense. The command line's like a secret passage to really understanding Git.
So, if you're wondering how to tackle Git commands, my take is: *notes, *baby steps, and *lean into that command line magic. Mix them up your way and see what sticks for you!1 -
Can any sql guru take a look at this problem?
I try to select number array from a JSON object, but have no idea how to do it.
https://stackoverflow.com/questions...5 -
Hi guys, anyone knows about Google App Engine custom runtimes and CloudSQL?
Please answer my question on StackOverflow.
http://stackoverflow.com/questions/...
Looks like no one there cares about helping me...8 -
Hilarious comments check it out on the cancer (stackoverflow.com) 😂
https://stackoverflow.com/questions... -
Earlier I used to help my college batch mates and juniors in coding and development stuff. Sometimes I used to do some projects with them myself to help them learn. Sometimes I used to go beyond limits to debug their errors, even spending hours with them physically or through TeamViewer.
But now I have realised that I had been no more than just stackoverflow.com to them. They just call me when they need me and don't even care about me as a friend.
So that's it. Now I have stopped helping such people. I don't care if that's rude or arrogant. I just don't want to do this. If they still are a friend, well and good otherwise they can leave. I don't care anymore. -
I will never make a backend in C# ever again.
Just look at this bullshit:
official docks, PAGES long: https://learn.microsoft.com/en-us/...
confused devs running rampant: https://stackoverflow.com/questions...
absolute total GARBAGE
literally ANY other language or framework, you set an env file and you fuck off. of course microsoft has to make the most convoluted pile of shit horse shit fuck shit that confuses everyone. i shouldn't have to pray to the dev gods every time i spin off a staging or production build that my environment variables are set correctly
GOD10 -
Such a savage! :D
Ref.:https://stackoverflow.com/questions...
PS: I am new to PycURL and love the speed improvement so far!
Got 1.9s to load the header and body info of https://www.google.com with the requests module.
BUT with PycURL I can do the same shit within 0.4s (including printing all the info on screen which also takes a little bit of time)! Holy fucking shit, mate! That's such a great tool!1 -
Going back to a php project after writing loads of typescript on a node stack, I suddenly miss the instantanious feedback loop on file save via `nodemon` for basic scripts and `mocha --watch --reporter min` for tests.
Using phpunit, I currently have to rerun the test manually whenever I feel like. Which now feels so annoying. Cause I didn't know besser.
Now I was searching for something similar in php and I find answers[1] pointing me to use either set up some npm hooks or set up gulp task or to use pywatch. phpstorm also is supposed to support file watchers and run test on every save, yet setting them up feels clunky.
[1] http://stackoverflow.com/questions/...1 -
https://stackoverflow.com/questions...
I'm quite tempted to tell him to implement everything static in Python and get this one maybe non-static string using RegEx, but I don't want to lose any more reputation. D:1 -
"blazor is far better than any other frontend framework"
ok:
https://stackoverflow.com/questions...
ah yes, very nice and easy to grok syntax
clowns
🤡25 -
I thought it would be a good idea to name my dev blog after a common runtime exception. I started looking up un claimed domain names. I guess stackoverflow.com is taken. Next idea... indexOutOfBounds...?12
-
Just realized that I didn't used stackoverflow.com for a month (+- a week or so). Mhhh I should start learning something new I miss it!1
-
Step 1: stackoverflow.com
Step 2: CTRL + C
Step 3: ALT + TAB
Step 4: CTRL + C
Step 5: FFFFFFFUUUUUUUUUUU3 -
I often hate about SOF because people downvoting for no reason or giving bullshit advice when they don't know shit. I must admit however sometimes it really helps and you can see that there are still competent people around, willing to help and explain.1
-
Anyone who would like to help me with this problem? (Collisions)
https://stackoverflow.com/questions...1 -
One of my favourite rant is this one:
https://devrant.com/rants/667491/...
Today I found out some other assholes doing the exact same thing.
But this time their company name was not int the profile but the answer time was unbelievably fast. So did a google search and from LinkedIn, in that they work in the same company. Flagged the question waiting it be removed.
Question Link: https://stackoverflow.com/questions...3 -
If you are going to maintain empty directories in your git repo then use the strategy of placing a file inside the directory called .gitkeep. Searching on this filename will lead you to a discussion of the same topic (hopefully, maybe not). Which includes a lengthy discussion on how the semantics of the file name is somehow more important than the answer of keeping the directory in the repo. My favorite part was someone claiming the file name .gitkeep was the standard way of maintaining a directory and others jumping on this person saying not it is NOT the standard way, and that in fact any filename would work. Misunderstanding that saying it was the standard probably only referred to placing a file and not choosing that exact name.
Basically it seemed to turn into an autists semantics fistfight in the comments.
https://stackoverflow.com/questions...
Someone is that discussion claimed .gitkeep would lead to confusion if it was a standard git filename. I then found this:
https://stackoverflow.com/questions...
Is it wrong to find so much humor in this?4 -
Me: "tokens are not mined in general, instead there are gas fees"
Them: "you will charge us for gas fees?"
Me: "no that's not us, that's the decentralized network doing that"
Them: "but we are using hyperledger to generate tokens."
Me: "yea in theory there are no gas fees, but you now have to manage the decentralized network"
Them: "i see, so since there is only probably 2 or 4 in the network, do we still charge ourselves? how do we define gas fees?"
(You don't see...)
Me: "i don't think there are gas fees"
Them: "got it, who set the gas fees"
(Um you don't got it...)
Me: "https://stackoverflow.com/questions..." -
Guys. please help.
I’m trying to build something with multiple crud pages using and angular and rails.
For some reason when I attempt to go one of the routes it fails and goes straight to the backup(otherwise).
It’s the patients/new route that isn’t working. Everything else seems fine so I’m not sure what else to add to the question. I’ve tried changing things around to narrow down the problem and I’m almost convinced it’s from the routes. The button works fine when I link to other pages.
fml. I’ve been up for too long. I can link to the Stack overflow question WHICH NO ONE WANTS TO ANSWER if you need an idea,
https://stackoverflow.com/questions... -
Hello, Hi! Friendly neighbourhood noob here!
What’s he stuck on today you ask? React and Firebase!
Did he try? Yes he did! Only a little hitch this time.
Really? Little?
...It’s all relative... like the truth!
Anyway PLEASE someone look at my StackOverflow question!!
https://stackoverflow.com/questions...
Firebase and react are awesome tbh. But I cant figure this out!
Thank you!! -
My laptop is having some power issues and it often turns off randomly.
Last time, it happened while running some git stuff and since git didn't finish properly, the whole git directory fucked up: I could not do anything with git anymore.
Later I find this dude: https://stackoverflow.com/a/...
If you're in here, Nathan VanHoudnos, just know that you save more lives than any politician1 -
Hey guys, could I ask you to upvote my question on stackoverflow or take a look and help me solve this if you can, I'm stuck with this problem for one week : https://stackoverflow.com/questions...
I would really appreciate it7 -
Linux is great
Linux can be customized
Welp, not so much. Simple things are not possible to do.
After 1H research I can't have timestamp near each line over SSH.
I'm not talking "history", i'm talking live.
basiclly I want to see timestamp on every single output line.
Basiclly this :
https://unix.stackexchange.com/ques...
But running automaticly for each command ever.
To be fair, same problem exists in PowerShell on windows
https://stackoverflow.com/questions...
And no, I don;'t want to switch to some random halfbaked teminal.31 -
So today I found out why I couldn't SCP stuff to one of my servers for the last 6 months.
It was a fricking "echo" in the .bashrc script (well, in a script that got sourced in there).
(Read: https://stackoverflow.com/q/...)1 -
I answered this question on Stackoverflow (Javascript) and I tried very hard not to lose my cool in the comments below: https://stackoverflow.com/questions..... How can you not see this?10
-
Have you ever been so frustrated with a problem that you almost posted a question to Stackoverflow.com just to find your answer minutes later?
Which reminds me, I need to comment on that thread where I found my answer. It wasn't entirely correct...4 -
Guys, please help out a fellow rantr in distress, I'm trying to get rid of FOUC here. My current solution almost works, but please check this out and a little help would be much appreciated.
http://stackoverflow.com/q/...1 -
You know you are done when stackoverflow gives upon you: http://stackoverflow.com/questions/...
So I decided to run a scheduled job on the server just before everyone starts using the it. -
FUUUCK TYPESCRIPT
It can't handle this function: `(arg) => arg` without kicking around a bunch of generics.
https://stackoverflow.com/questions...
This is ridiculous. The generics system on Typescript is complete trash, the amount of things it's unable to handle are unbelievable, and I feel like I'm taking crazy pills when I'm supposed to just accept that they couldn't possibly have done better.
Seriously, if I was one of the developers and I saw an issue like this, I wouldn't defend it; I'd be embarrassed.7 -
// new Rant("help needed!")
I really need some help guys! Would be nice if you could checkout
http://stackoverflow.com/questions/...
and help me out if possible :) Got some problems with ffmpeg on OS X not streaming https urls.
And if these kind of rants aren't supposed to be posted/created please tell me so. I am still not familiar with the overall flare of this community ;)8 -
Javascript doesn't suck.
Those retards at typescript and node, on the other hands
https://stackoverflow.com/questions...14 -
Quirk of C++ (also C I think)
int array[]={1,2,3,4,5};
int temp = array[0]; //valid access
int temp2 = 0[array]; // also valid
C++ is a member of the Foot Shooters Club languages of choice.
Also, this weekend I learned you cannot have a vector of references:
https://stackoverflow.com/questions...
Well, at least not without some pain.5 -
Stack Overflow question on best comment ever. My fav:
try {
} finally { // should never happen
}
http://stackoverflow.com/questions/... -
!rant
What is your opinion on StackOverflow Teams (https://stackoverflow.com/teams)?
I have mixed feelings! A mix of "oh god why!?" and "that might be a great tool!"1 -
i've been banned from SO again because too many people hit downvote on my shit without telling me why, so i'll ask in short here:
How the fuck are u64* and u64 different, why can't I cast between them or between them and a double and why the fuck is C gay?
Now, again but longer:
https://stackoverflow.com/questions...32 -
http://stackoverflow.com/questions/...
...and then you go whine that StackOverflow is full of arogant people that only downvote and flag. Yes they do... if you act like an ass or don't even go through the Tour.1 -
So StackOverflow has a new code of conduct. Let's see if it's going to actually improve interactions there. https://stackoverflow.com/conduct2
-
Friday so not much happened except after switching mysql connector it turned out mysql-connector-python can’t handle blobs properly.
Funny that answer on SO is not to use it.
https://stackoverflow.com/questions...
It’s not obvious cause all you get is error when selecting from table that have blob.
Also I bought two books full of slavic bestiary drawings and descriptions of monsters.
Those drawings are pretty cool. I plan to try to make low polygon model from one of the drawings using blender 2.83 -
Hey fellow ranters. Please help me with some trouble in my code :(
http://stackoverflow.com/questions/...
I think i'm losing hope in me and in my future as a developer... This is actually a pretty easy thing but nothing it is not working... Please help me!!8 -
Just read that if you try to access stackoverflow.com/admin.php it will redirect you to a funny youtube vid1
-
Finally discovered kind of explaining something that baffled me
https://stackoverflow.com/questions...
It really pisses me off as I've taken block scope for granted as a default thing.
I've got an open question to people in the community who know more than me, do most modern languages , scripting or not have block scope?4 -
Apparently the rants about StackOverflow had some kind of effect: https://stackoverflow.com/conduct3
-
Today I found a faulty design choice in java, that seriously makes me hate java. Basically java prohibits abstract static methods. This -combined with the poor design choices for constructors - means that Subclasses cannot have a common constructor or static method calling the constructor.
Basically meaning that you can't just map a collection to objects without handling EVERY FUCKING CASE, WRITING THE WHOLE MAPPING AGAIN AND AGAIN, ADDING A FORCED PORTION OF SPAGHETTI WITH EVERY CLASS WHERE THIS WAS NEEDED.
https://stackoverflow.com/questions...
There seem to be other OOP languages with this faulty design. Can't say if I now hate OOP ingeneral or not, because maybe some languages may have provided a substitute for this6 -
Guys, I have a question regarding dependency injection and MvvM on stackoverflow. If all of you can look at it and maybe answer is you know the answer then I would be super gratefull
Http://stackoverflow.com/questions/... -
On https://reactjs.org/docs/... it is declared that useEffect runs after render is done.
However... if you put into useEffect an expensive calculation or operation e.g. "add +1 to x billion times", it will get stuck after updating the data, but before the re-render is done.
This leads to inconsistency between the DOM and the state which I believe is a foundational point of react. Moreover, the statement that "useEffect runs after render" is false.
See also: https://stackoverflow.com/questions...
The solution is to add a timeout to that expensive operation, e.g. 50 ms so the re-render can finish itself.
The integrity of my belief in react has received a shrapnel today. Argh :D Guys, how this can be? It seems that useEffect is not being run after re-render.13 -
Hello, a question about Node project -
How to import node libraries only once and use them all over the project.
I have asked it on StackOverflow, link to it
https://stackoverflow.com/questions...
If you guys have any idea for it, please, share!15 -
Why do people try to answer questions they don't even know what mean...
I want to use a package that's made for nodejs and it's using one of the core module of nodejs (http), so that's a problem because react-native doesn't have that module and I can't just simply install it (it won't work), so I search the web in the quest for a solution maybe a drop-in replacement or a polifill or something, I got to this question that's exactly what I would ask if I were to do the question myself https://stackoverflow.com/questions... asking for a polyfill to use http module in react-native, and the only answer is from a guy that I don't think he even knows what he is talking about, his answer don't make any sense with relation to the question and doesn't even address package http nor polyfill so obviously he didn't even know what the title of the question means...
If you don't fucking know something, just stay fucking silent don't reply with giberish stuff that don't have nothing to do with what people are asking. You don't have know it all, don't feel you have to... and don't try to answer stuff you don't even know.4 -
Hey, I have a question concerning the use of jpa annotations in a kotlin multiplatform project and how to organize shared data classes.
I already posted the question on stackoverflow: https://stackoverflow.com/questions...
I would appreciate every help :) -
Any exprets to work with expressions in C# ?
I fucking don't get it...
var newExpression = oldExpression.Compose(x=> -1 * x) takes fucking 25 milli seconds.
BUT
var newExpression = oldExpression.Compose(x=> x > 0) takes 1 ms (or less).
WTF... the source "oldExpression" is the same in both cases.
First compose used for ordering, second for fdiltering.
1 hour already I'm trying to understand WHY first one is so slow. (It will be called like 500K times a day in prod).
the .Compose is based on :
https://stackoverflow.com/questions...9 -
I'm expecting my StackOverflow questiion to get shut down and some mod to want to piss on my corpse ( https://stackoverflow.com/questions... ) so I'll ask this here too. Anyone set up the open source Jenkin in a DR environment? I'd like an Active/active hosting solution but everything I read points to Cloudbee's... Post your answer on SO if you want, I'll vote up whatever looks good, but in case it does get shut down by the assholes with a god complex, please @ me :)5
-
My journey along Java continues and so I have discovered something I didn't know before:
If a subclass tries to call a method on its parent which it has not overridden, then it will call the method as if you hadn't used the keyword 'super' (and I think it will try to find it in the classpath and SDK).
Example 1:
public class SuperParent {
public String test(){
return "SuperParent";
}
}
public class Parent extends SuperParent {
}
public class Child extends Parent {
public String testChild(){
return super.test(); // same effect as test();
}
}
public class TestInheritance {
public static void main(String[] args) {
System.out.println(new Child().test()); // returns "SuperParent"
}
}
Example 2: with getClass():
public class Parent {
@Override
public String toString(){
return super.getClass().getSimpleName();
}
}
public class Child extends Parent {
}
public class TestInheritance {
public static void main(String[] args) {
System.out.println(new Child()); // prints "Child"
}
}
This here is of course a special case: .getClass() will always return the class name of its caller, so naturally in this case it returns Child and not Parent.
You would expect it to return "Parent" since you use 'super' in the overridden toString() but it returns the Class name of the Child (then there's something in programming languages such lexical scope and execution scope, which I'm not sure if it applies here).
The solution for this example is of course .getSuperClass().
Inheritance isn't always straight-forward.
References:
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...2 -
again xdebug not working and not giving any logs.
How can I at least get logs so that I could know what is wrong with it? I already tried this answer:
https://stackoverflow.com/questions...2 -
In regards to my last string of posts regarding react and Auth, I got it working the bearer token is being passed but now just getting XML errors every time I submit a form. All the data being passed is JSON. I've created a stackoverflow question https://stackoverflow.com/questions... as I'm getting nowhere and SO really isn't helping either. So if anyone wants to take a stab, go for it.11
-
Why useImperativeHandle in React is bad?
I have component A. I have component B which is a child of A.
I have button in component A that should change how component B is displayed.
Usual approach is to set state in A, change it upon click and pass that state as flag via props to B.
But there is another approach via exposing ref to component B using forwardRef() + useImperativeHandle().
And then calling method that belongs to B from A. Like this: bRef.current.changeDisplay()
https://stackoverflow.com/questions...
https://reactjs.org/docs/...
https://github.com/reactjs/...
People on SoF and Docs say that the first way is preferrable. But no one explain why.
Does anyone know why calling child method from parent is considered bad?4 -
200 Stack Overflow epeen points for anyone who can fix my problem:
https://stackoverflow.com/questions... -
I don't know why I can't understand how to use thymeleaf. It's concept makes sense, split an html page into two so you have a header html page made up of code you don't want to change, and an index html page of content you do want to edit. But no matter what it won't fucking connect the classes.
https://stackoverflow.com/questions...
If anyone has experience with this you can take a look at my post here on it, maybe give some input. For now though I'm going to just run a single html file and make comments in my index page. :/5 -
I swear to god dio and dart's http client is so fucking stupid. I can barely do something in 90 lines to get a web resource when I can do it in 10 with python's requests library. The support for storing cookies is nonexistent, and even with CookieJar/Dio I still need some stupid long hack like this:
https://stackoverflow.com/a/...
The worst thing is that this has happened twice now, the first time I resolved after a long fucking time trying to solve it, and now I have the same exact problem again, but I can't just simply copy my solution from last time to use in the latest problem.
Even curl is more useful than whatever the hell the http client for dart is1 -
I do not fully understand this.setState in reactjs with async functions, so I posted a question on SO,
https://stackoverflow.com/questions...
I have accepted the given answer as it makes sense. but in reality the solution does not work, can anyone shed some light on it?14 -
This post made me feel like I was parallyzed and now I'm superman
http://stackoverflow.com/documentat... -
¡¡Good news!! Finally solved the image upload problem with lumen and angular. It happens that, even the $request in Lumen was "empty" it turned out that the actual image file was a binary object inside the Lumen $request variable that didn't render because the browser, postman and everything I tried couldn't understand it (maybe something to do with the Content-Type). I figured out and solved it, now I can easily save, delete and even modify images when are in the server side.
One more thing... My code was fine the whole time, l mean like, 3 days of finding a big that doesn't exists haha
Everyday we learn some new si*t
For those who don't know what I'm talking about, the story is right here:
http://stackoverflow.com/questions/...
PS: thanks guys, I really appreciate your comments: @champion01 @itsdaniel0 @dfox @joetj3 -
StackOverflow “Community” background process has “Not a Robot” badhe
https://stackoverflow.com/users/-1/...1 -
I got situation here,
I am getting 524 error from cloud fare. I sent some data using AJAX, process it and then return the result. Since the data is large and have some SQL manipulation on it so it take a lot of time. I put the process in back end. But still even for 10k records it took 4-5 minutes to process, Issue is everything works fine but since cloud fare response time is 1-2 minute so it through 524 error (as it does not getting any response within its time frame). How I am suppose to tackle this. May be using job scheduler now ? My client simply refuse to send small data. My Friend is suggesting don't use ajax, simply reload the page. But again data is too much so page loading will also through 524 error. Kindaa stuck here. Any idea/suggestion how I can proceed.
Language I am using PHP. Database, MySQL and SQL.
Hmm Here is some more explanation
https://github.com/marcialpaulg/...
But not working
Here is also something
https://stackoverflow.com/questions...
But I am thinking why redirecting ? It doesn't make sense to me7 -
I need just a bit of advice.
I am working with node.js and React and mongoDb
I just want that please take a look at my schema architecture (Specially for address) for profile and suggest me which is better
Approach 1 :
https://paste.centos.org/view/...
The things that scared me with this approach. I tried this also But it become unnecessary headaches to insert address and then query address as it is nested schema .
Also if you check this out
https://stackoverflow.com/questions...
[Answer by Konstantin Smolyanin (Long Version))]
One must not considered nested state in react.
Approach 2
https://paste.centos.org/view/...
I can store address into another collection
Also is there any reference sites where I can learn about schema architecture or database design with practical scenarios.
Thanks for reading out.4 -
> Be me
> Get exhausted with Rusts borrow checker while making games and decide to switch to another language
> C# looked good, I just made a mod in it for stardew valley.
> Start a new engine based on MonoGame.
> All is going ok? Having minor issues with getting .csproj files set up but other than that fine.
> Get advice to switch to .NET core for higher compatibility.
> Start doing that
> Doesn't work at all, random weird errors all over the place.
> ProjectIsFucked.jpeg
> Delete folders, I didn't have much anyways.
> Make some basic boilerplate for both the engine and the game like 5 times, deleting the folders and starting over because errors.
> Finally get something to almost compile.
> Reinstall .NET
> Compile works.
> Compile again
> Compile fails
> Do dotnet restore
> Compile again
> Compile fails
> Do dotnet restore again
> Compile again
> Compile works
What in the ever loving fuck.
In all seriousness, if anybody knows what in the fuck is happening, I'd appreciate the help: https://stackoverflow.com/questions...4 -
Today, I went on the history of devRant that earlier how people used to post undefined rants. Even some who have knowledge can do it now!
I searched a lot about devRant on different media and got some bits
Here @AlgoRhytm asked a question on stackoverflow
https://stackoverflow.com/questions...
I kept reading there chatlogs
Many people joined and left this community (Sounds too bad). We lost many legends like @Linuxxx, @Skayo and more and more.
But still there are many good one remaining from ages like @Root, @Jilano, @theabbie and more and more
I don't know what I am conveying to you people but I will try my best to stay tuned with devRant because I love it.3 -
Any .Net gurus about? Got a question about testing how many open connections I have.
https://stackoverflow.com/questions...2 -
Hello, can anyone help me solve this issue? I cant find something about it anywhere
https://stackoverflow.com/q/... -
Any SOLR gurus out there. I have approx 10 hrs of doodling with queries and a problem I can't solve. Up for grabs at:
http://stackoverflow.com/questions/... -
Anyone familiar with webrtc native android? I am having some problem with audio quality. Asked on stack no one replied :(
Here is the question -
https://stackoverflow.com/questions...1 -
If anyone goods at objective-C / TwitterKit integration into iOS i would be most grateful if you guys could take a look at my post on SO: https://stackoverflow.com/questions...
-
I'm having troubles with gRPC inside Docker, cannot figure out why some references are undefined in the *_pb.go files
pkg/proto/notify/notify_grpc.pb.go:14:11: undefined: grpc.SupportPackageIsVersion7
pkg/proto/notify/notify_grpc.pb.go:71:30: undefined: grpc.ServiceRegistrar
More details: https://stackoverflow.com/q/...1 -
Since I'm not getting a lot of help on SO, might as well post it here. If anyone has experience with FFMPEG RTMP streaming and feels like helping a brother out, please do take a look :)
http://stackoverflow.com/questions/...1 -
People experienced with java/ multi threading , can you tell me how you build a pausing mechanism for threads? Like, if my bg thread is supposed to count for 100 seconds, and i need a mechanism to :
A: start it,
B: stop it on its counting completion/ manually
C: pause its execution at a number on a button click
D: resume its counting from the same number on another button click
How would i do that?
SO Question link here: https://stackoverflow.com/questions...21 -
Any grails dev here? I needed some help urgent but can't seem to get any answers from the internet or even the question I posted on SO. Here's the question:
https://stackoverflow.com/questions... -
Hey, anyone ever worked on Avro or Serialization?
Please have a look.
https://stackoverflow.com/questions...
I don't know why whenever I ask a decent question on StackOverflow it gets ignored. :/
And a stupid ones gets downvoted lol5 -
Can anyone help me solve this https://stackoverflow.com/q/...
I am stuck on this thing and did not receive any answers yet19 -
Someone answer this question.
I'm stuck on this.
I've tried almost everything that's possible
https://stackoverflow.com/questions...4 -
Is ECMAScript a dialect of Lisp?
"JavaScript has much in common with Scheme. It is a dynamic language. It has a flexible datatype (arrays) that can easily simulate s-expressions. And most importantly, functions are lambdas. Because of this deep similarity, all the functions in [recursive programming primer] 'The Little Schemer' can be written in JavaScript."
— Douglas Crockford
An interesting discussion on SO (https://stackoverflow.com/questions...)2 -
I really need help making my custom viewports appear in Storybook :( https://stackoverflow.com/questions...
-
Laravel docker ports configuration sucks. There is no fucking documentation in fucking laravel docs how how to fucking configure ports. I have set wrong port, wrong host with my docker setup and it was just giving fucking stupid error where lot of stackoverflow solutions do not help. FInnaly I found the solution here https://stackoverflow.com/questions...
which finally helped. So the host needed to set to the mysql instead of fucking localhost - I had found this in another SO answer but it was not enough. How the fuck can I know. Why it is not written in documentation. https://laravel.com/docs/8.x/...
And then port - it was needed 3306 - how the fuck could I know that I need it instead of 3000 which I have set in docker setup? Wtf.
Finnally when I made query "laravel docker what mysql port to use"
then I found this stackoverflow answer. Why need to make things so hard? -
Finally a good answer on how to wrap my Go web app in a container. https://stackoverflow.com/questions...1
-
When you ask a nice question on StackOverflow, everyone ignores it...
When you ask a dumb one, they shower downvotes -_-
https://stackoverflow.com/questions...2 -
Having trouble getting CSS to apply to a table in react. Thought I'd ask here. You guys are probably better than SO. Please and thank you
https://stackoverflow.com/questions...7 -
I Encountered this exception in Flutter "Unhandled Exception: Unable to RTCPeerConnection::createAnswer: Error (null)"
Anyone who face this before ? I am so new to this.
https://stackoverflow.com/questions...2 -
Any Karma experts in the house? Really want to blow my brains out :D
https://stackoverflow.com/questions... -
How deep do you go when trying to find a solution?
I have a need for combinations of items. I have used built in functions in Python for this. When I first used those I wanted to learn how they worked internally. I read through the source and thought that was cool. I don't think I really understood that code very well.
Now I need the same solution in C++. There is not a prebuilt combinations function in C++. There is a prebuilt verion of next_permutation. I can build upon that to make my combinations code. However, I am in the middle of trying to make something work. So I found this nice SO question:
https://stackoverflow.com/questions...
The code I ended up using:
template<class RandIt, class Compare>
bool next_k_permutation(RandIt first, RandIt mid, RandIt last, Compare comp){
std::sort(mid, last, std::bind(comp, std::placeholders::_2, std::placeholders::_1));
return std::next_permutation(first, last, comp);
}
template<class BiDiIt, class Compare>
bool next_combination(BiDiIt first, BiDiIt mid, BiDiIt last, Compare comp)
{
bool result;
do{
result = next_k_permutation(first, mid, last, comp);
}while(std::adjacent_find(first, mid, std::bind(comp, std::placeholders::_2, std::placeholders::_1)) != mid);
return result;
}
I am mostly able to figure out what is going on with the templates. I still am not understanding the basic algo behind permutations.
Our data set is tiny. 4 items max. So efficiency isn't really a big issue here.
How long do you spend learning how it works versus just finding a solution for the task at hand?
In general I need to spend more time learning different kinds of algorithms. So I should probably add permutations to that list of ones to study.1 -
I would like to share this piece of knowledge for the web devs out there, even though it's probably known:
If you're using the Spring framework and you want to accept a list of items as a multipart/form-data request, then Spring will only be able to correctly deserialize your JavaScript FileList in the backend if you have scripted it as follows:
var data = ev.dataTransfer.files;
var formData = formData();
for (i = 0, j = data.length; i < j; i++) {
formData.append('files', data[i]);
}
The for loop with the 'files' name is key here. Why? Because then it will resolve into:
key=val&key=val&key=val
and that's how Spring will correctly be able to deserialize it into a List. We remember from our HTML learnings that if we want values in a form to be processed as one, we must provide the same name= for each element in the form, otherwise if you have a separate name for each input, it won't be passed on as one collection of values.
This is why my list was originally null when received in the backend.
Courtesy of StackOverflow:
https://stackoverflow.com/questions...