Lurker News

Comments (87) 23 threads

Show all comments

Showing thread 7 of 23

harunurhan5 replies#
Looks nice, 0 dependency, simple design but there is one issue...

I see that you don't have a single unit test or integration or functional etc.
Even if your in house developers know what they are doing (which is a myth, stuff will break) it's going to be difficult accept contributions from community without any tests that make (almost) sure existing features are working with the changes.

RubenSandwich#
I don't see how that isn't a good trade as defects only compound on larger projects. In fact without tests, which basically function as a spec, how can you be sure that your refactor still works as the previous version?
iamflimflam1#
Interesting - that 25% seems to come from managers estimating the impact, not from developers.

  Increase in time taken to code the feature because 15–20% 25–35% 15% 25–20%
  of TDD (%) [Management estimates]
And this seems to imply that any increase in time was offset by reduced maintenance costs due to improved quality.

  Another interesting observation from the outcome measures in Table 3 is the increase in
  time to develop the features attributed to the usage of the TDD practice, as subjectively
  estimated by management. The increase in development time ranges from 15% to 35%.
  From an efficacy perspective this increase in development time is offset by the by the
  reduced maintenance costs due to the improvement in quality (Erdogmus and Williams
  2003), an observation that was backed up the product teams at Microsoft and IBM.
bonyboy#
Microsoft uses WordPress?

TIL

sillysaurus34 replies#
Judge work by what it does, not by what it doesn't have.

Like users, programmers don't care whether programs have tests as long as it does what it needs to do.

harunurhan2 replies#
So I should wait until stuff starts breaking, then start complaining.
XR0CSWV3h3kZWg3 replies#
If nothing breaks why would you complain?

Continue this thread — 3 replies

sillysaurus33 replies#
Yeah.

Continue this thread — 3 replies

simplify1 reply#
Tests are a way to judge what it does. It does the judging for you, ensuring features work as advertised, and provide usage examples that are guaranteed to work.
Fifer82#
They are also boring as fuck and assume no talent for a project of this scope.
dabernathy89#
While this is true for you and me, this isn't true for a huge number of developers.
opmac#
Speak for yourself... that's quite the generalization. I'm a programmer, and I care when something doesn't have tests, especially if it's my own code.
handbanana2 replies#
I see where your coming from, but I disagree. This isn't a new OS, its a tiny charts library/utility. I'm more inclined to contribute because there are no tests. Either way, someone could PR tests if they wished. Perhaps your comment should have been such a PR? ;)
methodin1 reply#
Why would lack of tests be a measure for your desire to contribute?
dflock#
Possibly because it doubles the amount of work to make small changes, because you also have to learn the testing setup and write tests for your change?
trevor-e2 replies#
> Perhaps your comment should have been such a PR? ;)

I really hate seeing this used in discussion. Just because it's open source does not mean it's immune from criticism. Yes, technically some random HN'er could spend tens of hours writing unit tests and submit a PR, but really this is a task for the library author/maintainer.
Having tests is a measure of quality, and should be cared about if you want people using your library.

joshwcomeau2 replies#
The library author has already invested probably hundreds of hours creating the library; if someone who benefits from it only has to spend tens of hours writing the unit tests, they've saved an order of magnitude of time.

We need to stop thinking of OSS as something we're entitled to, that if a stranger doesn't put in enough free labour we're allowed to complain about it. I try to view my dependencies as favours other people have done for me. You wouldn't nitpick about a lack of tests after someone wrote a whole charting library for you; you'd thank them and add your own tests.

Continue this thread — 2 replies

handbanana#
I was hoping the winking face would have led readers to understand that my suggestion was made in jest.

My point was: Many are dogmatic about tests these days, and I find it refreshing there are no tests.
Tests can be added later for something like this library, if/when the need arises - or when someone decides to spend "tens of hours" writing them.
Tests can be a measure of quality, but they aren't the only measure - and do not apply in all cases

thrownaway954#
maybe you could start contributing to the project by helping writing some tests? i see that this is a library for a product that develop, so this might be a project they just extracted from that. as such it most likely was already has the "works on my box" seal of approval :)
vortico1 reply#
How would you even test a UI library? For example, if some weird input makes the bar charts too spread apart, how do you convert that to a unit test? If you tried to unit test this, you'd either be fully reproducing the actual source code for spacing logic or you'd be hard-coding in thresholds that might all break if the maintainer decides on a UI change such as "increase the spacing for bar charts having many grouped bars". It seems for UI projects, testing can only cover about 1-10% of the issues that eventually end up on the GitHub issue tracker, so 25% of your time on this project would go toward writing tests, which would save you 1-10% of your time. Doesn't make sense.
cloverich#
You can test more than you'd realize: The generated math, the number of axes and number of visible points, etc. I'm not saying its def. a valuable use of time here, but I've been surprised how investing a little bit in helper methods (like, `getSelectedOption` or `isVisible`, etc) can generate quite useful and expressive unit tests.