-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3rd-party code in DiffractionScreenView #278
Comments
I stripped out DiffractionScreen so it no longer appears in builds. I also asked on the slack channel:
This seems sufficient to defer for 2.0. @pixelzoom if you concur, please reassign to me and add "deferred" label. |
Looks like 2 images and 1 string, nothing of consequence for 1.0.
Deferring for 2.0. |
After #346 we are no longer using turbomaze, and imageprocessing-labs code has been moved to sherpa. Also the unused images have been removed. Closing. |
Related to #259 code review.
Review of the 'Diffraction' screen was not part of this review, since it's not included in 1.0. But this bit of odd code in
DiffractionScreenView
was noticed, and generated a discussion that's worth capturing here.This was the code in questions.
$h
seemed like a very odd function name.Slack discussion identified this as code that was copied from GitHub project https://github.com/turbomaze/JS-Fourier-Image-Analysis. Here's the Slack discussion:
Slack discussion
Chris Malley [4:19 PM]
I see this in DiffusionScreenView:
const $h = function( k, l ) {
is that legal?Sam Reid [4:20 PM]
checking….
Chris Malley [4:20 PM]
And I know I’m not supposed to review diffusion.
Sam Reid [4:21 PM]
Are you asking if JS variable names can start with the
$
character?Chris Malley [4:21 PM]
Yes, I’ve never seen that. And why?
Sam Reid [4:22 PM]
variables that begin with
$
are common when using jquery, see https://stackoverflow.com/questions/205853/why-would-a-javascript-variable-start-with-a-dollar-signThis code was adapted from an example that uses an open-source fast fourier transform library.
Chris Malley [4:23 PM]
And your reason for using
$h
here?Sam Reid [4:23 PM]
Chris Malley [4:23 PM]
Yes, I read that. Your reason for feeling that
$h
needed to be ported literally?Sam Reid [4:24 PM]
I’m guessing the entire example was copied verbatim
Chris Malley [4:25 PM]
Where is the attribution for the code that you copied? (edited)
// Usage code from JS-Fourier-Image-Analysis/js/main.js
?Assuming that’s https://github.com/turbomaze/JS-Fourier-Image-Analysis… Is the license (MIT) compatible?
Sam Reid [4:28 PM]
I’m seeing around 60 lines of code copied from https://github.com/turbomaze/JS-Fourier-Image-Analysis/blob/master/js/main.js
The delta in c98693b has
REVIEW
comments that are relevant:So to summarize:
The text was updated successfully, but these errors were encountered: