# I asked for help optimizing my Julia code, now it's someone's package?

**URL:** <https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679>\
**Category:** Community\
**Tags:** question\
**Created:** [February 15, 2020, 12:21pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679 "2020-02-15T12:21:05Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Yifan\_Liu](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Post date:** [February 16, 2020, 7:40am UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/22 "2020-02-16T07:40:51Z")

</div>

looking at the thread you mentioned, I noticed that your code only has several lines, how could someone create a package with so few lines of code?

---

<div class="post-metadata">

**Author:** ![PyDataBlog](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pydatablog/32/12327_2.png) [@PyDataBlog](https://discourse.julialang.org/u/PyDataBlog)\
**Post date:** [February 16, 2020, 7:46am UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/23 "2020-02-16T07:46:29Z")

</div>

> [@Yifan\_Liu](#):
>
> , I noticed that your code only has several lines,

K-means is not really a complex algorithm to implement. You don’t need 1000 lines of code to do that?

---

<div class="post-metadata">

**Author:** ![PyDataBlog](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pydatablog/32/12327_2.png) [@PyDataBlog](https://discourse.julialang.org/u/PyDataBlog)\
**Post date:** [February 16, 2020, 7:51am UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/24 "2020-02-16T07:51:05Z")

</div>

> [@kevbonham](#):
>
> Sure, perhaps the optimal thing would have been too tell you before hand, but the fact that the person reached out to you in the first place,

That was the issue. Common courtesy requires prior notice to even know the original intent. What if there was already a plan to package it later (there wasn’t)?

Most communities operate in that way to even avoid duplication of ideas and/or projects.

They was no foul play intended on both sides.

---

<div class="post-metadata">

**Author:** ![mschauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mschauer/32/13946_2.png) [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Post date:** [February 16, 2020, 9:57am UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/25 "2020-02-16T09:57:06Z")

</div>

While taking you serious I I too have some sympathy for the easily identified person, who first helped to get your code up to speed, and then packaged it for your and our convenience, whos fault is mostly a bit suboptimal communication about plans. That person is now having the community holding public court over their “behaviour” and with some of our “big shots” chiming in, all while not following _audiatur et altera pars_. Maybe we can call it a day by now.

---

<div class="post-metadata">

**Author:** ![PyDataBlog](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pydatablog/32/12327_2.png) [@PyDataBlog](https://discourse.julialang.org/u/PyDataBlog)\
**Post date:** [February 16, 2020, 10:11am UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/26 "2020-02-16T10:11:40Z")

</div>

> [@mschauer](#):
>
> While taking you serious I I too have some sympathy for the easily identified person, who first helped to get your code up to speed, and then packaged it for your and our convenience, whos fault is mostly a bit suboptimal communication about plans. That person is now having the community holding public court over their “behaviour” and with some of our “big shots” chiming in, all while not following _audiatur et altera pars_ . Maybe we can call it a day by now.

There’s no bad blood between anyone. Still collaborating with said person (without any grudges) on the code. This post wasn’t meant to be some attack on anyone. If anything, it was meant to know how the community handles collaborative work.

---

<div class="post-metadata">

**Author:** ![mschauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mschauer/32/13946_2.png) [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Post date:** [February 16, 2020, 10:15am UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/27 "2020-02-16T10:15:54Z")

</div>

Ah, that is good then. 👍 Should we then wrap it up?

---

<div class="post-metadata">

**Author:** ![PyDataBlog](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pydatablog/32/12327_2.png) [@PyDataBlog](https://discourse.julialang.org/u/PyDataBlog)\
**Post date:** [February 16, 2020, 10:21am UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/28 "2020-02-16T10:21:52Z")

</div>

It was wrapped up even before this question was raised.

---

<div class="post-metadata">

**Author:** ![zgornel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zgornel/32/217487_2.png) [@zgornel](https://discourse.julialang.org/u/zgornel)\
**Post date:** [February 16, 2020, 11:53am UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/29 "2020-02-16T11:53:36Z")

</div>

This thread is still quite useful for anyone dealing in open collaboration. Still, most problematic things in this community get solved somehow which is quite refreshing 🙂

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 16, 2020, 1:32pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/30 "2020-02-16T13:32:41Z")

</div>

> [@mschauer](#):
>
> That person is now having the community holding public court over their “behaviour” and with some of our “big shots” chiming in, all while not following _audiatur et altera pars_ .

FWIW,

1. I don’t know who that person is (yes, I am too lazy to find it out, and I don’t care to play detective),
2. as I indicated above, I would love to listen to that person’s point of view,
3. but can’t do this until they actually chime in.

---

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [February 16, 2020, 1:52pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/31 "2020-02-16T13:52:39Z")

</div>

Well, aforementioned person is me, and I would like to explain my side of things. There was some good progress in corresponding thread, but communication through pieces of code and gist became rather problematic. So I put it all together, set up some testing and benchmarking environment and approached topic starter with proposal to continue work in this repo (it wasn’t registered of course, just a bucket for code). I saw it only as a better way to work on the problem and there were no evil intentions on my side, neither I wanted to claim ownership of the code. In hindsight I can see that it was inappropriate and offending, so when I received negative reaction I apologized and removed this repository. In my defense I can say that I was caught in the process and thought more about the problem itself and less about legal/property issues.

This is all just misunderstanding and miscommunication, and I feel rather sad that it turns out like this. I hope no damage has been done to anyone.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 16, 2020, 1:59pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/32 "2020-02-16T13:59:40Z")

</div>

Thank you for clarifying this, I really appreciate it.

I hope that the resulting code is not lost and will eventually be made available in a nice package (existing or new), with documentation, unit tests, shiny bells & whistles…

---

<div class="post-metadata">

**Author:** ![PyDataBlog](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pydatablog/32/12327_2.png) [@PyDataBlog](https://discourse.julialang.org/u/PyDataBlog)\
**Post date:** [February 16, 2020, 1:59pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/33 "2020-02-16T13:59:45Z")

</div>

> [@Skoffer](#):
>
> This is all just misunderstanding and miscommunication, and I feel rather sad that it turns out like this. I hope no damage has been done to anyone.

There was no need to even apologise once we reconciled all our intentions. Super grateful for you to have taken your time and resources on the initial code. I will be poking you for more tips in the future. I hope you don’t let this miscommunication discourage your much needed help with other newbies.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [February 16, 2020, 2:56pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/34 "2020-02-16T14:56:56Z")

</div>

Also anyone reading this looking for a K-Means implementation, there is an excellent one in the aptly named [Clustering.jl](https://github.com/JuliaStats/Clustering.jl/blob/master/src/kmeans.jl)

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [February 16, 2020, 3:02pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/35 "2020-02-16T15:02:40Z")

</div>

> [@Tamas\_Papp](#):
>
> For cases that end well, there is a trade-off between just moving on or using them as a concrete example to develop community norms.

Agree - and I apologize for what might seem like kicking a [leaf pile](https://calvinandhobbes.fandom.com/wiki/Leaf_Pile). But I didn’t want to move on because it seemed like, to the extent there was agreement on community norms, it was siding with being proprietary about the code from an open discussion.

> [@Skoffer](#):
>
> So I put it all together, set up some testing and benchmarking environment and approached topic starter with proposal to continue work in this repo (it wasn’t registered of course, just a bucket for code)

Thanks for chiming in. Given the original description of the issue, this is exactly what it seemed like to me, and personally, I think this sort of behavior should be encouraged.

> [@PyDataBlog](#):
>
> > [@kevbonham](#):
> >
> > Sure, perhaps the optimal thing would have been too tell you before hand, but the fact that the person reached out to you in the first place,
> 
> That was the issue. Common courtesy requires prior notice to even know the original intent. What if there was already a plan to package it later (there wasn’t)?

Then you could still package it later? Or you could ask for the person to transfer ownership of the repo to you (based on all the evidence, I’m guessing @Skoffer would have been happy to do this). Being upset about this seems like letting the perfect be the enemy of the really really good.

I do apologize for being antagonistic here`*`. My generous read of this post is that you felt like someone was taking credit for your work, and it’s understandable that you would be upset about that. To the extent we’re using this thread to establish community norms, I think we can all agree that people should not take credit for other people’s work.

But I also think that, given the evidence you initially presented (and I think confirmed by @Skoffer’s post), there’s very little chance that this is what was happening. I will echo others that I really appreciate that you’re clearly not holding any kind of grudge. ❤ this community!

> [@Optimization tips for my julia code. Can I make it even faster and/or memory efficient?](https://discourse.julialang.org/t/optimization-tips-for-my-julia-code-can-i-make-it-even-faster-and-or-memory-efficient/34614/25):
>
> @Skoffer would be the best person for the PR since he came up with the optimizations. From all the benchmarking results, this implementation is faster and more memory efficient than the current implementation in Clustering.jl.
> 
> It’s worth making a PR @Skoffer 🙂 .

`*` It’s quite possible my vituperation is coming from a totally unrelated situation at work where a number of people are being jerks about taking credit for things they didn’t do, denying credit to others etc. My apologies if that’s bleeding into my responses here.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [February 16, 2020, 8:24pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/36 "2020-02-16T20:24:28Z")

</div>

I’m a little disturbed reading this. Putting myself in @Skoffer’s shoes, I don’t think I would have thought twice about doing what they did: wrapping up a snippet of code that implements an existing, well known algorithm that they collaborated on improving into a package.

Legality aside, I’m not even sure I think one would be in the right to demand the package be taken down or to have ownership transferred (I’d gladly do so in such a situation, but I have a hard time seeing why one _should_ be compelled to do it).

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [February 16, 2020, 9:17pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/37 "2020-02-16T21:17:50Z")

</div>

I’d like to suggest we avoid having this turn into a tempest in a teapot. There was no ill intent, and to the contrary this incident emerged from people trying to be helpful. At most it’s a question of what messages were sent when, i.e., subtle nuances of communication, and doing any better involves the kind of optimization that we surely can all apply to our own interactions with others. All the participants have been very adult about this (thanks @PyDataBlog and @Skoffer), and the rest of us should not turn into gawking bystanders.

---

<div class="post-metadata">

**Author:** ![Jakub\_Wronowski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jakub_wronowski/32/204030_2.png) [@Jakub\_Wronowski](https://discourse.julialang.org/u/Jakub_Wronowski)\
**Post date:** [February 16, 2020, 9:21pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/38 "2020-02-16T21:21:50Z")

</div>

> [@Mason](#):
>
> I’m not even sure I think one would be in the right to demand the package be taken down or to have ownership transferred

I agree there was no reason to put repo down. I guess @Skoffer did solid work with good test coverage. I have a lot of @Skoffer’s code in my repos on my github and he never did any problems about that.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [February 16, 2020, 10:27pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/39 "2020-02-16T22:27:02Z")

</div>

It might be a good point in time to close this thread? It seems everything has been said, everyone was civil, so a good point to move on?

---

<div class="post-metadata">

**Author:** ![Jakub\_Wronowski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jakub_wronowski/32/204030_2.png) [@Jakub\_Wronowski](https://discourse.julialang.org/u/Jakub_Wronowski)\
**Post date:** [February 16, 2020, 10:43pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/40 "2020-02-16T22:43:31Z")

</div>

> [@davidanthoff](#):
>
> It seems everything has been said, everyone was civil, so a good point to move on?

Yes, except that good piece of code is lost and I’d like to see it available. There should be @PyDataBlog included in copyright notice and everyone should be happy.

---

<div class="post-metadata">

**Author:** ![PyDataBlog](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pydatablog/32/12327_2.png) [@PyDataBlog](https://discourse.julialang.org/u/PyDataBlog)\
**Post date:** [February 16, 2020, 10:45pm UTC](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679/41 "2020-02-16T22:45:48Z")

</div>

> [@Jakub\_Wronowski](#):
>
> Yes, except that good piece of code is lost and I’d like to see it available. There should be @PyDataBlog included in copyright notice and everyone should be happy.

The repo will be back. It’s not lost.

[Previous page](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679.md?page=1)

[Next page](https://discourse.julialang.org/t/i-asked-for-help-optimizing-my-julia-code-now-its-someones-package/34679.md?page=3)
