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 - "callback hell"
-
Teacher: answer this question without Googling
Me : *gives answer after using DDG*
When will people realize that Google isn't the only way to browse the internet15 -
Happened during an exam!
Had a viva session after the exam
Examiner: how much do you know about Linux
Me: (pulls out phone and shows him the kernel I have been working on)
Examiner (to other teacher): give him full marks already11 -
SSH'd into all the computers in college's lab and edited the bashrc to display "YOU ARE BEING WATCHED / YOU'VE BEEN HACKED" etc.
Everyone freaked out instantly.
Then edited my own bashrc file too so that no one realizes it's me.
I was surprised at how easy it was.8 -
Short story time.
The last girl I dated was a proper geek. Like the kind of geek another geek wants. So one fine day she told me that she was making a greeting card for me. I was happy. After a few weeks she gave me the card and it was really cute. I loved it.
I reached home and received an email from her with a link in it. It was the link to a website she had made where each message from the card was deciphered to the real message.
DAAAAMNNN😱😱
That wasn't all. She didn't want the entire thing to be too easy. So the deciphered messages were password protected and I had to guess it.20 -
> finds files called "?" and "?.pub" in home directory. Not sure how they ended up there.
> tries deleting files
> rm ?*
> hits enter and realizes the disaster the very next moment
> cries in corner7 -
TABLE BASED WEB DESIGN
I was surprised there were no rants about this topic before I realized it was more than a decade back 😳
We've never had it better! So to help add a little perspective for all those ranting about what is unarguably the golden age for web developers... let me fill you in on web dev in the late 90's;
JavaScript was a joke. No seriously! - I once got laughed out of the room for suggesting we try use it for more than disabling a button - (I wanted to check out the new XHR request thingy [read AJAX]).
HTML was simple and purely a markup language (with the exception of the marquee tag). The tags were basically just p,ul,ol,h*,form inputs,img and table and html took 10 minutes to learn. Any style was inline and equally crude - anything that wasn't crude could not be trusted and probably wouldn't render at all in most browsers (never mind render correctly).
There were rumors of a style TAG and something called a cascading style sheet which were received with much skepticism since it went against the old ways and any time saved would be lost writing multiple [IE version specific] style sheets for each browser just to get it to work - so we simply didn't.
No CSS meant the only tags you had to work with to create a structured layout were br, hr and table... so naturally EVERYTHING was in nested tables! JS callback hell can't touch this! - it was not uncommon to have 50+ nested tables all with inline style in a single page which would be edited without any dev tools or linting.
You would spend 30 minutes scanning td tags until your eyes bled to find something, make a change, ftp the file to the server, reload the web page and then spend 10 minutes staring at the devastation on your screen convinced you broke
the internet before spotting an un-closed td tag with your bloodshot eyes.
Tables were not just a silver bullet - they were the ONLY bullet and were in the wild west!
Q: Want an inline form or to align your inputs left?
A: Duh table!
Q: Want a border with round-corners, a shadow or blur?
A: That's easy! Your gonna want to put that table in the center cell of another table then crop a image of the border into 6 smaller images to put in the surrounding cells... oh and then spend 10 minutes fucking with mystical attributes like cell-padding and valign to get them flush.
...But hey at least on the bright-side vertically & horizontally centering stuff was a breeze!22 -
Yesterday was Friday the 13th, so here is a list of my worst dev nightmares without order of significance:
1) Dealing with multithreaded code, especially on Android
2) Javascript callback hell
3) Dependency hell, especially in Python
4) Segfaults
5) Memory Leaks
6) git conflicts
7) Crazy regexes and string manipulations
8) css. Fuck css.
9) not knowing jack shit about something but expected by others to
produce a result with it.
10) 3+ hours of debugging with no success
Post yours27 -
Convincing my parents that I'm doing something useful on my computer and that it can also help me get a job5
-
StackOverflow members,
Please read the question properly at least once before marking it as a duplicate of another question with the similar keyword but asks a completely different question 😑😑4 -
Proud of my dad today.
He used to be the type of person who installs any application/software without reading what's being displayed on the screen. And my browsers used to be filled with all those toolbars and random search engines.
But yesterday when he was installing an app on his phone, he came to me asking "why does this app need access to contacts. It shouldn't require them in the first place".
I've succeeded in my mission.
Dad: 1
Shady Dev: 05 -
I attempted an online test for a Java Developer role at a pretty big company.
The test had a JavaScript question.
🤦🏽♂️🤦🏽♂️
Just to clarify, the job description had no mention of JS6 -
DevRant is such a small world. I posted a story about someone I know in real life and she posted a rant about me too.
And it's good to be back here.8 -
Changed my username to something other than my real name.
Realized my GitHub and website have my real name anyway.
🤦🏽♂️🤦🏽♂️12 -
Hey thanks Windows for automatically wasting my data on these two beautiful games.
I had to install windows only for gaming. And windows gives me these 😑13 -
God damn fucking shit.
Now I know again why I don't do apps.
This is a app as simple as can be:
Enter a link, click a button, do a http request, download a file.
BUT FUCKING HELL WHY ARE YOU SO FUCKING RETARDED ANDROID?!
I'm not familiar with java but i don't care why is this so freaking unintiutiv to get shit done? Why are there thousands of ways and none works or atleast at a easy way? Make an object for this, make an object for that...
THIS IS RETARDED.
In PHP a simple "file_get_contents" would do the job. I were even down for some curl shenanigans if it were an easy implementation. BUT GOD DAMN.
URL url = new URL("http://fuckinghardcoded.com")
Oh no can't compile because that MIGHT be an invalid URL. Ok try catch this or just tell the rest of the Programm to watch out for this bad boy cause he might throw a MalformedURLException.
Ditch that and try volley. Everything is document except how to fire that queue! Does it do that by itself? Do I really have to do an override to a function while declaring? CMON ON I'M A WEBDEV IS THIS TRYING TO DO A FUCKING CALLBACK AND IS THIS TRYING TO BE AN ANONYMOUS FUNCTION??? Why is this so frustrating and confusing? I'm also mad at myself this is dropdead simple shit but I can't get it to work. Fuck this, fuck java , fuck android and fuck myself10 -
FUCK THE RECRUITERS WHO ASK US TO MAKE AN ENTIRE PROJECT AS A CODE TEST.
Oh you need to scrape this website and then store the data in some DB. Apply sentimental analysis on the data set. On the UI, the user should be able to search the fields that were scraped from the website. Upon clicking it should consume a REST API which you have to create as well. Oh and also deploy it somewhere... Oh I almost forgot, make the UI look good. If you could submit it in one week, we will move towards further rounds if we find you fit enough.
YOU KNOW WHAT, FUCK YOU!
I can apply to 10 others companies in one week and get hired in half the effort than making this whole project for you which you are going to use it on your website YOU SADIST MOTHERFUCK
I CURSE YOUR COMPANY WITH THE ETERNITY OF JS CALLBACK HELL 😡😤😣9 -
So my friend was in a hurry when she was setting up the passocde for her phone and later she forgot the code.
So she takes it to the service center.
SC guy: Ma'am we have to do bla bla bla. And you will lose your data. It will cost you around $10.
She just came back and later gave me the phone.
*unlocks bootloader *
*flashes a custom recovery*
*delete passcode file*
Phone is now unlocked with all the data intact.
PS: I got a small treat at McDonald's. 😋6 -
I got a callback for mobile app development, I told them I had only worked in Android. When I got to the actual interview, "ok, your Resume and all is fine and all, but we are actually looking for an iOS developer" I stood up and walked out. I mean what in the name of holy fucking hell were you thinking you miserable son of a bitch.3
-
A lot of phrases we use in software would make awesome alternative-rock band names.
- Integer Overflow
- Curly Braces
- Recursion
- Callback Hell
- Daemon Processes
- Nested Loop
- Regular Expressions
Source: Twitter2 -
Interviewer: can you write a code snippet to explain function overriding
Me: *gives a practical example *
Interviewer: *not satisfied*
Me: what would be a proper example for the question?
Interviewer: *writes a text book example *
Her example didn't even need inheritance in the first place. It's one of those forced examples.
Next question: a riddle. Yes, a riddle4 -
So my Internet was down the entire day
*opens laptop
*realizes no internet
*closes laptop
*repeats this the entire day
After a point it becomes involuntary. My hand just automatically goes to the laptop2 -
Stranger at Cafe: what do you do?
Me: I study Computer Science
Stranger: Great! So should know how to operate this printer
Me: *facepalm*2 -
When Google messes up while creating a Google Form.
This is from the feedback form for a Google event4 -
Just to clarify thing, FaceID isn't the same tech as what we've had on Android.
In Android, it's based on image recognition. That's the reason it was so easy to bypass with a high resolution photograph.
In FaceID, it projects thousands of dots on your face and creates a depth inclusive map which is used for verification. That's the reason why it's supposed to work even if you have glasses on, etc
So please let's stop with the comparison11 -
ajax hell/dom hell
do you know it? no dont talk abut the callback hell.
i fcking hate it when i load any modern site, and it needs a few seconds to calc some stuff, xhr this, calc that, dom/css visible that. at all it takes more time specially if you on low end to mid equipmemt.
And then you think its finally loaded, you want to click or tab something and then another xhr was Finished, dom/css changed, and the button i was about to Click moved and i click something else.
friends of me hates this to.
so please dear webdevs, stop try to be cool and fancy just because you found out how "cool" conditions in css and dom is. stop using that bullshit angular (and so on) bullshit if you cant manage to pull out a html at start that will not changr its layout all the time after being loaded, ty.9 -
When someone wants help with a common error in a group and another person is encouraging him to actually look up the error online, DON'T SPOON FEED HIM WITH A STACKOVERFLOW LINK.
DON'T BE THAT GUY.1 -
So I started getting email notifications telling me about transactions made using my credit card. But I DON'T have a credit card in the first place.
Instead of trying to call customer care and pressing an endless array of buttons, I drive to the bank. I tell them the situation and they check every database they have but they couldn't find any trace of a card connected to my account. Turns out their database somehow had cross-links in their database.
How does the one of the biggest banks in the country possibly have such an issue. Worst part is that it's been a day and they still haven't fixed it -_-7 -
JavaScript.
So terrible language in so many ways, the code is a absolute mess, the shit of the callback hell of functions inside functions inside functions.
And now everything it's built around the tucking JavaScript, you have to learn it by force because there is almost no project that doesn't use it.
I know it has some benefits and because that is getting bigger but the syntax is the worst shit ever, I mean, switching from Python to JavaScript is a pain.
The only good thing is it's getting better with each ES iteration, but it is still a really big piece of crap with hundreds of frameworks.13 -
!rant
Now that I make decent money, I've started donating to non-profit tech foundations/companies. So far VideoLAN(the guys who make VLC) and WikiMedia done.
What else would you suggest? Thanks :)11 -
Dear devs/studios,
Stop showing me ads while in the middle of a game or while I'm actively using the app. At least wait till the process is completed.1 -
In case you thought Google didn't know what you spend your money on.
https://myaccount.google.com/purcha...7 -
With everyone praising the new Firefox, it feels good to have contributed to it in some small way :)3
-
So I was helping my friend debug her code.
A portion of text was not being displayed. We put log statements everywhere. Cross checked every line of code. We had almost started to lose it.
And then we found out that she had accidentally set the text color to white in the XML layout.
Just another one of those days. -
Was helping my dad with his Arduino project when I realized something beautiful about being a programmer.
I have never worked with Arduinos and I'm clueless about hardware stuff but I was still able to debug, go through documentation, example code and fix the issues.
Programming is equally about the passion, dedication and ability + curiosity to solve a new problem as is writing some piece of quality code.
I might have taken a while to realize it but it sure is a wonderful feeling.1 -
My brain used to be normal and I used to think callback is bizarre.
Now I understand callback and my brain has become bizarre. -
A rant on my feed reminded me of this
I once saw someone prefix his variables with the initials of his name. I was speechless.
Every goddamn variable in the entire project was named like that.6 -
Fuck NodeJS. I don't want you to be asynchronous sometimes. My gahwd I need like 3 deep nested loops just to get you to make a request and compile a damn JSON of requests.
I'm learning Golang goodbye forever node.15 -
With so many rants about Visual Studio, I wonder if there are devs here from the VS team and they read these rants xD3
-
So this guy I know mentions a 7/10 proficiency in web development on his resume and doesn't know about the web console in browsers.6
-
When you get so used to the terminal that you fire one up just to rename a file even though the GUI is right in front of you1
-
Not so long ago, I used to talk to Devs for advice.
And now people are asking me for advice in their paths.
FeelsGood
Anyone has had similar experiences?1 -
Me: I'm going to a hackathon this weekend.
Parents : are you sure it's legal and you won't get into trouble? You know, it seems to involve hacking
Took some time to explain the concept of hackathons. Same happened with a lot my friends. Many of them actually go to hackathons now.2 -
If you expect someone to help you with your errors/bugs, at least get some proper logs and explain what you tried that didn't work. Don't just spam them with pictures of errors or "something is wrong. Please fix".
I've seen people taking pics of their monitors. Half the code is eligible due to the glare -_-. At least take the effort of posting your code somewhere and sharing a link. GitHub would be the best go IMO3 -
[CMS Of Doom™]
Ah, yes, their built-in bullshit newsletter module just sent the n-th user n emails. Wonderful considering n=368.
The culprit? Better don't ask...
OK, anyway: So the mailer is running as a CRONjob, but nah, not as a console script call but by a public HTTP GET URL call, fucking obviously (it's the CMS Of Doom for a reason).
So these fucking imbeciles "implemented" an ob_start() callback where HTML links are - for whatever fucking reason - modified by some regex (obviously everybody knows parsing HTML by Regex is trivial). In this case the link was somehow modified to recall the mailer Cronjob...
This must have upset the pngoing mailing process thus spamming mails. Whyyyy
And I've thought I've seen it all after 6 months in this legacy hell...
This is why you don't run a company consisting of only beginners in PHP (in cluding their "CEO")! -
I hear so many rants/jokes about making releases on Friday evenings. But my new team makes almost all releases on Friday evenings 😶😶1
-
I hate you fucking callbacks. why don't you callback in the fucking order you were motherfucking called!!!! why must you force me to call a callback a callback!! 😣😡😤👹2
-
Generator functions should be treated like sorting algorithms: Not worth your time if all you have is 4 or less async instructions.
Callback hell is actually kind of nice and warm when you're a just a few levels down. If you're really confused by your obfuscated code, you suck at node. -
I don't want to ever hear that you're proficient in JavaScript if you put a callback function call inside of an async function right after using the await command.
All you manage to do in the end was make a simple function that gets data to populate a dropdown menu into something that is absolutely more awful to look at than the worst callback hell possible.
Refactoring this code base has really questioned my sanity and how much I'm willing to spend on alcohol.4 -
Solving a competitive coding problem.
Expected date format dd.mm.yyyy
My format dd:mm:yyyy
After spending some time on it, self cursing begins2 -
I always find it funny when people fight over certain aspects of Javascript. Like how callback hell is manageable, async functions etc
Do they forget that Javascript itself is a flaming pile of shit language to begin with? The inventor literally created the language in a week, so that should be the base line assumption on how "capable" that language will come out to be.13 -
Needed to display two strings on separate lines. Instead of creating 2 views and setting their data, I concatenated the strings with "\n" in between and displayed it in one text view1
-
So we have a course this semester called "Programming the web".
First lab:
Write a program using JS to take an int input using a alert box and then print it's multiplication table using ANOTHER ALERT BOX.
Yes, not even display on a page.
Next lab:
Print fibonacci numbers on a web page using JS. Because why not. Let's teach students JS how we taught them C and let's ignore the awesome stuff we can do with JS
Btw all this for a class that has never had a JS course and half the people don't even know what JS is. They just directly throw the program and are done with it.
I'm so gonna hate this semester1 -
I've noticed that lately I've not been putting a lot of effort in making my code clean, and in learning new stuff, too. If it works, that's enough for me. I just made some endpoints in node and it's the biggest callback hell you'll ever see, but I don't fucking care, tbh. Is it time for me to change my work field? Have you ever felt this way?3
-
The problem: callback hell. Code would be indented by three hundred fucking spaces just to do some async work. Your code would end with thirty lines of closing curly brackets
Solution: async and await.
The problem, reborn: NoSQL. Code is indented by three hundred fucking spaces just to run a query. Your query ends with thirty lines of closing curly brackets.4 -
For a person like me who makes a lot of typos, being able to view the password while typing is a boon. But I was a bit disappointed by the absence of a view in Android that could handle it out of the box. So I created my own library to handle the same.
Minimal configuration and you could choose the toggle image and the tint of the view. Interesting part is that even though Google has introduced this feature in their design support library, I still have a few users.
My first open source release and it got retweeted by multiple blog handles. 90+ stars feels like an achievement. The best part is that it got me noticed by a recruiter from a big startup here.
Here's the library
https://github.com/subhrajyotisen/... -
Now that I've joined a proper full time "software engineering" job, I guess it's time to get back to ranting.
It's been a month and a half since I've joined here and they have no work for me. And the fact that I've been given a Windows system with restricted access makes it worse4 -
Software development is a special kind of a nightmare. The kind that you wish you could wake up from, but can’t, because code is money and money is life.4
-
Since I see may rants(including mine) about non descriptive commit messages, here's something people can follow
https://udacity.github.io/git-style...
You don't need to exactly follow this but you get a good idea.
I personally follow something like this and it has helped me understand my old commits a lot.
Thoughts?1 -
When you work on something for few hours and then write a script to recursively replace strings in your project but forget to take into account the git index and end up corrupting it 🤦🏻♂️🤦🏻♂️
I know I should have pushed commits in between. Lesson learnt -
So I received an email from IEEE with my account credentials in plaintext and properly labelled as username and password.1
-
I expect somebody else has chosen this as well, but anyway:
Async.<any-function>, cause they brought me out of callback hell and taught me the undefined ways async...arghhhh fuck -
1. Docs
2. Tutorials
3. Realize tutorials skipped a few details
4. Back to step 1
And in most cases, joining a slack/telegram group for the tech -
During my career I have found that if you *don't use lambdas it will be harder for you to create callback hell. You don't NEED to use something everywhere just because you CAN.
"But lambdas are cool, our clients dig it".
Go fuck yourself.
*minimize the usage of2 -
Bloody fucking Android! Updates, updates and more updates! My development Nexus 5X won't allow me to sideload apps since it updated... Hello, printf debugging! Goodbye, profiler and debugger!
My hate for Android grows with each version after 4.0.$something... 2 was shit, I missed 3, 4 was OK, and since then it's going steeply down.
And don't get me started on Material Design...! Good luck figuring out what's a button and what's a label...
And what's up with the "let's keep all apps running all the time to save a few ms on start" philosophy!? Who thought that is a good idea!? Yeah, System.exit(0) works, but... Is it so hard to determine when it's not needed anymore (has no services running etc.)? Why should a web browser (for example) stay in memory after I quit? Minimize is a thing (Home button), why make it so confusing?
Another thing - feedback-less async tasks - why? I like to know when it is working in the background... How the hell am I supposed to find out if it is supposed to do this or if it is frozen?
And Android deciding to kill your process whenever it pleases without any callback... Happened to me once with an Activity in the foreground (no exceptions anywhere in my app, it just quit). How do you do IO properly? It seems you can't guarantee some file or socket or something that must be closed doesn't stay open (requiring to restart Bluetooth 'cause the socket wasn't closed, for example)...4 -
Rant/question:
httpDoSmth1().subscribe(x =>
...then(y =>
httpDoSmth2(x).subscribe(z =>
//do smth with z
return z
)
)
)
Isn't this (not my code) callback hell all over again? The 2. http call expects results from the 1. http call. I feel like this could be solved cleaner using async await/switchMap/etc. ... but not like this.13 -
!rant
So I'm gonna attend my first interview tomorrow. Just wanted to know what you all usually answer for the question "what are your weaknesses?". I know there are multiple results on Google for this but I wanted to devs' approach to this9 -
Architecture for Java REST API going to build/port from existing NodeJS one.
So Spring Boot + *
Lots of concurrent requests and large MongoDB calls. Current APIs use like 4GB memory for each instance because they don't use stream/pipe the response. Hold all data in memory and then return it all at once to user.
And well we expect more load in the future, so want to do this the right way.
So my understanding since this morning, is there's the blocking? MongoClient, (find* returns List) and now a Reactive MongoClient which is very async and like JS promises. Based on Pub, Sub model.
But the downside of JS promises was callback hell.
So actually 2 questions.
1. For each request, the db call done using the same MongoClient/db connection such that if there are 2 requests one would block the other?
2. Reactive Mongo would be non-blocking by design so would be better to support streamed responses?8 -
New job
Week 3: We might assign you to a new Java we might be creating
Week 5: So you might be working with the other team on an webapp.
That team has taken 2 weeks to decide the tech stack to use for the webapp and still hasn't decided.
Week 7: So we have only one role available right now and that's production support.
*Insert ultra rage face*3 -
I got to a point where I have a multi-level recursive promises within loops and my mental map is by far not enough to process this. I wish there were some visualisation tools for this - though I don't even know how it could look like. All I know is that at some point I'm returning a wrong promise and the recursion is not correctly handled.7
-
Ugh trying to refactor a Node.js MUD codebase to use mongodb. It currently accesses/stores it's data in json files via synchronous FS operations. Callback and/or .then hell, here I come!undefined callback hell async mongo javascript async hell node asynchronous promises muds mongodb nodejs
-
i always get sucked into this "cute code" hell whenever i am working with a b2c codebase, and especially with kotlin code.
here's a scenario:
task : build a debounce logic for an input view where each user input is currently triggerring an api call.
my steps
1. read what debouncing is.
2. see if any code is available on the internet
=> found a code piece on the internet with some level of abstraction ( basically a simple final class that implements the input event callback and encapsulates the debounce logic)
3) copy it, run it , it wokrs
------
for any sane coder, these steps are hardly 10-30 mins and they can move on with life. but its your truly that made this task into a 6hour research only to come up at similar solution. my curiosity led me to stupid places
1) why this class is final? what if someone else wanna use it but with a different behaviour? lets try open(non final class) .
2) why even use a class? it extends an interface, lets try to wrap the logic in interface itself (kotlin supports interfaces that don't require implementation)
3) umm , the interface works but it looks ugly, with all its global overridden variables. what about we make it extension?
4) yeah the extension approach is also not very good, lets go back to open class.
5) but extend is super nice to look! lets keep the extension and open class too
6) can we optimise the implementation? why it uses an additional handler? what if we provided everything in constructor? how about builder pattern?
FUCK MY BRAIN! there are so much fucking options that i forgot that i spent 4 hours on this small thing
the simplest approach would have been tk just shove all the listeners and everything in activity and forget about it :/
senior devs on this platform, how do you stop yourself from adding every concept that you know into the smallest possible task?6