← Home ← Back to /r9k/

Thread 82416670

16 posts 4 images /r9k/
Anonymous No.82416670 [Report] >>82416690 >>82417141 >>82417397 >>82418482
Coding
I released a software and one part of the code was directly taken from an online tutorial just because I don't know how to write it myself

I just changed the comments and variable names
Anonymous No.82416690 [Report] >>82416703 >>82416811
>>82416670 (OP)
Lame, it's the age of AI vibe coding, grandpa. Stealing code from tutorials is so 3 years ago.
Anonymous No.82416703 [Report]
>>82416690
>vibe coding
What does this mean?

My point was to ask whether this is okay or if I need to rewrite the code in my own style or something
It's just a pain because it's a very common piece of code and nothing unique really
Anonymous No.82416811 [Report]
>>82416690
>vibe coding

That's a joke bro. People just push button and receive product
It's not coding, it's just screeching for someone to make something for you
Anonymous No.82417141 [Report] >>82417414 >>82417707
>>82416670 (OP)
This is called coding.
The reason you can't patent code is coz it's like patenting the idea of connecting a 1x4 lego brick to a 1x2 lego brick - there's only so many possible ways to do it, and only one for certain applications.
If your code isn't at least half snippets and stolen tidbits it's probably already fucked
Anonymous No.82417397 [Report]
>>82416670 (OP)
def yell(text):
text = text.upper()
number_of_characters = len(text)
result = text + "!" * (number_of_characters // 4)
print(result)

yell("op is a faggot")

>OP IS A FAGGOT!!!
Anonymous No.82417414 [Report] >>82417463
>>82417141
>you can't patent code
Yes you can, if it isn't FUCKING BASIC
Anonymous No.82417463 [Report] >>82417537
>>82417414
No you can patent aspects of the final result, like crazy taxi patented the dynamic direction arrow, or LOTR games patented the dynamic faction system, you can't patent actual code
Anonymous No.82417537 [Report]
>>82417463
If there's only one way to do an algorithm, then yes, you can patent code.
Anonymous No.82417707 [Report] >>82417854 >>82418482
>>82417141
So it's allowed to do?
Anonymous No.82417854 [Report] >>82417868 >>82418101
>>82417707
Fuck yes, as long as you don't wholesale rip off an entire processing system and pretend you wrote it you'll be fine. If you wanna do open source just add comments attributing your snippets to gnu projects. Who dafuq gonna check all that?
Anonymous No.82417868 [Report] >>82417918
>>82417854
>Who dafuq gonna check all that?
There are companies that scan code to check for stolen, copy-lefted or -righted code in order to initiate legal action.
Anonymous No.82417918 [Report]
>>82417868
If I can cite some guys forgotten project from a geocities mirror, they can't do shit
Anonymous No.82418101 [Report] >>82418339 >>82418482
>>82417854
https://codeshack.io/how-to-create-pagination-php-mysql/

I took this and based my own website around it.
I have thousands of lines of code now but this main structure remains.
I'd like to change it just to make my code 100% mine, but honestly, I dont see how the pagination and the prepared SQL statements could be done in any different way (better)
All I can do is change variable names and something simple like that
Took out the stupid php tags from the pagination
Anonymous No.82418339 [Report]
>>82418101
Yeah that should be alright since the source is directly an educational example.
Also, sql calls are set in stone, and shuffling arrays for everything is hardwired into php, so you don't really have any freedom with it. You COULD save all the data as xml files and just pop them to arrays with file calls, but xml is gonna be unworkable for large or multi-user datasets
The buttons can be remade a lot of ways easily but why bother lol
Anonymous No.82418482 [Report]
>>82416670 (OP)
>>82417707
>>82418101
Anyway you should know that everyone does this all the time, the point is not to be the all time grand poobah of any coding style or language, it's just to understand what each thing you're using does, and how to adjust them to your needs.
You can get a feel for a new language to that level in a week, next time you need to use it, just grab snippets and start cannibalising them for your own functions and you're away laughing