How to Learn Cobra

This page documents the high level steps to learning Cobra. You can use it as a check list and mark off the items below as you complete them.

To learn a new programming language you should alternate between reading and coding. So first, make sure you have the latest Cobra and that you can run a simple program. Then read this document which covers basic syntax and features.

After reading any document, including that one, try out some ideas of your own to see if they compile and how they run. Alter the examples or write your own from scratch.

If you get stuck on something, don't spend too much time on it. Instead, move on to additional topics. You'll often find the answer in subsequent documentation, or the answer will occur to you later.

Next look through some of the How To's which demonstrate both syntax and library calls. Again, write some of your own code using what you've learned.

If you are familiar with Python then check out the Comparison to Python.

Read through Coding for Quality. In your subsequent coding, ask yourself how you can take advantage of doc strings, unit tests, contracts and assertions to make higher quality code.

Learn the Cobra Koans.

Now check out some of the Samples. Unlike the "How To" programs, the samples use any and all language features needed to complete a task. Again, try out some features on your own.

Return to the How To's and complete the remainder of them.

The wiki has some key pages such Language Topics and Library Topics that you should find readable and useful now that you've built a background from the above steps.

Return to the Samples to examine any remaining ones you didn't look at or understand the first time.

Finally, take a look at the last 1 to 3 releases to see what features were added or refined.