All Stories

14 May 2019

My Little DOH! Moment Did you ever debug a piece of code, and said to yourself: “this shouldn’t happen!”? Well, me too, so when it happened to me and I learned why it happened, I thought it’s worth sharing. In my project I have two classes, let’s for simplicity call them Bouncer & EntranceChecker, Now I know that Bouncer is basically EntranceChecker, but bare with me, it’s not really important to the story. Bouncer holds EntranceChecker and every time a Person tried to enter, Bouncer calls EntranceChecker’s isInTheGuestList method, and if the person in the list Bouncer return not to block, else it blocks. public class Bouncer { private final EntranceChecker entranceChecker; public Bouncer(EntranceChecker entranceChecker) { this.entranceChecker = entranceChecker; } public boolean shouldBlock(Person person) { return !entranceChecker.isInTheGuestList(person); } } public class EntranceChecker { private final Set<String> names; public EntranceChecker(Set<String> names) { this.names = names; } boolean isInTheGuestList(Person person) { if(person == […]

13 March 2018

One pleasant morning I got to work, thinking this day couldn’t get any better. But as Murphy would have it, there was my boss walking frantically toward me. It turned out that almost over night one of the main data pipeline systems had become a major bottleneck for the company, and a solution was needed, Fast! Usually in a startup, let alone a company moving as fast as Taboola, these things can occur on a weekly basis. I needed to find some quick wins to relieve some of the bottlenecks inside the system. Luckily Re2 was there to the rescue – in this post I will share how to find the bottlenecks using Gprof2dot beautiful image rendering, and of course, what Re2 is and how to use it. * Note that this article addresses a pain I had in a Python framework, but because there are Re2 implementations to all […]

Start Your Taboola Career Today!