top of page



Welcome to EmbeddedHow
Home: Welcome
Home: Blog2
Search


Smart Pointers: Understanding Ownership, Memory Overhead and Common Pitfalls
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows your whole leg off. — Bjarne Stroustrup Smart pointers are one of the most useful additions introduced in modern C++. Most developers know that smart pointers help prevent memory leaks by automatically releasing dynamically allocated objects. However, understanding the ownership model and memory overhead of different smart pointers is equally important, especially in embedd

Sunil Kumar Yadav
6 days ago5 min read
Â
Â
Â


C++ Upcasting and Downcasting Simplified
Inheritance allows us to treat derived class objects as base class objects. This capability forms the foundation of runtime polymorphism in C++. While working with inheritance, you will often come across the terms Upcasting and Downcasting. Introduction In this article, we'll understand what they mean, when they are useful, and why one is generally considered safer than the other. Let's start with a simple inheritance hierarchy. #include <iostream> class Animal { public: vir

Sunil Kumar Yadav
7 days ago4 min read
Â
Â
Â


C++ Object Slicing Simplified
Object-oriented programming and polymorphism are fundamental concepts in C++. Most developers learn that virtual functions allow derived classes to provide specialized implementations while interacting through a base class interface. However, there is a subtle issue that can silently break polymorphism: Object Slicing. In this article, we'll understand what object slicing is, why it happens, and how to avoid it using a few simple examples. What is Object Slicing? Object slici

Sunil Kumar Yadav
May 313 min read
Â
Â
Â


Concurrency In C++: How To Avoid Deadlock
In our last couple of articles we've tired to go through the fundamentals of concurrenc y in C++ using Standard Template Library. We've...

Sunil Kumar Yadav
Sep 30, 20245 min read
Â
Â
Â


Concurrency in C++: Sharing Data Between Threads Using Mutex
In my last article C++: Introduction to Concurrency , I've gone through fundaments of concurrency and it's benefits in terms of improving...

Sunil Kumar Yadav
Sep 22, 20245 min read
Â
Â
Â


C++: Introduction to Concurrency
Concurrency in C++ is a powerful feature that enables developers to create applications capable of performing multiple tasks...

Sunil Kumar Yadav
Sep 18, 20246 min read
Â
Â
Â


Adaptor: Must Know Design Pattern (7/7)
In my last article, I discussed the Strategy pattern, which falls under the Behavioural Design Pattern. The Adaptor pattern is classified...

Sunil Kumar Yadav
Oct 22, 20232 min read
Â
Â
Â


Singleton: Must Know Design Pattern (3/7)
Singleton is a part of Gang of Four design pattern and it is categorized under creational design patterns. In this article, we will delve...

Sunil Kumar Yadav
Oct 2, 20233 min read
Â
Â
Â


Builder: Must Know Design Pattern (2/7)
In my last article, I discussed the Factory design pattern. Key disadvantages of the Factory method patterns were 1. the high number of...

Sunil Kumar Yadav
Oct 2, 20232 min read
Â
Â
Â


Factory Method: Must Know Design Pattern (1/7)
Factory pattern is a type of Creational Design Pattern. Factory patterns define an interface for creating an object, but let subclasses...

Sunil Kumar Yadav
Sep 24, 20232 min read
Â
Â
Â


Design Pattern: Overview of Reusable Object-Oriented Software
In software engineering, a software design pattern is a general, reusable solution to a commonly occurring problem within a given context...

Sunil Kumar Yadav
Sep 17, 20232 min read
Â
Â
Â


Operation Mode and Access Level in ARM Cortex M
In our last article, we've gone through a brief overview of ARM Cortex M series microcontrollers and using the STM32 development board...

Sunil Kumar Yadav
Aug 28, 20234 min read
Â
Â
Â


S.O.L.I.D. Principles of Object-Oriented Programming
The SOLID principles were introduced by Robert C. Martin also known as "Uncle Bob" in his 2000 paper "Design Principles and Design...

Sunil Kumar Yadav
Dec 4, 20227 min read
Â
Â
Â


Introduction to Java Virtual Machine
If you are like me who is from an embedded background and never used Java before but suddenly there is a need to know Java as your...

Sunil Kumar Yadav
Oct 5, 20225 min read
Â
Â
Â


Debugging Data Race Conditions Using Thread Sanitizer
In past to speed up the execution of software one had to either upgrade the underlying hardware i.e. microcontroller or microprocessor...

Sunil Kumar Yadav
Apr 25, 20224 min read
Â
Â
Â


String Representation of Class Object
Python is one of the most popular languages being by developers and it's being used in developing websites and software, task automation,...

Sunil Kumar Yadav
Feb 4, 20224 min read
Â
Â
Â


MRO: Understanding Inheritance in Python
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built-in data...

Sunil Kumar Yadav
Jan 8, 20225 min read
Â
Â
Â


Understanding C++ Lambda
C++ 11 standard introduced many new features in the C++ language making it truly a modern language. Features introduced since C++11 were...

Sunil Kumar Yadav
Dec 18, 20214 min read
Â
Â
Â


What is Dynamic Programming?
As software engineers, our aim is to develop efficient programs to solve given problems. In this process, we come across many programming...

Sunil Kumar Yadav
Nov 28, 20213 min read
Â
Â
Â


Understanding C++ Default Constructor
C++ is one of the most popular programming languages which is being used in multiple domains. Probably there are billions of lines of...

Sunil Kumar Yadav
Nov 6, 20215 min read
Â
Â
Â
Home: Subscribe
Home: Contact
bottom of page