<?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 Steve Gray on Medium]]></title>
        <description><![CDATA[Stories by Steve Gray on Medium]]></description>
        <link>https://medium.com/@steve-gray?source=rss-c977cf9aab8c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tetthI9IU9OpdMjP6XrR6g.jpeg</url>
            <title>Stories by Steve Gray on Medium</title>
            <link>https://medium.com/@steve-gray?source=rss-c977cf9aab8c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 03:41:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@steve-gray/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[How to avoid Excel for Cash-Flow Forecasting with this one Strange Trick]]></title>
            <link>https://blog.zeroflucs.io/how-to-avoid-excel-for-cash-flow-forecasting-with-this-one-strange-trick-9482c957f3d6?source=rss-c977cf9aab8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9482c957f3d6</guid>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Steve Gray]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 07:27:55 GMT</pubDate>
            <atom:updated>2024-01-28T08:34:41.861Z</atom:updated>
            <content:encoded><![CDATA[<p>How ZeroFlucs got rid of “Cash Flow.xlsx” using ChatGPT and Python, and simplified reporting of company projections.</p><h3>Enter the Dragon</h3><p>I had half a dozen calls last week where I got asked the same question that every startup founder dreads — people asking for updated cash-flow projections. It’s not that we didn’t have the data, it wasn’t that the numbers didn’t look good — it was just that every time something changed, the numbers weren’t getting updated easily.</p><p>Horror — but how did we get here?</p><h3>We Used to Have a Guy…..</h3><p>Prior to deciding to double-down on the bootstrapping in 2022/3, we briefly had someone in the business doing a very detailed projection and model. Ultimately though we made the (in retrospect short-sighted) decision that we probably didn’t need to worry about this for a while, so as impressive as the document was — the spreadsheet fell into disuse/disrepair.</p><p>After a few swings at simplifying it down for our own internal uses, we ended up with another version that was more manageable, at least in theory.</p><p>I dived into Excel, and I tried to adjust column 14, but then column 26 onwards got crazy and I couldn’t figure out why.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_wpxpHYOFEGrkBqZDfDmcg.png" /><figcaption>Every Startup Founder Knows *this* sheet….</figcaption></figure><p>It was hopeless, and despite us being profitable on paper, I couldn’t show it unless I just sent people a screenshot of the bank accounts.</p><h3>Another Way</h3><p>We do simulations as our business model. Normally its sports, but this time it was a much more basic problem.</p><p>Our situation was that we wanted to just <strong><em>simulate a series of actors </em></strong>(Clients, Suppliers, Staff) and progress through time, working out when we’d need to pay things and what our revenue would look like.</p><p>To that end, I did what any self-respecting 20+ year technology professional would do — I fired up ChatGPT and prayed for salvation. My plan was to code up all the expenses and revenues as YAML files per actor, and then simulate them over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*Z1Bc-pr5aJ_3uzE9s0zkkg.png" /><figcaption>One AI Later</figcaption></figure><p>So finally, I can say hand on heart we’ve done an AI powered simulation. But it took a long while to get where I had something workable. Prompt-engineering is a real skill, and I had to carefully guide the outputs, but essentially most of the code for better or worse came from a rolling 3am argument with Sam Altmans digital conscience.</p><h3>Hello, Fin-Kit (It’s on GitHub)</h3><p>After some soul-searching, decided that we’d just publish the code behind this — I figure that other startups who are struggling to produce a sensible cash-flow will find value in this, or something like it — versus fighting with your accounting software or Excel when you’ve got better things to do.</p><p>We’ve published this under our ZeroFlucs Given org:</p><p><a href="https://github.com/zeroflucs-given/fin-kit">https://github.com/zeroflucs-given/fin-kit</a></p><h3>Using the Notebook</h3><p>To use the notebook, read the README.md then create your various expenses and revenue items in the components folder, then just change the parameters at the top of the file and hit “Run All”. You’ll get, in seconds:</p><ul><li>A transaction by transaction simulated ledger for your business.</li><li>A cash burndown graph showing your runway</li><li>A costs analysis graph</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p0I-y0E8DsCqAK2JoZpvjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EmO2uzVrSewtF7QfXflrGA.png" /></figure><h3>Conclusion</h3><p>A crazy codoral (I had the flu) and coffee fuelled session later, I’d lived the startup dream and provided detailed financial projections to everyone who was waiting on them. Its fairly limited today, but it’s still streets ahead of doing things in Excel if you’re a slightly technical person who wants to produce something with material detail.</p><p>Hopefully other startup founders who are wanting to simplify cash-flow projections will get some value out of this, and we’re happy to accept any contributions or improvements from outside ZeroFlucs if people want to pay it forward.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9482c957f3d6" width="1" height="1" alt=""><hr><p><a href="https://blog.zeroflucs.io/how-to-avoid-excel-for-cash-flow-forecasting-with-this-one-strange-trick-9482c957f3d6">How to avoid Excel for Cash-Flow Forecasting with this one Strange Trick</a> was originally published in <a href="https://blog.zeroflucs.io/">ZeroFlucs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Same Game Combos]]></title>
            <link>https://blog.zeroflucs.io/same-game-never-the-same-4e71b8d465ad?source=rss-c977cf9aab8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e71b8d465ad</guid>
            <category><![CDATA[betting]]></category>
            <category><![CDATA[same-game-parlay]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sports-betting]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Steve Gray]]></dc:creator>
            <pubDate>Mon, 12 Jun 2023 07:33:04 GMT</pubDate>
            <atom:updated>2023-06-12T07:51:08.807Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This week ZeroFlucs are introducing a trio of game-changing innovations in the Same Game Betting arena, allowing sportsbook operators to offer customers unprecedented flexibility and engaging product.</em></p><p>We’re pleased to introduce “<strong>Same-Game Combinations</strong>” — representing a dramatic level-up in the capabilities of Same Game Multi/Parlay. This involves us bringing the familiar “Combo” or “System” betting options that bettors have seen previously into the world of same-game betting, creating a new and unified experience, and also expanding in new and innovative ways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*IkBnGWWYS_cELkRnbkzvxg.png" /></figure><p>The new-to-market features this offering is comprised of are:</p><ul><li><strong>Leg Combinations</strong></li><li><strong>Bet Splitting</strong></li><li><strong>Any X Options</strong></li></ul><p>These new features allow customers to mix and match their selections when creating bets in a single Same-Game bet. These classes of bets were entirely either <strong>impossible</strong> or <strong>impractical</strong> to place previously.</p><p>Before we get too excited, it’s worth reviewing the current experience most operators have today — and why we think change is overdue.</p><h3>Same Game 1.0, Today</h3><p>There’s a few different common names for the product, but it’s basically the same everywhere — whether it’s Same Game Multi, One-Game Parlay, Builder, or a range of other names. As a sportsbook operator, these products are popular because:</p><ul><li>It’s good for users — more compelling than single bets, and lets them explore their theory of the game.</li><li>It’s good for operators — high user engagement and retention, with improved margins.</li></ul><p>However, it’s not really changed in years as a product. Most in the industry are familiar with it’s typical experience:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*PB6CoG9Mw_s44NUq2EEXJA.png" /><figcaption>A Depressingly Common Pop-Up</figcaption></figure><p>Let’s call this “Version 1.0” of the product. Ubiquitous, basic — but no longer the competitive edge it once was in a busy and feature-oriented market.</p><p>Combining a few legs in an A, B, C and D bet has very much been done to death. It’s been essentially bereft of innovation for half a decade, with only minor additions (a new sport here and there, a few types of extra market).</p><p>What’s beyond 1.0 though?</p><h3>Previous Innovations</h3><p>Before we introduce our new products we’re showing today, let’s talk about what we’re already doing in the space with our “Any Of” (Blended) same-game betting product.</p><p>When you have a standard market with a fixed number of outcomes, such as:</p><ul><li>First Touchdown</li><li>First Goal</li><li>Match Winner</li><li>Race Winner</li></ul><p>If you chose multiple outcomes from these markets, you’ll today, universally get a “Incompatible Outcomes” / “Bet Not Available” message. Obviously <strong><em>both</em></strong> or <strong><em>all</em></strong> of these things can’t happen — right?</p><p>Thats why today we already offer the ability to create a <strong><em>Same-Game</em></strong> bet that allows you to say <strong><em>Any Of</em></strong>…. on your chosen outcomes. For example, choose 3 players who might score the first touchdown or back the team <strong><em>or</em></strong> a draw.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*cHG6hnnTriz8R65nePI6sA.png" /><figcaption>Not Sure on the Outcome? Pick a Few</figcaption></figure><p>Our smart, <strong><em>server-side Bet-Slip API </em></strong>understands the relationships between markets, outcomes automatically by analysing simulation outputs and offering only the appropriate options and permutations.</p><p>There’s no hard-coded rules for limiting market combinations, and it even automatically detects redundant propositions and doesn’t penalise the user:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*dXnnE3to5M1dmShW8iYcGg.png" /><figcaption>Automatic Redundancy Detection</figcaption></figure><p>We decided to double down on this technology, to create todays new feature offerings.</p><h3>New Feature 1: Leg Combinations</h3><p>When building a same-game bet now, we offer the ability to easily build combinations of the various legs in your bet. For example letting players choose 4 things, and win if any 1, 2, 3, 4 of them occur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--E4lTZsrGMBYF4a-VDkFg.png" /><figcaption>Any Single Leg or Any Pair, Together</figcaption></figure><p>This places considerable extra load on our platform, but thanks to our patent-pending high-performance processing architecture, we’re able to offer <strong>hundreds of permutations in a single transaction</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*OTrv4HEfiSg2H4KjVl0XcA.png" /><figcaption>6 legs, plus a few of them were <strong><em>also</em></strong> split to give over 800 combinations</figcaption></figure><p>Every single one of those bets is priced, in real time, from our simulations. There’s no cheap tricks, no tables of magic numbers — they’re all real Same-Game bets with no trickery.</p><h3>New Feature 2: Bet Splitting</h3><p>The <strong><em>Split </em></strong>feature allows users to branch their bet on a given leg, creating a combination for each selection. For example:</p><ul><li>Any of X players to score first</li><li>Any of Y horses to win the race</li></ul><p>By selecting <strong><em>Split</em></strong> users are given a combination per potential outome on the split leg.</p><p>In this example below, we’ve chosen to hedge our bet that the total will be high — creating 5 bets that are all combined with another same-game outcome. If the total is over 50, it’s going to be a great outcome — but we’re hedging the bet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*hi9qMqE3V4VgbBD5TDS2MQ.png" /><figcaption>Spread Risk with Split Betting</figcaption></figure><h3>New Feature 3: Any X</h3><p>Remember how you can choose multiple outcomes in a single market with <strong><em>and/or </em></strong>modes? Our newly upgraded system permits a third level of combination generation.</p><p><strong><em>Any X</em></strong> allows users to pick a higher number of outcomes from a market, and simultaneously wager against several permutations of them in a single ticket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*95cgRGe5hlYs9R6ddOX8MA.png" /><figcaption>Any 1, 2 or 3 of these 4 to score</figcaption></figure><h3>Combine Them All</h3><p>Every single feature we’ve unveiled can be used <strong><em>today, together</em></strong> — along with all of our pre-existing feature set, across all sports and codes we support.</p><p>That means sportsbooks can offer users the ability to:</p><ul><li>Pick the team to win</li><li>Pick 5 different “Total Over” positions and <strong><em>split</em></strong> the ticket.</li><li>Pick any of 3 players to score <strong><em>first</em></strong></li><li>…. and wrap it up with any 2 of 5 players to score.</li></ul><p>… all in a single transaction.</p><h3>Where Next?</h3><p>With these features out the door, there’s a few areas we want to expand on:</p><ul><li>Increase the limits on combinations, allowing users to select thousands of permutations in a single transaction. We’ve got the framework for this planned out, and it’ll be an obvious near term win.</li><li>Expanding further into more ways to bet.</li></ul><h3>Find Out More</h3><p>If you want to add ZeroFlucs to your sportsbook, then <a href="https://zeroflucs.io/contact-us">Contact Us</a> and let’s arrange a demo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e71b8d465ad" width="1" height="1" alt=""><hr><p><a href="https://blog.zeroflucs.io/same-game-never-the-same-4e71b8d465ad">Introducing Same Game Combos</a> was originally published in <a href="https://blog.zeroflucs.io/">ZeroFlucs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making ScyllaDB Simple with Charybdis]]></title>
            <link>https://blog.zeroflucs.io/making-scylladb-simple-with-charybdis-6c99b6744dc5?source=rss-c977cf9aab8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c99b6744dc5</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[scylladb]]></category>
            <dc:creator><![CDATA[Steve Gray]]></dc:creator>
            <pubDate>Tue, 11 Oct 2022 07:45:40 GMT</pubDate>
            <atom:updated>2022-10-12T00:04:37.275Z</atom:updated>
            <content:encoded><![CDATA[<p>At <strong>ZeroFlucs </strong>we’ve been using open-source software through the business to help us grow and innovate, as we work to put simulation based pricing technology into the hands of every bookmaker and wagering service provider on earth. Now, we’re starting to give something back.</p><p>The first package we’re releasing into the wild today is <strong><em>charybdis</em></strong> our internal support package for working with ScyllaDB. In this post, we’ll go through what it is — why it exists, and how hopefully it’s something worth sharing.</p><p>Named for the <strong><em>other</em></strong> monster that lived across the way from Scylla, Charybdis is a package we built to make our own lives easier, and we think it might make yours easier too.</p><h3>Give Me Code Now!</h3><p><strong>Alright</strong>, <strong><em>alright!</em></strong> It’s over at our new Github org, <a href="https://github.com/zeroflucs-given">zeroflucs-given</a>:</p><p><a href="https://github.com/zeroflucs-given/charybdis">GitHub - zeroflucs-given/charybdis: The charybdis package provides helpers for low-code integration with ScyllaDB.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*ELmBYi2Cd5fKqDNt.png" /><figcaption>D</figcaption></figure><h3>Our Problem Domain — Selecting Scylla</h3><p>For those who are already intimately familiar with Scylla, you can jump past this section — but for newcomers, buckle up!</p><p>We need a high scale database. Every time a ball is passed, every time a price changes — our platform needs to respond quickly, executing hundreds of thousands of simulations of virtual sports matches and races, to calculate pricing to offer to customers. Having used a range of database technologies before, there’s typically a point past which performance falls off a cliff or scaling becomes impractical.</p><p>Time is very much money, and the workloads associated with our line of work require us to handle very noisy source feeds of price changes (up to 100,000 messages/minute), <strong><em>multiplied by the number of customers</em></strong> and then each of those can in turn cause <strong><em>thousands</em></strong> of prices to be changed as a consequence.</p><p>The other challenge is that whilst we operate one homogenous platform globally, each of our customers could be “homed” in a different geographic region — but need data available at local latency in multiple locations.</p><p>After much searching and prototyping, we honed in on ScyllaDB — with it’s brutally simple data modelling paradigms (no relations, joins are all but forbidden etc), there came a high performance that we’ve been unable to match readily elsewhere.</p><figure><img alt="ScyllaDB — Monsterously Fast Database" src="https://cdn-images-1.medium.com/max/650/1*XDDHMPN-SJcPtQiK9pn30g.png" /></figure><h3>Developing using ScyllaDB with Go</h3><p>Our platform is written primarily in Go, the open source language created by Google. High performance, low footprint and capable of great and evil things.</p><p>The Go developer experience today is really an extension of the Cassandra developer experience (Cassandra being the database that ScyllaDB is mostly wire-compatible with), and that’s “<strong><em>not great”</em></strong>. Finding a collection of tools and scripts and packages that let us focus on writing code without wrangling with keyspace definitions, or exposing many of the advanced ScyllaDB features proved quite vexing.</p><p>Our initial code for services bore out this pain — lots of boilerplate and repetition, varying only in the types/tables being used. It offended the eyes, and it also created a lot of opportunities for our code to contain duplication, or accidental errors when duplicating code.</p><h3>Enter Stage Left: Go Generics</h3><p>With the advent of Go 1.18 came the generics support many Go developers have longed for. However the <strong><em>gocql</em></strong> and <strong><em>gocqlx</em></strong> packages we use have a strong compatibility focus, meaning there was no (and continues to be no) firm timeline for bringing generics into the fold.</p><p>For example, this is a <strong><em>cut down</em></strong> summary of how to write a record of a given type — from the Gocqlx examples:</p><pre>p := Person{<br>	&quot;John&quot;,<br>	&quot;Smith&quot;,<br>	&quot;foo@bar.com&quot;,<br>}</pre><pre>q := session.Query(personTable.Insert()).BindStruct(p)<br>if err := q.ExecRelease(); err != nil {<br>	t.Fatal(err)<br>}</pre><p>Reading, similarly:</p><pre>var p Person<br>q := session.Query(personTable.Get()).BindStruct(p)<br>if err := q.GetRelease(&amp;p); err != nil {<br>	t.Fatal(err)<br>}</pre><p>Thus, one of our main design goals was to reduce most operations to one-liners. Our solution became to create a “manager” type that was generic / type-aliased to your record type per table, and can simplify read/write/select operations.</p><p>Reading that record back now is still a single line, but is really only one command, and not a chain of them.</p><pre>record, err := manager.GetByPartitionKey(ctx, &quot;test-user-1&quot;) </pre><h3>Custom Queries, TTLs and Options</h3><p>Another sore point for us was if you wanted to use TTL’s, Lightweight Transactions or any of the other advanced features. The “single line” of code that was present before now requires you to build a custom query — there’s no half-measures, you’re now trying to essentially fight with the “qb” (Query Builder) package to build a query through a chain of calls.</p><p>Our solution was to use more go-idiomatic “WithOptionName()” parameters to mutate the query. For example, to insert a record with a TTL is very simple:</p><pre>errUpsert := manager.Insert(ctx, &amp;UserVisit{<br>   UserID:   &quot;john-smith&quot;<br>   FirstName: &quot;John&quot;,<br>   Visits:    0,  <br>}, <strong>tables.WithTTL(time.Minute)</strong>)</pre><p>This same approach is used for any query variation such as:</p><ul><li>Record Expiry (TTL)</li><li>IF NOT EXISTS / IF EXISTS (Insert/Update vs Upsert semantics)</li><li>IF x = Y (Conditional updates)</li><li>Varying consistency levels up/down from the default level.</li></ul><h3>Dynamic Schema Management</h3><p>We didn’t want everyone to be constantly worrying about ScyllaDB schema management, so part of the package is a DDL generator. This can reflect over your structures (or a static configuration object describing your tables), and provide all of the metadata for the helpers to work.</p><p>To facilitate simple schema evolution, the package will automatically create and maintain your tables, if you require it — as seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2oVdR_CNoxAEBsaoWMfO5A.png" /></figure><p>When creating your TableManager[T] instances, you can enable this functionality</p><pre>manager, err := tables.NewTableManager[Record](ctx,<br>   tables.WithCluster(cluster),<br>   tables.WithLogger(log),<br>   tables.WithKeyspace(&quot;examples&quot;),<br> <strong>  mapping.WithAutomaticTableSpecification[Record](&quot;user_visits&quot;),<br>   generator.WithSimpleKeyspaceManagement(log, cluster, 1), <br>   generator.WithAutomaticTableManagement(log, cluster))</strong></pre><p>Those last 3 lines provide:</p><ul><li>Creation of the relevant metadata by reflecting over a structure.</li><li>Creation of a keyspace (IF NOT EXISTS) with a basic replication model (you’d want to use a more advanced approach in the wild).</li><li>Simple automatic table creation and column extensions (ALTER TABLE …. ADD)</li></ul><h3>Thats It</h3><p>Now you understand what Charybdis is and why we wrote it. The version on Github is a rework of an internal package we’d gradually refined over the last year, with some features still to be ported over — however it’s the start of two stories:</p><ul><li>This package will take on a life of its own.</li><li>We’re also going to routinely give back to the Open Source community components that we can where it makes sense, to help others from the learnings we’ve had over the last year.</li></ul><p>Last but not least, for anyone wondering — we’ve used Dall-E to summon up the logo for the project.</p><figure><img alt="Charybdis, on a boat. Because boats." src="https://cdn-images-1.medium.com/max/1024/1*kZv7mDzuy5mGIHsug3b0_Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c99b6744dc5" width="1" height="1" alt=""><hr><p><a href="https://blog.zeroflucs.io/making-scylladb-simple-with-charybdis-6c99b6744dc5">Making ScyllaDB Simple with Charybdis</a> was originally published in <a href="https://blog.zeroflucs.io/">ZeroFlucs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>