😈 The Evil Ideas thread
-
Well, he was booted out under a cloud. The company's got to at least appear as if they're not rewarding failure too heavily.
Nonsense. Go back to my link above and find Hewlett Packard. Three CEOs in a row each left under a cloud:
- Leo Apotheker (< 1 year): $25.2 million
- Mark Hurd (6 years): $37 million
- Carly Fiorina (4 years): $21 million
CEO pay is not tied to performance (despite pretenses otherwise) and neither is their "severance".
-
Hewlett Packard. Three CEOs in a row each left under a cloud
Yeah, but not, like, a literal cloud, like the VW CEO.
-
Maybe they should build a wall around Bavaria to keep the modern world from getting in.
That sums up the gist of Bavarian's policy of the last decades quite well.They just can't decide whether to build a solid wall or a barbed wire fence, and whom to
robtax to pay it. Well, and how to let the tourists' money in while keeping their modernist ideas out.
-
-
I cant believe vw CEO was fired for that. SAMAR destroyed and entire city here, and the CEO is doing just fine. The company paid a fine that is like 1% of what they make in a year and everything is ok (for them).
-
I'd like more references. What is SAMAR? What city? Do you have a link?
It sounds like pretty typical behavior, though: companies are routinely given slap-on-the-wrist fines for misbehavior.
-
-
Found a link:
-
Ah! Not Samar, Samar[b]co[/b]…
-
SAMAR destroyed and entire city here, and the CEO is doing just fine. The company paid a fine that is like 1% of what they make in a year and everything is ok (for them).
Yeah but VWs cheating impacted the First World
-
@fbmac said:
SAMAR destroyed and entire city here, and the CEO is doing just fine. The company paid a fine that is like 1% of what they make in a year and everything is ok (for them).
Yeah but VWs cheating "impacted" the First World
but yeah, the thing @loopback0 said, so much =/
-
On this topic, remember the way the CEO of Union Carbide ended up staying in prison for the rest of his life after being extradited to India? I don't, either.
Filed Under: Gee, and they were so timely in making reparations, too, what with it only being twenty-five years, during which the company was passed around by other firms like a hot potato until another company ended up getting guilted into paying them as a way of distracting people from remembering their hanky-panky regarding a different chemical (dioxin, specifically its use in Agent Orange circa 1967)
-
-
Do you think most kids are aware that "She better be back before he finishes scanning"?
-
-
Although, I would not have chosen an Alsatian
-
Do you think most kids are aware that "She better be back before he finishes scanning"?
*I* certainly was.
-
My application needs to communicate with a .Net application. As part of the process, I need to call a particular method on a particular class. I discovered that the signature of that method changed in one version of the product--it went from taking 9 parameters to 10 (in either case, all but the first parameter are out parameters.)
I am not prepared to maintain multiple versions of the source tree, so yes, I am doing something like this:
DumbClass dc = new DumbClass(); // set up dc MethodInfo dm = dc.GetType().GetMethod("DumbMethod"); if (dm.GetParameters().Length == 9) dc.invoke(dm, new string[] { ... }); // 9 string vars in the ... else if (dm.GetParameters().Length == 10) dc.invoke(dm, new string[] { ... }); // 10 string vars in the ...
I haven't gotten far enough to actually build and test this so that code may not be 100% correct yet.
-
@FrostCat ew.
Maybe you could... offload the code that needs to do the connection to an external library, use
#ifdef
to compile two different versions of it, and dynamically link to the correct library at runtime?That's probably a lot more work than what you're doing, though.
-
@anotherusername Anything that increase the amount of compiling that's needed is bad. I already have to have multiple versions of my interface DLL for different versions of the external product, because they keep BREAKING MY WORKAROUNDS. I found out about bindingRedirect and that worked fine...until they started doing something with point versioning that broke it (my DLL built against 9.9.400.0 works fine with 9.9.500.0, but not with 9.9.500.4? WTF? and the time they broke it a DIFFERENT way by changing their digital signature (which invalidates bindingRedirect.)
Now I make them build my DLL for me, which took me a year and a half to get them to agree to do--but I hold the high card in that I can't do it because I don't have enough servers for every version of their product. They hate having to do that for me, but they have to, because I can't.
-
@FrostCat I should say--I'm already at having to maintain 3 different versions of the interface DLL--that literally only differ, until this bit with Reflection, in what build of the external product they're linked against) to work with their fuckiness.
-
@FrostCat said in 😈 The Evil Ideas thread:
My application needs to communicate with a .Net application. As part of the process, I need to call a particular method on a particular class. I discovered that the signature of that method changed in one version of the product--it went from taking 9 parameters to 10 (in either case, all but the first parameter are out parameters.)
I am not prepared to maintain multiple versions of the source tree, so yes, I am doing something like this:
DumbClass dc = new DumbClass(); // set up dc MethodInfo dm = dc.GetType().GetMethod("DumbMethod"); if (dm.GetParameters().Length == 9) dc.invoke(dm, new string[] { ... }); // 9 string vars in the ... else if (dm.GetParameters().Length == 10) dc.invoke(dm, new string[] { ... }); // 10 string vars in the ...
I haven't gotten far enough to actually build and test this so that code may not be 100% correct yet.
I'm new to .NET but couldn't they have prevented this fuckery by giving the 10th parameter a default value or by overloading the method?
Just wondering if it could have been avoided, hindsight and all that.
-
@JBert said in 😈 The Evil Ideas thread:
Just wondering if it could have been avoided, hindsight and all that.
Perhaps, but if everyone avoided problems because it was right to do so, we'd be much shorter of material for the TDWTF main site…
-
@JBert said in 😈 The Evil Ideas thread:
I'm new to .NET but couldn't they have prevented this fuckery by giving the 10th parameter a default value or by overloading the method?
Just wondering if it could have been avoided, hindsight and all that.Probably. In this case, a breaking change was probably necessary--the new field is a DB tenant ID.
-
http://www.fakewindowsupdate.com
Edit: also http://fakeupdate.net
OK, that link disappears. Here it is again: fakeupdate.net
-
@anonymous234 I'm amazed that my workplace filter hasn't flagged that site.
-
@anonymous234 said in 😈 The Evil Ideas thread:
fakeupdate.net
I like how that's a set of fake Windows update screens that includes Windows Ubuntu, Windows OSX, and Windows SteamOS :)
-
@anotherusername said in 😈 The Evil Ideas thread:
workplace filter hasn't flagged that site.
-
This is pretty scary...
Here's a video of an infected ATM
-
@JBert said in 😈 The Evil Ideas thread:
I'm new to .NET but couldn't they have prevented this fuckery by giving the 10th parameter a default value or by overloading the method?
Just wondering if it could have been avoided, hindsight and all that.If you were invoking the method normally then yes, but IIRC you need to match the signature exactly when using reflection like in the code example that @FrostCat provided.
-
@DoctorJones said in 😈 The Evil Ideas thread:
reflection
Yeah, since with refelction you're not getting any help from the compielr.
-
I've just had a little play in LinqPad and here are my findings:
void Main() { var foo = this.GetType().GetMethod("Foo"); string result = foo.Invoke(this, new [] {"Arg1", "Arg2"}).ToString(); result.Dump(); } public string Foo(string arg1, string arg2) { return arg1 + arg2; }
The above code sample outputs
Arg1Arg2
as you'd expect.Let's add in an optional parameter and see what happens...
void Main() { var foo = this.GetType().GetMethod("Foo"); string result = foo.Invoke(this, new [] {"Arg1", "Arg2"}).ToString(); result.Dump(); } public string Foo(string arg1, string arg2, string arg3 = "Arg3DefaultValue") { return arg1 + arg2 + arg3; }
As you'd expect, it blows up. A
TargetParameterCountException
is thrown with a message ofParameter count mismatch
.Let's try passing null as the third argument and see if that fixes it.
void Main() { var foo = this.GetType().GetMethod("Foo"); string result = foo.Invoke(this, new [] {"Arg1", "Arg2", null}).ToString(); result.Dump(); } public string Foo(string arg1, string arg2, string arg3 = "Arg3DefaultValue") { return arg1 + arg2 + arg3; }
Hmmm, it doesn't explode any more, but the output is
Arg1Arg2
. We don't get the default value for arg3.If we want to see the default for arg3, we need to pass in
Type.Missing
as the third parameter.void Main() { var foo = this.GetType().GetMethod("Foo"); string result = foo.Invoke(this, new [] {"Arg1", "Arg2", Type.Missing}).ToString(); result.Dump(); } public string Foo(string arg1, string arg2, string arg3 = "Arg3DefaultValue") { return arg1 + arg2 + arg3; }
This now correctly outputs
Arg1Arg2Arg3DefaultValue
.Therefore, if you want to invoke a method and cater for any future optional parameters you want to do something like this.
void Main() { var foo = this.GetType().GetMethod("Foo"); //get the parameters, and pad them out to the number of required arguments with Type.Missing var parameters = GetParameters(new [] { "Arg1", "Arg2" }, foo.GetParameters().Count()); string result = foo.Invoke(this, parameters.ToArray()).ToString(); result.Dump(); } public IEnumerable<object> GetParameters(object[] parameters, int count) { for (int i = 0; i < count; i++) { //if we have a value return it if (i < parameters.Length) { yield return parameters[i]; } //return any extra values as Type.Missing else { yield return Type.Missing; } } } public string Foo(string arg1, string arg2, string arg3 = "Arg3DefaultValue") { return arg1 + arg2 + arg3; }
Obviously if any non optional parameters are added to the signature, you're screwed, but at least you'll be covered for optional parameters.
-
Does what it says on the onebox so probasbly nsfw...
-
@Boner You could neuter that link...
Also see https://m.reddit.com/r/InternetIsBeautiful/comments/4nc763/ruin_my_search_history_ruin_your_google_search/ - just don't click their "article link".
-
@Boner said in 😈 The Evil Ideas thread:
Does what it says on the onebox so probasbly nsfw...
Yeah, lots of weird things it puts in the search box...
Ends on
donald trump
though, so.... Evil?Also, Google suggests "why is age of consent so old her" when it searched "why is age of consent so old here"...
Also, interesting search term, may save for later: "penis remove dog how to" got a result for "Why did they cut my dogs penis when he got nuetured? ?"
-
@DoctorJones said in 😈 The Evil Ideas thread:
Here's a video of an infected ATM
Here is how I would make a foolproof skimmer.
- Install a camera, and a reader
- the reader only needs the account number
- the camera watches the person, not the pin
- Using facial / body recognition, it will tell who just grabs the cash and shoves it into their wallet without counting.
- The next time that account withdraws cash over a certain threshold-- say $100, the skimmer literally skims one bill from the withdrawal.
- That person shoves their withdrawal (minus $20) into their wallet and never even realizes it.
Those targets never count how much cash they're carrying, and will probably never, ever even realize they are one bill short. If they do, they'll just think they mis-spent.
For additional lolz:
- It won't skim off the same person more than once per five or ten transactions, to fall even further into the noise
- If the camera ever detects that a "mark" is there, but not alone, it won't ever skim
Number 2 is because at some point, someone is going to get a teller and say "Your machine gave me $20 less!"-- either immediately after the fact or at some point in the future. The mark will then demonstrate this to the teller-- but the camera will detect that, and give the proper amount.
The machine will also be programmed with certain "exit" gestures and/or facial recognition. That way myself, or an accomplice, can go to the machine, make a regular withdrawal, and get all the stored, skimmed cash.
-
Idea: configure source control to replace all (syntactically significant) tabs and/or spaces in a Python script to zero-width spaces on pull.
Filed under: WHERE IS YOUR GOD NOW? BOW TO THE POWER OF BRACKETS
-
@Onyx said in 😈 The Evil Ideas thread:
Idea: configure source control to replace all (syntactically significant) tabs and/or spaces in a Python script to zero-width spaces on pull.
Filed under: WHERE IS YOUR GOD NOW? BOW TO THE POWER OF BRACKETS
Aww man if it stripped all unnecessary white space on commit and then let my editor auto format that would be awesome. I would actually find you and throw money at you if I had any.
-
This is probably as good a place as any to show off my creation.
I happen to have an old blog that I used to keep when I was young and foolish, which was a convenient platform to expose this on (I'm not sure why it didn't occur to me sooner).
I can't exactly stop you from looking at all the stupid things I wrote - this link is to the one I'm least embarrassed at - but the point is the link in the sidebar that warns you not to click it. Do let me know what you think.
I do apologise for the terrible images. I lack both skill and software but I needed some assets I owned the rights to.
-
@CarrieVS said in 😈 The Evil Ideas thread:
- this link i
Darn, blogspots are blocked at work...
Edit:
@CarrieVS said in 😈 The Evil Ideas thread:
but the point is the link in the sidebar that warns you not to click it. Do let me know what you think.
Awe! Infinite source of material detected!
-
@Tsaukpaetra said in 😈 The Evil Ideas thread:
Darn, blogspots are blocked at work...
Sorry. I don't have anywhere else to put it. It's just a little script I made a while ago. I didn't think of using my old blog to host it until tonight.
-
@FrostCat said in 😈 The Evil Ideas thread:
I discovered that the signature of that method changed in one version of the product--it went from taking 9 parameters to 10 (in either case, all but the first parameter are out parameters.)
Hm. They should have picked a language with POCO objects or maybe structs.
-
@DoctorJones said in 😈 The Evil Ideas thread:
This now correctly outputs Arg1Arg2Arg3DefaultValue.
I wouldn't take as a given that
out
params behave the same way in your test that regular params do. They might. But I wouldn't just blithely assume they do.
-
@CarrieVS said in 😈 The Evil Ideas thread:
@Tsaukpaetra said in 😈 The Evil Ideas thread:
Darn, blogspots are blocked at work...
Sorry. I don't have anywhere else to put it. It's just a little script I made a while ago. I didn't think of using my old blog to host it until tonight.
Got around it by using mobile. Chrome apparently doesn't like drawing several hundred troubles...
-
@Tsaukpaetra Once it gets to a critical mass you just have to get to the black box and wait until the tribbles finish rendering. I'm not so evil I didn't put a reset button in.
-
@Tsaukpaetra said in 😈 The Evil Ideas thread:
Got around it by using mobile. Chrome apparently doesn't like drawing several hundred troubles...
Neither does Firefox. Locked up hard and had to kill.
-
@dcon said in 😈 The Evil Ideas thread:
Locked up hard and had to kill.
Never did that with me. On Chrome. I tested it plenty of times and at most had to wait twenty seconds or so between getting the mouse to the reset button and being able to click it. I do apologise.
-
@CarrieVS said in 😈 The Evil Ideas thread:
Once it gets to a critical mass you just have to get to the black box and wait until the tribbles finish rendering. I'm not so evil I didn't put a reset button in.
Oh, I saw the Reset box on the bottom right, but since my phone thinks it's a tablet ofttimes the button is nigh-unhittable, and even more so when there are so many more objects that will gladly double the amount of things onscreen if you miss. ;)
I'm rather surprised nobody's commented on my tiny screen actually, whenever I use other people's phones I'm like " do you use your phone with your fist or something?"
-
@Tsaukpaetra said in 😈 The Evil Ideas thread:
I'm rather surprised nobody's commented on my tiny screen actually
Looks huge to me - I have a Blackberry Curve.
I guess I wasn't really thinking of mobiles when I designed this.
-
@CarrieVS said in 😈 The Evil Ideas thread:
Looks huge to me - I have a Blackberry Curve.
Yeah, it's kinda backwards. The screen itself is like, 5.5" or whatever (because phone), but the resolution is full HD 1080x1920 or whatever, so I set the DPI to something that would be more appropriate on a desktop machine (280, no way in heck you'll convince me to shoot for 96) instead of the ridiculous 480. So, I essentially get a tablet-esque experience most of the time (because apps are dumb) and some of the issues of this site on mobile (like, having only one line to type in the composer) don't appear for me.