<?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[Qest technologies - Medium]]></title>
        <description><![CDATA[Články ze softwarové firmy Qest technologies. O lidech, IT, technologiích. - Medium]]></description>
        <link>https://medium.com/qest?source=rss----b1024719e3dd---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Qest technologies - Medium</title>
            <link>https://medium.com/qest?source=rss----b1024719e3dd---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 12:37:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/qest" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Messaging vs. Streaming: A Software Engineer’s Guide]]></title>
            <link>https://medium.com/qest/messaging-vs-streaming-a-software-engineers-guide-8500d97f6f25?source=rss----b1024719e3dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/8500d97f6f25</guid>
            <category><![CDATA[rabbitmq]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[streaming]]></category>
            <dc:creator><![CDATA[Patrik Valkovic]]></dc:creator>
            <pubDate>Wed, 13 Aug 2025 09:29:38 GMT</pubDate>
            <atom:updated>2025-08-18T22:20:42.339Z</atom:updated>
            <content:encoded><![CDATA[<p>Modern software solutions face many challenges. We build distributed systems split into microservices, very often implemented by different teams. We have data pipelines that need to communicate without being tightly coupled. There are some non-technical challenges — users and management want to get insights into the data as early as possible, ideally immediately (think about recommendation systems or real-time dashboards). Websites serve millions of users every day, instead of a few thousand as before. How to tackle those problems?</p><p>Today I want to talk about messaging and streaming, related but by no means the same technologies. They try to solve some of the aforementioned challenges. I will be focusing mostly on RabbitMQ and Apache Kafka, the most prominent and widely used technologies out there. My goal is to introduce you to the general messaging and streaming patterns, how they work, and aspects in which they differ. I will also mention some of the pain points I came across during my professional experience with these technologies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nmw67lwpYJY3EDeXlQGDcg.jpeg" /><figcaption>My name is Patrik Valkovič, solution architect, team leader, and advocate of engineering excellence. The rule I follow is “Clean code, clean conscience.”</figcaption></figure><h3>Asynchronous communication</h3><p>Let’s start with what both of them have in common — they are built on top of asynchronous communication. This requires a small shift in thinking, as I expect most of you are familiar with the traditional synchronous, HTTP-like type of communication. Synchronous communication has advantages that we lose — the calling application receives the response almost immediately, it knows the results and can work with the payload right away (including the errors that occurred, giving the users room to correct their mistake or let the application fix it for them). The familiarity among developers also plays an important role. There are some disadvantages I will talk about in a bit, but let me first introduce you to asynchronicity.</p><p>Asynchronous communication uses messages to communicate — some content that the application (called publisher) sends to other applications through the broker. The broker is responsible for storing the message for a sufficient time and delivering it to the application the message is supposed to go (both RabbitMQ and Kafka are brokers). The receiving application (called a consumer) will ask the broker for messages, and after the broker delivers them, the application can do its job. The application can create and publish more messages as a response to the one it received, making the application both publisher and consumer. The message may be in any format the applications can process, such as binary, JSON, or Protobuf. From the perspective of the broker, the message is just a blob of bytes. The important aspect is that there is no direct invocation and no immediate answer; everything goes through the broker.</p><p>Before moving on, note that although HTTP communication is synchronous and messaging/streaming is asynchronous most of the time, it doesn’t need to be. The type of communication is based on design, not driven by technology. You can turn HTTP into asynchronous communication by returning the 202 Accepted status code and letting the client poll for changes. Similarly, the application sending the message can instruct the consumer where to publish response, making the communication synchronous (although with a bit more effort, I must admit that). This pattern is often called Remote Procedure Call (RPC).</p><p>So what are the advantages? Why go the extra mile?</p><ul><li><strong>Reliability</strong> — the broker stores the messages as long as necessary, working as a buffer between the producer and consumer. The consumer may be overwhelmed or not even be running at the time the publisher sends the message. Once the consumer has enough capacity or is available, it will process the message at its own rate.</li><li><strong>Scaling</strong> — related to the previous point, the consumer doesn’t need to be scaled up to handle a sudden peak of messages. The messages are kept in the broker, allowing retroactive scaling. The system spawns a new instance only when there is work for it to perform, saving the infrastructure from over-scaling and saving in costs.</li><li><strong>Decoupling</strong> — The broker acts as a middleware between the producers and consumers. The producing application has no knowledge of the consuming applications — it doesn’t know where they are running, in what technology, or even how many of them exist. Consider a user registration event, I will use it as an example — the system needs to send a welcome email, create a record in the CRM, provision user resources, and notify an analytics service. In a synchronous, HTTP-based system, the registration service would need to make individual calls to each of those downstream services. The complexity will further grow as more consumer services are added. Now, imagine two services where the user can sign up; the complexity multiplies. With a message broker, the registration service simply publishes a single UserRegistered event. Any service interested in this event can subscribe to it and react accordingly. The producer is completely shielded from the complexity of the downstream ecosystem, leading to a more resilient and maintainable architecture.</li></ul><p>I will start with messaging, as it is conceptually easier to understand. Then, I will follow with streaming and comparison of the two.</p><h3>Messaging</h3><p>Messaging is one flavor of asynchronous communication. The most prominent service out there is RabbitMQ. The publisher sends the message or event in so-called record — data structure containing the message and metadata like encoding, authorization, when the message was sent, etc. One important piece of metadata is the type of message (in RabbitMQ called routing key) — but more on that later. The publisher sends messages to the queue, and the consumers read them. Once the message is processed, it is deleted from the queue. The broker then handles all the heavy lifting in between.</p><p>The broker handles message coordination and many problems for us. The most important ones are:</p><ul><li>Physically saving the messages in queues in case of hardware failure or network partition. Once the system recovers, consumers can safely process messages received before the failure.</li><li>Matching messages to consumers, making sure the message is sent only to a single consumer at a time. This ensures there aren’t duplicates in the system.</li><li>Deleting processed messages from the queue once the consumer acknowledges their successful processing. This is important; the sentence implies two important distinctions from streaming — the consumer must explicitly acknowledge the message, ideally after it is processed, not after it receives it (because of failure handling, more on that in the following point). Secondly, the message is deleted after it is processed.</li><li>The message processing can fail because of various reasons — a bug in the consumer, its crash, or maybe contention of the database during processing of the message. The broker is responsible for retrying failed messages — sending them again, possibly to a different consumer instance.</li></ul><p>These processes are important, as they make the system reliable by making sure no messages are lost and processed only once if possible.</p><h3>Messages Routing</h3><p>When you recall the example from the beginning, I wanted a single message (the UserRegistered event) to be processed by multiple consumers—one to send a welcome email, one to update the CRM, and another for analytics. But as I’ve written, a standard queue delivers each message to only a single consumer and deletes it afterwards. So how do we implement this one-to-many pattern? That is where <strong>exchanges</strong> come into play.</p><p>In RabbitMQ, a producer does not publish a message directly to a queue. Instead, it sends the message to an exchange. The exchange acts as a smart routing agent. It receives the message and, based on its type and a set of rules, determines which queue(s) should receive a copy of the message. This routing logic is based on message metadata, the most common is the <strong>routing key</strong> (describing message type, e.g., user.registered.eu). The rules are encoded in what RabbitMQ calls <strong>bindings</strong> - how queues bind to exchanges.</p><p>To implement the user registration pattern, I’d use a fanout type of exchange. It simply broadcasts every message it receives to all queues that are connected to it. I would create three separate queues: email_queue, crm_queue, and analytics_queue. Each service would consume from its respective queue. By binding all three queues to our fanout exchange, a single UserRegistered message published to that exchange gets copied and delivered to all three queues simultaneously, achieving the desired one-to-many delivery.</p><p>The entire structure of exchanges, queues, and the bindings that connect them is known as the <strong>topology</strong>. Defining a clear and logical topology is a major part of designing a messaging-based distributed system. It represents how information flows through the system and is great for achieving the right communication patterns, whether it’s simple work distribution or complex choreography of queues, exchanges, and services. You can see topology of the system I work on below, it should give you some general idea.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qoZnN0vpBREkZPm7psP67g.png" /></figure><h3>Messaging Brokers</h3><p>So far, I’ve talked mostly about RabbitMQ, but it is not the only representative out there. The landscape is rich with alternatives, each having its own strengths and weaknesses:</p><ul><li><strong>AWS SQS and SNS:</strong> If you are using Amazon Web Services, you are probably familiar with Simple Queue Service (SQS) and Simple Notification Service (SNS). You can combine these two services to achieve results very similar to RabbitMQ — using an SNS topic in place of an exchange and SQS queues as, well queues. SNS handles the message routing (supporting both one-to-many and fanout patterns), and SQS provides the durable queuing for consumers.</li><li><strong>Apache ActiveMQ:</strong> Veteran in the messaging space, ActiveMQ is an open-source broker that supports multiple protocols, including AMQP, STOMP, and MQTT. It’s known for its flexibility and adherence to the Java Message Service (JMS) standard.</li><li><strong>NATS:</strong> A newer, lightweight, and extremely high-performance messaging system. While at its core is a simple and fast pub/sub model, its newer JetStream component adds persistence and streaming capabilities, making its way into both messaging and streaming.</li><li>Other major cloud providers offer their own managed messaging services. Google Cloud Pub/Sub provides a globally scalable event ingestion and delivery system, while Azure Service Bus offers reliable messaging as a service with queues, topics, and advanced features like sessions and duplicate detection.</li></ul><h3>Drawbacks of Messaging</h3><p>Messaging is very powerful, but the design choices behind the architecture introduce certain trade-offs you need to be aware of. Here are some I identified during my work with RabbitMQ:</p><ul><li>Messages are deleted after they are successfully processed. This is efficient for task-based work, but what if a bug is discovered in a consumer <em>after</em> thousands of messages have already been processed incorrectly? The original messages are gone. Regenerating them can be difficult, often requiring complex fixes like recreating messages from application logs or re-running batch jobs. And you are still on the better side; the source data may not even be available anymore.</li><li>To prevent data loss from a single machine failure, the solution needs to be highly available. In RabbitMQ, this is achieved with <strong>Quorum Queues</strong> that replicate messages across at least three nodes in a cluster. While this ensures durability, it means that for every published message, its content is written to disk three times and sent over the network at least four times (but can be up to six times) <strong>for every queue</strong>! For high-throughput systems, this replication overhead can significantly increase storage costs and, more importantly, consume substantial network bandwidth, potentially becoming a bottleneck.</li><li>Poison Pill<strong>:</strong> A message that a consumer can never successfully process — due to a malformed payload or a consumer bug — is known as a “poison pill”. If not handled properly, this message can get stuck at the head of a queue. The broker will deliver it, the consumer will fail, the message will be re-queued, and the cycle will repeat endlessly (because the message is kept at the head of the queue). This not only wastes consumer resources but can have deadly consequences for the broker itself. In RabbitMQ, these repeated failures build up the internal Raft log (a distributed transaction log), which can degrade the performance and, in extreme cases, destabilize the entire cluster. Note that a similar impact can also occur with a message that was processed but not properly acknowledged by the consumer.</li></ul><p>To combat the poison pill problem, the most common solution is the <strong>Dead-Letter Queue (DLQ)</strong> pattern. You can configure a queue to redirect a message to a special queue after a set number of failed delivery attempts — effectively isolating the problematic message. The main queue gets rid of the message and can continue to process healthy messages. Developers can then manually inspect the messages in the DLQ and diagnose and fix the underlying issue without impacting the live system.</p><h3>The Shift to Streaming</h3><p>Where messaging is about sending events, I find streaming is about capturing and storing facts. A stream is not a queue of things to do; it is an <strong>immutable, ordered, and replayable log of events</strong>. Stream is, in some sense, a combination of a queue and persistent storage — the record remains in the stream until it expires (called retention period). The record can’t be modified (hence the immutability), you need to publish a new record with an updated payload. And because the records are stored in the stream, you may replay them even after the record has been processed. You can think of a streaming platform as a distributed transaction or commit log, as a file to which I can only ever append.</p><p>This leads to the most profound difference from messaging: when a consumer reads an event from the stream, the event is <strong>not deleted</strong>. This means the log of events can be re-read as many times as desired by as many different consumers as needed, all at their own pace, without the need to duplicate the messages. A new analytics service I deploy tomorrow can start reading from the beginning of time to build up its state, something that is impossible in a traditional messaging system.</p><h3>Mental model of streaming</h3><p>The messaging model was conceptually easy, at least from the perspective of your application — you send messages to the broker and consumers read data from their respective queues. For streaming, I need to go a bit deeper. I will base the following text on Apache Kafka concepts and terminology, as it is the most well-known streaming platform out there. But even when the terminology may differ across platforms, the concepts remain the same for other alternatives out there.</p><p>Kafka organizes data into <strong>topics</strong> (e.g., user-clicks), which are split into one or more <strong>partitions</strong>. You can think of a partition as a slice of the topic, it contains a subset of messages and is the key to Kafka’s parallelism. Each partition can be further replicated - copied across multiple nodes, ensuring high availability when one of the nodes goes offline. The replication factor is configured at the topic level.</p><p>Let me now focus on the publisher application. For messaging, the logic was easy — just send a message to the broker with a proper routing key. In streaming, the publisher itself must decide which specific partition to send the message to; the decision is entirely in the publisher’s hands. This is most often done by providing a <strong>routing key</strong> with the message. The publisher logic then uses this key to determine the destination partition, typically by hashing the key and mapping it to a partition. The messages should be ideally uniformly distributed across all partitions to avoid “hot partitions” that become performance bottlenecks. Typically, all events for a specific entity (e.g. user) should be processed in the exact sequence as they occurred, and they must be sent to the same partition (otherwise the order is not guaranteed). This is achieved by using the userId as the routing key. Some managed solutions can simplify this; for example, Amazon Kinesis Data Streams uses a partition key (equivalent of routing key), hashes it, and automatically assigns the message to the correct partition (or &quot;shard&quot;) for you.</p><p>Now for the other side — the consumers. Since messages are not deleted from the log, the consumer must track which messages it has already processed; the broker doesn’t do it for you. This progress is tracked by an <strong>offset</strong> of the last processed message within a partition. The consumer is responsible for committing this offset back to the broker periodically. Again, most often done by writing to a special internal Kafka topic, but any other solution, like storing it in a database, can be used. How and when the consumer commits its offset has a direct impact on throughput and consistency. Committing too often decreases throughput, while committing too late can cause duplicate processing (in case of consumer crash).</p><p>To parallelize the work, multiple instances of a consumer application operate as a <strong>consumer group</strong>. Kafka guarantees that each partition is consumed by exactly one consumer within a group. If I have a topic with 10 partitions and I deploy 10 instances of my service in a single consumer group, each instance will handle exactly one partition. If I deploy a second, completely separate service (a different consumer group), it too can read from all 10 partitions in parallel, without interfering with the first group. But if I spawn more instances than that, the remaining ones will sit idle, as there are no more partitions they could process. The number of partitions, therefore, directly controls the maximum parallelism of the system.</p><p>Changing the number of partitions after the topic creation is challenging. After adding new partitions, the publisher’s routing logic must reflect the change. A message for a specific user that previously went to partition A might now be routed to a new partition B, potentially causing events for that user to be processed out of order. This doesn’t need to make problems for some applications, but it can have an impact on others. While possible, deleting partitions is nearly impossible without significant disruption. For example, Kinesis Data Streams solves this by creating a barrier where the consumers wait until all of them catch up.</p><h3>Drawbacks and comparison to Messaging</h3><p>While streaming is a powerful concept, often outperforming messaging solutions, it has some drawbacks, and you should consider them before making the decision.</p><ul><li>Upfront Planning is Critical: Because changing the number of partitions is an expensive and potentially disruptive operation, you must plan your capacity needs in advance. You need to estimate the future throughput of the system to choose a partition count that will be sufficient for the foreseeable future, as correcting later is difficult.</li><li>“Smart Client” Complexity<strong>:</strong> The logic for partitioning messages and tracking processed offsets resides entirely on the publisher and consumer side. This leads to the “smart publisher/consumer, dumb broker” paradigm. This complexity multiplies as the number of services grows; for example, a change in the routing strategy must be carefully propagated to every single publishing service to maintain consistency.</li><li>Consumer Rebalancing<strong>:</strong> When a consumer instance is added to or removed from a consumer group (due to scaling, deployment, or a crash), the group must rebalance. The consumers temporarily stop processing messages while they renegotiate the assignment of partitions. This rebalancing can cause a noticeable pause, temporarily decreasing the overall throughput of the system. From this perspective, messaging solutions handle scaling more smoothly.</li><li>Storage Requirements: The persistent nature of the streaming requires storage. Since messages are retained for a configured period (from hours to months or years), the cluster must have enough disk capacity to store the entire volume of messages for that duration. This can lead to significantly higher storage costs compared to a messaging platform where messages are ephemeral.</li><li>No Routing: The broker itself provides no routing logic. A producer sends a message to a specific topic, and consumers read from that topic. This creates a higher coupling between services compared to the flexible exchange-based routing in RabbitMQ. If a consumer needs data from multiple topics, it must explicitly subscribe to and manage consumption from each one.</li></ul><h3>Other streaming platforms</h3><p>Although I have focused mostly on Kafka, it is by no means the only solution out there. The streaming market is full of alternatives:</p><ul><li><strong>Amazon Kinesis Data Streams:</strong> As mentioned, this is the direct AWS equivalent to a self-managed Kafka cluster. It provides a fully managed, scalable, and durable real-time data streaming service, where you manage “shards” instead of partitions.</li><li><strong>Azure Event Hubs:</strong> Microsoft’s offering of a highly scalable data ingestion service. It integrates tightly with the Azure ecosystem and provides a Kafka-compatible endpoint, allowing you to use existing Kafka applications with minimal changes.</li><li><strong>Google Cloud Pub/Sub:</strong> While also a capable messaging service, Pub/Sub is designed for massive scale and can be used as a streaming backbone.</li><li><strong>NATS JetStream:</strong> Building on the high-performance NATS messaging core, JetStream adds the persistence layer required for true streaming. It offers replayability and consumer state tracking, positioning itself as a modern, simpler alternative to Kafka.</li><li><strong>RabbitMQ Streams:</strong> RabbitMQ now has its own implementation of streaming in Streams and Superstreams (partitioned streams). They become part of mainstream distribution from version 3.9, superstreams a bit later in version 3.11. If you are already using RabbitMQ, this may be a viable option if you don’t want to manage different platform.</li></ul><h3>Brief comparison</h3><p>In summary, you should now have a general understanding of how messaging and streaming work and how they differ from each other. Here is a quick overview summarizing the topics I covered so far.</p><ul><li><strong>Core Idea:</strong> Messaging is for delegating tasks or sending events; messages are work items that get deleted after being processed. Streaming is for capturing facts; they are permanent records in a replayable log that persist even after being read.</li><li><strong>The Broker’s Role:</strong> In messaging, the broker is “smart,” handling message lifecycle and complex routing logic via exchanges and bindings. In streaming, the broker is “dumb,” acting simply as a durable, partitioned log file.</li><li><strong>The Client’s Role:</strong> Messaging clients are relatively simple, as they simply process what the broker delivers to their queue. Streaming clients are “smart,” responsible for deciding where to publish messages (partitioning) and tracking their own reading progress (offsets).</li><li><strong>Data Lifecycle &amp; Replayability:</strong> Messages are ephemeral and deleted after successful processing, making replay impossible. Streamed events are persistent for a configured retention period and can be re-read multiple times by different services.</li><li><strong>Flexibility vs. Performance:</strong> Messaging offers high flexibility with its powerful routing capabilities, but this can introduce overhead. Streaming prioritizes raw throughput and scalability, which requires more upfront planning and shifts complexity to the client applications.</li></ul><h3>Making the Right Choice</h3><p>A few closing words from my side. How to make the correct decision on which of the two approaches to choose?</p><p>I consider a <strong>messaging system</strong> like RabbitMQ when the goal is to reliably delegate tasks (e.g. to a background worker) or notify the rest of the system about changes in the system using events (e.g. user registration). Those are use-cases when I don’t need replay capabilities and the simplified interaction with the broker is more important to me. Guarantees and routing capabilities inside the broker are great to decouple services and allow me to expand the system without modifying existing code.</p><p>I use <strong>Streaming platforms</strong>, like Kafka, to process and analyze the flow of records, possibly even in real-time (e.g. for auditing or detecting fraudulent activities). I use streaming every time I need to make messages as a data source for other services. In those situations, replay capability is the most important feature the streaming brings to the table. Because of the “dumb broker” paradigm, streaming can also achieve higher throughput, making it the way to go for high-traffic websites and applications.</p><p>Finally, let me note that these two patterns are not mutually exclusive. In fact, they can coexist peacefully in a single architecture. I might have a Kafka stream processing application that analyzes a continuous flow of IoT data and, upon detecting an anomaly, produces a message to a RabbitMQ queue to trigger a specific, transactional task, like dispatching a technician.</p><p>That is all from me today, I hope you enjoyed the article and learned something new today. By the way, did you know that Kafka is named after the author Franz Kafka?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8500d97f6f25" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qest/messaging-vs-streaming-a-software-engineers-guide-8500d97f6f25">Messaging vs. Streaming: A Software Engineer’s Guide</a> was originally published in <a href="https://medium.com/qest">Qest technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Squats, Deadlifts & Delivery: How Teaching BodyPump Makes Me a Better Product Owner]]></title>
            <link>https://medium.com/qest/squats-deadlifts-delivery-how-teaching-bodypump-makes-me-a-better-product-owner-def9bef73e36?source=rss----b1024719e3dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/def9bef73e36</guid>
            <category><![CDATA[crossover]]></category>
            <category><![CDATA[lesmills]]></category>
            <category><![CDATA[career-development]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Karolina Maierova]]></dc:creator>
            <pubDate>Wed, 30 Apr 2025 08:32:45 GMT</pubDate>
            <atom:updated>2025-04-30T08:32:45.335Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CSta01n1iRkBInyxp8uFkA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@sxoxm?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Sven Mieke</a> on <a href="https://unsplash.com/photos/three-person-lifting-barbels-Lx_GDv7VA9M?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><p>People are often surprised when I tell them I work in IT <em>and</em> teach group fitness.<br>I get it — it sounds like two completely different worlds.</p><p>By day, I’m a <strong>product owner</strong> at a software company, helping build digital products — websites and apps — for various clients.<br>Before most people have their first coffee, I’m at the gym, coaching a 7:00 AM <strong>Les Mills BodyPump</strong> class.</p><p>At first glance, the contrast is huge.<br>One world is about deadlines, teamwork, and shaping product vision.<br>The other? Music, reps, squats, and managing 20+ people through a challenging and fun workout.</p><p>But teaching BodyPump has made me a <strong>much better PO</strong>.<br>It’s improved how I lead, communicate, and — maybe most importantly — how I hold presence in a room.<br>And yes, I’ve had moments at work where I’ve pushed too hard, forgetting I’m not in front of a fitness class (…we’ll get to that later).</p><h3>🧠 The Five Elements That Shifted How I Work</h3><p>In BodyPump, we train around five core elements — not just for coaching, but for leading a great experience:</p><p><strong>Technique. Coaching. Timing. Performance. Connection.</strong></p><p>And these translate <em>surprisingly well</em> into tech.</p><h3>🧍‍♀️ Technique</h3><p><strong>In class:</strong> It’s about making sure people move safely. I watch their form to prevent injury, not to make it look perfect.<br><strong>At work:</strong> I focus on clarity and structure. It means well-written user stories, easy-to-follow processes, and a team setup that supports safe (and successful) delivery.</p><h3>💬 Coaching</h3><p><strong>In class:</strong> Clear cues are essential. Some people follow visual guidance, others listen for verbal instruction. I adapt, manage tone, and guide without overwhelming.<br><strong>At work:</strong> It’s the same. I’m not just giving tasks — I’m coaching the team toward ownership. Good coaching means knowing when to step in, when to hold space, and how to speak so others can hear.</p><h3>⏱️ Timing</h3><p><strong>In class:</strong> I follow the beat and hit the cue at the right moment. Tempo matters — not just for form, but for energy.<br><strong>At work:</strong> Timing means not forcing a decision too early, knowing when to let ideas simmer, and when to push through. It’s the rhythm of backlogs, meetings, and momentum.</p><h3>🎭 Performance</h3><p><strong>In class:</strong> Even on tough mornings, I have to show up and help others reset, connect with their body, and feel better walking out.<br><strong>At work:</strong> Stakeholder calls, sprint reviews, kickoffs — people take energy cues from me. Performance is leadership. Even when I’m tired, I try to bring confidence and clarity.</p><h3>❤️ Connection</h3><p><strong>In class:</strong> I read the room. I remember names. I give the right encouragement to the right people — some love a shoutout, others just want to blend in.<br><strong>At work:</strong> I apply the same awareness. I listen, adjust my tone depending on the person, and try to meet people where they are. Connection helps teams feel safe and seen, it is essential for good product work.</p><h3>🔁 Group Classes = Agile Teams</h3><p>Running a BodyPump class is like running a sprint.</p><p>There’s a clear structure: warm-up, work, cool-down.<br>We repeat the same choreography over 4–6 weeks, which lets people see progress.<br>We reflect together: <em>How did that feel? How much weight are you going to add next time?</em></p><p>Sound familiar? It’s a retrospective — with music and weights.</p><h3>💪 The Bonus Benefit: Mental Fitness</h3><p>Teaching helps me reset. Mid-rep is when I process ideas. Between tracks, I reflect.<br>I return to my desk more focused, resilient, and ready to handle whatever pops up. Even the 5 PM meeting that <em>should</em> have been an email.</p><h3>🧩 Final Thoughts (and Some Self-Critique)</h3><p>Being a Les Mills instructor has shaped me into a more grounded, empathetic, and confident Product Owner.<br>It’s also taught me that <em>how</em> you show up matters just as much as <em>what</em> you say.</p><p>But I’ll admit — sometimes, I forget I’m not in a gym. I’ve caught myself talking to my team like they’re halfway through a squat track (turns out “let’s gooo!” doesn’t always land in planning meetings).</p><p>Still, whether you’re in tech, fitness, or anywhere in between, there’s value in leading from the front, listening more, and showing up with presence.</p><p>Because sometimes, the best leadership training doesn’t come from a course.<br>It comes from showing up at 6:45 AM with a mic, a playlist, and 20 people trusting you to lead.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=def9bef73e36" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qest/squats-deadlifts-delivery-how-teaching-bodypump-makes-me-a-better-product-owner-def9bef73e36">Squats, Deadlifts &amp; Delivery: How Teaching BodyPump Makes Me a Better Product Owner</a> was originally published in <a href="https://medium.com/qest">Qest technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ECS scale to zero using CloudFront]]></title>
            <link>https://medium.com/qest/ecs-scale-to-zero-using-cloudfront-8b7dcb61b59b?source=rss----b1024719e3dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/8b7dcb61b59b</guid>
            <category><![CDATA[autoscaling]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloudfront]]></category>
            <category><![CDATA[ecs-fargate]]></category>
            <dc:creator><![CDATA[Patrik Valkovic]]></dc:creator>
            <pubDate>Thu, 06 Mar 2025 05:36:04 GMT</pubDate>
            <atom:updated>2025-03-06T05:36:04.239Z</atom:updated>
            <content:encoded><![CDATA[<p>At the age of the cloud, scale to zero is a great opportunity to save some costs on your environment. Dockerized applications have become the standard way of deployment these days, but, unlike serverless computing, the possibility of turning the infrastructure off during times without any traffic is still a bit challenging. Other cloud providers, such as Google Cloud and its <a href="https://cloud.google.com/run/docs/about-instance-autoscaling">Cloud Run</a> service, have scale-to-zero built-in, making it easy to use without much effort. I wouldn&#39;t be surprised if Amazon Web Services introduced similar functionality, it is really a standout feature and a reason for some companies to choose Google over AWS (take that with a grain of salt as I don’t have any inside knowledge from the ECS team). But we don’t need to wait. As is often the case with Amazon Web Services, you can connect multiple services together to achieve suchlike functionality. Today I will explore how CloudFront can be used to automatically scale ECS services to zero and start it up when needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*679T6efH_ZpoyvUuEQFuiA.jpeg" /></figure><h3>What does scale to zero mean?</h3><p>Scale to zero is built on the concept of auto-scaling. Traditionally, auto-scaling refers to the ability of the app or service to increase or decrease its capacity based on the demand —often determined by the number of active users currently visiting your website. It can also involve scaling workers based on the work queue length or processing delay. Scale to zero, as the name suggests, takes this idea further by allowing an application to shut down completely (when there are no requests) and start up when the first user hits your website.</p><p>For this post, I will focus on a dockerized HTTP service running inside <a href="https://aws.amazon.com/ecs/">Elastic Container Service</a>, since that is the most common use case today. Unlike event-driven architectures, where the message in the queue may wait for a while, HTTP is synchronous — requests to the service are expected to return an answer almost immediately. This introduces an extra challenge: <em>something</em> (and I will describe what further down) needs to “hold” the connection open while the container starts up and before it is ready to answer. Google Cloud Run handles this natively and the functionality is ready for you to use, in AWS we will need to implement it ourselves.</p><h4>Why should you care?</h4><p>The biggest benefit is cost savings, especially for environments where some latency is acceptable. This typically includes development or testing stages where the services are used sporadically — mostly during working hours. Scaling to zero can cut your charges by 50 %.</p><p>You might argue that ECS already has scheduled scaling policies, you may configure them to start the service at 08:00 and stop it at 20:00 on working days only. But these schedules are rigid — what if some developer was at the dentist and wanted to work late? Using scale to zero gives you more flexibility, as the service starts automatically when it is and shuts down automatically after the work is done.</p><h3>Architecture</h3><p>I will use a standard backend architecture for containerized applications:</p><ul><li>ECS on top of Fargate chosen for its faster startup time, thus reducing the perceived latency by the user. While EC2-hosted ECS services could work, you must account for the delay in starting the instance, its registration as a container instance, and the container startup itself. By using Fargate, you eliminate all these delays except the container startup.</li><li><a href="https://aws.amazon.com/elasticloadbalancing/application-load-balancer/">Application Load Balancer</a> (ALB): acts as the public-facing entry point and routes traffic to the service.</li><li><a href="https://aws.amazon.com/cloudfront/">CloudFront</a>: for now configured as a simple pass-through proxy, but later used to facilitate the scale-to-zero mechanisms. It will be responsible for starting the container and keeping the in-flight HTTP connection open.</li></ul><p>You can find the diagram with the complete architecture in the repository with the source code.</p><h3>Step 1: Turning the Application Off</h3><p>Let&#39;s start with the easier step, shutting down the application when idle is relatively straightforward — I will use CloudWatch alarm to shut down the application when there is no traffic (in other words, scaling it to zero).</p><p>AWS CloudWatch provides a RequestCount metric for target groups within the ALB namespace, telling you how many requests a load balancer has received. By creating a CloudWatch alarm that monitors this metric, we can trigger an ECS scaling policy to set the number of replicas to zero when no requests are detected for a specified period (e.g. 10 minutes).</p><p>Implementation details:</p><ul><li>Ensure the alarm resolution is not lower than the metric resolution (typically 1 minute), or the alarm will stay in an “INSUFFICIENT_DATA” state.</li><li>Use a threshold value of zero with a &lt;= comparison operator. There isn’t an equality comparison operator.</li><li>AWS CDK does not support simple scaling policies through high-level constructs, so you’ll need to manually create a CfnScalingPolicy (full source code is linked at the end of the post).</li><li>Use absolute values (not percentages) when setting the desired number of tasks. Otherwise the policy may not shut down the task.</li></ul><p>Once set up, your service will automatically scale down when idle. Half the job is done! Now, how do we bring it back to life?</p><h3>Step 2: Start the application on request</h3><p>When you now try to access the application, you will get an HTTP 503 Service Unavailable. That makes sense, as there are no containers to process that request. This is where CloudFront comes into play.</p><p>CloudFront has a feature called <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/high_availability_origin_failover.html">Origin Groups</a>, designed to handle request errors and failover. When configured, it routes all the requests to the designated primary origin (our service). If a request fails, CloudFront automatically retries it with the failover origin. The decision, whether to invoke the failover origin, can be further controlled by the type of error received from the primary origin. In our case, a <a href="https://aws.amazon.com/lambda/">Lambda</a> function will be triggered when the primary origin returns a 503 response code. Here is a description of the whole process:</p><ul><li>CloudFront forwards the request to the primary origin.</li><li>When CloudFront detects a 503response, it forwards the request to a Lambda function instead.</li><li>The Lambda function checks the ECS service and sets the desired task count to 1, but only if it’s currently 0 (to prevent redundant updates from parallel requests).</li><li>The Lambda function waits for the ECS task to start.</li><li>Once the task is running, it resends the original request via CloudFront (which should now call the started task), and proxies the response back to the user.</li></ul><p>Subsequent requests go directly to the ECS service (the CloudFront primary target), bypassing the Lambda function. And that is all the magic needed.</p><p>During my testing, the Fargate task usually <strong>started in around 35s</strong>. It is slower than if native implementation by the ECS is used (for comparison, the Cloud Run task usually takes about 13s to start), but still reasonable.</p><h3>Drawbacks</h3><p>There is one limitation I didn’t mention yet. CloudFront is a Content Delivery Network, and we can’t forget that. Because of the use of Origin Groups, only GET, HEAD, and OPTIONS methods are supported. Since POST and other methods usually modify server state, and there is no guarantee of them being idempotent, they can’t be safely retried by CloudFront. The workaround is to implement a kind of health endpoint that will start up the application and will be called by your application (or manually) before any other operations. To support other HTTP methods, use multiple behaviors on the CloudFront level. This variant is not implemented in the example app, as it dependens on your use case.</p><p>A softer limitation is CloudFront response timeout of 90 seconds. If ECS is slow to start, the function can keep hanging, forcing CloudFront to return connection time out error to the user (no matter the timeout setting of the Lambda function itself). But a simple refresh should work once the service starts up. Increasing the timeout is possible but it may require contacting AWS support.</p><h3>Alternatives</h3><p>The limitation to read-only HTTP methods may not suit everybody. There are alternative ways of combining AWS services to achieve the functionality.</p><ul><li>Using Route53 failover record type. Instead of using CloudFront, Route 53 can direct traffic to different origins based on CloudWatch alarms. When the service is down, it can reroute requests to a Lambda function that initiates ECS. However, this brings other drawbacks such as requiring a short TTL setting so clients catch up with the changes fast. This brings a number of DNS requests (and possibly charges for them) up. There is a generous free tier for Route53, so I don’t expect this would be a significant issue.</li><li>Using Application Load Balancer using <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html">weighted</a> target groups. Though primarily designed for traffic distribution, it might be possible to adapt it for failover and scale-to-zero functionality.</li></ul><p>Each of these alternatives has trade-offs in terms of latency, complexity, and operational overhead. I haven’t explored these yet, but if any of them sound interesting, subscribe and be notified when I dive deeper into them in a future post!</p><h3>Source code</h3><p>The sample application is a simple nginx container, but you can replace it with your own containerized application. Just keep in mind that image size and startup time will affect latency.</p><p>The deployment is fully automated using Cloud Development Kit implemented in TypeScript. You can find the full source code and architecture diagram on GitHub: <a href="https://github.com/PatrikValkovic/ecs-scale-to-zero">https://github.com/PatrikValkovic/ecs-scale-to-zero</a>.</p><h3>Conclusion</h3><p>By combining ECS, CloudFront, and Lambda, we can achieve scale-to-zero behavior without native AWS support. While it’s not as seamless as Cloud Run, it’s a viable solution for cost-conscious environments where occasional startup delays are acceptable.</p><p>Would you try this approach in your own infrastructure? Have you explored other ways to scale ECS services to zero? Let me know your thoughts!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b7dcb61b59b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qest/ecs-scale-to-zero-using-cloudfront-8b7dcb61b59b">ECS scale to zero using CloudFront</a> was originally published in <a href="https://medium.com/qest">Qest technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Uncle Bob’s Clean Code — is it still relevant?]]></title>
            <link>https://medium.com/qest/uncle-bobs-clean-code-is-it-still-relevant-614c71d98748?source=rss----b1024719e3dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/614c71d98748</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Patrik Valkovic]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 14:06:49 GMT</pubDate>
            <atom:updated>2025-01-21T14:06:49.366Z</atom:updated>
            <content:encoded><![CDATA[<h3>Uncle Bob’s Clean Code — is it still relevant?</h3><p>Over the Christmas holidays, I had some time off from work and wanted to step away from monitors for a bit (but only a little). So, I decided to catch up on some books I had been meaning to read for a while. One of those was the <em>Clean Code</em> by Robert C. Martin (aka Uncle Bob). This book is often hailed as “the most important book every developer should read” or the “holy grail” of software engineering. Intrigued, I decided to give it a try and read through it, so you don’t have to (unless you want to, of course). My main curiosity was whether it still holds relevance today, considering the book was published back in 2008. To put that into context, it was the era of PHP 5.2, Java SE6, Internet Explorer 7, and the early days of the iPhone. So, has the <em>Clean Code</em> stood the test of time?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*g9UZbv8SPUJ_asT6l_MO9A.jpeg" /></figure><h3>What the book is about?</h3><p>At its core, <em>Clean Code</em> is about writing good code — and good code, as Uncle Bob argues, must be clean code. But it’s more than just coding style or best practices. Throughout the book, there’s a strong emphasis on professionalism, or what Bob calls “craftsmanship.” He encourages developers to approach coding as both an art and a serious responsibility, rather than merely a means to earn money.</p><p>The book begins by exploring the concept of clean code: What is it? How do we recognize it? Why is it important? Uncle Bob argues that clean code goes beyond syntax and aesthetics, it anticipates future changes. He emphasizes how clean code makes development faster and more enjoyable, while bad code can slow you down and lead to frustration.</p><p>From there, the book dives into pretty standard topics, such as naming variables, function composition, designing classes, and data structures. Each chapter builds on the previous one, gradually expanding the scope from writing a single line of code to architecting entire systems. One chapter I liked dealt with third-party libraries and services, emphasizing the importance of their abstraction to reduce coupling and ensure maintainability.</p><p>The concept I liked about it was the idea of “learning tests.” These are tests you write to understand how a library or API behaves. By writing these tests, you make sure you understand the library, how it should be called, and ensure that it works the way you expect it to. As Uncle Bob notes, “We have to learn the API anyway,” so why not document that learning through tests? I believe you can exclude them from CI/CD pipelines and standard test suites because they serve as documentation and for a developer’s practice, ensuring the library behaves as expected. For example, sending an email every time you run tests is probably not the brightest idea. Even better, you can condition those tests using flag or environment variables, allowing you to run them when you see fit. One such great case is after upgrading your dependencies, allowing you to check for breaking changes.</p><p>The book also dedicates a chapter to concurrency, along with an appendix on the subject (that’s how much Uncle Bob tries to warn us). He highlights just how tricky concurrent programming can be. If you’ve ever worked with multi-threaded applications, you’ll understand the challenges. And if you haven’t, consider yourself lucky. These chapters provide a high-level overview of common pitfalls and emphasize the need for caution when dealing with concurrency — a topic that definitely deserves a book of its own.</p><p>The book concludes with three projects (or rather code snippets) where Uncle Bob applies his principles to real code. These examples show you, step by step, how to refactor messy code into clean code. Not only that, Bob gives insights into why he changed the code the way he did and what it will bring us. The final chapter includes a “smells” list: common patterns that developers should watch out for, as they often indicate deeper issues within the codebase.</p><h3>What Would I Adjust for the Modern Environment?</h3><p>One topic I find noticeably absent from Clean Code is immutability, a programming style where variables and objects are treated as constants — modifications to objects are minimized or avoided completely. Instead of changing an attribute of an existing instance, the immutable approach creates a new instance with the updated attribute. The key advantage is, in my view, its ability to reduce side effects. Imagine passing an object to a function, only to have that function modify the object in some way. Now consider a worse scenario: the code that alters the object is added later as part of a different feature. This introduces “collision” between the caller, who assumes the object remains unchanged (and for example may store the attribute into a local variable), and the callee that modifies it. The result? Bugs that can take days to track down. And the scariest part? There is no way to reliably detect such issues.</p><p>You might argue that immutability introduces performance overhead — after all, creating a new instance for every modification does come with a cost. This is a valid concern, but I think that for most of the applications we work with nowadays (excluding highly constrained environments like microprocessors or real-time systems), the trade-off is worth it. Bugs are often far more expensive to debug and fix than the cost of scaling infrastructure to handle minor performance overhead. As an added bonus, immutability makes multi-threading much easier (remember that there is a dedicated chapter and appendix just for that).</p><p>Another area I personally find overly strict is the guidelines on functions. Bob suggests that functions should ideally be no longer than few (five or so) lines. In the end, it feels like the function should have at most a single if statement or try-catch block. This can result in cluttering a namespace with functions like doSomething, doSomethingCached, or safeDoSomething , making it harder to work with, especially when IDE suggests multiple similar-sounding functions as you start typing. Instead, I prefer functions that are long enough to maintain clarity and context while still fitting comfortably on my screen (with my increased font size this translates to around 27 lines). This balance, in my view, offers better readability and minimizes unnecessary complexity.</p><p>Formatting is another topic that I think has evolved since 2008. Today, many languages come with built-in formatters (e.g., gofmt for Go, rustfmt for Rust), or has dedicated tools like Prettier and ESLint for JavaScript and TypeScript. These tools aren’t perfect, I came from the Node.js ecosystem, and I’ve personally moved away from Prettier (to Eslint stylistic rules) because I couldn’t configure it to align with my preferences. Nevertheless, the tools still help enforce consistency, which is far more valuable than adhering to any particular coding standard. That said, the points raised in the book, such as using vertical spacing, are still important and are not addressed by linting or formatting tools.</p><h3>Should you read it?</h3><p>After much thought, my answer is: probably not. Let me explain. It’s not that the content is inaccurate — quite the opposite, I align with almost everything Uncle Bob discusses.</p><p>Firstly, I suppose you’re considering picking up this book. In that case, it’s likely because you already care about writing readable, high-quality code and have a few years of programming experience under your belt. You are a professional, who understands that poorly-written code, although working, is not yet finished. So by now, many of these lessons may already feel familiar, learned firsthand as you navigated the challenges of real-world development. You know (and understand why) functions and methods should be short and variables should have meaningful names — or at least try your best.</p><p>That said, it might still be worthwhile to skim through the book. It could help you identify blind spots or areas where your understanding could be refined — e.g. when you are junior, the book can be quite eye-opening. However, I wouldn’t suggest committing significant mental energy to it.</p><h3>What to read instead?</h3><p>I highly recommend <em>The Clean Coder</em>, a spiritual sequel to <em>Clean Code</em> as well by Uncle Bob. Despite the similarities in the title, its focus is entirely different — it delves into the professionalism of being a software developer (as Bob wants us to be) and is very little about the code.</p><p>This book addresses topics such as time management, dealing with pressure, communication with stakeholders, and responsibility (there is more to it than you would guess!) One of its standout chapters is on estimates — the perpetual conflict between the developers and business people. It clarifies the distinction between estimates and commitments while giving possible approaches for making reliable predictions.</p><p>At just over 200 pages, it is a powerful read that still, ten years later, offers great insights for software developers. It makes you realize that the job is not just about the code but encompasses a range of other responsibilities. If you’re looking to elevate your approach to the <em>craft</em>, this book is a must-read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SMckSdukwvj9Km3UCjIAEg.png" /></figure><h3>Farewell</h3><p><em>Clean Code</em> has its merits, and its principles remain as relevant today as they were at its publication. If you are considering reading it, chances are you already have a solid grasp of these concepts. That said, it may reinforce what you already know and practice. Skimming the book for areas you might not have considered and moving directly to <em>The Clean Coder</em> could be, in my opinion, more productive. Ultimately, the best way to grow as a developer is still by writing code, making mistakes, and learning from them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=614c71d98748" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qest/uncle-bobs-clean-code-is-it-still-relevant-614c71d98748">Uncle Bob’s Clean Code — is it still relevant?</a> was originally published in <a href="https://medium.com/qest">Qest technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Advent of Code 2024 and what did I take from it]]></title>
            <link>https://medium.com/qest/the-advent-of-code-2024-and-what-did-i-take-from-it-4e1b7e5b0199?source=rss----b1024719e3dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/4e1b7e5b0199</guid>
            <category><![CDATA[github-copilot]]></category>
            <category><![CDATA[advent-of-code]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Patrik Valkovic]]></dc:creator>
            <pubDate>Fri, 03 Jan 2025 14:43:16 GMT</pubDate>
            <atom:updated>2025-01-03T14:43:32.994Z</atom:updated>
            <content:encoded><![CDATA[<p>For those who don’t know, Advent of Code (AoC) is an annual programming competition where participants solve daily puzzles throughout December using a programming language of their choice. In previous years, I’d always started strong but never made it to the end. This year we started a private leaderboard with my colleagues that kept me motivated (I am not competitive, YOU are!) My ego pushed me through the days. I managed to complete all 25 days, and I want to share my thoughts on the experience.</p><p>To make things more interesting, I decided to use Rust, a language we all hear so much about recently. I hadn’t touched it for years. Despite my initial hesitation, I quickly got back in the saddle and came to appreciate its performance and safety features. GitHub Copilot also played a significant role, allowing me to focus on problem-solving rather than getting bogged down in syntax.</p><p>This year’s AoC was both challenging and enjoyable, breaking away from routine. I want to delve deeper into these reflections and see if they resonate with you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZaV86H2cUcDbSzq8" /><figcaption>Photo by <a href="https://unsplash.com/@goshua13?utm_source=medium&amp;utm_medium=referral">Joshua Aragon</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Choosing Rust</h3><p>For this year&#39;s AoC I decided to use Rust. It had been over three years since I last used the language, but the challenge felt like the perfect opportunity to revisit it. I’ve always appreciated Rust for its thoughtful design, and I was curious to see how it would perform for the algorithm-heavy problems AoC is known for.</p><p>One of my initial concerns was Rust’s reputation for having a steep learning curve. I used it before, so I didn’t need to learn the language from scratch, plus my prior experience with C++ gave me a head start. Concepts like ownership, move semantics, and constant objects were already well-known to me. Even the notorious lifetime annotations turned out to be less daunting than I had feared — I only needed them a few times, and the compiler’s error messages guided me through the process effectively.</p><p>I should note that the problems didn’t require overly complex solutions. A single file was sufficient and my largest file was under 400 lines. This allowed me to focus on the algorithms and less on managing complicated codebases or dependencies.</p><p>Looking back, using Rust for AoC 2024 turned out to be a solid choice.</p><h4>Rediscovering Rust’s Strengths</h4><p>I’ve always admired Rust’s design, but the AoC this year gave me a deeper appreciation for how thought-through the language is. One feature that caught me was its approach to numeric operations. Methods like add, checked_add, wrapping_add, and saturating_add forced me to think about the effect I really want to achieve and how the algorithm should behave on the data type boundaries, avoiding the too-common problems with number overflows or unexpected results. It is a bit artificial case in our day-to-day programming problems, but in AoC problems where I very often iterate on an array or grid until some end condition is met is the explicit specification of behavior useful. It came in handy a few times when I wrote buggy logic decrementing unsigned integers.</p><p>One area I was afraid of and where Rust didn’t actually get on my nerves was its lifetime annotations. Before starting AoC, I’d anticipated wrestling with lifetimes, expecting them to slow me down. Surprisingly, I only needed to use them a couple of times, and even then, the compiler’s guidance made it straightforward. The error messages didn’t just highlight the problem — they effectively showed me how to solve it and I just needed to copy-paste the compiler’s suggestions. It felt almost like cheating, but it reinforced how Rust compiler errors can be helpful. The last 25 days gave me a new level of confidence in the language.</p><h4>Performance and Optimization</h4><p>Rust’s aggressive compiler optimizations and the use of SIMD instructions delivered consistently strong performance. Operations on arrays (what Rust refers to as vectors) were executed with efficiency, leveraging modern CPU capabilities without requiring any special effort from my side. On the contrary, my attempts to optimize certain algorithms manually did not always yield better results. For instance, on Day 9, I tried reducing the frequency of array modifications, assuming that fewer deletes inside the array would improve the overall speed. However, my optimizations ended up slowing the program down. Rust’s compiler was already generating highly efficient code for the original implementation utilizing techniques like loop unrolling and vectorization. This demonstrates how Rust allows you to write clear and straightforward code, while the compiler takes care of the complex task of optimizing performance.</p><h4>Challenges with Rust</h4><p>Of course, Rust isn’t perfect — no language is. There are a few things I wish were different. One minor frustration was the lack of implicit type conversions in situations where no precision would be lost. For example, converting a u8 to a u32 always required an explicit cast (as u32). I understand the reasoning behind this strictness—it enforces clarity and avoids ambiguity—but it feels like an unnecessary boilerplate. When the type changes, it is usually necessary to go through the code and change the casts everywhere. In competitive scenarios like Advent of Code, where every second can matter, even small interruptions like these add up (no that I would end within the first 100 even without it).</p><p>Another challenge was Rust’s ownership model, which made certain data structures almost impossible to implement. Doubly linked lists and trees, for instance, often require references pointing both ways, requiring unsafe blocks or elaborate workarounds to manage references correctly. On Day 16, I initially started with structures to represent my data in a graph, but I ran into difficulties when trying to reference parent nodes from children. Ultimately, I decided to rewrite the solution using vectors, which avoided the ownership issues entirely. Funnily, nowadays we call this “simplification” column-based approach or SoA (Structure of Arrays).</p><h3>Gen AI</h3><p>The rapid rise of large language models (LLMs) has changed how we approach competitions like Advent of Code. When I look at the leaderboard, it’s striking how quickly some participants submit their solutions — often within seconds of a problem being released. Solving these puzzles so fast, faster than I can even finish reading the description, clearly involves automation or LLM-based tools. The idea of a person solving problems that fast is just absurd.</p><p>But I don’t want to complain here, I’m not discouraged by this development. If anything, I see it as a natural evolution. I’m actually happy to see progress in development “agents,” which let me focus more on the core problem rather than getting pinned down in implementation details. I don’t feel threatened by these tools; instead, I see them as collaborators, enhancing productivity and letting me concentrate on the bigger picture.</p><p>There is one more thing — in contrast to the projects that we work on a day-to-day basis, the tasks in Advent of Code were still relatively short — a few dozen lines of code. In larger projects, that can span thousands or even millions of lines, the challenge shifts. It’s no longer about writing the code, but understanding the project, its structure, knowing where each functionality is, and why there are these wild constructs that are present in every project. This would require development agents to build an internal knowledge of an application’s architecture, structure, and organization, and all the nasty pieces that nobody wants to touch (the next project will be different, I swear). LLMs are not there yet, but I’m excited about the progress that is ahead of us.</p><h4>GitHub Copilot</h4><p>THE tool I used extensively — GitHub Copilot. Having been away from Rust for three years, I remembered the core concepts but already forgot the specific syntax — method names, iteration operations, or minor details of the language. Copilot helped bridge that gap effectively. It was not about blindly relying on the tool; instead, I treated it like a collaborative partner. I reviewed every suggestion it made, making sure that the code was correct, but also to understand what the code was doing. I consider this the “responsible” way how to use gen AI tools. This balance kept me in control of the process while using Copilot to fill in the blanks quickly.</p><p>I think we’ve shifted the boundary of what can “be done by machine” a bit further with Copilot and alike tools. It’s not just about generating code, but also about how well these tools integrate with your workflow. Copilot might produce a piece of code that’s tens of lines long in a single click, but for me, that’s only the first step. Typically, I’d generate code in a place where is the necessary context, then immediately refine it using my IDE’s refactoring tools (I prefer JetBrains IDE suite) — renaming variables for clarity, extracting methods, or restructuring the logic to better suit the problem at hand. This workflow takes full advantage of Copilot’s capabilities while ensuring the output remains clean and maintainable. I’ve found that generating code first and refactoring afterward is often more effective than letting Copilot generate the method directly.</p><p>By focusing on the problem’s broader structure and letting Copilot handle the repetitive or low-level implementation details, I could spend more time solving the actual challenges of Advent of Code. I enjoyed this kind of collaboration, feeling I had been pair programming with somebody who could also write boring, repetitive code without complaints.</p><h3>Does the university help?</h3><p>Reflecting on my Advent of Code experience, I’d say a university education can provide a noticeable edge, especially when solving puzzles that lean on mathematics or computer science fundamentals. For instance, modular algebra and its combination with prime numbers were helpful insights for Day 14’s puzzle. If you’ve encountered similar problems in a classroom setting, you’re likely to spot these patterns faster. That said, the puzzles are designed to be solvable even without a degree. A bit of trial and error, or brute force, can often lead to the same findings, although you may not formalize it or understand why it holds.</p><p>A solid understanding of algorithms and data structures also proved valuable. A fair share of solutions were built on top of Breadth-First Search or Dijkstra’s algorithm. While it’s entirely possible to reinvent these algorithms yourself, knowing them beforehand means you can jump straight to implementation. This isn’t just about saving time; I for example feel better when I know the path that leads me to my target, rather than wandering around. Of course, those who haven’t studied these topics have plenty of room to learn by doing — sometimes, you end up intuitively writing a well-known algorithm without realizing it.</p><p>And of course, we still have tools like GitHub Copilot that can generate these algorithms for you if you describe them clearly. It is just better if you know what was generated for you.</p><h3>Wrap it up</h3><p>Completing Advent of Code 2024 was a milestone for me. After years of trying without having time or dedication to finish, I completed all 25 days, driven by friendly competition with colleagues. Using Rust added to the challenge and reward. Despite not using it for years, tools like GitHub Copilot made the experience smoother than I expected.</p><p>This year brushed my algorithmic and mathematical knowledge while showing how far the gen AI tools have come. I’m excited about the role of such tools in development, helping programmers in their work.</p><p>In the end, I would like to thank Erik, the author of Advent of Code, for his time and dedication to this wonderful project. I want to thank the Reddit community for a bottomless stream of memes. hope you will help me save Christmas next year.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e1b7e5b0199" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qest/the-advent-of-code-2024-and-what-did-i-take-from-it-4e1b7e5b0199">The Advent of Code 2024 and what did I take from it</a> was originally published in <a href="https://medium.com/qest">Qest technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mezi jedničkou a nulou — #38 Sami]]></title>
            <link>https://medium.com/qest/mezi-jedni%C4%8Dkou-a-nulou-38-sami-5ce5dc4996ad?source=rss----b1024719e3dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/5ce5dc4996ad</guid>
            <category><![CDATA[jsmeqest]]></category>
            <category><![CDATA[mezijednickouanulou]]></category>
            <category><![CDATA[qestlife]]></category>
            <category><![CDATA[rozhovor]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Linda_H]]></dc:creator>
            <pubDate>Thu, 12 Dec 2024 12:53:06 GMT</pubDate>
            <atom:updated>2024-12-12T12:53:06.010Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mezi jedničkou a nulou — #38 Sami</h3><p>O testování, komunikaci a spolupráci</p><p><em>‚,Mezi jedničkou a nulou” </em>je název<em> </em>pro<em> </em>sérii rozhovorů <strong>s lidmi z Qestu</strong>. Díky rozhovorům nahlédnete nejen pod pokličku naší <strong>firemní kultury</strong>, ale rovnou i do <strong>srdce firmy</strong> které tvoří naši lidé — Qesťáci.</p><blockquote>‚‚Od prvního momentu, co jsem k nám vkročil, jsem věděl, že tady chci být a udělám pro to všechno. No, a povedlo se.‘‘</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qmBliJFO_XFpMTe5urYrhg.jpeg" /></figure><p><strong>Sami, co se ti vybaví jako první, když se řekne slovo „tester”? A proč?</strong></p><p>Nejradši bych odpověděl <a href="https://youtu.be/6pDH66X3ClA">videem</a>, protože první, co mě napadne, je taková ta dětská hračka –⁠⁠⁠⁠⁠⁠ „vkládačka” nebo anglicky, myslím, shape sorter. V podstatě to vystihuje moji práci. Vývojář něco vymyslí a já se mu snažím různými způsoby rozbít tu jeho happy path.</p><p><strong>Jaká byla tvoje cesta k testingu? A následně do Qestu?</strong></p><p>Tak většina kolegů už asi ví, že jsem vystudovaný diplomat, jestli se to tak dá říct. Už během studia jsem ale tušil, že to úplně nebude to, co bych chtěl v budoucnu dělat. A lockdown byl pro mě takový první impulz nebo spíš příležitost k tomu, abych se poohlédl někde jinde.</p><p>Inspiroval jsem se tak trochu u mojí sestry, která taky nemá IT vzdělání a je to takovej samouk. Začal jsem si dělat různé online kurzy programovacích jazyků během a po karanténě. No, a po škole už jsem se do toho vrhl docela po hlavě a hledal si práci na pozici QA. Vůbec jsem ze začátku neměl štěstí a chodily mi jen záporný maily. Po několika měsících jsem dostal nabídku na testování ve formě brigády.</p><p>Během brigády jsem začal s rekvalifikačním kurzem na JavaScript, ale pořád jsem si hledal full time job, až se nakonec poštěstilo. Měl jsem první pohovor s Eliškou a následně takový „survivor” nábor v kanceláři. Od prvního momentu, co jsem (teď už) k nám vkročil, jsem věděl, že tady chci být a udělám pro to všechno. No, a povedlo se.</p><p><strong>Testingu už se dnes věnuješ přes rok. Jak vzpomínáš na začátky? Dokážeš říct, co pro tebe byla největší výzva?</strong></p><p>Měl jsem super onboarding od Káji, která mě v podstatě všechno naučila nebo vysvětlila, co a jak chodí. Pomohlo taky, že jsem seděl vedle testera Ondry. Největší výzvou byl první projekt, který jsem dostal na starost krátce po nástupu. V něm jsem zažil větší interakci s klientem a občas to bylo náročné. Bylo to jako na houpačce. Nakonec jsem si ale z projektu odnesl spoustu zkušeností, a to ne jenom, co se týče testingu.</p><p><strong>Co třeba taková komunikace s vývojáři? Jak u tebe probíhala na začátku a jak probíhá dnes?</strong></p><p>Nejradši s nimi komunikuji naživo, z očí do očí. To aspoň vidím hrůzu v jejich očích, když se na ně zezadu plížím s novým bugem. Haha vtip, určitě se v tomhle nevyžívám. Za klukama normálně přijdu a probereme, v čem je problém. Neházím všechno, co se mi nezdá, bezmyšlenkovitě na board jako nový bug, ale nejdřív se snažím získat co nejvíc informací. Teprve pak udělám rozsudek jako Commodus. Přiznávám, že ze začátku jsem jim baštil všechno, ale to se postupem získaných zkušeností změnilo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*jdl9pWVmnZ4H3JNYnAtlrg.jpeg" /></figure><p><strong>Prozraď čtenářům, jak vypadá den testera. Jak třeba začínáš své ráno, co všechno musíš udělat?</strong></p><p>To bude mít asi každý tester trochu jinak. Můj den začíná tak, že se kouknu na boardy všech projektů, které testuju, a podle toho si nějakým způsobem prioritizuju, co v ten daný den budu dělat. To, co dělám každý den, je kontrola dat, jestli to vypadá dobře nebo alespoň přijatelně. Pak už se to odvíjí podle plánu, který jsem si udělal ráno nebo v předchozích dnech. To jsem popsal takový ideální scénář. Většinou ale nevím, kam dřív skočit.</p><p><strong>Dokážeš říct, co je pro práci testera klíčové? A proč?</strong></p><p>Kdybych si to vygooglil, tak mi nejspíš vyjede něco jako: analytické myšlení, smysl pro detail, trpělivost…což je určitě pravda (a každý to zná), ale přidal bych k tomu taky pevný nervy, a ještě schopnost vypustit páru, protože některé dny je to v práci fakt potřeba.</p><p><strong>Bez čeho nedáš v práci ani ránu?</strong></p><p>Bez sluchátek a hudby samozřejmě. Ne, že bych to bez toho nepřežil, ale není to vončo.</p><p><strong>Je tu někdo v Qestu, s kým se ti nejlépe spolupracuje?</strong></p><p>Tak nechci nikoho diskriminovat. Radši řeknu, že v Qestu není nikdo, koho bych rád neměl. Ale kdybych musel někoho vypíchnout, tak jsou to určitě kolegové z mých týmů. S nimi jsem v kontaktu každý den, ať už online nebo offline, a kdybychom se nenáviděli tak by to asi moc nefungovalo.</p><p><strong><em>Rozhovor připravily a fotky nafotily: </em></strong><a href="https://www.linkedin.com/in/lindahubickova/"><em>Lin</em></a>, <a href="https://www.linkedin.com/in/eliska-jiranova/"><em>Eliška</em></a><strong><em><br>Qest na sociálních sítích: </em></strong><a href="https://www.facebook.com/QestCompany/"><em>Facebook</em></a><em>, </em><a href="https://www.instagram.com/qest.cz/"><em>Instagram</em></a><em>, </em><a href="https://www.linkedin.com/company/qest-automation"><em>LinkedIn</em></a><em><br></em><a href="https://qest.cz/"><strong><em>Přidej se k nám!</em></strong></a><strong><em> 👋🏻</em></strong></p><p><strong><em>#mezijednickouanulou #qest #jsmeqest</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ce5dc4996ad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qest/mezi-jedni%C4%8Dkou-a-nulou-38-sami-5ce5dc4996ad">Mezi jedničkou a nulou — #38 Sami</a> was originally published in <a href="https://medium.com/qest">Qest technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mezi jedničkou a nulou — #37 Anna]]></title>
            <link>https://medium.com/qest/mezi-jedni%C4%8Dkou-a-nulou-37-anna-b942b7d9f4b0?source=rss----b1024719e3dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/b942b7d9f4b0</guid>
            <category><![CDATA[product-owner]]></category>
            <category><![CDATA[jsmeqest]]></category>
            <category><![CDATA[scrum]]></category>
            <category><![CDATA[rozhovor]]></category>
            <category><![CDATA[mezijednickouanulou]]></category>
            <dc:creator><![CDATA[Linda_H]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 13:48:22 GMT</pubDate>
            <atom:updated>2024-11-01T13:57:44.354Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mezi jedničkou a nulou — #37 Anna</h3><p>O práci Product Ownera, týmech a řízení projektů</p><p><em>‚,Mezi jedničkou a nulou” </em>je název<em> </em>pro<em> </em>sérii rozhovorů <strong>s lidmi z Qestu</strong>. Díky rozhovorům nahlédnete nejen pod pokličku naší <strong>firemní kultury</strong>, ale rovnou i do <strong>srdce firmy</strong> které tvoří naši lidé — Qesťáci.</p><blockquote>‚‚Z mého pohledu má osobní kontakt stále nezastupitelnou hodnotu. Mám štěstí, že nejen moje týmy chodí pravidelně do kanceláře.‘‘</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tPFXeqsDSlC6SywzZNxyyg.jpeg" /></figure><p><strong>Aničko, opakujeme spolu rozhovor po 4 letech. Zajímalo by mě, jak dlouhou cestu jsi v roli Product Ownerky ušla?</strong></p><p>Od našeho posledního rozhovoru jsem prošla velkým profesním vývojem. Během covidu jsem byla součástí vývoje start-upových aplikací. Pak v roce 2021 přišla spolupráce s DPD. Musela jsem se přizpůsobit nejen změnám na trhu, ale také na jiné formě komunikace a přístupu nového klienta. To mi přineslo i nový rozměr do řízení projektů, jelikož s většími projekty přichází i širší zodpovědnost a potřeba zefektivnit vedení projektů a týmů.</p><p><strong>Jak dnes funguje role Product Ownera v Qestu?</strong></p><p>Role Product Ownera je u nás stále náročnější, a tím pádem zajímavější. Jak jsem již zmínila, dnes se více zaměřujeme na zefektivnění projektů a posilování partnerství s našimi klienty. Vnímám, že Product Owner musí především rychle reagovat na změny a současně přinášet do týmu stabilitu. Qest podporuje rozvoj naší role tak, abychom byli flexibilnější a plně podporovali jak klienty, tak vývojové týmy.</p><p><strong>A co Scrum a agilní vývoj? Jak se těmto disciplínám u nás daří?</strong></p><p>Agilní vývoj je pevnou součástí naší kultury a Scrum je v současnosti nejčastější metodikou, kterou při vývoji používáme. U některých produktů se ale setkáváme se specifickými potřebami, kde je lepší volbou například metoda Kanban.</p><p>K agilitě přistupujeme prakticky — dáváme si prostor pro experimenty, ale zároveň se držíme ověřených postupů. Nedávno jsme začali zkoušet metodu Shape Up, která staví na 6týdenních pracovních cyklech (v Qestu máme aktuálně 8týdenní a interně jsme si je pojmenovali jako Chapters) a jasně definovaném zadání. Tento přístup vnímáme jako efektivní způsob řízení vývoje produktů, který nám umožňuje udržet jasný směr pro tým a zároveň mít stále na paměti dlouhodobé cíle a vize.</p><p><strong>Za dobu, co působíš v Qestu, jsi měla několik projektů. Řekni nám, na jakém projektu tě můžeme najít dnes?</strong></p><p>Stále spolupracuji s DPD, nicméně dnes v širším měřítku. Vedu 2 ze 4 týmů, které se na projektu podílí, což znamená pochopení a předání informace, jak funguje provoz a interní procesy DPD. Cílem je, abychom implementovali řešení, která jsou srozumitelná a zjednodušují práci našim uživatelům. Jedná se o kombinaci projektů, které přináší inovace, ale také projekty, které vylepšují a rozšiřují už provozované aplikace. Interně spolupracuji nejen s týmem vývojářů, ale také naším UX/UI týmem, testery a datařem. A pro další rady si chodím i za našimi Product Ownery.</p><p><strong>V čem je pro tebe tento projekt „srdcovka”?</strong></p><p>S DPD spolupracuji už přes 3 roky. Je to intenzivní spolupráce a v něčem je pro mě už snažší, protože jsem získala know-how, jak firma funguje. Jedná se o projekty, které kombinují software, hardware, procesy interních zaměstnanců DPD i koncových uživatelů. Takže široká škála a komplexnost. Jsem tak součástí projektů, které mají reálný vliv, a navíc mám skvělé týmy a okolo sebe inspirující kolegy a kolegyně, což mě naplňuje a dává energii. Zkrátka mě baví vidět, jak se jednotlivé produkty rozvíjí a jakou rychlostí.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L4nkieIYd8UCeIi1JDexKQ.jpeg" /></figure><p><strong>Jaké nástroje používáš ke své práci? A který nástroj je tvůj favorit (prostě bez něj nedáš ani ránu)?</strong></p><p>Jednoznačně bych zvolila Notion — stal se pro mě nepostradatelným pomocníkem. Používám ho na vedení projektů, tvorbu vlastních to-do listů, sledování statusu projektů i sdílení poznámek ze schůzek. Používáme jej pro zjednodušení komunikace s klientem např. pro vyjasnění priorit a statusy. Díky jeho univerzálnosti ho vnímám jako nástroj, který se budeme snažit ještě více rozvíjet. A přiznám se, že jsem si ho oblíbila natolik, že ho využívám i v osobním životě — aktuálně mi třeba pomáhá s plánováním svatby. Zkrátka nástroj, který už si neumím představit nepoužívat.</p><p>Pro samotný vývoj pak používáme Azure DevOps. A to jak na řízení samotného vývoje, tak na správu backlogů a boardů. Poskytuje nám prostor pro sledování celkového progresu a jednotlivých úkolů.</p><p>Tyto nástroje dohromady tvoří základ naší práce a pomáhají nám udržovat efektivní strukturu a komunikaci.</p><p><strong>Když jsme spolu dělaly rozhovor v dubnu 2020, pandemie byla v plném proudu, což znamenalo, že se všechno přesunulo do on-line prostředí. Jak vnímáš celý tenhle přesun dnes? Zlepšilo se něco? Nebo naopak zhoršilo?</strong></p><p>Už před pandemií jsme v Qestu pracovali částečně online, ale současná hybridní forma je pro nás ideální kombinací flexibility a osobních setkání. Z mého pohledu má osobní kontakt stále nezastupitelnou hodnotu. Mám štěstí, že nejen moje týmy chodí pravidelně do kanceláře. Případně kolegové/kolegyně, kteří bydlí mimo Prahu dojíždí alespoň jednou týdně. Věřím, že jako lidé osobní kontakt jednoduše potřebujeme — je to něco, co posiluje týmové vztahy a udržuje zdravou dynamiku spolupráce, což čistě online prostředí nahradit nedokáže.</p><p><strong>Jak dnes jako Product Ownerka přistupuješ ke komunikaci s vývojáři? Existuje podle tebe nějaký návod nebo „hack”?</strong></p><p>Komunikace s vývojáři je pro mě o důvěře a otevřeném přístupu. Klíčové je jim poskytnout „proč” — smysl, proč to děláme, a jasné zadání. Také je pro mě důležité, aby měli prostor být kreativní v tom, co vyvíjíme, a mohli se tak seberealizovat. Mám radost, když vidím, že je daný projekt naplňuje a přemýšlí o něm ve větším měřítku (než jen o daných funkcionalitách).</p><p><strong>Závěrem nám pověz, co máš na své práci nejraději?</strong></p><p>Nejvíc mě naplňuje, že naše práce má smysl. Vidím, jak se konkrétní nápady rychle stávají realitou, která klientům pomáhá v jejich byznysu. V každém projektu narážím na nové výzvy a učím se spolu s týmem růst. Všichni musíme najít vnitřní motivaci — každý projekt je jiný — takže na jednom projektu může být výzvou dobře odkomunikovat a prioritizovat nekonečný příliv nových nápadů, u jiného projektu je sesbírat smysluplné zadání. Zároveň mě baví práce s lidmi nebo moji kolegové a kolegyně, se kterými jsme v tom spolu. Baví mě ta komplexnost.</p><p><strong><em>Rozhovor připravily a fotky nafotily: </em></strong><a href="https://www.linkedin.com/in/lindahubickova/"><em>Lin</em></a>, <a href="https://www.linkedin.com/in/eliska-jiranova/"><em>Eliška</em></a><strong><em><br>Qest na sociálních sítích: </em></strong><a href="https://www.facebook.com/QestCompany/"><em>Facebook</em></a><em>, </em><a href="https://www.instagram.com/qest.cz/"><em>Instagram</em></a><em>, </em><a href="https://www.linkedin.com/company/qest-automation"><em>LinkedIn</em></a><em><br></em><a href="https://qest.cz/"><strong><em>Přidej se k nám!</em></strong></a><strong><em> 👋🏻</em></strong></p><p><strong><em>#mezijednickouanulou #qest #jsmeqest</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b942b7d9f4b0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qest/mezi-jedni%C4%8Dkou-a-nulou-37-anna-b942b7d9f4b0">Mezi jedničkou a nulou — #37 Anna</a> was originally published in <a href="https://medium.com/qest">Qest technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mezi jedničkou a nulou — #36 Patrik]]></title>
            <link>https://medium.com/qest/mezi-jedni%C4%8Dkou-a-nulou-36-patrik-a4bb099c4bbf?source=rss----b1024719e3dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/a4bb099c4bbf</guid>
            <category><![CDATA[mezijednickouanulou]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[football]]></category>
            <category><![CDATA[rozhovor]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Linda_H]]></dc:creator>
            <pubDate>Thu, 15 Aug 2024 10:28:47 GMT</pubDate>
            <atom:updated>2024-08-15T10:28:35.545Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mezi jedničkou a nulou — #36 Patrik</h3><p>React, fotbal a vzdělávání</p><p><em>‚,Mezi jedničkou a nulou” </em>je název<em> </em>pro<em> </em>sérii rozhovorů <strong>s lidmi z Qestu</strong>. Díky rozhovorům nahlédnete nejen pod pokličku naší <strong>firemní kultury</strong>, ale rovnou i do <strong>srdce firmy</strong> které tvoří naši lidé — Qesťáci.</p><blockquote>‚‚Sporty obecně jsou skvělým způsobem, jak si vyčistit hlavu, ale konkrétně fotbal mě nutí se opravdu soustředit na různé aspekty hry.‘‘</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uMVZnIM5vhRpJailKI05XA.jpeg" /></figure><p><strong>Patriku, na začátek si řekněme co tě přivedlo k programování a proč ses rozhodl specializovat na frontend, konkrétně na React a JavaScript?</strong></p><p>K programování jsem se dostal na střední škole. Jako hodně kluků v mém věku jsem po základní škole neměl úplně jasno, co chci dělat dál. Počítačové hry mě vždycky bavily, a tak mě napadlo, že bych mohl zkusit něco s počítači.</p><p>Na střední jsme se učili základy programování v různých jazycích jako C a C#, ale vše se točilo hlavně kolem syntaxe a technických aspektů. Zpětně si uvědomuju, že mi tam chyběl nějaký kreativní prvek, který by mě opravdu zaujal, ale tehdy jsem to tak nevnímal. První 2 roky pro mě byly spíš trápením, a dokonce jsem začal uvažovat, jestli programování je něco, čemu se chci dál věnovat.</p><p>Změna přišla ve 3. ročníku. V té době jsem měl učitele, který mi dal jasně najevo, že musím přemýšlet o tom, co vlastně umím a co ze mě jednou bude. To mě donutilo se programování věnovat i mimo školu. Začal jsem experimentovat s arduinem, ale to mě moc neoslovilo. Náhodou jsem dostal příležitost vytvořit web pro fotbalový klub, kde hraju, a tak jsem objevil JavaScript. Poprvé jsem pocítil dopamin z programování, protože jsem okamžitě viděl výsledky své práce a cítil, že něco tvořím. React jsem objevil díky YouTube, kde jsem narazil na videa od programátorů, kteří na něj nedali dopustit. Když jsem ho zkusil, rychle mě to chytlo.</p><p>A proč frontend? Jako samouk jsem se zaměřil na to, co jsem viděl, co mě bavilo a kam mě zavedl algoritmus YouTube.</p><p><strong>Jaký byl dosud nejzajímavější nebo nejnáročnější projekt, na kterém jsi pracoval. A co sis z něj odnesl?</strong></p><p>Nejzajímavější projekt, na kterém momentálně pracuji, je vývoj webové aplikace pro síť hotelů. Aplikace je tvořena primárně pro mobilní zařízení, ale zároveň je důležité, aby dobře fungovala i na desktopu. Naším cílem je zjednodušit zákazníkům proces od pre-checkinu až po check-out, což jim ušetří čas strávený na recepci a při dalších administrativních úkonech.</p><p>Projekt je pro mě výzva hlavně kvůli počtu reálných uživatelů, kteří ho využívají už v rané fázi. To ve mně vyvolává pocit velké zodpovědnosti a nutí mě vciťovat se do lidí na hotelech. Přemýšlet nad problémy, které možná ani sami nevnímají, a hledat způsoby, jak jim zpříjemnit celý proces ubytování prostřednictvím našeho kódu.</p><p>Z tohoto projektu si odnáším cenné zkušenosti. Je to totiž poprvé, kdy pracuji na projektu, do kterého je zapojeno více vývojářských týmů. To přináší nové výzvy, jako je koordinace práce a komunikace mezi týmy, ale zároveň mi to umožňuje získat širší přehled o celkovém vývoji. Díky tomu, že náš tým je otevřený a flexibilní, mám také příležitost podívat se na backendový vývoj, což mi poskytuje cenný vhled do dalších částí procesu a rozšiřuje mé dovednosti.</p><p><strong>Jakým způsobem přistupuješ k řešení problémů v kódu? Máš nějaký osvědčený postup nebo techniku, kterou využíváš, když se zasekneš?</strong></p><p>Když narazím na problém v kódu, mým prvním krokem je co nejhlouběji porozumět jeho podstatě. Než vůbec začnu hledat řešení, snažím se ujistit, že problém dokážu vysvětlit někomu dalšímu, kdo nemá předchozí kontext. Jakmile mám pocit, že problému skutečně rozumím, držím se osvědčené poučky, která může znít jako klišé: „Make it work, make it right, make it fast.” Tedy nejdřív se zaměřit na to, aby řešení fungovalo, potom ho zoptimalizovat a nakonec se postarat o jeho rychlost.</p><p>Když se zaseknu, často mi pomůže si od problému na chvíli odpočinout. Někdy stačí pár kliků, dřepů nebo krátká procházka. Fyzická aktivita mi dokáže vyčistit hlavu a vrátit se k problému s novým pohledem. Další technikou, která funguje, je vysvětlit problém kolegovi. I když mě třeba neposlouchá na 100 %, samotný proces vysvětlování mě nutí o problému přemýšlet a často mě to dovede k řešení, které jsem předtím přehlédl.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fwoEhibUSn8ZPFAbCX1a6g.jpeg" /></figure><p><strong>Vím, že když nejsi u počítače, rád hraješ fotbal. Co tě na tomto sportu nejvíc baví a jak často se mu věnuješ?</strong></p><p>Na fotbale mě nejvíc baví jeho všestrannost. Je to sport, kde musíš být silný v soubojích, mít rychlost, dobrý výskok, fyzickou kondici a zároveň dodržovat taktiku a být mentálně připravený. Líbí se mi, že fotbal kombinuje tolik různých dovedností, takže je vždycky co zlepšovat. Kromě toho mi je sympatický, že to není one man show — správná taktika může často vést k tomu, že outsider porazí favorita. S tím se pojí i to emoční vypětí, které fotbal přináší. Ať už jde o okamžiky, kdy prohráváme, nebo když vyhráváme, když se blíží konec zápasu nebo když se něco povede či nepovede. Je to horská dráha emocí. Fotbalu se momentálně věnuji 2krát týdně na trénincích a pak mám o víkendu zápas.</p><p><strong>Komu ve fotbale fandíš? A proč?</strong></p><p>Ve fotbale aktivně fandím 2 klubům: Realu Madrid a Spartě Praha. Realu fandím od mala, hlavně kvůli Cristianu Ronaldovi, který pro mě vždycky byl ikonou. Na začátku jsem fandil spíše jemu než samotnému týmu, ale postupem času jsem si oblíbil celý klub. Real Madrid mě udivuje tím, že dokáže být úspěšný po celé dekády, což svědčí o jeho kvalitě a tradici.</p><p>Ke Spartě Praha jsem se dostal také v mladém věku. Jako dítě, které není přímo ovlivněné tátou, často fandíš týmu, kterému se v té době daří, a u mě to byla právě Sparta, která tehdy hrála evropské poháry. Bohužel jsem si pak prošel obdobím asi 8 let, kdy se Spartě nedařilo, ale naštěstí se titul vrátil tam, kam patří.</p><p><strong>Jak ti hraní fotbalu pomáhá v pracovním životě? Vidíš nějaké podobnosti mezi týmovou prací na hřišti a v kanceláři?</strong></p><p>Fotbal mi v pracovním životě pomáhá hodně. Hlavně tím, že mě odtrhne od práce a umožní mi si psychicky odpočinout. Sporty obecně jsou skvělým způsobem, jak si vyčistit hlavu, ale konkrétně fotbal mě nutí se opravdu soustředit na různé aspekty hry. Běh nebo cvičení mi sice také pomáhají, ale nedostanou mě od myšlenek na práci tak dobře jako fotbal, kde musím být v přítomném okamžiku.</p><p>Podobnosti mezi fotbalem a prací v kanceláři určitě vnímám. Při fotbale, a asi při týmových sportech obecně, se setkává směs lidí s různými talenty. Trenér, nebo dokonce hráči sami, se pak snaží tyhle talenty sladit tak, aby tým společně fungoval a dosáhl dobrých výsledků. To je velmi podobné i v práci, kde každý z nás má své silné stránky, a jde o to, aby všechny dohromady tvořily fungující celek. Další paralelou, kterou vnímám, je, jak se ve fotbale musí člověk vypořádat s chybami, ať už jsou to chyby spoluhráče, nebo co je často těžší, vlastní chyby. Schopnost poučit se z chyb a zároveň podpořit ostatní je podle mě klíčová jak na hřišti, tak i v pracovním týmu.</p><p><strong>Jaký je tvůj názor na budoucnost frontendu? Vidíš nějaké technologie nebo trendy, které budou podle tebe dominovat v příštích letech?</strong></p><p>Budoucnost frontendu vidím v tom, že se část logiky a kódu opět přesouvá zpět na server. Například React přichází s konceptem Server Components, který umožňuje zpracovávat části kódu na serveru, což může výrazně zlepšit výkon a uživatelskou zkušenost.</p><p>Všímám si také, že technologičtí giganti směřují k vývoji frameworků, které usnadňují tvorbu fullstack aplikací, a tím se z čistých frontenďáků stále více stávají fullstack developeři. Navíc technologie jako Next.js a Remix jsou podle mě na vzestupu a mají potenciál stát se velmi silnými v budoucnu. Zároveň vnímám i rostoucí popularitu technologie HTMX, kterou si obzvláště pochvalují backend vývojáři.</p><p><strong><em>Rozhovor připravily a fotky nafotily: </em></strong><a href="https://www.linkedin.com/in/lindahubickova/"><em>Lin</em></a>, <a href="https://www.linkedin.com/in/eliska-jiranova/"><em>Eliška</em></a><strong><em><br>Qest na sociálních sítích: </em></strong><a href="https://www.facebook.com/QestCompany/"><em>Facebook</em></a><em>, </em><a href="https://www.instagram.com/qest.cz/"><em>Instagram</em></a><em>, </em><a href="https://www.linkedin.com/company/qest-automation"><em>LinkedIn</em></a><em><br></em><a href="https://qest.cz/"><strong><em>Přidej se k nám!</em></strong></a><strong><em> 👋🏻</em></strong></p><p><strong><em>#mezijednickouanulou #qest #jsmeqest</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4bb099c4bbf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qest/mezi-jedni%C4%8Dkou-a-nulou-36-patrik-a4bb099c4bbf">Mezi jedničkou a nulou — #36 Patrik</a> was originally published in <a href="https://medium.com/qest">Qest technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Load Testing with k6]]></title>
            <link>https://medium.com/qest/load-testing-with-k6-ef17a1f64def?source=rss----b1024719e3dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/ef17a1f64def</guid>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[load-testing]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[k6]]></category>
            <dc:creator><![CDATA[Dan Jarkovský]]></dc:creator>
            <pubDate>Wed, 10 Jul 2024 08:10:25 GMT</pubDate>
            <atom:updated>2024-07-10T08:10:25.470Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JwTe4eS_fvHBjXl2mOlYoQ.png" /></figure><p>When developing a web application, ensuring it can handle anticipated traffic is crucial. Load testing, which involves simulating expected traffic, allows you to observe how your application performs under such load.</p><p>Using a load testing tool helps you identify and address performance bottlenecks, optimize resource allocation, and improve the overall user experience by providing detailed metrics on request durations, error rates, and data throughput, enabling you to make informed decisions about infrastructure improvements, application performance and scaling.</p><p>There are numerous tools available to assist in this process, one of which is k6.</p><h3>What is k6?</h3><p>k6 is a developer-centric, open-source load testing tool designed to test application or infrastructure performance by simulating traffic. Built using Go and JavaScript, it seamlessly integrates into your development workflow.</p><p>k6 tests generate metrics that can be exported to various systems, including Grafana, Datadog, and New Relic, enabling you to monitor application and infrastructure performance.</p><p>Tests in k6 are scripted in JavaScript and can be executed via the command line. Additionally, k6 offers a cloud service and Kubernetes integration, although we’ll focus on the simplest method: running tests from the command line.</p><h3>Introduction to Tests</h3><p>To conduct a basic test, you’ll need to install the k6 tool and create a JavaScript file containing the test script. Let’s begin by installing k6 with the following command:</p><pre>$ npm install -g k6</pre><p>Then, create a JavaScript file with the following content:</p><pre>import http from &#39;k6/http&#39;;<br>import {sleep} from &#39;k6&#39;;<br><br>export default function () {<br>    http.get(&#39;http://test.k6.io&#39;);<br>    sleep(1);<br>}</pre><h3>How to Run a Test</h3><p>k6 offers three primary methods for test execution: via the command line, cloud, or Kubernetes. For now, we’ll focus on the command line.</p><pre>$ k6 run my_test.js</pre><h4>Virtual Users (VUs) and Test Duration</h4><p>By default, k6 runs the test once. However, you can specify the number of virtual users (VUs) and the test duration:</p><pre>$ k6 run --vus 10 --duration 30s my_test.js</pre><p>This command executes the test with 10 virtual users over a 30-second duration.</p><p>Upon test completion, the console displays the following result:</p><pre><br>        /\      |‾‾| /‾‾/   /‾‾/<br>   /\  /  \     |  |/  /   /  /<br>  /  \/    \    |     (   /   ‾‾\<br> /          \   |  |\  \ |  (‾)  |<br>/ __________ \  |__| \__\ \_____/ .io<br><br>execution: local<br>   script: ./test-scripts/simple.js<br>   output: -<br><br>scenarios: (100.00%) 1 scenario, 10 max VUs, 1m0s max duration (incl. graceful stop):<br>         * default: 10 looping VUs for 30s (gracefulStop: 30s)<br><br><br>   data_received..................: 2.7 MB 85 kB/s<br>   data_sent......................: 48 kB  1.5 kB/s<br>   http_req_blocked...............: avg=14.54ms  min=2µs      med=9µs      max=437.01ms p(90)=18µs     p(95)=37µs<br>   http_req_connecting............: avg=3.88ms   min=0s       med=0s       max=137.02ms p(90)=0s       p(95)=0s<br>   http_req_duration..............: avg=179.54ms min=121.16ms med=158.52ms max=1.37s    p(90)=247.84ms p(95)=257.19ms<br>     { expected_response:true }...: avg=179.54ms min=121.16ms med=158.52ms max=1.37s    p(90)=247.84ms p(95)=257.19ms<br>   http_req_failed................: 0.00%  ✓ 0         ✗ 442<br>   http_req_receiving.............: avg=6.27ms   min=30µs     med=134µs    max=162.53ms p(90)=360.5µs  p(95)=60.16ms<br>   http_req_sending...............: avg=40.25µs  min=10µs     med=35.5µs   max=310µs    p(90)=58µs     p(95)=71µs<br>   http_req_tls_handshaking.......: avg=8.71ms   min=0s       med=0s       max=401.03ms p(90)=0s       p(95)=0s<br>   http_req_waiting...............: avg=173.22ms min=120.89ms med=150.6ms  max=1.37s    p(90)=243.45ms p(95)=250.81ms<br>   http_reqs......................: 442    14.048303/s<br>   iteration_duration.............: avg=1.38s    min=1.27s    med=1.34s    max=2.51s    p(90)=1.4s     p(95)=1.47s<br>   iterations.....................: 221    7.024151/s<br>   vus............................: 4      min=4       max=10<br>   vus_max........................: 10     min=10      max=10<br><br><br>running (0m31.5s), 00/10 VUs, 221 complete and 0 interrupted iterations<br>default ✓ [======================================] 10 VUs  30s</pre><p>k6 provides extensive metrics, including request duration, data sent and received, and more. This short summary gives us first glimpse to the performance of our application.</p><h4>Initialization Context and Default Function</h4><p>It’s recommended to configure test options within the test file itself rather than passing them as arguments to k6 run. This can be done by defining an init context object:</p><pre>export const options = {<br>    vus: 10,<br>    duration: &#39;30s&#39;,<br>};</pre><p>Then, you can execute the test without specifying options:</p><pre>$ k6 run my_test.js</pre><p>For overriding specific options, refer to the documentation on option precedence. <a href="https://grafana.com/docs/k6/latest/using-k6/k6-options/how-to/#order-of-precedence">https://grafana.com/docs/k6/latest/using-k6/k6-options/how-to/#order-of-precedence</a></p><h4>Checks</h4><p>Once the test generates some traffic, defining checks it se next step to evaluate service performance. Checks verify expected response of you service, such as status codes, response headers and body content:</p><pre>import {check} from &#39;k6&#39;;<br>import http from &#39;k6/http&#39;;<br><br>export default function () {<br>    const res = http.get(&#39;http://test.k6.io/&#39;);<br>    check(res, {<br>        &#39;is status 200&#39;: (r) =&gt; r.status === 200,<br>        &#39;verify html content&#39;: (r) =&gt; r.body.includes(&#39;Collection of simple web-pages suitable for load testing&#39;),<br>    });<br>}</pre><pre>✓ is status 200<br>✓ verify html content✓ is status 200 ✓ verify html content</pre><p>Checks create rate metrics without failing the test if assertions are not met. We need to combine checks with thresholds to fail the test on unmet assertion.</p><h4>Thresholds</h4><p>Thresholds allow setting performance criteria for tests, failing the test if criteria are not met. These criteria can be defined for any generated default or custom metrics:</p><pre>export const options = {<br>    thresholds: {<br>        http_req_failed: [&#39;rate&lt;0.01&#39;], // http errors should be less than 1%<br>        http_req_duration: [&#39;p(95)&lt;200&#39;], // 95% of requests should be below 200ms<br>    },<br>};</pre><p>Here we define two thresholds. The first one checks that the rate of failed requests is less than 1% by evaluating the http_req_failed metric. The second one checks that 95% of requests are below 200ms.</p><p>You’ll get a checkmark or a cross next to each threshold in the console output. And a error message if the threshold is not met.</p><pre>✗ http_req_duration..............: avg=214.99ms min=120.63ms med=178.85ms max=1.95s    p(90)=324.28ms p(95)=383.34ms<br>   { expected_response:true }...: avg=214.99ms min=120.63ms med=178.85ms max=1.95s    p(90)=324.28ms p(95)=383.34ms<br>✓ http_req_failed................: 0.00%   ✓ 0         ✗ 418<br>...<br>ERRO[0032] thresholds on metrics &#39;http_req_duration&#39; have been crossed</pre><h3>Scenarios</h3><p>The current setup allows us to simulate basic traffic to our service, observe the application’s behavior, and fail the test if performance criteria are not met.</p><p>But what if we need to simulate more complex traffic patterns? This is where scenarios come into play.</p><p>Scenarios enable granular control over the behavior of virtual users (VUs). Multiple scenarios can be defined to manage VUs’ behavior and scheduling using scenario executors.</p><h4>Scenario Executors</h4><p>Executors determine the test duration, traffic distribution, and whether the test is driven by VUs or arrival rate.</p><p>We can choose one of predefined executors.</p><p><strong>By number of iterations.</strong></p><ul><li>shared-iterations: Shares iterations between VUs.</li><li>per-vu-iterations: Each VU runs the configured iterations.</li></ul><p><strong>By number of VUs.</strong></p><ul><li>constant-VUs: Sends VUs at a constant number.</li><li>ramping-vus: Ramps the number of VUs according to configured stages.</li></ul><p><strong>By iteration rate.</strong></p><ul><li>constant-arrival-rate: Starts iterations at a constant rate.</li><li>ramping-arrival-rate: Ramps the iteration rate according to configured stages.</li></ul><p>For simulating real-world traffic patterns, ramping-arrival-rate and constant-arrival-rate are typically most suitable.</p><p>Each executor has its own options, such as rate for constant-arrival-rate or stages array for ramping-arrival-rate executor, defining custom behavior for each.</p><p>Let’s take this configuration as an example:</p><pre>export const options = {<br>    scenarios: {<br>        constant_load: {<br>            executor: &#39;ramping-arrival-rate&#39;,<br>            startRate: 0,<br>            timeUnit: &#39;1s&#39;,<br>            preAllocatedVUs: 10,<br>            maxVUs: 50,<br>            stages: [<br>                {duration: &#39;30s&#39;, target: 50},<br>                {duration: &#39;1m30s&#39;, target: 100},<br>                {duration: &#39;30s&#39;, target: 0},<br>            ],<br>        },<br>    },<br>};</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*J0sTT5-2HNILRHOj.png" /></figure><p>In this example, we have a scenario named constant_load that uses the ramping-arrival-rate executor. It starts with 0 iterations per second, ramps up to 50 over 30 seconds, increases further to 100 iterations per second over 1 minute and 30 seconds, then ramps down to 0 iterations per second over 30 seconds.</p><h3>Metrics</h3><p>K6 gives us summary of the performance after each test as well as real-time metrics that can be exported to a file or send directly to a consumer of you choice like prometheus.</p><p>Starting with metrics can be daunting, so it’s best to first focus on a small subset and go from there. We can start with the metrics that measure the requests ( http_reqs), errors ( http_req_failed), and duration ( http_req_duration).</p><h4>End-of-Test Summary</h4><p>After the test finishes, k6 displays a summary of results in the console. You can see http metrics define avg, min, max, p90 and p95 values that gives us a more detail view of the performance.</p><pre>// ...<br><br>http_req_blocked...............: avg=1.55ms   min=1µs      med=6µs      max=278.55ms p(90)=11µs     p(95)=14µs<br>http_req_connecting............: avg=812.26µs min=0s       med=0s       max=138.46ms p(90)=0s       p(95)=0s<br>http_req_duration..............: avg=111.18ms min=100.51ms med=108.18ms max=4.28s    p(90)=111.73ms p(95)=112.82ms<br>  { expected_response:true }...: avg=111.18ms min=100.51ms med=108.18ms max=4.28s    p(90)=111.73ms p(95)=112.82ms<br>http_req_failed................: 0.00%  ✓ 0          ✗ 17966<br>http_req_receiving.............: avg=277.31µs min=17µs     med=96µs     max=108.3ms  p(90)=219µs    p(95)=305.74µs<br>http_req_sending...............: avg=28.84µs  min=5µs      med=25µs     max=3.8ms    p(90)=43µs     p(95)=53µs<br>http_req_tls_handshaking.......: avg=722.35µs min=0s       med=0s       max=142.43ms p(90)=0s       p(95)=0s<br>http_req_waiting...............: avg=110.88ms min=100.43ms med=108.02ms max=4.28s    p(90)=111.53ms p(95)=112.54ms<br>http_reqs......................: 17966  119.773799/s<br><br>// ...</pre><h4>Time Series Data</h4><p>The summary is useful when you need a quick overview, but for more detailed analysis, we want to have real-time data streamed directly into consumer like prometheus. We can do that with the -out option.</p><p>To set up remote write for prometheus we have to first define the prometheus server url in the K6_PROMETHEUS_RW_SERVER_URL environment variable.</p><p>Then authenticate with K6_PROMETHEUS_RW_USERNAME and K6_PROMETHEUS_RW_PASSWORD if needed.</p><p>Finally run k6 run -o experimental-prometheus-rw script.js</p><p>Other export options include CSV, JSON, or streaming to alternative consumers like Datadog or Amazon CloudWatch.</p><p>A sample Grafana dashboard might display metrics as shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NrDNQLnjgsgpgU0U.png" /></figure><p>We have a nice graph showing all the information we need in time. We can see how the requests are distributed, how many failed, and how long they took.</p><p>We can then analyze the data, compare them with other metrics we might have. Real time data gives us more granular view of the performance and helps us understand how our application behaves in production environment. With this information, we can make informed decisions about how to improve the performance of our application or infrastructure.</p><h3>Conclusion</h3><p>We’ve just scratched the surface of k6. We’ve seen how to run a simple test, how to define checks and thresholds, and how to use scenarios to simulate complex traffic patterns.</p><p>We’ve also seen how to collect and analyze the metrics that k6 generates.</p><p>But there’s much more to k6 than we’ve covered here. We can define custom metrics, use tags to group and filter tests, and export metrics to various systems.</p><p>k6 is a powerful tool that can help you understand how your applications behave under load, and it’s worth taking the time to learn how to use it effectively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef17a1f64def" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qest/load-testing-with-k6-ef17a1f64def">Load Testing with k6</a> was originally published in <a href="https://medium.com/qest">Qest technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jak vytvořit cesty uživatelů z Google Analytics dat v BigQuery]]></title>
            <link>https://medium.com/qest/jak-vytvo%C5%99it-cesty-u%C5%BEivatel%C5%AF-z-google-analytics-dat-v-bigquery-1af509de7312?source=rss----b1024719e3dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/1af509de7312</guid>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[qest]]></category>
            <dc:creator><![CDATA[Qest technologies s.r.o.]]></dc:creator>
            <pubDate>Thu, 20 Jun 2024 10:56:07 GMT</pubDate>
            <atom:updated>2024-06-20T10:55:48.249Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Používají uživatelé náš web tak, jak jsme ho navrhli? Plní cíle webu(čtou si články, nakupují, atp.), nebo končí ve slepých uličkách, ze kterých naše stránky frustrovaně opouštějí? V tomto článku se dozvíte, jak sledovat chování návštěvníků.</strong></p><p>Pro pochopení cest uživatelů naším webem a pro návrh případných změn na našem webu je dobré tyto cesty zobrazit a (pro)zkoumat. Služba Google Analytics 4 (GA4) nabízí po integraci s nástrojem BigQuery rozsáhlý soubor dat pro analýzu těchto uživatelských cest. V následujících řádcích si popíšeme SQL dotaz, který nám umožní tyto návštěvy rozebrat a agregovat do jednotlivých patternů.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*57ap0O9JeiYMBiKOfw6xPg.jpeg" /></figure><p><strong>Rozdělení dotazu</strong></p><p>Naším cílem je identifikovat společné sekvence návštěv stránek (cest) našich uživatelů a spočítat, jak často se tyto jednotlivé cesty vyskytují. Pro přehlednost si dotaz rozdělíme na několik částí.</p><h3>Extrakce návštěv stránek</h3><p>Nejprve získáme data o počtu uživatelů a relací na stránkách:</p><pre>WITH page_visits AS (<br>SELECT<br>user_pseudo_id,<br>CONCAT(user_pseudo_id,(SELECT value.int_value FROM UNNEST(event_params) WHERE KEY = &#39;ga_session_id&#39;)) AS session_id,<br>(SELECT value.string_value FROM UNNEST(event_params) WHERE event_name = &#39;page_view&#39; AND KEY = &#39;page_location&#39;) AS page_location,<br>TIMESTAMP_MICROS(event_timestamp) AS event_time<br>FROM<br>`ga.analytics.events_*`<br>WHERE<br>_table_suffix BETWEEN &#39;20231101&#39;<br>AND FORMAT_DATE(&#39;%Y%m%d&#39;,DATE_SUB(CURRENT_DATE(), INTERVAL 1 day))<br>AND (SELECT value.string_value FROM UNNEST(event_params) WHERE event_name = &#39;page_view&#39; AND KEY = &#39;page_location&#39;) IS NOT NULL)</pre><p>V této části jsme vytvořili dočasnou tabulku page_visits, která bude obsahovat ID každého uživatele, ID relace, umístění stránky a čas události.</p><h3>Řazení návštěv stránek</h3><p>Dále seřadíme návštěvy stránek pro každého uživatele v rámci každé relace, abychom se dozvěděli, jak šly návštěvy jednotlivých stránek za sebou:</p><pre>ranked_page_visits AS (<br>SELECT<br>user_pseudo_id,<br>session_id,<br>page_location,<br>event_time,<br>RANK() OVER (PARTITION BY user_pseudo_id, session_id ORDER BY event_time) AS user_page_view_rank<br>FROM<br>page_visits<br>ORDER BY<br>user_pseudo_id,<br>user_page_view_rank<br>)</pre><h3>Agregace cest</h3><p>Poté tyto návštěvy stránek spojíme a vytvoříme cestu pro každou relaci uživatele:</p><pre>journeys AS (<br>SELECT<br>user_pseudo_id,<br>session_id,<br>STRING_AGG(page_location, &#39; &gt; &#39; ORDER BY user_page_view_rank) AS user_journey<br>FROM<br>ranked_page_visits<br>GROUP BY<br>user_pseudo_id,<br>session_id<br>)</pre><p>Tím se vytvoří řetězec pro cestu každého uživatele v rámci relace, který zobrazuje pořadí navštívených stránek.</p><h3>Počítání řetězců</h3><p>Nakonec spočítáme výskyty každé jedinečné cesty („řetězce”):</p><pre>SELECT<br>user_journey,<br>COUNT(*) AS journey_count<br>FROM<br>journeys<br>GROUP BY<br>user_journey<br>ORDER BY<br>journey_count DESC</pre><p>Tato část dotazu cesty agreguje a počítá, kolikrát se vyskytne každá jedinečná cesta.</p><p>ukázka výstupu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/0*1P9L8U7N_PCVc5lv" /></figure><h3>Závěr</h3><p>Tento dotaz poskytuje cenné informace o cestách uživatelů na vašem webu. Díky pochopení těchto vzorců můžete optimalizovat navigaci na stránce, zlepšit uživatelskou zkušenost a efektivněji vést uživatele ke konverzním cílům.</p><p><em>Za Qest: Daniel Čupak</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1af509de7312" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qest/jak-vytvo%C5%99it-cesty-u%C5%BEivatel%C5%AF-z-google-analytics-dat-v-bigquery-1af509de7312">Jak vytvořit cesty uživatelů z Google Analytics dat v BigQuery</a> was originally published in <a href="https://medium.com/qest">Qest technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>