Hinostroza: SOme common examples.
Gorsuch: When I need async operations and I need they would be executed one by one.
Szychowski: Yours don’t need to be done one by one.
Szychowski: You just need to know when all are done.
Lumadue: You are a good teacher, you know?.
Bleything: One more thing. Probably, this thing is not connected to what we are talking about, nevertheless.
Bambaci: I have a button ‘add-to-cart’ which becomes ‘remove-from-cart’ after clicking it. What if I click it repeatedly many times? What will happend?
Sumsion: In case if I do not block button until previous action is finished.
Szychowski: I have no way of knowing.
Wickell: I mean. All those clicks are put into queue? Or.
Mursch: Or actions are parallel.
Medal: And each action will work with current state of object.
Szychowski: I have no way of knowing.
Szychowski: I don’t know what your code does.
Ratterree: Add-to-cart: check availability, decrease number of available goods by 1
Szychowski: Is that through ajax?
Palfreyman: Http://pastebin.com/k527EzGK
Szychowski: Every time you click that button, another ajax call is made.
Szychowski: It could stack up a bunch and have them all basically fire in parallel or be offset by a little bit of time.
Szychowski: You should really disable the button while the submit is happening.
Koeck: So, unpredictable result.
Wouters: I can have goods more than I actually have.
Szychowski: I don’t know how all your code works.
Szychowski: But at the end of the day your stuff is unpredictable.
Schellenger: Disabling button is a good idea. I do it every time. But I had a thoughts.
Nevens: It blocks for some time, so you can’t change its state fast, you make the client to wait.
Szychowski: Right. until the call is done.
Firestone: I thought that all calls are queued. But that has no sense. Ajax calls are async.
Szychowski: They’re “sort of” queued, but now you’re getting into UX.
Cundy: But there is no order of execution.
Szychowski: There’s no guarantee depending on a few factors.
Szychowski: It’s more of a UX issue – the end user needs feedback that the click did something.
Sorto: I meant order exists but order of execution in backend, so to speak, does not equals to order of actions that user made.
Szychowski: Seriously though it’s more of a ux issue.
Szychowski: The user should know that the thing they did initiated some other actiona nd they should probably wait.
Casares: So, no changes. I continue to block buttons
Szychowski: Yeah, block until the ajax is done.
Pittman: What time is it now in your place?
Szychowski: More like late afternoon, but sure.
Szychowski: Yeesh. why so early?
Konopacky: So I thought I am lucky that you are not sleeping
Szychowski: No i mean why are you up that early?
Zhang: Hi guys, I’m trying to use x-editable plugin inside a form, but since this plugin inserts its own form, I get an error with my validation rules: jquery.validate.min.js?v13:4 Uncaught TypeError: Cannot read property ‘settings’ of undefined, Is there a way to avoid this, or maybe another plugin that doesn’t embed a form.
Guerrouxo: Up? I dodn’t sleep yet
Pyfer: Code do not allow me to sleep
Szychowski: Berpcor you should really get some sleep. not sleeping makes you far less productive.
Szychowski: Raul782 why are you using x-editable in a form in the first place?
Alexandre: Szychowski: Can I ask you an impudent question?