Can't solve problems without googling?

Started by
17 comments, last by DekuTree64 9 years, 8 months ago


You will do a lot of things wrong over your career. You will try something and it will fail. You will start down one path and realize you could have done something much better...

You'll probably also solve a problem one day and say to yourself, "Damn. Now THIS is some awesome code." Then a few years later you'll look back at that work and laugh at past-Lith for being such an ignorant newbie.

Like others have said before, you'll get better through practice. Since you're 17 and started programming a couple of years ago, I wouldn't worry too much about it. You're motivated to learn and are programming in your free time. Good job.

And one reason the solutions look easy online is because you're looking at the solution. You're not watching a video of some mathematician staring at a whiteboard for hours at a time, trying and failing a hundred different times. You get to see his nice proof on a clean sheet of paper without any scribbles or teardrop stains. :)

- Eck

EckTech Games - Games and Unity Assets I'm working on
Still Flying - My GameDev journal
The Shilwulf Dynasty - Campaign notes for my Rogue Trader RPG

Advertisement

There is nothing wrong with googling for a solution. In the workplace its better to quickly find a solution to a problem that is already solved than spend a week trying to figure out something that you could have discovered in seconds.

You think profesional software developers "just know" the answer to everything. Nope.

For a prime example look at John Carmack and all the stuff that has been attributed to him:

Did he invent the fast square root? Nope
Did he invent BSP trees? Nope
Was he the first to use PVS? Nope

Did he invent the Doom3 shadow algorithm? Nope

Did he invent Mega Texture? Nope

All these things were already invented several years before he decided to use them. How did he discover them? Through research.

OK ok but somebody must have invented them in the first place well yes they did but for the most part it wasn't something they just thought of. A lot of computing solutions come from academia where people spend years working on a very small subset of problems as part of their phD. These then get published and forgotten about until somebody researches them and finds a use for them.

Obviously he did the research unti he fully understands the solution but, still it isn't like he just dreamed the answers up in his sleep.

Both.

When at work, when confronted by a problem my first thought it ALWAYS "I wonder if anyone has had this issue and solved it already..." and away to google I'll go to see if that's the case and to learn from something someone else has already solved.

The 'learn from' part is pretty key; if you find a solution, copy and paste it and don't take in why it worked then you've learnt nothing. If you take a moment or 7 to think about the solution, how it works and how to refine it to your situation then yay! experience!

And that's where the ability to solve 'new' problems comes from; experience.

Most seemingly new solutions will always have a seed in an existing solution to an existing problem which someone then thinks about some more, applies knowledge and experience gained over the years to refine the solution and create something new.

Nothing is created in a vacuum and all new ideas are feed from old ideas and as you gain more knowledge you'll find yourself doing this naturally.

Problem solving itself is nothing more than looking at something and then taking it apart so that one big problem because two smaller ones, which in turn become two smaller ones and so on. This gets easier with experience and practice as you get use to it and solve problems.

The key point is 'research' isn't a dirty word.

Pasteur said that chance favors the prepared mind.

One of the most important aspects of preparing your mind for great things is to understand that, early in your education, not only are you gaining basic knowledge, you are learning to learn. You can't acquire new knowledge without the ability to learn. A part of learning to learn is learning how to research. That's the time-honored emphasis of post-graduate degrees.

So googling isn't a cheat, it's a powerful tool to prepare your mind.

Newton said that, if he saw further than others, it was only because he stood on the shoulders of giants.

If you want to achieve great things, you must prepare yourself to see what others have seen, and stand on their shoulders.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

everyone googles nowadays... its just as much a basic skill now as problem solving.

Get good at it just as you train you programming skills or other skills. Some of the best solutions come from taking something someone else did and improving it.

Its what engineering was for hundreds of years! Even geniouses did it.

A tourist had just arrived in Manhattan with tickets to a concert and didn't know his way around. The curtain time for the show was fast approaching and the tourist was becoming increasing desperate to find the venue.

Finally, he approached a man walking swiftly and carrying a violin case, a sign he might have knowledge of the local entertainment industry.

"Excuse me," said the tourist, and the hurrying man looked up.

"Can you tell me how to get to Carnegie Hall?" queried the lost and desperate man.

The man with the violin case paused briefly and stared intensely at the tourist. After a beat, he spat "Practice!!!" and hurried on his way.

To get good at something, you practise. It's that simple. Learning and repeating what others have done is one of the more effective ways of practising.

Stephen M. Webb
Professional Free Software Developer

As you program and problem solve more and more, you still wont feel you are getting any better. However the problems will seem to be getting easier.

As for professional programming, often time is of the essence and thus if you can "google" a solution, then professional due diligence should dictate that you do not want to be reinventing the wheel. However, what separates the good programmers from other programmers is to be able to work out quickly whether a solution from google is good and otherwise quickly discard it rather than polluting the codebase with crud (typically seen with amateur web / javascript development).

Writing code is pretty much data entry, it is the scalable design and elegant integration of code that comes with practice. As for the algorithms themselves, yeah, maths is often key (especially no escaping that in graphics programming). Between learning that and knowledge of low level languages like C and even assembly, you will get pretty damn good.

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


You will give up, but it will haunt you. Then one night, while falling asleep, the solution to the problem you've already cast aside will snap into your mind.

There really isn't a better feeling.

It's basically this.. Or at least for me it is.

I'm in a similar situation, I self-taught myself programming and never went to college or university. I've barely read a programming book and have watched a few basic programming tutorials. Whenever I try to write a program I nearly always find myself googling for solutions to problems or looking at other peoples code. And that's basically how I learned to program.

It's taken me many years to finally build up the confidence to apply for a job as a full time programmer but I finally got there earlier this year. My day job now consist of writing web based gambling games using a bespoke Java API (Reminds me of an XNA style framework but for gambling games). But because it's bespoke though there is nowhere to turn when a problem comes up which I can't solve.

Instead I sit there for hours, sometimes days... Hell, sometimes even weeks staring at a notepad document where I've written down all of the information I currently have available and what information I need, trying to work out a way to turn A into B. Eventually it will click into place and you'll solve the problem, although it feels like it at the time, nothing is impossible. There have been plenty of times in the last 6 months where I've been sat at my desk, head in hands, thinking up a way to tell the project manager the game is impossible and cannot be completed.

Eventually when you hit that solution though, it builds your confidence and blows away any self-doubt you may have about your skill as a programmer.

Lots of good answers here. I especially like Glass_Knife and phantom's.

Another thing you can do is read just the overview of the solution, and try to work out the details yourself, but with a chicken exit if you need it.

Also, don't be afraid to solve the same problem more than once :) Sometimes when you have a large and complex challenge, you just have to dive head first into it and make a big mess of code. Then refactor and it looks a little better. But with your deeper understanding of the problem, you might be able to approach it from a different angle and come up with a more elegant system overall.

A good example for me is side scroller collision detection with slopes. It seems so simple, and often it is, depending on how many cases you want to handle. But it can get really complicated if you want to support slopes steeper than 45 degrees, sloped ceilings, not having off-by-one problems between left and right slopes, colliding the center of your rectangle with the slope but corner when standing at the edge of a solid tile, etc. I finally managed a system that does everything I want, but it's not quite the level of elegance I want to reach before writing an article series on it (because all the articles I've read don't solve it completely). So one more iteration, one of these days :)

This topic is closed to new replies.

Advertisement