r/AskComputerScience • • Jul 03 '19

How to become proficient in solving programming problems?

I know the syntax of the programming language but can not solve the basic problems but am able to understand the solutions.

28 Upvotes

10 comments sorted by

13

u/CptCap Jul 03 '19

Practice.

Programming exercise work at first, but they only can get you so far. After that the best is to just find a pet project and work on it.

11

u/Bottled_Void Jul 03 '19

Taking a methodical approach really helps.

Complex problems can be broken down into smaller problems. Even basic problems can be broken down into trivial problems.

A lot of it is having a little toolbox (an abstract one) to work with.

Got data coming in that needs processing? Sounds like you need some sort of buffer.

Linked lists, stacks, recursion. They'll all be things you'll pick up and eventually know when to use.

In the meantime, you can probably get away with a hammer to knock in the screws.

But definitely taking a step back and breaking down the problem into things you need to solve will help you out.

1

u/[deleted] Jul 03 '19

I agree

5

u/chaotic_neutralrogue Jul 03 '19

This is what I do:

First of all, plan what your program needs to do, or what you need to solve. The big concept. Now, think of the easiest, most basic you can achieve this. If it needs to do various things, separate them and break them down.

Once you've done this basic skeleton of your program, think of small details that can improve certain sections of your program. Go slowly, making small, basic changes. By repeating this, you fill in the small blanks that you may have. Remember to test everything you do. Also remember, the simpler, the better (that, at least, is my golden rule and most important priority)

3

u/jalagl Jul 03 '19

Check out this site: https://www.dailycodingproblem.com/

Gives you a challenge every day. I use it to learn new languages and to practice them when I spend more time on admin/management tasks.

2

u/alanbdee Jul 03 '19

You have to try and break it down to smaller problems. It can also help to write a list of what you know. You may not be able to fix all problems and that's ok. Talk to a senior developer. I'd rather you all me a question then spend 3 hours trying to figure it out yourself.

The flip side too this is sadly not encouraging, I'm sorry. But being able to solve problems is the primary skill of a developer and not everyone can do it. I hope you can and i hope you can figure this out. Good luck.

1

u/vlads_ Jul 03 '19

In addition to what others have said, I would also recommend reading a textbook on algorithms if you have not done so already.

1

u/mralijey Jul 03 '19

Seeing sample solutions and figuring out patterns!

1

u/[deleted] Jul 03 '19

i would argue that planning your project is the most difficult part. Once you have everything planned implementing should be like reading off a check list

1

u/cc-1 Jul 04 '19

Get an algorithms book with practice problems. Read every chapter and do every practice problem. Don't look at the answers. You will know when the answer is correct because you can prove it to yourself. Type some out in code, but mostly, just work on algorithmic problem solving.