I get depressed when I see so many good programmers answering other's easily googlable answers, and writing code for them.
You may think they're easily Google-able, but that isn't often the case. A common problem when getting started is knowing what to look for. Without a vocabulary around building software, it's hard to know how to get started.
For instance, I'm pretty sure it wasn't until I was learning my second or third programming language until I first heard the word "concatenate". Now if I want to learn a new language, I know to search for, "[some language] Concatenate Operator". As someone new to programming though, they're likely to search for something like, "put the text on the screen with other text in [some language]", which of course is going to yield completely useless results.
Another common problem is understanding the layers and how pieces go together. After you've built a few things, you begin to understand common patterns in architecture and can know roughly how you want to build something before you even know the language or framework you're about to work with. Someone new has to learn all of this at the same time, so they often confuse things. (Just look at how many web dev questions there are around people trying to figure out why their PHP code can't be used client-side to handle button clicks.) When you come across a question that seems high level, a proper answer is to explain the levels in things to allow them to get started and ask more specific questions.
Finally, new folks often don't know how to ask questions. Building applications is all about figuring things out... and if you can't work through a problem, you're not going to be a good developer. Asking the correct questions (whether of yourself, or of others) is part of working through a problem. If you come across a particularly bad question, by all means vote to close it but add an explanation as to why so that they have some recourse.
I mean, why do you guys do that?
I won't speak for others, but my primary reason for helping new people is that my ~3 minutes of effort can save them a day or more depending on the circumstances. When I was learning to code, I had nobody around me to help. I had no internet access. All I had were a couple of outdated generic books from the library. If I had access to resources like StackOverflow back then, I would have no doubt been much better off.
It is important for more experienced folks to help boost the community. This is a community after all, and those we help will no doubt be those who will be working on our teams in the coming years. We are all part of a continuum of folks... some are retiring, others are starting. If we don't invest time into the new generations, what will happen?
How do good programmers have this much time? You must be having a job? Or not? Is it hard to get a job for programmers?
First off, it doesn't take that much time to help someone. What I do is when I find an answer on Stack Overflow, I go and answer at least 2 or 3 questions. Often times, I'm already out-of-the-zone because I'm stuck on a problem, so spending <10 minutes on this isn't going to hurt much. It's a good use of time... sort of like investing in the community that helps me out as well.
I have a very busy day job, and I also have a mountain of side work to do that I get to when I can. But it's not just about clock-on-the-wall time. You make it sound like if I had a few more seconds in the day, I could type more or something. Sorry, but unless you're regurgitating the same stuff over and over again, your creative hours are far more important... and you'll find that you only get a couple of those hours a day anyway.
Instead of answering people's question on Stack Overflow, they can make a website for someone else as a freelancer and earn $$.
I find your viewpoint incredibly selfish... but let's go with it. You shouldn't discount the opportunities you get by participating in a community like Stack Overflow. Every job (day job or otherwise) I've had in the last 6 years was due to my participation on Stack Overflow. I once got a job because I answered a basic PHP question in a well-explained way for the CEO of a company. I had no idea he was some CEO, and frankly I wouldn't have cared anyway. But, he liked my answer and had his developer recruiters follow up with me. My current day job, the company was looking for a specific combination of skills, and my name came up for that combination and my answers were acceptable. For my own side business, I mostly do work in a specific area that interests me a great deal. I've made it a point to answer every single question in this domain on Stack Overflow. (Usually, I have the best answer. If I don't know the answer... I really should, so I work to figure it out and then I write a good answer.) This has worked out very well for me, as folks with larger needs that don't fit in a Stack Overflow question will contact me directly. If I think what they're asking could go on Stack Overflow, I ask them to post there and I answer there... so the whole community can benefit. If they're not really looking to implement everything themselves, then they hire me to do it.
I am really worried about my future as a programmer.
Given your attitude, I'd be worried about your future in any profession. Sounds like you don't really care about the long-term in your line of work. I hope my post helps you reconsider your position.
php bin/magento
tomage
to save a few keystrokes)