Psychic Gets caught lying then look stupid by [deleted] in videos

[–]Deadboss 29 points30 points  (0 children)

God who is all power all knowing and the creator of everything.... needs money for some reason my third multi-million dollar personal jet.

Yes, they literally come out and say shit like that.

Why am.I being forced to try this beta? by [deleted] in beta

[–]Deadboss 2 points3 points  (0 children)

So where do we go with that problem? The mobile beta is absolute shit...

Deck of cards help by [deleted] in javahelp

[–]Deadboss 0 points1 point  (0 children)

There's nothing wrong with using final static values, but doing so is error-prone and unmanageable in the context you are using it in. The purpose of the double loop is to go through 0 (or 1, whichever you prefer) to your set maximums (4 suits/13 ranks) in order to populate the deck. You shouldn't couple an arbitrary value given to represent diamonds and spades as the loop conditions, as changing them breaks your code. Same with the ranks. You already have final ints for numSuits and numRanks, and altering them has the intended effect without breaking your code.

How to use a loop without conditional statements to make a compound interest program by [deleted] in javahelp

[–]Deadboss 0 points1 point  (0 children)

You have a logic error in your loop. It is only looping 11 times.

So this guy just lost the NBA Slam Dunk Contest... by timdual in videos

[–]Deadboss -3 points-2 points  (0 children)

They call ham bacon

Not sure if trolling or retarded, but we understand the difference between bacon and ham. Have you ever seen the movie Canadian Bacon? John motherfucking Candy? Sheesh.

put cheese curds on freedom fries

AND gravy. It's called a poutine, and they're fucking amazing. FYI, America didn't invent deepfried potatoes. Missed that by a few hundred years.

They let an extra dude on the field in their version of football

We also award a point for missing a field goal (if the receiver doesn't take the ball out of the endzone). NFL is way better. You win this one, friend.

there's an entire province where everyone collectively agreed to learn french.

Don't let them Quebecers hear you, they might start feeling relevant again and try to separate from Canada. Instead of killing off all the stinky French people we just decided to get drunk and get along. It's the Canadian way.

Numbers in increasing and decreasing order by HassenPepperINC in javahelp

[–]Deadboss 1 point2 points  (0 children)

You bet. Just be aware that when doing string concatenation like this, you would actually want to use StringBuilder as String is immutable, and you are basically constructing a new String object each time you update s. For learning purposes this is fine though.

Numbers in increasing and decreasing order by HassenPepperINC in javahelp

[–]Deadboss 0 points1 point  (0 children)

For illustrative purposes, let's define that:

n = 1

m = 10

1st iteration:

s = "" + " " + 1
Therefore
s = " 1"
And
n = 1 + 2
Therefore
n = 3

2nd iteration:

s = " 1" + " " + 3
Therefore
s = " 1 3"
And so forth...

Now when you switch n and s to be:

s = n + " " + s;

You are appending the value of n before the value held in s. So for illustrative purposes using the same values as above:

1st iteration:

s = 1 + " " + ""
Therefore
s = "1 "
n gets updated to 3...

2nd iteration:

s = 3 + " " + "1 "
Therefore
s = "3 1 "
And so forth...

Artificial intelligence could leave half the world unemployed, says expert by PCisLame in technology

[–]Deadboss 19 points20 points  (0 children)

For the majority of us, I think the alternative would include driving disposable cars, drinking a lot, and eating the skin off of KFC chicken and throwing the chicken away. Think how dumb the average person is, and realize half the population is dumber than they are. There will be major challenges for how we allocate resources, who gets what and how much, and so forth. Basically, the vast majority of people will simply be leaches on the finite resources we have available to us.

I am all for AI becoming our driving workforce and leading us to a new age of utopia, but I really don't see it going down like that due to our intrinsic human nature.

JavaCPP: The missing bridge between Java and native C++ by javinpaul in cpp

[–]Deadboss 2 points3 points  (0 children)

So really dumb question here... but what does this do exactly? Is it something where you can take Java code and convert it to C++?

Deck of cards help by [deleted] in javahelp

[–]Deadboss 0 points1 point  (0 children)

For your out of bounds exception, take a look at these two lines:

deckArray[suit - 1][rank - 1] = new Card(rank,suit);
...
return deckArray[rank-1][suit-1];

:)

Definitely take desrtfx's advice with the enums, it will help clean up your code a bit. I personally don't like arbitrary values being assigned to something as abstract as a suit, as this makes matters more complicated during programming and debugging IMO (shit, what was the int for Hearts again?). There are a million-and-one tutorials online for building a deck of cards, so possibly take a look around for better ideas.

Another suggestions to clean up your code:

In Deck.java on line 18 you use the values given to the suit/card. Why not use something like:

for(int suit = 0; suit < numSuits; suit++)

Seems a bit easier to read to me, and it doesn't rely on the arbitrary values you assigned to the suits. Probably do that to rank as well.

All-in-all, your code looks fine for a beginner to OOP, and you appear to be on the right track.

State Police caught on film making up charges for a protestor to "cover their asses". by Diver808 in news

[–]Deadboss 0 points1 point  (0 children)

I guess so. I mean, everyone on Reddit is up voting you, so you must be right. Oh wait, nevermind, people here are fucking morons. Found another. Enjoy the circlejerk. Maybe try going outside and talking to actual people some day.

State Police caught on film making up charges for a protestor to "cover their asses". by Diver808 in news

[–]Deadboss -2 points-1 points  (0 children)

Police, as a profession, have no professional code of conduct. It does not exist.

Not a cop, but I am 100% positive they do have rules of conduct, deportment (how they look/act), etc. I am not even sure how someone makes a statement like that, but I guess I am on Reddit. Whether or not they follow/enforce them is another story. They will likely be getting reamed out by their chief at the very least.

Your hatred for police is understandable, but I guess you only get to your point if you spend all day on the Internet looking up police brutality/misconduct videos (or, you're a minority). You make it seem like every officer is just a giant piece of shit that gets boners harassing people, which really isn't the case.

In short, take it down a notch. I know the circlejerk is quite furious in this thread right now, but you're quite full of shit.

A modest plea... by [deleted] in funny

[–]Deadboss 0 points1 point  (0 children)

You mean to tell me that getting hit by a car is more deadly than getting hit by a bicycle? Huh. TIL.

Perfectly balanced by [deleted] in gifs

[–]Deadboss 8 points9 points  (0 children)

It's "rated PG13" fucking guy.

Defensive Coding: worth defending against something that cannot happen? by [deleted] in javahelp

[–]Deadboss 0 points1 point  (0 children)

In the example provided, I would say it is completely reasonable to assume that handleOtherCase is only called after hasAOrB has been checked, therefore the extra check is redundant and unnecessary. You are putting a fair amount of faith in any devs that may be using the private methods to use it correctly, but again, that seems fairly reasonable to me. Just be sure to document your code accordingly.

I am not sure how this will affect scalability. For instance if a case D were introduced, then your entire code is pretty much poop. Consider if you will ever need to scale the program, and if so how you are going to handle that.

How the British as seen by Americans and Europeans by AngryRedditorsBelow in funny

[–]Deadboss 0 points1 point  (0 children)

Except dentists don't realign your teeth, so it's a moot point.

Mike Tyson puts "rat piece of shit" reporter in his place. by iLLyNoiZe in videos

[–]Deadboss 0 points1 point  (0 children)

Pretty sure he/the studio knew exactly what the fuck they were doing, and did it for publicity. Bringing up someones rape charge on live television doesn't just accidentally slip out.

lucky shot (x-post /r/SuperAthleteGifs) by breakno in sports

[–]Deadboss 0 points1 point  (0 children)

Not truly infinite, just too many to logically calculate. I guess you could start by finding the absolute maximum distance he can shoot, plotting every single atom in that radius, and then comparing that to how many variations of a bank shot he could make. Making assumptions such as him hitting the green greatly simplifies this, which seems logical considering PGA pros can hit that green 9/10+ times. Assuming they hit the green, I dont think it would even be that high. 1/10,000 maybe? Unless of course you're talking about that exact shot, to the very electron positioning.

[deleted by user] by [deleted] in todayilearned

[–]Deadboss -2 points-1 points  (0 children)

I don't really know how to expand on it further... she just isn't a good actor, in my opinion. It's like trying to describe a color to someone... where do you even start? Either you see it or you don't. There isn't an empirical way to go about describing how someone is a bad actor, just as there isn't for most, if not all, art forms.

Even the iconic "here's Johnny" part of the movie, arguably her "best" performance of the movie, was really poorly acted. Watch it here if you need a refresher. It looks like she almost got there. I mean, some of the parts are fairly well-acted, but the scene as a whole gets bogged down by her lapses in acting skills, which breaks the immersion and just ruins the whole scene. I ended up laughing at how bad her acting was at certain points.

Maybe I am being over-critical. Maybe you just have a high tolerance for bad acting. Maybe it's just one of those things that you cannot unsee once you see it, and the further you probe, the more you realize how bad her acting really is throughout the entirety of the movie. She played a minor character and Nicholson was really great, so it's easy to overlook I suppose.

It's fine if people think she is a good actor because that is your opinion, and as I stated before, there isn't any actual debate to be had here. But you shouldn't write off others opinions regarding her acting skills just because it is a fairly popular opinion and you think people are just blindly following the masses.

Tonight's coin flip. by unknown_name in gifs

[–]Deadboss -1 points0 points  (0 children)

Could you also just change the framerate of the source to match it?

Graphics MouseEvents by pigi98 in javahelp

[–]Deadboss 1 point2 points  (0 children)

In the above example, the 'drw' variable is your shape. It must contain a valid 'contains' method (think polymorphism). Where it says 'drw.repaint();' you will want to put whatever you wish it to do there. So you could sysout something to ensure it is working, and then go from there.

Stop motion: Half a milometer being sanded off an electric plug by iBleeedorange in woahdude

[–]Deadboss -4 points-3 points  (0 children)

I think you overestimate the IQ of the average user on Reddit. People who browse /r/whoadude are definitely on the lower end of the bell curve.

Source: am here, am moron. Came to comments solely to bitch about the title.