DEV Community

Aria Janke
Aria Janke

Posted on

Questioning my Approach for trying to put a page together

Hello All,

I'm calling into question of how I approach trying to learn how to design a web page (a SPA in my case). So I look up how to accomplish X in CSS/HTML. Of course I find an abundance of examples with code snippets. Unfortunately I cannot use them, not even a single character due to copyright. If I'm lucky, it's on a website which states that "all answers/solutions are under CC-BY-SA". I worry that what I'm learning is unusable. I'm afraid to use the same approach, properties, or even concepts as that can lead me into hot water.

Just reading these posts bias my perspective and will push me to use copyrighted combinations of properties and values. Though I've no idea of any other solution! What if it isn't possible to do x any other way?

My question is, how can I learn this stuff, or "how to do x?" without fretting over breaking the law?

And no I absolutely cannot afford a lawyer! This makes me doubt whether I should continue my efforts at all.

I'm sorry...

Discussion (4)

Collapse
recursivefaults profile image
Ryan Latta

Ooh, kudos to you for taking this seriously.

Yes, if you drop someone else's code into yours that had a copyright that is bad.

The likelihood that they'd ever find out or do something is almost zero.

But, for a moment I want you to think about this from another angle. When you read a book that has code examples in it, how would you make use of that? You'd fundamentally have to rewrite it and the authors intend for you to do that. Books of coding examples are very much under copyright so you can't just take the material without citing it, but you are supposed to re-use it.

So here're some ways you can maybe feel better about looking at examples:

  1. Cite your source in a code comment
  2. Rework the example so it isn't 100% a match
  3. Don't publish your practice where you make use of the examples.

The first one is exactly how open source works. We have to provide licenses and sources for what we use. Two is likely going to happen because you'll name things differently. Three is because sometimes we need to see it work as-is before we make some changes.

Hope this helps!

Collapse
vilfredsikker profile image
Vilfred Sikker Dreijer • Edited

Can you provide an example of a code snippet you would like to use, but can't due to copyright?

I'm not exactly sure about what snippets you are looking for, but not everything is protected, just because it's in a repository with a certain license.

This is a very vague example, but you can't copyright how to center a div with text using Flex, but you can copyright a certain algorithm, e.g.
BinarySearch by princeton. But you are allowed to use it, if you quote the source in comments. (algs4.cs.princeton.edu/code/edu/pr... )

Collapse
ariajanke profile image
Aria Janke Author

I'm afraid I've lost the example in question, and been looking for a different approach altogether (though not much progress has been made).

To touch upon the binary search algorithm. How are any other implementations legal? For instance the Free Software Foundation's binary_search in their C++ STL? Especially glaring considering there is no mention anywhere of Princeton's original implementation.

Finding the line between "recipe/formula" and "creative work" isn't clear to me.

Here's an idea, what about the example of Bobby Prince's work on the original DooM soundtrack? Though I suppose he can be his own literal and matter of fact lawyer on the topic. Perhaps that's a rabithole for a different post, though growing my understanding can help put my mind at ease (maybe).

Thanks for the comment. It certainly got me thinking. n.n;;

Collapse
preciouschicken profile image
Precious Chicken

I am not a lawyer either, so this isn't advice. However there are 'fair use' copyright exceptions, and one of these regards education:

copyrightuser.org/understand/excep...

Which basically means there are a lot of circumstances where you can use these snippets without falling foul of the law. It depends on how you are using them - and if it is for private study you are often covered.

(the above link appears to be for UK law, but I suspect similar exceptions also exist in US law).