• 0 Posts
  • 29 Comments
Joined 2 years ago
cake
Cake day: October 23rd, 2023

help-circle

  • Either way gets me to a passing test, but I prefer the latter because it enables me to write another failing test.

    But you could just write that failing test up front. TDD encourages you to pretend to know less than you do (you know that testing evenness requires more than one test, and you know the implementation requires more than some if-statements), but no-one has ever made a convincing argument to me that you get anything out of this pretence.

    Tests should make changing your system easier and safer, if they don’t it is typically a sign things are being tested at the wrong level

    TDD is about writing (a lot of) unit tests, which are at a low-level. Because they are a low-level design-tool, they test the low-level design. Any non-trivial change affects the low-level design of a component, because changes tend to affect code at a certain level and most of those below it to some degree.


  • When faced with a failing test, you make it pass as simply as possible, and then you summon all your computer science / programming experience to refactor the code into something more elegant and maintainable.

    Why bother making it pass “as simply as possible” instead of summoning all that experience to write something that don’t know is stupid?

    TDD doesn’t promise to drive the final implementation at the unit level

    What exactly does it drive, then? Apart from writing more test code than application code, with attendant burdens when refactoring or making other changes.



  • As the existing reply stated, there are only ever finitely many tests.

    My issue with TDD is that it pretends to drive the final implementation with tests, but what is really driving the implementation is the monkey at the keyboard thinking, “testing for evenness should be done with the modulo operation,” not exhaustive tests.



  • It’s a shame that you’re so quick to express skepticism but so reluctant to do any research of your own, because the facts are a bit embarrassing with the exact same trend in the USA as in the UK.

    Driver safety peaks in the 60s, and only moderately worsens after then. The large increase in fatal accidents, by the way, is clearly a result of older drivers being more vulnerable in a crash - because the chart at the bottom doesn’t show any such large increase for passengers and others.

    I’m interested to know if this changes your mind.


  • That doesn’t affect the ability of older drivers, only the number of them.

    In fact, since one reason very old drivers might get more accident prone is because they stop driving as much and lose some of the skills, you would expect that, if older Americans really persist in driving more as they get older (you haven’t provided any evidence that they do) they would retain those skills and be less accident prone, not more, so would be safer, and less at need of re-tests, than their UK counterparts.

    Focusing on the driving safety of the elderly is a classic example of Saliency Bias. A 20-year old kid wrecking his car is nothing unusual so you don’t remember it when thinking about safety. An 80 year old who can’t even remember which way to turn the wheel getting in a wreck is unusual and extreme, so it’s more salient. Getting stuck behind an elderly driver gives you the impression that they’re a bad and hence unsafe driver, which contributes to this.







  • As far as I can work out about this USA, this is not true. It is certainly not true where I am from. It may be true in the case of postdoctoral researchers (but not always), i.e. relatively junior researchers who don’t yet have a permanent position. But a permanent position is just that - it’s like a permanent job, and you’re paid a salary by the university that gave you that position. You will typically also need to apply for grants in order to pay for things like:

    • travel to conferences
    • travel to collaborate in person with colleagues at other institutions
    • make papers open access
    • hire postdoctoral researchers and PhD students.

    I did two postdocs during my time in academia and both were grant funded (one awarded to me, one awarded to a more senior researcher who then took me on as a postdoc). I also applied to one postdoc position I remember which although fixed term, not permanent, was paid for by the university. I worked with many permanent staff who had salaries from the university as well as grants for other things.

    As far as I can tell in the USA the only real difference is that your salary may only be for the 9 teaching months, not the full academic year, and you’re expected to top up those 3 months if you want to be paid a proper wage.