r/programmingchallenges • u/luckygal14 • Feb 13 '19
Want to be a better programmer!! Help!
Ok so I'm a recent graduate in a computer science. I understand basic syntax and how to use a language and all that stuff and can fairly write simple code as well. But I struggle to do anything by myself easily. Any task which takes 20 min to someone with same experience as me take me more than double time.
It's even tough to come with thinking for a solution or designing a system. I have tried websites like Leetcode, hackerrank, geeks for geeks etc. After some time or days I am not able to solve even easy questions and end up looking at the solutions. This has fairly caused me failing so many interviews and not able to do so many coding chakkdngi.
Even if I somehow know how I can solve the problem I can come up with algorithm or steps it takes more than it should to convert it into a program.
Any help /suggestion for how to improve myself would be a great help.
2
u/[deleted] Feb 13 '19
Check out CodinGame. It's got some nice little puzzles you can do, and when you've solved it, you can also look at how other people have solved it. This is great for finding out new ways to do the same thing. It supports lots of languages, so you can choose the one to suit you.
The best advice I can give is stick with it. Sometimes it just takes a while, staring at a problem, running through all the different scenarios in your head. Often the solutions come when you take a break. Go grab a coffee, or walk around if you spend too long trying to solve something. If you can't solve it, don't get disheartened. Often being able to solve certain problems just comes from experience of seeing the problem before.
Don't be afraid to ask for help, it's how you learn.
Even if your solutions take lots of steps to achieve, you're still learning. Whenever I need to solve a problem, I'll often write it in a long and lengthy way that's easy to understand. It won't be efficient, or optimised, but it's easy to understand. Once you've got it working, you understand everything your code is doing, and why it's doing it, you can start to look for repetition. Repeated code can usually be converted to functions, and you can start shrinking your code, and eventually clean it up and optimise it.
Programming can be frustrating at first, but it's a bell curve. Once you've struggled and got through the difficult learning curve, it becomes so much easier.
5
u/realestLink Feb 13 '19
Think in general terms when programming. First think of what the program needs to do in pseudocode. Then translate that pseudocode into syntax. Slowly do the pseudocode in your head until you can think in syntax.
1
u/sanchitb Feb 13 '19
Lucky for you, there is so much repetition in our field. If you do something once can you do it the second time in less amount of time? If that is the case then you have nothing to worry about.
Gladly take the double amount of time that you need to do something the first time. Understand everything properly then do it faster the second time around.
Let me know if you need help / a mentor. I'll gladly work with you and help you improve.
2
u/Lynx323 Feb 13 '19
Make a simple mobile app like calculator or TO DO app or make a website from scrach that should be simple enough and challenging at the same time and teach you to solve real problems
2
u/JeusyLeusy Feb 24 '19
Don't feel ashamed that your solutions are longer than everyone else's. You have to start from somewhere. Once you solve an easy or medium problem look at everybody else's solution and study it until you recognize areas that you can apply it in.
1
u/[deleted] Feb 13 '19
You should hire a personal tutor and see if they can help isolate your issue. A simple change in how you approach your code may help you.