We are still actively working on the spam issue.
Difference between revisions of "Programming concepts"
(→Object Oriented) |
(→Object Oriented) |
||
Line 54: | Line 54: | ||
Most OOP languages have incredible documentation that is recommended to have handy for references while developing software with these languages. | Most OOP languages have incredible documentation that is recommended to have handy for references while developing software with these languages. | ||
− | OOP is '''not''' [[GUI]] programming. | + | OOP is '''not''' ''necessarily'' [[GUI]] programming. |
* Java | * Java |
Revision as of 17:08, 30 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
- Repositories
- Gitorious
- GitHub
- BitBucket
- Document typesetting/preparation
- LaTeX typesetting system
- Markdown
- Console text editors
- Command line skill
- GNU/Linux/Unix shell
- Windows cmd
- Compiler use
- GNU Compiler Collection (gcc)
Guides to get you on your way
Programming Paradigms
Different languages are sometimes written in completely different ways. By becoming familiar with multiple languages that use different paradigms, you become a more effective programmer as the mindset used behind one paradigm can usually improve your way of thinking in another.
[TODO: Add definitions for these sections ]
Imperative
- C
- Python
Functional
Functional programming languages are best described as programs that take an input, compute data and return a result to the system.
- Lisp dialects (Common Lisp, Scheme, Clojure)
- Haskell
Object Oriented
Defining Object Oriented Programming (OOP) appears to be hard for beginners to grasp. The best way I was explained was to envision real life objects such as a fork, a knife, a plate and a piece of chicken. Each object has methods and attributes. You would stab with a fork, cut with a knife, and these are it's basic methods. The chicken can be raw, or cooked, which would be its attributes. You can use the knife and fork together to stabalize and cut the chicken, but only if its cooked.
Most OOP languages have incredible documentation that is recommended to have handy for references while developing software with these languages.
OOP is not necessarily GUI programming.
- Java
- C#
- C++
Declarative
- SQL
- Prolog
Aspect Oriented
- ?
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: