Giter Club home page Giter Club logo

Comments (17)

NobbZ avatar NobbZ commented on September 24, 2024

There is such a test which demands a failure. AFAIR I just took this from JSON or another track. Is it enough to just remove that test or shall I rewrite it to test for a specific kind?

I will tackle this after #84 is finished and merged.

from erlang.

kytrinyx avatar kytrinyx commented on September 24, 2024

Oh, good question. I think we should have it return an isosceles triangle -- it's a good edge case to have.

from erlang.

NobbZ avatar NobbZ commented on September 24, 2024

Hmm, I just asked Wolfram alpha, it does classify as degenerated.

So I'd go for either taking further research when a triangle is degenerated
exactly and add it as another possible return value for kind. Or leaving as
is (error) or do classify as isosceles, because this is what comes when you
simply change the inequality.

Since we have 1 o'clock in the morning here, I'll go to bed now, but I'll
do some more research tomorrow and open a ticket in xcommon (or chime into
an ongoing one if there is one).

Katrina Owen [email protected] schrieb am Sa., 30. Jan. 2016 00:58:

Oh, good question. I think we should have it return an isosceles triangle
-- it's a good edge case to have.


Reply to this email directly or view it on GitHub
#85 (comment).

from erlang.

masters3d avatar masters3d commented on September 24, 2024

This is very interesting. You are right.
2,4,2 is not a triangle because since 2 + 2 equals the length of the 4, then the 2 + 2 sides merge into the same plane so you end up with only a line.. (Technically is is three lines that occupy the same space of the 4 length)

from erlang.

kytrinyx avatar kytrinyx commented on September 24, 2024

So I'd go for either taking further research when a triangle is degenerated exactly and add it as another possible return value for kind.

So wikipedia is wrong, huh. Imagine that! OK, let's do some more research.

from erlang.

hankturowski avatar hankturowski commented on September 24, 2024

Wikipedia is not wrong. The 2,2,4 is a degenerate triangle, but still a triangle. In either case, we should call out our definition clearly in the .md.

from erlang.

behrtam avatar behrtam commented on September 24, 2024

So for a degenerate triangle (e.g. 2,2,4) which looks like a line segment do we return "isosceles" as kind or "degenerate"?

from erlang.

hankturowski avatar hankturowski commented on September 24, 2024

My opinion is that we either add degenerate as a case, or specifically say in our problem definition that degenerate triangles should be rejected.

To be honest, rejecting degenerate triangles feels like a cleaner solution. I'd just like the problem description to get an update.

from erlang.

behrtam avatar behrtam commented on September 24, 2024

triangle.md could really need some improvement. I think it should also mention the 3 kinds.

+1 rejecting degenerate triangles

from erlang.

masters3d avatar masters3d commented on September 24, 2024

++ for adding degenerate as a case

We can then separate the math definition from the notion of accepting or rejecting as a triangle, thus moving the conversation away from declaring what is or not a triangle, to just stating the type of case.
(I personally think degenerate triangles are not triangles and should be rejected! they are just lines! ;) "the emperor has no clothes" yo! ).

from erlang.

yurrriq avatar yurrriq commented on September 24, 2024

It seems like the general vibe here is to reject degenerate triangles and update the .md accordingly, yeah?

from erlang.

yurrriq avatar yurrriq commented on September 24, 2024

👍

from erlang.

NobbZ avatar NobbZ commented on September 24, 2024

So actually, we leave all the "faulty" tests as they are and repair the
"correct" ones?

Which again would mean I don't need to do anything here?

Katrina Owen [email protected] schrieb am Sa., 30. Jan. 2016 20:25:

yeah, agreed


Reply to this email directly or view it on GitHub
#85 (comment).

from erlang.

yurrriq avatar yurrriq commented on September 24, 2024

I'm not sure I understand your double quotes, @NobbZ, but the xerlang triangle tests look good as they are.

from erlang.

kotp avatar kotp commented on September 24, 2024

I say that we do exclude examples that stretch the definition to an absurd[1] degree. We keep to general position not special position geometry, and keep this where it should be in the context of the program here. If the assumption is that Triangles have area, this goes against that assumption, and is suitable for our purposes, and keeps everything at a non-college level, and is reasonable.

We don't test for the other more commonly known triangles, which is to say "right, acute or obtuse" why are we jumping into special position before we talk about all the general position triangles?

This is (as far as I can see) meant to be a simple exercise, even more so since we test for only 3 specific triangles.

from erlang.

kytrinyx avatar kytrinyx commented on September 24, 2024

Yeah, having slept on this I think that the right approach is to avoid the edge cases and stick to the basics (having things that obviously violate the triangle inequality thing is great, the distinction between not-a-triangle and yes-but-degenerate seems like a tangent that isn't useful here.

from erlang.

kytrinyx avatar kytrinyx commented on September 24, 2024

I've summarized this issue here: exercism/problem-specifications#202

I am closing this issue. If necessary I will open a new issue once we have come to an agreement about how to resolve the inconsistencies and what exact steps to take.

from erlang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.