A look at the complete process of transforming a source code into an executable format

Photo by Max Böttinger on Unsplash

At a high level, I’ll be looking at the output of each stage of compiling a simple C++ program using Clang. I’ll also follow our simple code in the disassembly output a little more closely and discuss parts of an ELF file.

When you fully compile your program, it produces an executable binary. For example, this simple program…

No, not really, that would be an insane title but then that’s what this post is about. Actually, no, that’s not quite right. I recently read about a combinatorial problem of generating permutations such that no element is placed in its original position, and that’s what this post is about. Derangement is what such a permutation is called.

For example, let’s say in a peer reviewed course, an assignment is to be distributed to students then it makes sense that each student gets an assignment to review other than one’s own. …

Google Public Dataset provides an obfuscated dataset of its Merchandise Store. Some of the questions we can ask are:

  • Where are the buyers from?
  • What kind of platform or technology the buyers are using?
  • Can we build a classification model to distinguish between a potential buyer or a window shopper?

Later, we will evaluate different classifiers to identify potential buyers.

Merchandise Store

The store (shop.googlemerchandisestore.com) sells Google-branded merchandise. If you navigate to the…

Modified Image from NASA

When we try to pick out anything by itself, we find it hitched to everything else in the universe. (John Muir)

Searing bright flames leaped and engulfed the majestic oak and pine trees, along with anything that was caught in its way, that wildfire, the California Campfire, was one of the most destructive in California’s history of wildfires. Even if you were a few hundred miles away, somewhere in the bay area, you could feel the smoke-filled air scorching your throat and constricting the airways as you inhale.

Although many different factors lead to the back to back wildfires, climate…

In the same spirit as that of my last post, I found myself needing to compare strings that my hobby project is receiving on command line arguments and to take specific actions based on what was passed.

The usual if-else statement felt like a lot of typing and I thought why not just use lambdas to dictate what needs to be done and use the unordered_map to match the string and execute the appropriate lambda.

Ergo, I got started on this task. I know I need a hash map of a sort and although in C++, keys don’t need to…

There is a hobby project that I’m doing and found myself in need of using date/time facilities available in the chrono library. My tasks at this stage are simple:

  1. Get the current date and time
  2. Get date and time beginning midnight
  3. Do some comparison between (1) and (2)

system_clock is a system-wide wall clock and it is better suited for my…

Ambreen H.

Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store