Slashdot Mirror


New Site Makes OSS Development Easier

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..."

42 comments

  1. Mod parent up! by Anonymous Coward · · Score: 0

    (Score:5, Funny)!

  2. Not "Open", but GPLed by aziegler · · Score: 5, Insightful

    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.

    -a

    --
    Ni bhionn an rath achx mar a mbionn an smacht (There is no Luck without Discipline)
    1. Re:Not "Open", but GPLed by gangien · · Score: 1

      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.

    2. Re:Not "Open", but GPLed by larry+bagina · · Score: 2, Informative
      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.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    3. Re:Not "Open", but GPLed by aziegler · · Score: 3, Insightful

      That's the GPL essentially.

      I don't mind if they called it "GPLedsnippets.com"; I mind that they call it "opensnippets.com". 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 "OpenSnippets.com" when it's really "GPLedSnippets.com".

      -austin

      --
      Ni bhionn an rath achx mar a mbionn an smacht (There is no Luck without Discipline)
    4. Re:Not "Open", but GPLed by GigsVT · · Score: 5, Interesting

      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.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    5. Re:Not "Open", but GPLed by Znork · · Score: 1

      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.

    6. Re:Not "Open", but GPLed by Anonymous Coward · · Score: 0
      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.

    7. Re:Not "Open", but GPLed by Anonymous Coward · · Score: 0

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

    8. Re:Not "Open", but GPLed by Znork · · Score: 2, Informative

      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.

    9. Re:Not "Open", but GPLed by Anonymous Coward · · Score: 0

      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

    10. Re:Not "Open", but GPLed by Anonymous Coward · · Score: 0

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

  3. woah by SHEENmaster · · Score: 4, Informative

    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 with any suggestions, complaints, burning garbage, or offers of endorsement.

    --
    You can't judge a book by the way it wears its hair.
  4. Makes development slower! by joto · · Score: 3, Insightful
    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!

    1. Re:Makes development slower! by jesboat · · Score: 2, Interesting

      Take a look at MacOSXHints, it's thriving.

    2. Re:Makes development slower! by Jano-r · · Score: 1

      check http://javaalmanac.com/egs/?
      best web site for code snippets in java, and it is useful.

    3. Re:Makes development slower! by bill_mcgonigle · · Score: 1

      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.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  5. Help on Understanding all the Different Licenses by AShocka · · Score: 1

    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.

  6. Re:Help on Understanding all the Different License by SHEENmaster · · Score: 1

    Here is what you're looking for.

    --
    You can't judge a book by the way it wears its hair.
  7. "Code for commercial software" by aziegler · · Score: 2, Interesting

    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".

    -austin

    --
    Ni bhionn an rath achx mar a mbionn an smacht (There is no Luck without Discipline)
  8. Re:Help on Understanding all the Different License by AShocka · · Score: 1

    Thanks

  9. sure by SHEENmaster · · Score: 1

    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.

    --
    You can't judge a book by the way it wears its hair.
  10. Re:This is a really great news by Anonymous Coward · · Score: 0

    Karma: Positive (probably because of superiour intellect)

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

  11. Re:Help on Understanding all the Different License by moncyb · · Score: 2, Informative

    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 opensource.org 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...

  12. It is a good idea, but... by wizs · · Score: 2, Interesting

    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.

  13. Not clear how different from other sites (No troll by Paul+Bain · · Score: 1

    I could not find an FAQ on the site explaining how Osnippets.org 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?

    --

    A lawyer & digital forensics examiner. Also an expert on open source software (OSS).
  14. The FAQ by jesboat · · Score: 2, Informative

    Sortof,

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

  15. Re:This is a really great news by Anonymous Coward · · Score: 0

    She's not a karma-whore, man! I thought she made it pretty clear: http://slashdot.org/comments.pl?sid=70864&cid=6429 641

  16. snippets, rather than projects by SHEENmaster · · Score: 1

    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.

    --
    You can't judge a book by the way it wears its hair.
    1. Re:snippets, rather than projects by Paul+Bain · · Score: 1

      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.

      --

      A lawyer & digital forensics examiner. Also an expert on open source software (OSS).
  17. Re:This is a really great news by Anonymous Coward · · Score: 0

    She's English.

  18. gpl stuff by morgajel · · Score: 4, Insightful

    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 morgajel.com

    --
    Looking for Book Reviews? Check out Literary Escapism.
  19. Some critique by DukeyToo · · Score: 3, Insightful

    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 www.codeproject.com for a decent site.

    --
    Most writers regard truth as their most valuable possession, and therefore are most economical in its use - Mark Twain
    1. Re:Some critique by Bloodshot · · Score: 1

      Took a look at www.codeproject.com. 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.

    2. Re: Some critique by DukeyToo · · Score: 1

      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.

      --
      Most writers regard truth as their most valuable possession, and therefore are most economical in its use - Mark Twain
    3. Re: Some critique by Bloodshot · · Score: 1

      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.

    4. Re:Some critique by Anonymous Coward · · Score: 0

      codeproject.com 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,

  20. Re:This is a really great news by Anonymous Coward · · Score: 0

    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.

  21. Why centered everything? by panda · · Score: 1

    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.)

    --
    Just be sure to wear the gold uniform when you beam down -- you know what happens when you wear the red one.
  22. browser issue? by SHEENmaster · · Score: 1

    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.

    --
    You can't judge a book by the way it wears its hair.