<?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 Gabor Csomak on Medium]]></title>
        <description><![CDATA[Stories by Gabor Csomak on Medium]]></description>
        <link>https://medium.com/@donkeycoder?source=rss-6b2b9bd53f65------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Zbr3OsOOb5eXj-eoLx0ujA.jpeg</url>
            <title>Stories by Gabor Csomak on Medium</title>
            <link>https://medium.com/@donkeycoder?source=rss-6b2b9bd53f65------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 01:50:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@donkeycoder/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[Remember, how Claude Code actually remembers]]></title>
            <link>https://donkeycoder.medium.com/remember-how-claude-code-actually-remembers-ccbf7786a06e?source=rss-6b2b9bd53f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccbf7786a06e</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Gabor Csomak]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 07:19:27 GMT</pubDate>
            <atom:updated>2026-06-16T14:13:51.707Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYslZEKocJSitJJ_iQiR6Q.png" /></figure><p><em>TLDR; Claude Code’s memory is a small table referencing markdown files, loaded lazily through a one-page index.<br>The disciplines around it: a why-line for every rule, a four-type taxonomy that refuses redundant facts, and a staleness contract that tells the model not to trust its own memory.</em></p><p>Claude Code’s memory system is a folder of markdown files, and that turns out to be the interesting part.</p><p>Claude Code’s memory, for any given project, is a folder of markdown files. It lives at ~/.claude/projects/{project}/memory/. Each memory is a .md file with YAML frontmatter. There’s a single index file, MEMORY.md, that always rides along in the model’s context. The rest are loaded on demand.</p><p>Beside the memory folder, Claude Code also keeps full .jsonl transcripts of every session — every prompt, every tool call, every response. They’re the “long version.” Memory is the curated extraction. The transcripts are append-only and never load themselves into future conversations; they exist so a human (or another agent) can mine them later. Keeping the two apart is the whole point: if memory were just the transcripts, it would balloon past usefulness in a week. The separation is what makes “load the index every time” cheap.</p><h4>The sweet memories</h4><pre>  ┌───────────┬───────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────┐<br>  │   Type    │             Slug              │                                           Gist                                           │<br>  ├───────────┼───────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤<br>  │ user      │ legacy-codebase-owner         │ You rearchitected Unicorn from SSR→CSR and consolidated ventures into shared — treat as  │<br>  │           │                               │ authority on &quot;this used to work like X&quot;.                                                 │<br>  ├───────────┼───────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤<br>  │ user      │ terse-low-ceremony-style      │ Short lowercase prompts, no throat-clearing, give diagnosis + options and let you pick.  │<br>  ├───────────┼───────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤<br>  │ feedback  │ prefers-simplest-fix          │ When given options you pick the most incremental one; push back if I over-engineer.      │<br>  ├───────────┼───────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤<br>  │ feedback  │ comfortable-with-hacky-debug  │ Throwaway debug code is fine when you say so; expose window.__debugXxx hooks so you can  │<br>  │           │                               │ re-trigger without reload.                                                               │<br>  ├───────────┼───────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤<br>  │ feedback  │ fix-at-source-not-config      │ Fix warnings at the source, not via build/config tricks. Why: prod strips warnings, so   │<br>  │           │                               │ config workarounds mask real issues.                                                     │<br>  ├───────────┼───────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤</pre><blockquote>Proud that Claude came back with these memories of me. Comment yours!</blockquote><p>There are four memory types, and the model is instructed to classify everything that gets saved:</p><p>— user — who you are, how you work, what you know<br> — feedback — corrections you’ve given, and confirmations you’ve granted<br> — project — what’s going on, why, and by when<br> — reference — pointers to external systems</p><p>So why only four? You can’t save “the auth middleware lives in src/auth/middleware.ts” as a memory, because it doesn’t fit any of these categories — and it shouldn’t, because that fact is already in the filesystem. The taxonomy is a filter against redundancy. Anything you can derive from the repo, the git log, or a grep, the system is supposed to refuse to remember, and query dynamically. Git is the source of truth.</p><p>The most interesting bucket is feedback, and the most interesting rule about it is this: the model is told to save from successes, not only from corrections. If it only learned from “no, don’t do that,” it would slowly drift toward over-caution — fewer surprising choices, more hedging, more clarifying questions.<strong> So when you nod at a non-obvious approach (“yeah, single bundled PR was the right call”), that’s supposed to get saved too.</strong></p><p>Failures are saved as well: <em>“why is this standing up Postgres? It doesn’t even hit the DB.”</em> will create a not-so-fond memory to avoid repeating this on tests.</p><p>If you look at a memory file, the frontmatter looks like this:</p><pre> — -<br> name: prefers-simplest-fix<br> description: When given options, user picks the most incremental one and pushes back on over-engineering<br> metadata:<br> type: feedback<br> — -</pre><p>The description field is the thing that decides whether a memory ever gets loaded again.</p><p>Here’s why: the model doesn’t grep the memory directory. It sees the one-line entries in MEMORY.md, and it has to recognize — from those one-liners — that a given conversation is relevant to one of them. <em>“User likes things simple”</em> is invisible. <em>“When given options, user picks the most incremental one and pushes back on over-engineering”</em> gives the model something to pattern match against in a hundred future contexts.</p><p>This is a tiny detail with a load-bearing role. A memory with a vague description effectively doesn’t exist, because nothing will ever cause it to surface. Writing memories is, in a quiet way, a write-once retrieval problem: you’re not writing for yourself, you’re writing for a future model trying to figure out whether this entry is worth opening.</p><h4>Two-tier loading</h4><p>MEMORY.md is capped at roughly 200 lines and always loaded. Individual memory files are lazy-loaded on demand. This is closer to how an IDE’s symbol index works — small, dense table of contents that’s always present; full definitions fetched only when needed — than how a vector DB works.</p><p>There’s a real ceiling on how much memory a project can have before the index spills, so it’s encouraged to update and prune. There’s no “we’ll just shove it in and let semantic search figure it out later.” If something stops being true, you delete it.</p><h4>Wikilinks, and the trick of writing to nothing</h4><p>Memory files can link each other with [[other-memory-slug]] syntax. The clever bit is that broken links are legal. You can link to [[delete-legacy venture-folders]] from a feedback memory before that memory exists. It marks intent: “there’s a project context here that’s worth writing up, I just haven’t done it yet.” Future-you (or future-Claude) sees a dangling link and treats it as a TODO for the memory system itself. The graph encodes things you haven’t written down.</p><h4>The why-line discipline</h4><p>Feedback and project memories are supposed to follow a specific body shape:</p><p><em>Don’t mock the database in integration tests.</em></p><p><strong>Why:</strong> Last quarter, mocked tests passed but a prod migration failed — mock/prod divergence masked a broken schema change.</p><p><strong>How to apply:</strong> Use the test container in `docker-compose.test.yml` for anything touching persistence. UI tests can mock.</p><p>This looks like documentation hygiene, but it’s doing something subtler. The rule alone tells the model what to do; the Why tells the model how to reason about edge cases the rule doesn’t cover. Without the why, you get blind rule-following: I’d refuse to mock anything, including a unit test for a pure function that happens to take a User object. With the why, I can recognize that the rule is about catching migration drift, and a pure function test isn’t in scope.</p><p>The why is also what lets you decide a memory is stale. “Don’t mock the DB, because of that incident last quarter” — and once that incident is two years old and the team has moved to a different test stack, the rule itself becomes negotiable.</p><h4><strong>The staleness contract</strong></h4><p>The model is explicitly instructed to not trust memory blindly. If a memory says a flag exists, grep for it first. If a memory says the dev server runs on port 7777 and now it doesn’t, trust what you observe, not what you remember — and update or remove the stale memory rather than acting on it.</p><p>Claude Code treats them as priors with a known half-life. They’re load-bearing for context — they tell the model what to look for, what questions to ask, who you are — but they’re not load-bearing for correctness. Correctness comes from re-grounding against the live state.</p><p>There’s a specific phrasing in the instructions that captures it: <em>“The memory says X exists”</em> is not the same as <em>“X exists now.”</em> That sentence quietly does a lot of work. It’s the difference between an agent that hallucinates confidently because its memory was right six months ago, and one that re-checks before recommending.</p><h4>What’s not in there</h4><p>The deliberate omissions are as informative as what’s included.</p><p>There’s no embedding-based semantic search. There’s no automatic ingestion of every conversation — saving is an explicit, model-judged decision per fact. There’s no central server (per-project memory is a per-project folder). There’s no schema migration story, because the schema is YAML frontmatter and you can change it by editing the file.</p><p>You can stretch the system into something more complex if you want. Generate memories programmatically, run a script to dedupe them, write a tool that mines old transcripts for candidates (which is, transparently, what I did to write the seed for my own memory file). The format makes that trivial. But the system itself is intentionally not doing any of it.</p><h4>The shape of a good memory</h4><p>After enough time staring at this, a pattern emerges for what makes a memory worth keeping:</p><ul><li>It encodes something a future reader can’t derive from git</li><li>It carries the why, not just the what</li><li>It will still be true in three months, or it has a clear expiry encoded</li><li>Its description is specific enough to trigger on something concrete (unlike “user has preferences.”)</li></ul><p>The simplest version of this system you can imagine, with a few small disciplines that turn out to matter more than they look. The folder-of-markdown-files version is the one that ships.</p><p>Go deeper in the rabbit-hole for all memory systems compared: <a href="https://www.mindstudio.ai/blog/claude-code-memory-systems-compared">https://www.mindstudio.ai/blog/claude-code-memory-systems-compared</a></p><p><em>Thanks for reaching the end, </em><strong><em>please consider clapping and subscribing</em></strong><em>!</em></p><p>Disclaimer: This article was mainly AI generated, then shaped into my style, based off my thread of digging into Claude memories with my buddy, Claude. Any feedback welcome therefore.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccbf7786a06e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Contract Testing MicroFrontends]]></title>
            <link>https://donkeycoder.medium.com/contract-testing-microfrontends-d35ef36bda1b?source=rss-6b2b9bd53f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/d35ef36bda1b</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[contracts]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[micro]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Gabor Csomak]]></dc:creator>
            <pubDate>Fri, 21 Oct 2022 13:45:40 GMT</pubDate>
            <atom:updated>2022-10-21T13:45:40.587Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>TLDR; </strong>You need to define your integration points and define clear ownership around them. TypeScript will get you a nearly thorough compile time check. Write tooling and decouple concerns.</p><p>MicroFrontends are a few years late to the party in <a href="https://trends.google.com/trends/explore?date=all&amp;q=microservice,MicroFrontend">comparison</a> to MicroServices, and over these years as Services architecture already had the revolution of ‘everything needs to be a separate service’ and the second revolution of <a href="http://highscalability.com/blog/2020/4/8/one-team-at-uber-is-moving-from-microservices-to-macroservic.html">‘actually not everything needs to be a separate service’.</a></p><p>MicroFrontends will take on a very similar endeavor with regards to domain, size, operations, and deployments as MicroServices, but are there any differences? There are a two main in my opinion:</p><ul><li>Difference #1: Hierarchy</li></ul><p>MicroFrontends can depend on each other on a very shallow hierarchy, usually in tree shape, and it’s even rare if a MicroFrontend has a second level of MicroFrontend. However, services are usually interconnected therefore can become a <a href="https://www.infoq.com/presentations/netflix-chaos-MicroServices/">chaotic spiderweb</a>.</p><ul><li>Difference #2: Communications</li></ul><p>The other difference is how they integrate. MicroServices talk with network requests, usually RESTful, while MicroFrontends will communicate via multitude of ways, from window.postMessage() to requests, params, shared objects, or even shared Redux state.</p><blockquote>These connections will make your system fragile when it wants to evolve.</blockquote><p>To ensure the principle of independence we need to agree on how these systems interconnect. This is what contracts are used for. You describe the available API of the service, and hide internal implementation. This allows flexibility and clear boundaries. These contracts will help you find bugs earlier, deploy faster and safer and make you need less end-to-end environments. For Services, this can be easily implemented as <a href="https://swagger.io/specification/">OpenAPIv3</a> or <a href="https://pact.io/">Pact.io</a>, and the tests can run at pipeline level, ensuring what your component promises to accept and output is being kept at bay.</p><p>This approach sadly cannot be used directly in the MicroFrontend context, as the communication is not standardized as in a REST request, but is usually an in-house solution with its quirks.</p><p>However to allow Continuous Delivery, Continuous Integration, this would be the one of the most important things to achieve to not be blocked by other teams, and to deliver independently. As Dave Farley says in <a href="https://www.youtube.com/watch?v=GPqJ1r9bHec&amp;t=581s">How well designed is your Microservice</a>: If we want to evolve the system, add new functionality, we shouldn’t couple parts together. Having a contract will help independent deployments, untie dependencies and therefore delivery time and quality improves.</p><p>So how can we achieve the same sense of confidence and make sure every component does what they promise? As described earlier, the MicroFrontend structure is more tree-like, so on every interaction you’ll have a HOST that creates and loads the consumer. Sometimes 2 consumers will want to talk to each other, in these scenarios you can either pipe the communication through the host via an event system or some targeting, or just communicate directly.</p><p>You can still define a contract of your communications and the Host MicroFrontend will make sure it sends and receives accordingly. So how do we achieve this?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/0*Y5sr5MDvT198fKNG" /><figcaption>The host creates the consumer in the agreed ways, sends and updates props and receives events.</figcaption></figure><p>In our projects we went with the right props down and actions up to benefit from Redux-like advantages, like predictability of state, debuggability, maintainability. So the next step was to find out how we can actually test the contract being right for our components? We want to test if we are matching the same props from sender and receiver side, no mismatch in naming, typing (memberid vs memberId, string vs number), some cases we wanted to use specific key-values and we also wanted to make sure the actions are met with the agreed payload structure, and no missing fields, and potential errors during the process. For this, we ended up using TypeScript, what covered all these use cases, and if both parts are a TypeScript project, we get compile-time insurance, and if one of them is JavaScript, we can still use the contract as a definition and use other means to secure keeping the contracts rules.</p><p>All this definition becomes an easy to follow contract when defined with TypeScript:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_CXHpGNTjTTAOYALZRX5mA.png" /><figcaption>A simple contract in TypeScript for the props and actions and their payloads.</figcaption></figure><p>I just drafted up a sample contract here, nothing super serious, just wanted to show how types will speak in a contract like this. But here comes the great part: the contract is evaluated at compile time, so you won’t be able to build if you have misconfigured it, and you also get contract code completion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HgkH6KMV2f6ywr35altqxA.gif" /><figcaption>Different actions need different payloads (or none), and the errors are immediately flagged.</figcaption></figure><p>As you can see we can match payload types to actions and also avoid classic problems like is id a number or string kind of issues as well. This of course seems obvious in this small example, but if you have a complex system, these mistypings will have some chance of making it unnoticed until production. If you only have TypeScript on only one side of the contract, it’s still a great way to define and share, but on the non-typescript side you’ll need to defend the contract in other ways, like JavaScript unit tests based on the TypeScript contract definition. If you want to modify or version your contract, you can use advanced markings like @deprecated , and to make the process swift, you can publish to your favourite repository manager like artifactory/nexus/npm from where consumers can keep up to date with the agreed update process.</p><p>At this point we’re sure that both the host and consumer can adhere to the contract. But who is responsible for the full product end-to-end, and how do we test integration?</p><p>If the project is new, collaboration is inevitable, but contracts allow you to develop without blocking each other. Synchronization points will help you stay on track, and Feature Flags will help you deliver continuously in case a component is only partially done. Once a feature is released and we’re back to business as usual, we still want to have a process in case something slips through the contract and we have a Live incident. Since neither Host nor Consumer should be responsible for more than their side of the contract, we decided that Operations are responsible for the end to end journey, as they should already have a good set of monitoring and alerting in place, and they are the ones on call if anything breaks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/0*_4tbFqAiUwADITbD" /><figcaption>The Host and Consumer are only responsible for their own behaviour according to the contract, therefore should test only that part of the contract. Each area will set up their own testing strategy, therefore gaining independence.</figcaption></figure><p>In this diagram you can see this point visualised. Both the Host and the Consumer are only responsible for their side of the contract. They can sort out their quality safety measures as they see fit, they need to make sure their isolated component operates as expected, as designed, and regression tests should be made to make that decision efficient. Some might go for VRT (Visual Regression Testing), some might invest heavily into monitoring, and some might focus on UAT tests running on cypress with the scope of their component, everything else mocked out.</p><p>As <a href="https://www.geepawhill.org/2022/10/04/tdd-pro-tip-against-automated-macrotests/">Geepaw Hill puts it</a>, for automated macro tests the benefits are doubtful. The OPS team will need to focus on monitoring for contract usage.</p><p>This is a tough stance, and consideration will be required. If there is a new cross-cutting feature being released, that will need manual testing, and the contract is of course just data, and not necessarily correspond to business logic. The better your organization have domains defined, the less chance for leaking business logic over the contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wGrN3313CWYU6nSe" /><figcaption>A good contract can make MicroFrontends reusable across different Hosts and also make MicroFrontends easily replaceable.</figcaption></figure><p>This diagram represents our setup, where you can see how parts become interchangeable thanks to the contract. If you’re developing the Host side, you will not need to care about the actual MicroFrontend but use a Mock. And if you’re developing a MicroFrontend, you shouldn’t care who loads you until it’s defined in the contract. The Harness-Mock pair will also give you a good representation of the creation / loading process.</p><p>With some additional work we can help Operations and Devs to effectively identify which side have breached the contract. For this one of the Hosts have made a debug consumer application that we can enable with localStorage.setItem(‘useDebugMicroFrontend’, ‘true’). This will serve as a debug output to visualize props sent down and to be able to trigger actions going up. This helps in solving and narrowing down issues that TypeScript cannot defend against, like Fonts overrides, window variables and incorrect zIndices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6BeVX7-RPkqCBH3v" /><figcaption>Mock MicroFrontend to debug and visualise props received, and faking actions to the Host.</figcaption></figure><p>With all this work, we are now able to pinpoint who breached the contract, and therefore identify responsibilities fast, and also be able to evolve our frontends independently and swiftly. TypeScript helps a lot for not getting some troublesome issues, and with a good domain based isolation of teams making the ownership decisions of features and bugs will be a breeze :)</p><p>#contract-testing #microfrontends #ddd</p><p><em>Thanks for reaching the end, </em><strong><em>please consider clapping and subscribing</em></strong><em>!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d35ef36bda1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why committing to less story points will increase your velocity]]></title>
            <link>https://donkeycoder.medium.com/why-committing-to-less-story-points-will-increase-your-velocity-d821380c6c5?source=rss-6b2b9bd53f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/d821380c6c5</guid>
            <category><![CDATA[management-and-leadership]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[estimations]]></category>
            <category><![CDATA[scrum]]></category>
            <category><![CDATA[planning-poker]]></category>
            <dc:creator><![CDATA[Gabor Csomak]]></dc:creator>
            <pubDate>Thu, 23 Dec 2021 12:02:32 GMT</pubDate>
            <atom:updated>2021-12-23T12:02:32.136Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2H0e0v6EJC_zupC7HfoE8g.jpeg" /></figure><p>Planning poker and sprint planning are tricky areas, and we can improve the team velocity a lot by only committing 80% to the team capacity. Here’s why:</p><p>Sadly, no-one estimates perfectly, and with human bias, estimations of story points will then become currency. And when teams start massaging estimations, many things will go wrong. The reasons can be plenty, from cases like <em>“I don’t want to do this, I’ll estimate higher”,</em> or <em>“Let’s score this lower so it can fit into the next sprint with the other important bits”.</em> Story points by the definition are.. estimated. And far off…</p><blockquote>… because as we know, <strong>there are known knowns;</strong> there are things we know we know. We also know <strong>there are known unknowns</strong>; that is to say we know there are some things we do not know. But <strong>there are also unknown unknowns</strong> — the ones we don’t know we don’t know… — <a href="https://en.wikipedia.org/wiki/Donald_Rumsfeld">Donald Rumsfeld</a>, US Secretary of Defense</blockquote><p>Lets see an example: Let’s say, you have estimated a few stories for the sprint as ½, 3, 5, 5, 8 points, and your velocity is 22:</p><p>The summary of these points are 21.5, so this is less than the team’s velocity, and as there are no holidays, or extraordinary trainings expected, this should fit your sprint backlog nicely, right? Let’s analyse:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*cn6iynpPtiFz_wIs-8Ynaw.png" /><figcaption>How the story points value is statistically expected even in an ideal estimation: ½, 3, 5, 5, 8</figcaption></figure><p>This example and the distribution is fictional, however based on <a href="https://erikbern.com/2019/04/15/why-software-projects-take-longer-than-you-think-a-statistical-model.html">an article from Erik Bernhardsson</a> building from an estimation and effort dataset, gaussian curve is a good representative model for the problem.</p><p>So notice this graph: First of all, since we’re talking about estimations, they can be higher or lower in value, and likely are. Also by the nature of some stories, unknown of unknowns, you can have more and more deviation. This can be managed within some boundaries with the risk discovery <a href="https://en.wikipedia.org/wiki/Cynefin_framework">Cynefin Framework</a>. Also you can see how lower estimates should be more punctual, advocating for proper slicing, and what is also the reason for the use of fibonacci sequence in planning. While that copes for humans being terrible in guessing unknowns, it is also adding additional deviation. You can also see how the same 5 pointer stories can have different deviations. Here I’d like to pinpoint, I used standard normal distribution on calculations to help understand my point. In reality, the near-peak are more flat, and the far-peak should be more rare. Also there might be some asymmetry due to work that far often gets longer than shorter, and it is also immeasurable due to the points representing complexity.</p><p>If the mathematically expected value remains the same, across the sprint you can have a huge deviation (the aggregate of all stories will have the square sum of each estimations deviation), in other words, when committing to your exact velocity, you’ll have 50% of chance to fail the sprint, without any surprises! And if you factor in interruptions, like sickness, system downtime, urgent live issues, you’re already at terrible odds to complete your sprint backlog.</p><p>This is the reason, why sprint goal is an essential part of plannings nowadays, as it “helps setting priorities when ’the going gets tough’ ” — <a href="https://www.scrum.org/resources/blog/11-advantages-using-sprint-goal">scrum.org definition</a>. Scrum does need a rail for when things are getting hard. Because they often are. In fact so often, we should always aim to prevent it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*VR1h5U4syKvxB0YOIspgsQ.png" /><figcaption>Does this estimation of 21.5 points give you confidence for a sprint? How about 80%?</figcaption></figure><p>Of course the estimates’ punctuality depends on the type of work, the team maturity, and many other factors. Good teams will have a narrower bell curve, while others will have a wider.</p><p>My suggestion is to commit less! If you commit to 80% of your velocity to a sprint, that means you only have 19% chance to not finish the sprint (I did the <a href="https://introductorystats.wordpress.com/2011/10/15/the-middle-80-is-not-80th-percentile">maths</a>), meaning you can agree to a more secure workload to your PO, therefore making safer long term estimations, improving business relationships and team trust. So what happens if we finish sprint early you ask? Well, there are plenty of ways to make use of extra time, I can recommend any of these:</p><ul><li><strong>Celebrate!</strong> No business wants burned out teams, and as much as we should celebrate our failures, we should celebrate our successes as well! This will give extra motivation for the future, help the team bond, and make sure the environment is healthy. Mental health is extremely important, and taking a breath before the next sprint will also help focus and dedication. Burnout is one or the factors that affect productivity as Described on <a href="https://services.google.com/fh/files/misc/state-of-devops-2019.pdf">The State of DevOps 2019</a> report.</li><li><strong>Help others: </strong>when committing to less workload <a href="https://medium.com/the-reading-challenge-2018/dont-let-planned-work-ignite-with-incandescent-fury-efa161a83fb6">you can support</a> other teams or other team members without the guilt of sprint work having to be done. This is definitely not a zero-sum-game, if you help others, the business will be thankful, and others will be more likely to help you as well, when in need. Spending ‘free’ time on knowledge sharing will get everyone further.</li><li><strong>Invest in self:</strong> Perform your learning, training activities, or just the missed code reviews.. You can use the well-earned time to improve yourself, therefore in the long run improve the sprint velocity further.</li><li><strong>Pay off tech debt:</strong> I prefer the loan metaphor for tech debt, and just as on a mortgage if you have extra income, you pay off from it, so the interest rate will get lower. Same goes for tech debt. But beware, instead of fixing what you deem dirty, always tackle what will bring benefits for the team. You know the roadmap, business plans should be aligned with the team. Fix what will increase your pace. Technical Debt also affect productivity as seen on <a href="https://services.google.com/fh/files/misc/state-of-devops-2019.pdf">The State of DevOps 2019</a> report.</li><li><strong>Start preparing on coming stories</strong>: Some teams are behind backlog grooming, so this freed up time can be used to clean up the backlog, prepare a move on the dependencies or unknowns, so when you’re actually doing the work, or estimate, you’ll have a better understanding, and more confidence.</li><li><strong>Just carry on:</strong> Sometimes the business is ambitious, or the team wants to get an epic out the door. Starting to work on the next sprint is always welcome, put the story in progress, and start the work. However don’t bring it to the current sprint backlog, as it was never committed. Just be sure that the backlog is neat, so the story is likely to get into the sprint.</li></ul><p>As you can see, all of these options will help your team to increase velocity for the long run. Keep in mind, in this method your velocity will not anymore be counted based on completed story points, as compound interest would bite hard. So how do you adjust the velocity of the team? Pretty much as usual: the 80% commitments in a 2 weeks sprint means you have a good chance to finish 2 days early. If the team is usually finishing the sprint more than a day ahead, you can slowly adjust. If your team usually doesn’t finish in time, of course you’ll need to lower your expectations. I do think it is ideal to have 1 day for the above non-sprint improvements.</p><p>So to summarise, if you don’t commit to 100% load in a sprint, the team will</p><ul><li>Gain consistency</li><li>Have a positive feeling</li><li>Won’t burn out</li><li>Be more helpful across the business</li><li>Be able to improve own velocity and invest in future</li><li>Be more predictable</li><li>Be prepared for the unexpected</li><li>Be more successful</li><li>Have improved productivity</li></ul><p><em>If you found this useful, </em><strong><em>please consider subscribing</em></strong><em>! I plan to write on similar topics soon! Any claps are appreciated :)</em></p><p>#agile #scrum #planning poker #estimates #lessismore #mentalhealth #productivity</p><p>Thanks for my helpful friends for comments and suggestions on this article: Miguel, Francisco, Heorhiy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d821380c6c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Duck Typing in Typescript for Unit Testing — using the ‘unknown’]]></title>
            <link>https://donkeycoder.medium.com/duck-typing-in-typescript-for-unit-testing-using-the-unknown-4cede781967?source=rss-6b2b9bd53f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cede781967</guid>
            <category><![CDATA[duck-typing]]></category>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[unit-testing]]></category>
            <dc:creator><![CDATA[Gabor Csomak]]></dc:creator>
            <pubDate>Tue, 20 Apr 2021 18:03:56 GMT</pubDate>
            <atom:updated>2021-05-03T00:40:45.537Z</atom:updated>
            <content:encoded><![CDATA[<h3>Duck Typing in Typescript for Unit Testing — using the ‘unknown’</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f7eRdoq04qu1RWRf" /><figcaption>Does it look like a duck and quack like a duck?</figcaption></figure><p>Typescript uses duck typing, since the underlying JavaScript is not supporting object orientation by classes but prototypes (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript">A re-introduction to JavaScript</a>). What this means from a practical sense is if you define two classes in Typescript with the same properties, function signatures, the classes will be interchangeable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KLUN0AFGanetajStTOprig.png" /><figcaption>Compiler testing if instances on the left are assignable as the types on the right.</figcaption></figure><p>Keeping in mind that these checks are only compile time, this is still quite cool in real life use cases, for example you can list the backend response and your internal states, and if they can interchange, you will not need to transform or wrap when converting them.</p><p>However Typescript gives a few tools if you still want to forcefully cast an object with “as” to “any” and “unknown” types, latter being type-safe counterpart of it can be anything.</p><p>Now why would you want to escape this safety net? In some situations, not all type information is available or its declaration would take an inappropriate amount of effort. The difference is that ‘any’ will accept everything, and unknown will accept nothing, so latter you’ll need to investigate in runtime. Using unknown therefore helps preparing for strictness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eKIL1pISWeL71PgWQJfAlw.png" /><figcaption>More duck checks!</figcaption></figure><blockquote><em>This way you can have minimal and meaningful unit tests without sacrificing your code quality, and thanks to mentioning the real types, refactors should still pick up in a reasonably comfortable way.</em></blockquote><p>For these exact examples you could have used the <a href="https://www.typescriptlang.org/docs/handbook/unions-and-intersections.html">Union</a> and <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html">Partial Util</a> Types reasonably as well, but this way we express that the input will always have all expected fields given.</p><p>What else is ‘unknown’ good for? If you get dynamic data from a file or a service, typically id being a string or number, you can set it to unknown until you make sure of its type, avoiding hidden type leaks. A few more examples in the <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html">Typescript release notes</a>.</p><p>If you found this useful, <strong>please consider subscribing</strong>! I plan to write simialr topics soon, I promise! Any claps are appreciated :)</p><p>#typescript #tdd #unittesting #ducktyping #til</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cede781967" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Epic FE/BE build pipelines with docker — part 1]]></title>
            <link>https://donkeycoder.medium.com/epic-fe-be-build-pipelines-with-docker-part-1-6a3cf0280ab5?source=rss-6b2b9bd53f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a3cf0280ab5</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[maven]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Gabor Csomak]]></dc:creator>
            <pubDate>Mon, 31 Aug 2020 09:13:41 GMT</pubDate>
            <atom:updated>2020-08-31T09:13:41.440Z</atom:updated>
            <content:encoded><![CDATA[<h3>Epic FE/BE build pipelines with docker — part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*giKgaGTZOPyjWe6aSYi1RQ.jpeg" /><figcaption>Containers, but this time they are for building the.. containers!</figcaption></figure><p>If you have a build server, you might have issues with it. Its hard targeting <a href="https://www.infoq.com/presentations/12k-deployments-day/">10k deployments a day per company</a> , any you may not need to, but we can all agree that a healthy team with a handful developers should be able to do 10+ deployments a day. So what do we expect and need from a good Continuous Delivery / Continuous Integration pipeline?</p><h3>Expectations</h3><ul><li><strong>Build and tag master branch</strong> — this usually includes testing, building, and storing the artifact on nexus / artifactory.</li><li><strong>Build and test any branch </strong>— so you can validate pull requests. It should run unit tests, and probably analyze the code quality, for what we use sonar.</li><li><strong>Never break down</strong> —(<a href="https://www.iofficecorp.com/blog/7-poor-workplace-conditions-that-can-negatively-affect-your-workforce">ineffective work condition</a> #2) it’s very painful when you’re about to finish a story / bug fix, and you need to spend hours debugging the build agent. Especially if the infra is not fully yours, and is managed by another team.</li><li><strong>No external dependencies </strong>— all projects have dependencies. Maven, npm, anything on the build server shared by teams is a risk. If one team updates a version, it can break builds for other teams.</li><li><strong>Fully deterministic</strong> — same input should always end with same output. Looking at npm, where an update in a dependency can make differences between builds on the same day. Also you should be able to run the same build on your local as well!</li><li><strong>Is generally quick </strong>— no one likes waiting hours. If you want to merge a pull request, waiting for the build to verify is always taking time. This of course depends on the project’s nature and size, but I personally prefer under 1 minute builds. Usually to achieve this, you’ll need to utilize multi-threading, and paralell running of tests. On a bigger project you might separate tests by level of importance, and delay some of them.</li><li><strong>A build is preceded by the automation tests</strong> (or the very least triggers nightly automation tests with good notifications) — if you’re building front-end, you cannot escape the benefits (like did we break Safari, did we break any existing feature) of running the whole code in a selenium / web-driver environment. You can only have real CI/CD (and its benefits, if you can trust to release without manual testing involved.</li><li><strong>There are no manual steps, optimizations</strong> — we used to have the assets generation as the designers’ task. They usually optimized the png-s once, and then on the next change forget about it. If it’s not part of the automation, its a hazard, mostly of work being lost.</li><li><strong>Provides measurements</strong> — it will become very handy to track non-functional requirements, to highlight improvements and back falls, weather it’s a back-end load test, or a front-end performance or page-load test. You should already have lot’s of KPI’s, so why not hook it into the build.</li><li><strong>Portable </strong>— business is business. They alwasy change minds. If some high management changes your CI Tooling because we got a new one bundled with our other Microsoft / Atlassian products, or because someone at finance run the cost analysis on moving builds to cloud, you might need to migrate everything you have. Also if you just want to run them locally. Or if you get new servers. So your agents and processes need to be as portable as they can, therefore you need <a href="https://rollout.io/blog/configuration-as-code-everything-need-know/">Config as Code</a>.</li></ul><h3>Dockerise all the builds!</h3><p>Now that we know the goals, we now can start building this. Let’s start with having no external dependencies. This is really similar to most problems today, and the solution of course is containerization. Even if you’ve used docker before, you might think that a docker container is the output of the build, not the producer, but if we use docker to be the host of a build step, we gain the usual benefits: isolation, security, efficiency. So lets see it in action!</p><p>The following code-block is our docker image, what basically sets up the build environment, and depending on the input command, it will call either build or cleanup shell script.</p><h4># Dockerfile</h4><pre>#docker debian</pre><pre>FROM debian:buster-slim</pre><pre># node, npm, grunt, webpack</pre><pre>RUN apt update -y<br>RUN apt install build-essential -y --no-install-recommends<br>RUN apt install nodejs -y --no-install-recommends<br>RUN apt install npm -y --no-install-recommends<br>RUN npm install --global grunt<br>RUN npm install --global webpack<br>RUN npm install --global webpack-cli<br>RUN npm i npm@latest -g</pre><pre># Install Maven</pre><pre>RUN apt update -y<br>RUN mkdir -p /usr/share/man/man1<br>RUN apt-get install maven -y --no-install-recommends</pre><pre># maven config to local</pre><pre>COPY maven-settings.xml “/usr/share/maven/conf/settings.xml”</pre><pre># git and openssh</pre><pre>RUN apt-get install git -y --no-install-recommends<br>RUN apt install openssh-client -y --no-install-recommends<br>RUN git config — global user.name “USERNAME”<br>RUN git config — global user.email “USEREMAIL”<br># -- here you&#39;ll need to set up ssh credentials as well</pre><pre># we set the working directory to the folder that will be mounted.</pre><pre>WORKDIR /sharedfolder/</pre><pre># we copy the runnable scripts</pre><pre>COPY cmd.sh /cmd.sh<br>COPY cleanup.sh /cleanup.sh</pre><pre># if cleanup is 1, it will not build but clean up.</pre><pre>ENV isCleanup=0</pre><pre>## actual build command</pre><pre>CMD echo isCleanup: ${isCleanup} &amp;&amp; \</pre><pre>if [ ${isCleanup} -eq 1 ]; then echo “CLEANUP”; /cleanup.sh; fi &amp;&amp; \</pre><pre>if [ ${isCleanup} -ne 1 ]; then echo “BUILD”; /cmd.sh; fi</pre><p>To build this docker, you’ll need to run “docker-compose up --build --no-start”, what build the docker image, and no-start is needed because now we didn’t create a service in docker.</p><p>To recap, you need to set up the docker instance as you’d set up the build agent of yours. RUN commands will be run on docker build, and when we call docker with the commands below, it will trigger the CMD part, where we only do routing and call the actual shell script.</p><blockquote>docker run -t --rm -v /pwd-path-to-project:/sharedfolder fe-build-script-docker-tag-name</blockquote><p>So what this does, is it runs the docker scripts CMD part where it mounts up the /pwd-path-to-project/ folder of the host machine into docker’s ‘sharedfolder’ folder, ergo /sharedfolder/ will have the project’s code, and the script will work there, because the WORKDIR in the dockerfile is pointing to it. If you ever would want to debug the script, <a href="https://gist.github.com/mitchwongho/11266726">you can run the same with -ti flag and with ‘sh’ at the end</a> of the script to start a shell inside the docker agent.</p><p>And what’s inside the build.sh command?</p><h4>build.sh</h4><pre>#!/bin/bash</pre><pre>mvn -B release:clean resources:resources release:prepare release:perform;</pre><pre>ret=$? #STORE MAVEN RETURN VALUE</pre><pre>( rm -rf ./output || true );</pre><pre>exit $ret;</pre><p>You can see this example build is pretty much just the maven script, with some additional cleanup. We need the return flags, so that the docker script’s output will be the actual build’s output, and not the cleanups, ergo the build will fail / succeed on correct times. You can use your generic build scripts, any npm / maven / grunt script will work, and if you need any perquisites, you’ll need to be sure to set it up on the dockerfile. If you want to distinguish tag and non tag build, you can add further shell scripts, and make the CMD choose between them based on the input parameters. Also be sure to commit these scripts as runnable.</p><h4>cleanup.sh</h4><p>We need a cleanup.sh script, because docker will create files under different user than the host machine, ergo deleting them is much simpler from the same docker container. This could be worked around, but we need a clean workspace after builds anyway, to save on storage. This looks not much more than:</p><pre>#!/bin/bash<br>echo “Cleaning up”;<br>rm -r $(pwd)/{*,.*} # THIS IS VERY DANGEROUS, NEVER RUN ON LOCAL!</pre><h4>Gocd config</h4><p>So now we can have this docker builder running anywhere, and we can call it with simple commands. How do we wire in the build agent to run this docker command?</p><p>In GoCD we can use yaml pipeline descriptors, so its pretty much done like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Au8MIWbkfCOvmW8fYBzwrg.png" /><figcaption>The pipeline-name.gocd.yaml build script. Only step is to fire up the docker script.</figcaption></figure><p><em>#CI #CD #Devops #frontend #build pipelines #gocd #FrontEnd #FrontEndDevelopment #FullStack #code #docker #workfromhome</em></p><p>Special thanks to Mate Farkas, who guided me towards this path, and was helpful whenever I had (tons of) questions.</p><p><strong>Please</strong> tune in and <strong>subscribe</strong> for part 2, where I’ll tackle resources handling and other goodies in a build pipeline! Any claps are appreciated :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a3cf0280ab5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Charles Proxy With Real Devices]]></title>
            <link>https://donkeycoder.medium.com/using-charles-proxy-with-real-devices-6d050bd1b36d?source=rss-6b2b9bd53f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d050bd1b36d</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[proxy]]></category>
            <category><![CDATA[mapping]]></category>
            <category><![CDATA[charles-proxy]]></category>
            <dc:creator><![CDATA[Gabor Csomak]]></dc:creator>
            <pubDate>Thu, 13 Aug 2020 16:34:37 GMT</pubDate>
            <atom:updated>2020-08-13T16:34:37.311Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes you want to use your mappings with a physical device. When you want to use your desktop VPN on an Android, or when you want to edit some cookies on an iPhone, you want to record some game traffic in the hopes of reverse engineering the fog of war. In any case, here are the steps:</p><ol><li>find your proxy address: go to Charles &gt; Proxy &gt; Proxy Settings and note the port. Then go to Charles &gt; Help &gt; Local IP Address. There will be a few, but use the Wifi’s one.</li><li>Connect your device to the IP:Port, by going to:<br>a) <strong>Android</strong>: Wifi &gt; network details &gt; Proxy &gt; Manual and fill in hosntame to be your Charles’ IP, and Port to match Charles’ port, as noted in step 1. <br>b) <strong>iPhone</strong>: Settings &gt; Wifi &gt; (i) &gt; Configure Porxy &gt; Manual, and fill in the IP and Port noted down.<br>c) <strong>Windows</strong>: search for Proxy Settings in start menu, turn it on, with the IP and Port noted down.</li><li>Enable Charles connection. If you open any webpage from the device’s browser (or sometimes automatic queries will trigger it earlier), your desktop Charles will ask for allowing that device’s IP to be proxied.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ft0MAlEA5qlL8za8-7CisQ.png" /></figure><p>4. Install certificates on phone/device by opening <a href="http://chls.pro/ssl">chls.pro/ssl</a> url.</p><ul><li>on iOS you might need to go to settings and force install the certificates.5.</li></ul><p>5. Browse happy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d050bd1b36d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My best Splunk queries — Part I.]]></title>
            <link>https://donkeycoder.medium.com/my-best-splunk-queries-part-i-67b4b0a2ee96?source=rss-6b2b9bd53f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/67b4b0a2ee96</guid>
            <category><![CDATA[google-analytics]]></category>
            <category><![CDATA[analytics-platforms]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[splunk]]></category>
            <category><![CDATA[analytics-tool]]></category>
            <dc:creator><![CDATA[Gabor Csomak]]></dc:creator>
            <pubDate>Sun, 28 Jun 2020 10:30:55 GMT</pubDate>
            <atom:updated>2020-06-28T10:30:55.827Z</atom:updated>
            <content:encoded><![CDATA[<h3>My best Splunk queries — Part I.</h3><p>We use Splunk day to day, and having a perfect query for every occasion helps us big time with monitoring, debugging, issue tracking, especially that Google Analytics has a<a href="https://appleinsider.com/articles/20/06/22/safari-now-blocks-google-analytics-on-sites-new-privacy-report-feature-shows"> hard position for upcoming iOS changes</a>. We use <a href="https://httpd.apache.org/docs/2.4/logs.html">Apache logs</a> for index, and track custom events hitting a self hosted tracking pixel with different parameters.</p><h4>How can I get stats by screen size? How to get statistics by combination of two fields?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PXaa7CbFF8CizBEU7rO3pQ.png" /></figure><pre>index=httpdlogs file=”tracking.gif” platform=phone | eval size=screenWidth. “x” .screenHeight | stats count by size | where count &gt; 10000</pre><p>So this search would look good in a pie chart as well, however you prefer it. The prerequisits being that we log the screenWidth and screenHeight. We also provide a shortcut for phone platform, and we also remove noise by setting minimum count of results. As you can see from the slides this example has decent iPhone5/5C/5S (320x568) usage compared to iPhone XS (414x896). For all iOS resolutions, look <a href="https://iosresolutions.com/">here</a>. The 360x640 size is the most common Android phone size, coming from various Samsung and other devices.</p><h4>How to get stats based on Browser/Chrome version? How to use regexp to get version stats?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MTRgjGIZSLVT7BoTy1-M3Q.png" /></figure><pre>index=httpdlogs file=”tracking.gif” | rex field=useragent “Chrome/(?&lt;chromeversion&gt;[0–9.]+)” | timechart count by chromeversion span=24h</pre><p>In this search we use a Regular expression for getting the version of Chrome, and storing it to field `chromeversion`, and then using the count by day to display charts. This is very good if you want to track if a new Chrome release is affecting your KPIs or not. The regular expression itself is simple, just looks for 0.0.0 format, with any length of numbers having dots between, but it needs to come after “Chrome”. The great bit here from splunk is that it allows you to save the regex match as a field.</p><h4>How to get iOS versions statistics from user agent in splunk?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EYf8E58cxuScK5uWNVEFyg.png" /></figure><p>Similarly to above query, we can do a regexp search for iphone os version, and see 13.5 being popular at 74% today across our userbase.</p><pre>index=httpdlogs file=”tracking.gif” | rex field=useragent “iPhone OS (?&lt;iosver&gt;\w+)” | chart count by iosver</pre><h4>How to show ratio or percentage between two charts? How to eval evaluated fields?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JevFKI_DS1icnzuzPIFCow.png" /><figcaption>I’ve made this chart to highlight some issues with backend, and help tracking it down to the time. As it was correlating to user load, it was really helpful to show the errors as a percentage of total app usage.</figcaption></figure><pre>index=httpdlogs file=”tracking.gif” (event=”token-error” OR event=”AppInit”) <br>| timechart span=1h count(eval(searchmatch(“token-error”))) as tokenError, count(eval(searchmatch(“AppInit”))) as AppInit <br>| eval PercentOfTokenErrors = (tokenError/AppInit)*100 <br>| timechart span=1h per_hour(PercentOfTokenErrors)</pre><p>A lot of things going on here, so lets see. We want to display ratio of ”token-error” and ”AppInit”, so we need to search for any of those 2, so the evals will run faster. Then in timechart we actually evaluate both as a searchmatch, and count them, also saving them as new fields, so in the next pipe we can use them in a different eval. The timechart luckily does the bucketing, so that step is allright. Then the next pipe will evaluate the percentage, so we can see how much of the application inits will cause the token error. Then we can display the PercentOfTokenErrors as per_hour basis, and get the nice chart above, and to make it a constant reminder for the team to fix, we can put it on a dashboard. :)</p><h4>How to get count of unique values in search?</h4><pre>index=httpdlogs event=AppInit | stats dc(userId)</pre><p>This is a simple one, but not too straightforward, just use | stats dc(filedName)</p><h4>How to display load time by platform? How to display average statistics over time?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rcS3ec_mVLNDKKz32IQt7A.png" /></figure><pre>index=httpdlogs file=&quot;tracking.gif” event=loaded | timechart avg(elapsedTime) span=24h by platform</pre><p>This is a simple search again, we are looking for the ‘loaded’ events, and display their average by platform. It’s needed to log the elapsedTime from the client in the tracking parameters.</p><h4>How to compare stats to previous days</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IvEArgqsTFWTDM6L73JSdQ.png" /></figure><pre>index=httpdlogs file=&quot;tracking.gif” event=eventImLookingFor | timechart count span=1h | timewrap d</pre><p>This is a very nice way to compare performance of KPIs between releases, and making sure everything is behaving as expected. Just search for the event, and use timewrap. Also notice that the last hour is incomplete.</p><p>Thanks for listening, if you liked this conent, please clap a few! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67b4b0a2ee96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In development, every character counts]]></title>
            <link>https://donkeycoder.medium.com/in-development-every-character-counts-415d747bb475?source=rss-6b2b9bd53f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/415d747bb475</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Gabor Csomak]]></dc:creator>
            <pubDate>Sat, 06 Jun 2020 08:21:48 GMT</pubDate>
            <atom:updated>2020-06-06T08:21:48.055Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve made a small research project. Basically i wanted to measure clean code. 100 high school graduates answer a ‘what is the output of the code’ kind of questions. Whenever we say code cleanness, we can’t measure. There are of course code smells, but no exact definition. That’s why its always asked on interviews. So lets see some key findings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wf-RmFMuZuktfFVq7bKv5Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c1Sss1El99v9PdyxQaZcPQ.png" /><figcaption>Two version of fizz/buzz. The average speed to answer is 131 vs 63 seconds.</figcaption></figure><p>As you can see on the images, the output is the same, but one is much clearer. <strong>But how important cleanness is? Lack of it can double the time to understand!</strong> Imagine a team of developers need half the time to understand the code! And its not some very out of world example, both solutions can easily be found in production codes. Not only the cleaner code halves the speed of understanding, but it also increased correctness. Lets look at another example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ycUc0o96cZT4Zrdpdo_ukA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s1RmqmjLINxncu5Zbzu7Jw.png" /><figcaption>Can you spot the difference? Correct answers were 68% vs 21%</figcaption></figure><p>In this example, finding the difference between the two code snippets is hard, and it doesn’t come natural. The difference is only a single character. Can you spot it? It’s on line 5. The exam takers didn’t notice either, therefore the right image had the success rate 3 times better!<strong> One character makes a difference of 68% or 21% understands your code.</strong> That is why clean code is important.</p><p>If you want to get updates on this research, don’t forget to subscribe!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=415d747bb475" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You tought Webcomponents are encapsulated?]]></title>
            <link>https://donkeycoder.medium.com/you-tought-webcomponents-are-encapsulated-199cc4faf433?source=rss-6b2b9bd53f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/199cc4faf433</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[polymer-3]]></category>
            <dc:creator><![CDATA[Gabor Csomak]]></dc:creator>
            <pubDate>Fri, 17 Apr 2020 11:01:17 GMT</pubDate>
            <atom:updated>2020-04-17T11:02:33.509Z</atom:updated>
            <content:encoded><![CDATA[<p>Well, <strong>you were wrong</strong>. It turns out Webcomponents leak. We’re using polymer engine, and here’s what our code looked like on the parent page:</p><blockquote>&lt;meta name=”viewport” content=”width=device-width, …, viewport-fit=cover”&gt;</blockquote><p>and in the webcomponent:</p><blockquote>&lt;meta name=”viewport” content=”width=device-width, …”&gt;</blockquote><p>It turns out, as soon as you load the webcomponent, its <strong>meta will override </strong>the parent page’s meta, as they share name, therefore breaking iOS notch functionality, and adding two ugly bars for the not safe space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7f5EzWb90rR4oremFZaIzQ.png" /><figcaption>look, how ugly the two white bar on the edge of the screen is. the viewport-fit will sort that — unless you override it from webcomponents</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=199cc4faf433" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[StackOverflow 2019 Developer Insight]]></title>
            <link>https://donkeycoder.medium.com/stackoverflow-2019-developer-insight-d432ba1a2ed5?source=rss-6b2b9bd53f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/d432ba1a2ed5</guid>
            <category><![CDATA[stackoverflow]]></category>
            <category><![CDATA[staffing-and-recruiting]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[insights]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Gabor Csomak]]></dc:creator>
            <pubDate>Tue, 23 Apr 2019 14:40:03 GMT</pubDate>
            <atom:updated>2019-04-23T14:40:03.661Z</atom:updated>
            <content:encoded><![CDATA[<p>its out!</p><p><a href="https://insights.stackoverflow.com/developer-insights/2019">https://insights.stackoverflow.com/developer-insights/2019</a> for full list.</p><p>My favs:</p><h3>Most Important Job Factors</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*6ANq1whglYYcy9YEP6o64g.png" /></figure><h3>How Often Do Developers Work Remotely?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*2Y7e4D2dA49LWDGCcfs49g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d432ba1a2ed5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>