<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Omri Fima on Medium]]></title>
        <description><![CDATA[Stories by Omri Fima on Medium]]></description>
        <link>https://medium.com/@thegreymatter?source=rss-8441ff3f1faf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Omri Fima on Medium</title>
            <link>https://medium.com/@thegreymatter?source=rss-8441ff3f1faf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 13:00:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thegreymatter/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI Agent Evaluation and the Metric Theater Problem.]]></title>
            <link>https://medium.com/@thegreymatter/ai-agent-evaluation-and-the-metric-theater-problem-618c6033817f?source=rss-8441ff3f1faf------2</link>
            <guid isPermaLink="false">https://medium.com/p/618c6033817f</guid>
            <category><![CDATA[agent-evaluation]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[llm-agent-evaluation]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm-agent]]></category>
            <dc:creator><![CDATA[Omri Fima]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 05:02:26 GMT</pubDate>
            <atom:updated>2025-09-07T05:02:26.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*Q6xBVE_dZDpqSwXXQqUCng.png" /></figure><p>I was testing our new “dev-on-call” agent last Thursday at 9 PM. On paper, this thing was supposed to be incredible 95.3% accuracy on our incident test suite, P90 response time of less than 10 seconds, perfect tool usage scores across our monitoring APIs, log aggregation systems, and runbook databases. The demo videos looked slick, the user training went great, and our DevOps team was practically doing victory laps.</p><p>So when the pager went off for a real incident, users reporting 500 errors on our service , I decided to let our shiny new agent take point while I watched from the sidelines.</p><p>The agent immediately sprung into action. It correctly identified this as a service availability issue (check!), properly queried our monitoring dashboards (check!), found elevated error rates in the LLM client (check!), detected LLM API connection timeouts in the logs (check!), and then… said “This appears to be an infrastructure problem with your cloud provider. There’s nothing I can do about this.”</p><p>And that was it. End of conversation.</p><p>I sat there staring at my screen, watching our “95.3% accurate” agent essentially shrug its digital shoulders and walk away from an active production incident because it deemed the LLM timeouts unfixable. Sure, I couldn’t magically fix my cloud provider issues, but I could route traffic around the broken service, alert stakeholders, implement fallbacks, update monitoring thresholds. Our agent saw an unsolvable root cause and quit. I saw an business problem that needed creative workarounds.</p><h3>The Metric Theater Problem</h3><p>This is what I call Metric Theater — when we get so caught up in measuring things that are easy to measure that we forget to measure the things that actually matter.</p><p>It’s like judging a restaurant by how quickly they can heat up food in the microwave instead of whether the food tastes good. Sure, speed matters, but if your “30-second pasta” tastes like a mush, you’ve optimized for the wrong thing.</p><p>Here’s the uncomfortable truth: most agent evaluation frameworks I see are measuring computational performance, not user success. They’re measuring how well the agent talks to APIs, not how well it solves real problems.</p><p>The appeal of these metrics is obvious, they’re incredibly convenient. You can set up automated benchmarks, generate clean charts showing steady improvement, and demonstrate clear ROI to stakeholders. There’s something satisfying about watching your accuracy scores climb from 85% to 92%, or seeing your function call success rates jump from 78% to 86%. These numbers are concrete, reproducible, and easy to communicate up the chain. But convenience isn’t the same as correctness, and the metrics that are easiest to capture are often the furthest from what users actually care about.</p><h3>Let’s Get Real About What Actually Matters</h3><p>I’ve been thinking about this a lot, and I think there are really only three things you should obsess over when evaluating agents. Everything else is nice-to-have at best, and potentially misleading at worst.</p><h4>1. Task Completion</h4><p>Did the user get what they wanted? Not “did the agent follow the right process” or “did it use the tools correctly.” Did the human being on the other end walk away thinking “that worked”?</p><p>This sounds obvious, but you’d be surprised how many evaluation systems I see that never actually ask this question. They measure whether the agent called the right APIs, whether it parsed the response correctly, whether it formatted the output nicely, or provided the right information. but they never measure whether the user’s actual problem got solved.</p><p>Here’s how I think about it, if someone asks your agent to “book me a flight to New York next Tuesday,” success isn’t measured by how perfectly it parsed the request or how efficiently it called the booking API. Success is measured by whether there’s a confirmed seat with their name on a plane to New York next Tuesday, preferrably a aisle seat.</p><p>Everything else is implementation details.</p><h4>2. User Confidence</h4><p>This one’s sneaky because it’s harder to measure, but it’s absolutely critical. Does the user trust what the agent did?</p><p>You can have a 100% task completion rate, but if users are double-checking everything the agent does, you haven’t really automated anything. You’ve just created a very expensive, very complicated way for users to do their own work.</p><p>I learned this the hard way with an agent that was technically perfect at parsing meeting transcripts and creating action items. Great accuracy, perfect formatting, blazing fast performance. Users hated it. Why? Because they never felt confident the agent had caught everything important, so they ended up reading through the entire transcript anyway.</p><p>The agent was solving the wrong problem. Users didn’t want perfect action item formatting — they wanted to trust that they could skip reading the transcript.</p><p>Measure confidence. Ask users: “How confident are you that this is correct?” Track it over time. If confidence isn’t going up, your other metrics probably don’t matter.</p><h4>3. Failure Recovery</h4><p>Here’s something most evaluation frameworks completely ignore: how does your agent handle things going wrong?</p><p>Some questions dont have solutions. User requests are ambiguous. External systems return garbage data. Your agent will encounter scenarios it wasn’t trained for. The question isn’t whether these things will happen — it’s how gracefully your agent handles them when they do.</p><p>The best agents I’ve worked with aren’t the ones that never fail. They’re the ones that fail gracefully, communicate what went wrong, and give users a clear path forward.</p><p>Build scenarios where things break. Measure how often users can recover from failures without having to start over. Track whether error messages actually help users understand what happened.</p><h3>What You Should Stop Obsessing Over</h3><h4>Token Usage and Response Times (Unless You’re Paying By The Token)</h4><p>Look, I get it. Tokens cost money, and nobody wants their agent burning through API budgets like a crypto mining rig. But I see teams spending more time optimizing token usage than they spend improving user outcomes.</p><p>Here’s the thing: if your agent is solving users’ problems quickly and reliably, they don’t care if it uses 500 tokens or 1,500 tokens. They care that it works.</p><p>Yes, keep an eye on costs. Set reasonable budgets. But don’t let token optimization drive your evaluation strategy unless you’re operating at massive scale where every token actually matters.</p><h4>BLEU Scores and Semantic Similarity</h4><p>These metrics make sense in research papers, but they’re almost useless for real-world agent evaluation. I’ve seen agents with terrible BLEU scores that users loved, and agents with perfect semantic similarity that completely missed the point of user requests.</p><p>The problem with these metrics is that they measure how similar your agent’s output is to some “ground truth” reference, but in the real world, there often isn’t one correct answer. There are many good ways to solve a problem, and users care about outcomes, not whether your agent picked the same words as your test dataset.</p><h4>Tool Usage Accuracy (Means vs. Ends)</h4><p>“The agent used the right tools 94% of the time!” Okay, but did it solve the user’s problem?</p><p>I see this a lot with agents that have access to multiple tools or APIs. Teams get obsessed with whether the agent is choosing the “optimal” tool for each subtask, but this is like judging a carpenter by whether they used exactly the right hammer for each nail instead of whether the house stands up.</p><p>Users don’t care which API you called. They care whether you got them the information they needed.</p><h3>My Framework for Agent Evaluation That Actually Works</h3><p>Here’s how I approach agent evaluation these days:</p><p><strong>Start With Real Users, Not Synthetic Data</strong>: Your carefully crafted test cases are probably missing something important. Real users ask weird questions, have typos, change their minds mid-conversation, and want things you never thought of. Build your evaluation around real usage patterns.</p><p><strong>Measure Business Outcomes, Not Technical Metrics</strong>: What does success look like for your business? More sales? Fewer support tickets? Faster onboarding? Measure that. If your agent evaluation doesn’t tie back to business metrics, you’re probably measuring the wrong things.</p><p><strong>Build Feedback Loops Into The Product</strong>: Don’t make evaluation something that happens separately from the user experience. Build simple feedback mechanisms right into your agent interactions. Thumbs up/down, “did this solve your problem?” buttons, or one of the most effective approaches — “escalate to human”. Make it easy for users to tell you when things go wrong.</p><p><strong>Test Edge Cases, But Don’t Optimize For Them</strong>: Yes, your agent should handle weird edge cases gracefully. But don’t let edge case performance drive your entire evaluation strategy. Most users have common problems, and your agent should be great at solving those first.</p><p><strong>Fail Fast and Recover Faster</strong>: Build evaluation scenarios around failure modes. What happens when the database is down? What happens when the user’s request is impossible? Great agents shine in failure scenarios by communicating clearly what’s happening, explaining why something can’t be done, and offering meaningful alternatives or next steps.</p><h3>The Bottom Line</h3><p>The metrics that matter are the metrics that your users would choose. Everything else is means to an end, it might help you debug or prioritize problems, but shouldn’t drive your development decisions.</p><p>Stop measuring what’s easy. Start measuring what matters.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=618c6033817f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuration Creep: The Good, The Bad, and The “Why Does This Even Exist?”]]></title>
            <link>https://medium.com/@thegreymatter/configuration-creep-the-good-the-bad-and-the-why-does-this-even-exist-63f299588986?source=rss-8441ff3f1faf------2</link>
            <guid isPermaLink="false">https://medium.com/p/63f299588986</guid>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[technical-debt]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[configuration-management]]></category>
            <dc:creator><![CDATA[Omri Fima]]></dc:creator>
            <pubDate>Mon, 01 Sep 2025 04:34:17 GMT</pubDate>
            <atom:updated>2025-09-01T06:33:05.044Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Curse of Configuration Creep: The Good, The Bad, and The “Why Does This Even Exist?”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*BBYpT1Hj0j2rnf7yYEwfCw.jpeg" /></figure><p>Let’s talk about something that’s been bugging me lately. Actually, let me be more specific — something that’s been bugging me for <em>years</em>. Configurations. Those seemingly innocent little settings, stored in text files, environment variables or a dedicated config systems, that somehow multiply like rabbits and turn into thousand-line monsters that haunt our dreams and deployments.</p><p>I was debugging an issue last week (aren’t we always?) where something worked perfectly in staging but was broken in production. Classic, right? So I did what we all do — I started comparing config files between environments.</p><p>What I found was… depressing. A config file with 300+ settings sprawled across my screen. Three hundred! I’m sitting there with two files side by side, scrolling through endless sections trying to spot the differences. Database timeouts, cache settings, feature flags, API keys, retry counts, batch sizes, log levels — it was like playing the world’s most tedious game of “spot the difference.”</p><p>After an hour of this fun, I finally found the culprit: a config name typo buried on line 247. But here’s the kicker — I also discovered that out of those 300+ settings, only twelve had actually been changed from their defaults. TWELVE out of 300+.</p><p>Here’s the thing about configuration: <strong>it’s supposed to make your life easier</strong>. But somewhere along the way, we’ve collectively lost the plot.</p><h3>The Config Creep Problem</h3><p>This is what I call the Config Creep Problem. Every setting starts with the best of intentions. “Hey, let’s make the timeout configurable!” someone says in a code review. Makes sense, right? Fast forward 18 months and you’ve got timeout settings for everything: database timeouts, API timeouts, cache timeouts, timeout timeouts (okay, I made that last one up, but you get the idea).</p><p>Before you know it, your config file looks like the cockpit of a 747, except nobody has a pilot’s license and half the buttons might eject you from the plane.</p><h3>Let’s Get Real About Configuration Types</h3><p>I’ve been thinking about this, and I think there are really only four reasons we add configuration settings. Let me break them down:</p><h3>1. Environment Stuff (This One’s Legit)</h3><p>Connection strings, API endpoints, service URLs — stuff that’s genuinely different between dev, staging, and production. This is the <em>good</em> kind of configuration. The kind that makes sense. The kind that Uncle Bob would probably approve of (and he approves of very little).</p><p>Your dev database isn’t your prod database. Your staging API isn’t your production API. These differences are real, they’re necessary, and they belong in configuration files.</p><h3>2. The “Temporary” Toggles (Let’s Be Smarter About This)</h3><p>“Let’s add a feature flag so we can turn this off quickly if something breaks!” “Let’s make the batch size configurable so we can tune performance!” “Let’s add a setting for the cache expiration time!”</p><p>Here’s the thing — these aren’t inherently evil. Sometimes you DO need to tune a batch size. Sometimes you DO need to kill switch a feature. The problem isn’t the capability — it’s how we expose it.</p><p><strong>The wrong way</strong>: Making these first-class configuration settings that everyone has to think about, document, and set values for in every environment.</p><p><strong>The right way</strong>: Ship with rock-solid defaults that work great out of the box. Then — and this is key — provide <em>optional</em> overrides that are tucked away, and clearly marked as “advanced/emergency use only.”</p><p>Think of it like this: your car has an engine. It has sensible defaults for timing, fuel mixture, all that stuff. But if you REALLY need to, you can pop the hood and adjust things. The difference is that Toyota doesn’t hand you a 500-page manual of engine tuning parameters when you buy the car.</p><p>Your team members (or you at 2 AM in six months from now) shouldn’t see BATCH_SIZE=50 in their config template. They should see a system that works perfectly with sensible defaults, and maybe - MAYBE - there&#39;s an BATCH_SIZE config they can set if they&#39;re having specific performance issues.</p><p><strong>Pro tip</strong>: If a setting hasn’t changed in 6 months, it shouldn’t be a visible setting. It should either be a constant in your code OR a hidden override that 99% of users never know exists.</p><h3>3. Business Logic Masquerading as Configuration (Nope, Nope, Nope)</h3><p>This is where I see a lot of smart people make not-so-smart decisions. Business rules, table names, validation rules — all living in JSON or YAML files because “we might want to change it. And i dont like magic constants in my code”</p><p>I get it. At the beginning, using config files seems totally reasonable. I mean, the infrastructure is already there, right? You’ve got configuration loading working, you can change values without redeploying code — it feels like the path of least resistance.</p><p>But here’s the thing that becomes painfully obvious later: <strong>configuration files are not databases</strong>.</p><p>They don’t have proper versioning (yes, Git counts, but barely). They don’t have rollback strategies. They definitely don’t have approval workflows or audit trails.</p><p>Here’s the real issue: complex business rules need proper tooling. You can’t just shim them up into magical 600-character strings that anyone can fat-finger or push from the outside. When your logic or validation rules live in a config file, you’re one typo away from a bug.</p><p>Put this stuff in your database with proper tooling. Build admin interfaces. Make it auditable. Make it safe.</p><h3>4. Content in Config Files (Please Stop This Madness)</h3><p>UI strings, email templates, notification copy — I see this stuff in config files all the time, especially in multi-language applications.</p><p>Look, I get it. When you’re starting out, you might only have a few strings to manage. Throwing them in a config file seems perfectly reasonable — you want to tweak that error message without redeploying, and hey, the config infrastructure is already there, so why not?</p><p>Here’s the thing: your business team doesn’t want to edit JSON files. Your content creators don’t want to debug YAML syntax errors. They want rich text editors, preview functionality, and the ability to schedule changes, and you want them to do it safely, and without bothering you.</p><p>Give them proper content management tools. Your sanity (and theirs) depends on it.</p><h3>My Guide to Configuration Sanity</h3><p>Here’s how I think about configuration these days:</p><p><strong>Know What Type You’re Dealing With</strong>: Before you add any configuration setting, ask yourself: “Is this environmental or is this a toggle/tuning parameter?” Environmental config gets the VIP treatment — it goes in your main config files, gets validated, gets documented. Toggles and tuning parameters? They get sensible defaults and hidden overrides. Treat them differently because they are different.</p><p><strong>Default Everything</strong>: Every setting should have a sensible default that works for 80% of scenarios. If you can’t think of a good default, maybe you don’t need the setting.</p><p><strong>Question Everything</strong>: Before adding a new config setting, ask yourself: “What are the actual chances I’ll ever change this?” Be honest. If the answer is “probably never” or “maybe once if we’re really desperate,” just make it a constant in your code. Constants are underrated — they’re documented right where they’re used, they’re type-safe, and they don’t clutter up anyone’s config files.</p><p><strong>Treat Config as Technical Debt</strong>: Configuration settings accumulate like socks under your bed. Go through those settings with a ruthless eye: What hasn’t changed in since shipping? What does nobody remember adding? What flags are for features that shipped ages ago? Delete them. Your future self will thank you when they’re not debugging why your search module has 47 different flags that look almost the same.</p><p><strong>Make Configs Expensive</strong>: Treat configuration changes like code changes. Review them. Test them. Document them. Make people think twice before adding “just one more setting.”</p><p><strong>Build Better Abstractions</strong>: Instead of 15 different performance knobs, give me three options: “Conservative,” “Balanced,” and “YOLO.” Let the system figure out what that means.</p><h3>The Bottom Line</h3><p>Configuration is like salt in cooking — a little bit enhances everything, but too much ruins the dish.</p><p>Every configuration option is a promise. A promise that you can change this setting at 2 AM in production when everything is on fire and it will work smoothly. But it’s also a promise to document it, maintain it, test it doesn’t break production, and explain it to the new person who joins your team six months from now.</p><p>Most of the time, when we reach for configuration, we’re really just avoiding the hard work of figuring out what the right behavior should be.</p><p>Do the hard work. Pick good defaults. Trust your judgment.</p><p>Your future self (and your on-call rotation) will thank you.</p><h3>Your Turn!</h3><p>What’s the most ridiculous configuration setting you’ve encountered? Drop them in the comments — let’s learn from each other’s pain!</p><p>And remember: just because you <em>can</em> make something configurable doesn’t mean you <em>should</em>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63f299588986" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing Revenue with Bayesian A/B testing]]></title>
            <link>https://medium.com/ni-tech-talk/optimizing-revenue-with-bayesian-a-b-testing-5068e8ac41ea?source=rss-8441ff3f1faf------2</link>
            <guid isPermaLink="false">https://medium.com/p/5068e8ac41ea</guid>
            <category><![CDATA[bayesian-statistics]]></category>
            <category><![CDATA[ab-testing]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Omri Fima]]></dc:creator>
            <pubDate>Mon, 05 Aug 2019 05:26:28 GMT</pubDate>
            <atom:updated>2019-08-05T05:52:59.107Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_0FPVfqQs43_MXNRW9c3g.jpeg" /></figure><p>One of the major challenges of <strong>Natural Intelligence</strong> is to optimize our ability to help consumers make informed buying decisions.</p><p>One method to reach this goal is to optimize towards <em>Conversion Rate</em>, but at many cases, that’s not enough. In our specific case, we’ve found<em> Revenue Per Visit</em> is a much more fitting optimization goal. Yet this goal brings its own set of complexities, such as the fact optimizing <em>Revenue Per Visit is </em>a balancing act of two interdependent factors — <em>Conversion Rate</em> and <em>Revenue Per Conversion. A</em>nd in our optimization, we might hurt one metric while improving the other.</p><p>Another challenge we were facing was to test &amp; learn at a higher rate. For many flows, the cost of reaching statistical significance meant that a test would need to be live for weeks or even months, and during this time we cannot run any other tests that might skew or interfere with our results.</p><p>In this post, I’ll show how we do revenue-based A/B testing using bayesian analytics with <a href="https://docs.pymc.io/">pymc3</a>. You will learn how we optimize towards more complex metrics, and how we’ve reduced significantly our time-to-conclusion.</p><h3>What is bayesian analytics?</h3><p>Bayesian A/B Testing<strong> </strong>employs Bayesian inference methods to give you ‘probability’ of how much B is better (or worse) than A.</p><p>The immediate advantage of this method is that we can understand the result intuitively even without understanding what <em>p-value</em> or <em>null hypothesis</em> means. This means that it’s easier to communicate with our business stakeholders in a language that makes sense — the language of risk and value.</p><p>Another advantage is that since Bayesian statistics don’t care for statistical significance, you don’t have to worry too much about the test size when you evaluate the result. You can start evaluating the effect from day one by reading the probability of B being better than A. Of course, as we get more data our answers will be more accurate, but since we are using the language of probabilities, we are able to say, for example, “A is better than B with 60% probability” rather than “We don’t have enough data” So you can decide if you want to wait any longer.</p><h3>Preparing Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*MF6mfE5z6aWjh42Id3JCOg.png" /><figcaption>Raw conversion data</figcaption></figure><p>We will start with our dataset, each line of the dataset represents a user visit, along with its variant, conversion and revenue figures.</p><p>We will take this dataset and split it into four different arrays, two arrays will represent conversion samples for our control and treatment variants, the other two arrays will represent revenue samples for our control and treatment variants.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffb15fb6221ade762c8246620b9eef88/href">https://medium.com/media/ffb15fb6221ade762c8246620b9eef88/href</a></iframe><h3>Setting prior distributions</h3><p>At first, we will set up our prior distributions. prior distributions are assumptions (or prior knowledge we have) on how the probability of our conversion and revenue should behave. specifying a prior allows us to reach conclusions with a relatively small dataset.</p><p>For the conversion metric, we chose to use beta distribution, we’ve decided to assume a very weak <em>alpha</em> and <em>beta,</em> as we don’t have any prior knowledge on how our conversion might behave.</p><p>For our revenue, we assumed gamma distribution, which represents well the exponential nature of our revenue. Again, we’ve chosen a relatively weak prior.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/abd11f0bea8d08251a5d02464511c407/href">https://medium.com/media/abd11f0bea8d08251a5d02464511c407/href</a></iframe><p>Once we chose our prior distributions, we can factor in our observations</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b3ec8efe9a9dceb4d04c33151a6eb743/href">https://medium.com/media/b3ec8efe9a9dceb4d04c33151a6eb743/href</a></iframe><h3>Calculating posterior</h3><p>Now we can create four new distributions based on our existing distributions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b64a63094cbebcad3781fa890317e523/href">https://medium.com/media/b64a63094cbebcad3781fa890317e523/href</a></iframe><p>The first two distributions are a composition of our conversion and revenue distributions. Together they will provide us with the expected revenue. The other two distributions are the difference between A and B for both conversion and revenue.</p><p>Finally, we can get our posterior distributions, by letting pymc3 sample the posterior distributions for <em>conversionA</em>, <em>conversionB</em>, <em>conversionRevenueA</em>, <em>conversionRevenueB</em>, <em>lift</em> and <em>revenueLift.</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/11e63ea72bf2a0f4269a73a183b6fcc9/href">https://medium.com/media/11e63ea72bf2a0f4269a73a183b6fcc9/href</a></iframe><h3>Analyzing the results</h3><p>to get a better sense of our results, we will start by plotting our conversion and revenue distributions for both A and B variants.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7ef0791e762f0ed3f625e18466e33a8/href">https://medium.com/media/c7ef0791e762f0ed3f625e18466e33a8/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*jTHNXxcYsP9V2HnAx8LN1A.jpeg" /></figure><p>By quickly looking at the plots, we can intuitively see that variant B, while keeping the same conversion rate, was able to increase the probability for higher revenue.</p><p>We will continue by drawing the posterior graphs for revenue and conversion lift.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*bUQtu5ewlEV2Oo-HzKTGyQ.jpeg" /></figure><p>Now we can see that there is almost ~87% that B performs better than A and that our mean lift is roughly 10¢ per visit.</p><h3>Drawing Conclusions</h3><p>As seen in the previous steps, we can reach conclusions with relative ease by looking at the posterior charts, but it still requires visually analyzing these charts. Can we simplify our process of drawing conclusions even more?</p><p>Since we have revenue lift probability distribution, the average value of a visit, and a rough estimation of visits for the next month, we can create a simple risk and contribution assessment for choosing B over A for the next month —</p><blockquote>Probability of B is better than A — 87%</blockquote><blockquote>Expected risk of choosing B -$2,206 at 13% probability</blockquote><blockquote>Mean Contribution of choosing B — $7,209</blockquote><p>We can even weigh in the “cost” of the experiment. Stating that a test that doesn’t create a lift of at least $3,000 is considered practically equivalent, and not worth the hassle —</p><blockquote>Probability of B is better than A by at least 3,000$ — 70.9%</blockquote><p>Using these simple statements, we can effectively communicate the risk and value of our experiments in simple sentences that help business stakeholders make informed decisions with ease.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMrg_QSelhIt9OUf71vauQ.jpeg" /></figure><h3>Summary</h3><p>In this post, I’ve shown how you could use Bayesian Statistics to estimate the value of your experiments using complex metrics while communicating it effectively with your business stakeholders.</p><p>We&#39;ve found this method highly effective to increase the rate and impact of our experiments, increase our customer satisfaction, and as an effect — improve our bottom line.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5068e8ac41ea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ni-tech-talk/optimizing-revenue-with-bayesian-a-b-testing-5068e8ac41ea">Optimizing Revenue with Bayesian A/B testing</a> was originally published in <a href="https://medium.com/ni-tech-talk">NI Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intuitive Codebase — Designing your codebase for growth]]></title>
            <link>https://medium.com/ni-tech-talk/intuitive-codebase-designing-your-codebase-for-growth-5f585cf07279?source=rss-8441ff3f1faf------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f585cf07279</guid>
            <category><![CDATA[growth-mindset]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[growth]]></category>
            <dc:creator><![CDATA[Omri Fima]]></dc:creator>
            <pubDate>Thu, 16 May 2019 06:59:13 GMT</pubDate>
            <atom:updated>2019-05-19T05:57:48.264Z</atom:updated>
            <content:encoded><![CDATA[<h3>Intuitive Codebase — Designing your codebase for growth</h3><p>You’ve just recruited a new developer, Congrats! you’ve helped him set up his computer, get the codebase up and running, wrote together the first, second and maybe even third feature. and slowly but surely he becomes more productive and more independent.</p><p>Now imagine that instead of just one developer, you have 20 new developers. suddenly you and your team find yourself under a constant bombardment of questions, bugs created by “noob mistakes”, and a lot of frustration both for your new and experienced developers.</p><blockquote>The code you write today will be refactored eventually. Ask yourself: what can we do, on an architectural level, to ease the next person in?</blockquote><p>So how do we make onboarding more effective and in less time? I believe we should start with our codebase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*5y-BZfYJAjuTRpIY51E47A.jpeg" /><figcaption>Does you codebase look like this?</figcaption></figure><h3>Intuitive codebase</h3><p>let’s take a look at your codebase. can you send your repository to another developer (who does not work with you … that would be cheating), and have them tell you what it does or how the application work in general terms? how about developing a simple feature?</p><p>We’re used to thinking about the user when we create our products. But what if we consider the newest member of our team as we build our codebases? The best teams share an understanding of where each bit of code lives, what it does, and why. They can then spend their time discussing how that code should work. Working on ‘how’ instead of ‘where’, ‘what’ or ‘why’ is essential to productivity</p><p>There are 5main characteristics that make a codebase intuitive — <em>Taxonomy, Topology, Terminology, Context, Local Cohesion.</em></p><h4>Taxonomy</h4><p>the most important aspect of an intuitive codebase is a coherent, extensible structure. This structure brings order to what could otherwise be a chaotic environment, and helps create a clear mental model so developers can understand where they are, what they can do there, and where they can go next. It also allows the codebase to change and grow gracefully as new features arrive.</p><p>You can think of taxonomy as a map to the <strong><em>business functionality</em></strong> of your code: the specific capabilities it offers to the end user. for example, for a blog system, common taxonomy might be Users, Articles, and Tagging. The <em>Sign-in screen </em>is located in the <em>Users</em> area of our codebase and only makes sense there.</p><p>Start building your taxonomy by <strong><em>thinking about what your code does, rather than how it does it</em></strong>. Make it explicitly clear where a certain business functionality lives, so when someone starts hunting around, they’re spending more time thinking about how a chunk of code works and less about where it lives.</p><h4>Topology</h4><p>When you look at your taxonomy, you’ll notice that even though each section is different in the functionality it offers, all sections are similar in the way they do things.</p><p>This self-similarity between different sections of the code is called topology.</p><p>Topology is a term that comes from mathematics: It’s the study of the properties that are preserved when something undergoes non-destructive transformations such as twisting, stretching, and scaling. Think of a circle. If you stretch the circle, you create an ellipse. The ellipse and the circle are topologically equivalent. However, if you tear the ellipse in half, it would no longer be topologically equivalent to the circle.</p><p>for many systems, even though you different sections of the code offer different business meaning, they share a common technical structure that makes them topologically equivalent.</p><p>This arrangement has an important effect on the way engineers can understand and navigate our codebase. For one thing, the taxonomy is made clearer because it’s presented as narrative variations on top of an invariant, predictable structure. For another, it also makes the codebase easier to learn, since the affordances provided by one section of our code are the same in all others. Should a developer decide to introduce itself to a new part of the code, it should feel like “more of the same”.</p><p>The challenge of maintaining an effective topology is keeping it consistent, as our codebase is usually in the state of eternal refactoring, our topology might develop disparity over time. and this disparity creates confusion.</p><p>if you heard the following sentence in a code review — <em>“yeah, you should probably fix that. that how we did it in the past, for our new code, we don’t do X anymore”. </em>then probably your topology is not as effective anymore. and you should put your efforts on managing your refactoring efforts thus reducing your topology disparity.</p><h4>Terminology</h4><p>Many software terms can be vague or overloaded and, without explanation or context, can mislead the reader. Make sure your terminology is clear and unambiguous.</p><p>When ambiguity might arise, provide a context in the name. for example — while the terminology <strong>Segment </strong>might mean just about anything, <strong>Market Segment</strong> is clear, unambiguous and most importantly — searchable.</p><p>Once a term is established, make sure it’s consistent internally, but more importantly, be consistent with how this terminology is commonly used externally. It will allow your team to leverage prior knowledge and prior mental models on how things work.</p><p>Another mistake we tend to do all too much is what I call <strong>pun names</strong>. We developers like cool names for our libraries, from Kafka and Spark to Angular and Meteor. And while those names are indeed cool, they also require explaining and memorizing, which you might be able to afford with a well-known library, but less with your internal code. So for your codebase, stick with the clear but boring names that don’t require this type of mental mapping.</p><p><strong>Context</strong></p><p>Our code tells a story, and it’s more than just the sum of all of its functional requirements. It’s also an accumulation of design decisions, security concerns, performance considerations, business restrictions, and eventually our core values as an engineering team.</p><p>Strive to make this context visible and clear through your code. lead your developers to follow the right decisions by intentionally making it clear and easy to follow. It can be through README files that explain your main concepts and decisions, it can be through naming, and it can be through creating an opinionated design of API’s which suggest the correct usage of your code.</p><h4>Cohesion</h4><p>Local cohesion is a characteristic of a system where a strongly related code sits together. Code with good local cohesion is easier to grasp as it’s functional boundaries correspond to its structural boundaries. Which means a developer who wishes to understand a certain functionality doesn’t need to search and untangle your entire codebase. As the full boundary of the feature is clear without diving deep into the code itself.</p><p>A good way to asses how good is your local cohesion is to test the following —</p><ul><li>How easy it is to add a <a href="http://concisecoder.io/2018/11/11/tracer-bullet-programming/">tracer bullet feature </a>to your codebase? does the resulting code is spread all over the place?</li><li>How easy it is to delete a feature from your code? do you need meticulously search for all possible dependencies and potential dead code? or can you just simply delete a folder?</li></ul><h3>Summary</h3><p>The sharp-eyed among you probably have already noticed <em>intuitive codebase</em> shares many ideas and practices with former concepts such as clean code, domain driven design, and microservices. And while the practices themselves are not new, the difference is in the goal — Building <em>intuitive codebase</em> is about helping your team grow.</p><p>And once you focus on the goal and not the practices, you understand the most effective way to create intuitive codebase is to listen to your developers, understand where their confusion lies, and instead of fixing it locally by just explaining it, fix it at scale by removing the root cause of confusion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f585cf07279" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ni-tech-talk/intuitive-codebase-designing-your-codebase-for-growth-5f585cf07279">Intuitive Codebase — Designing your codebase for growth</a> was originally published in <a href="https://medium.com/ni-tech-talk">NI Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The ‘Captain Obvious’ method for super-fast software]]></title>
            <link>https://medium.com/sears-israel/the-captain-obvious-method-for-super-fast-software-b0b6cc890224?source=rss-8441ff3f1faf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0b6cc890224</guid>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Omri Fima]]></dc:creator>
            <pubDate>Sat, 24 Dec 2016 09:40:01 GMT</pubDate>
            <atom:updated>2016-12-25T10:35:23.991Z</atom:updated>
            <content:encoded><![CDATA[<p>Many times when a group of developers gather to discuss a performance or scale issue, the discussion goes along these lines —</p><blockquote><strong>Developer1:</strong> Ok, I think we’ve reached the limit’s of MySQL, we should really consider migrating to Couchbase.</blockquote><blockquote><strong>Developer2: Y</strong>eah , but if we are already doing that we should really change the architecture to event sourcing. Facebook is using it on millions of events per second.</blockquote><blockquote><strong>Developer3:</strong> Absolutely. This will really allow us to grow! But it will create an issue when we aggregate the events; we will need to cache it on Redis.</blockquote><blockquote><strong>Developer2:</strong> Of course, of course, goes without saying.</blockquote><p>So yes, it might be slightly grotesque. And yet, how many times has a similar discussion happened in your team? How many times did it seem that the only option was to ditch the old code and just rewrite everything? How many times was a cluster of micro-services suggested as the solution to every scale problem? How many times have you called a table with a mere 100 million rows ‘big data’? How many times did you find out that switching to a shiny new technology was just a new way of shooting yourself in the leg?</p><p>So really, why is our software so slow?</p><blockquote>The real reason behind most performance issues is that people write stupid code.</blockquote><p>Most performance issues I&#39;ve encountered were not because we’ve reached the limits of our tools or our architecture. They were usually because of a more mundane origin: people forgetting indexes, ignoring caches, not bulking queries, writing chatty APIs, fetching way more than needed. And, in general, acting in a shortsighted manner.</p><p>And I know what you are probably thinking right now: Gee.. thanks… really helpful. Is your point that all we need to do is hire people who don’t write stupid code?</p><p>Well, no. Because you see… there is a problem with that assertion. So allow me to fix it —</p><blockquote>The real reason behind most performance issues is that even smart people write stupid code.</blockquote><p>The real question here is not how to find people who don’t write stupid code, but how to prevent smart people from writing stupid code.</p><p>And to answer this question, we will need to answer a question you probably already know the answer to.</p><h4>How do you make sure your software is free of bugs?</h4><p>That’s a simple enough question. So let’s answer it together —</p><p>First you write automatic tests, and you run them against every code change. If the tests pass, you know everything is OK - and when tests fail, you know you have a problem. And when only a specific subset of your tests fail, you can pinpoint the source of the problem in a matter of minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vlatZja22wBsJ0PPcGGoQ.png" /><figcaption>Tests save the day, every day,</figcaption></figure><p>And yet, tests will not catch everything, so you will also have to build a process to monitor and analyze bugs in production. You’ll usually have monitoring and logs set-up to catch errors and allow you to find and diagnose production issues quickly as they happen.</p><h4>The obvious secret behind high performance software</h4><p>Now that we’ve found an obvious solution for smart people writing bugs, the path for an obvious solution for fast software seems clear -</p><blockquote>Treat the performance of your system the same way you treat the quality of your system.</blockquote><p>Yep. That’s all. It’s that simple. Just use the same tools you use to improve your code quality to improve your performance and scalability.</p><p>When you are continuously testing and monitoring performance:</p><ol><li>You are no longer blind, since now you can finally separate the bulls#%t from reality. And find the small and obvious optimizations that will make a difference.</li><li>You can analyze the root cause of a performance issue hiding in a complicated flow in a matter of minutes.</li><li>You can improve performance and then easily prove it.</li><li>You prevent your performance debt from growing uncontrollably.</li></ol><p>That’s it, all rather obvious. And amazingly effective. Because when you can detect and test the root cause of your system slowness, triaging, finding the root cause and actually fixing things up, becomes a simple and structured process.</p><h4>Five obvious tips for effectively monitoring and testing performance</h4><ol><li>Measure flows, not just infrastructure. make sure you can quickly answer ‘What is the experience my user is having?’</li><li>Monitor all of your IO and external API dependencies, as they are usually the root cause of most performance issues.</li><li>Don’t measure only time — remember also to measure call counts and other relevant metrics such as cache hit-miss. These metrics will help you catch flows that are not necessarily very slow by themselves, but in large number do become a problem.</li><li>Think in percentiles — When you monitor, don’t look at specific data points or at averages, since they tend to be noisy. Think in percentiles instead — i.e. Don’t measure the average time of the experience , instead ask ‘What is the performance that 90% of my users experience?’</li><li>Test with percentiles — performance tests will tend to be flaky, as many factors (including hardware, size of data ,GC) will fluctuate the results of your tests. By setting your percentiles , i.e. ‘the experience will not be slower than the time it takes for 95% of my users’ , you create a stable yet effective test in the long run.</li></ol><p>Following these tips will allow you to quickly extend your existing automatic-testing skills to validate and catch performance issues, in addition to quality issues.</p><p>Thank You Captain Obvious! Your work here is done.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0b6cc890224" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sears-israel/the-captain-obvious-method-for-super-fast-software-b0b6cc890224">The ‘Captain Obvious’ method for super-fast software</a> was originally published in <a href="https://medium.com/sears-israel">Sears Israel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Better technical interviews — don’t ask your candidates to implement BFS]]></title>
            <link>https://medium.com/sears-israel/doing-better-technical-interviews-dont-ask-to-implement-bfs-2bb77f525752?source=rss-8441ff3f1faf------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bb77f525752</guid>
            <category><![CDATA[startup-lessons]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Omri Fima]]></dc:creator>
            <pubDate>Sun, 05 Jun 2016 15:30:28 GMT</pubDate>
            <atom:updated>2017-01-31T13:37:32.951Z</atom:updated>
            <content:encoded><![CDATA[<p>Interviewing is hard, it’s a hard and stressful moment for the candidate. But it’s also a very exhausting moment for the interviewer.</p><p>Essentially you have 90 minutes to decide if candidate is competent, matches the company culture, and great person to work with.</p><p>In the following posts I’m going to share some of the experience I’ve gathered from interviewing couple of hundreds of people for various technical positions.</p><p>This time I would like to tackle one of the most controversial interview methods there are. Also known as the — “can you please solve BFS<em>*</em> of the board”</p><p><em>*you may replace BFS with any non-trivial algorithm of your choosing. Sort, binary-trees, and everything with strings included.</em></p><h3><strong>Don’t ask them to implement BFS</strong></h3><p>The reason I’m not a fan of “can you please implement BFS on the board” is not because I think it’s not a relevant knowledge. I actually believe that every half competent candidate should be able to figure out how to implement BFS quite easily.</p><p>Most of the grief candidates have with such line of questions is that they feel this question are artificial and have little to no relation to their experience and day to day work. And if they’ve just studied a little bit more, or read the right book just before the interview they would have answered it quickly and easily.</p><p>The reason it happens is not because our candidates are lazy or stupid, it happens because when asked a question in such form, our brain turns from a problem solving machine, to a solution seeking machine. And instead of thinking on how to solve the problem we are franticly searching in our memory for the ‘by the book’ solution.</p><p>So essentially the candidate mind goes DFS while looking for the solution. (Yes… I know… a really bad pun), and the last thing you want from a candidate is to go DFS.</p><p>Another problem with this line of questions is that it represents only a partial set of the skills an engineer must have.</p><p>Think about it. When lately you’ve been asked to solve a problem using a predefined algorithm? Solving a real-life problem is usually more than just implementing a certain algorithm. It’s about formalizing the problem, finding MVP, properly modeling the data, matching the correct tool to the problem, testing, optimizing and so forth.</p><p>Asking a candidate to solve some isolated algorithm without any context, prevent you from learning these really important details about the person you are interviewing.</p><h3><strong>Instead, ask them to implement something that requires BFS</strong></h3><p>So how do you ask about BFS, without asking about BFS? You ask them a real world question, which is related to your domain, and requires them to use all of their knowledge including, but not limited to, graph traversal.</p><p>For example, if you work on social network, you may ask a simple question about finding the closest friend who knows Kim Kardashian personally. (It’s going to be a killer app!)</p><p>While most of you might say “oh, it’s just a BFS it disguise!”, but I believe it’s a little more than that. The neat things about phrasing your question like this is that you finally can watch how a candidate might handle a problem he might encounter on his first week.</p><p>You know these types of problems — a problem where the solution is not very clear, and sometimes not even the requirements. But the spirit of the problem, and its importance to the business are crystal clear.</p><p>And as a side effect, suddenly traversing on graph doesn’t seems like a very hard problem for a good engineer. And as a nice bonus, if a candidate can name the way he solved the problem as BFS, then you know you have found someone who can actually name the tools in his toolbox (not a minor achievement), Or at least had the luck of reading the right text book just before the interview.</p><h3><strong>Don’t miss the opportunity of asking real world questions</strong></h3><p>A technical interview could be a great way to explain to the candidate the real world problems you are facing on a day to day basis. Don’t miss the opportunity to share how awesome is what you do, just by asking the right question.</p><p>I for example, love to ask candidates to implement AB Testing infrastructure. The reasons I love this question so much is because -</p><ul><li>It’s an actual problem that we solved for our website. And I could explain pretty easily why it’s an important problem to solve.</li><li>It raises really good business discussion on top of the technical discussion.</li><li>It’s a complete and isolatable problem, it can be solved to some extend in less than an hour.</li><li>It’s a fractal question, I can go infinitesimally deep with the complexity I can add to the problem, to test different aspects of the candidate.</li><li>I actually have a real world experience in solving it, so I can bounce ideas with the candidate, lead him to the right places. And create a great discussion about it.</li><li>I can share constraints that don’t feel forced.</li><li>It allows me to explain what “data driven” culture is, and why it’s personally important for us as a company.</li><li>I can actually show how it works in our product (which is a really neat experience)</li></ul><p>It’s important to note I take special care to explain how this problem is an actual problem we solved, and explaining its importance to the business. And almost every time I get feedback from candidates how much they loved this question, just because the problem felt authentic, and made them better see what we are doing, what we are proud of, and what we hold dear as part of our culture.</p><p>So in a strange and magical way, a well told question can actually create more clarity and understanding. and allows us, while learning about the candidate, to tell our story a little bit better.</p><p>So… what is the interview question that tells your company’s story</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bb77f525752" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sears-israel/doing-better-technical-interviews-dont-ask-to-implement-bfs-2bb77f525752">Better technical interviews — don’t ask your candidates to implement BFS</a> was originally published in <a href="https://medium.com/sears-israel">Sears Israel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>