# Does problem solving improve with experience?

Page 1 of 1

## 6 Replies - 1752 Views - Last Post: 20 July 2011 - 08:30 AM

### #1 insanepenguin

Reputation: 7
• Posts: 238
• Joined: 08-July 10

# Does problem solving improve with experience?

Posted 20 July 2011 - 02:20 AM

I know a very big part of programming is problem solving. Sometimes I hit myself in the forehead when I see how simple something is after trying to figure it out

For example getting the factorial of a number I managed to do on my own (please ignore any dumb code)

int num = 5;
int factorial = num;
for(int i = 1; i < num; i++)
{
factorial*= i;
}

But the book asked for it in reverse 5 * 4 * 3 * 2 * 1

I couldn't figure it out in reverse but it was so simple when I looked at a solution!

int num = 5;

int factorial = 1;

for(i=num; i > 1; num--)
{
factorial *= num;
}

Is this (problem solving) something that develops with experience and practice?

Is This A Good Question/Topic? 0

## Replies To: Does problem solving improve with experience?

### #2 Nightfish

Reputation: 74
• Posts: 158
• Joined: 24-May 11

## Re: Does problem solving improve with experience?

Posted 20 July 2011 - 02:41 AM

1) Everything gets easier with practice

2) "Cute" little things like this may or may not be involved in your actual job.

insanepenguin, on 20 July 2011 - 02:20 AM, said:

I know a very big part of programming is problem solving.

Depending on what you end up doing, what you call "problem solving" may or may not be important. Strange as that may sound, most companies don't pay you to write fancy code to get a sequence of primes, fibonacci numbers or whatever.

I guess what I'm saying is that you don't need to worry about this. If you need to actually do this on a regular basis you'll get better at it. But if your job ends up being anything like mine, you don't get a pat on the head for stuff like this, you get a pat on the head for writing code other people can easily pick up and roll with. You get a pat on the head for arranging the UI in a way that is inuitive, easy on the eyes and ergonomic.

This post has been edited by Nightfish: 20 July 2011 - 02:42 AM

### #3 fromTheSprawl

• Bloodborne

Reputation: 523
• Posts: 2,102
• Joined: 28-December 10

## Re: Does problem solving improve with experience?

Posted 20 July 2011 - 02:52 AM

Yes you develop experience with practice.

By the way, no code is dumb code when it works. Only ugly.

### #4 Jstall

• Lurker

Reputation: 434
• Posts: 1,042
• Joined: 08-March 09

## Re: Does problem solving improve with experience?

Posted 20 July 2011 - 03:55 AM

Yes, absolutely. Like with most things your problem solving will improve with experience. Every solution you create gives you more of a base to draw upon in the future. For example now that you know the solution to the problem you posted the next time you are in a situation that required a number to be decremented in an iterative fashion you will think back to this problem and know what to do.

I have only been programming for a little under three years but I find a massive gap in style and finesse in even the past year. For example I was going through some code the other day that I did at work when I first arrived about a year ago. Things that seemed difficult then were obvious to me now and code I wrote that I thought was good seemed pretty sloppy. I'm sure the same thing will happen when I look back on what I write today a year from now. Experience is a huge factor .

### #5 insanepenguin

Reputation: 7
• Posts: 238
• Joined: 08-July 10

## Re: Does problem solving improve with experience?

Posted 20 July 2011 - 05:36 AM

Thanks for the input guys I found this in a post earlier http://writing.bryan...poor-poor-child reassuring and kinda inspiring!

### #6 baavgai

• Dreaming Coder

Reputation: 7507
• Posts: 15,558
• Joined: 16-October 07

## Re: Does problem solving improve with experience?

Posted 20 July 2011 - 07:22 AM

When you program long enough, the "new" problems are usually just old ones in disguise. You'll be able to apply prior experience to jump to the part that's unfamiliar quickly.

To the uninitiated, this can make you look like a friggin computer genius. The reality is far less glamorous. When you've banged your head against a particular wall before, you tend to remember how to avoid the pain the next time you see the same bloody wall.

### #7 NickDMax

Reputation: 2255
• Posts: 9,245
• Joined: 18-February 07

## Re: Does problem solving improve with experience?

Posted 20 July 2011 - 08:30 AM

Experience brings with it intuition. I remember when I was tutoring I would often be stumped by questions of the form: "but how did you know you had to approach the problem like that?"

I didn't know HOW I knew, I just did. After years of introspection I realize that it is experience that lets me see patterns in problems and spot places where I have had problems before. that is:

Quote

...you tend to remember how to avoid the pain the next time you see the same bloody wall.

but you also tend to remember the paths and patterns that were successful.