News for hackers. Stuff that matters.
Re:Coding is boring, unless by ggambetta on Sunday November 29, 2015 @08:54AM (#10644563)
> Because 50% of my code (hyperbole intended!) was a direct copy/paste of Stack Overflow. And another 40% was a copy/paste from other scripts. Either my colleagues’ scripts or my own. It became repetitive. And there was little creativity or learning involved.

How is this even possible? I've never had a job where copying and pasting code would have helped. It blows my mind every time I read this kind of claim, to the point that I sort of refuse to believe it's true. Are there people who get paid to do things that simple that they can be copied and pasted from Stack Overflow?

Re:Coding is boring, unless by TeMPOraL on Sunday November 29, 2015 @09:47AM (#10644693)
I would not be surprised to learn that a codebase is 20-50% made of stuff literally copied from SO (with occasional variable name change). Why? Because most work is not that unique. Rare are the jobs where you're building something new in software; usually it's solving slight variations of the same business problem.

In particular, people copy-paste a lot of JS from SO, and again, it's no surprise. Most of the web development isn't done by superstar sexy rocketship startups on the bleeding edge of Node.js ecosystem - it's done by small companies employing barely competent programmers, and it doesn't require any innovation. It's just taking the same components everybody uses, configuring them in the same way everyone configures, and wiring them together in the same way everyone does.

Re:Coding is boring, unless by nickpsecurity on Sunday November 29, 2015 @06:26PM (#10646608)
This was true way back when people were trying frame-based programming, 4GL's, etc. The same general components could often get the job done. So, the tools made that easy to express along with code generators to turn them into 3GL code (eg C, COBOL) specialized for the task. Both vendors and businesses developed an assortment of reusable components that became a selling point in time saving.

Repeated again in past 10 years with OOP, SOA, micro-services, and so on. Applies to configurations and admin scripts, too, not just code.

Re:Coding is boring, unless by gotchange on Sunday November 29, 2015 @09:12AM (#10644601)
It always amazes me that there are people out there willing to hire and pay full these type of workers who scour SO for answers without working hard on the problem and expanding their knowledge and expertise in the process.

No wonder that our field and profession is suffering from bad image and quality problem when so-called pros copy and paste all the time on the job.

Re:Coding is boring, unless by sohcahtoa on Sunday November 29, 2015 @09:29AM (#10644645)
I think there are two ways to view what the job most programmers do is. IMO it isn't to write code, it's to solve business problems. Code just happens to be the tool that you use to do that, most of the time.

Anyone who tries to solve a problem by staring hard at a blank piece of paper instead of just googling the answer is not making effective use of their time.

Re:Coding is boring, unless by ryandrake on Sunday November 29, 2015 @09:51AM (#10644698)
Exactly, and most business problems are not all that unique. User input from form X goes to storage Y, output in report Z. There, I bet I've described, in a very high level summary, at least 50% of programming projects out there in one sentence. SO is a valuable resource because all these wheels need to get re-invented over and over everywhere. Unless you're lucky enough to be working on an inventive project at an inventive company, programming tends to be like plumbing: run this pipe from the source here, through that wall, to the sink there.
Re:Coding is boring, unless by babuskov on Sunday November 29, 2015 @06:44PM (#10646693)
100% of programming projects involve transforming inputs into outputs ;)
Re:Coding is boring, unless by lubonay on Sunday November 29, 2015 @09:37AM (#10644657)
You are missing the forest for the trees. Reaching for Google and SO as your first impulse when confronted with a problem will deteriorate your ability to find your own solutions in the long run. Use it or lose it, as they say. And besides, any non-trivial problem can't be solved by copying code from SO alone.
Re:Coding is boring, unless by TeMPOraL on Sunday November 29, 2015 @09:39AM (#10644666)
Most companies don't solve non-trivial problems. For instance, 90% of web development is regurgitating the same CRUD for different customers. Most of the work consists of wiring standard components together in a standard way, and slapping some CSS on top of it. If you're trying to think too much and reinvent too much, you'll waste a lot of time.

Source: did too much webdev in my life already, and wasted way too much time doing things by myself.

Re:Coding is boring, unless by gotchange on Sunday November 29, 2015 @09:52AM (#10644702)
> For instance, 90% of web development is regurgitating the same CRUD for different customers.

Maybe on the face of it, it looks like this to you but in reality it's bit complicated esp if you're aiming for more differentiation from your competition but if you're looking for just cookie-cutter, run-of-the-mill, copycat solutions, then all the products on the market definitely look the same.

Re:Coding is boring, unless by babuskov on Sunday November 29, 2015 @06:47PM (#10646707)
You are both right. 90% of the websites on the Internet do look the same. You only have 10% (probably even less) products that are special and noteworthy.
Re:Coding is boring, unless by nommm-nommm on Sunday November 29, 2015 @11:29AM (#10645009)
I do webdev and I solve real and unique business problems. The web is just a convenient frontend for our users. Our backend has complicated data processing and solves unique problems. I know you said most and not all but just giving a counter example.
Re:Coding is boring, unless by nickpsecurity on Sunday November 29, 2015 @06:30PM (#10646619)
It's not really a counter example because TeMPOraL's claim applied to the majority. Following the resulting advice of using whatever gets the job done quickly (eg copy/paste) will pay off for the vast majority of developers in that space. Your example is a red herring here as the comment just wasn't about the minority doing original stuff.

Good for you that you ended up in one of those positions, though. Probably enjoy your job more. :)

Re:Coding is boring, unless by nommm-nommm on Monday November 30, 2015 @11:02AM (#10650042)
I don't think its the majority outside of Silicon Valley though. I am very far removed from the Valley so the examples given look nothing like I've personally seen anywhere but I can see how that can be the case in the Valley from what I hear/see in the "news."

I've personally never seen anything that can be described as "regurgitating the same CRUD for different customers" in my career as a webdev and certainly not 90%. There is of course wiring standard components together but that's surface level stuff, the guts are not standard components.

That's just my experiences for what it's worth.

And, yes, I'm very blessed to enjoy my job and believe me I don't take that for granted.

Going back in the thread I honestly don't think that reaching for Google and SO as your first impulse will deteriorate your ability to find your own solutions in the long run. Not by itself anyways. If the problem is standard then those are not problems you should be implementing your own solutions for anyways and Google/SO are great for finding answers to standard problems. Copy-pasta is great for syntax and boilerplate code.

If the problem is not standard I learn from Google, I don't just copy-pasta, I look at how other people have solved similar problems and use that as a basis of creating a new solution.

I can see how people who don't want (or can't) think for themselves can fall into the copy-pasta whatever they happen find without truly understanding. In that case Google/SO isn't the problem - it just makes the problem more visible. These people will never be good engineers.

Re:Coding is boring, unless by nickpsecurity on Monday November 30, 2015 @01:47PM (#10650951)
"I don't think its the majority outside of Silicon Valley though. I am very far removed from the Valley so the examples given look nothing like I've personally seen anywhere but I can see how that can be the case in the Valley from what I hear/see in the "news.""

Whereas I hadn't heard of the problem in the Valley as they're always riding one wave or fad after another. The people that report the issues I described are almost exclusively outside the Valley or startup scene mostly working for mid-sized to large companies without much IT innovation. Reading comments on many programming and job sites makes me think they're the majority (or just vocal majority).

Might be different in your area or the types of companies you work for. Most I know in banking, retail, logistics, manufacturing, hospitality, and services firms... a huge chunk of job market... do CRUD style apps and have lots of legacy systems they expand on rather than replace. Lots of boring work.

Does vary by industry, area, and technology stack, though. Interesting to see yours is mostly interesting, custom code instead of throw-together apps many get stuck with. Honestly, though, I think the SO use is less about CRUD than the information overload of various libraries and frameworks where people constantly run into issues due to lack of understanding/experience.

Re:Coding is boring, unless by varelse on Sunday November 29, 2015 @11:41AM (#10645063)
Grabbing quick and easy answers from the Google and SO leaves me more time for the really interesting problems in my experience so far. And it's the really interesting problems that make writing bespoke C/GPU kernels worth the time involved in their creation so double-good, no?

To be fair, sometimes I try to solve problems for an hour or so before going to the Google or SO, and when I find I derived roughly the same approach, I consider it a done-deal that it's probably the right way to solve the problem at hand.

I would love to see a coding interview where the interviewee has access to Google/SO. It's a far more realistic portrayal of their on the job capabilities IMO. It would also force interviewers to come up with more interesting questions.

Re:Coding is boring, unless by nodamage on Sunday November 29, 2015 @02:53PM (#10645811)
Disagree. My time is valuable, and I already have enough difficult problems to solve that I'm not interested in creating extra work for myself. If a quick 2-second Google/StackOverflow search reveals the solution to my problem, I'll happily take it and move on.

I don't understand why anyone wouldn't start with that. Pride?

Re:Coding is boring, unless by gotchange on Sunday November 29, 2015 @09:44AM (#10644683)
> Use it or lose it

No pain, no gain.

Re:Coding is boring, unless by TeMPOraL on Sunday November 29, 2015 @09:37AM (#10644656)
Indeed. Some would call it lazy - I prefer "leveraging the combined knowledge and experience of all humanity".
Re:Coding is boring, unless by Bahamut on Sunday November 29, 2015 @09:38AM (#10644663)
It depends on the problems you're solving - SO does not help with problems of architecture. For code structuring, staring hard at a sheet of paper or nothingness can absolutely be more effective.
Re:Coding is boring, unless by sohcahtoa on Sunday November 29, 2015 @09:40AM (#10644669)
Can't argue with that. Although I do think architecture is where patterns start to be useful - again, relying on pre-existing solutions rather than creating your own.
Re:Coding is boring, unless by aninhumer on Sunday November 29, 2015 @09:39AM (#10644667)
Of course, but anyone who tries to solve a problem by copying the first piece of code they find on SO without even trying to understand the problem is likely to be similarly ineffective in the long term.
Re:Coding is boring, unless by moron4hire on Sunday November 29, 2015 @09:44AM (#10644684)
If a business problem can be solved by copy-pasta, then it's a common business problem and copy-pasta hasn't really solved it.
Re:Coding is boring, unless by gotchange on Sunday November 29, 2015 @09:42AM (#10644672)
Technical workers solve technical problems not business problems. Upper management folks instead solve business problems. Our job as techies is to model/define the business problem in technical terms and then work on it. That's why they pay us and if some are not competent or proficient enough with their tech tools, that will reflect poorly on the quality of their finished product and copying and pasting won't always save the day for them. Also and this is very important, if they would like to grow professionally, they ought to work on their own and develop their skills organically or fear that they'll be stuck forever in the "apprentice" level for their whole career.
Re:Coding is boring, unless by walshemj on Sunday November 29, 2015 @10:33AM (#10644813)
Sorry you are totally wrong here
Re:Coding is boring, unless by amyjess on Sunday November 29, 2015 @01:12PM (#10645455)
You would probably be horrified to find out that doctors diagnose most common illnesses by looking symptoms up in their med school textbooks. The more tech-savvy doctors now use WebMD.

Or by how most family lawyers do 90% of their work by entering names, etc. into a Word template that was written years ago. Getting my will written was an eye-opening experience: I told my lawyer who I wanted my property going to, who I want it going to if my first choice predeceased me, and who I didn't want my property going to, and he just typed a bunch of names into his template, hit "print", and called a couple of witnesses and a notary into the room so we could all sign it. My living will was even simpler: I told him I wanted one, so he just typed my name into his template and had it printed and signed just like my regular will.

From the customer's perspective, what matters is that their problem gets solved, not how it gets solved.

Re:Coding is boring, unless by ryandrake on Sunday November 29, 2015 @10:31AM (#10644810)
Why? Do you get more sales or market share if your engineers are sitting there working hard on inventing wheels that are one Google search away?

You're the manager. The engineers on your team have 20 or so tasks to do, rote, boring stuff, such as "serialize object X to JSON" and "send serialized stream to server Y". Would you rather your team 1. take a day or so to "work real hard" re-implementing JSON serialization, or 2. just copy/paste something already working, spend an hour or so adapting it to the project, then move on to the next task?

Re:Coding is boring, unless by abdulhaq on Sunday November 29, 2015 @09:15AM (#10644606)
When the deadline is tight and you don't have to debug the bluetooth stack to see why it doesn't work on Samsung XYZ on Android ABC, then SO is a godsend.
Re:Coding is boring, unless by superplussed on Sunday November 29, 2015 @09:06AM (#10644588)
For the first year or so of learning Ruby and Rails, I did end up copying and pasting alot from SO. In fact, I think I had a streak of visiting SO every day for at least a year, and that wasn't idle browsing, that was "Oh shit I'm stuck, better hit up SO".

So now when I hear claims like this, I just assume it's coming from someone that is new enough to a specific technology that relying on SO is necessary for them.

Re:Coding is boring, unless by gotchange on Sunday November 29, 2015 @09:27AM (#10644636)
I rarely visited SO for answers and I went through the novice phase like everyone else but I didn't pick the path of least resistance every time I'm faced with a technical problem, because I have a held belief that you can't accumulate knowledge and expertise if you don't polish your debugging/troubleshooting skills and make yourself go through the painful process of solving technical problems on your own without the help of someone else and I could say that help very much in honing my skills.
Re:Coding is boring, unless by jgh on Sunday November 29, 2015 @11:28AM (#10645006)
This thread is killing me. I have worked on a whole bunch of shit that has little to no documentation (SO included) in my career. I have had to figure out a lot of stuff on my own.

SO is amazing when it has information that I'm looking for. You know why? I don't want to have to figure out literally everything. I want to save my figuring energy for tasks worth applying it to.

So just get the fuckin' job done and do it right and quit pretending you're trying to achieve nirvana.

Re:Coding is boring, unless by _up on Sunday November 29, 2015 @12:39PM (#10645321)
If you write a paper you also first cite what is state of the art. Before you go into details what Innovation you came up with. So researching SO first, before reinventing the Wheel. Resembles more the scientific way of problem solving. You can also learn a lot by reading and understanding all the different solutions that are often given to a Problem. Your time is better used if you solve new problems or find a better solutions than reinventing the wheel and you also learn as much if not more.
Re:Coding is boring, unless by Scarblac on Sunday November 29, 2015 @02:11PM (#10645638)
It's hard to argue much about this because nobody so far said what kind of problem we're trying to solve.

But I feel the first step should be going to the documentation of whatever language or library you're using, rather than Stack Overflow. SO will tell you the answer to a single question, the docs usually give some more information (you don't get "use this option", but "here are the options and this is what they do") so the chance is higher that next time, you'll just know the answer.

Of course when inexplicable things happen or when docs are bad, SO can be pure gold.

Re:Coding is boring, unless by zo1 on Sunday November 29, 2015 @04:54PM (#10646248)
You of course don't want to go to SO for the "skill" of programming, you probably already know to do that as that is your craft. You go to SO for domain knowledge that you don't want to spend time scouring documentation for.

SO is a unique combination of framework docs and practical examples. Inevitably you'll find sample usages of the framework or domain knowledge, applied to a problem similar to the one you have and can apply easily using the "skill" or craft of programming.

Other than that, it's pretty much CRUD and algorithms that a developer has to do. And the latter of those is sadly not needed for most development work out there.

Re:Coding is boring, unless by FLUX-YOU on Sunday November 29, 2015 @09:29AM (#10644644)
>Are there people who get paid to do things that simple that they can be copied and pasted from Stack Overflow?

Yes, because the reality is that someone has to do it, and a half-assed effort from a developer browsing SO is still better than getting a random Joe off of the street for $10/hr to try it.

Not all companies have interesting problems to solve 100% of the time. It's not impossible that your company is trying to solve a problem that the majority of SO questions will answer, because your problem is just that boring.

If that blows your mind, you should know there are people that get paid well to do stuff that is a lot more simple than even cobbling scripts together from the internet.

Re:Coding is boring, unless by bluedino on Sunday November 29, 2015 @04:18PM (#10646114)
>> Are there people who get paid to do things that simple that they can be copied and pasted from Stack Overflow?

Have you been on SO?

Re:Coding is boring, unless by babuskov on Sunday November 29, 2015 @06:40PM (#10646674)
SO had a great year 1, and maybe year 2. You know, when real questions were asked.

Now you have beginners asking so simple questions it's both funny and tragic at the same time.

Here's the first question in the list when I opened the site today:

http://stackoverflow.com/questions/33989450/mysql-joins-on-t...

Yeah. That guy is one of those who just ask others how to to their job and then copy/paste it.

Who answers such questions? I have no idea. Probably the guys who are just a step above on the knowledge curve. They probably hang around to ask their own questions, and also find such questions challenging enough to bother providing an answer.

Re:Coding is boring, unless by rorykoehler on Monday November 30, 2015 @05:09PM (#10652257)
It's a platform for learning. The asker is a beginner. There is nothing wrong with that and someone asking with the intention of learning should never be looked down upon. If you find it so easy why are you even looking at that question? Your google-fu is sub-optimal?
Re:Coding is boring, unless by babuskov on Tuesday December 01, 2015 @01:12AM (#10653908)
I'm not looking down on anything or anyone. I'm just analyzing the state of SO today versus the first few years when it started.

As for the question, you obviously didn't read what I wrote carefully. I get served a full page of such questions every time I open the site. Finding an interesting question has became a tedious job and that's why I don't even bother to visit the site anymore.

Once again, I'm not even sorry about that. It freed a lot of my time - I rarely visit the site, but I'm still ranked in top 2% users, so you can guess how active I was before.

Re:Coding is boring, unless by rorykoehler on Tuesday December 01, 2015 @08:41AM (#10655189)
Fair enough. I find it a godsend. Nothing wrong with copy paste if it brings you forward faster and you take time to understand why it works. For architecture etc it's pretty useless but for the rest it is a very helpful tool.
Re:Coding is boring, unless by VLM on Sunday November 29, 2015 @09:41AM (#10644670)
Something no other commenters mentioned (so far) is every programming book starts out with "hello world" and this spread online not just to generic language teaching but into APIs and libraries.

Bootstrapping up from hello world is nearly guaranteed to work, write the entire thing first then try it is a recipe for pain.

Re:Coding is boring, unless by lordnacho on Sunday November 29, 2015 @10:26AM (#10644799)
If what you're building is pretty standard, it might work, especially if there's no performance element. Web type stuff can often be "take this widget and glue it to this page" in which case it's almost directly from SO.

Pretty much everything I do requires parts that came from SO, but it's more like I get a bunch of puzzle pieces and then think about a smart way to assemble the big picture.

Then there's the profiling and arrangement that only makes sense on my particular codebase. No way to SO that.

Re:Coding is boring, unless by DennisP on Sunday November 29, 2015 @09:16AM (#10644607)
Probably because they're just manipulating some crappy, inconsistent API, or a buggy library. Nothing to figure out, just have to find the incantation that works.
Re:Coding is boring, unless by jgh on Sunday November 29, 2015 @09:05AM (#10644586)
He pointed out that it's a hyperbole.
Re:Coding is boring, unless by purpled_haze on Sunday November 29, 2015 @09:23AM (#10644617)
It is and yet it's not.

If you think about it, most of the code we benefit from each day was written by someone else from the operating system, to the language compiler/interpreter, to the frameworks, libraries, etc.

Many developers get their queues about how to use a language, framework, library, or application because they learned how to use it on StackOverflow.

Do you really know how much code was written to get to the point where you are sitting there, using all of the benefits of past coding, much of it thrown away to make way for other code for better or worse? All of that code is likely far beyond 50% of what your company has written.

Re:Coding is boring, unless by laxatives on Sunday November 29, 2015 @03:44PM (#10645997)
Sounds like many coders from out outside the US and went to a for-profit MS program.