Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think that is only an issue in education where you have simple homework whose best solution you can usually pick from any library. Which is why you usually do such stuff in pseudo-code rather than a real programming language.

In the real world. Guava (google java collection libs) have tons of code that is virtually identical to other libraries. The thing is very often you re-implement the same thing to not have another dependency for some small thing. Also usually you use some library or framework to implement most of the things often found in student homework. You simply should not write your own code for such basic things but use a library, that does it for you in clean and tested code.

When the task from your professor says do not use java.util, this may have educational purpose (when the aim of the game is to create your own HashMap implementation) but it is an antipattern in actual programming. Do it when you make your own library like a immutable version or like the koloboke compact version. But those derivations have a purpose you don't just make you own HashMap implementation so as not to infringe on some copyright.

Your example mainly focus on the usage of existing libraries. If you write and aws lamdba function and use the aws sdk, you often can just copy an example and just change the params, without referencing the source of your example snippet. There is no copyright issue IMO. There is often a right way and a wrong way and the right way is the cleanest, most concise way. A lambda are just maybe 20 lines of JS code and often 90% of those 20 lines is copy paste. Don't write your own original spaghetti code, you can write a more concise and cleaner version just please share it. An instructor that does not clearly teach that imo isn't a good coding instructor.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: