You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I was looking through code examples, I noticed, each implementation is different from each other. Which is expected in some way. But we should try to unify things like:
input values
printed output
naming of functions - where possible
When you change from one language to another, it's sometimes hard to understand what that algorithm does.
Example: Monte Carlo
Java implemented everything as static functions with sample size 1000.
JS is functions, which is fine (JS versioning is different topic) with sample size 100000000.
Swift is mix of objects/functions (can't say if good/bad, I don't know Swift) with sample size 10000. @julianschacher is making C# implentation which uses OOP and looks good. So it could be example for OOP languages implementation.
You may agree with me or not, I can be wrong in this, but it's worth discussion.
The text was updated successfully, but these errors were encountered:
I thought we were generally trying to keep the implementations as consistent as we can; however, small things (like the number of points in MC) are easy to slip through the cracks. This is a good point to bring up, though and we should definitely see which implementations are not consistent enough.
I don't really mind if things like sample size is different, what I care about are the algorithms.
Function names are a bit more important, but they will have to be different to some extent because of different styles guides.
OOP versus functions is better left up to the author and reviewers, in my opinion.
If we want to unify input, then we should go all the way and impose a set of tests with edge cases and stuff. I suspect many implementations are a little too lax. This might be a pain in the ass to implement though
Yes, we have to leave differences in languages aside, because that's something we can not change.
And yes, this thing is a lot of work, because there is quite a few algorithms with many implementations.
I'm not sure about those tests, how you think they should look or be implemented.
About inputs, they should be same as are in algorithm explanation (if there is some) ie. C example for matrix in GE
Hey,
when I was looking through code examples, I noticed, each implementation is different from each other. Which is expected in some way. But we should try to unify things like:
When you change from one language to another, it's sometimes hard to understand what that algorithm does.
Example: Monte Carlo
Java implemented everything as static functions with sample size 1000.
JS is functions, which is fine (JS versioning is different topic) with sample size 100000000.
Swift is mix of objects/functions (can't say if good/bad, I don't know Swift) with sample size 10000.
@julianschacher is making C# implentation which uses OOP and looks good. So it could be example for OOP languages implementation.
You may agree with me or not, I can be wrong in this, but it's worth discussion.
The text was updated successfully, but these errors were encountered: