scrapbook
  • "Unorganized" Notes
  • The Best Public Datasets for Machine Learning and Data Science
  • Practice Coding
  • plaid-API project
  • Biotech
    • Machine Learning vs. Deep Learning
  • Machine Learning for Computer Graphics
  • Books (on GitHub)
  • Ideas/Thoughts
  • Ziva for feature animation: Stylized simulation and machine learning-ready workflows
  • Tools
  • 🪶math
    • Papers
    • Math for ML (coursera)
      • Linear Algebra
        • Wk1
        • Wk2
        • Wk3
        • Wk4
        • Wk5
      • Multivariate Calculus
    • Improving your Algorithms & Data Structure Skills
    • Algorithms
    • Algorithms (MIT)
      • Lecture 1: Algorithmic Thinking, Peak Finding
    • Algorithms (khan academy)
      • Binary Search
      • Asymptotic notation
      • Sorting
      • Insertion sort
      • Recursion
      • Solve Hanoi recursively
      • Merge Sort
      • Representing graphs
      • The breadth-first search algorithm
      • Breadth First Search in JavaScript
      • Breadth-first vs Depth-first Tree Traversal in Javascript
    • Algorithms (udacity)
      • Social Network
    • Udacity
      • Linear Algebra Refresher /w Python
    • math-notes
      • functions
      • differential calculus
      • derivative
      • extras
      • Exponentials & logarithms
      • Trigonometry
    • Probability (MIT)
      • Unit 1
        • Probability Models and Axioms
        • Mathematical background: Sets; sequences, limits, and series; (un)countable sets.
    • Statistics and probability (khan academy)
      • Analyzing categorical data
      • Describing and comparing distributions
      • Outliers Definition
      • Mean Absolute Deviation (MAD)
      • Modeling data distribution
      • Exploring bivariate numerical data
      • Study Design
      • Probability
      • Counting, permutations, and combinations
      • Binomial variables
        • Binomial Distribution
        • Binomial mean and standard deviation formulas
        • Geometric random variable
      • Central Limit Theorem
      • Significance Tests (hypothesis testing)
    • Statistics (hackerrank)
      • Mean, Medium, Mode
      • Weighted Mean
      • Quartiles
      • Standard Deviation
      • Basic Probability
      • Conditional Probability
      • Permutations & Combinations
      • Binomial Distribution
      • Negative Binomial
      • Poisson Distribution
      • Normal Distribution
      • Central Limit Theorem
      • Important Concepts in Bayesian Statistics
  • 📽️PRODUCT
    • Product Strategy
    • Product Design
    • Product Development
    • Product Launch
  • 👨‍💻coding
    • of any interest
    • Maya API
      • Python API
    • Python
      • Understanding Class Inheritance in Python 3
      • 100+ Python challenging programming exercises
      • coding
      • Iterables vs. Iterators vs. Generators
      • Generator Expression
      • Stacks (LIFO) / Queues (FIFO)
      • What does -1 mean in numpy reshape?
      • Fold Left and Right in Python
      • Flatten a nested list of lists
      • Flatten a nested dictionary
      • Traverse A Tree
      • How to Implement Breadth-First Search
      • Breadth First Search
        • Level Order Tree Traversal
        • Breadth First Search or BFS for a Graph
        • BFS for Disconnected Graph
      • Trees and Tree Algorithms
      • Graph and its representations
      • Graph Data Structure Interview Questions
      • Graphs in Python
      • GitHub Repo's
    • Python in CG Production
    • GLSL/HLSL Shading programming
    • Deep Learning Specialization
      • Neural Networks and Deep Learning
      • Untitled
      • Untitled
      • Untitled
    • TensorFlow for AI, ML, and DL
      • Google ML Crash Course
      • TensorFlow C++ API
      • TensorFlow - coursera
      • Notes
      • An Introduction to different Types of Convolutions in Deep Learning
      • One by One [ 1 x 1 ] Convolution - counter-intuitively useful
      • SqueezeNet
      • Deep Compression
      • An Overview of ResNet and its Variants
      • Introducing capsule networks
      • What is a CapsNet or Capsule Network?
      • Xception
      • TensorFlow Eager
    • GitHub
      • Project README
    • Agile - User Stories
    • The Open-Source Data Science Masters
    • Coding Challenge Websites
    • Coding Interview
      • leetcode python
      • Data Structures
        • Arrays
        • Linked List
        • Hash Tables
        • Trees: Basic
        • Heaps, Stacks, Queues
        • Graphs
          • Shortest Path
      • Sorting & Searching
        • Depth-First Search & Breadth-First Search
        • Backtracking
        • Sorting
      • Dynamic Programming
        • Dynamic Programming: Basic
        • Dynamic Programming: Advanced
    • spaCy
    • Pandas
    • Python Packages
    • Julia
      • jupyter
    • macos
    • CPP
      • Debugging
      • Overview of memory management problems
      • What are lvalues and rvalues?
      • The Rule of Five
      • Concurrency
      • Avoiding Data Races
      • Mutex
      • The Monitor Object Pattern
      • Lambdas
      • Maya C++ API Programming Tips
      • How can I read and parse CSV files in C++?
      • Cpp NumPy
    • Advanced Machine Learning
      • Wk 1
      • Untitled
      • Untitled
      • Untitled
      • Untitled
  • data science
    • Resources
    • Tensorflow C++
    • Computerphile
      • Big Data
    • Google ML Crash Course
    • Kaggle
      • Data Versioning
      • The Basics of Rest APIs
      • How to Make an API
      • How to deploying your API
    • Jupiter Notebook Tips & Tricks
      • Jupyter
    • Image Datasets Notes
    • DS Cheatsheets
      • Websites & Blogs
      • Q&A
      • Strata
      • Data Visualisation
      • Matplotlib etc
      • Keras
      • Spark
      • Probability
      • Machine Learning
        • Fast Computation of AUC-ROC score
    • Data Visualisation
    • fast.ai
      • deep learning
      • How to work with Jupyter Notebook on a remote machine (Linux)
      • Up and Running With Fast.ai and Docker
      • AWS
    • Data Scientist
    • ML for Beginners (Video)
    • ML Mastery
      • Machine Learning Algorithms
      • Deep Learning With Python
    • Linear algebra cheat sheet for deep learning
    • DL_ML_Resources
    • Awesome Machine Learning
    • web scraping
    • SQL Style Guide
    • SQL - Tips & Tricks
  • 💡Ideas & Thoughts
    • Outdoors
    • Blog
      • markdown
      • How to survive your first day as an On-set VFX Supervisor
    • Book Recommendations by Demi Lee
  • career
    • Skills
    • learn.co
      • SQL
      • Distribution
      • Hypothesis Testing Glossary
      • Hypothesis Tests
      • Hypothesis & AB Testing
      • Combinatorics Continued and Maximum Likelihood Estimation
      • Bayesian Classification
      • Resampling and Monte Carlo Simulation
      • Extensions To Linear Models
      • Time Series
      • Distance Metrics
      • Graph Theory
      • Logistic Regression
      • MLE (Maximum Likelihood Estimation)
      • Gradient Descent
      • Decision Trees
      • Ensemble Methods
      • Spark
      • Machine Learning
      • Deep Learning
        • Backpropagation - math notation
        • PRACTICE DATASETS
        • Big Data
      • Deep Learning Resources
      • DL Datasets
      • DL Tutorials
      • Keras
      • Word2Vec
        • Word2Vec Tutorial Part 1 - The Skip-Gram Model
        • Word2Vec Tutorial Part 2 - Negative Sampling
        • An Intuitive Explanation of Convolutional Neural Networks
      • Mod 4 Project
        • Presentation
      • Mod 5 Project
      • Capstone Project Notes
        • Streaming large training and test files into Tensorflow's DNNClassifier
    • Carrier Prep
      • The Job Search
        • Building a Strong Job Search Foundation
        • Key Traits of Successful Job Seekers
        • Your Job Search Mindset
        • Confidence
        • Job Search Action Plan
        • CSC Weekly Activity
        • Managing Your Job Search
      • Your Online Presence
        • GitHub
      • Building Your Resume
        • Writing Your Resume Summary
        • Technical Experience
      • Effective Networking
        • 30 Second Elevator Pitch
        • Leveraging Your Network
        • Building an Online Network
        • Linkedin For Research And Networking
        • Building An In-Person Network
        • Opening The Line Of Communication
      • Applying to Jobs
        • Applying To Jobs Online
        • Cover Letters
      • Interviewing
        • Networking Coffees vs Formal Interviews
        • The Coffee Meeting/ Informational Interview
        • Communicating With Recruiters And HR Professional
        • Research Before an Interview
        • Preparing Questions for Interviews
        • Phone And Video/Virtual Interviews
        • Cultural/HR Interview Questions
        • The Salary Question
        • Talking About Apps/Projects You Built
        • Sending Thank You's After an Interview
      • Technical Interviewing
        • Technical Interviewing Formats
        • Code Challenge Best Practices
        • Technical Interviewing Resources
      • Communication
        • Following Up
        • When You Haven't Heard From an Employer
      • Job Offers
        • Approaching Salary Negotiations
      • Staying Current in the Tech Industry
      • Module 6 Post Work
      • Interview Prep
  • projects
    • Text Classification
    • TERRA-REF
    • saildrone
  • Computer Graphics
  • AI/ML
  • 3deeplearning
    • Fast and Deep Deformation Approximations
    • Compress and Denoise MoCap with Autoencoders
    • ‘Fast and Deep Deformation Approximations’ Implementation
    • Running a NeuralNet live in Maya in a Python DG Node
    • Implement a Substance like Normal Map Generator with a Convolutional Network
    • Deploying Neural Nets to the Maya C++ API
  • Tools/Plugins
  • AR/VR
  • Game Engine
  • Rigging
    • Deformer Ideas
    • Research
    • brave rabbit
    • Useful Rigging Links
  • Maya
    • Optimizing Node Graph for Parallel Evaluation
  • Houdini
    • Stuff
    • Popular Built-in VEX Attributes (Global Variables)
Powered by GitBook
On this page
  • Go Further
  • CMake and Make
  • Relationships among classes in object-oriented programming
  • GDB
  1. coding
  2. CPP

Debugging

1. Debugging

Hey i am giving you a very cool piece of code which will be very much helpful in debugging.

Let me give you an example:

#include <iostream>
#include <string>

#define printVariableNameAndValue(x) cout<<"The name of variable **"<<(#x)<<"** and the value of variable is => "<<x<<"\n"
// I am talking about this piece of code ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

using namespace std;


int main(){
    int n = 25;
    string myFirstStringEver = "Hello World";

    printVariableNameAndValue(n);
    printVariableNameAndValue(myFirstStringEver);

}

The output of the function

The name of variable **n** and the value of variable is => 25
The name of variable **myFirstStringEver** and the value of variable is => Hello World

So what this following piece of code does is that it takes your variable and then by writing (#x) it converts the name of the variable into a string and then obviously the variable x holds the value of x so the second half of the code <<x<< will print the value of x;

I think you should try to run the code once and then you will understand the working of the code.

2. Commenting

In his book Clean Code, advocates using comments for the following purposes: 1.Explanation of Intent 2.Clarification 3.Warnings 4.Amplification 5.ToDo At a minimum, comments should describe what each public member does and how to use it, and explain all parameters and return values with acceptable ranges (e.g. between 1 and 1000) for each.

3. References to a Live Project

4. Awesome Resources on Web

Here are some awesome resources I like to go through as additional material for C++ OOP:

Here are a few additional resources you can look at it for more information on Object Oriented Programming:

You may also find the following reading material helpful:

5. Some Linux Exclusive Resources

Go Further

These resources can help you step up your game:

Tools for C++:

Go deeper into the Project:

CMake and Make

In the beginning, it is usually not very clear what those build systems or build system generators are and how they can be beneficial to us. I would like to share with you some resources to help with this.

Please note that CMake isn't a build system, it's a build system generator. This is why we need to invoke make after running cmake. Running cmake generates Makefiles with the appropriate platform dependencies, and running make actually uses them.

However we don't need to write Make files, as CMake does this for us, it is good to understand about build systems.

When you write a program, the compiler will check to ensure that you have followed the rules of the language in which you have written code. If you have done something that definitively violates the rules of the language, during compilation the compiler will emit an error, providing both line number containing the error, and some text about what was expected vs what was found. The actual error may be on that line, or on a preceding line. Once you’ve identified and fixed the erroneous line(s) of code, you can try compiling again.

In other cases, the compiler may find code that seems like it might be in error, but the compiler can’t be sure (remember the motto: “trust the programmer”). In such cases, the compiler may opt to issue a warning. Warnings do not halt compilation but are notices to the programmer that something seems amiss.

In most cases, warnings can be resolved either by fixing the error the warning is pointing out or by rewriting the line of code generating the warning in such a way that the warning is no longer generated.

In rare cases, it may be necessary to explicitly tell the compiler to not generate a particular warning for the line of code in question. C++ does not support an official way to do this, but many individual compilers (including Visual Studio and GCC) offer solutions (via non-portable #pragma directives) to temporarily disable warnings.

Some of the best practices about compiler warnings :

  1. Don’t let warnings pile up. Resolve them as you encounter them (as if they were errors).

  2. Turn your warning levels up to the maximum, especially while you are learning. It will help you identify possible issues.

  3. It is also possible to tell your compiler to treat all warnings as if they were errors (in which case, the compiler will halt compilation if it finds any warnings). This is a good way to enforce the recommendation that you should fix all warnings (if you lack self-discipline, which most of us do).

For More Visit these links

Relationships among classes in object-oriented programming

GDB

PreviousCPPNextOverview of memory management problems

Last updated 4 years ago

The line you just use implements the use of preprocessor directives commonly referred to with the name macro. For more, you must visit .

There is a nice article on the pros and cons of commenting, click Efficiency comes with practice (writing more and more programs). There is a whole chapter on comments in Book Clean Code by Robert C. Martin. for the book. Summary of the chapter:

Once you are done with this project then you should have a look at the . I have looked at all the files and found very great details, very minute details. I was so impressed that I even made changes to my code according to those minute details. It is good if you want to explore that too but i would recommend if you get stuck with any terms then google it and even after that you do not get it then you should just leave it like that because some of the terms might come up from Operating Systems and knowing just a a little bit (You might understand it the wrong way) about a very important and heavy concept is not recommended from my side.

You can check out from chapter 8-12 and even later chapters to do some more practice in OOP --

A short and quick but wonderful tutorial on OOP --

Great series on basic C++ with some important OOP concepts throughout the series --

A good overview of OOP though it's covered in Python you will find a lot of concepts well explained --

A good amount of OOP concepts are used while making this role-playing game. I am posting only the first part of the series but there are 4 parts for this series so do complete them. You will have a fun time doing it --

Another good resource on Polymorphism --

A great video on Pointers --

- This back to basics series is so much awesome. I would recommend you to go through all of the back to basics CppCon

How to View Running processes on Linux! Please find the

Overview of and how it manages cross-platform build processes.

Introduction to CMake by that apply single file project, and multiple directory projects.

Introduction to and how it uses the Makefile generated by CMake to build the system.

How to . This is just for your information. It is already automated through CMake.

Object-oriented programming generally supports 4 types of relationships that are: inheritance, association, composition, and aggregation. All these relationships is based on "is a" relationship, "has-a" relationship, and "part-of" relationship. This is a very important topic to get a good grip on. Please refer to this for more details on it.

👨‍💻
this link
here
Click here
htop package
learncpp
Basic Concepts of Object Oriented Programming using C++
Object Oriented Programming
4 Advantages of Object-Oriented Programming
Differences between Procedural and Object Oriented Programming
Modern C++ Object-Oriented Programming
C++ Beginner Game Programming
Object Oriented Programming
Code-It-Yourself! Role Playing Game
Polymorphism
What Are Pointers? C++
C++ Core Guidelines
CppCon 2019 – Back to Basics Object Oriented Programming
SOLID
Design Patterns
Code Complete, Steve McConnell
Clean Code, Robert C Martin
The Pragmatic Programmer, Andrew Hunt and Dave Thomas.
Design Patterns: Elements of Reusable Object Oriented Software, Emich Gamma et all.
Shell Workshop
link
Learning Bash
https://google.github.io/styleguide/cppguide.html
https://developers.google.com/edu/c++/
https://techdevguide.withgoogle.com/resources/programming_languages/c-plus-plus/?programming_languages=c-plus-plus
https://gist.github.com/lefticus/10191322
https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md
https://visualstudio.microsoft.com/vs/features/cplusplus/
https://dev.to/dwd/tools-for-c-development
https://blog.education-ecosystem.com/thetenbestccproductivitytoolspluginsandlibraries/
https://codecondo.com/top-10-ide-for-c-and-cplusplus-for-programmers/
http://www.stroustrup.com/compilers.html
https://github.com/hishamhm/htop
https://github.com/GNOME/gnome-system-monitor
https://github.com/brndnmtthws/conky
https://github.com/topics/process-monitor?l=c%2B%2B&o=desc&s=forks
https://docs.microsoft.com/en-us/windows/win32/psapi/process-status-helper
CMake
examples
Make
write Makefiles
Link 1: Configuring your compiler: Warning and error levels
Link 2: Suppressing the warning
Link 3: Guidelines on warning
Intel® C++ Compiler 19.0 Developer Guide and Reference
page
LogoGDB online Debugger | Compiler - Code, Compile, Run, Debug online C, C++GDB online Debugger
LogoSetup gdb on macOS in 2020DEV Community