What are the greatest programming tips and tricks you have learned on your own by years of coding? ****
For me, These are the most important tips I can really think of.
1) Keep it simple.
Spend a while planning ahead to save countless hours of frustration, headaches and failure.
2) TEST in every sub-problem your code solves.
I think this tip is for non professional coders such as myself, because when you move on to the next sub-problem you save your self the time of rereading what you have checked before (you check the last part of code to detect the bug in your code). Trust me this doesn't take much time just 50 seconds after each sub-problem.
3) Readability is more important than most believe.
When you learn to write simple readable code, you can code faster. The bugs will not occur as a messy code and if a bug occurs it will be faster to detect it and fix it.
Please share your experience, and correct me if I am wrong!
Poor tips ): I code and submit with out even compiling and get Ac.
this is not poor tips, this is pro tips
Please don't necropost. I can see the downvotes coming to both your and my comment.
This is just a joke made 7 years ago. Don't take everything serious.
btw is it rated?
Forget about codes, you will just make it harder to think out of the box
Solve the simplest instance of the problem you're working on before moving to the actual problem
Brain storming surely has its benefits, let's stress-test that pinky organ
You need to get your hands dirty, and I mean it
Keep improving your code, try every possible approach and technique you can think of and compare between them
Premature optimizations are the root of all evil, it's no joke
Enjoy the problem statement, for it was written to keep you entertained
Aim not too high it feels unreachable, take it step by step
Ask nobody for help, you grow wings and feel enlightened and a lot more of this sort
The last part is debatable and not for everyone
Would you say I would be... enlightened by my own intelligence?
Error = ( More_ Code ) ²
E=M²C²?
You can take More = √M if that offend you.
Nice trick/tip.
Thanks.
Stay cool at the contest time if you don't get the AC although the problem is easy to solve. You can be angry after the contest time, but when you get you mind hot during the contest, surely You won't be able to solve other problems easily/quickly. Keeping the brain cool is the great thing :D
Get anger but Don't get depressed! It eats your confident! where the confident is the most valuable thing in programming + every step of life.
Don't give up!
Try to help people! that takes your thinking and debugging level higher :)
[ Although I'm a new learner! But I've learned those things :D I've some more to write also but can't remember! :( poor me! ]
Just squeeze brutes.
I did not understand what is that suppose to mean??? I am serious!
Optimize brute forces, I guess.
There are four ways to write that. It's surprising that all of them result in a link to this blog. It's even more surprising that there are no more results — I would guess that this question was asked hundreds of times.
I Couldn't find the blog, plz give me the link
1.Keep going. 2.Repeat step 1.
Triple bullshit.
As intended.
You have surely wasted my time reading these 3 steps ):
fake news
The Russians are behind this.
Practice makes perfect.
Practice, and most important reading tutorials when you are stuck and can not solve hard problem.
I used to spend most of my time thinking about stuff like this and giving myself tips, never shared them though. This is kind of personal and worked for me.
Learning: Read a topic, understand it (if you don't, then read it as many times as it takes) and then solve problems about that topic (10-20), now you should be good at that type of problems, or at be good at identifying them when you see them.
Compete: Try to solve as many problems as you can during competition and try to push yourself to the limit, you have to understand that you come with limitations, the only way you can get better or improve yourself is to break those limits and the best way to do that is to push yourself to your limit. Once the contest is over upsolve 1-3 problems (1-2 for 2 hr contests and 3 for 5 hour contests). This will help you push your limits, because if you only solve problems during the contest you will either stay the same or increase your level very slowly.
When not learning or competing: If you are not learning a new topic or feel like competing them you can probably submit random problems in any OJ or just solve them and not code them. I liked to open a random ACM ICPC contest and just read the problems and think about solutions and their complexities and try to demonstrate they would work but most of the time I didn't implement them, especially the easier ones, only the ones that sounded interesting of challenging, also if I found a problem I couldn't solve after hours I would look for the editorial and potentially discover a new topic to learn, doing this also helped to expand my mind in how to solve problems.
Body: I know this sounds not important, but remember your mind is part of your body, and if you want to do well you need to be in good shape, so eat well, a balanced diet always help, but don't eat just for eating, and sleep good, I slept 8-10 hours per day. If you feel physically exhausted you might need to take a break. Also try to find time every day for yourself where you can think about how things are going and how you are doing, use this time for personal stuff as well, you have a life when you are not programming. Doing this will help you focus during contests.
Enjoy: The first 4 points might sound too intense, so remember that you need to enjoy life, go out with friends, talk with people, do a hobby you like, go walk somewhere.
my advice to give :- Don't be shy to ask anyone for help
i think all pro competitive programmer needed help and asked for help one day.