Well, I hope you didn't click it!
TheRider
@TheRider
Best posts made by TheRider
-
RE: Here's a phishing scam. Don't click it.
-
RE: Wife WTF
@ammoQ said:
@Lingerance said:
However if you actually share your entire income with each other you are fucked, you were the moment you agreed to do so.
Thesis confirmed by observation and experiment.
We don't share income. She spends my money, whereas I can't touch hers...
Latest posts made by TheRider
-
RE: Buy a new computer, this one has a virus...
Personally, I hate nothing more than removing viruses from my friend's computers. Sometimes I'd really like to just tell them to throw it away and buy a new one. These people did it. I'm proud of them.
-
RE: "Just some content for now"
@FrostCat said:
@Ben L. said:
I considered the environment, and then printed the mail@realmerlyn said:
Actually, I overlooked the whole "for now". Maybe if I had just waited long enough, the message would have updated itself to be the real content.
Print it out first - I hear dead trees are good at getting updates automatically.
Please consider the environment before printing it out.
-
RE: The Bar-Seperated Values CSV
@AndyCanfield said:
I'm Swiss, but I don't like to pay for them Thai ladies.Lot of Thai ladies eat the Swiss. Make good money at it, too.
-
RE: Why are the Resistance winning at Ingress?
@dhromed said:
The space bar pages down perfectly inside my Google Chrome browser@PJH said:
@Shoreline said:
Google+ post.
Is it just my FF22.0 or does the space bar not work for everyone on G+? I'm presuming someone's borked some js somewhere and it's eating the event, but normally it should page-down the screen.There's a special place in hell for the creators of websites that override basic browser features.
-
RE: More from Santosh K.
Well, the reflection API can be used to great advantage to do stuff not otherwise possible. But at the same time it can also be used to obfuscate code to the point of unrecognizability. This is a perfect example of the latter.
-
RE: Dead Code?
@OzPeter said:
@TheRider said:
Yes. The list will always contain exactly two items at that point. I forgot to post the preceding two lines, which are as follows:
So what happens if the assertion fails? And if you say it "can't fail", then why have the assertion?
final int t_resultSize = t_TestList.size();
assertEquals(2, t_resultSize);
Of course this also raises the question of do you keep assertions in your production code - and there are arguments for keeping them in and leaving them out.
The code I am talking about is Java code, and it is a JUnit-Test. When you do Test-Driven-Development (TDD), as you should nowadays, you always write Unit-Tests to call your real code, and after that you assert that the outcome is what you wish it should be. In this particular case, some business method has been called beforehand, whose output now needs to be validated. The JUnit-Framework offers those assertXxx-Methods for this purpose. assertEquals(...) verifies that the two parameters are equal. If they are not, it throws an Exception and the code thus doesn't continue. The code that follows may thus safely assume that t_TestList exists (is not null, but the corresponding "assertNotNull(t_TestList) has been executed just before that) and contains exactly two items. A loop that does something with the first item in the list and then exits, therefore, has no purpose and can be written much easier, as I did.It looks like next time I post something, I need to give more context to begin with... :-)
-
RE: Dead Code?
@OzPeter said:
@TheRider said:
Yes. The list will always contain exactly two items at that point. I forgot to post the preceding two lines, which are as follows:....I deleted the loop, replaced the references to the loop counter variable with zero, and proceeded with my work.
And that work included testing the change?
final int t_resultSize = t_TestList.size();
assertEquals(2, t_resultSize); -
Dead Code?
I was refactoring a bit of old code and wondered why the "i++" part was marked with a yellow curly line. Checking the IDE compiler warning told me, that this was dead code. I scratched my head for a while until I saw what made it say so. Can you spot the reason?
for (int i = 0; i < t_TestList.size(); i++)
{
DataCriteria t_dataCriteria = (DataCriteria) t_TestList.get(i);
t_dataCriteria.setStatus("Test" + i);
getDataCriteriaDAO ().save(t_dataCriteria);
break;
}It turns out that the whole loop is unnecessary because it is being executed only once. I deleted the loop, replaced the references to the loop counter variable with zero, and proceeded with my work.
-
RE: JIRA's JavaScript is full of debug statements
oh my God—it's full of stars!
-
RE: Wine (also QR codes)
@PSWorx said:
As for a somewhat clever use of QR codes (among other things), I've recently found this game. Sadly, I couldn't try it out yet because I don't have an iThing though.
I tried it with my iThing. Works quite nicely, although with quite some lag. My spaceship usually died very quickly.