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 - "asynchronous"
-
IF PROGRAMMING LANGUAGES WERE DRUGS:
JavaScript = Methamphetamine:
Anyone can cook some up at home but only pros can make the good stuff without blowing everything up.
Under the influence it tries to do everything at once, in seemingly no specific order before running off and making plenty of promises - but you have no clue if it kept any until it returns.
C = Heroin:
It takes some prep before you can take a hit but when you do it's far more potent than expected. When prepped (compiled) correctly it will induce complete and utter ecstasy but any error or abuse may kill you, leave you on the floor, in a coma or wishing you were dead.
HTML = Paracetamol(Panado):
Some don't think it's a real drug and others do. Either way you should grow a pair and try something a little more hardcore.
--------------------------------------
I came up with these after I randomly explained asynchronous js to a junior as synchronous code on meth. These were just off the top of my head, please feel free to correct or expand on them :-)25 -
10 Things You’ll Find Shocking About Asynchronous Operations:
3.
2.
7.
4.
6.
1.
9.
10.
5.
8.
(found on twitter by @iamdevloper 😂)6 -
We're using a ticket system at work that a local company wrote specifically for IT-support companies. It's missing so many (to us) essential features that they flat out ignored the feature requests for. I started dissecting their front-end code to find ways to get the site to do what we want and find a lot of ugly code.
Stuff like if(!confirm("blablabla") == false) and whole JavaScript libraries just to perform one task in one page that are loaded on every page you visit, complaining in the js console that they are loaded in the wrong order. It also uses a websocket on a completely arbitrary port making it impossible to work with it if you are on a restricted wifi. They flat out lie about their customers not wanting an offline app even though their communications platform on which they got asked this question once again got swarmed with big customers disagreeing as the mobile perofrmance and design of the mobile webpage is just atrocious.
So i dig farther and farthee adding all the features we want into a userscript with a beat little 'custom namespace' i make pretty good progress until i find a site that does asynchronous loading of its subpages all of a sudden. They never do that anywhere else. Injecting code into the overcomolicated jQuery mess that they call code is impossible to me, so i track changes via a mutationObserver (awesome stuff for userscripts, never heard of it before) and get that running too.
The userscript got such a volume of functions in such a short time that my boss even used it to demonstrate to them what we want and asked them why they couldn't do it in a reasonable timeframe.
All in all I'm pretty proud if the script, but i hate that software companies that write such a mess of code in different coding styles all over the place even get a foot into the door.
And that's just the code part: They very veeeery often just break stuff in updates that then require multiple hotfixes throughout the day after we complain about it. These errors even go so far to break functionality completely or just throw 500s in our face. It really gives you the impression that they are not testing that thing at all.
And the worst: They actively encourage their trainees to write as much code as possible to get paid more than their contract says, so of course they just break stuff all the time to write as much as possible.
Where did i get that information you ask? They state it on ther fucking career page!
We also have reverse proxy in front of that page that manages the HTTPS encryption and Let's Encrypt renewal. Guess what: They internally check if the certificate on the machine is valid and the system refuses to work if it isn't. How do you upload a certificate to the system you asked? You don't! You have to mail it to them for them to SSH into the system and install it manually. When will that be possible you ask? SOON™.
At least after a while i got them to just disable the 'feature'.
While we are at 'features' (sorry for the bad structure): They have this genius 'smart redirect' feature that is supposed to throw you right back where you were once you're done editing something. Brilliant idea, how do they do it? Using a callback libk like everyone else? Noooo. A serverside database entry that only gets correctly updated half of the time. So while multitasking in multiple tabs because the performance of that thing almost forces you to makes it a whole lot worse you are not protected from it if you don't. Example: you did work on ticket A and save that. You get redirected to ticket B you worked on this morning even though its fucking 5 o' clock in the evening. So of course you get confused over wherever you selected the right ticket to begin with. So you have to check that almost everytime.
Alright, rant over.
Let's see if i beed to make another one after their big 'all feature requests on hold, UI redesign, everything will be fixed and much better'-update.5 -
"I'm going to cram you so full of asynchronous JavaScript and malware throttling that your gonna be crapping cipher text" - Simpsons S27E107
-
Fuck the memes.
Fuck the framework battles.
Fuck the language battles.
Fuck the titles.
Anybody who has been in this field long enough knows that it doesn't matter if your linus fucking torvalds, there is no human who has lived or ever will live that simultaneously understands, knows, and remembers how to implement, in multiple languages, the following:
- jest mocks for complex React components (partial mocks, full mocks, no mocks at all!)
- token cancellation for asynchronous Tasks in C#
- fullstack CRUD, REST, and websocket communication (throw in gRPC for bonus points)
- database query optimization, seeding, and design
- nginx routing, https redirection
- build automation with full test coverage and environment consideration
- docker container versioning, restoration, and cleanup
- internationalization on both the front AND backends
- secret storage, security audits
- package management, maintenence, and deprecation reviews
- integrating with dozens of APIs
- fucking how to center a div
and that's a _comically_ incomplete list; barely scratches the surface of the full range of what a dev can encounter in a given day of writing software
have many of us probably done one or even all of these at different times? surely.
but does that mean we are supposed to draw that up at a moment's notice some cookie-cutter solution like a fucking robot and spit out an answer on a fax sheet?
recruiters, if you read this site (perhaps only the good ones do anyway so its wasted oxygen), just know that whoever you hire its literally the luck of the draw of how well they perform during the interview. sure, perhaps some perform better, but you can never know how good someone is until they literally start working at your org, so... have fun with that.
Oh and I almost forgot, again for you recruiters, on top of that list which you probably won't ever understand for the entirety of your lives, you can also add writing documentation, backup scripts, and orchestrating / administrating fucking JIRA or actually any somewhat technical dashboard like a CMS or website, because once again, the devs are the only truly competent ones - and i don't even mean in a technical sense, i mean in a HUMAN sense of GETTING SHIT DONE IN GENERAL.
There's literally 2 types of people in the world: those who sit around drawing flow charts and talking on the phone all day, and those WHO LITERALLY FUCKING BUILD THE WORLD
why don't i just run the whole fucking company at this point? you guys are "celebrating" that you made literally $5 dollars from a single customer and i'm just sitting here coding 12 hours a day like all is fine and well
i'm so ANGRY its always the same no matter where i go, non-technical people have just no clue, even when you implore them how long things take, they just nod and smile and say "we'll do it the MVP way". sure, fine, you can do that like 2 or 3 times, but not for 6 fucking months until you have a stack of "MVPs" that come toppling down like the garbage they are.
How do expect to keep the "momentum" of your customers and sales (I hope you can hear the hatred of each of these market words as I type them) if the entire system is glued together with ducktape because YOU wanted to expedite the feature by doing it the EASY way instead of the RIGHT way. god, just forget it, nobody is going to listen anyway, its like the 5th time a row in my life
we NEED tests!
we NEED to know our code coverage!
we NEED to design our system to handle large amounts of traffic!
we NEED detailed logging!
we NEED to start building an exception database!
BILBO BAGGINS! I'm not trying to hurt you! I'm trying to help you!
Don't really know what this rant was, I'm just raging and all over the place at the universe. I'm going to bed.20 -
I have been a mobile developer working with Android for about 6 years now. In that time, I have endured countless annoyances in the Android development space. I will endure them no more.
My complaints are:
1. Ridiculous build times. In what universe is it acceptable for us to wait 30 seconds for a build to complete. Yes, I've done all the optimisations mentioned on this page and then some. Don't even mention hot reload as it doesn't work fast enough or just does not work at all. Also, buying better hardware should not be a requirement to build a simple Android app, Xcode builds in 2 seconds with a 8GB Macbook Air. A Macbook Air!
2. IDE. Android Studio is a memory hog even if you throw 32GB of RAM at it. The visual editors are janky as hell. If you use Eclipse, you may as well just chop off your fingers right now because you will have no use for them after you try and build an app from afresh. I mean, just look at some of the posts in this subreddit where the common response is to invalidate caches and restart. That should only be used as a last resort, but it's thrown about like as if it solves everything. Truth be told, it's Gradle's fault. Gradle is so annoying I've dedicated the next point to it.
3. Gradle. I am convinced that Gradle causes 50% of an Android developer's pain. From the build times to the integration into various IDEs to its insane package management system. Why do I need to manually exclude dependencies from other dependencies, the build tool should just handle it for me. C'mon it's 2019. Gradle is so bad that it requires approx 54GB of RAM to work out that I have removed a dependency from the list of dependencies. Also I cannot work out what properties I need to put in what block.
4. API. Android API is over-bloated and hellish. How do I schedule a recurring notification? Oh use an AlarmManager. Yes you heard right, an AlarmManager... Not a NotificationManager because that would be too easy. Also has anyone ever tried running a long running task? Or done an asynchronous task? Or dealt with closing/opening a keyboard? Or handling clicks from a RecyclerView? Yes, I know Android Jetpack aims to solve these issues but over the years I have become so jaded by things that have meant to solve other broken things, that there isn't much hope for Jetpack in my mind 😤
5. API 2. A non-insignificant number of Android users are still on Jelly Bean or KitKat! That means we, as developers, have to support some of your shitty API decisions (Fragments, Activities, ListView) from all the way back then!
6. Not reactive enough. Android has support for Databinding recently but this kind of stuff should have been introduced from the very start. Look at React or Flutter as to how easy it is to make shit happen without any effort.
7. Layouts. What the actual hell is going on here. MDPI, XHDPI, XXHDPI, mipmap, drawable. Fuck it, just chuck it all in the drawable folder. Seriously, Android should handle this for me. If I am designing for a larger screen then it should be responsive. I don't want to deal with 50 different layouts spread over 6 different folders.
8. Permission system. Why was this not included from the very start? Rogue apps have abused this and abused your user's privacy and security. Yet you ban us and not them from the Play Store. What's going on? We need answers.
9. In Android, building an app took me 3 months and I had a lot of work left to do but I got so sick of Android dev I dropped it in favour of Flutter. I built the same app in Flutter and it took me around a month and I completed it all.
10. XML.
If you're a new dev, for the love of all that is good in this world, do NOT get into Android development. Start with Flutter or even iOS. On Flutter and build times are insanely fast and the hot reload is under 500ms constantly. It's a breath of fresh air and will save you a lot of headaches AND it builds for iOS flawlessly.
To the people who build Android, advocate it and work on it, sorry to swear, but fuck you! You have created a mess that we have to work with on a day-to-day basis only for us to get banned from the app store! You have sold us a lie that Android development is amazing with all the sweet treat names and conferences that look bubbly and fun. You have allowed to get it so bad that we can't target an API higher than 18 because some Android users are still using devices that support that!
End this misery. End our pain. End our suffering. Throw this abomination away like you do with some of your other projects and migrate your efforts over to Flutter. Please!
#NoToGoogleIO #AndroidSummitBoycott #FlutterDev #ReactNative16 -
Hey everyone! Recently there was a bug discovered which caused many (but not all) “user x posted a new rant” subscription notifs (both in-app and push) to not get sent out for the last week or so. It should be fixed now. Unfortunately though, they won’t be backfilled, so make sure you take a look at your favorite ranters’ profiles since you might not have been notified about their most recent rants.
A big thanks to @gitpush for reporting the issue and thanks to @linuxxx for help testing/confirming the fix worked.
For the basic cause: when we overhauled/fixed push notifs on Android in the last build (about a week ago), we had to convert to FCM. When a “user posted rant” notification was getting sent out, the asynchronous worker would process all of the subscription notifs in a loop. So for users who have a lot of subscribers, somewhere in the loop, something was failing, likely having to do with the new FCM send method. This is now fixed and all push notifs in that worker are also done asynchronously.
Let me know if you have any questions and apologies for the loss of subscription notifs!13 -
So you build a beautiful site; you spend good time on UX, refactoring, server optimisation, getting good page load speeds, SQL all optimised - life is good.
Commercial team comes in and slaps clickbait, generic advertising, tracking scrips over the lot.
Page loads go from a second to 30 seconds and even though you made sure all those crappy ad scripts are asynchronous pages still hang most times. PingdomTools lists your page scripts as going from 40 files to over 900... now users are ringing me up giving me grief about how slow this new company website is...5 -
"You claim you are a developer and don't know what firebase is? Pfft"
Words uttered by one of my classmates flexing on some 4th semester college inmates. I don't know what's more annoying his squeaky voice, the pretentiousness of using headphones as a necklace during class or that I was just like him when I was a freshman (minus the low hanging fruit flexing).
God fucking damn, I'm not even mad at his obnoxious pampered kid semblance, it's the irony of this enlightened fago falling into the god forsaken rat race. Why?
Because he hasn't been magnanimously disappointed by one of the most corrupt systems I've ever been witness of, yeah keep talking about firebase to the teacher who just nods pretending she knows what you are talking about.
I've had this same teacher before and your nice asynchronous ES6 express nosql solution will come last compared to all the WordPress templates she'll approve because they are pretty and all the time you invested, yeah, right into the crapper, seriously it would've been more satisfying to just masturbate everyday until Christmas break. I'm not pissed at him, annoyed by his semblance maybe, but I actually pitty him because the system will take a big shit on his face and he's just smiling.
Damn it, all these careers ruined by lazy ass professors who think leaving a shitload of diagrams as homework counts as teaching. And before any quirky brother interjects with "oh maybe your University is shit", "muh University verry gut u suk", you shut the fuck up! I know my university sucks even tho is "one of the best ones" by the corrupt media's standards, I'm here to vent about issues, real fucking issues happening in real corrupt systems, I'm taking about professors sexually abusing students, not going to classes, no centralized teaching systems, fucking chaos.
I'm happy for you if you feel good about the piece of paper you hang on your wall that certifies you as Bobby the guy who not only learned a shit load about computers, he also bent his ass so far for us and payed us so much money for it, it's funny he thinks himself as smart.
I know, I know, you went to an ivy league college, have a wonderful job and owe some money, good for you, some are not so lucky and I'll make sure those lazy asses who take advantage of the system lose their jobs.
I'm so sick of this shit we call "moodern educashion"7 -
Short version:
Dear devRantdairy,
today I was stupid.
The End.
Full version:
I am working on some messaging system, trying to use less as possible overhead sending data. Therefore there of course are asynchronous calls and some templating. But that's just the setting of the rant: I designed an architecture to save conversations in a database. Working with transactions in pdo I wrote a query wich in my eyes should have worked well. But the result just didn't appear in the table. So I started debugging data. Recreated the table. Rewrote the query. Went to bed. Woke up. Further tryed to make this work. And in the end I realized I just forgot to commit the transaction.
How dumb can you be? There's way too much time gone for that mistake. Is there a hole? I want do dig myself.9 -
Dear javascript, you think you're sooooo fucking special. You just HAD to be asynchronous everywhere, losing all connections to natural sequential human thinking. I just want to work with the result of A GOD DAMN FOR LOOP you ASYNC FUCK.12
-
Like most people I needed some extra cash during uni, so I proceeded to learn CSS + Photoshop (yeah, I know). Followed by PHP and WordPress.
It can be a very shitty platform until you realize that you can stop combining plug-ins from all over the place with dubious code quality and roll your own.
Anyhow I kept at it until I was able to join a niche company doing a quite popular caching plug-in for WP (yeah, W3 Total) when I suddenly became *very* interested in anything and everything performance.
This landed me a very cozy consulting gig in the Nordics - they were using WP for an elephant-traffic website and had run into a myriad of perf issues.
Fixing them and breaking the monolith awarded me with skills in nodejs, linux, asynchronous caching among others.
I was soon in charge with managing the dev boxes for the entire team, and when the main operations dude left, I was promoted to owning the entire platform. (!) Tinkering with Linux for most of my life really came in handy here. (remember Debian potato?)
Used saltstack + aws cloudformation to achieve full parity between all environments. Learned myself some python and all various tips and tricks which in the end amounted to 90% reduction in time-to-first-byte and considerable cost savings.
By the end of the 2yr contract I had turned myself into a fullstack systems engineer and never looked back.
Lawyers not getting along resulted in us having to abandon NewRelic, so I got to learn and deploy the ELK stack as a homegrown replacement, which was super-fun.
Now I work in the engineering effectiveness department of a Swedish fintech unicorn where all languages under the Sun are an option (tho we prefer Python), so the tech stack is unlimited. Infinite tools and technologies, but with strong governing principles and with performance always in mind so as to pick the right tool for the job.
It's like that childhood feeling when you've just dumped a ton of Lego on the floor and are about to build something massive.
I guess the morale here is however disappointed you feel by your current stack - don't. Always strive to make things better, faster, more decoupled, easier to test, etc. and always challenge yourself to go outside the comfort zone.6 -
JavaScript Motherfucking Asynchronous Bullshit.
I get it, for quite some stuff, async is very, very useful. But why on fucking earth do so goddamn many functions NEED this (and those callback functions) and can't do without?!
If there would be good and nicely understandable await documentation that actually fucking works, I'd be so happy.
I've currently got .then after .then after motherfucking then and its irritating me to no end as it, in this context, shouldn't even be necessary. This thing I'm writing doesn't give a fuck if something takes a few milliseconds before the rest of the program can continue!!
Fuck asynchronous programming in JavaScript for goddamn everything.
(I do love JavaScript!)27 -
Everyone talks about their hate of js but like python is honestly just as bad.
- shitty package manager,
* need to recreate python environments to keep workflows seperate as oppose to just mapping dependencies like in maven, npm, cargo, go-get
* Can't fix python version number to project I.e specify it in requirements
- dynamic typing that gets fixed with shitty duck typing too many times
- no first class functions
- limited lambda expressions
- def def def
- overly archaic error messages, rarely have I gotten a good error message and didn't have to dive into package code to figure it out
- people still use 2.7 ... Honestly I blame the difficulty of changing versions for this. It's just not trivial to even specify another python version
- inconsistent import system. When in module use . When outside don't.
- SLOW so SLOW
- BLOCKING making things concurrent has only recently got easier, but it still needs lots of work. Like it would be nice to do
runasync some_async_fcn()
Or just running asynchronous functions on the global scope will make it know to go to some default runtime. Or heck. Just let me run it like that...
- private methods aren't really private. They just hide them in intelisense but you can still override them....
I know my username is ironic :P11 -
When you are trying to be supportive to a colleague but he sees your act as condescension on your part. BITCH I DON'T GIVE A SHIT ABOUT YOU, BUT UNFORTUNATELY I HAVE TO WORK WITH YOU SO PLEASE KNOW THE BARE MINIMUMS TO DO THE TASK. Also he complained to others that he was offended . He was tryna learn react before knowing es6 and nodejs , doesn't know asynchronous and was strongly suggesting that our whole fucking team move to React and I just suggested some topics to look to. I carried his ass once , and seems like now will have to carry it once more :(
-
Cannot run one service which is depended on by another before that service is instanced because everything within the cotainer is asynchronous 👍1
-
My boss wants to be asynchronous with php. Then to render the backend async he wants to use beanstalk using python to be scalable.
I said : we can use node.js it's already asynchronous. And we don't care about the langage php python...
Boss : node.js isn't scalable, there is no security it's not good enough, it's not enough safe. I code with php since 15 years and it's better than node. To much problem in the node.js version 0.12.
OK BUT NOW WE HAVE NODEJS VERSION 6 LTS. WAKE UP. OMG I GIVE IT UP LET'S GO.5 -
Lessons I've learnt so far on programming
-- Your best written code today can be your worst tomorrow (Focus more on optimisation than style).
-- Having zero knowledge of a language then watching video tutorials is like purchasing an arsenal before knowing what a gun is (Read the docs instead).
-- It's works on my machine! Yes, because you built on Lenovo G-force but never considered the testers running on Intel Pentium 0.001 (Always consider low end devices).
-- "Programming" is you telling a story and without adding "comments" you just wrote a whole novel having no punctuation marks (Always add comments, you will thank yourself later for it I promise).
-- In programming there is nothing like "done"! You only have "in progress" or "abandoned" (Deploy progressively).
-- If at this point you still don't know how to make an asynchronous call in your favourite language, then you are still a rookie! take that from me. (Asynchronous operation is a key feature in programming that every coder should know).
-- If it's more than two conditions use "Switch... case" else stick with "If... else" (Readability should never be under-rated).
-- Code editors can MAKE YOU and BREAK YOU. They have great impact on your coding style and delivery time (Choose editors wisely).
-- Always resist the temptation of writing the whole project from scratch unless needs be (Favor patching to re-creation).
-- Helper methods reduces code redundancy by a large chunk (Always have a class in your project with helper methods).
-- There is something called git (Always make backups).
-- If you don't feel the soothing joy that comes in fixing a bug then "programming" is a no-no (Coding is fun only when it works).
-- Get angry with the bugs not the testers they're only noble messengers (Bugs are your true enemy).
-- You would learn more than a lot reading the codes of others and I mean a lot! (Code review promotes optimisation and let's you know when you are writing macaroni).
-- If you can do it without a framework you have yourself a big fat plus (Frameworks make you entirely dependent).
-- Treat your code like your pet, stop taking care of it and it dies! (Codes are fragile and needs regular updates to stay relevant).
Programming is nothing but fun and I've learnt that a long time ago.6 -
There you are, fiddling with next.js webpack settings, because your isomorphic JS-in-CSS-in-JS SSR fallback from react-native-web to react-dom throws a runtime error on your SSR prerendering server during isomorphic asynchronous data prefetching from Kubernetes backend-for-frontend edge-server with GraphQL.
You have all that tech to display a landing page with an email form, just to send spam emails with ten tracking links and five tracking beacons per email.
Your product can be replaced by an Excel document made in two days.
It was developed in two years by a team of ten developers crunching every day under twelve project managers that can be replaced with a parrot trained to say “Any updates?”
Your evaluation is $5M+. You have 10,000 dependency security warnings, 1000 likes on Product Hunt, 500 comments on Hacker News, and a popular Twitter account.
Your future looks bright. You finish your coffee, crack your knuckles and carry on writing unit tests.5 -
Only around 700 lines of code and I finally have my first working Vulkan drawcall! Can't wait to integrate it into my engine for all the parallel rendering goodness (not to mention better architecture and asynchronous-ness)
One thing that's a bit weird about Vulkan is the way everything is very static and tightly linked together. You basically need a different renderpass for each stage of rendering (scene-hdr-no-aa, scene-hdr-msaa4, scene-hdr-smaa1, scence-shadow, post-bloom, post-resolve, etc.), a different pipeline object for each distinct pipeline configuration (!!) and both framebuffers and pipeline objects are only valid within the single renderpass they've been created for (roughly speaking)
Oh, and each time the window is resized you have to recreate *all* of these objects from scratch because they also depend on viewport size
No wonder `pipelineCache` is the first argument of `vkCreateGraphicsPipelines` lol3 -
FUCK YOU Visual Studio, didn't you ever hear about asynchronous behavior? like WHY THE HELL you have to freeze every single thing to complete a shitty task, I just need to copy/open file..
Microsoft, Xamarin, and MAC Agent.. WHAT FUCKING POSSIBLY COULD GO WRONG.
{AND NO, MY LAPTOP IS NOT SHIT, this happens only with shitual studio}2 -
Historically I've done Java but have recently moved to C# and got the book to do a cert.
Who thought it would be a good idea to start chapter 1 with threads, concurrency, asynchronous calls and PLINQ, then covering boolean expressions, if statements and loops in the section after??6 -
As I am working with WordPress for the really first time I am making horrible experiences now.
My client wants a simple submenu on the sidebar if the user is logged in else he want the login form to be there. Easy peezy done with php and just good old plain html. Maybe some JavaScript to make the login process asynchronous.
But fucking bitch - NO. As I found out after searching and digging. I have to create a menu in wp-admin first. Then add a menu-widget to the sidebar. And then install a plug-in to make the links only visible for logged in user. Wtf?
WordPress takes all the joy in doing web development for me. I won't do that anymore. I will force all new clients to use proper tools to make their shit work for them. And as I am the expert in this things I am the one who suggests the right tool.
Fuck this shit.8 -
When your egghead boss (who is a dev, BTW) fails miserably in understanding that JavaScript fetch does not behave like the default synchronous nature of requests in Python.
After failing to make him learn about the asynchronous nature of JavaScript promises, he ends the discussion by saying "that's why python is better than js"
*facepalm*2 -
TL;DR C# has changed quite a bit since the last time I used it.
So I'm working on a personal project, it's written in C#. When I needed to run a task on a separate thread. It has been years since the last time I worked with C#, so I googled it.
Me: "Async? Await? Task? This looks pretty fucking useful. When was this added?"
*Googles a bit*
Return .NET 4.5 in 2012. Current version 4.7.1.
Me: "What?! Last time I checked they were still in .NET 4. Shit!"
I've got a bit of catching up to do.2 -
Me: Let's implement this integration test suite in Python since it has got plenty of rich libraries for accomplishing our goals.
Client: Let's use Node.js instead.
Me: With Node.js, we'll need to handle a lot of it's inherent stuff like asynchronous code flows, promises, etc. That's not what we primarily want to achieve.
Client: Let's use Node.js.
Me: Okay. What potential advantages do you see with Node.js?
Client: Umm.. let's just use Node.js?
Me: FML4 -
Fucking hate Qt.
Spent all morning trying to figure out how their bullshit QThreadPool works with their bullshit QRunnable but after a bunch of bullshit asynchronous testing I figured that my thread object was being collected and deleted before I was done with it, for no reason. Now if the race condition was documented... This wouldn't be an issue. But every google search brought up nada. Eventually I resorted to turning off autoDelete on the runnable, but then I just have a memory leak, obviously.
I couldn't find a way to manually clean up a QRunnable in Python. What the fuck.
I just went back to good old fashioned QThreads... This is why I quit Qt in the first place.18 -
I just found out last Friday that my team collegues (all of them are team leads) are suffering from depression or the so called burn out syndrom. I guess it's my boss' fault. He never gives clear jobs, changes his mind from day to day, we have to manage unclear responsibilities and the baddest thing is that we think that our boss is too stressed out himself.
Do you have any advice for me how we as team could solve that besides changing employer? One thing to mention is, that my boss likes to hear himself talking. That makes it even harder for a guy like myself who is more or less introverted to come up with good arguments which are not overheard or overtalked immediately. What are your feedback strategies to your own boss, how do you bring such stuff on the table?
I fear that when nothing happens, my company will suffer very hard when the whole product engineering departement will fall apart (¼ of the whole company and is responsible for engineering and maintaining of internal services and managed services for our customers).
Well at least it was worth writing about it, maybe my subconcious mind will come up with a brilliant idea itself in the near future in some asynchronous way. But you might be the one with that valuable input, then don't hesitate to share, it will be welcome.4 -
aaaaaghh fucking Handlers man. Android is so fucking full of shit, i wonder why am i still doing it. love is pain.
Why can't there be one mother fucking solution to all lazy ass asynchronous programming? handlers, threadpools, asynctask, executers, Broadcasts, intentService, coroutines, rxjava,.... i don't what new stuff are people snorting these days.
Ok , leave everything. A handler is class- no sorry, Handler, alongside some fucking Looper clss (and maybe some more stuff i don't know) other classes is a way of handling inter thread communication. Handlers can:
-send data to ui thread
-recieve data from ui thread
-send "messages" to ui thread
-recieve "messages" from ui thread.
- can be attached to ui thread
- can be attached to any child thread
- can be accessed anonymosly via any view
- can be present in multiple places, working together
- can kill night king with a dagger
- can do porn better than johnny sins
- can run for president of the whole fucking world
- do some more shits that i have yet to discover
And where do i find this? buried deep insides some medium articles or in some guy's horrible accent video.
Is background processing really this much of a toughnut to crack?
earlier i was all about using asynctask or foreground/background services, because these are the most easy to understand abstraction of a fairly difficult topic.
But as i see more projects, i see underlying apis like handlers, threadpools , executers , being directly used.
Why cant there be a fucking single abstraction, that could be "lightly tweaked" to handle every ugly case.6 -
So I met this person via a social platform.
They were absolutely silly and weren't able to hold a conversation. So I, like a normal person, just stopped trying to keep things alive.
Over the years, I have realised and learnt that if a person is interested in being friends, they'd put in efforts and I alone will not have to drag things on my shoulder.
I started cutting out people right, left, and center who I felt were taking advantage of me or using me in some way or another.
I ended up saving a lot of time and energy. I no longer feel drained or anxious about something not working out. Not dragging saved me from draining.
Anyway, they reach out to me again after few weeks and I was like let's give it a try to establish a friendship, because befriending people is my weak point.
The cycle repeats. At first I thought it must be because of the asynchronous nature of the platform so I drop my Telegram Id in case they preferred an IM approach.
I swear in the name of sweet lord, the retard does the same behaviour. So, I stopped communication.
And one fine day, the person tells me that they lack social skills and want to learn how to make friends and stuff.
Very fair point. So, me being me, gave them a few tips and critically pointed out their behaviour on how they reply with a one liner after every 2 or 3 business days.
Absolutely no change in their behaviour. They kept texting me the same.
At this point, I was like why am I doing it? I could find better people easily. Because for me, communication is everything. I cannot function without a good communication between two living beings.
So, I asked them why are they even trying to learn social skills when they barely implement it and don't want to change to which they reply saying that so they can use it to befriend people and network to getter better job opportunities.
I fuck them off.
And fuck such people who have intentions, are not clear enough about it, and play people for their own selfish gains.
And this where another learning I got from @scout is have boundaries.
Why do all good people in my life leave? Damn it! I need those good people back and be friends with them and not retards who cannot even communicate beyond one liner.11 -
My IBM 5150 doesn't have the standard IBM Asynchronous Card in it and was replaced with a Tecram First Mate multifunctional memory expansion, serial connectivity, and printer parallel card. It has more jumpers than a suicide hotline.1
-
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 -
Ted, Akka is a damn Scala library. Yeah yeah, I know you can fit it into your Java project if you really want to, but damn, you just end up with ugly Java syntax that tries and fails to be Scala. Just bloody well use Scala. Or use something more Java-esque like reactor if you *really* want to do async stuff and stay in Java land. But please, please don't use Akka in Java. The thing is a mess. I know it's asynchronous which in fairness does help in this application, but seriously just....
Wait... hang on... WHAT?! You're using the whole thing in an asynchronous reactive chain then just calling join() on everything?! What do you mean it's "mostly asynchronous but just blocks at the end?!?!" Do you like watching people suffer for no purpose, Ted? Do you?3 -
Golang's standard command line parsing library suuuucckkkkssss. But who the fuck writes command line apps any more? Everything has to be a fucking asynchronous daemon in a docker container orchestrated by kuberwhateverthefuck running in the ClOuD2
-
I'm currently between jobs and have a few rants about my previous job (naturally). In retrospect, it's somewhat therapeutic to range about the sheer brainfuckery that has taken place. Enjoy!
First, let me set the scene: legacy B2B web app made with LEMP stack and sencha ext.js 3 + 4 (don't ask) and a lot of madness. Let's call that app "Alpha".
Alpha is a self made CMS build for typical ERP stuff. Yes, a self made CMS: entities are containers, containers have types and fields and values. Like so many legacy PHP apps, it does not have a dedicated FE: the HTML is rendered on the server and then spewed out to the browser.
Easy right? Coding like it's 1999! But there was a twist: Because everything is basically a container, the HTML-templates are saved in the DB. Along with the nessary JS and the CSS. And the translation variables. Why? Because fuck you! That's why. Who needs a git history anyways.
For some reason, Alpha was kinda slow.
There was also an editor, that allowed you to modify templates (web, mail, pdf) on the fly in prod. Because templates contain repeating data (header/footer), one template could contain additional templates. Much confusion. You could change templates via migration (slow, boring) or just ctrl-c/ctrl-v that sucker (fast, much excitement).
Did I mention Alpha was slow?
On with the rant: e-mails! How do they work? Noone knows. How to send mails asynchronous in PHP? Witchcraft is the only possible answer to that riddle. Here is your enterprise™ solution:
1. create mail
2. insert mail into DB
3. WAIT UP TO 59 SECONDS FOR A FUCKING CRON TO SEND MAIL
Why? "Because that way, we can resend mails in case the network is down :)"
Same procedure for the SOAP-API (db-queue + cron). You read that right: all requests to various other systems are processed once a minute.
Alpha slow.
Alpha was only one of several systems. Imagine a bunch of monolithic php apps, interconnected via SOAP, REST and GraphQL like a godamn intergalactic orgy. Image having to debug that cluster fuck.
Let's say there is a bad request. These things happen. No biggie. Remember the db-queue? Let's try to send the bad request a second time! And a third time! Still no luck? How odd. Let's create a specific file in a specific directory: a LOCK-file. Now, "the db-queue is on hold and no request gets processed :)"
Golly gee thanks Alpha.
Anyhow, did you know that MySQL has a join limit of 61 tables?3 -
Lord. Please deliver us from the cycle of unfinished programming languages and code benches that are designed to create more work for us. We beseech thee in thy mercy to transmute all this asynchronous lead that is found in javascript into a purer form of threading that is sensible and can be willfully blocked or not so in a way that works and does not divide us through our ugly code. May also we be given the ability to purge from our midst all child molesters and string them up by barbed wire off a line of telephone poles across the entire continental usa and may there be a sudden increase in the number of ravens and buzzards to feed on them, being nice birdies that I miss seeing so much. May half their positively identified population be kept alive and delivered unto us that we might remove their scrotum with a hook-ed barb and something resembling a serrated metallic spork, amen.
and please fix fucking node js. i agree that its asynchronous methods suck ass for literally everything as there is no use for it that seems to work given its a shitty emulated single thread.2 -
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
-
Fucking asynchronous code can be very annoying sometimes. Had to struggle the whole day yesterday to get it work properly so I fetch all the results from a function which does many asynchronous calls.
Then I realized that I just need two more counter variables to increase and later decreases to detect when all of them finished.
That shit..1 -
Front end developer is still getting a ticket even though the security flaw lies in the back-end.
Today, every click of the UI has an overlay of circular progress indicator indicates that there will be a synchronous actions in an asynchronous requests.
1 click = 1 loading state -
I spent 2 hours googling and scratching my head trying to implement asyc Tast<ActionResult> on asp.net MVC. I even copy and paste the exact sample code and still didn't work. It turns out that "Visual studio for Mac" doesn't support asynchronous calls.6
-
Coolest bugs: anything involving SignalR hubs. what a crazy, upside down world asynchronous web sockets are.4
-
Yo dawg, I heard you like asynchronous JavaScript, so I put a promise in your promise so you can promise while you promise6
-
I know we do asynchronous communication where I work, but boy does my blood SUBLIMATE when people take half a fucking day or MORE to answer a question without the answer to which I cannot progress at my work
And they're like "sorry, I was out for a little while"
If only the fucking tasks were actually refined and discussed on planning, if only people wouldn't shut me down for "trying to discuss technical details" during it, maybe this wouldn't fucking happen and I wouldn't be feeling so fucking stressed out with work pending for the weekend
Jesus fucking Christ, I need to change jobs, this company pays me peanuts anyway4 -
boss. "I have a one o'clock meeting" Project Manager "uuuuuh, it's after one" boss: "it's an asynchronous meeting"
-
Joining a new team to find that ,
Non .. and I mean non of all of their code is Asynchronous!! non .. zeroo !!
And they have told me to follow their practices !
I forze for a couple of seconds then I said : no !2 -
Ugh. That may have been a mistake.
I'm deep in a large effort to refactor my project. It's a one man deal and something I've been working on pretty much every day in some fashion for nearly 10 years (five years ago I started a scratch rewrite to move from a fully CGI server rendered application to a browser rendered asynchronous version built around JS) and that took me three years.
I started this refactor about 8 weeks ago. Turns out I've been tackling the largest modules and progress has been decent. So that's good.
But I got to wondering ... Just how much code is there?
So I whipped up a quick script to do some calculations. Read each file and get a line and word count, skipping empty lines.
In JS it turns out I have 83,973 lines and 467,683 words.
On the back end, 86,230 lines and 580,422 words.
Average publishing stats say the are about 250 words/printed page.
That means I'm confronting refactoring 1,870 pages of JS. That's the size of several decent sized novels. (I think I've done the equivalent of Maybe 400 at this point).
Makes me feel like the walls are creeping in to know how much is left to go ... -
I fucking love Asynchronous Action creators in Redux.
I little more work upfront makes for a well thought out application and makes things like loading screens stupid simple. -
Just coded my first flutter app! The feeling when no async wait error appeared anymore was amazing. It uses the geolocation library to geht your current Position via GPS2
-
/** Null until this web socket is connected. Used for writes, pings, and close timeouts. */
private ScheduledExecutorService executor;
Dear boys and girls.
If you ever do this again and release this as a public library (even better - an official client of your solution, e.g. kuber-fucking-netes), I will get my way into dR's gateway servers, trace down your IP in nginx's logs, find your location, probably use some means to get your first and last name (you prolly have a domain registered under your IP anyways...), buy a ticket to your town, get to your home and wait for night to fall. Once it's dark and you're asleep, I'll make sure to leave a real nice, warm and extraordinarily smelly turd on your doorstep (I'll also make sure the process of manufacturing that gem is as noisy as it gets - you just have to bend the right way, and....).
Gents. If you really, REALLY want to make writes asynchronous, at least provide a way to either get a notification once the write is synchronized, or allow the user to handle the threads/executors himself!
https://youtube.com/watch/...5 -
I've decided to switch my engine from OpenGL to Vulkan and my god damn brain hurts
Loader -> Instance -> Physical Devices -> Logical Device (Layers | Features | Extensions) | Queue Family (Count | Flags) -> Queues | Command Pools -> Command Buffers
Of course each queue family only supports some commands (graphics, compute, transfer, etc.) and everything is asynchronous so it needs explicit synchronization (both on the cpu and with gpu semaphores) too4 -
Thinking how the fuck did the variable became undefined and realizing you defined the variable in an asynchronous rest call...
-
Python async is a total, unapologetic shitshow. It’s as if the design goal was explicitly to invalidate the maximum number of thoughtful stackoverflow QAs possible. Pro tip: make you sure to memorize the release dates of every minor version of python from 3.5-3.10, so that you know which stackoverflow answers are not relevant in any way to your codebase.2
-
Hey, would you mind trying this new powerful JS library?
It has really powerful abstraction over powerful features that compose powerful components using powerful patterns based on a powerful new asynchronous paradigm2 -
I can remember a day which I really close to crying why my code doesn't work! Then I remember that fucking line of code should be run async! :/
-
An asynchronous service in android which sends an Http request to a webpage to store its content every 3 seconds regardless of its response, and runs forever?
What the fuck where you thinking. You just killed my phone!!2 -
How did I end up looking how to write asynchronous function in shell script whereas my task is to write a distributed chat app in Node.JS ?
Damn this is going to be complicated. -
I work with server side React rendering and I wanted to do an async job.
I tried to do it since more than 3 hours.
😕🔫
...
...
...
FUCK YOU REACT! GO IN HELL YOU FUCKING SYNCHRONYOUSHIT. FUCK IT!
😡😤6 -
If languages had slogans...
1) Java -- Buy one get two for free on your delicious NPEs.
2) C -- I burn way too much calories talking, let's do some sign language. Now see over there... 👉
3) Python -- Missing semi-colon? Old method. Just add an extra space and watch the world burn.
4) C++ -- My ancestors made a lot of mistakes, let's fix it with more mistakes.
5) Go -- Meh. I can't believe Google can be this lazy with names.
6) Dart -- I'm the new famous.
7) PHP -- To hide your secrets. Call us on 0700 error_reporting(0)
8) JavaScript -- Asynchronous my ass!
9) Lua -- Beginners love us because arrays start at 1
10) Kotlin -- You heard right. Java is stupid!
11) Swift -- Ahhh... I'm tasty, I'm gonna die, someone please give me some memory.
12) COBOL -- I give jobs to the unemployed.
13) Rust -- I'm good at garbage collection, hence my name.
14) C# -- I am cross-platform because I see sharp.
15) VB -- 🙄
16) F# -- 😴8 -
Without a doubt it has to be the internal company search engine/file finding tool @thewamz and I wrote.
The company has a wide UNC network with files scattered all over the place and they need a way to keep track of where the files get moved to (they can and do get moved). The original tool was written in Java/Tomcat and didn't use any frameworks or utilities beyond custom written ones, no orms, and the SQL was just raw strings. The program didn't take into account that files might be moved or deleted so it never removed anything from the database, it just kept adding files and never removing them.
It however never stores files itself, just links to files elsewhere on the UNC network.
It took six months to get it into what might be a stable beta or release candidate state. The user interface is good, very simple and intuitive, the whole thing was rewritten in python/django, there were issues with utf 8 (and mysql not fully supporting utf 8 in its own utf 8 mode), we added a regex search mode (which was sorely lacking), the search used to take up to fifteen minutes however we sped it up to less than a minute (worst case when a user simply puts "^$" as the regex search). It has a multi threaded design which does some checks to ensure it doesn't spawn too many threads and get stuck in constant Gil switching. Still some bugs to fix, like moving the processing of results returned by the server in a web worker so that the content widget doesn't lock up processing millions of search results and moving the back end to use asynchronous python might gain a performance boost. But on the whole I think the system is ready to replace the older system that all the users are frustrated with and constantly complain about.
However the annoying bit is... How to actually get the new system online, while I am responsible for the development of tools and their maintenance, I am not responsible for their initial deployment and that means I have no idea when (or even if) my new tool will even ever be released :/ -
I need to make a legacy Java monstrosity asynchronous and came across a class which is currently making me cry blood.
It took our whole team 5 days to figure out how this thing works, including the weekend. At one place, It is adding an empty list, to another list.
The magic here is that if I remove the statement assigning data to the sub list, the data is still somehow being populated in the root list.
This clusterfuck somehow works in single threaded processing, but as soon as I make this multi threaded, all hell breaks loose.
Please send help!!1 -
"Hey guys I need help I struggle with asynchronous stuff and I need to pass props loaded via Ajax, I can't manage to apply this solution (link to another SO question with complete and structured answer), can you guys help ?"
*30 seconds later, question is marked as duplicate, the answer has been given here (link to same question I was refering)* -
Spent 4 hours working with a buddy before realizing our failing code stemmed back to using sqlite3 Npm package, which is asynchronous. Switched to better-sqlite3, a synchronous sqlite package, and alls good.
What's the purpose of an async DB anyway? Seemed like it made storing and retrieving data a huge hassle. -
The project my company agreed to work with 1 year ago is totally shitty.
We basically use Python 2, Tornado, MySQL and driver for it from 2005, custom made "ORM" where you have to write SQL in strings in Python, custom asynchronous service that runs jobs and all such...
The rest of the team writes code really badly and only after a year of fucking with this shit we made them do pull requests.
I became totally neurotic because of the shit I have to go through daily at work. I do not develop myself, no new things I have learned in the past year or so. What do I do, devrant? What is your advice?1 -
Threading, asynchronous events and scheduling...
My straight jacket feels welcoming, and I take comfort knowing that before I put it on, I got the code working. -
I really don't like our morning daily standups. They're kind of annoying, feels like kindergarten and I sometimes have to repeat myself because someone's too slow at taking notes from our talking.
Wondering if asynchronous standups would work better.7 -
I've been wandering around with a brain itch for the past few days trying to pick an API framework.
I wanted to something fast and async, so I would normally use Go, but it's an interface to a python project, so I had to find a good asynchronous python web server.
Twisted provides async options, but they aren't baked in, and tornado/cyclone/airohttp are written in a weird way for someone coming from flask/Django.
Finally I resolved to use Falcon, because it was built for APIs and async by default, but it was crazy verbose to write. I settled in to write it anyway... But then I found the perfect library. Hug: https://github.com/timothycrosley/....
I can finally think clearly.
Now I can finally write my code... At least until I have to pick a framework for the rewrite of the web app.5 -
tl;dr i am proud of my universal program but annoyed it won't get appreciation.
<brag type='slightly'>the last three days i refactored my various snippets to a kind of modular and scalable software package. restricted to a rigid company system i make use of the technologies i feel confident in. so i created a javascript app that can be used with internet explorer. it is a neat tool to work smarter and mainly to make repetitive writing tasks efficient using predefined textblocks that have automated linguistic adjustments and are multilingual usable. after refactoring it is possible to extend any desired functionality by just adding another module. i learned a lot about implementing separated data structures, data processing, output and asynchronous script loading (and the annoying limitations of ie11).</brag>
i kept in mind that this tool might not only help my personal duties to be done more efficient but also might come in handy to all my colleagues having similar tasks to do. the downside is my colleagues having irrational computerphobia and i know for sure they will proceed to do these repetitive writings manually resulting in inconsistencies and an inefficient time management. while my wise wife tries to convice me that at least i had fun coding this stuff and having it supporting me with annoying tasks, it still bothers me being the only user, as it means no progression for the company. it riddles me how the colleagues, acknowledging us all being craftspeople in the first place, avoid use of computers whenever possible and rather rely on medieval working flows.
i find it quite amusing to be the 'can you fix my printer'-guy, but i just cannot handle this attitude. and everyone complains about having so much to do. get your shit together and start clicking these few buttons goddammit! -
Guys cover your eyes I'm gonna say two bad words inside a paragraph
Fuck JavaScript and asynchronous programming - I'm not skilled enough for this so I have to insult it periodically until I'm skilled enough to know partially more than now what the fuck I'm doing (therefore the times I use bad words when referring to js and async programming will decrease - or maybe at the increase of knowledge, my usage of bad words will augment. Only time will tell).15 -
Not a fight per se, but I once had a debate with a tech lead who thought you could set a variable in the ‘then’ clause of a Javascript promise and just use said variable after the promise declaration and assume it would be populated.
“no.... thats not how asynchronous code works.”1 -
I had been working to make API call Asynchronous..
And now complexity is too High..
Yet i am happy that Code working as expected..! -
Just had a cross training where the presenter kept pronouncing asynchronous and async as "awe-synchronous" and "awe-sync".
Nice job, but not awe-some.1 -
I've a whole new respect for ElasticSearch. It's codebase is so insanely complex, that I'm seriously contemplating tracing out the flow on a big ass chart. Any suggestions on how you people work and debug so many asynchronous flows?
I have been working on a bug, for almost 6 days (to be read as 3 consecutive weekends), and the best I've done is, conceptually isolate where it's happening. I'm an open source noob, but I feel I've learnt a whole lot during sifting through ES' codebase. :)2 -
A very long rant.. but I'm looking to share some experiences, maybe a different perspective.. huge changes at the company.
So my company is starting our microservices journey (we have a 359 retail websites at this moment)
First question was: What to build first?
The first thing we had to do was to decide what we wanted to build as our first microservice. We went looking for a microservice that can be used read only, consumers could easily implement without overhauling production software and is isolated from other processes.
We’ve ended up with building a catalog service as our first microservice. That catalog service provides consumers of the microservice information of our catalog and its most essential information about items in the catalog.
By starting with building the catalog service the team could focus on building the microservice without any time pressure. The initial functionalities of the catalog service were being created to replace existing functionality which were working fine.
Because we choose such an isolated functionality we were able to introduce the new catalog service into production step by step. Instead of replacing the search functionality of the webshops using a big-bang approach, we choose A/B split testing to measure our changes and gradually increase the load of the microservice.
Next step: Choosing a datastore
The search engine that was in production when we started this project was making user of Solr. Due to the use of Lucene it was performing very well as a search engine, but from engineering perspective it lacked some functionalities. It came short if you wanted to run it in a cluster environment, configuring it was hard and not user friendly and last but not least, development of Solr seemed to be grinded to a halt.
Elasticsearch started entering the scene as a competitor for Solr and brought interesting features. Still using Lucene, which we were happy with, it was build with clustering in mind and being provided out of the box. Managing Elasticsearch was easy since there are REST APIs for configuration and as a fallback there are YAML configurations available.
We decided to use Elasticsearch since it provides us the strengths and capabilities of Lucene with the added joy of easy configuration, clustering and a lively community driving the project.
Even bigger challenge? Which programming language will we use
The team responsible for developing this first microservice consists out of a group web developers. So when looking for a programming language for the microservice, we went searching for a language close to their hearts and expertise. At that time a typical web developer at least had knowledge of PHP and Javascript.
What we’ve noticed during researching various languages is that almost all actions done by the catalog service will boil down to the following paradigm:
- Execute a HTTP call to fetch some JSON
- Transform JSON to a desired output
- Respond with the transformed JSON
Actions that easily can be done in a parallel and asynchronous manner and mainly consists out of transforming JSON from the source to a desired output. The programming language used for the catalog service should hold strong qualifications for those kind of actions.
Another thing to notice is that some functionalities that will be built using the catalog service will result into a high level of concurrent requests. For example the type-ahead functionality will trigger several requests to the catalog service per usage of a user.
To us, PHP and .NET at that time weren’t sufficient enough to us for building the catalog service based on the requirements we’ve set. Eventually we’ve decided to use Node.js which is better suited for the things we are looking for as described earlier. Node.js provides a non-blocking I/O model and being event driven helps us developing a high performance microservice.
The leap to start programming Node.js is relatively small since it basically is Javascript. A language that is familiar for the developers around that time. While Node.js is displaying some new concepts it is relatively easy for a developer to start using it.
The beauty of microservices and the isolation it provides, is that you can choose the best tool for that particular microservice. Not all microservices will be developed using Node.js and Elasticsearch. All kinds of combinations might arise and this is what makes the microservices architecture so flexible.
Even when Node.js or Elasticsearch turns out to be a bad choice for the catalog service it is relatively easy to switch that choice for magic ‘X’ or component ‘Z’. By focussing on creating a solid API the components that are driving that API don’t matter that much. It should do what you ask of it and when it is lacking you just replace it.
Many more headaches to come later this year ;)3 -
I have a strange satisfaction whenever my asynchronous js code filled with promises executes in the order that I write them even though it has no bearing in the correctness of the program.
EDIT: the async tasks are supposed to execute in identical times in theory -
Needed to help a friend with her Bachelor Thesis. She writes in Javascript and needs to synchronously use the result of a postgresql query. The query call is asynchronous.
We did what any person that searches for a dirty solution would do.
We saved the result of a query in a file and load the file when we need it.
Why is Javascript a thing?6 -
Looking to write a mobile application targeting both iOS and Android. It will be fairly basic (most complicated functions will be push notifications, asynchronous JSON fetching). I am fairly proficient at both Swift and iOS as well as JavaScript web development (react) but have never tried react native. Any thoughts on React Native vs Native Swift / Java?4
-
Just use a promise that sets this variable, and then you can use the variable as long as its after the promise declaration.
No, just no. Thats not now asynchronous code works.2 -
I used to hate email and to consider it a chore but after adopting "inbox zero", switching from web based shit to a proper client and automating the management of the many automatic notifications I get everyday I'm starting to think which when well managed email is still one of the best asynchronous communication tools, far better than sluggish and distracting chats like Teams or Slack which have their place but I think which currently they're pretty overrated.
-
>new feature in application uses external API
>external API has unreliable response times, requires polling to get results, no way to set up webhooks or whatever
>tech lead proposes asynchronous system which will queue up user requests for processing and use websockets to warn frontend clients of finished query results
>higher ups say it will take too much time, make tech lead cut back in scale and treat external API like a regular synchronous REST API
>team dutifully implements feature within the constraints of the new smaller scope
>higher ups try out the feature, find the usage experience is extremely shitty, but don't back down, they only let tech lead scale back to original scope in small increments that still allow new problems to show up
>feature takes up same time or longer, but with more damage to the mental health of developers
At least I'm not in that team1 -
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 -
Ripped apart nice class, which had nice asynchronous callback interface, add sleep() where needed.Renamed it as sync class.WTF
-
"You don't need to put a type annotation here, the type will be inferred by the compiler"
"We don't need to mark this function as async, since we are already returning a promise but not awaiting it yet within this method"
TypeScript codebase. Am I wrong to prefer that things be explicit rather than implicit? Sounds a bit tryhard to try and make things implicit, but maybe the async really changes behavior in the second case? I don't think so, and I prefer to mark an asynchronous operation as such, but I'm still doubtful; that's why I humbly ask you all what makes more sense here.7 -
This question is a bit dumb
Why do browsers block asynchronous requests when you use local files from your computer3 -
After weeks of agonizing and cursing Electron JS and JavaScript......
I finally managed to get all my modules to sync up and play nice with each other!
Love JavaScript again! Although seriously had enough issues with asynchronous tasks and threads.
Heading over to the dark side(functional) now.... 😈😈2 -
Tried out the node.js code demo in this book.
🤦♂️
Terrible format, use tab for indentation, very very long function, redundant code (eg: new Buffer vulnerability)...
The major issue is none of the total.js nosql code works. Eg:
db.clear()
db.insert({...data})
Without any asynchronous call, how do you expect this to work?!
Just fixed the code and updated npm modules for demos in Chapter 3 btw... Took way longer than expected.3 -
When seniors use non asynchronous AJAX...
Why? That is a fairly fundamental part of Ajax...
Y'know...
Async
Javascript
And
Xml
or have I been wrong about what AJAX stands for these past few years?3 -
Anyone else get the mind of a angsty college student without coffee?
I just had trouble describing asynchronous encryption -
So i have been coding in python and its my main language. Give me 2 reason why i should learn js(node).this question aroused coz i have to work with MS Bot framework and they just support c# & node js (python is still in prev) and their code has asynchronous programming in both *cries in corner also suggest me good resources to lesrn what async prog2
-
// !rant
Anybody here knows Backblaze's B2 Cloud Storage?
I am thinking of using it to storage video from a web app that I am developing. The process is:
1 - Send video files (both) to storage w/ cli (Done ✔)
2 - Authorize the asynchronous download and shows it on the HTML5's player (reading the doc ✖).
Question:
Anybody experienced some workflow likes this before? I am trying save some time before break my head after read all CLI doc (only cli, I can't find any workflow of it)1 -
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
-
There is a question on StackOverflow, its name is "How do I return the response from an asynchronous call?". I think that everyone knows it. Well, I can easily guess that half of javascript questions on the website are marked as duplicated and linked to this question.
For a moment, let's identify with the people that spend hours on StackOverflow to read all the questions and try to answer to most of them. How stressing and annoying can be repeating the same single thing 50 times a day?
Well, we should take this in account before blaming SO for being rude or before saying that JavaScript sucks without even knowing how to fucking listen to the response on an asynchronous request3 -
So I've been forced to work on a project for some time using JavaScript
Many parts of it must function synchronously and js has a lot of libs and otherwise that will spawn threads in threads
I'm horrified by the amateurish appearance of my code
Await this await that
Everything enclosed in something else and what is worse is the base node modules I'm using are ALL asynchronous! Were talking methods that one consistently has to wait on finishing like db reads !
Why is js so dumb ?26 -
An important query, it would be of great help if someone could help me with this.
I am working on a project which requires real-time updation of content on the client and server- much like evernote or google keep- I should be able to update the server with the changes made to the app and vice versa, real-time.
I have seen sync adapter, but it is asynchronous and thus, non real-time. Other option is using an IntentService, as given on android dev site.
Is there any other thing I can do to achieve the goal?
Thanks in advance