6 ms·
> they 'get things done Yes, that's the trick. > guess about how code works That's not a bad thing per se. Time spent vs. accuracy is a compromise. You need
by sz4kerto 11y ago
> they 'get things done
Yes, that's the trick.
> guess about how code works
That's not a bad thing per se. Time spent vs. accuracy is a compromise. You need to figure out what is the optimal depth of understanding you need to achieve to get the task done.
> copy and paste googled code
Sure, funderstanding code is usually much easier than writing it, so if you find something on SO that does exactly what you need then yes, just paste it.
> If I want to succeed, do I need to stop caring about solving problems and start caring about getting as many lines of code out the door as I can?
No, not at all. You should care about solving problems, but the problems you're trying to solve should more or less overlap with your employer's problems. If you are developing a trading system where the expected throughput is 10 trades/sec, then designing something that can cope with 1000 trades/sec might be interesting but it is not your job. If you need to fix some bug in 20 minutes because many things (money, reputation, etc.) depend on it, then yes, it might be just fine to guess, hack together something and fix it later properly instead of spending a couple of days on the 'correct' solution meanwhile the company is collapsing around you.
In short: what you do is part of a larger context, you need to align your priorities with that.
- ajankovic 11y ago> In short: what you do is part of a larger context, you need to align your priorities with that. Let me just point out that this is the hardest part of being the professional. Reasons for this are many. One example is that larger context can be obscure to you due to bad company organization/management.
- nkvoll 11y ago> if you find something on SO that does exactly what you need then yes, just paste it. I think you should be very careful about doing this without an explicitly stated license with reasonable proof of author copyright for the code snippet. It's one of the things that can easily compromise the legal security of a codebase.
- ams6110 11y agoIs there not a blanket/implicit release of claim that goes along with posting code on SO? When I copy code verbatim from SO or another "help" site, I generally put a comment right above that chunk of code, something like: /* See: http://stackoverflow.com/a/xxxxxxxxxxx */ Don't know if that's enough to protect against any ownership claims though.
- jdotjdot 11y agoI think this is helpful more in helping future developers reading the code have more context about what the code is, why it's there, and where it came from, rather than anything to do with ownership claims. Often times code taken from SO solves the problem but noticeably is structured differently from the rest of the codebase--often with good reason--and this helps the new dev go look back at the SO conversation and see what problems this is solving / if it can be removed.
- tormeh 11y agoCode posted on SO doesn't need to be written by the person posting the code.
- WoodenChair 11y agoAgreed if it's anything of significant size. If it's 2-4 lines though, it's almost certainly fair use. Can a lawyer comment?
- ncallaway 11y agoIANAL Fair use is a pretty subjective thing that's up to a judge to determine. It's a four-factor test, and you can read more here: http://fairuse.stanford.edu/overview/fair-use/four-factors/ http://fairuse.stanford.edu/overview/fair-use/four-factors/ * the purpose and character of your use * the nature of the copyrighted work * the amount and substantiality of the portion taken, and * the effect of the use upon the potential market. The fact that it's 2-4 lines may come in as part of factor 3, but the other factors also need to be taken into account.
- ams6110 11y agoI think there is a huge difference in what would be considered "fair use" in a commercial, value-generating software product. Fair use as I understand it usually applies to entirely personal use, or quotes used in an editorial, analysis, or critique. If something I wrote, even just a few lines, is used to generate profit for someone else, and I did not permit that or place it in the public domain, I'm not sure a fair use claim would hold up. IANAL.
- ncallaway 11y agoFair use can apply to commercial or for-profit enterprises. You'll find that commercial enterprises are often disadvantaged by some of the factors. For example, the first factor (purpose and character; transformative nature of the work) is often less transformative in commercial settings. The fourth factor (the effect of the use upon the potential market) is also often more challenging for commercial enterprises to get past. However, there are plenty of commercial enterprises that rely on fair use regularly. News media is a very common commercial product that relies on fair use. Copyright and fair use law is pretty much the same for commercial and personal products. If you can make a compelling case to a judge around those four-factors, it can be fair use. However, when taking clippings from SO and using them directly in a software, you're going to have very hard time making a fair use claim — wether it's for a personal or commercial project.
- brudgers 11y agoStackExchange content is licensed under Creative Commons. http://blog.stackoverflow.com/2009/06/stack-overflow-creative-commons-data-dump/ http://blog.stackoverflow.com/2009/06/stack-overflow-creativ...
- u04f061 11y agoCan't disagree with any of the point.
- chrismcb 11y agoNo, please no. Just because it is on SO and it appears to do what you need, doesn't mean it does what you need, or does everything you need, or is production quality. You should make sure you understand what the code is doing. Only then will you know if it solves your problem and solves the edge cases. You are right in that you need to balance a hack versus a proper fix. But always aim for the proper fix first.