5 ms·
Programmer problem solving sequence: should it be like this?
- bigethan 15y agoWhy does using google and stackoverflow get a negative connotation? There's a collection of information on a topic that's larger than any other collection in the history of mankind, and we can search it in minutes. Why shouldn't that be the first option? And those solutions certainly don't preclude the "think" option, they augment it (Also, I've already RTFM).
- epenn 15y agotl;dr of my post: Thinking through a problem and not going to the web first makes you a better programmer, instead of relying on the better programming of others. The negative connotation depends on what you're using google and stackoverflow for. If you need to understand something that can't be directly reasoned through to come to an answer (random example: you need a description for an API call in some public web service) then there's nothing wrong with google, stackoverflow, etc being your first choice in search for your solution. However, if it's a problem that -can- be directly reasoned through (random examples: any application logic issue, determining a regex to match a specific pattern, tree traversal issues, etc, etc) then your first choice should be to try to figure it out yourself before turning to the web. The rationale is twofold. 1) With enough practice, you'll often find you can solve your own issues faster than you can dig through websites trying to find someone else who has done the same. 2) Even if you ultimately can't find a solution on your own, attempting will at least exercise your brain and give you more experience, which feeds back into #1. Another way of stating the rationale is that it helps to prevent cargo cult programming (see: http://en.wikipedia.org/wiki/Cargo_cult_programming http://en.wikipedia.org/wiki/Cargo_cult_programming). Even if you can't come up with a solution, or even if your solution is less than optimal, attempting to come up with your own answer first gives you a much better chance of understanding the underlying principles involved in the solution that google, stackoverflow, etc give you. That will minimize the chances that you apply the solution in a half-assed way that just causes you more problems down the road because you didn't fully understand its implications. It will help you in the long run.
- adestefan 15y ago> And those solutions certainly don't preclude the "think" option, they augment it (Also, I've already RTFM). Most people don't do these steps at all anymore.
- hopeless 15y agoThis is nonsense: 90% of the time the problem exists in your code and no amount of Googling or Stackoverflow questions are going to help with that!
- pavel_lishin 15y agoTrue, but you often don't realize that until you've exhausted Google and StackOverflow.
- georgieporgie 15y agoThis is too vague to be meaningful. You shouldn't hesitate to consult your coworkers for advice on a problem. If the problem is external, they may have wisdom and feedback on, for example, what library works best. If the problem is internal, they may spot your coding error in five minutes that you've been blind to for two days. Should you make your coworkers and Stackoverflow users solve all of your problems for you? No. Should we repeatedly categorically demonize these excellent resources, thereby instilling an irrational fear of using them in new developers? No! I've seen more problems caused by prideful programmers who refuse to consult with coworkers and consider their input. Furthermore, the people who have complained the most about being pestered by others were the ones who wrote the convoluted, undocumented mess that everyone else was stuck maintaining.
- JonnieCache 15y agoI certainly see a significant number of people on IRC asking questions that could be typed verbatim into google to get a better answer. I guess some people just want/need to avoid as much thought as possible.
- civilian 15y agoOkay, so, sometimes I do this. Not with IRC specifically, but in person or over IM with other humans. Sometimes I want to talk to a someone, and I feel like an active listener will be much better at explaining the whole picture and answering my follow-up questions. Or I want to start a discussion around the issue. Hopefully you don't do this, but I think that linking people to http://justfuckinggoogleit.com/ http://justfuckinggoogleit.com/ is anti-social and is bad for any community.
- JonnieCache 15y agoI don't think anyone is going to think less of you for going to real people with your problems. It's specifically when people go into a channel full of strangers and ask things like "how can I do a find with a many to many in rails" that I'm talking about. I guess it's the sense of entitlement that's annoying. Why would you expect strangers to help you when you can't even be bothered to state the question in a way that would make things easy for them? I realise english isn't everyone's first language, but I have seen people who speak very broken english take great pains to explain their problems clearly as best they can, it isn't an excuse. And no, I don't ever get snarky. People with stupid questions should get ignored at worst. In these cases, the questions are usually so trivial that being convincingly rude would take more effort than just solving the problem. This is a better link to post in these situations: http://catb.org/~esr/faqs/smart-questions.html http://catb.org/~esr/faqs/smart-questions.html In fact, the bot in #rubyonrails cites this link when prompted with !ask
- synnik 15y agoWhether or not this is good or bad depends on how experienced you are -- On a platform I have been using for years, in which I have expertise... this would be a tragedy. But, as an example, I just picked up rails 2 weeks ago, and have written a fairly complex app with it. I google quite a bit, not as a crutch to thinking, but to gain insights from people who know the platform better than I. Each new component I need for my app instigates some research to see how other people have done it. I do not copy and paste the results... I analyze and critique them for my own purposes. The next time I need a similar function, I think for myself. Over time, I become an expert and no longer need Google to get a project done.
- nandemo 15y agoMost of the time, I'd rather hit StackOverflow than interrupt a coworker. Apart from that this solving sequence is on the spot, even though the author is apparently critical of it. For the record, I started programming in the early 90s, before I had access to the internet. Here's a message that I got while doing some Haskell code. If I were to RTFM first, i.e. read the Haskell Report, it would take me perhaps more than 1 hour to understand the problem. If I google it I will be able to understand the general idea and decide between the compiler's suggestions in a couple of minutes. I can always go back to the specification later to acquire a more solid understanding of the language. Ambiguous type variable `a' in the constraint: `Show a' arising from a use of `show' at ParseQuote.hs:123:11-16 Possible cause: the monomorphism restriction applied to the following: f2 :: a -> String (bound at Foo.hs:123:0) Probable fix: give these definition(s) an explicit type signature or use -XNoMonomorphismRestriction