I want your opinions on what's more educational in the long run for someone's development as a programmer. Is it more educational to spend 5 hours on a problem and figure it out yourself or spend 10 minutes on it with the help of searching for a solution to a problem? Give us your reasoning.
Keep in mind, the constraints here are: Better for the personal development of the programmer, not finishing the project or meeting any deadlines.
I'll give 2 initial reasonings that I've thought of:
In support of struggling - helps to develop problem solving skills and iron out deficiencies and weaknesses.
In support of searching - Could open up a new way to facing a problem that you have not thought of which could put a new tool in your box for the future.
I always Googled it. Depending on the problem, that eventually taught me that it's sometimes best to just check the docs first. Now my method is to check the docs first. If I want more information and it's on GitHub then I search for issues. I have learned a ton from reading GitHub issue threads, some of the best and brightest developers explain their thought processes for figuring out these problems and I get to learn from them for free!
I normally think of the tools and steps needed for my problem and then Google the exact method names or how they should be used. I think in some cases where you have a problem that's unique to your app, it makes sense to try it out yourself, but as a reasonably experience developer it mainly costs time, since you'll most likely be familiar with the general concept and are just looking for the best solution in terms of performance or readability. Also, I'm pretty sure that when I first started out, I did a lot of things without knowing how they work, but it was fun and that kept me learning and eventually I figured out what I was doing. If I had tried to understand everything and not just googled for things of all kinds, I'm sure I'd have quit programming long ago.
Google! There's always someone out there smarter than you who will have written a better function/code that you could have done or approached it from a different perspective.
Plus if you google you invariably end up learning new stuff and you might realise the function you were trying to remember has now been deprecated and you get a nice shiny new one in its place, or you might find the function that would solve all your problems is in the latest release of your language and so it's time to upgrade.
Depending on the problem, you may only get part of your solution from googling but it might be enough to send you on the right path.
If you're a good developer then you'll understand how someone has arrived at a solution or you'll strive to get some understanding of it. You'll also be able to weed out the bad solutions.
You'll also finish your code quicker than struggling for five hours and make yourself look like a genius to your boss :)
At first Googling a solution is the easier way to go. However when you have larger more complex problems, the only way to learn is to struggle a bit. But don't struggle to the point to total frustration! Ask someone else for a second opinion and explain you problem and plan for a solution out loud. Many times you'll realize what you'd been missing simply by having to talk out load so someone else understands.
Struggle first but with a reasonable time constraint for the problem and level of expertise depending on the importance of learning the actual problem. I would think most people find the 'quickest' or 'first' solution and stop there. The problem with struggling to find an answer to a solution is that it will not necessarily be the 'best' one or fit the standard of programming in a particular project. I may struggle and find a way to solve a problem, but that doesn't mean it's the most secure, fastest, most reliable, modular etc. How long will it take a developer to 'unlearn' mistakes they taught themselves solving a problem? This is a common in many DIY circles.
So I think googling should be about 'how to solve the problem' so that the process can be used for similar situations in the future. There are times when documentation is minimal or examples are poor so googling is a must just to learn how a language or framework even works. I have googled problems that we already solved just to see if the convention has changed since the original implementation of code.
A reason to google over struggling is if it is more important to solve the problem than the likelihood of the programmer using the language again. I knew a project that was written in PERL. Ultimately it will be replaced and may only have updates every now and then. It's not worth a developer spending all their time learning how to use the language and it's quirks if a simple update can be found by googling and the majority of their time will be in other languages. In this case, is it more important that a programmer learn PERL or good time management? Both are useful to the programmer but time management will probably be more useful in future projects and in personal development.
I understand the important option is to struggle. But I need to solve the difficulty with the help from many developers. Sometimes I am easy to run into the wrong direction. Actually, we are better to absorb the distillate of the solution from others.
Nice question. One thing that annoys me a lot is the legion of developers who never try to solve sth on their own but dive asap into StackOverflow searching for hours to copy & paste sth fast. I think these guys are mostly the ones who started making a living out of coding during last 3-4 years. Guys please stop doing this and spend at least some time to try things in your own. It is part of the process to become better and stronger. How are you going to learn things or understand the deeper meaning if you are doing mostly copy & paste? Ha?
I don't say i haven't done it. I 'd be a huge liar. But i see this ugly phenomenon quite a lot recently so my proposal is yes search but first play a little with your code, make your hands dirty, try things and fail. It is good to fail so that you can grasp the hidden truth behind some funcs, understand how things work, question yourself and i am sure you will realize fast that you miss even more. This process will make you hell better and hell faster.
If you don't do this you are doomed to stay at the same level as a developer and since things change quite rapidly, i am afraid that this will cost you a lot down the road.
I am a self taught developer. I learned Javascript, jQuery, PHP (basics + Laravel), RubyOnRails (basics ) using online video tutorials and blogs.
Google, YouTube, StackOverflow are my lifelines.
I don't know how struggle works without google ? I cannot seat idle and look at my code, then refer some PDF docs for a reference, and make thousand of attempt to fix that issue.
Instead I'll go through StackOverflow, Github issues or some blog post to fix that. This process can take 2 mins to several hours and in the process I may learn few more things which I was neglecting. These things have improved my coding.
I wonder if you don't google, how'll you find Node, Python, Ruby plugins. Should we have an encyclopedia for that or will it be wise to build that thing from scratch ?
I hear and I forget.
I see and I remember.
I do and I understand.
Confucius
Cheers !
Google it, but spend some time trying to understand the fix, this way you do both things, delivering the feature and grow up professionally
After trying to figure out a balance between the two for almost a year, I have started using a simple time bound technique. Whenever I am faced with a new problem I try to come up with my own solution for max 20-25mins. If I am not able to come up with a solution I seek help of google or stackoverflow and if I am able to come up with a solution I still google or go to stackoverflow for checking whether a better solution exists. This not only helps me develop my problem solving skills but also helps me to come up with efficient solutions faster. Now the reason to keep the time to 20-25 mins is because I work as software engineer in the industry and not just as programmer or developer and a critical aspect of software engineering is to finish your projects within set deadlines in the most optimum way possible.Now this time limit might not be the best one for each purpose but we can set our own based on our field of work.
Initially as a junior developer I used to spend a lot of hours trying to solve problems myself and sometimes that used to create hurdles in project life cycle. Gradually I realized that pondering over minute problems for such a long time might not always be useful and eventually I started working in a time bound manner which greatly increased my focus and sort of gamified my daily coding activity by slowly trying to reduce that time limit every time.
Always struggle first (unless it is something you know and have forgotten!) but put a time limit on it - 5 hours is too much to spend on anything! Quite often, if you can't find the answer to a problem within a reasonable amount of time you are asking the wrong question. Searching for other people's struggles and solutions will not only help you find the answer but can also reframe the question to enable you to find your own path forward.
I'd say both based on how long you've been a developer. If your just starting out - yes, try to figure it out. You'll build problem solving skills and appreciate learning something more then someone just giving you an answer.
Once your seasoned / experienced - yes, go for Google. Deadlines need to be met and stuff needs to get done. Understand the solution given to you by others and don't just copy and paste code from SO or here, but if it's waste 5 hours early in a project or Google for 30 seconds and move on - Google and move on. If you can, go back later and understand why the solution was given and why it worked.
Me, personally, if I'm going to Google, it's usually cause I've forgotten a specific function / method or I've become code blind and having a syntax error and I need verification that what I'm trying to do is actually the right way to do it.
It depends on the deadline.
id say a little of both. try solving it your way first, and after you have failed a few times, go check out the ways that other people have solved the problem.
Saurabh Mhatre
Web and hybrid applications developer
Maximilian Berkmann
Web and programming
I would say both because, if you try to figure out the problem yourself first. You'll improve your problem solving skills by trying out things and learning what works and what doesn't (or/and what doesn't really work). If after a while you can't find anything that works then Google it so that you can see if your solutions were close to the correct one(s) and also try to find more ways to solve a problem.
It's like in an assignment/exam where you're facing a question you don't really know, if you try solving it with your own solutions and fail, you'll learn that those solutions doesn't work in the aspects they failed and then check the solution to see how close one of your solutions was to it and what you did wrong.
Just like one of the proverb says: