codeSG / pgrouting

Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
http://www.pgrouting.org
GNU General Public License v2.0
0 stars 0 forks source link

Get familiar with C++ #2

Open codeSG opened 6 years ago

codeSG commented 6 years ago
codeSG commented 6 years ago

Please find the link to the detailed video reports.

codeSG commented 6 years ago

Video: “All Your tests are Terrible” (-T. Winters & H. Wright)

Everyone must WRITE TESTS and they must follow 5 properties: Correctness, Readability, Completeness, Demonstrability, and Resilience." There are some Do's and Don'ts to be followed to write better tests. A test should be like a novel: introduce the setup, what is your initialization, your test should progress through actions, concludes with a clear result, and in all, it should make sense."

codeSG commented 6 years ago

Video: “STOP TEACHING C” ( -- Kate Gregory)

It is very common that people take C++ as an add-on to the old-C, which is logically true also. But this doesn’t mean that to learn C++; one must know C in advance. In my opinion, also I refer to study C++ first, as C comes with some complex syntax, format specifiers, pointers, etc., which might be hard to understand as a beginner, and it lowers down the interest of the learner and set C++ image as more harder to learn. This way of learning lays the foundation to make harder things stay simple. It makes better C++ programmers, and they will enjoy the learning more.

codeSG commented 6 years ago

Video: “The Essence of C++” (-Bjarne Stroustrup)

What is C++? A light-weight abstraction programming language. It takes 'direct mapping to hardware' from "C" and 'Zero-overhead abstraction' from Simula. It comes with better resource management, error handling, smart pointers, garbage collector, class hierarchies, generic programming(templates), built-in algorithms and lambdas functionality. I would also recommend "A Tour to C++" to everyone who wants to know modern C++ (in brief).

codeSG commented 6 years ago

Video: "Back to Basics: Modern C++ Style" (-Herb Sutter)

Some pro tips to use modern C++ features over C++98:

codeSG commented 6 years ago

Video: "STL Algorithm in action" ( -Michael VanLoon)

codeSG commented 6 years ago

Video: "Writing good C++14" (- B. Stroustrup)

C++ is advancing day by day, Presently it has become easier to write and maintain with less amount of code and even it runs faster as compared to C++ at early stages. As we all hate coding rules, C++ offers coding guidelines which are prescriptive, flexible and rationale. Some core rules are mandatory like to avoid resource leaks, dangling pointers, misusing pointers for range errors and nullptr dereferencing. Avoid overusing "Smart pointers" unless there is ownership transfer or sharing(quite new stuff). There are too many rules, to remember, so there are tools who knows the rules and will point you to the relevant one when needed.

cvvergara commented 6 years ago

@codeSG Task completed.