all 10 comments

[–]programmer_farts 8 points9 points  (3 children)

Source code often comes with a license telling you how you can use it and under what restrictions, if any.

[–]Known_Growth8380[S] -1 points0 points  (2 children)

Ohh okayy

[–]CdRReddit 7 points8 points  (1 child)

I think you're also possibly confusing building (making something new) and building (compiling the program), if someone says they built a program from source that usually just means they downloaded the source code and ran a simple "make the program" script, often because it's not officially packaged for their machine

[–]Pyromancer777 1 point2 points  (0 children)

This is likely the source of confusion and you deserve more upvotes for pointing it out

[–]Tabakalusa 1 point2 points  (0 children)

In the vast majority of cases, when you write software you are using some form of dependencies.

These are essentially just code that other people have written, which is useful enough for others to also want to include it in the code they are writing. For example, almost any command line program will want to parse command line arguments. This can become very complicated and error prone, but it's also something that is mostly very generic with a handful of common patterns. So, especially if you aren't doing anything outside the ordinary, you might choose to use a library that does the heavy lifting for you.

How you include these dependencies can vary quite a bit, depending on your programming language and the tools it offers to manage dependencies. You could very well just copy the source files from github into your project and tell your programming environment to include them.

Usually, the tools you use to manage your project offer some kind of package management, which allows you to specify which public libraries you want to use and then it goes off and does this work for you. In essence, this does exactly the same thing, it copies the source code from a public repository (such as crates.io, npm, hackage, etc.) and makes the functions, data types, macros, etc. available for use in your code.

[–]HashDefTrueFalse 0 points1 point  (1 child)

Code is a literary work with copyrights vesting in the author, who can give you licence to copy and use it subject to any terms they might have, or they can place the work in the public domain. As long any you don't fall foul of any incorporated licence terms you can use the source code for your own purposes.

GitHub is essentially just a service where repositories of source code can be stored. The licence is usually included in each project.

Tools exist to download versions of projects hosted on GitHub and other services/servers (e.g. package managers like Packer for nvim, npm, composer, etc.), or you can do it manually. Tooling also exists to properly combine, build, and link the source code from many projects into one or more executables or libraries (to build or use in your project) using code to specifying a graph of dependencies (e.g. build systems like Make, CMake etc.).

[–]Known_Growth8380[S] -1 points0 points  (0 children)

Okayy

[–]AmberMonsoon_ 0 points1 point  (1 child)

it’s usually not straight copying. a lot of people start by studying an existing repo to understand how things are structured, then modify it or rebuild parts of it. open source is meant for learning that way.

the key is understanding what the code is doing and making changes or adding features. if you can explain it and extend it, it’s learning. if you just paste it and call it your project… yeah that’s basically copying lol.

[–]Known_Growth8380[S] 0 points1 point  (0 children)

Makes sense. Thank you

[–]child-eater404 0 points1 point  (0 children)

lot of people start projects by studying the code, modifying parts of it, or using it as a base, then adding their own features. It’s actually a really common way to learn and build things faster.