Microsoft Tech
Article
By Christian Heilmann

The Full Stack Overflow Developer

By Christian Heilmann

This article is part of a web development series from Microsoft. Thank you for supporting the partners who make SitePoint possible.

In a few talks and interviews I lamented about a phenomenon in our market that’s always been around, but seems to be rampant by now: the one of the Full Stack Overflow developer. Prompted by Stephen Hay on Twitter, I shall now talk a bit about what this means.

Cut-Copy-Paste

Full Stack Overflow developers work almost entirely by copying and pasting code from Stack Overflow instead of understanding what they are doing. Instead of researching a topic, they go there first to ask a question hoping people will just give them the result.

In many cases, this works out. It is amazing what you can achieve by pasting things you don’t understand, that people who know what they are doing put out there.

I am not having a go at Stack Overflow here. It is an incredible resource and it is hard to create a community like this and not drown in spam and mediocrity (trust me, I am an admin on several technical Facebook groups).

We had that problem for a long time. I challenge anyone learning PHP to not simply copy the code examples in the notes. For years, code reference sites have given us answers we wanted, but didn’t need. Heck, even Matt’s Script Archive is probably the source for many a spam mailer as people used formmail.pl without knowing what it does.

I am, however, worried about how rampant this behaviour is today. Of course, it is understandable:

  • Creating something is more fun than reading up on how to create something.
  • Using something that works immediately, even if you don’t know how it does it, feels better than encountering the frustration of not being able to fix something.
  • You feel like you cheated the system – shortcuts are fun, and makes you feel like you’re cleverer than all those chumps who spend all this time learning.
  • Our job is mainstream and there is a massive need for developers. The speed of how we are asked to deliver has massively increased. People want results quicker, rather than cleaner.

We, as a community, are partly to blame for breeding this kind of developer:

  • When we answer questions, we tend to give the solution instead of analysing what the person really needs. This is much more work, so we tend to avoid it.
  • Posting the “one true solution” and winning a thread on Stack Overflow feels great – even if we have no plan whatsoever to come back to it later if it turns out not to be such a good idea any longer as the environment changed.
  • Getting recognition, Karma and upvotes for giving the solution is much easier than getting it for being the person who asks the right questions to get to the source of the problem.
  • It is easy to lose patience with getting the same questions over and over again and a “just use jQuery” is easy to paste.

So what? Why is it a problem if people are faster and more effective in releasing products?

Of course, you can call me a grumpy old so-and-so now and tell me that the concept of learning the basics in software is an outdated concept. The complexity of today’s products makes it almost impossible to know everything and in other, highly successful environments using lots of packages and libraries is par for the course. Fine, although we seem to be understanding that software as a whole might be more broken than we care to admit, and this might be one of the causes.

There are several problems with Full Stack Overflow development:

  • It assumes the simplest answer with the most technical detail is the best. This is dangerous and can result in many a copied and pasted example which has a lot of issues surviving for years and years on the web.
  • The most copy-able answer being used, upvoted and linked to means that better solutions that fix its issues are much less likely to succeed in replacing them. There is no “digging deeper”, so even important fixes will fall under the radar.
  • Any expert community is most likely to have a lot of assumptions as to what makes up a “professional environment”. That means that answers giving in those communities are very likely to work in a great, new and complex developer setup but are not necessarily useful for our end users out there. It is very easy to add yet another library or npm package or bootstrap solution to a project, but it adds to the already full-to-the-brim landfill of outdated code on the web.
  • It perpetuates the fondness we have for terseness over writing understandable code. The smallest solution – however unreadable – is always the one that wins the thread. As people copy and paste them without understanding, that’s fine by them. For debugging and maintenance, however, it is the worst solution. A great example for this is the use of || for default parameters. Short isn’t better, it is just less work.
  • It cheapens our craft. If we, as the people delivering the work, don’t have any respect for it and simply put things together and hope they work, then we shouldn’t be surprised if our managers and peers don’t see us as professionals.

The biggest problem, however, is that it is bad for the developers themselves.

Finding pride in your work is the biggest reward

Going on the web, finding a solution and copying and pasting it is easy – too easy. There is no effort in it, and it is not your work – it is someone else’s. Instead of being proud of what you achieved, you are more likely to stress out as you don’t want to be found out as a phoney who uses other people’s work and sells it as your own.

Repetition is anathema to a lot of developers. Don’t repeat yourself (DRY) is a good concept in code, but for learning and working it is a terribly idea. We need repetition, to build up muscle memory. The more you repeat a task, the easier it gets and your body does it without you having to think about it.

When you started driving a car, you probably sat down on the seat and got utterly overwhelmed by all the gears, levers, pedals and things to pay attention to. After a while, you don’t even think about what you are doing any longer, and even switching from right- to left-hand drive is not an issue. Failing and learning from it is something we retain much better than simply using something. We put more effort in, it feels more worthy.

Dan Ariely’s TED Talk “What makes us feel good about our work” has some incredibly good points about that topic:

Recognition is what we crave as humans. And we can’t get recognition if we don’t own what we do. You can totally get by copying and pasting and using solution after solution and abstraction upon abstraction. But, sooner or later, you will feel that you are not achieving or creating anything. Many developers who worked like that burned out quickly and stopped developing, stopped caring. And that is a big loss as you might be the person to come up with the next great idea that changes things for a lot of us. That’s an option you shouldn’t rob yourself of. Don’t be a Full Stack Overflow developer. You deserve to be better.

More hands-on with JavaScript

This article is part of the web development series from Microsoft tech evangelists on practical JavaScript learning, open source projects, and interoperability best practices including Microsoft Edge browser and the new EdgeHTML rendering engine.

We encourage you to test across browsers and devices including Microsoft Edge – the default browser for Windows 10 – with free tools on dev.modern.IE:

In-depth tech learning on Microsoft Edge and the Web Platform from our engineers and evangelists:

More free cross-platform tools & resources for the Web Platform:

  • gaatif

    Code from Stack Overflow or any other technical forum is not always use-able as is. Some changes, omissions, additions or adjustments have to be done to apply it in your application.
    One can only modify that “copied” code if s/he understands what it is and what is it doing, how is it doing etc.

    Secondly, being proud on what you have done, is a good advice but copying code isn’t illegal, programmers do like helping other programmers across the globe and don’t mind their code to be copied.

    I haven’t seen any problem fully solved without any initial input or code provided by the original poster, people do help but aren’t free to code and develop a whole process for some forum.
    Sometimes, you just browse or ask some question looking for something as small as a single line of code (say some CSS attribute), if you see it in an existing thread and hit Ctrl+C there, is it illegal?

    • Grzegorz Patynek

      Illegality of copying and pasting it rather not my term. It’s defined by license of forum or by developer. Sometimes there is in job agreement that your code should be correct with law. Except this, the specificity of developer job allow to copy paste code without any effort, so that’s why there is DRY rule, which in other brands like building houses doesn’t work that much. I tend to write answers which just work. Once I inserted one solution with jQuery that worked, since other answers were that you cannot do that because of HTML5 specification. The correct answer was that which analysed deeply problem, so it worked the way it should work. I got lesson from this, so better to give valuable answers.

    • One CSS line (by line I mean single CSS instruction that ends with a semicolon) is not available for copyright. CSS is an open spec and every setting is available for you to use. You can’t copyright one CSS line because every possible single css line is in the documentation.

      While not impossible, it would also be very difficult to claim a style for one CSS selector to be under copyright. And near impossible to enforce.

      However, a full CSS style file, which includes many styles for many CSS selector, which as a whole create a complete theme, that is easy to copyright. Enforcing your copyright becomes easier (though nothing with lawyers and IP is really easy, right?)

      The more CSS content, the more likely a copyright could apply.

      Code is slightly different. While it is not possible to have a single line of CSS under copyright, it may be possible to have single line of code under a copyright. It would be difficult and near impossible to enforce a copyright on a single line of code, though. Unlike CSS, not every single line of code is in the documentation.

      Again, the more content, the more likely a copyright could apply.

      Usually code on StackOverflow is so common and so small that it is not possible, or near impossible, to copyright. Just by being on StackOverflow most code would be considered too ubiquitous to be available for Copyright.

    • One CSS line (by line I mean single CSS instruction that ends with a semicolon) is not available for copyright. CSS is an open spec and every setting is available for you to use. You can’t copyright one CSS line because every possible single css line is in the documentation.

      While not impossible, it would also be very difficult to claim a style for one CSS selector to be under copyright. And near impossible to enforce.

      However, a full CSS style file, which includes many styles for many CSS selector, which as a whole create a complete theme, that is easy to copyright. Enforcing your copyright becomes easier (though nothing with lawyers and IP is really easy, right?)

      The more CSS content, the more likely a copyright could apply.

      Code is slightly different. While it is not possible to have a single line of CSS under copyright, it may be possible to have single line of code under a copyright. It would be difficult and near impossible to enforce a copyright on a single line of code, though. Unlike CSS, not every single line of code is in the documentation.

      Again, the more content, the more likely a copyright could apply.

      Usually code on StackOverflow is so common and so small that it is not possible, or near impossible, to copyright. Just by being on StackOverflow most code would be considered too ubiquitous to be available for Copyright.

  • AlexK

    If a deadline is looming Stack overflow can be a job saver and the solutions sometimes break conceptual logjams which is always good. As Gaatif pointed out, some degree of understanding is needed and the solutions posted do not always work. Using a posted solution inevitably involves learning. I think there are very few cut and paste developers around.

  • Earl Owens

    There are answers on stack overflow that work. How
    anyone can simply copy and paste is beyond me. Every situation for which I have
    found a solution there required knowing where the code should go, what dependences
    there are, and how the solution affects the surrounding and related code. In
    most cases, if not all, substantial changes are required to make the code snippet
    work with the surrounding code. Finally copying code with no understanding is a
    bit like Russian roulette.

    • Check out a great* way how you can earn a lot of extra $ by finishing basic jobs online from home for few hrs /daily VISIT MY-DISQUS-PROFILE to find out more

  • Earl Owens

    There are answers on stack overflow that work. How
    anyone can simply copy and paste is beyond me. Every situation for which I have
    found a solution there required knowing where the code should go, what dependences
    there are, and how the solution affects the surrounding and related code. In
    most cases, if not all, substantial changes are required to make the code snippet
    work with the surrounding code. Finally copying code with no understanding is a
    bit like Russian roulette.

  • necod

    There is a subtle and important difference between ‘copy & paste’ and ‘copy, think & paste’. Or not paste.

    It’s called critical thinking, while being open to ideas of others.

    But why one painting with the broad brush of generalizations should care?

  • jamtr

    Is this really a problem? Every junior programmer learns by copying (and without question, altering somewhat to fit the situation) someone else’s code. If not from Stack Overflow, then from elsewhere in the application. It seems unlikely that anyone could get very far and solve significant business problems by *only* doing this, either. If they are able to do so, then their job is probably not very challenging.

    Frankly it seems foolish to advise programmers to deeply research and understand every single thing they do. If I am trying to solve a problem that’s specific enough to find an answer on Stack Overflow, then it’s probably contained enough that I don’t need to be need to completely understand every bit of whatever it is — any more than I should be rewriting the implementations of all the libraries I use.

    The world is too big and there’s not enough time in it to be an expert on everything.

    • Dar Brett

      No, but it’s reasonable enough to expect even a junior developer to take certain precautions like follow the flow of the logic of some code and recognize things like the possibility of infinite loops.

      Just like it’s reasonable enough to expect someone learning CSS to take the time to understand how precedence of rules is decided, but more often than not I see styles added with and id, !important, or just plain and simple inline styles.

      My take on it is that if you put any code into a program, you should understand how it works. If you don’t understand what’s actually going on, then how can you possibly have any level of confidence that it’s a stable piece of code.

      • jamtr

        But that’s what is great about stack overflow. Solutions to common problems upvoted when they are used successfully; they come with explanations; they come with feedback. This is what makes it so much better than copying patterns and snippets from elsewhere in the codebase in which your working, which is what people used to do.

        If you need to understand how anything you put in a program works, then how can you ever use something that was created by someone who’s a substantially better programmer than you, or that is related to an area that you don’t get into much? Or, that is a black box, such as any third part code? Why is using a code snippet on Stack Overflow any worse than using a method from a library that does something you might not know how to implement yourself?

        As for how can you have confidence that it’s stable code, are you confident that your code is stable simply because you wrote it? Of course not. You write tests, just like you do for code that you think you understand perfectly.

        • Dar Brett

          Yes – I completely agree with you in regard to the first paragraph. That is what’s great about Stack Overflow. For the developers who do want to learn they can gain a lot from it.

          The second paragraph I kind of agree with you, but when I write an answer on Stack Overflow it’s not a comprehensive solution to what they’re looking for. It’s only intended to get them on track. Sometimes my answers will compile and run without modification – which means that anyone could copy the answer and it will work fine most of the time, but they need to stop to think about what edge cases they might have. When I answer questions I don’t think of edge cases or problems specific to their scenario. They need to be doing that themselves. As for third party code – it’s naive to assume that because code was written by someone else it was better.

          As for comparing code snippets to third party libraries – that’s a hard one. If we assume that you’re meaning an open source third party library rather than a supported product (After all in theory that product is supported by domain experts) – then you have exactly the same issue. There could be a problem that affects your specific use case. Maybe it’s just slow, maybe it crashes because you used a space in your Active Directory group name, and the original developer didn’t consider that.

          I can have confidence in my own code only because I understand how it interacts with the underlying system, and I also understand what conditions might cause bizarre effects, thus I can write tests to catch those. And lets be honest, the developers we’re talking about who take code snippets without trying to understand them aren’t the sort of developers who write unit tests.

          At the end of the day I think that all developers need to remember that we’re all only human, and not all of our code is going to function perfectly in every scenario.

  • Jay

    How do you differentiate between “understanding code” and “just using part of the framework or library”?

    • Christian Heilmann

      Mostly by analysing what it does, how it performs and how you could fix issues in it without breaking the possibility to upgrade should a new version come out. It is like Ronald Weasley’s father said in Harry Potter: don’t trust it if you can’t see how it works.

    • Christian Heilmann

      Mostly by analysing what it does, how it performs and how you could fix issues in it without breaking the possibility to upgrade should a new version come out. It is like Ronald Weasley’s father said in Harry Potter: don’t trust it if you can’t see how it works.

  • nino

    Honestly I feel a bit hurted by this article. It seems that if a developer uses frequently SO, or at this point in general the web, to fix something or to solve a problem which blocked him, he would be a kind of sub-developer…

    The key of software developing which will become stronger in the future is sharing. We cannot think that only sharing services as Cloud servers et similia is a good way… Also share our own knowledges, our own winnings against the Code, our ways to face an issue… is a strategic thing.

    In my humble opinion, a good software developer is not simply a good software writer, but also a person who knows his limits, who looks beyond his own horizons, in order to get the goal.

    Often good sw writers but obtuse minds who do not look ever SO make more damages than successes.
    I knew a guy who spent a month in order to understand how to customize a third-party wpf component in order to make a proper printing… When I took his place, I needed about 1 day to solve this issue thanks to web knowledge. Now, he is gone, I am still here…

  • uglybagofwater

    You’ve convinced me. We should all go back to writing pure assembler.

    • disqus_8NvNH4baa0

      I’m upvoting not because I think your facetiousness is clever, but because I’d really like to see it happen.

      • David Rice

        Why would this ever seem like a good idea? Do you enjoy the thought of not having any modern software?

        • Christian Heilmann

          If you are a developer, why would you ever think in such black and white concepts? Nobody claims you should never use third party code. It becomes tricky when you have no clue what it does.

          • David Rice

            “We should all go back to writing pure assembler” – you think this is a good idea? Throw out all modern languages and go to writing assembler? I maintain that not a single bit of modern software would be commercially available if it had to be written entirely in assembler.

          • David Rice

            “We should all go back to writing pure assembler” – you think this is a good idea? Throw out all modern languages and go to writing assembler? I maintain that not a single bit of modern software would be commercially available if it had to be written entirely in assembler.

          • Christian Heilmann

            I am not playing your reduction game. I never claimed we should write things in assembler now – that’d be ridiculous seeing how many different processors are out there. Please read my comments before accusing me of quotes like that. I said I learned from working in a very limited environment what it means to understand the code you write. That’s a great thing. And with IoT being the big thing, it might be a good idea to learn the memory and processing power of the code we write instead of just assuming that tooling will save us and it is OK to use any package without understanding its impact.

          • David Rice

            Are you missing the thread? I was responding to uglybagofwater (who facetiously said that quote) and disqus_8NvNH4baa0’s comment that they’d “really like to see it happen”. Chill.

          • Christian Heilmann

            ah, the indentation here doesn’t help :) Sorry about that. Anyways, got some points in.

          • disqus_8NvNH4baa0

            My apologies for the misunderstanding.

          • disqus_8NvNH4baa0

            Although I don’t think we should should *all* go back to writing pure assembler, I don’t think that assembler was entirely a bad thing. People who programmed in it *knew* what they were doing, and what was going to happen. They didn’t worry that NSA was going to slip code into compilers to weaken anything they did. They had the tools do it, because debug came with DOS. They didn’t have to write code to handle different types that some modern languages b*tch about, more code than it actually took to do the task at hand. They knew logic, they knew Boolean Algebra, they knew how to factor a problem. I’ve seen people write pages and pages of code to handle 8 variables, instead of knowing how to factor the problem down to the only variables that actually make a difference. Many knew what a Karnaugh Map was to avoid even much of that. Now, all the “modern” programmers think that copy paste from Stack Overflow is how you’re supposed to code. They seem to have NO clue about how to create an algorithm. Maybe, just maybe assembler has what nothing else does, total control over the processor. So, maybe I’m just wishing that people would take the time and trouble to know what they are doing. Assembler forces that.

          • disqus_8NvNH4baa0

            Ya knowww… there’s a difference between writing pure assembler and writing purely in assembler, e.g. C allows you to write assembler inline, which isn’t exactly the same as using an assembler like MASM. You shouldn’t get your panties in such a bunch, dude. That’s uncomfortable.

        • Christian Heilmann

          If you are a developer, why would you ever think in such black and white concepts? Nobody claims you should never use third party code. It becomes tricky when you have no clue what it does.

    • disqus_8NvNH4baa0

      I’m upvoting not because I think your facetiousness is clever, but because I’d really like to see it happen.

    • Christian Heilmann

      As someone who wrote assembler for years and learned to work in fixed environments that I couldn’t change, this made me a more humble and organised developer. So yes, I think it is an interesting skill to have.

    • Christian Heilmann

      As someone who wrote assembler for years and learned to work in fixed environments that I couldn’t change, this made me a more humble and organised developer. So yes, I think it is an interesting skill to have.

  • Timothy Harrington

    I laughed out loud when I read what a Full Stack Overflow developer was, and I bet many other readers did too – we all have done that from time to time. It might not be pretty, but it is quick, and it is easy. It gets us moving forward again in our project. Having said that, I feel that one of the ways to improve over pure copy and paste is to type it all out yourself, not copy and paste it in. That way you’ve familiarized yourself with the code, and even if you dont fully understand what it is doing, you have a better understanding of the structure and the functionality than if you’ve just “crtl-c / ctrl-v”-ed it. This is why most programming educational/tutorial books tell the reader to TYPE out the code rather than copy and paste it into their editors. I don’t want to recreate functionality that already exists – that is what libraries and code samples are for – but, at the very least, you need to understand how they work so that you can use them effectively.

    Great article btw!

  • #VuppeForPresident!

    This is a good point. I’m learning new languages, but I don’t simply copy-paste form Stack Overflow. If I’m stuck on something, yeah, I Bing it, but I don’t copy-paste code unless I understand what it does. If I don’t understand it, I research it.

    Like, yesterday, I used a ternary operator for the first time. It just had never come up. I Bing’d it, ended up on Stack Overflow and was like, oh, cool, that makes sense. So I wrote it and BAM. Fixed a major bug from someone else’s code in 2 minutes.

  • PeterF

    You could ask the same question about any kind of engineering. How much does the engineer need to know about the underlying science, to be a good engineer? Good engineers make sturdy things that work well. That is the focus of good engineering. In software development, that means having a solid test and build process, which will eventually crush code that’s been patched together by someone who does not understand what is going on. Understanding the underlying theory and mechanics is important because one cannot engineer without understanding to some extent. However, that study should not interfere with the focus of good engineering. Good, professional engineers are good at maintaining this balance and strive to continually learn in order to enhance their engineering effectiveness.

  • disqus_8NvNH4baa0

    The part of this that disturbs me, is when the questioner doesn’t even ask for understanding, they actually ask for someone else to give them the code. They are taking up a seat that someone who is more qualified should be occupying, sometimes a citizen, instead of an H1B or whatever it’s called. I see folks rail about immigrants willing to do work they wouldn’t touch, but let pass the displacement of their own fellows. There’s a chasm between finishing on deadline and what that deadline should really be, and it comes from a lack of understanding from both these SODs and management. I really hope they keep doing it, though. It will lead to payback for the ignorance and disregard of reason, when they can’t fix it.

  • M S i N Lund

    …but what if i want to subtract instead, then what do i put instead of alert(1+1); ?
    Please help, i promised my boss that i would have the calculator-webapp finished by morning!

  • Skane

    I think developers are way too concerned about how other people in the field conduct themselves. If you don’t want others to cut and paste your code, why post it? If you think it’s a dumb or inappropriate question, why not ignore it? I think you’d have to go to the World Wrestling Federation to find people who talk more trash about their “fellows” than members of the software development profession.

  • Ruth

    Agree with a few things here – 1. Sometimes you are in a bind and need to figure out what exactly it is you’re not seeing, and you need to see it NOW. You google it, and SO comes up so you try it. If you don’t mind maybe getting your head bit off, or someone posting something like “why would you ever use x, y, z…” instead of helping – then you’re ahead of the game on that day. 2. I’ve never gotten anything off there that didn’t need to be tweaked to my specific situation. In a related number – 3. That happens to be how I learn best, by doing it. Are there people out there who have no clue how to write code who just copy and paste? I’m sure there are, and they probably ‘build’ websites in WordPress too. Personally, I like to learn whatever the current techniques are, and I am well past the point of going to school to ‘learn’. I learn by doing. By finding out the solution to my needs. SO is extremely titsy and b*tchy, but I have gotten some help there – and I’m not going to apologize for it. They don’t.

  • H.M. Müller

    You might not know it – but the engineers of that bridge DID understand the science of their field pretty well. The problem was that that science had not advanced to the point of understanding this special type of oscillation.

  • Husain Ahmmed

    Good point.

  • wyattb

    Another shameless plug for Microsoft only platforms. This whole site seems to be owned by M$ and comments are mostly M$ employees. This page should be labeled at the top as Advertisement. Shame on you Sitepoint.

  • wyattb

    Another shameless plug for Microsoft only platforms. This whole site seems to be owned by M$ and comments are mostly M$ employees. This page should be labeled at the top as Advertisement. Shame on you Sitepoint.

  • Osazeme Usen

    Code has gotten so complex, its impossible to have all the answers at the back of your palm. Sometimes I go back to past code on how I solved a particular problem in a codebase I authored. This doesn’t mean I didn’t solve it, it just makes anyone see how hard and vast programming can get.
    Poets, novel writers and orators use thesaurus and we don’t bite them for looking up synonyms and antonyms from a book. I wonder what is expected of programmers!! Is this realistic??

  • lancsDavid

    clients don’t pay developers to understand; they pay them to produce. this is the primary dynamic, is it not?

    personally, i would love to understand more. & i would love super-efficient & super-high-quality training materials to appear that produce understanding in human minds very quickly (hopefully these will come eventually)

    having said all that, the site i’ve just worked on was built by a doctor who taught himself programming. & as much as this has been an achievement for him, EVERYTHING is completely ‘custom’ (ie: ramshackle). no amount of training or understanding could possibly prepare you for working with it. only painful trial & error

Recommended
Sponsors
Get the latest in Front-end, once a week, for free.