Ad
  • Custom User Avatar

    The problem says equal or greater, taking the integer part of 1241.228 give us the result of 3 years,

    I think it is an error in the test case

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    See the example in the description, at the end of the third year the population is 1213, not 1214.

  • Custom User Avatar

    How it is not broken? The requirement is "How many years does the town need to see its population greater than or equal to p"
    if population rounded down is 1214 then it is equal to p which is 1214 right? And since the question is greater than OR EQUAL, then the test is broken.

  • Custom User Avatar

    The requirement is "How many years does the town need to see its population greater than or equal to p"
    if p0 rounded down is 1214 then it is equal to p which is 1214 right? And since the question is greater than OR EQUAL, then the test is broken.

  • Custom User Avatar

    The way you did it, I think it will definitely reduce amount of complaints here. The final form I would maybe imagine a bit diferently: since it's a specific kind of input, I think it would deserve a separate it or describe (something like it("should handle fractional people correctly") or similar), ideally more than one input, and ideally presenting inputs with a test title or with a failure message.

    But in general I personally will be happy with any change which will reduce the amount of exchanges like "[ISSUE] Tests are wrong" / "[RESOLVED] No errors in tests".

  • Default User Avatar

    thanks for this kata I joyed

  • Custom User Avatar

    Take a look at the current javascript version, added the edge case to sample tests and an error message that maybe applies to both tests.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    The fact that there is just a single fixed test which fails incorrect solutions strengtens the bad experience even more.

    I agree there should be at least 10 edge cases tests, and if they were random, that would be perfect.

    Also adding the current edge case to the sample tests with a proper error message would help.

  • Custom User Avatar

    But where did I say "nyah, get lost"? I just pointed out what the misconception in his calculation was. Once he sees that it's trivial to fix it. It's even in the description:

    There are no fractions of people. At the end of each year, the population count is an integer: 252.8 people round down to 252 persons.

    In the terms this problem is written, population is a succession, not a continuos function. Each term is calculated using the previous one and all of them are integers.

  • Custom User Avatar

    To be frank, i do not really care what are the actual definitions used by the kata, as long as they are clear, and enforced well. Those are, as you say, just definitions, and users should adhere to them. What i find problematic is that unclear definitions are a source of abnormal amount of support requested, users are constantly said to fuck off, and all burden of handling issues is delegated to helpers who are said "if you are bothered by helping, maybe you should reconsider your carreer here". And all of this because inclarities of the task have been declared as "skill issue".

    "there is no problem with kata" is quite a stupid thing to say if the kata receives issues regularly, and almost daily. There is a problem, and if its not the definition, them maybe its something else. And there is definitely a fix other than constantly repeating "nyah, get lost". The fact that there is just a single fixed test which fails incorrect solutions strengtens the bad experience even more.

  • Custom User Avatar

    I don't know how census works where you live, but here, they count alive fully developed people. They don't count people to be born. You work with static data taken at the end of each period, in this case, a year. Could we agree that saying population increases 2% each year is an approximation and that it is not evenly distributed along the year? Because it seems you're thinking it is a continuos function and at a middle point there should be exactly X population if you divide it in month or weeks.

  • Custom User Avatar

    The report is made each year. And the next year you use the previous report to do the calculations.

    But next years people do not come from the previous year report. The next years people come from the previous years people :)

  • Custom User Avatar

    I agree with hobovsky. Changing the period, changes the result, which is insane. Rounding/Flooring should only be applied when reporting, not when calculating.

    The report is made each year. And the next year you use the previous report to do the calculations. Isn't that shown in the description?

  • Loading more items...