« first day (1639 days earlier)      last day (3337 days later) » 

12:47 AM
I'm voting to close this question as off-topic because this should be Programmers stack exchange site instead of here. — James Black 38 secs ago
 
 
2 hours later…
3:13 AM
@MichaelT That'd be impressive if it were 38,400 or 57,600
 
 
1 hour later…
4:42 AM
@MichaelT you mean cordova/phonegap to be one example?
 
 
2 hours later…
6:53 AM
I think this is too broad for Stack Overflow, but there may be a specific technical problem that you can tease out here. (Or maybe a version of this would be more suitable on Programmers.SE.) However, just because data is identified by IRIs in linked-data settings doesn't mean anything about where data comes from. If you have some black box that takes an IRI and returns some data about it (presumably by launching an external request), you can easily set up a mock black box that does the same thing for a testing environment but doesn't make an external request. It's really no... — Joshua Taylor 56 secs ago
Since you're asking a programming profession related question rather than a programming question, I suggest asking this in Programmers.SE. However, that's for a mod to decide, really. FPA is a niche process with a lot of covered ground. — The Laughing Man 41 secs ago
 
 
8 hours later…
2:55 PM
Wooo Eclipse won't run on my Mac and the update page on apple's website is broken....
2 days ago, by enderland
@MichaelT from what I have gathered configuring a decent java ide is a pain
 
4:02 PM
@enderland You'd think the folks who make programming tools would have a vested interest in making sure they work on all the popular platforms.
The LLVM compiler infrastructure looks very cool. I'd love to try it, but the price of admission on Windows is a full build of their entire toolchain, and since I'm a beginner in C++, that pretty much locks me out.
They're Unix snobs, apparently.
 
Yeah, probably
Eventually the mac page worked for me to download stuff, so I'm going through Euler problems now
 
Have you tried HackerRank yet?
 
No
I'm just getting myself some experience with Java
Plus, this is kinda fun anyways :)
 
HackerRank is rather satisfying, in an "earn meaningless internet points" sort of way.
 
Have you done TDD at all with Eclipse?
I'm trying to figure out how to set it up since I want to get better at that
Or if I should just write "manual" tests
 
4:11 PM
No on both counts, sorry. It never occurred to me that TDD tests might be anything other than manually-written. There's some code generation in Visual Studio, but those are "test later" tests.
 
I more mean finding a framework that lets me use something like assertFalse() instead of writing it myself
 
@enderland JUnit.
 
@RobertHarvey Ahh, perfect
Lots better than crap like
> assert checker.isPalindrome(900)==false;
assert checker.isPalindrome(901)==false;
assert checker.isPalindrome(1000)==false;
assert checker.isPalindrome(10)==false;

assert checker.isPalindrome(909)==true;
assert checker.isPalindrome(11111)==true;
assert checker.isPalindrome(1001)==true;
 
assert !checker.IsPalindrome(900);
But yeah. It's nice to be assertive.
 
4:27 PM
So in a case like this, is it better to write individual tests for each number I want to check, or write a bunch of failing ones and check a bunch at once?
I guess it makes more sense to write a bunch of tests to check individual failing/passing numbers...
 
You would write a test that specifies the behavior you want. Something akin to
 
Or maybe it's worth not writing a bunch of tests at once, but doing smaller scale test writing first? (yes this is total overkill for this problem to do TDD this way)
 
assert IsPalindrome.When(firstDigit.Equals(lastDigit)).and(secondDigit.Equals(nextToLas‌​tDigit)) ...etc'
I guess your first test would be for any two digit number where
assert IsPalindrome.When(firstDigit.Equals(lastDigit));
Or even
assert.IsPalindrome.When(number.Contains(oneDigit));
 
Hmm
 
That's not real code, of course. TDD makes my head spin; it's a very different way of thinking about the problem.
 
4:35 PM
Yeah, I'm not sure a good way to do it when you have a set of criteria like this, or if it's the wrong tool for the job?
 
Well the TDD'ers would claim it's the only correct tool for any job.
 
I have 8 cases now, 2,3,4 digit numbers for both true/false
@RobertHarvey I've got a team I work with at work like this, too
My coworkers are far more pragmatic
 
But specific digits are not a behavior specification. What you want in TDD are tests that are specifications for behaviors.
Tests that include specific numbers are illustrations, not specifications. See the difference?
 
Yeah
I guess I'm making the assumption in my cases that saying 100 is the equivalent of "three digit number which is not palindrome"
and that 101 is "three digit number which is palindrome"
 
Granted, you're going to have to plug in some numbers to make the thing run.
That's one of the things about TDD that baffles me.
 
user20683
4:41 PM
 
The implementation could be anything. And when you write assert.IsPalindrome.When(number.Contains(oneDigit)); you're really writing the implementation.
 
user20683
this has not happened to me, I just thought it was cute
 
@enderland TDD makes more sense to me in the context of BDD. In BDD, you have some use case like "As a logged in user, I want to check a customer's credit history." Then you have some test that runs that scenario with specifics.
The TDD'ers are always saying "Don't look ahead at the algorithm. Only write enough code to make the test pass." That means you can write code like "If number is 100, return false" to make the test pass, which is patently ridiculous.
You can't divorce writing code from design.
Anyway, don't listen to anything I say. I'm not a TDD expert. :)
 
user20683
A TDD expert would say that that's a bad test
 
user20683
write good tests and then write only enough code to make the test pass such that you don't introduce any extra behavior
 
4:48 PM
@WorldEngineer Read up a screen or two, and then tell me if I'm full of shit or not.
 
user20683
@RobertHarvey You're right about overly narrow uses of testing
 
user20683
and also overly broad
 
user20683
TDD has a sweetspot
 
user20683
taking it outside that can lead to issues
 
Like testing a method for a variety of inputs, like what I am trying to do...
 
user20683
4:51 PM
@enderland you write one test for basic functionality
 
user20683
like assert.add(4,3) = 7
 
user20683
and then you run as many edge cases as is pragmatic
 
user20683
assert.add("unladden swallow", "ladden swallow") = "nonsense"
 
I think part of the reason this is difficult is I am trying to do TDD to solve a problem
> A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.

Find the largest palindrome made from the product of two 3-digit numbers.
so I don't know my expected outcome in advance
 
user20683
@enderland you don't use TDD if the solution is unknown
 
5:03 PM
@WorldEngineer Yeah
I guess I was using it to validate my "is palindrome?" class
I'm going to post all this on Code Review, so what I did will be more obvious
 
user20683
you'd figure it out and then use TDD to essentially attempt to minimize things
 
0
Q: TDD for Euler Problem #4

enderlandI am in the process of learning Java and going through the Euler problems. For Problem 4 I decided to also implement a TDD approach with JUnit. My questions are: Is there a better TDD approach to this problem? I wrote out all these test cases initially. Some obviously pass and some fail initi...

@WorldEngineer I think focusing my tests on functionality of the palindrome checker is the only way to do this particular problem, without more "valid data" to work from
 
 
1 hour later…
6:35 PM
You were so Right !!!!!, I removed the two underscores _ _ and a comma ,...So its looks like this Label42 Key Press e . Handled ..works like a watch .I am making a calculator .btw . Thank you . This site is the best site for programmers .I recommend this site all the time in college — Barry Carroll 1 min ago
 
Yeesh.
 
6:55 PM
@rolfl so an interesting TDD question - do you write tests for all possible use cases, or just those you expect to deal with?
 
7:23 PM
TDD meaning test first or not?
 
user20683
@Telastyn tests first
 
I very rarely test first, and when I do I focus on mildly complex happy path.
 
user20683
@Telastyn what's your primary language?
 
C#
 
user20683
@Telastyn TDD in my experience is more of a dynamic languages thing. It certainly shows up in statically typed environments but seems to have less traction
 
7:29 PM
hmm, curious. I know that TDD in general is more prevalent in dynamic languages, but I was under the impression that the test first-iness was a matter of religion and language dynamicism didn't influence that.
 
user20683
@Telastyn Its a matter of Ruby and its influence
 
user20683
or rather Smalltalk's influence on the Ruby community
 
user20683
since that's where unit testing comes from
 
really? I am skeptical of that but I suppose I don't actually know a lot about unit testing history.
 
user20683
SUnit is a unit testing framework for the programming language Smalltalk. It is the original source of the xUnit design, originally written by the creator of Extreme Programming, Kent Beck. SUnit allows writing tests and checking results in Smalltalk. The resulting tests are very stable, but this method has the disadvantage that testers must be able to write simple Smalltalk programs. == History == SUnit was originally described by Beck in "Simple Smalltalk Testing: With Patterns" (1989), then published as chapter 30 "Simple Smalltalk Testing", in the book Kent Beck's Guide to Better Smalltalk...
 
7:46 PM
that's the framework though, not the concept
 
user20683
@Telastyn Apparently the concept by other names has been around since 1957
 
hrm
 
8:23 PM
@enderland It's never a clear concept, in reality.
The concept is supposed to be: I know what the code should do, and should not do, so I will write tests to cover those cases, then write the code to make the tests pass.
 
8:45 PM
@rolfl Yeah, that's kind of what I did in that instance - knowing that I will only be giving it numbers between 100 and 1000
Man, Stack Overflow is tough on "why" questions - does everyone there only ask how questions?
 
thanks for all your votes. Now where do I go to delete all questions?
 
Congrats, @amon
 
user20683
@MichaelT O_o
 
user55340
8:57 PM
@WorldEngineer that was my thought too.
 
user20683
@MichaelT Also she's out celebrating a friend's birthday, won't be back till like 11pm+
 
user55340
I'm just waiting for those questions to show up as jokes on gaming.
 
user55340
and if I mentioned it in the bridge... it would be all that much faster... and not in a good way.
 
How is this a programming question? It's more appropriate for Super User. This site is for questions related to programming (code) and programmers tools (IDEs, compilers, linkers, libraries, etc.), not general computer support. The help center has the guidelines for what types of question are suitable to ask here if you need more information. Good luck. — Ken White 1 min ago
 
10:11 PM
It doesn't seem to fit programmers.SE, either. This type of broad question isn't really a good fit for the SE q/a model, it belongs in a discussion forum. But I kind of think that if you find the emails confusing, you may be too much of a beginner to be a viable contributor. — Barmar 9 secs ago
 
 
1 hour later…
11:29 PM
Hardware and general computer support questions belong at Super User. This site is for programming and programmers tools related questions. You can find the guidelines in the help center pages, which is available on every site in Stack Exchange. — Ken White 26 secs ago
 

« first day (1639 days earlier)      last day (3337 days later) »