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 - "callbacks"
-
I tutor people who want to program, I don't ask anything for it, money wise, if they use my house as a learning space I may ask them to bring cookies or a pizza or something but on the whole I do it to help others learn who want to.
Now this in of itself is perfectly fine, I don't get financially screwed over or anything, but...
Fuck me if some students are horrendous!
To the best of my knowledge I've agreed to work with and help seven individuals, four female three male.
One male student never once began the study work and just repeatedly offered excuses and wanted to talk to me about how he'd screwed his life up. I mean that's unfortunate, but I'm not a people person, I don't really feel emotionally engaged with a relative stranger who quite openly admits they got addicted to porn and wasted two years furiously masturbating. Which is WAY more than I needed to know and made me more than a little uncomfortable. Ultimately lack of actually even starting the basic exercises I blocked him and stopped wasting my time.
The second dude I spoke to for exactly 48 hours before he wanted to smash my face in. Now, he was Indian (the geographical India not native American) and this is important, because he was a friend of a friend and I agreed to tutor however he was more interested in telling me how the Brits owed India reparations, which, being Scottish, I felt if anyone was owed reparations first, it's us, which he didn't take kindly too (something about the phrase "we've been fucked, longer and harder than you ever were and we don't demand reparations" didn't endear me any).
But again likewise, he wanted to talk about politics and proving he was a someone "I've been threatened in very real world ways, by some really bad people" didn't impress me, and I demonstrated my disinterest with "and I was set on fire once cos the college kids didn't like me".
He wouldn't practice, was constantly interested in bigging himself up, he was aggressive, confrontational and condescending, so I told him he was a dick, I wasn't interested in helping him and he can help himself. Last I heard he wasn't in the country anymore.
The third guy... Absolute waste of time... We were in the same computer science college class, I went to university and did more, he dossed around and a few years later went into design and found he wanted to program and got in touch. He completes the code schools courses and understandably doesn't quite know what to do next, so he asks a few questions and declares he wants to learn full stack web development. Quickly. I say it isn't easy especially if it's your first real project but if one is determined, it isn't impossible.
This guy was 30 and wanted to retire at 35 and so time was of the essence. I'm up for the challenge, and so because he only knows JavaScript (including prototypes, callbacks and events) I tell him about nodejs and explain that it's a little more tricky but it does mean he can learn all the basis without learning another language.
About six months of sporadic development where I send him exercises and quizzes to try, more often than not he'd answer with "I don't know" after me repeatedly saying "if you don't know, type the program out and study what it does then try to see why!".
The excuses became predicable, couldn't study, playing soccer, couldn't study watching bake off, couldn't study, couldn't study.
Eventually he buys a book on the mean stack and I agree to go through it chapter by chapter with him, and on one particular chapter where I'm trying to help him, he keeps interrupting with "so could I apply for this job?" "What about this job?" And it's getting frustrating cos I'm trying to hold my code and his in my head and come up with a real world analogy to explain a concept and he finally interrupts with "would your company take me on?"
I'm done.
"Do you want the honest unabridged truth?"
"Yes, I'd really like to know what I need to do!"
"You are learning JavaScript, and trying to also learn computer science techniques and terms all at the same time. Frankly, to the industry, you know nothing. A C developer with a PHD was interviewed and upon leaving the office was made a laughing stock of because he seemed to not know the difference between pass by value and pass by reference. You'd be laughed right out the building because as of right now, you know nothing. You don't. Now how you respond to this critique is your choice, you can either admit what I'm saying is true and put some fucking effort into studying cos I'm putting more effort into teaching than you are studying, or you can take what I'm saying as a full on attack, give up and think of me as the bad guy. Your choice, if you are ready to really study, you can text me in the morning for now I'm going to bed."
The next day I got a text "I was thinking about what you said and... I think I'm not going to bother with this full stack stuff it's just too hard, thought you should know."23 -
Manager: You can’t define an async function without using await.
Dev: Yes you can.
Manager: Well you shouldn’t, there’s no point!
Dev: Yes there is. It can turn blocking synchronous logic into work performed concurrently. In this case the perform—
Manager: It’s called async *await*. Async *AWAIT*! Did you hear the two parts to that? You shouldn’t ever have one without the other. THEY GO TOGETHER. Worrying about concurrency is for people who use callbacks which just goes to show how out of date your skills are. I’m reading a book on javascript and there are so many advanced techniques out there that I haven’t even seen you use ONCE!
Dev: …
*I looked at the book he’s reading, it’s from the < ES6 era… no wonder he doesn’t see me using any of those archaic patterns/hacks/workarounds…*13 -
I got laid off from my previous position as a Software Engineer at the end of June, and since then it was a struggle to find a new position. I have a good resume, about 4 years of professional dev experience and 5 years of experience in the tech industry all together, and great references.
As soon as I got laid off, I talked to my old manager at my previous company, and he said that he'd love to hire me back, but he just filled his last open spot.
In order to prepare, I had my resume reviewed by a specialist at the Department of Labor, and she said that it was one of the better resumes that she had seen.
There aren't a huge amount of dev jobs in my area, and I got a TON of recruiter emails. But they were all in other states, and I wasn't interested in moving.
I applied to all the remote and local positions I could find (the ones that I was qualified for,) and I just got a bunch of silence and denials from all my applications. I had a few interviews that went great, but of course, those companies decided to put the position on hold so they could use the budget for other things.
The silence and denials were really disconcerting, and make you think that something might be wrong with you or your interviewing abilities.
And then suddenly, as if the floodgates had opened, I started getting a ton of callbacks and interviews for both local and remote opportunities. I don't know if the end-of-year budget surpluses opened up more positions, but I was getting a lot of interest and it felt amazing.
Another dev position opened up at my previous company, and I got a great recommendation for that from my former manager and co-workers. I got a bunch of other interviews, and was moved onto the next rounds in most of them.
And finally, I got reached out to regarding a remote position I applied for a while ago, and the company was great about making the interview process quick and efficient. Within 2 weeks, I went from the screening call, to the tech call, and to the final call with the CTO. The CTO and I just hung out and talked about cars/boats/motorcycles for half the interview, and he was an awesome guy. AND THEN I GOT AN OFFER THE NEXT DAY!
The offer was originally for about the same amount as I made at my previous job, but I counteroffered up a good amount and they accepted my counteroffer!
It's a great company with offices all over the world, and they offer the option to travel to all those offices for visits if you want. So if you're working on a project with the France team and you think that it'd be easier to just work with them face-to-face, then the company will pay to fly you out to Paris for the week. Or you can work completely remotely. They don't mind either way.
I'm super excited to work with them and it feels great to be back in the job world.
Sorry about the long post, but I just wanted to tell my story and help encourage anybody out there who's going through the same thing right now.
Don't get discouraged, because you WILL find an awesome opportunity that's right for you. Get somebody to go over your resume and give you improvement recommendations. Brush up on your interviewing skills. Be sure to talk about all the projects you've worked on and how they positively impacted people and/or companies.
This is what I found interviewers responded the best to: Be sure to emphasize that you love learning new things and that you love passing along that knowledge to other people, and that your goal is to be an approachable and reliable source of knowledge for the company and to be as helpful as possible. It's important to be in a position that encourages both knowledge growth and knowledge sharing, and I think that companies really appreciate that mindset in a team member.
Moral of the story: YOU GOT THIS!10 -
That awkward moment when you learn about callbacks and lookup tables and your whole menu logic goes from a 2 page long switch-case to 3 lines of code... 😂2
-
Oh man. Mine are the REASON why people dislike PHP.
Biggest Concern: Intranet application for 3 staff members that allows them to set the admin data for an application that our userbase utilizes. Everything was fucking horrible, 300+ php files of spaghetti that did not escape user input, did not handle proper redirects, bad algo big O shit and then some. My pain point? I was testing some functionality when upon clicking 3 random check boxes you would get an error message that reads something like this "hi <SENSITIVE USERNAME DATA> you are attempting to use <SERVER IP ADDRESS> using <PASSWORD> but something went wrong! Call <OLD DEVELOPER's PHONE NUMBER> to provide him this <ERROR CODE>"
I panicked, closed that shit and rewrote it in an afternoon, that fucking retard had a tendency to use over 400 files of php for the simplest of fucking things.
Another one, that still baffles me and the other dev (an employee that has been there since the dawn of time) we have this massive application that we just can't rewrite due to time constraints. there is one file with (shit you not) a php include function that when you reach the file it is including it is just......a php closing tag. Removing it breaks down the application. This one is over 6000 files (I know) and we cannot understand what in the love of Lerdorf and baby Torvalds is happening.
From a previous job we had this massive in-house Javascript "framework" for ajax shit that for whatever reason unknown to me had a bunch of function and object names prefixed with "hotDog<rest of the function name>", this was used by two applications. One still in classic ASP and the other in php version 4.something
Legacy apps written in Apache Velocity, which in itself is not that bad, but I, even as a PHP developer, do not EVER mix views with logic. I like my shit separated AF thank you very much.
A large mobile application that interfaced with fucking everything via webviews. Shit was absolutley fucking disgusting, and I felt we were cheating our users.
A rails app with 1000 controller methods.
An express app with 1000 router methods with callbacks instead of async await even though async await was already a thing.
ultraFuckingLarge Delphi project with really no consideration for best practices. I, to this day enjoy Object Pascal, but the way in which people do delphi can scare me.
ASP.NET Application in wich there seemed to be a large portion of bolted in self made ioc framework from the lead dev, absolute shitfest, homie refused to use an actual ioc framework for it, they did pay the price after I left.
My own projects when I have to maintain them.9 -
Finally finished the screwdriver followup ticket. I think.
I spent almost two full days (14 hours) on a seemingly simple bug on Friday, and then another four hours yesterday. Worse yet: I can’t test this locally due to how Apple notifications work, so I can only debug this on one particular server that lives outside of our VPN — which is ofc in high demand. And the servers are unreliable, often have incorrect configuration, missing data, random 504s, and ssh likes to disconnect. Especially while running setup scripts, hence the above. So it’s difficult to know if things are failing because there’s a bug or the server is just a piece of shit, or just doesn’t like you that day.
But the worst fucking part of all? The bug appeared different on Monday than it did on Friday. Like, significantly different.
On Friday, a particular event killed all notifications for all subsequent events thereafter, even unrelated ones, and nothing would cause them to work again. This had me diving through the bowels of several systems, scouring the application logs, replicating the issue across multiple devices, etc. I verified the exact same behavior several times over, and it made absolutely no sense. I wrote specs to verify the screwdriver code worked as expected, and it always did. But an integration test that used consumer-facing controller actions exhibited the behavior, so it wasn’t in my code.
On Monday while someone else was watching: That particular event killed all notifications but ONLY FOR RELATED EVENTS, AND THEY RESUMED AFTER ANOTHER EVENT. All other events and their notifications worked perfectly.
AKL;SJF;LSF
I think I fixed it — waiting on verification — and if it is indeed fixed, it was because two fucking push event records were treated as unique and silently failing to save, run callbacks, etc.
BUT THIS DOESN’T MATCH WHAT I VERIFIED MULTIPLE TIMES! ASDFJ;AKLSDF
I’m so fucking done with this bs.8 -
A co-worker doesn't like to use async/await operators, so he's always changing the code to use promises and callbacks and apparently async functions whitout awaits...1
-
PM : "I will not tolerate this."
Me : "I don't like it either inside callbacks."
Fellow dev sitting next to me : *facepalm*6 -
Today on "How the Fuck is Python a Real Language?": Lambda functions and other dumb Python syntax.
Lambda functions are generally passed as callbacks, e.g. "myFunc(a, b, lambda c, d: c + d)". Note that the comma between c and d is somehow on a completely different level than the comma between a and b, even though they're both within the same brackets, because instead of using something like, say, universally agreed-upon grouping symbols to visually group the lambda function arguments together, Python groups them using a reserved keyword on one end, and two little dots on the other end. Like yeah, that's easy to notice among 10 other variable and argument names. But Python couldn't really do any better, because "myFunc(a, b, (c, d): c + d)" would be even less readable and prone to typos given how fucked up Python's use of brackets already is.
And while I'm on the topic of dumb Python syntax, let's look at the switch, um, match statements. For a long time, people behind Python argued that a bunch of elif statements with the same fucking conditions (e.g. x == 1, x == 2, x == 3, ...) are more readable than a standard switch statement, but then in Python 3.10 (released only 1 year ago), they finally came to their senses and added match and case keywords to implement pattern matching. Except they managed to fuck up yet again; instead of a normal "default:" statement, the default statement is denoted by "case _:". Because somehow, everywhere else in the code _ behaves as a normal variable name, but in match statement it instead means "ignore the value in this place". For example, "match myVar:" and "case [first, *rest]:" will behave exactly like "[first, *rest] = myVar" as long as myVar is a list with one or more elements, but "case [_, *rest]:" won't assign the first element from the list to anything, even though "[_, *rest] = myVar" will assign it to _. Because fuck consistency, that's why.
And why the fuck is there no fallthrough? Wouldn't it make perfect sense to write
case ('rgb', r, g, b):
case ('argb', _, r, g, b):
case ('rgba', r, g, b, _):
case ('bgr', b, g, r):
case ('abgr', _, b, g, r):
case ('bgra', b, g, r, _):
and then, you know, handle r, g, and b values in the same fucking block of code? Pretty sure that would be more readable than having to write "handeRGB(r, g, b)" 6 fucking times depending on the input format. Oh, and never mind that Python already has a "break" keyword.
Speaking of the "break" keyword, if you try to use it outside of a loop, you get an error "'break' outside loop". However, there's also the "continue" keyword, and if you try to use it outside of a loop, you get an error "'continue' not properly in loop". Why the fuck are there two completely different error messages for that? Does it mean there exists some weird improper syntax to use "continue" inside of a loop? Or is it just another inconsistent Python bullshit where until Python 3.8 you couldn't use "continue" inside the "finally:" block (but you could always use "break", even though it does essentially the same thing, just branching to a different point).19 -
Alright, biiiiig rant time.
Shitty webdevs who randomly use an entire framework for some tiny feature in the middle of their codebase because they couldn't figure out how to do it with native and completely fucking up their syntax, consistency and standards set beforehand (not that there were any to begin with, this dude program's like 3-4 people just jumbled all their crap into one massive pile).
Not only that but throughout the entire backend this guy flip-flops on passing an the error value before results in his callbacks, so now i have to check his functions everytime I use them after spending 2-3 sessions debugging to figure out wtf was going wrong.
Please for the love of god, if you wanna dance to your own beat, LEAVE COMMENTS4 -
Called someone special...
She didnt pick up...
Then was no "CALLBACKS" for 2 days...
Which made me break my "PROMISE"...
(JS and NodeJS DEVS will understand)4 -
Back in the day, when callbacks was all I've found on Internet tutorials, my code looked like this (img) . But then I found something called "async" and it changed my life!
But I couldn't let go of my old ways, so the code with async looked just like the callback one, but with new boilerplate code.
The thing is: you can't simply USE something new like you were using the old one. you'll probably use it wrong. you have to understand that this new thing is different and adapt your thinking process to better work with it.
you can sit on a skateboard and go forward using your hands on the ground to push it, but that's not how it was designed to work.
I still use callbacks because I have no intention of rewriting my working codebases right now (because they work just fine). But, even with my struggles in changing to new tech, I've learned to adapt (sort of).1 -
if ( condition ) {
callback(data)
}
callback(error)
--is a lot different than--
if ( condition ) {
callback(data)
} else {
callback(error)
}
callbacks are not return statements 🤦♂️9 -
So in Germany we have something like 'cooperative study'. You are employed in a company and study 'normal' at a university. This is in 3 month phases, i.e. 3 months working, 3 months studying.
At the moment I'm working and there is a colleauge, that seems to have no high confidence in my programming skills.
Today I saw parts of his NodeJS code and I thought I'm going crazy.
No comments, no real usage of callbacks or at least promises and I dont want to talk about naming of the variables.
I caught myself arguing with this guy too often and always thought I'm the stupid one, that doesn't understand him.
But I'm starting to think, He is the one that is hard to understand.
How ever, I stay confident and also keep a nice tone (also help as much as I can) and sometimes we also have the same thoughts in some topicd. It's not that bad, but sometimes I feel underestimated.
But hey, so it's a bigger surprise if I'm presenting my results and show them what I'm able to do 👍🏻2 -
When it feels impossible to get your javascript callback to happen at the right time, so you just throw the callback somewhere just so it works, but you know that it's not the ideal spot for it... 😡😡😡
🖕💻6 -
- Knock Knock
- Knock Knock
- Who's there?
- Your mysql query callback
- Your mysql query callback4 -
Is it just me or the patterns of speech of some people get increasingly more annoying when you realize they speak with callbacks.
For example:
Person1: "Oh, I gotta tell you about the color of my new bike"
Me: "Nice, so what did you decide?"
Person2: "I was undecided about which color to select because of what happened to Andrew, Andrew told his his girlfriend, which by the way got recently pregnant, I can't believe she is expecting! She looks so young. Do you know how old is she?"
Me: "No, but she does look young"
Person2: "Yeah, I wish I looked that young. I have been trying to get in shape again but I have been so busy lately. My boss has been giving me so many assignments lately and I have been having to neglect my dog which is a shame cause he is such a good doggo. The other day we went to the park and someone left the door open and he didn't chase the cars. Do you remember when he was a puppy and he kept pulling the leash trying to chase the cars?"
Me: "Yeah, I remember being scared of him getting run over by a car. I am glad he isn't doing that anymore"
Person2: "Yeah, when I was 15 years old I had a dog that died just like that, it was so traumatic. His name was Jack and he was so feisty. As a matter of fact most small dogs I have seen are feisty."
...
And so on. In the back on my mind I have to keep track of some unanswered questions like: What happened to Andrew? What color is the bike? And the conversation keeps getting derailed. It's exhausting and it feels just like if I was reading code with a lot of callbacks.7 -
A year ago I ranted, that I understood JavaScript callbacks.
That was a lie. I knew nothing.
But I think I scratched the surface by getting into functional programming this time.3 -
My definition of hell?
Being forced to debug nested callbacks abusing global variables & closures generated from from reflection...6 -
Fuck you JavaScript with your blocks within blocks within blocks, your promises and callbacks, your million of libraries that are doublons or not finished. Fuck you with your assigning variable before functions, fuck you!11
-
Sorry, need to vent.
In my current project I'm using two main libraries [slack client and k8s client], both official. And they both suck!
Okay, okay, their code doesn't really suck [apart from k8s severely violating Liskov's principle!]. The sucky part is not really their fault. It's the commonly used 3rd-party library that's fucked up.
Okhttp3
yeah yeah, here come all the booos. Let them all out.
1. In websockets it hard-caps frame size to 16mb w/o an ability to change it. So.. Forget about unchunked file transfers there... What's even worse - they close the websocket if the frame size exceeds that limit. Yep, instead of failing to send it kills the conn.
2. In websockets they are writing data completely async. Without any control handles.. No clue when the write starts, completes or fails. No callbacks, no promises, no nothing other feedback
3. In http requests they are splitting my request into multiple buffers. This fucks up the slack cluent, as I cannot post messages over 4050 chars in size . Thanks to the okhttp these long texts get split into multiple messages. Which effectively fucks up formatting [bold, italic, codeblocks, links,...], as the formatted blocks get torn apart. [didn't investigate this deeper: it's friday evening and it's kotlin, not java, so I saved myself from the trouble of parsing yet unknown syntax]
yes, okhttp is probably a good library for the most of it. Yes, people like it, but hell, these corner cases and weird design decisions drive me mad!
And it's not like I could swap it with anynother lib.. I don't depend on it -- other libs I need do! -
DEI QA: “For step 2 should the checkbox be checked? Or uncheck ?”
… Step 2 of my testing steps reads: “Check it [the checkbox], save it, reload it. The box should still be checked. Repeat to uncheck it, just to be pedantic, then leave it off so we can test the existing behavior.”
🤦🏻♀️
DEI QA: “The payment_method_identifier will be in api callback logs if `Return payment method identifier in auth/confirmation callbacks` is checked?”
🤦🏻♀️
Me: it does what it says on the tin.
DEI QA: “BTW its a `tin`.”
DEI QA: “In Canada its `Taxpayer Identification Number`”
🤦🏻♀️ -
How much does a syntax of a language impact ur opinion of it and wether you'll want to use/learn it?
Some languages I look at and it just looks like an unreadable mess, i dont even bother with. Avoided nodejs up until i didnt have to deal with 100 nested callbacks...10 -
Dear other developers,
Don't throw exceptions in async callbacks goddammit. It doesn't abort the outer function where you think it does, and it crashes the app because you can't catch it.4 -
Guys, what the fuck.
Today i was doing some consistancy checks accross the board after update made for one of our core systems that manages money. Yeah, real, live money.
I have hidden from public payment processor with simple API etc. So one of my checks, gate has same balances as gate's internal account on core blinked red. Okay well, fuck, thats really really shitty situation to be in. I guess my gate is fucked up some way.
Okay, debug mode on, maintainence mode on, quick look at DB, oh shit, client payed 4 times 15k eur without any txn on core system... SHIT! postman... Fuck, postman ofc wont start, quick google, fixing postman, tention in me grows, becouse its really rough and tough fuckup on my side, and got call. That moment when you know someone already knows is for me apogeum of stress that just skyrocketed from calm morning to mad morning.. Okay, i pick up phone, and I hear that one client payed (using core system app) and got strange message, YES I KNOW, im working on it.. Wait, you say that core system gave them odd message??? I will check it out. Finally fixed postman, 3 requests and I know its bug on core system.
Why, why in the motherfucking blody world anyone would push critically bugged update to system that just sends api callbacks "yes, he payed" when someone didnt pay...
Fuck im stressed and pissed, but at same time reliefed its not my personal fuckup (yeah, I solo wrote that gate, but externally audited code and all they had to say that some cosmetic linting should be done)3 -
I've spent many years in a bubble of 1 backend lang.. but when i started checking out other langs, I got very annoyed that each one has same basic stuff but with different syntax... Can we just agree on something? Ffs!
We really couldnt come up with unified syntax for -
false, False FALSE
OR or ||
def func function
And dont get me started on all the variations of for loops... Its like we are trying make our life hard
Looking at new versions of some langs, looks like they are copying new stuff from one another.. with different syntax.. thanks!
Nodejs trying to look more like she doesnt have callbacks.. while other langs adding callback functionality... Why why why?!2 -
We are researching enhancing our current alerting system (we use Splunk) to be 'smarter' about who is emailed/texted/whatever when there are problems in our applications.
Currently, if there are over 50 errors logged within a 15 minute period, a email/phone/text blast to nearly 100 individuals ranging from developers, network admins, DBAs, and vice presidents.
Our plan is to group errors by team and let each team manage their own applications. Alert on 1 error, 5, 500...we don't care, let the team work out the particulars.
The trick was interfacing with Splunk's API (that's a long rant by itself)
In about a day or so I was able to use Splunk's WebHook feature to notify a WebAPI service I threw together to send myself an email with details about the underlying data (simulating the kind of alert we would send to the team)
I thought ...cool... it worked. Show it off to the team, most thought it was a good start, except one:
Dev: "The errors are not grouped by team."
Me: "No, I threw the webapi service together to demonstrate how we can extract the splunk bits to get access to the teams"
Dev: "Well...this won't work at all."
Me: "Um..what?"
Dev: "The specification c l e a r l y states the email will be team based. This email was only sent to you and has all the teams and their applications"
Me: "Um...uh...the service can, if we want to go using a service route. Grouping by team name is easy using a LINQ query. I just through this service together yesterday."
Dev: "I don't know. Sounds like I need to schedule a meeting to discuss what you are proposing. I don't think emailing all that to everyone is a good idea."
WTF! Did you not listen to what I said?!!!
Oh well..the dev's proposal is to use splunk's email notification and custom Exchange rules with callbacks into splunk that resend...oh good lord ...a fracking rube goldberg of a config nightmare ...
I suspect we'll go the service route once I finish the service before the meeting.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
-
Yet another day at my company, Im rewriting some old code for client (rewriting old, php 4 system for vindications managment) and you know the moment when you are focused and someone comes to you to absolutely ruin your focus. Fine, whatever. Oh, for fuck sake. Again dev is doing as support becouse one moron with second can't login into zimbra admin panel and add fucking mailbox. I show them exacly how they login, remind them they are admins too, slowly show them, so you click "manage" than you click that gear icon and than you click "new", fill in email address and password. As simple as 1-2-3. Okay, fuck it, time to go for a cig. I just finish up few lines and stand, grab my vape and start walking towards door. In door I find my buddy with 2 random people. He told me that they are interns and that I should show them some basics and stuff around that. Oh god, fuck my life. If anything, Im definitely very bad teacher, mainly becouse I often have problems with saying what I mean in the way that somebody actually understans and knows what I am trying to say. Whatever. Fuck it all. I grab two of our old laptops that nobody used in like a year or so, and first thing I quickly figure out, is that one day for some what the fuck reason I dont even dont bothered to remember I installed Arch on both while I dont usually use Arch. I just needed it for some specific reason. Whatever. So I guess I will need to upgrade fucking system. Our network isn't really great so that was like... hour or so. In the meantime I figured what they know about coding in general etc, and holly shit. One of them (there was boy and girl), girl, apparently never ever in her life even touched code. Well... fuck. Why am I wasting my time? Becouse there was some programme or some shit like that... Someone could tell me before so I could mentally prepare.. fuck it. whatever. So while laptops are doing their pacman thing, I sit with them and slowly start to explain based on my machine some really basic concepts. Second guy actually had some expirience, he knew how to make some really really basic logic and stuff, so he had another world of problems, becouse it was PHP and, as we all know, everyone hates PHP, and... yeah.. You can probably imagine his approach. Yes, you get user input in super global array. I really wanted to say "Now shut the fuck up and write that fucking $_POST".
hour or so passed, I was close to giving up to not let my anger rise (im not really good teacher... I mentioned it. I suck at teaching others) but luckly machines upgraded. He wanted to use visual studio code, she didnt care too much, so I installed phpstorm in trial mode. whatever. Since that's linux and they were not comfortable with that, I walked them through installing LAMP stack, and when finally it started to look like LAMP stack, I requested them to google how to install xdebug, becouse xdebug is very usefull and googling skill is your best weapon on that field. I go for cig, come back and what I see boiled me a little bit. The girl was stuck looking at github page randomly looking through xdebug source code and idk... hoping for miracle (she admited she thought there will be instructions somewhere) and the guy was in good place, xdebug has a place to paste your phpinfo() for custom instructions. But it didn't work for him, he claims that wizzard told him it cant help him.. hmm intresting, you are sure you pasted in phpinfo? yes, he is sure. Okay, show me.
Again mindblown how someone can have problems with reading.
so his phpinfo() looked like that:
```<?php
phpinfo();```
I highlighted on the page the words "output of phpinfo". He somehow didn't see it or something. He didnt know, he thought that he needs to put in phpinfo so he did. OMG.
Finally, I figured out I can workaround my intern problem, and I just briefly shown them php.net, how documentation looks, said to allways google in english, if he uses tutorial to read whole fucking thing, not just some parts of it, and left them with simple task, that took them whole day and at which they ultimately failed.
To make 3 buttons labeled "1" "2" "3" and if someone presses one of them, remember in session that they pressed it and disallow pressing other ones.
Never fucking again interns. Especially those who randomly without apparent reason almost literally just spawn in front of you and here, its your fucking problem now.
Fuck it, I have some time to get back to my stuff. Time is running so lets not waste it.
After around 15 minutes my one of my superiors comes in and asks me if I can go on meeting with him and other superior. My buddy goes with us, and next 3 hours I was basically explaining that you cannot do some things (ie. know XYZ happened without any source of information) in code, and I can't listen for callbacks from ABC becouse it wont send anyc cuz in their fucking brilliant idea ABC can't even know that this script would even exist, not to mention it wants callbacks.
Sometimes I hate my job.4 -
That moment when your task is to refactor a Web site and you discover that every element is positioned absolute and all responsiveness is done by callbacks attached to window resize event2
-
I have a nightmare project that I will probably be ranting about quite a lot in the coming weeks, but I don't want SEO to pick up the specifics on the off chance my peers Google the issues we're facing and my profile comes up.
Let me set up the scene by describing the predicament, and then I'll get to the most outrageous thing I've heard while working at this job. It gives you a CLEAR idea of why we're in this situation in the first place.
Anyways, the nightmare project only runs in IE with compatibility mode set to version 6. So it only runs in IE 6 at the latest.
And it is massive. I'm talking real, real enormous.
The most recent roadblock I ran into while Chrome-ifying it is the extensive use of a browser API that was removed 8 years ago.
It involves synchronous data input and I know for a relatively certain fact there's no way to fix it without combing through every single reference to this API and converting the ones that need sync data (not all of them do) to callbacks. How big of an issue is that?
Well, just one of that 15-ish modules has over 900 references to it. Even just creating a spreadsheet of "commented out / doesn't need a fix / needs fix" for each reference in 1/15th of this project would take days of manual labor.
Here's the rant.
So after discussing this issue in the meeting (we ended on "they don't believe me that we can't just replace it with jQuery") I brought up the next issue. One of our 3rd party libraries is so old it doesn't work anymore and we can't modify that code (it's compiled).
They said that even if it was backwards compatible (no fucking way. This version is like, at least 10 years old, I guarantee it) they can't simply replace it because we don't have a subscription to this product anymore (suggesting we find an alternative).
And I fucking kid you not, this is what happened next.
They then began discussing how this is why you shouldn't use 3rd party code. Because it becomes obsolete and you can't even fix it yourself because it's not yours to edit.
Yes. They said this DIRECTLY after we discussed our 900+ references to a browser API >>REMOVED<< 8 years ago. Yes, they said this about a 3rd party library that receives regular support but is totally FUCKED because we NEVER updated it after adding it and we never even renewed the LICENSE.
What the FUCK2 -
I usually just block every possible entry point of errors instead of handling them directly with try-catch or on-error callbacks. Is that a good practice?
In case you ask, yes, i am that lazy.3 -
It took me way too long to understand the concepts of callbacks and promises... And all this while acting as a tester2
-
[JS]
Which one do you think is faster? Pushing callbacks to an array and iterating them when they're due, or this:
const oldcb = cb;
cb = () => { someNewStuff(); oldcb(); }
The callbacks can never be removed and will finish fast, their order shouldn't matter.8 -
So i wasted last 24 hours trying to satisfy my ego over a shitty interview and revisiting my old job's codebase and realising that i still don't like that shit. just i am 25 and have no clue where am i heading at. i am just restless, my most of the decisions in 2023 have given very bad outcomes and i am just trying doing things to feel hopeful.
context for the interview story-----
my previous job was at a b2b marketing company whose sdk was used by various startups to send notifications to their users, track analytics etc. i understood most of it and don't find it to be any major engineering marvel, but that interviewer was very interested in asking me to design a system around it.
in my 1.2 years of job there, i found the codebase to be extremely and unnecessarily verbose ( java 7) with questionable fallbacks and resistance towards change from the managers. they were always like "we can't change it otherwise a lot of our client won't use our sdk". i still wrote a lot of testcases and tried to understand the working of major features.
BTW, before you guys go on a declare me an embarrassment of an engineer who doesn't know the product's code base, let me tell you that we are talking SDKs (plural) and a service based company here. their was just one SDK with interesting, heavy lifting stuff and 9 more SDKs which were mostly wrappers and less advanced libraries. i got tasks in all of them, and 70% of my time went into maintaining those and debugging client side bugs instead of exploring the "already-stable-dont-change" code base.
so based on my vague understanding and my even more vague memory from 1 year ago, i tried to explain an overall architecture to that interviewer guy. His face was screaming the word "pathetic" from his expressions, so i thought that today i will try to decode the codebase in 12-15 hours, publish a cool article and be proud of how much i know a so called martech system design. their codebase is open sourced, so it wasn't difficult to check it out once more.
but boy oh boy i got so bored. unnecessary clases , unnecessary callbacks static calls , oof. i tried to refactor a few classes, but even after removing 70% of codebase, i was still left with 100+ classes , most of them being 3000-4000 files long. and this is your plain old java library adding just 800kb to your project.
boring , boring stuff. i would probably need 2-3 more days to get an understanding of complete project, although by then i would be again questioning my life choices , that was this a good use of my 36 hours?
what IS a correct usage of my time? i am currently super dissatisfied with my job, so want to switch. i have been here for 6 months, so probably i wouldn't be going unless i get insane money or an irresistible company offer. For this i had devised a 2 part plan to either become good at modern hot buzz stuff in my domain( the one being currently popularized by dev influenzas) or become good at dsa/leetcode/cp. i suck bad at ds/algo stuff, nor am i much motivated. so went with that hot buzz stuff.
but then this interview expected me to be a mature dev with system design knowledge... agh fuck. its festive season going on and am unable to buy any cool shirts since i am so much limited with my money from my mediocre salary and loans. and mom wants to buy a home too... yeah kill me3 -
So... what the fuck is wrong with people in this company for fucks sake!
Dudes use promises and always call resolve()
Me: And how do you fucking handle errors?!
Dude: Well we call resolve with 2 arguments and error goes first obviously!
Me: why no callbacks for fucks sake!!
Manager(defending the dude): you don't understand we told the client that we would use bluebird promises. Client liked it so much that is why we got the job in the first place!
Me: (jaw opened - silence)....
Dude:(goes out happy for winning the argument)3 -
As a developer with adhd, some days are just wasted and ends with the brain getting stack overflow from to much unorganized code and infinite callbacks 😂
$brain = new adhdBrain;
while($brain.energy > 0) {
$brain->checkSocialMedia();
$brain->work();
$brain->readNews();
$brain->getAngryWithSoundsInTheOffice();
$brain.energy--;
}
public function work() {
$brain->getAngryWithSoundsInTheOffice();
$brain->readNews();
$brain->code();
$brain->readEmail();
$brain.energy--;
}
public function getAngryWithSoundsInTheOffice() {
$brain->readEmail();
$brain->angry++;
$brain.energy--;
}
public function readEmail() {
$brain->work();
$brain->readNews();
$brain.energy--;
}
public function readNews() {
$brain->work();
$brain->getAngryWithSoundsInTheOffice();
$brain.energy--;
} -
Why Android uses so many quirky features in Java, like inner and anonymous classes, callbacks and nested generics?
I searched everywhere for the reason but can't find why, only how.
I rarely use these features outside of Android development.4 -
Who is doing this to me *sobs*, mongoose or MongoDB? 😥😥
I'm adding new records (array) to an embedded document, but the first record to be added gets duplicated, even with the same ID and stuff :(..
Was using Callbacks, switched to promises, still the same.
😥😥😥😥😥4 -
Spent a whole day building custom OnDeserialize events for a complex import project... Find out Microsoft XmlDeserializer completely ignores all serialization callbacks.
Fucking cunt. -
Laravel Excel is shit and has shit documentation as well. PHPExcel may not be as pretty as a bunch of callbacks but it's more efficient and actually gets the job done.6
-
Reading a book on React and how data/changes flow one way... down.
Oh hm... sounds different...
Then after an hour or more it goes oh yeah, you can pass children callbacks.
OH WTF!!!! That's like every single language (passing the parent itself as an Interfaces), Android Fragments, Node/Express, Async finding)
That's pretty much MVC?3 -
!rant
Woow I am amazed. Just started learning c# in combination with Unity and I am already loving it. It is much like Java so for me it is easy to understand and it works increddibly well with callbacks and getters / setters!1 -
Fri-damn-day is here in next 4 hours, prototype is to be delivered before 5 pm, 3 big core functionalities are yet to be made , all code is hanging by the null checks due to leaking firebase callbacks and all comes down to this intern who has been giving 19 hours every day to this project for last full week.
Well, bring it on!! I am about to gloriously fail (unless i code some miraculous code that i don't even know how), but i have never been this much motivated to work or received this much support by seniors ;)2 -
There's a special place in hell for JS people using `.then()` and `.catch()` instead of simply `await func()`.
Why have 5 lines of code with an await, when instead you can have 5 nested `.then` callbacks.
And yes I know there are some cases where async/await isn't applicable, but that's rather rare25 -
Python just keeps on giving.. everytime i try to do something in python i find out something awesome. The pythonic way of doing things are frikkin cool. I am a huge fan of OOP, and python is my clear favourite until now.
Yesterday i was trying to figure out how to do timed callbacks in python and was figuring out how to use system.alarm for multiple alarms, and ran into sched module.
Too sad i cant use this wonderful thing for my work.14 -
So our app uses some service to validate users & the validation response is received either by a callback url or by polling. Since their documentation states callbacks are rather unstable and "should not be completely relied upon", we only use polling. Client, however, wants to use the callback url and use polling only "after we are sure that callback has not been received". WTF. When we asked how will we know callback has not been received because it has not been received, we were told to start polling after like 1 hour.
?!?!?!?!?!?! -
So tokio-rs had me really confused on how to properly use split streams and sinks to read and write io, so I made a simplified interface to save others (and myself) some trouble.
Check it out, it's called tokio-simplified, and it's on https://crates.io/crates/...
I like it, you can place as many callbacks as you want to respond to each frame from the stream, and use as many mpsc::senders as you like to write to the sink.
And as a bonus, you can have a filter callback called before any other, to choose whether or not a frame should make it to the others, and bonus feature: that callback is 0 cost against just passing it as a for_each on your stream.
Hope it helps some of you on your journeys to Rust -
When you're trying to extend someone else's plugin and they haven't written a filter that handles your use case and you end up having to daisy-chain callbacks through callbacks that are intended for completely different operations.2
-
I'm porting an OpenGL project to work with WebAssembly, I'm using emscripten to compile/generate the 'glue' to JS. Sofar I'm able to render my gl code properly through the glfw3 framework. I know you can use emscripten callbacks for input, however I was hoping to keep my existing glfw3 callback setup, that said the only callback that seems to be working properly is mouse position, window resize, keyboard, etc never get called. If anyone knows how to enable these I'd be super greatful!1
-
Over the last week I've slowly grown to fucking hate IMAP and SMTP. You'd think after so many years we'd have come up with better servers to manage email but no we still rely on fucking decades old protocols that can't even batch requests.
To make things worse I need to attach to IMAP through node and that has been a nightmare. All the libraries suck ass and even the ones tailored towards Gmail don't work for Gmail because Google decided one day to fucking out the header at the bottom of some emails and split into mimeparts. Also why the fuck is fetching email asynchronous? There's no point at all since we requests are processed line by line in IMAP, and if the library actually supported sending asynchronous requests it wouldn't require a new object to be created for each request and allow only a single listener.
Also callbacks are antiquated for a while and it pisses me off that node hasn't updated their libraries i.e. TLS to support async/await. I've taken to "return await new Promise" where the resolve of the promise is passed as the callback, which let's me go from callback to promise to async/await. If anyone has any other ideas I'm all ears otherwise I might just rewrite their TLS library altogether...
And this is just IMAP. I wish browsers supported TLS sockets because I can already see a server struggling with several endpoints and users, it would be much easier to open a connection from the client since the relationship is essentially:
Client [N] --- [1] Server [1] --- [1] IMAP
And to make the legs of that N : N which would fix a lot of issues, I would have to open a new IMAP connection for every client, which is cool cause it could be serverless, but horrifying because that's so inefficient.
Honestly we need a new, unifying email protocol with modern paradigms...8 -
So I am applying for some Jobs across Internationally. But receiving a lot less callbacks. What is your advice? Do you have some space for a ReactJS developer in your company?6
-
Mongoose: Callbacks VS Promises? Opinions and reasons please.
I'm trying to update array of data which involves couple queries.. Best practices?9 -
Rails after_create callback hooks... ofc callbacks with a name starting with `create_` get ignored1
-
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 -
That would be lambdas in C++11, nice way to implement callbacks and make them quite generic while keeping code readable :-)
-
[typescript] Should I use a promise to represent an event that can occur at most once, may never occur but can never fail? If not, what else should I use? Callbacks?5
-
Explained my boss what callbacks are
(And closures)
Kudos for me because i showed this as well
http://thecodinglove.com/post/... -
!rant
can you give me/point me to some good example problem/exercise for multithreading? as in, something that's small in scope, but actually requires dealing with most of the multithreading issues & complications? race conditions, synchronization, locks, shared memory access, cross-thread calls/callbacks, etc?2 -
Wants to use arch as newbie. Gets mad at arch because newbie not ready to commit to it. Newbie callbacks to windows. 5 years passes. Newbie install Ubuntu.3