We are still actively working on the spam issue.
Difference between revisions of "Programming concepts"
(Moving some material from the Computer Science page to the Programming page, and vice versa) |
|||
Line 1: | Line 1: | ||
{{Cleanup}} | {{Cleanup}} | ||
− | + | You can learn to program, but without a good foundation of theory behind you to help you make smart decisions with your code, you're going to be a shitty programmer. Go take a look at the [[Computer Science]] page for some info. | |
+ | |||
+ | There's something to be said about optimising your algorithm before optimising your code. | ||
== Crucial programmer skills == | == Crucial programmer skills == |
Revision as of 10:22, 29 January 2014
You can learn to program, but without a good foundation of theory behind you to help you make smart decisions with your code, you're going to be a shitty programmer. Go take a look at the Computer Science page for some info.
There's something to be said about optimising your algorithm before optimising your code.
Contents
Crucial programmer skills
There are some skills that are considered vital to being a valuable programmer, and that if you wish to be one, you should definitely get to grips with. These consist of:
- Version control systems:
- git (recommended, especially for open source stuff) and/or mercurial
- Subversion (svn).
- Document typesetting/preparation
- LaTeX typesetting system
- Markdown
- Console text editors
- vim and/or emacs
- Command line skill
- Linux/Unix shell
- Windows cmd
- Compiler use
- GNU Compiler Collection (gcc)
- javac
Competitive Programming
You are in the jungle. You have a pocket-knife. Someone asks you to kill a mountain lion.
Anyone but a programmer would be asking "WTF is a MOUNTAIN lion doing in a JUNGLE?!", but that's not what you have been trained to do as a programmer. You are here to solve problems, not to question them.
Years of training has taught you well. You use your knife to sharpen a stick. You cut vines to lash sharp stones on one end. Maybe you're from a top university, and you've learned to extract essential ingredients from plant and insect life around you to fashion a poison to tip your weapon with.
Convinced that you have an effective and efficient way to kill the lion, you set forth to accomplish your task. Maybe your stick is too short, or your poisons don't work. It's okay - you live to refine your method and try again another day.
Then someone figures out a way to fashion a low-grade explosive from harvesting chemicals in the jungle. Your method of fashioning a spear to kill the lion is now far from the best way to accomplish your task. Nevertheless, it's still a simple way, and will continue to be taught in schools. Every lion-killer will be taught how to build his tools from scratch.
That's "real-life" programming.
In competitive programming, you start out with the same resources (a pocket-knife), except you have 2 minutes to kill the lion.
As a beginner, you will stare at the lion and do nothing.
Soon, you learn that if you kill a squirrel, sometimes the judge thinks it's a lion and you're good to go.
A more experienced programmer just keeps stabbing the lion and hopes that the lion dies in time. Soon, you learn that there are certain spots on a lion that are damage immune. You learn to not even bother stabbing those spots. Sometimes, the lion doesn't expose those spots, so you get really good at killing squirrels.
And then, to be a great competitive programmer, you need to be able to do two things.
First, you must learn how to find the lion's critical point and kill it in one swift stroke.
Second, you must learn how to be so handy with your knife that you can fashion a sharp stick in 1 minute, and spend the next minute stabbing the lion to death.
But never ever will you be able to have enough time to fashion an explosive to take the lion out.
Material
Books
There are books that teach programming competition. They are a very good resource to learn computer Science
Compete
There are many pages to compete in online programming competitions. They often offer tutorials and many other more:
- TopCoder
- Codeforces
- Codechef
- Google CodeJam
- Facebook HackerCup (I do not reccomend this one)
- ICPC (Might be available in your college)
- IOI If you are underage and autistic, look for the local version in your country of this one.
Training sites
If you want to train: