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

  • Default User Avatar

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

  • 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".

  • 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?

  • Custom User Avatar

    It's obvious that the sign will not list the "fractional, not fully developed" people, you are right here. But what your analogy lacks is the fact that even if the sign says "Here live 10000", the currently existing "fractional, not fully developed" people still contribute towards the next years population. The sign rounds the presentation, and not the actual state.

  • Custom User Avatar

    @Hobovsky How many population has a city in a year? Until you show me a sign that says 10000.25 I'll keep saying there is no fractional people, period.

  • Custom User Avatar

    Something about the kata has to be changed, because having three issues a week definitely is not a sign of a good challenge.

    It calculated 1.5 issues/week. However, I probably, maybe, possibly, uncertainly, likely used intermediate fractions in calculating the average, so you might actually be right, or even more wrong, would have to ask the author.

  • 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.

  • Loading more items...