The PyGuy journey towards C++
Tags: python, learning
Published: 2019-09-08 15:29:12

---
title: The PyGuy journey towards C++
published: true
tags: 
canonical_url: https://chkrishnatej.com/posts/pyguy-to-cpp/
---

Python. I would say it is super awesome. It ticks for all the right check boxes.

- <input type="checkbox" checked disabled> Ease
- <input type="checkbox" checked disabled> Simplicity
- <input type="checkbox" checked disabled> Community
- <input type="checkbox" checked disabled> Documentation
- <input type="checkbox" disabled> Speed - Meh!!(Compared to Python)

Now don’t get me wrong. I 💝 Python. I literally made my first programming job gig with Python. It was like a dream programming language come true. Name any data structure, and it is already available there for you (_which suits in most of the cases_).  
  
And add to that there are custom data structures which are available on top of them. Now, life is easy. I need something, I google it or go through the documentation of Python, I will land on a solution pretty much which suits my use case. And to top all that, the package repository is awesome. Great stuff.

* * *

### <svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>What is the motivation to learn C++?

[<picture>
        <source srcset="/static/703e06e58b8be8c6e5a9adbf20a710b4/01472/inspiration.webp 240w,
/static/703e06e58b8be8c6e5a9adbf20a710b4/222bd/inspiration.webp 480w,
/static/703e06e58b8be8c6e5a9adbf20a710b4/620b9/inspiration.webp 960w,
/static/703e06e58b8be8c6e5a9adbf20a710b4/28063/inspiration.webp 1440w,
/static/703e06e58b8be8c6e5a9adbf20a710b4/34ef4/inspiration.webp 1920w,
/static/703e06e58b8be8c6e5a9adbf20a710b4/354d4/inspiration.webp 2918w" sizes="(max-width: 960px) 100vw, 960px" type="image/webp"></source>
        <source srcset="/static/703e06e58b8be8c6e5a9adbf20a710b4/3bc27/inspiration.jpg 240w,
/static/703e06e58b8be8c6e5a9adbf20a710b4/98431/inspiration.jpg 480w,
/static/703e06e58b8be8c6e5a9adbf20a710b4/b3ee8/inspiration.jpg 960w,
/static/703e06e58b8be8c6e5a9adbf20a710b4/b97fe/inspiration.jpg 1440w,
/static/703e06e58b8be8c6e5a9adbf20a710b4/fb329/inspiration.jpg 1920w,
/static/703e06e58b8be8c6e5a9adbf20a710b4/3ca40/inspiration.jpg 2918w" sizes="(max-width: 960px) 100vw, 960px" type="image/jpeg"></source>
        <img src="https://chkrishnatej.com/static/703e06e58b8be8c6e5a9adbf20a710b4/b3ee8/inspiration.jpg" alt="inspiration.jpg" title="inspiration.jpg" loading="lazy">
      </picture>](/static/703e06e58b8be8c6e5a9adbf20a710b4/3ca40/inspiration.jpg)

Ya, I know I have been bragging on Python. But as I progressed in my career, getting into solving complex problems, performance is becoming a bottle neck. Almost all the heavy lifting is done by Python STL and libraries. And I take care of only implementing the solution and not touch about how it fundamentally interacts with the machine.

And I started programming journey with C++, but couldn’t really take it forward due to the steep learning curve.

* * *

### <svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>Why C++?

I needed some real challenge to learn and implement concepts on my own rather than using the API implementation provided by Python. So I chose to go for a language which provides me:

- Bare minimum functionality (Compared to Python)
- Understanding of memory management
- Understanding low level implementation of OOPS concepts and data structures

* * *

### <svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>Learning Resources

I skimmed through a lot of learning resources in the internet, but honestly there were no courses or bootcamps which have a comprehensive syllabus which covers good part of the C++. I have decided to go with the book written by C++ creator Bjarne Stroustrup, as my primary material

- [Programming: Principles and Practice Using C++ 2nd Edition](https://www.amazon.com/gp/product/B00KPTEH8C).

  - This is the only book I found which is updated to **C++ 14** standard
- [C++ Primer 5th Edition](https://www.amazon.com/dp/B0091I7FEQ/)

  - I have seen many Reddit recommendations for this book to learn C++. It is updated to **C++ 11** standard

I hope I this journey would be a fruitful one.🙂

Please leave your comments below on your **C++** learning path