I recently put a kprobe using eBPF for a function that accepts 8 parameters. The trouble is that BPF_KPROBE macro can only handle functions with up to 5 parameters but I was interested in most of them. It took a bit of fiddling to get to all of them and...| Developer's Perspective
The Google Style Guide (GSG) for C++ has become popular outside of just Google. But I don’t like it at all. There… I said it. Now I want to take this opportunity to explain why I feel so strongly about it. GSG “style” The general observation is that the style...| Developer's Perspective
If you happen to follow the world of IT infrastructure, DevOps, or just happen to be an IT professional, you, no doubt, have heard of the container revolution. Propelled into popularity by Docker, containers (and the ecosystem around them) seem to be the answer to all things ops. I, too,...| Developer's Perspective
Suppose we need to write a factory function that constructs a runtime polymorphic object. For the purposes of this post, let’s say we want to construct a concrete shape object – a rectangle, triangle, or an ellipse. Here are our basic declarations: 1 2 3 4 5 6 7 8...| Developer's Perspective
I recently needed to work on two git branches simultaneously. My particular use case required me to make small changes to both branches, rebuild and run. These were temporary changes that I was going to blow away at the end. One approach could have been to have two clones of...| Developer's Perspective
I decided to venture out into the unknown -- iOS development. My first app -- LastPark -- saves the last location where the car was parked. I was solely trying to scratch a personal itch as I often forget on what street or what end of the parking lot I...| Developer's Perspective
Most of the time we don't have to worry about defining copy/move constructors and assignment operators -- the compiler happily generates them for us. Sometimes, however, we must do the dirty work ourselves and code them up manually, often together with the destructor. By hand crafting the assignment operators, we...| Developer's Perspective
In this post, I will divert from my usual topic of C++ to jog down my thoughts about TCP and SSL. I have limited knowledge of networking and even more limited understanding of security so my ramblings here might be full of flaws and security holes. Nevertheless, I thought it...| Developer's Perspective
Many programming languages take inspiration from the language of mathematics and emulate Set-builder Notation. Take for instance the following set, specified by the set-builder notation:Haskell, for example, has List Comprehension syntax which allows for expressing the above set as:[x^2 | x <- [0..], x > 5]C# supports LINQ, which borrows...| Developer's Perspective
It's a simple task -- you want iterate over all the lines in a file and perform an action on each one. In Python it's as simple as:for line in open("somefile.txt"): print lineHow about C++11. How hard can it be? This stackoverflow post gives us a starting point. We...| Developer's Perspective
I recently finished reading biography of Steve Jobs by Walter Isaacson. It's a great book that shows Jobs not only from his side but also as perceived by his friends and enemies. After reading the book, I can certainly say that Steve Jobs was a complicated person. I can't say...| Developer's Perspective
In my last post, we developed an EDSL for specifying TBB Flow Graph structure with the help of Boost.Proto. Instead of writing a series of tbb::flow::make_edge calls, we can use a little language to help us be more declarative. In the process, however, we lost some of the runtime efficiency. Instead...| Developer's Perspective
Intel Threading Building BlocksAs the hardware engineers cram more and more cores into the processors, software engineers are left to ponder about how to best exploit these new capabilities. Intel offers an open source C++ library they call Threading Building Blocks (TBB). Akin to competing solutions (OpenMP, GCD, PPL), the...| Developer's Perspective
Go language has defer statements which allow for postponing execution of a function or method call until the end of the current function. Similarly, D has scope guard statements which allow statement execution to be delayed until the end of the scope (optionally specified to only execute under successful or failed scenarios).GoDlock(l)// unlocking happens...| Developer's Perspective
In the previous post, we developed a logarithmic depth accumulate() function that can be used to emulate a for-loop. In this post, we'll look at how to construct a function that emulates a while-loop with the recursive depth of O(lg(n)) where n is the number of iterations of the while-loop....| Developer's Perspective
While reading "Want speed? Use constexpr meta-programming!" blog post, I started thinking about how to reduce the recursion depth of such calculations. After all, using a compiler option to increase the recursion depth limits is not very friendly (gcc sets the limit at 512 by default). But before we get to...| eyakubovich.github.io
The guidance around function arguments and smart pointers is quite old, yet I still see it used incorrectly. In this post, we’ll explore the guidance and the costs of not following the advice. C++ Core Guidelines make this point clear: F.7: For general use, take T* or T& arguments rather...| eyakubovich.github.io