IOS devices (iPods, iPads, iPhones) have no JavaScript debugger



  • @Salamander said:

     All we really need to understand is the API we are currently using, including an approximate idea of how long each procedure should take to return.

     

    I agree this would be nice in general, but there are enough exceptions to make this a problem. Consider Jquery for example. I've seen plenty of code that references objects by class, even if the elements in question only exist in one area of a web page, for example. Sure, modern browsers have a built-in Javascript method getElementByClassName() but not all do, and in those cases Jquery falls back to a dom traversal in order to find the right elements. Knowing things like this about how the API works under the hood can make a different.

    Frameworks are another area where knowing a little about how things are working is a boon. Sure, frameworks are there to save us the hassle of reinventing the wheel and re-writing code, but knowing a little about how it accomplishes certain tasks really helps when we have a choice about how to code something. This site is testament to there being more than one way to program something, so sometimes knowing more about the environment surrounding the code is beneficial.

     



  • @Salamander said:

    Funny, I'd say that the most important part is the ability to recognise when you're writing bad code (and make no mistake, at some point you will) and then (This is the important part) seeing if there is a better way of doing it.


    So you support the idea that people should know how and why the code they're writing works?



  • @pjt33 said:

    So you support the idea that people should know how and why the code they're writing works?
     

    I would yeah. It's a bit like a mechanic working on a car without really knowing how the bits work, just that the engine is a black box (api) that receives inputs (oil, fuel, etc) and produces an output (in the form of a drive shaft)  Sure, I wouldn't expect your basic low-level mechanic to know how to change a piston ring, but I would expect them to at least have an understanding of how the engine works. It's not really comparable to equate a developer with a driver, the driver is more like the end user in this scenario.

     



  • @Salamander said:

    @fterfi secure said:
    how people work - that's the most important part of programming, and you didn't even mention it.

    Funny, I'd say that the most important part is the ability to recognise when you're writing bad code (and make no mistake, at some point you will) and then (This is the important part) seeing if there is a better way of doing it.

    Well, aren't you 'people' too?



  • @fterfi secure said:

    And doesn't this site exist to make precisely that point?

    No. The point of this site is to illustrate examples of bad code. Even the best developers write bad on occasion (although the majority of the WTFs do come from shitty programmers).

     

    @fterfi secure said:

    It took me months to realise that many of the comments on here are entirely serious, rather than ironic...

    Some of the comments are stupid. Some are just people doing things differently.

     

    @fterfi secure said:

    ...and even most of top 1% of developers (which is pretty much what this forum is selected from)...

    This forum is definitely not composed of the top 1%. (Sorry guys.)

     

    @fterfi secure said:

    how people work - that's the most important part of programming, and you didn't even mention it.


    How people work is an important aspect to some programming. I actually did mention it, indirectly: the entire reason for abstraction is to make software development easier. You don't need to understand all the bits and pieces to make things work.

     

    @fterfi secure said:

    ...general bitching...

    The thing is, I actually kind of agree with you that the state of software development is sub-optimal. However, proclaiming that all software is shit and all developers are idiots makes you seem severely out-of-touch with reality.



  • @ASheridan said:

    It's a bit like a mechanic working on a car without really knowing how the bits work, just that the engine is a black box (api) that receives inputs (oil, fuel, etc) and produces an output (in the form of a drive shaft) 

    Flawed analogy. For one, modern software is far more complicated than any automobile. Even then, mechanics rely on abstractions to make their jobs easier. I would venture a guess that most mechanics don't understand advanced metallurgy, although they do understand some of the properties of the handful of metals they encounter in an automobile. I doubt they understand the physics and chemistry behind an internal combustion engine (not to mention oil extraction and refining), they just know that given the right mix of fuel and air combustion is possible.

     

    Abstractions exist to make software development easier. Ideally, a developer could use an abstraction without understanding a single thing below it. In the real world, all abstractions are leaky, so some underlying knowledge is necessary. The amount varies depending on how leaky the abstraction is (how often do you think about hardware interrupts when writing Javascript for a web app?)



  • @morbiuswilters said:

    Even the best developers write bad code on occasion

    OK, now replace 'developers' and 'write bad code' with, say, 'surgeons' and 'cut off the wrong leg', or even just 'accountants' and 'get tax returns wrong'. If we're supposed to be professionals, that means acting like it.

    @morbiuswilters said:

    This forum is definitely not composed of the top 1%. (Sorry guys.)

    Drawn from, not entirely composing or composed of the top 1%. But sadly, yes, just being aware that there is such a thing as 'bad code' puts you in the top 1% of programmers. People with enough interest in the subject to read TDWTF are also generally self-selecting as decent programmers.

    @morbiuswilters said:

    The thing is, I actually kind of agree with you that the state of software development is sub-optimal. However, proclaiming that all software is shit and all developers are idiots makes you seem severely out-of-touch with reality.

    All software is shit, utter shit: lots is useful, but none is usable to any meaningful degree. I'd say ignoring that makes you seem out of touch with reality. I don't think all developers are stupid, far from it. I do think that they're overwhelmingly drawn from people who were attracted to computers because they're relatively bad at dealing with, and particularly, understanding, people. The end result is that most programmers forget that every instruction a computer executes originates with a person.



  • @fterfi secure said:

    @morbiuswilters said:
    Even the best developers write bad code on occasion

    OK, now replace 'developers' and 'write bad code' with, say, 'surgeons' and 'cut off the wrong leg', or even just 'accountants' and 'get tax returns wrong'. If we're supposed to be professionals, that means acting like it.

    Yeah, doctors and accountants sometimes make mistakes, too. Of course, they're not usually doing original work, either, so there's a lot less creative thought that could go wrong.

     

    @fterfi secure said:

    @morbiuswilters said:
    This forum is definitely not composed of the top 1%. (Sorry guys.)
    Drawn from, not entirely composing or composed of the top 1%. But sadly, yes, just being aware that there is such a thing as 'bad code' puts you in the top 1% of programmers. People with enough interest in the subject to read TDWTF are also generally self-selecting as decent programmers.

    Being aware that there is such a thing as "bad code" puts you in the top 1% of programmers? What kind of retarded statistic is that? Seriously, you sound less sensible with each statement.

     

    @fterfi secure said:

    All software is shit, utter shit: lots is useful, but none is usable to any meaningful degree.

    Now I know you're just full of shit. Seriously, what are you doing here? What do you do for a living?



  • @morbiuswilters said:

    @fterfi secure said:

    All software is shit, utter shit: lots is useful, but none is usable to any meaningful degree.

    Now I know you're just full of shit. Seriously, what are you doing here? What do you do for a living?

    I'd agree with that sentiment also.

    That's not to say software is worse than hundreds of people shuffling paper around in a room full of 500 fax machines. But it is still shit. The steam engine was a hell of a lot better than roping 20 horses together and beating them to death. But it was still shit. And I don't believe you look at a modern computer and seriously think to yourself: "now that is exactly how a computer should be!"

    The disagreement is probably one of terminology.



  • @blakeyrat said:

    And I don't believe you look at a modern computer and seriously think to yourself: "now that is exactly how a computer should be!"

    Of course not. But there's a world of difference between "has room for improvement" and "utter shit". Unless you are redefining "shit" to mean "needs improvement", in which case you are devaluing the word. And "none is usable to any meaningful degree"? Usability problems aren't uncommon, but saying it flat-out isn't usable? It's all pointless bitching that shows little understanding of actual usability and engineering concerns.



  • @pjt33 said:

    So you support the idea that people should know how and why the code they're writing works?

    Yes. Where did I say I didn't?

    Or is this is the part where you are pedantic and try to pick at what you think I was implying?



  • @fterfi secure said:

    OK, now replace 'developers' and 'write bad code' with, say, 'surgeons' and 'cut off the wrong leg', or even just 'accountants' and 'get tax returns wrong'. If we're supposed to be professionals, that means acting like it.

    Or replace both vocations with the generic "even professionals make mistakes". Being professional doesn't mean acting like it, it means doing it, and mistakes occasionally happen - it's your attitude to failure that determines if your approach is professional or amateurish.

    @morbiuswilters said:

    This forum is definitely not composed of the top 1%. (Sorry guys.)

    Agreed, but it's a good viewpoint of those "in the industry". Hell, I don't think I'd consider myself in the top 10% of programmers (but that may be evident already...)

    @fterfi secure said:

    All software is shit, utter shit: lots is useful, but none is usable to any meaningful degree. I'd say ignoring that makes you seem out of touch with reality.

    I recall a phrase that "all software sucks to some extent, some more than others" but I still don't agree with this sentiment.

    You're arguing that lots of software that is useful is still shit, and no software - including that which is useful - is usable. Some software is shit, I won't deny it - but that judgement is often based upon one or two broken features and misses the remaining 90% that works fine and is useful. Most people learn those pitfalls and are content to use said package, carefully skirting the danger areas to obtain maximum benefit from it.

    Are you honestly claiming that the browser you're using - and the operating system it sits on - to make your post is utter shit and unusable?



  • @fterfi secure said:

    OK, now replace 'developers' and 'write bad code' with, say, 'surgeons' and 'cut off the wrong leg'


    I've had to intervene before to prevent a plastic surgeon (who are supposed to be the best) from operating on the wrong hand. The requirements got garbled, probably because the average doctor's handwriting is worse than the average developer's knowledge of usability.

    @Salamander said:

    @pjt33 said:
    So you support the idea that people should know how and why the code they're writing works?

    Yes. Where did I say I didn't?


    Just checking, because your first paragraph seemed to be tilting towards supporting Blakey's cargo culting.



  • @pjt33 said:

    Just checking, because your first paragraph seemed to be tilting towards supporting Blakey's cargo culting.

    What the fuck, people. The entire thread is me complaining about a web browser I have to write code for that doesn't have proper development tools. Cargo cult people don't use fucking debuggers. Why do you keep saying shit like this?

    I just said that if you gave me code that solved the problem, I'd use it to solve the problem without spending weeks researching how exactly it worked. I don't see where this stupid debate came from. I definitely don't see how I ended up in the "cargo cult" bucket, unless the answer is "people don't know what the term 'cargo cult' means and they just mindlessly repeat it."



  • @blakeyrat said:

    @pjt33 said:
    Just checking, because your first paragraph seemed to be tilting towards supporting Blakey's cargo culting.

    What the fuck, people. The entire thread is me complaining about a web browser I have to write code for that doesn't have proper development tools. Cargo cult people don't use fucking debuggers. Why do you keep saying shit like this?

    No thread here is ever about one single thing. The cargo cultiness came from when you said, "Why would I give a shit why it worked, so long as it did work?"

    @blakeyrat said:

    I just said that if you gave me code that solved the problem, I'd use it to solve the problem without spending weeks researching how exactly it worked. I don't see where this stupid debate came from. I definitely don't see how I ended up in the "cargo cult" bucket, unless the answer is "people don't know what the term 'cargo cult' means and they just mindlessly repeat it."

    I think you're not understanding the term. Now, the code may actually be correct, etc, and perhaps the authority of the person who gave you the code is good enough for you. Perhaps you also did extensive testing to make sure that it really did solve the problem, and didn't just look like it solved the problem due to some weird set of circumstances (e.g., hard coded paths that happen to match your personal setup).

    So your hypothetical situation isn't necessarily cargo cult behavior, but without elaborating, it could be. And then the discussion about how much you understand about something went more meta, and wasn't really about you.

    Or maybe you're just an overly sensitive troll?



  • @boomzilla said:

    I think you're not understanding the term. Now, the code may actually be correct, etc, and perhaps the authority of the person who gave you the code is good enough for you. Perhaps you also did extensive testing to make sure that it really did solve the problem, and didn't just look like it solved the problem due to some weird set of circumstances (e.g., hard coded paths that happen to match your personal setup).

    So your hypothetical situation isn't necessarily cargo cult behavior, but without elaborating, it could be. And then the discussion about how much you understand about something went more meta, and wasn't really about you.

    Kind of hard to say, since pjt33 didn't fucking link to the actual incident he was referring to, I don't personally remember it, and nobody has called him out on it. For all I know, you guys are debating over some bullshit he made up. Or something that someone else did.

    If he provided maybe one relevant detail then we could start actually speaking intelligently about it.

    Until then, I don't like being labeled due to something that, for all we know, didn't even fucking happen.



  • @blakeyrat said:

    If he provided maybe one relevant detail then we could start actually speaking intelligently about it.

    Until then, I'll continue speaking unintelligently about it.

    FTFY



  • @blakeyrat said:

    Kind of hard to say, since pjt33 didn't fucking link to the actual incident he was referring to, I don't personally remember it, and nobody has called him out on it. For all I know, you guys are debating over some bullshit he made up. Or something that someone else did.

    True, but even so, all I read into his original comment was that you didn't take the time to go back and thank the people who corrected the first joker, which is completely different from cargo cultism.

    @blakeyrat said:

    Until then, I don't like being labeled due to something that, for all we know, didn't even fucking happen.

    Yeah, who knows what he was referring to, but your response to the troll definitely happened, and that was what really sparked the discussion. So, +1 Trolling for pjt33.



  • @boomzilla said:

    True, but even so, all I read into his original comment was that you didn't take the time to go back and thank the people who corrected the first joker, which is completely different from cargo cultism.

    All you should have read into it was: "this is an anecdote with zero details and zero citations which reinforces my pre-established beliefs about a topic." In other words, "this is almost certainly UTTER BULLSHIT."

    So because the dumbasses who populate this board (lead by the greatest of the dumbasses: Boomzilla) have zero bullshit detection capability, suddenly I get labeled as a "cargo cult programmer."

    I'm so sick of the shit I get from this community. If you want to criticize me, fine! I embrace that! I even enjoy it! But criticize me based on things I've actually said. Of course I've posted that exact thought a billion times and it's still not happening, so why do I keep bothering? I don't even know myself.

    Hey, let's pull a pjt33! Remember that time someone told Boomzilla not to strangle all those puppies, but instead he totally strangled all the puppies and then ran over 20 nuns in his car? That was a hoot!



  • @blakeyrat said:


    So because the dumbasses who populate this board (lead by the greatest of the dumbasses: Boomzilla) have zero bullshit detection capability, suddenly I get labeled as a "cargo cult programmer."

    I'm so sick of the shit I get from this community. If you want to criticize me, fine! I embrace that! I even enjoy it! But criticize me based on things I've actually said.

    So are you now denying authorship of this post? Because that's what the discussion was about, not the apocryphal event described by pjt33 (except inasmuch as your response was connected to pjt33's post). pjt33's post was alleging ingratitude on your part, not any sort of cargo cultishness.

    I apologize for calling you on your bullshit.



  • @blakeyrat said:

    Hey, let's pull a pjt33! Remember that time someone told Boomzilla not to strangle all those puppies, but instead he totally strangled all the puppies and then ran over 20 nuns in his car? That was a hoot!

    That's not a hoot.  And besides, I'm sure he apologized.  Right, boomzilla?  Tell me you apologized.



  • @Sutherlands said:

    @blakeyrat said:

    Hey, let's pull a pjt33! Remember that time someone told Boomzilla not to strangle all those puppies, but instead he totally strangled all the puppies and then ran over 20 nuns in his car? That was a hoot!

    That's not a hoot.  And besides, I'm sure he apologized.  Right, boomzilla?  Tell me you apologized.

    I never apologize for things I didn't do.



  • @boomzilla said:

    I never apologize for things I didn't do.

    That include work?



  • @boomzilla said:

    pjt33's post was alleging ingratitude on your part, not any sort of cargo cultishness.

    You sure about that?

    @pjt33 said:

    Just checking, because your first paragraph seemed to be tilting towards supporting Blakey's cargo culting.


  • @Salamander said:

    @boomzilla said:

    pjt33's post was alleging ingratitude on your part, not any sort of cargo cultishness.

    You sure about that?

    @pjt33 said:
    Just checking, because your first paragraph seemed to be tilting towards supporting Blakey's cargo culting.

    Yes, I'm sure. But feel free to persist in believing that a post 3 days after the post in question, and part of the subsequent discussion had anything to do with what I was talking about. It's not my job to enforce causality in the universe or TDWTF.

    It's a long thread, so I can understand how it might be easy to forget what was said throughout, as blakeyrat obviously did when he ignored all of the discussion that wasn't focused on the WTF of Apple and their missing debugger, and as have many of us at various times when we suggested something that someone had mentioned earlier. But...I actually put a link in to the post, so there really should be no question, unless you are simply too stupid to operate your browser.



  • @blakeyrat said:

    Kind of hard to say, since pjt33 didn't fucking link to the actual incident he was referring to, I don't personally remember it


    It was the CSS discussion way back in the dim and distant past of last month. Is there any other thread on this forum in which you thank someone for helping you with one of your problems? And if you didn't know what I was referring to, why were you so sure that you wouldn't have given a shit about the reason it worked - unless that's your general attitude?



  • Since you appear to be braindead, let me spell it out for you.

    You said that pjt33's post did [i]not[/i] allege any sort of cargo cult behaviour. I pointed out where, in no uncertain terms, it [i]did[/i].

    As that post was what sparked blakey's outburst, it [i]is[/i] a part of this discussion. Shocking, I know.



  • @Salamander said:

    Since you appear to be braindead, let me spell it out for you.

    You said that pjt33's post did not allege any sort of cargo cult behaviour. I pointed out where, in no uncertain terms, it did.


    As that post was what sparked blakey's outburst, it is a part of this discussion. Shocking, I know.

    OK, so first you cannot follow the link to understand what I was talking about, and now you mention an unspecified "blakey outburst." Practically every post he makes is an outburst. No one is really that clueless. Well trolled, sir.



  • @pjt33 said:

    @fterfi secure said:
    OK, now replace 'developers' and 'write bad code' with, say, 'surgeons' and 'cut off the wrong leg'

    I've had to intervene before to prevent a plastic surgeon (who are supposed to be the best) from operating on the wrong hand.

    When I had surgery on my leg three years ago the surgeon came in ahead
    of time and wrote his name on the appropriate leg.  I had never heard of
    such a thing, but it does seem like a good idea.



  • @El_Heffe said:

    @pjt33 said:
    @fterfi secure said:
    OK, now replace 'developers' and 'write bad code' with, say, 'surgeons' and 'cut off the wrong leg'

    I've had to intervene before to prevent a plastic surgeon (who are supposed to be the best) from operating on the wrong hand.
    When I had surgery on my leg three years ago the surgeon came in ahead
    of time and wrote his name on the appropriate leg.  I had never heard of
    such a thing, but it does seem like a good idea.

    What if he wrote on the wrong leg to begin with?



  • I did read it. I just did not find it relevant. Let me point out the part you are missing here (simplified):



    pjt33: Blakey = Cargo Cult.

    boomzilla: [u]pjt33[/u] never said Blakey = Cargo Cult.

    Me: Yes he did.



    Whether or not you can say blakey's behaviour [i]is[/i] cargo culting or not is [i]not[/i] relevant to the point I was making. Trying to argue otherwise is pointless.

    @boomzilla said:

    and now you mention an unspecified "blakey outburst."

    Really? I would have thought that given how we were talking about blakey, cargo culting, and outburts that it should have been obvious.
    I apologise for assuming you were capable of working it out on your own. I shall not make that mistake again.

    By the way, you never did give a link to pjt33's post which was "alleging ingratitude".



  • @Salamander said:

    You said that pjt33's post did not allege any sort of cargo cult behaviour. I pointed out where, in no uncertain terms, it did.


    I would suggest that maybe you're a mathematician who's wandered in here by mistake, but even mathematicians can count to two. I've made more than one post in this thread.



  • I would suggest that maybe you're a pedantic dickweed, considering only pedantic dickweeds cannot find a post on the same page when given a direct quote of it.



  • @Salamander said:

    I would suggest that maybe you're a pedantic dickweed, considering only pedantic dickweeds cannot find a post on the same page when given a direct quote of it.

    No, it's the pedantic dickweed who ignores what a person is talking about for a convenient shift of meaning. Sometimes it's done for humorous effect. Sometimes it's just because the dickweed isn't paying attention. And sometimes the dickweed is just being stupid. I can't see any attempts at humor from you, so either start paying attention or stop being such an idiot.

    Seriously, why are you still going on about some other post even after your error has been pointed out? When I link to a post, please explain how your attention went to some other post? Are we back to the too stupid to use a browser theory?



  •  I am going to grab a sandwich.



  • @boomzilla said:

    Seriously, why are you still going on about some other post even after your error has been pointed out?

    I stated that at one point, you said that pjt did not allege cargo cult behaviour, and I responded with a quote in which he did.
    You then responded by pointing out a link in one of your earlier posts to post by blakey which started the whole discussion on cargo culting, and that somehow proves I'm wrong?
    That pjt did [i]not[/i] say blakey was cargo cargo culting?
    Are you [i]sure[/i] you don't control the laws of causality, because that's one fucked up conclusion.

    @boomzilla said:

    When I link to a post, please explain how your attention went to some other post?

    You have not once actually addressed the point I made. [i]The[/i]. As in [i]one[/i]. My attention never [i]went to some other post[/i]; it never left the [i]original[/i] point I made, because you never provided a reason it [i]should[/i].
    Are you going to try countering, or are we just going to continue this circular argument?

    @dhromed said:

     I am going to grab a sandwich.

    I'd recommend popcorn instead.



  • @Salamander said:

    I'd recommend popcorn instead.
     

    Don't be cheeky, boy. You are partially responsible for me prioritizing a sandwich over this thread.

     

    Also, what the hell happened to the tag entry field? Or is it just me?



  • @Salamander said:

    @boomzilla said:

    Seriously, why are you still going on about some other post even after your error has been pointed out?

    I stated that at one point, you said that pjt did not allege cargo cult behaviour, and I responded with a quote in which he did.
    You then responded by pointing out a link in one of your earlier posts to post by blakey which started the whole discussion on cargo culting, and that somehow proves I'm wrong?
    That pjt did not say blakey was cargo cargo culting?
    Are you sure you don't control the laws of causality, because that's one fucked up conclusion.

    @boomzilla said:

    When I link to a post, please explain how your attention went to some other post?

    You have not once actually addressed the point I made. The. As in one. My attention never went to some other post; it never left the original point I made, because you never provided a reason it should.
    Are you going to try countering, or are we just going to continue this circular argument?

    OK, here's how I'll address your point. You changed the subject of the conversation in a way that was really pointless and pedantically dickweedish. You were correct that in a post in this thread, pjt33 used the words "cargo cult." Only you apparently understand why this was important.

    We were discussing how the cargo cultishness came up, it was in relation to something blakeyrat actually said in response to something pjt33 said in the post I had linked. pjt33 did not allege cargo cult behavior on blakey's part, but he did reference the phrase "cargo cult" later in response to something you said. l can see that you have problems following a conversation and making logical deductions, but hopefully this helps.



  • @El_Heffe said:

    When I had surgery on my leg three years ago the surgeon came in ahead
    of time and wrote his name on the appropriate leg.
     

    He then looked you right in the eyes, his tear-drop tattooed face quivering, and growled at you "it's mine now, bitch".

    After the nurses stiched up your leg, the doctor left something inside. And now, it wasn't one of his tools. (Sorta).

     



  • @dhromed said:

    Also, what the hell happened to the tag entry field? Or is it just me?

    I noticed it, too. It looks like you have to post, then edit tags.



  • DON'T MAKE ME TURN THIS CAR AROUND.



  • @blakeyrat said:

    criticize me based on things I've actually said

    Challenge accepted.

    @blakeyrat said:

    @e4tmyl33t said:
    Aardwolf
    They "pause execution" by sending an asynch XmlHttpRequest, I don't see how that could possibly work in a BeforeUnload handler

    You acknowledge that foo is not likely to work...

    @blakeyrat said:

    @Kittemon said:
    @blakeyrat said:
    @dhromed said:
    @blakeyrat said:
    You still can't debug a BeforeUnload handler that way
    Shoot off a quick httprequest to some server-side code that gives you the error?
    99% of the time, the exact thing I'm debugging is why the browser won't let me send a http request during BeforeUnload.
    Intuition suggests that, for reasons which should be obvious, You Shouldn't Do That, and that as a consequence, You Can't Do That.
    And yet I Must Do That, so.

    ...yet you attempt foo anyway, then complain that you have no way to debug why foo doesn't work. RTFM perhaps?

    (Yes, I realize that the complaint is valid and that it preceded the quoted example, but that makes neither the complaint nor the example any less WTFs.)



  • @boomzilla said:

    @dhromed said:
    Also, what the hell happened to the tag entry field? Or is it just me?

    I noticed it, too. It looks like you have to post, then edit tags.

    The tag entry field seems to be working normally for me. The tag box doesn't contain any tags, but it seems to be working normally.



  • @Kittemon said:

    @boomzilla said:
    @dhromed said:
    Also, what the hell happened to the tag entry field? Or is it just me?
    I noticed it, too. It looks like you have to post, then edit tags.

    The tag entry field seems to be working normally for me. The tag box doesn't contain any tags, but it seems to be working normally.

    If it's not suggesting all sorts of random words with accents it's not working normally.



  • @Kittemon said:

    ...yet you attempt foo anyway, then complain that you have no way to debug why foo doesn't work. RTFM perhaps?

    No; foo is sending an async request. I've never tried that, that's stupid, that's going to break websites and make angry clients. Or much more likely, the browser will just say, "you're trying to do whaaa!?" and feed you an exception back. (EDIT: although the makers of that fake-o JS debugger seem to show it works at least on WebKit browsers.)

    What I'm trying to do is send a single synchronous request, a pixel load. The problem is that when the page unloads, the browser automatically cancels all pending data requests (as it should). The only "solution" I've come up with so far is to delay the browser unload so there's a good chance the pixel request completes before it's cancelled. Since there's no standard, or non-standard, command to say, "hey please load this pixel but go ahead and unload everything else, then throw the pixel away when you get it, thanks!" I have no other choice in the matter.



  • @blakeyrat said:

    What I'm trying to do is send a single synchronous request, a pixel load. The problem is that when the page unloads, the browser automatically cancels all pending data requests (as it should). The only "solution" I've come up with so far is to delay the browser unload so there's a good chance the pixel request completes before it's cancelled. Since there's no standard, or non-standard, command to say, "hey please load this pixel but go ahead and unload everything else, then throw the pixel away when you get it, thanks!" I have no other choice in the matter.


    You said something about analytics - are you basically trying to get timestamps to measure how long someone was on the page? If so, ugly though it is, spamming "I'm still on the page" messages to the server might be the only reliable solution.



  • @pjt33 said:

    You said something about analytics - are you basically trying to get timestamps to measure how long someone was on the page? If so, ugly though it is, spamming "I'm still on the page" messages to the server might be the only reliable solution.

    The solution I'm using now is about 90% reliable for desktop browsers (even normal Safari), but only 18.8% reliable for Mobile Safari. But yes, the intent is to:

    1) Get time-on-page

    2) Flush out any other pending analytics on-page events (I cache them, of course)

    The alternative is to make my analytics code spammy as shit (like your suggestion), constantly sending out pixels for basically no reason at all. I refuse to do that; I am trying to write a quality product here. Even if I have to fight the W3C tooth and nail every step of the way.

    The other alternative, and this is what a lot of shitty analytics tools do (like, say, that turd Adobe bought) is to "estimate" time-on-page by looking at the delta between a load of page 1, and a load of page 2. Then report that number to the client as if it actually meant something and wasn't a pure fiction. I'm trying to write a quality product here. I'm not going to feed rabbit shit to my clients and call it raisins.

    The Real WTF, of course, is the W3C having absolutely ZERO interest in analytics, and thus providing absolutely no support for extremely common analytics tasks like this. I fully understand the potential for abuse in what I'm doing, but it would be trivial to add a DOM command to provide a "one way HTTP request" that just sends the requests to our back-end and ignores the results. Believe me, everybody would be better off.



  • @blakeyrat said:

    The Real WTF, of course, is the W3C having absolutely ZERO interest in analytics, and thus providing absolutely no support for extremely common analytics tasks like this.

    The W3C exists solely to hold up the development of coherent web standards. I have two hypotheses for why this is:

    1. The W3C is comprised entirely of pointy-headed, academic shitheads.

    2. The W3C is a front for a hostile alien race sent to Earth to retard technical advancement long enough for their Harvester-class ships to make the 500 light year voyage after which all humans will be rounded up and processed into our base nutrients which will supply our cruel alien masters with sustenance.

    For obvious reasons, I believe all evidence points to conclusion #2.



  • @morbiuswilters said:

    I have two hypotheses for why this is:

    1. The W3C is comprised entirely of pointy-headed, academic shitheads.

    2. The W3C is a front for a hostile alien race sent to Earth to retard technical advancement long enough for their Harvester-class ships to make the 500 light year voyage after which all humans will be rounded up and processed into our base nutrients which will supply our cruel alien masters with sustenance.

    For obvious reasons, I believe all evidence points to conclusion #2.

    Those hypothesesare not mutually exclusive: the hostile alien race could still be pointy-headed academic shitheads, just studying off-world. Hell, some of their decisions are really unearthly.

    @morbiuswilters said:

    What if he wrote on the wrong leg to begin with?

    Simply copy his name to the other leg also. That way, both options are covered, and he can confidently state he's operated upon the correct one.



  • @blakeyrat said:

    How is any "professional" developer not using a debugger constantly?

    because most of the time those professional developers KNOW what their code does.


Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.