This site uses 3rd-party cookies for targeted advertising. If you do not agree to this, then please leave this site now. Otherwise please click on "Ok" to continue.
Ok
 
 

"Before I will release the code as open-source, I need to clean it up some more"

26-Feb-2015

Today I read on a mailing-list that someone is planning to release the code to a small app as open-source, but he needs to clean it up a little bit before he does that.

Which made me laugh as I'm currently in the exact same spot. I'm currently in the process of rewriting something in JavaScript, which I originally wrote years ago in Pascal.

And this isn't even the first time this happened to me. Several years ago I released something as open-source, but before I did it, I absolutely had to cleanup the code. I wasn't willing to show it before I cleaned it up.

What I read today in that mailing-list made me realize that I'm not alone with that. It made me start to think about why we feel the need to act that way.

The code I'm working on at the moment works perfectly fine as it is. And so did the other project several years ago. If I were the only one to see the code, then I wouldn't feel the need to clean it up.

This is somehow similar to the "someone-is-coming-to-visit-so-I'd-better-cleanup-the-house reflex". It is about how we want to make a good impression on others.

But if the code needs cleaning-up in order to make a good impression, shouldn't we feel the need to clean it up anyway? Even if nobody else sees it? After all we do seem to realize that the code could be better.

On the other hand, wouldn't it be a waste of time to clean it up if it already works fine?

I don't know... Do you?

Comments:

Author: (Unknown)
2015-02-26 12:20 UTC
 

I had exactly the same issue with a project I've just released into the wild. I procrastinated so much that I realised that if I waited for the code to be 'presentable' then it would never be presented - so I simply released it, warts and all. I'm proud and a bit ashamed all in the same breath, but still the code grew (at least partially) organically so does it matter that this is reflected within the source? So, my recommendation would be 'get it out there', the chances are that someone would appreciate it.

Author: (Unknown)
2015-02-26 13:12 UTC
 

After three years of developing creating and maintaining an open source project, I'd say the following:

* If its a library, the API needs to be clear, the rest can be a mess
* If its an application, it needs to work, most people don't care about the code quality
* Once you have released something that is a mess, if people start using it, you'll be forced to tidy it up in small chunks as you fix bugs and add new features.
* Over time, if other people contribute, they will help with the tidy up.
* Don't worry about what people think of you.

Author: (Unknown)
2015-02-26 15:22 UTC
 

If I write code for myself, that does its job and does not seem to produce any bugs, I will probably not have time to refine to code. Most of my code is in scripts, that are meant to save time.

Sometimes I clean up my old code, because I come back to it a year later and find it hard to read or sub-optimal. Then it has proven itself to be more than fire and forget and worth of additional care.

Author: (Unknown)
2015-02-26 17:44 UTC
 

Go with what `2015-02-26 13:12 UTC` said.

It's better to release, and then clean. You can leave a comment saying the code is rough, but rough isn't always bad. There's always more to clean up in a project. Always.

Author: (Unknown)
2015-02-26 18:31 UTC
 

In general, people have this idea that if you open source your software, people will read it. The thing is, most open source software either isn't useful, or is properly encapsulated and does one thing well enough that you don't need to read its internals.

People are terrified that unless their code is perfect, they can not ship. They end up never publishing their code because perfection is a hard thing to obtain. There's a saying, "never let perfect be the enemy of the good," which I take to mean that people pursue perfection rather than shipping. Fuck it, ship it.

The thing is, if people are looking at your code and commenting/criticizing it, that's a good thing, because that means they're using it and care enough to review your code. Usually the comments are constructive, and benefit you as a programmer and your project. There might be unconstructive criticism, which is what I think people are actually afraid of, but you're going to have a hard time in life in the real world if you can't handle people being unconstructive.

~Nick, author of https://github.com/nickdesaulniers/What-Open-Source-Means-To-Me

Author: (Unknown)
2015-02-26 22:04 UTC
 

I don't know what you're saying... I make sure my code is clean from scratch, I hate staring at a mess, beautiful code is beautiful code, and I prefer to look and edit beautiful code. To anyone out there who doesn't public beautiful/consistent code... SCREW YOU! :)

Keep cleaning your code. It does make a difference (To me, if I'm gonna read it)

You want to comment on this blog-post? If yes, then simply enter your comment in the field below and click on "Submit".

Comments are moderated at the moment thanks to some $%&# who thought it would be funny to post total nonsense here.

 


Back to the Homepage

A Programmer's Diary