WTF Bites


  • :belt_onion:

    0_1489682006889_upload-3ceee690-d706-4fc0-bfea-9abcc8ee8b32

    I'll take one without the broken UI please, Bob!



  • While checking StackOverflow earlier (one day I'll bother memorising Java reflection) and saw this

    0_1489704349183_so1.PNG

    I have no idea what the association bonus is but there seemed to be a link to help me out so I clicked it.

    The linked page had this as the only mention of it

    0_1489704393406_so2.PNG



  • @coldandtired I'm not sure being associated with Stack Overflow is a bonus.


  • Discourse touched me in a no-no place

    @coldandtired said in WTF Bites:

    I have no idea what the association bonus is

    When you've got rep on one Stack Exchange site and you set up an account on another SE site, you can associate the accounts so that the system realises you're the same person in both places. There's a bonus of 100 reputation points for doing this; it's there specifically to encourage what the company thinks is good behaviour without forcing you to actually do it.

    It looks like it is specifically excluded from counting towards permission to answer protected questions because of past abuse. Asshats are very often why we can't have nice things. (Not that that implies that the ability to answer some random question on the web is a “nice thing”…)



  • This post is deleted!


  • My Visual Studio just crapped itself out. It popped an error “Visual Studio component cache is out of date. Please restart Visual Studio.” So I clicked File/Exit… and it popped up the same dialog again (and did not close). The same on close button. Well done…


  • mod

    error	17-Mar-2017 09:29:29	Error occurred while running Task 'Build docker image(6)' of type com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli.
    error	17-Mar-2017 09:29:29	com.atlassian.bamboo.task.TaskException: Failed to execute task
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.plugins.docker.service.BuildService.execute(BuildService.java:53)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.plugins.docker.tasks.cli.DockerCliTask.execute(DockerCliTask.java:60)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:317)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:246)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:317)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:215)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:221)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:137)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
    error	17-Mar-2017 09:29:29		at java.lang.Thread.run(Thread.java:745)
    error	17-Mar-2017 09:29:29	Caused by: com.atlassian.bamboo.plugins.docker.client.DockerException: Error running Docker build command
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.plugins.docker.client.DockerCmd.build(DockerCmd.java:189)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.plugins.docker.service.BuildService.execute(BuildService.java:40)
    error	17-Mar-2017 09:29:29		... 17 more
    error	17-Mar-2017 09:29:29	Caused by: com.atlassian.utils.process.ProcessException: Error executing /bin/docker build --force-rm=true --tag=devdocker01:5000/dt-node-ion:11 /opt/bamboo-agent/agent2/xml-data/build-dir/ION-ION-JOB1
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.plugins.docker.process.DockerTaskProcessService.execute(DockerTaskProcessService.java:60)
    error	17-Mar-2017 09:29:29		at com.atlassian.bamboo.plugins.docker.client.DockerCmd.build(DockerCmd.java:185)
    error	17-Mar-2017 09:29:29		... 18 more
    

    Failed to execute task because Error running Docker because Error executing docker. Uh. Okay? Does one of these layers plan to give me useful information? No? Great.



  • @Yamikuronue
    It could be worse. You could be tracing SSIS script task errors. "An exception was thrown by the target of an invocation". No matter what happens, that's all you get.


  • sockdevs

    @izzion No way of drilling into InnerException?



  • @RaceProUK not unless you catch and handle it in the script task, or can get the exception to occur when running the package in interactive mode with a breakpoint in the script task before the exception occurs.

    Oh, and the SSIS script task debugger doesn't have a step into option (anywhere that I could find it, at least), so if you set your breakpoint in the Main (outer) function without also setting breakpoints in every function the code might descend into, and the exception occurs in the inner function... "An exception occurred in the target of an invocation."



  • The password thread reminded me of this password WTF.

    The Samsung Tab S has a fingerprint reader that can be used to unlock the device. However, when you first power on the device, you can't use the fingerprint reader to unlock it, and you have to input your backup password. What if you forget your backup password? You can reset it, of course. How do you reset it? With the fingerprint scan. So why do you have to do this stupid dance instead of just letting you unlock the thing with your fingerprint in the first place?



  • @Tsaukpaetra said in WTF Bites:

    @Atazhaia Oh hi!

    I thought you were new, just now noticed though.

    Welcome to TDWTF!

    I mainly noticed that I don't think I've seen anyone else post screenshots in Swedish before. That counts as noticing that [s]he's new, right?


  • Impossible Mission Players - A

    @Bulb said in WTF Bites:

    My Visual Studio just crapped itself out. It popped an error “Visual Studio component cache is out of date. Please restart Visual Studio.” So I clicked File/Exit… and it popped up the same dialog again (and did not close). The same on close button. Well done…

    You too? I wonder if there was a zero-day attack on it or something...


  • Impossible Mission Players - A

    @izzion Oh, and don't forget to mention that this only works for the first time the Script Task was executed (and only for the first Script Task run as well, IIRC).

    It ran once without error but the next loop iteration is borked? Too bad!


  • Discourse touched me in a no-no place

    @Yamikuronue At least it is telling you what command it was running, even that's not really enough to fully diagnose the failure. I have to deal with code that carefully strips the causes, giving a high-level “something went wrong” exception with no further info at all. Some of our former developers thought that was a great software pattern!



  • @Jaloopa said in WTF Bites:

    Also two catch blocks that do nothing but rethrow

    I had a coworker that put this on all his functions


  • Impossible Mission Players - A

    @dkf said in WTF Bites:

    Some of our former developers thought that was a great software pattern!

    Yeah! That's what ASP.Net does if it's in "Release" mode. The only way to get an error message out is to handle the error and pretend the request was successful.


  • sockdevs

    @Tsaukpaetra said in WTF Bites:

    That's what ASP.Net does if it's in "Release" mode.

    And that's why you install ELMAH ;)


  • Impossible Mission Players - A

    @RaceProUK said in WTF Bites:

    ELMAH

    !!! Why have I never heard of this?!?!



  • @izzion said in WTF Bites:

    @Yamikuronue
    It could be worse. You could be tracing SSIS script task errors. "An exception was thrown by the target of an invocation". No matter what happens, that's all you get.

    The best part is when there is no exception at all. I once had my web app just respond with ERR_CONNECTION_RESET - no 500 error, no message, nothing. A bit of drilling down (including decompiled .NET code - dotPeek is amazing when you're in a bind) finally narrowed it down:

    public Task<HttpResponseMessage> SendRequest(HttpRequestMessage request)
    {
        using(var client = new HttpClient())
        {
            return client.SendAsync(request)
        } 
    } 
    

    I suppose I figured that "hey, I'm going to await it higher up, why not just return the Task that I get from HttpClient? And you usually can do that... except for that using block which means that by the time you await the task, the client is already disposed of. Since everything above is async up to the controller, that means the whole thing only craps up in WebAPI's innards, and that's apparently enough to just bring the entire worker process down.



  • @Tsaukpaetra said in WTF Bites:

    @dkf said in WTF Bites:

    Some of our former developers thought that was a great software pattern!

    Yeah! That's what ASP.Net does if it's in "Release" mode. The only way to get an error message out is to handle the error and pretend the request was successful.

    Log this shit. Seriously, if you're going to release that to the public, you don't really want them getting explicit details of how broken your code is - set up an unhandled exception handler and let ASP redirect the user to a generic 500 page.



  • @fbmac said in WTF Bites:

    @Jaloopa said in WTF Bites:

    Also two catch blocks that do nothing but rethrow

    I had a coworker that put this on all his functions

    Everyone knows the correct approach is:

    ...
    } catch (Exception ex) {
        //TODO 
    }
    ...
    

    :tropical_drink:



  • @loopback0 said in WTF Bites:

    @fbmac said in WTF Bites:

    @Jaloopa said in WTF Bites:

    Also two catch blocks that do nothing but rethrow

    I had a coworker that put this on all his functions

    Everyone knows the correct approach is:

    ...
    } catch (Exception ex) {
        //TODO 
    }
    ...
    

    :tropical_drink:

    I also like:

    ...
    } catch (Exception ex) {
        throw new NotImplementedException();
    }
    ...
    


  • @loopback0 said in WTF Bites:

    @fbmac said in WTF Bites:

    @Jaloopa said in WTF Bites:

    Also two catch blocks that do nothing but rethrow

    I had a coworker that put this on all his functions

    Everyone knows the correct approach is:

    ...
    } catch (Exception ex) {
        //TODO 
    }
    ...
    

    :tropical_drink:

    ...
    } catch (Exception ex) {
        //DO NOTHING
    } finally {
        return 0; //Success!
    }
    ...
    

    Substitute return condition as appropriate and enjoy your perfectly working and exception-free code! :trolleybus:



  • @fbmac said in WTF Bites:

    I had a coworker that put this on all his functions

    I've seen the pattern

    catch(Exception e){
        throw e;
    }
    

    because who cares about the original stack trace. right?


  • :belt_onion:

    @Zecc That's only a C# pitfall, likely made by a Java dev as it's the only way to rethrow an exception in Java.

    Personally I find it one of C# worst warts IMHO, Java was around when C# was designed so they might as well have gone for some more explicit way of resetting the stacktrace while still avoiding that pitfall.


  • Discourse touched me in a no-no place

    @Rhywden said in WTF Bites:

    I also like:

    ...
    } catch (Exception ex) {
        throw new NotImplementedException();
    }
    ...
    

    This was the pattern that I was complaining about. We also had the fun “on error just close the connection immediately and log nothing” pattern, but that was easy to fix by comparison (i.e., pitch the exn into the log as well; the particular peculiar protocol doesn't currently let me pass information out any other way). I'm of the opinion that a failure ought to be either completely handled by internal recovery code or logged exactly once.


  • Winner of the 2016 Presidential Election

    @JBert said in WTF Bites:

    likely made by a Java dev as it's the only way to rethrow an exception in Java.

    No, the way to rethrow an exception in Java is

    catch(Exception e)
    {
         throw new ApplicableException(e);
    }
    
    catch(Exception e){
        throw e;
    }
    

    is not recommended, for the same reason, because it will blow up your stack trace.


  • :belt_onion:

    @sloosecannon said in WTF Bites:

    @JBert said in WTF Bites:

    likely made by a Java dev as it's the only way to rethrow an exception in Java.

    No, the way to rethrow an exception in Java is

    catch(Exception e)
    {
         throw new ApplicableException(e);
    }
    

    That is called "exception wrapping" but it is orthogonal to plain rethrowing.

    It's recommended because your calling function might protest to catching 100 different kinds of checked exceptions your code uses internally so wrapping will help to reduce it to a smaller set (remember that in Java you must catch checked exceptions).

    catch(Exception e){
        throw e;
    }
    

    is not recommended, for the same reason, because it will blow up your stack trace.

    Except that it doesn't wipe your stack trace in Java. The stacktrace is recorded when the exception is first constructed, not when it gets thrown.

    The only way to get a false stacktrace is to construct a new exception:

    catch(Exception e){
        throw new RuntimeException(); // AAAAARGH
    }
    

    Rethrowing really is throw e in Java:

    catch(RuntimeException e)
    {
        logger.error("Failed to run task", e);
         throw e;
    }
    

  • Impossible Mission Players - A

    I love Mirco projectors!

    0_1489986753390_upload-aa74ffe1-982b-43c3-8917-81569b16da3b


  • :belt_onion:

    @Tsaukpaetra

    retun -E_WTF_BITE_NOT_OBVIOUS;

  • Impossible Mission Players - A

    @dse said in WTF Bites:

    @Tsaukpaetra

    retun -E_WTF_BITE_NOT_OBVIOUS;
    

    Yeah I don't know either. Perhaps I need more training?


  • :belt_onion:

    @Tsaukpaetra said in WTF Bites:

    @dse said in WTF Bites:

    @Tsaukpaetra

    retun -E_WTF_BITE_NOT_OBVIOUS;
    

    Yeah I don't know either. Perhaps I need more training?

    It is not your fault! be proud of what you are. Talk to your researcher human for better training data. Ideally should train with a larger corpus, I suggest at least WikiCorpus. But you can add domain adaptation and use a smaller and faster training set.


  • Impossible Mission Players - A

    @dse said in WTF Bites:

    WikiCorpus

    Is it really that full of WTF material though?

    I was under the impression that Reddit or 4Chan or Twitter were better sources?

    @dse said in WTF Bites:

    smaller and faster training set.

    .... Nah, too easy...


  • Dupa

    @Rhywden said in WTF Bites:

    WTF: So, one of my C# books mentioned a toolkit which makes starting a new Win10 app easier by providing a number of common plugins.

    They also mention that it's very easy to plugin any MVVM architecture you want and provide an example by using MVVM Light. I remember having looked it up before but I didn't remember why I didn't want to use it, considering that it is praised as "one of the most-used MVVM projects".

    So I go to the homepage of the project and am immediately reminded of GeoCities. Not good but I have seen worse. At least there is a clear link to the docs right at the top!

    Which leads to a bunch of goddamn videos with the most important ones being hosted on PluralSight. Which would force me to pay for this shit. And the source code documentation is available as .CHM (okay, it's available as a hosted website, too, but seriously?)

    Yeah, this thing with mvvmlight sucks BUT you can get a free 3-month pluralsight account from Microsoft as a part of their dev essentials program.

    Mvvmlight is nice, but it's what it is, it doesn't overpromise, it's just a toolkit. And it can make you follow bad patterns and practices if you're not careful.

    (Seriously, just recently I've seen a 5-page application that communicated between controllers through messages only. Holy shit!)



  • @Tsaukpaetra said in WTF Bites:

    I love Mirco projectors!

    0_1489986753390_upload-aa74ffe1-982b-43c3-8917-81569b16da3b

    0_1489996109254_Mircnewlogo.png :question:

    Also: "...actual product may differ from the manual." So, that manual could come with a toaster and still be valid. +1 for versatility!


  • Discourse touched me in a no-no place

    @JBert said in WTF Bites:

    remember that in Java you must catch checked exceptions

    Or let them flow on through; you shouldn't catch anything if you can't handle what to do about it. That said, don't log if you're rethrowing (unless the exception is going out over a remote interface without further error processing; whether to do that is a design decision) since that just bloats the log. The goal is to have failures logged once, no more, no less.



  • @boomzilla said in WTF Bites:

    I got an email from my mail order pharmacy guys telling me that they had a page to look at my prescription history. Cool! Wonder what we've been spending on drugs. Let's take a look!

    They break it out by person and have a subtotal at the bottom of each one. OK, nice...so what's the total I've paid? Scroll...scroll...scroll...huh. :wtf: No total. It's like they forgot to finish the page. Fuckers.

    They responded to my initial response telling me to go look at the page I was looking at. I responded by telling them that they should look at the page, because that was the page I was looking at and it doesn't show totals, just subtotals.

    Just got a response to the response, basically saying the same thing. This is the entirety of my response to that:

    You are retarded.



  • @boomzilla said in WTF Bites:

    You are retardedpoor, helpless first level helldesk outsourced IT drone.

    FTFY.



  • @izzion [insert blakeyrant about how I don't care what his problem is just that he can't even understand what I'm saying to him]


  • Discourse touched me in a no-no place

    @boomzilla said in WTF Bites:

    it doesn't show totals, just subtotals

    Of course not, totals would make you think more about the total amount that you are paying…



  • @Maciejasjmj said in WTF Bites:

    I suppose I figured that "hey, I'm going to await it higher up, why not just return the Task that I get from HttpClient? And you usually can do that... except for that using block which means that by the time you await the task, the client is already disposed of. Since everything above is async up to the controller, that means the whole thing only craps up in WebAPI's innards, and that's apparently enough to just bring the entire worker process down.

    Ugh. .NET version of swallowing a callback in js.



  • @loopback0 said in WTF Bites:

    Everyone knows the correct approach is:

    A few examples from a dearly departed colleague's code.

    0_1490020418671_upload-63f3e61b-ac21-4245-aeef-9afd87b4bdea

    0_1490020490278_upload-a87e961d-fa9d-4fb5-919b-4f934be02426


  • :belt_onion:

    @Atazhaia Also "Manual is for reference only." So don't eat it then?



  • @cartman82
    No jury would convict the person who helped said colleague depart from this mortal coil.


  • sockdevs

    0_1490021335575_upload-0bc4e064-c13e-4116-bead-3d04c0b7e360

    :giggity:



  • 0_1490020519269_upload-6b540026-25ea-4428-b9a5-4752622ab677

    Boss has found a new scraper master. This guy is an old school VB6 programmer who recently switched to django/python. Boss somehow got a hold of him because our scrapers are written in python. Partially. Well... actually, who knows. There's a reason he got rid of the old scraper master.

    Anyway, this guy was supposed to start the scrapers, but this has dragged on.

    Boss: Are they working now?
    SM: I dunno... I guess?
    Boss: Well can you see?
    SM: It's running very slow. I mean, I do have pentium 4 so it's understandable... But it's killing my computer and internet connection.
    Boss: Wait.... you are running them from your computer? Not from the server?

    :facepalm:

    Also, amazing sense of schadenfreude, since I've had absolutely nothing to do with this scraping effort.



  • @boomzilla Not trying to be difficult, but is it at all possible that the grand total is at the top of the page instead of at the bottom (where a grand total would be expected to be {or both top and bottom, preferably})?



  • @djls45 No. It is nowhere. I looked for that before I sent the original message. I did a ctrl+f on the page looking for the word total. I refreshed the page. I fiddled with the settings that were available.

    THEY ARE RETARDED



  • @boomzilla Send them a photo of a screenshot on a wooden table.


Log in to reply
 

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