9 ms·
Essential Copying and Pasting from Stack Overflow
- valine 11y agoThere is substantial technical debt introduced by copy and pasting code. I've made a rule for myself: Never paste more than three lines of code at once. It forces me to understand the code I'm copying, and it keeps my work tidy.
- diskcat 11y agoThe trick to copying and pasting is doing it when it won't be you paying back the debt. Just like how the US economy works.
- edwinksl 11y agoGood idea.
- taneq 11y agoThat, or if you really have to use more, have a standard comment to mark such occasions so you can come back later and understand/fix it. // voodoo magic from stackoverflow starts here (link: ...)
- milansm 11y ago> so you can come back later and understand/fix it But, of course, that's very unlikely to happen.
- christianmann 11y agoEven just retyping the exact code helps me quite a bit.
- lolc 11y agoNow I want the hardcover edition. (to put it on display on my desk of course)
- JetSpiegel 11y agoYou can copy the image, paste it into Word and print it.
- InclinedPlane 11y agoNeeds a graphic for the spine and back.
- takno 11y agoI closed my browser for 5 minutes and then wrote down what I remembered. I've printed out these pages and put them in a splendid ring binder. The hardback edition therefore takes pride of place on my shelf, and by the logic of the authors I wrote it myself.
- to3m 11y agoThat's a great idea and I'm glad I thought of it.
- ratfacemcgee 11y agoI'm glad my idea helped so much, friend.
- ytjohn 11y agoI've seen this cover around for a while as a sort of joke image. I never realized I had made it into a book.
- loco5niner 11y agojoke image -> joke book. It's 4 pages (not to knock the content, I haven't actually read it. The author does say " The book is written in a deadpan manner.")
- deleted 11y ago[deleted]
- pmorici 11y agoI feel like this is a smug joke about a problem which doesn't actually exist. Effective engineers know how to look things up. Stack Overflow is one very effective way to look things up or at least provide pointers to authoritative sources of information which might otherwise be difficult to uncover or not obvious from the original source.
- cpayne 11y agoI've certainly seen great slabs of code that have clearly been copied from somewhere, perhaps not Stackoverflow. Unless there is some type of reference, you have no idea of what is going on or why...
- InclinedPlane 11y agoNot everyone is like you. There are devs who use the internet to understand things, and when they see some code on the web they use that as a template to help with their particular problem. There are other devs who barely deserve the name, who struggle with everything they run up against and who blindly copy/paste code without an understanding of how it works or what it means in an effort to get the problem to go away. And of course there are folks of varying levels of talent in between. Yes, it is a bit of a smug joke, and a bit of self-deprecatory humor as well. Since plenty of people leverage the expertise of folks on stack overflow and are still effective devs in their own right. But it feels like you would be shocked by the notion that a significant number of professional developers would struggle with, say, the fizzbuzz problem. But everything I've ever seen indicates that there is a huge class of developers who earn decent wages doing coding for a living at lots of places who nevertheless struggle with coding at a basic level.
- pmorici 11y agoNot shocked at all. I don't think people that can't do fizzbuzz are using stack overflow at all. Part of why they can't produce anything is because they can't use reference resources effectively and thus never learn anything.
- ratfacemcgee 11y agobasically the only book you'll ever need
- wckronholm 11y agoIt's the only book I've ever written.
- eschutte2 11y agoWhy copy-paste when you can autocomplete? https://emilschutte.com/stackoverflow-autocomplete/ https://emilschutte.com/stackoverflow-autocomplete/ Does anybody know how to make a Sublime Text plugin? Oh wait, I know where to look that up.
- seanp2k2 11y agohttps://gkoberger.github.io/stacksort/ https://gkoberger.github.io/stacksort/
- Hydraulix989 11y ago"Using code from Code Review and Code Golf may also be rather unethical, since you are just taking advantage of the fact that everything is automatically licensed on Stack Exchange under CC-BY-SA 3.0 with no exception." I disagree. If you knowingly publish your code on such sites, then you know ahead of time that the license is CC. Others are abiding well within their rights as licensees if they use your published code as such. It's only unethical if CodeReview did not clearly and plainly disclose their licensing agreement a priori, or if, as a licensee, you violated the terms of that license.