|
|
|
|
|
by catwind7
2642 days ago
|
|
i generally avoid looking at other peoples code unless 1) it's written for teaching purposes and aims to teach a concept I want to learn or 2) I have to because i'm having integration problem I think looking at well-written code is a great way to learn best practices, but I think it's quite hard to do that in practice and probably not the best way. there's a lot of garbage code out there and even if the code is good, often times you find that it's super out of date (using an old ass version of a language) or the logic is pretty obfuscated by unessential (to you) backwards-compatability / cross-platform compatability checks. there's also a great deal of context around the intent of blocks of code that you don't have when looking at open source code in isolation in the example you gave. Some lines might seem like nonsense until you read the PR and understand the tradeoffs made at that point in time. |
|