Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

New Site Makes OSS Development Easier

timothy posted more than 11 years ago | from the snippets-of-gpl-joy dept.

Programming 42

An anonymous reader submits "OpenSnippets is a fledgling online community for OSS developers. New members are welcome to submit articles and code of interest, and everyone can view/download the code! It's blog-styled with topics for most popular languages. How useful- I only wish it'd make my coffee..."

Sorry! There are no comments related to the filter you selected.

FP (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#6429642)

first post.
slashdot is getting less popular every day or something.

This is a really great news (-1, Troll)

Mensa Babe (675349) | more than 11 years ago | (#6429673)

for every member of open source community. I do really hope there soon will be an equivalent site for members of free software movement, which I am sort of into. Great news though.

Mod parent up! (0)

Anonymous Coward | more than 11 years ago | (#6429684)

(Score:5, Funny)!

Re:This is a really great news (0)

Anonymous Coward | more than 11 years ago | (#6431332)

Karma: Positive (probably because of superiour intellect)

But your spelling is lousy, despite weeks of karma-whoring, hmmm?

Re:This is a really great news (0)

Anonymous Coward | more than 11 years ago | (#6433614)

She's not a karma-whore, man! I thought she made it pretty clear: 641

Re:This is a really great news (0)

Anonymous Coward | more than 11 years ago | (#6435578)

She's English.

Re:This is a really great news (0)

Anonymous Coward | more than 11 years ago | (#6438259)

She's English.

Either way, (s)he can't spell. In this case the English spelling is the same as the American spelling. Superior is not one of those words in International/British English such as "colour", "favour", and "honour", that have a 'u' that is omitted in US English.

Not "Open", but GPLed (5, Insightful)

aziegler (201013) | more than 11 years ago | (#6429725)

The default licence assumed is apparently GPL, which isn't open -- it's GPL. I can't use GPLed snippets in my code that I wish to make BSD or MIT or MPL licensed.

Great idea, lousy default licence choice.


Re:Not "Open", but GPLed (1)

gangien (151940) | more than 11 years ago | (#6429763)

I couldn't find out how they get the snippets, the site is slow for me. But couldn't they make their own license, IE sayign that if you use this snippet, You have to use some sort of open source license? Of course if these things were ripped from existing code, they couldn't do that.

Re:Not "Open", but GPLed (2, Informative)

larry bagina (561269) | more than 11 years ago | (#6429800)

the license you're talking about IS GPL.

Consider if you want to use the snippet in BSD licensed code. Oops, it can't be BSD licensed, becuase BSD allows you to make a closed fork. MIT, Artistic License, and a few other "open source" licenses do allow closed forks.

Re:Not "Open", but GPLed (3, Insightful)

aziegler (201013) | more than 11 years ago | (#6429834)

That's the GPL essentially.

I don't mind if they called it ""; I mind that they call it "". As I've said many times, the GPL works most effectively against open source (e.g., non-GPL/FSF licences) projects, not closed source projects.

I did a little bit of searching on their site and they really haven't done their homework. They say that they accept PD, GPL, or LGPL only -- but those aren't the only licences compatible with the GPL. They could have easily gone through and found the "approved/compatible" licences from the FSF and listed those. Not only that, they don't actually give a place to *specify* the snippet's licence, leaving the assumption of the tagline on the website itself: "GPLed snippets, served daily."

Sorry, but it's not open if it's GPLed. If I can't use it in a less restrictive context, it's not open. It might be what the person wanted -- and I fully support that -- but don't tell me that it's "" when it's really "".


Re:Not "Open", but GPLed (5, Interesting)

GigsVT (208848) | more than 11 years ago | (#6431702)

After reading this story, I posted a GPLed snippet of my code on the site.

If someone emailed me and said they would like to put it in their BSD licensed application, I would grant them a specific permission.

I have a feeling most people that license their stuff under GPL would have similar feelings about small snippets of their GPL code. It can't hurt to ask, not everything has to be a huge political battle, we are all programmers here.

Re:Not "Open", but GPLed (0)

Anonymous Coward | more than 11 years ago | (#6435641)

I looked at 2 'complete applications' -- one was copied from the kernighan + pike unix programming book (zap.c -- It sure was nice to redeclare it GPL!). The other was a php program which basically showed how to use the ftp functions to put a file (in case the php docs didn't explain it well enough)).

Hopefully it will improve, but using the GPL is a bad idea. Most likely, most will be small snippets that show how to use an API or do something fancy, and won't even be significant enough to qualify for a license.

Re:Not "Open", but GPLed (0)

Anonymous Coward | more than 11 years ago | (#6438076)

I think you talk bullshit. Next thing you'd say is that GPL ain't Open Source.

Help on Understanding all the Different Licenses (1)

AShocka (97272) | more than 11 years ago | (#6430208)

I'd really appreciate it if someone could point to an article or site which gave an overview of all the different licenses, and in which cases to use which ones, the pros and the cons, etc.. It's just getting so difficult.

Re:Help on Understanding all the Different License (1)

SHEENmaster (581283) | more than 11 years ago | (#6430283)

Here [] is what you're looking for.

Re:Help on Understanding all the Different License (1)

AShocka (97272) | more than 11 years ago | (#6430559)


Re:Help on Understanding all the Different License (2, Informative)

moncyb (456490) | more than 11 years ago | (#6431594)

The GNU site is a very biased place to go. However it is a good place if you want to know if a license is compatible with the GPL.

I can't think of any places which aren't biased, but [] lists a whole tonne of them without stating one is better than the other. I suppose they have to be certified as "open source" by the site to be listed there, but it seems more objective to me...

Re:Not "Open", but GPLed (1)

Znork (31774) | more than 11 years ago | (#6435185)

Sure you can. There is nothing in the GPL preventing you from using GPLed snippets in your BSD (w/o ad clause) or MIT licensed code.

Of course, the GPL snippets will remain under the GPL, so if someone else wants to take your BSD+GPL snippets and release them under the Total Proprietary Dominance License version 32.5, then they'll have to remove the GPL snippets in the code.

Re:Not "Open", but GPLed (0)

Anonymous Coward | more than 11 years ago | (#6435728)

IOW, if you add 10 lines of GPL code to your 10,000 lines of BSD code, the resulting code must be GPL.

Re:Not "Open", but GPLed (2, Informative)

Znork (31774) | more than 11 years ago | (#6436162)

Not at all. The resulting code must be distributed _under the terms of the GPL_. The GPL code remains under GPL, the BSD code remains under BSD, and the combined work is guided by the terms of the most restrictive license in the combination.

BSD code can get distributed under pretty much any terms, and thus the BSD license wont interfere. The GPL code only requires that the terms of the GPL are fulfilled on the combined work, and as the BSD license doesnt place further restrictions on the combined code, that means you can distribute the GPL code together with the BSD code.

Relevant sections of the GPL:

2. ...

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program. ...

That means, the GPL only governs the right to distribute the GPL part of the code as long as that part is combined with the other work. The other work is still governed by its own license, but that license has to be able to fulfill the terms of the GPL to allow you to distribute them together.

Re:Not "Open", but GPLed (0)

Anonymous Coward | more than 11 years ago | (#6437691)

SHUT UP FOOL GPL > ALL omg wootw oot Pro-Linux i love OSS omfg omfg slow poorly written garbage but open... vive OSS vive Linux vive GPL w0000000t

woah (4, Informative)

SHEENmaster (581283) | more than 11 years ago | (#6430161)

A friend just told me I was /.ed. Sorry that the site is on such a slow line, I'll be moving it to a faster one tomorrow.

As for the name, it's open if you can read it. If you are trying to get code for commercial software, check out planet source code [] . I might change the default license in the near future, but it isn't very likely. Submissions can specify their license of choice in their comments.

Email me [mailto] with any suggestions, complaints, burning garbage, or offers of endorsement.

"Code for commercial software" (2, Interesting)

aziegler (201013) | more than 11 years ago | (#6430554)

I think that's a sideways swipe at my own comment regarding the poor choice of default licence.

I was quite specific that I prefer to source my own code BSD, MIT, or MPL -- none of which could happen if I used a single snippet from this resource. As I said: the GPL isn't "open" in the sense of most OSS licences; it is "free" in the doublespeak sense of the FSF. It's a licence that makes sense, from a perspective, but is most effective against other open source licences.

Commercial licensors are either going to use the code without reporting it, they have another way of making their money, or they're going to find other code that doesn't interfere with their licence of choice. It's the rest of the open source community that suffers when tiny but useful bits of code or libraries are put under the most restrictive "open source" licence.

So the submitter of the story is probably more at fault than you are (as I said, I don't like the name because it's not quite true) because this site won't help *open source* developers; it will help the so-called "free software" developers.

Make it easier by letting people select the licence as an attribute on the snippet itself, and make it so that any of the OSI approved but GPL-compatible licences are allowed. Then I think you'll actually have "OpenSnippets".


sure (1)

SHEENmaster (581283) | more than 11 years ago | (#6430766)

But I'm too busy enjoying my new found /. fame to add such a feature just yet. I'll probably add it by next weekend, or at the very least give a list of acceptable licenses. Maybe I should add a default license selection to the user settings, or a default comment header.

Makes development slower! (3, Insightful)

joto (134244) | more than 11 years ago | (#6430200)

While the "snippets" idea is a good one, it has never really succeded before, even though people have tried.

I suspect the reason for this, is that it simply is a too large scope to have "everything useful". Categorizing all this stuff, throwing away the 99% of junk code, it's just too much work for anyone to do. And making it into a blog isn't going to make it work better.

Sure, let the people who want to, have some fun with it. Follow the discussions, read the code posted, learn from it... But don't ever expect to ever find something you actually need there!

Re:Makes development slower! (2, Interesting)

jesboat (64736) | more than 11 years ago | (#6433075)

Take a look at MacOSXHints, it's thriving.

Re:Makes development slower! (1)

Jano-r (214072) | more than 11 years ago | (#6459434)

best web site for code snippets in java, and it is useful.

Re:Makes development slower! (1)

bill_mcgonigle (4333) | more than 11 years ago | (#6493156)

Categorizing all this stuff, throwing away the 99% of junk code, it's just too much work for anyone to do.

Just like Slashdot comments. :)

The key word is 'anyone' - 'everyone' is much more tenable.

It is a good idea, but... (2, Interesting)

wizs (532010) | more than 11 years ago | (#6431644)

It is a good thing that there is a site aggreagting rich code seqment examples. The code segment is not necessary too long, therefore people can catch the point more quickly. OpenSnippets may be a good start. But it seems there are too many OSS developing sites in the world. Too many premuture sites may disperse the development power of OSS.

Not clear how different from other sites (No troll (1)

Paul Bain (9907) | more than 11 years ago | (#6431681)

I could not find an FAQ on the site explaining how differs from other repositories of open source code. There are many such repositories these days. Why would I choose to spend time on Osnippets instead of one of the others? Could someone please enlighten me?

snippets, rather than projects (1)

SHEENmaster (581283) | more than 11 years ago | (#6434611)

If you're developing code, and you want a function to quickly factor numbers, it's a lot easier to just find that one subroutine that to find a calculator project and dig through its source code.

Re:snippets, rather than projects (1)

Paul Bain (9907) | more than 11 years ago | (#6437253)

OK, I understand that much, but how is your site different from, say, the SourceForge snippet repository [] , the many PHP repositories [] , HotScripts [] , CPAN [] , or Vaults of Parnassus (for Python code). There are many repositories available.

The FAQ (2, Informative)

jesboat (64736) | more than 11 years ago | (#6433092)


It's guidelines: Here []
Open Snippets->Misc Stuff->Official->Snippet Guidelines

gpl stuff (4, Insightful)

morgajel (568462) | more than 11 years ago | (#6435657)

As one of the coders who has provided snippets for them, I gotta say that I the gpl licence works just fine. the purpose is to TEACH you how to do it, not just copy paste and be done with it. The gpl has a handy little clause that says you can rewrite the code and call it your own.

If you like my code, the only thing I ask is that you figure out what what it does before using it. If you understand it, you don't have to copy/paste it and can just write your own.

I think that gpl is perfect for this site because the snippets are small, and easy to rewrite. It's perfect for me because in order to rewrite it, you have to understand it, which is why I posted the snippets in the first place- to help people learn.

Good job sheenmaster, but you really gotta get a different handle:)

if you want to check out other projects I've worked on, check out []

Some critique (3, Insightful)

DukeyToo (681226) | more than 11 years ago | (#6435762)

Took a look at the site. And I thought /. was anti-MS!

I won't be returning to the site...I don't want social commentary, I want useful source code and coding techniques, algorythms.

Try for a decent site.

Re:Some critique (1)

Bloodshot (8999) | more than 11 years ago | (#6443615)

Took a look at It's all Windows-specific stuff except for a link to Perl. And no link to PHP in the scripting section? What a shock. Definitely a Windows-centric site.

Gee, what's this? I dig a little deeper and find out that the site is nothing more than a shill for the products of it's sponsors.

I'll take a sponsor-free site over one whoring itself out any day.

Re: Some critique (1)

DukeyToo (681226) | more than 11 years ago | (#6444221)

Yes, definitely Windows centric; there is nothing wrong with being focused on a particular area...they make no secret of it: "The Code Project is a community of Visual Studio .NET developers joined together with a common goal: To learn, to teach, to have fun programming"

What I was trying to convey is that the site does what it does very well! Code snippets are easy to find, articles are generally well thought out and written. And the focus is on the code.

It may be not be for everyone, but almost 1/2 million other people have registered on the site - perhaps there is something worth learning from them.

Re: Some critique (1)

Bloodshot (8999) | more than 11 years ago | (#6444418)

The only thing I see different from that site and the opensnippets one is (a) the interface is a lot better at "The Code Project" and (b) they push the development tools of their sponsors. Hey, we've all been whores at some point in our lives, so I don't completely blame them. Running websites isn't free.

I'm sure those 1/2 million members (that seems like an awfully large number to me, but I have no reason to believe it's not true) are finding something of value from the site. I guess I just let my own morals get in the way of using a site like that.

Re:Some critique (0)

Anonymous Coward | more than 11 years ago | (#6456976) looks like it has some good reference material. It also looks much older than osnippets. Osnippets looks to be much more neutral in relation to the OS. In a quick look, it appeared that codeproject assumed you enjoyed throwing large sums of money at Microsoft and bought their tools. I prefer code that is usable in multiple environments, i.e., gcc for the cheap, or visual studio for those who are spending other peoples money.
Good day,

Why centered everything? (1)

panda (10044) | more than 11 years ago | (#6441813)

I just checked it out. (Sorry, but I'm a busy guy.) All I can say is, why do they center all the text in the snippets? Makes it harder to read the stuff and follow the code when indentation is often used as a visual assist in expressing the logical flow of code. Also, centering everything makes posting Python code rather cumbersome. (Not exactly the word I want, but it's as close as I'm going to get right now.)

browser issue? (1)

SHEENmaster (581283) | more than 11 years ago | (#6450611)

That sounds like a browser issue; I can't seem to recreat your problem.

Email me a screenshot and your browser info. I've specifically altered the site for lynx support; one more mod won't be that big of a deal.
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?