A brief guide to learning C ++: what, when and what to create

    Recently, we started a fresh course on " Profession: C ++ Developer " at GeekBrains . The program will allow in just 9 months to master this difficult language and become a junior specialist. And this is not an easy task. For example, in schools and universities to study C ++ takes at least 2 years, often 4-5. To show what this difficult path consists of, we have schematically described the main stages for you.

    Stage 1. Algorithmic programming

    For modern languages, this may seem paradoxical, but the classic learning of the C ++ language begins with the study of several other languages. You should initially get used to the structures of the programs and learn the basic concepts. Therefore, in the first classes, instead of a computer, students use sheets of paper, and instead of codes, flowcharts with arrows.

    Despite the universality of this method, it is rare to find it even at the first classes in Java or C #, although it would also be useful there. Most often, algorithmic and block programming take place when students are already familiar with the syntax. But in C ++ it is a foundation.

    Stage 2. Pascal, Basic and C

    At the next stage, we finally turn on the computer and start creating simple programs in languages ​​that are not directly related to C and C ++. The idea of ​​classical education, as in the last paragraph: to teach students to create a structure correctly, to remember service symbols, to use the "correct" notation and design.

    When Pascal and Basic are completely exhausted, and a few hours are enough for this, you can gradually move to C, duplicating the learned code in the new syntax. Sorting by different methods, working with strings and arrays, calculators, games - all these basic exercises and programs will help to live with new knowledge.

    Stage 3. Development environment - the simplest

    In any programming language, you should start writing programs not in complex IDEs, but in simple universal editors. Notepad ++ is perfect for this, especially since the name hints at the correctness of the choice. All you need now is syntax highlighting and a check function. In student education, writing code on paper is also practiced. The reason is simple: programming exams in the 21st century are still sometimes taken without computers.

    If you have Linux (and if you plan to become a programmer, then install it immediately), then the choice of the environment may not be at all - just open the command line.

    Fans of old school can try to install Borland C ++ on their computer, the benefit of which many of the current "Crusaders" are very kind and loving about this series (it is really convenient to work in it). But for normal operation, you have a minor choice between Visual Studio and Qt Creator, depending on the tasks.

    At this stage, stop your choice on a notebook.

    Step 4. Starting with consoles

    As long as you do not write the first cool application with a code of at least ten sheets, it is simply harmful to get involved in graphics. In the command line, you can implement a bunch of ideas, from chatbots to RPG-games, using a lot of various libraries and your own knowledge.

    And then on this basis, you can impose minimal graphical gadgets, play with model physics, grind moments of intersections, overlays, work out the interaction with the interface.

    When this stage is completed, you can connect serious libraries and programming environments, where many of the previous steps are performed automatically.

    Stage 5. OOP

    OOP is a ladder from primitive messing around with code to the complex structures that underlie
    products such as Chrome, World of Warcraft and Linux. OOP is also a key difference between C and C ++. In classical education, a lot of time is devoted to studying the principles of OOP, because without a thorough understanding of what it is and why, you will create tons of unnecessary and incorrect code, trying to justify it with personal convenience.

    So at this stage you will have to return to procedural and algorithmic programming using paper and pen, having trained to clearly describe the objects of the path of inheritance and encapsulation. Very soon it will be needed.

    Stage 6. OOP in C ++

    One thing is just to learn the PLO postulates, another is to learn how to put them into practice. To do this, try the following exercises:

    • Rewrite your complex programs as part of the PLO paradigm. So you will understand how to simplify the code.
    • Create a program with a complex structure, but almost zero functionality. This will be useful in the future for the proper alignment of links without unnecessary blocks.
    • Create the first relatively simple program from scratch, using the experience of the first two exercises. For example, a telephone directory with add, delete, search and filter functions.

    Stage 7. Qt and the start of graphical programming

    “Classic” education at this stage immediately migrates towards Visual Studio - to the creation of simple GUI-applications in the most popular IDE. However, as an intermediate option, it will be useful to use Qt thanks to its built-in graphic libraries, which allow you to fully use all your freshly baked knowledge in C ++ and OOP.

    This stop would be useful for anyone learning C ++ for the sake of future professional perspectives and general skills development. Fortunately, Qt has an excellent built-in assistant and many tutorials on creating different types of applications, so there should be no problems with mastering. Even if it comes to advanced skills.

    Stage 8. Visual Studio

    GUI-applications, most often, is the final stop in high school education. Students do not learn anything new here; rather, they get used to the main tool, finally fix the correct structure of the application and files in their minds.

    Stage 9. Choice of specialization

    Since C ++ is an incredibly demanded language in almost all areas of programming, at this stage you may think what you would like to do in the future. For example, if you plan to work with hardware, that is, with microcontrollers, you will have to study libraries to work with specific devices and debugging tools. Want to work in game design - the path lies in Unity and similar programs.

    These 9 stages will not make you a professional, but will allow you to more or less realize the possibilities of the language and what the “crusaders” do. You can try to overcome this path on your own, or you can join us. We promise it will be more efficient and much more interesting.

    Also popular now: