<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Illia Halashko on Medium]]></title>
        <description><![CDATA[Stories by Illia Halashko on Medium]]></description>
        <link>https://medium.com/@ilia.halashko?source=rss-30877565bd43------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sccyFrHBCxNiEvXzCEXRmg.jpeg</url>
            <title>Stories by Illia Halashko on Medium</title>
            <link>https://medium.com/@ilia.halashko?source=rss-30877565bd43------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 06:30:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ilia.halashko/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Evaluate the Performance of Engineering Managers]]></title>
            <link>https://medium.com/@ilia.halashko/how-to-evaluate-the-performance-of-engineering-managers-f78b62aa890c?source=rss-30877565bd43------2</link>
            <guid isPermaLink="false">https://medium.com/p/f78b62aa890c</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Illia Halashko]]></dc:creator>
            <pubDate>Tue, 29 Jul 2025 21:06:39 GMT</pubDate>
            <atom:updated>2025-07-29T21:12:45.479Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*najdEW-nehl_0dM_" /><figcaption>Photo by <a href="https://unsplash.com/@markuswinkler?utm_source=medium&amp;utm_medium=referral">Markus Winkler</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When you move from managing individual contributors to managing managers, new challenges arise. Especially in assessing the work being done. As an engineering manager of developers, you can usually see the results directly: if code is written, deployed to production and meets expectations, it’s a good sign the engineer is doing their job effectively. You can review the code, estimate time spent, and track outputs.</p><p>But with managers, it’s different. Their work is more abstract and they don’t produce tangible artifacts daily but their impact is significant. They’re responsible for teams, productivity, culture and long-term success. You don’t want to realize a year later that a manager has been ineffective, productivity has declined, burnout has spread and now you need to replace not just the manager but the entire team.</p><p>In this article, we’ll explore how to set up communication and evaluation systems that help you effectively assess your managers.</p><h3>Set Clear Expectations</h3><p>Before you can evaluate a manager’s performance, you need to define what success looks like. This means clearly outlining what you expect from them, preferably in the form of concrete goals. You may want them to:</p><ul><li>Implement CI/CD pipelines</li><li>Reduce incidents</li><li>Increase release frequency</li><li>Cut infrastructure costs</li></ul><p>Whatever the goals are, define and communicate them clearly. It doesn’t matter whether you’re using KPIs, OKRs, or another goal-setting framework as long as they’re measurable and understandable. The manager should know exactly what’s expected and have a plan of action.</p><p>Don’t expect proactivity on day one. A new manager won’t yet understand what’s critical to the business. Guide them toward your highest priorities until they learn the landscape. But your goals should not be vague. Statements like “Improve team performance” or “Speed up code reviews” are too abstract. What does “speed up” mean? By how much? Every person will interpret these differently. Specify numbers.</p><p>Crafting effective goals is a subject in itself, so we won’t go deep into it here but it’s crucial to get this part right from the start.</p><h3>How to Get Feedback</h3><p>There are several ways to gather feedback about a manager’s performance. The key is to look at the full picture and not rely on any single source of truth. You can gather feedback:</p><ul><li>Directly from the manager via status syncs, 1-on-1s, or team meetings</li><li>Objectively through metrics</li><li>From peers and team members via performance reviews</li></ul><p>Let’s look at each method in detail.</p><h4>Status Syncs</h4><p>Decide how frequently you want updates from each manager, and be clear about the type of information you expect. These can be regular group syncs with all engineering managers or individual check-ins, depending on the size and structure of your organization.</p><p>The frequency should strike a balance neither overwhelming nor too sparse. In my experience, 1–2 times a week is ideal:</p><ul><li>Twice a week during high-intensity periods, such as major releases or active user testing</li><li>Once a week when things are stable and execution-focused</li></ul><p>This is different from a daily team stand-up. Those syncs are designed to provide visibility into status updates, surface any blockers your peers may be facing, and offer guidance when needed. They also help you assess how effectively they are progressing toward objectives, responding to change, and aligning with broader business goals.</p><p>Once you’ve built trust and see that the manager is consistently on track, you may even reduce or eliminate these syncs entirely and rely on 1-on-1s for ongoing updates and support.</p><h4>1-on-1s</h4><p>While 1-on-1s aren’t strictly for status updates, they’re a critical tool for evaluating a manager’s performance and mindset. Everyone structures these meetings differently, but they’re your opportunity to dig deeper into how the manager is thinking, what challenges they’re facing, and how they’re progressing against their goals. The atmosphere on 1-on-1s is more relaxed than on status syncs, there is no rush. Here you may just talk.</p><p>These conversations also help you understand their level of engagement and curiosity. Are they bringing thoughtful questions? Are they seeking feedback or surfacing concerns? At the same time, avoid jumping to conclusions, some people are naturally reserved. A lack of questions isn’t necessarily a red flag, which is why it’s important to evaluate performance in context and through multiple lenses.</p><h4>Operational Metrics</h4><p>Your ability to use metrics depends on whether your systems are set up to track them effectively. If not, you may need to rely on manual reporting at first.</p><p>Start with what matters most:</p><ul><li><strong>Incident count</strong>: How many incidents occurred? How severe were they? Were they recurring?</li><li><strong>Delivery rate</strong>: The ratio of planned tasks to completed tasks. This gives insight into predictability and execution.</li><li><strong>DORA metrics</strong>: If available, these are highly useful. At least, deployment frequency and change failure rate are pretty easy to calculate manually.</li></ul><p>Keep in mind that some companies release infrequently by design, so deployment frequency should be interpreted within context.</p><p>Analyze metrics in combination. One number doesn’t tell the whole story. For example, a high delivery rate might be meaningless if incidents are also high. Start small and choose only a few meaningful metrics, and expand over time.</p><h4>Performance Reviews</h4><p>Team feedback is essential. You don’t see everything, and you may not know how a manager interacts with their team day to day. Managers may communicate very differently with you than with their reports. Don’t assume that someone who communicates well upward also leads well downward.</p><p>When collecting feedback, avoid open-ended requests like “Write what you think.” Most people struggle with that. Instead, build a structured format with rating scales and targeted questions. But remember that confidentiality is critical. People need to feel safe being honest, or the feedback won’t be useful.</p><p>Don’t drop down two levels and micromanage. Trust your managers to do their jobs. Your role is to collect feedback from different sources, evaluate the situation, and intervene only when necessary.</p><p>Establish clear boundaries around your manager’s responsibilities, and always make it clear that asking questions is encouraged. Don’t solve problems <em>for</em> your managers but use the information you gather to coach and guide them.</p><p>And finally, if things are going well, say so. Many leaders make the mistake of only intervening when problems arise. Recognition matters, too.</p><p>Some leaders simply hire managers, hand off tasks, and say, “Take care of it.” That can work especially if you’ve hired well. But showing genuine interest and involvement sends a strong signal, and can make a big difference in long-term success.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f78b62aa890c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Observability and Monitoring. Technical metrics integration flow]]></title>
            <link>https://medium.com/@ilia.halashko/observability-and-monitoring-technical-metrics-integration-flow-54730332d29a?source=rss-30877565bd43------2</link>
            <guid isPermaLink="false">https://medium.com/p/54730332d29a</guid>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[system-reliability]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Illia Halashko]]></dc:creator>
            <pubDate>Wed, 05 Feb 2025 20:45:31 GMT</pubDate>
            <atom:updated>2025-02-05T20:45:31.310Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you noticed that your company has hundreds of dashboards filled with technical metrics, making it even harder to understand what you should focus on? If you’re a developer, you likely use only a few dashboards and monitor a handful of services you’re responsible for. Developers have their own metrics, DevOps teams have others, and finding the root cause of an issue can be challenging. Not every company has a dedicated team of system reliability engineers and DevOps who have already set up the infrastructure. Even if yours does, it’s still crucial to understand what matters most. But what if you need to build everything from scratch, and your company lacks proper monitoring, perhaps only having basic logging in place? How do you determine what you need and where to start? Grafana offers 170 pages of dashboard templates, that’s a lot! I believe this article can help engineers understand why metrics are important, which ones are essential, and how to integrate them effectively. I won’t cover logs, traces, or alerts here, as that would make the article too long. I’ll address those separately. For now, I assume you already have some logs and basic alerts in place.</p><p>Beyond that, adding the right metrics can significantly enhance your system’s reliability, and I’ll explain why.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aNXPwUo9s-b6jtdT" /><figcaption>Photo by <a href="https://unsplash.com/@lukechesser?utm_source=medium&amp;utm_medium=referral">Luke Chesser</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4><strong><em>What is metric ?</em></strong></h4><p>A metric is something that indicates how your system is performing. It can be represented in various forms, such as a chart in various forms, a percentage, or even a simple number. You need to determine whether you want to track trends over time, like a chart displaying the number of requests per second or a single, finite value, such as service uptime over one week. The challenge is that there is no universal standard for which metrics should be used in specific cases, yet the number of available templates is overwhelming. At first glance, this makes it difficult to identify what your system truly needs. As a result, many people adopt a familiar approach, implementing what they have seen in previous workplaces. I’m not saying this approach is wrong, but I’d like to highlight the key steps you should consider when defining metrics for your system. Google’s SRE Book states that your monitoring system should be as simple as possible; otherwise, it will become difficult to maintain. I agree with this. Having charts that display just the four golden signals for each service is a great start, but I believe it may not be sufficient for a robust observability system.</p><h4><strong><em>What types of metrics exist ?</em></strong></h4><p>Before diving into details, let’s first understand which metrics we need to monitor for our system and how we can define technical metrics. There are various types of metrics a company can have:</p><ul><li>Business metrics</li><li>Technical metrics (Infrastructure level and Application level)</li><li>Project metrics</li><li>Incident metrics</li><li>Other metrics</li></ul><p>Choosing the right technical metrics for your system depends on what you consider critical to monitor. These metrics typically apply to infrastructure and application levels:</p><ul><li>Infrastructure level includes everything where your applications are deployed, such as VMs, Kubernetes clusters, storage systems, and network components.</li><li>Application level refers to your services maintainability.</li></ul><p>Some metrics apply to both infrastructure and application levels, e.g. CPU or memory usage. You might display CPU consumption for VMs where your application is running on one dashboard, while another dashboard shows CPU usage for the service itself. The first dashboard will likely show a higher value. Having both views is useful for detecting anomalies. For example, when VMs are running out of memory, the service may appear fine, but background cron jobs could be consuming all available resources.</p><p>Sometimes, technical and business metrics overlap. Let’s consider an online marketplace, where you might have two charts showing the number of total and failed orders for a period of time. Product department most likely is tracking the number of total orders but it can be on a separate board or even in a separate system. From the technical side, you could set up an alert if the number of failed orders exceeds 10 per minute. When this alert triggers, you would check the dashboard, review the current values and trends for total and failed orders, and then go to the service specific boards.</p><h4><strong><em>How to understand if you need metrics and monitoring system</em></strong></h4><p>You could work in a big tech company and be deeply involved in the monitoring process, where numerous dashboards exist and every step is covered. This might lead to the misconception that metrics are an absolute necessity. However, I believe you should start by identifying your actual needs.</p><p>Metrics are valuable, but having basic alerts to ensure your application is functioning properly and logs to diagnose the root cause of issues are even more important; they will provide greater benefits in the long run. Monitoring becomes essential as your system grows in complexity, introducing multiple potential failure points. Additionally, most cloud providers offer basic infrastructure metrics out of the box, so you don’t need to set up everything from scratch.</p><p>From an engineering perspective, setting up a monitoring environment is a challenging task. It involves selecting the right technology stack, configuring exporters, setting up collectors, ensuring scalability and fault tolerance, creating visual dashboards, connecting them to collectors, and more. Once everything is in place, you need to carefully define what to monitor, otherwise your dashboards could become cluttered and ineffective rather than useful for the future.</p><p>At the same time, if developers spend too much time identifying the root cause of issues, especially in a microservices architecture, a monitoring system with well-defined metrics can be highly beneficial. It could save you hours of investigation and when your system is down this hours mean a lot. However, the initiative for such a system must come from the technical side. The business itself does not need technical metrics and might even resist their implementation, so you must clearly communicate the benefits.</p><h4><strong><em>What metrics do you need?</em></strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1UMU21MpgO3JCMKT" /><figcaption>Photo by <a href="https://unsplash.com/@timmossholder?utm_source=medium&amp;utm_medium=referral">Tim Mossholder</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Finally! Your application has grown significantly, and you now need metrics to understand what’s happening when the system goes down or experiences issues.</p><p>First, cover the infrastructure level. If you use virtual machines, you must monitor CPU, RAM, storage capacity, and network bandwidth. If your application runs on Kubernetes, you can find ready-made templates to collect all necessary information. For example, you may have:</p><ul><li>A separate dashboard for cluster statistics (CPU usage, memory usage, node count, namespace count, instance details, pod details, etc.).</li><li>A separate dashboard for K8s node statistics.</li></ul><p>There are plenty of templates available online that can help you set this up efficiently. Next, break down your system into technological components, such as: databases, message brokers, caches and your application services. Create a separate dashboard for each component to monitor relevant parameters. For databases, this might include:</p><ul><li>Number of processed requests</li><li>Number of connections</li><li>Insert/update/delete operations</li><li>Number of errors</li><li>Waiting connections</li></ul><p>Again, templates can be found online, I will provide links below.</p><p>Once your infrastructure and core technology components are covered, you can create dashboards for your applications. Initially, I recommend having a separate board displaying the Four Golden Signals for necessary services:</p><ol><li>Requests per second (RPS)</li><li>Error rate</li><li>Request duration (latency)</li><li>Saturation (resource usage, including CPU, memory, storage, and network bandwidth)</li></ol><p>These metrics will be sufficient for the first implementation of any application. Additionally, I recommend tracking service uptime and log error rate. These will help you assess reliability and detect potential incidents immediately.</p><p>Afterwards, you can introduce metrics to track specific use cases. That’s where technical metrics intersect with business ones, e.g. total and failed orders, the average time for order processing, average payment time, search time, etc.</p><p>Sometimes, you need to provide a certain service level to your clients, known as a Service Level Agreement (SLA). This is especially relevant in B2B environments. SLAs may include commitments such as total RPS (requests per second) or the number of active users.</p><p>To monitor SLA compliance, you may need to set up dashboards that cover the most critical business use cases. This allows you to quickly identify anomalies or, during load testing, determine whether the SLA is still achievable or needs adjustments.</p><p>If you don’t have documented SLA/SLI/SLO but do have Non-Functional Requirements (NFRs) to ensure a high-quality service for your clients, e.g. number of active users, first page loading, etc., setting up a dedicated dashboard with relevant metrics is a great approach. Dashboards simply visualize the data you define, so instead of manually checking APIs across different services and analyzing multiple endpoints, a centralized dashboard can aggregate everything you need to track.</p><p>Later, you can configure alerts for these metrics, allowing you to quickly respond to potential issues.</p><h4><strong><em>Monitoring tech stack</em></strong></h4><p>If you found something new in this article, I would recommend using Grafana for visualisation and OpenTelemetry for metric processing and storage. Here are the few benefits of OpenTelemetry</p><ul><li>It’s open-source, so you don’t have to pay for anything.</li><li>It integrates seamlessly with Loki and Tempo for logs and traces.</li><li>It has a large and active community, which means you can easily find support and answers to most questions.</li><li>It includes its own SDK, agents and collectors making installation and setup easier.</li><li>It supports metrics in Prometheus compatible format, so Promql requests will work;</li><li>many other things I don’t know or remember</li></ul><p>Additionally, Grafana has excellent documentation, which makes setting up alerts based on Prometheus metrics much easier.</p><p>Another monitoring solution is Datadog, a SaaS platform where you don’t need to worry about infrastructure setup, configuration, scaling, or performance. Datadog provides everything in one place, including: logging, alerts, traces. With Grafana, you need to configure these components separately and handle persistence, scalability, and performance yourself. However, the downside of Datadog is its high cost. Unless you’re a large tech enterprise, you likely don’t need such an expensive solution in the early stages.</p><p>Other metrics monitoring and storage solutions are either not well-known, less reliable, or difficult to find engineers with experience in making them less practical options.</p><p>Defining metrics is a complex and challenging task. You need a structured approach to ensure it provides real value. This becomes even more difficult when working with 100+ engineers and needing to start from scratch, it’s clearly a team effort.</p><p>I hope you found something useful in this article and that it helps you build a more reliable system. Take care!</p><h3>Useful links:</h3><ul><li><a href="https://sre.google/sre-book/table-of-contents/">https://sre.google/sre-book/table-of-contents</a></li><li><a href="https://grafana.com/grafana/dashboards/">https://grafana.com/grafana/dashboards</a></li><li><a href="https://opentelemetry.io/">https://opentelemetry.io</a></li><li><a href="https://prometheus.io/">https://prometheus.io</a></li><li><a href="https://www.datadoghq.com/">https://www.datadoghq.com</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54730332d29a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Know what you are using! Management Methodologies Structure]]></title>
            <link>https://medium.com/@ilia.halashko/know-what-you-are-using-management-methodologies-structure-e9897dfda421?source=rss-30877565bd43------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9897dfda421</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[project-management]]></category>
            <dc:creator><![CDATA[Illia Halashko]]></dc:creator>
            <pubDate>Sun, 21 Jul 2024 18:40:37 GMT</pubDate>
            <atom:updated>2024-07-21T18:40:37.156Z</atom:updated>
            <content:encoded><![CDATA[<p>Hundreds of development methodologies have been released and spread worldwide. We know Scrum, SAFe, PRINCE2, XP, and many more. However, it is crucial to understand not only the differences between them but also the main purpose of each. Additionally, besides these methodologies, there are many approaches that specify what you need to pay attention to in order to achieve success during development. Sometimes, you may hear that companies use agile, but agile is not a methodology. It is a set of principles to follow. You may also have heard that other companies use Scrumban, but Scrum and Kanban inherit completely different ideas, and combining them can be as dangerous as it is beneficial. Some methodologies serve not only specific needs but also apply at different organizational levels.</p><p>The goal of this article is to show you how all of these elements are related to each other, what actual methodologies are, and what are just sets of principles. The following diagram reflects the hierarchy and relationship between basic approaches for development and methodologies. I will go through the basic building blocks and try to highlight the purpose and benefits of each.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mRnpeBFMtR_EMH_25xPiBg.png" /><figcaption>Management methodologies structure</figcaption></figure><p><strong><em>Annotation:</em></strong></p><p>Blue color — approaches<br>Red color — methodologies based on specific approach<br>Yellow color — methodologies based on several approaches<br>Green color — set of standards and best practices</p><h3>Agile, Lean, Waterfall</h3><p>There are three fundamental approaches on which all management methodologies are built. These approaches are very different, and I would like to discuss each one, clarifying their pros and cons. These approaches can be relied upon during software development. They do not instruct you on how to properly plan development, set goals, or distribute tasks across different teams. They do not explain how to transform business requests into actionable tasks or who should be responsible for planning, development, and coordination. Such details are provided by different methodologies. Instead, they outline what you need to consider and on what you have to focus in your company.</p><p><strong><em>Agile</em></strong></p><p>A long time ago, in 2001, the Agile Manifesto was introduced. This document described principles you should focus on in software development. It is not a methodology but rather a set of considerations. You can find the full list at<a href="https://agilemanifesto.org/"> Agile Manifesto</a>. Essentially, Agile recommends cooperating with stakeholders as often as possible to eliminate potential gaps and misunderstandings. It advises against planning everything in detail because the risk of overlooking something is high. Agile emphasizes collaboration over detailed planning.</p><p>It is crucial to understand that all methodologies based on Agile adhere to these principles. In essence, Agile promotes a cycle of asking, trying, and asking again: ASK -&gt; TRY -&gt; ASK. In 2001, this approach was a great solution to many problems in software development. At the time, the industry was too young to have established rules for dealing with uncertainties. People needed something iterative to polish their mistakes but at the same time give an outcome. Business and technical guys had to understand that the industry had not been well established and accepted the rules of the new game.</p><p><strong><em>Waterfall</em></strong></p><p>In 1970, Dr. Winston W. Royce described the Waterfall model in his paper “Managing the Development of Large Software Systems.” He introduced the sequential steps that software development could follow, such as requirements, design, implementation, verification, and maintenance. In this model, the next step does not begin until the previous one is completed. Back then, people compared software development to other business processes where knowing the desired outcome from the beginning and having a detailed plan significantly helped. Good example were construction, car manufacturing, or healthcare.</p><p>However, some software development projects involve many unknowns, making it difficult to predict the results. This model is not applicable to every situation but at the same time fit to some. For instance, fintech and healthcare industries still require comprehensive analysis, which is why many solid methodologies are based on the Waterfall model and why it remains popular. In software development, especially in 1970 or even in 2001, it was almost impossible to eliminate all risks. Interestingly, Dr. Winston W. Royce later criticized his own paper and the Waterfall model in the context of software development.</p><p><strong><em>Lean</em></strong></p><p>One of the most intriguing approaches that originated outside of software development is Lean. Lean focuses on eliminating obstacles and avoiding unnecessary tasks, instead concentrating on how to build the productive flow. You can find a list of principles at<a href="https://theleanway.net/The-Five-Principles-of-Lean"> The Five Principles of Lean</a>. Lean is a manufacturing approach, and manufacturing is a well-established industry that has learned from many mistakes. Each Lean principle is detailed and addresses specific aspects of work to produce the best product with minimal effort.</p><p>However, in 2003, Mary and Tom Poppendieck attempted to adapt Lean to contemporary software development and released the book <em>Lean Software Development: An Agile Toolkit</em>. The title of the book reflects its purpose: to combine the best elements of Lean and Agile. Knowing that there are some differences between Agile and Lean could be profitable to use the best of each but at the same time risky if people eliminate something they think is redundant but turns out to be really important.</p><h3>Why is PMbok located separately?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a7VKVJ1rppek-Itx" /><figcaption>Photo by <a href="https://unsplash.com/@christinhumephoto?utm_source=medium&amp;utm_medium=referral">Christin Hume</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>You may think it is strange that PMBOK is somewhere separately, and the reason is that PMBOK does not align with any of basic approaches. PMBOK is a guideline created by the Project Management Institute that describes useful practices for project management. The key factor here is the concept of a project. Product development companies may or may not have projects. According to PMBOK, a project is “a temporary endeavor undertaken to create a unique service or result.” Projects are temporary and conclude upon the completion of the work they were chartered to deliver. That’s why projects can be divided into phases like initiating, planning, executing, monitoring and controlling, and closing.</p><p>Product development, on the other hand, is an ongoing activity and is difficult to align with such phases and project definitions. However, many principles from PMBOK, such as risk management, cost management, and stakeholder management, are ideally suited to product development. These principles are important in any company, regardless of the methodology used.</p><p>Additionally, projects can often exist within product development. Migrating from one cloud provider to another, running an application in a different region, or integrating AI into part of the system are all projects. In these cases, approaches from PMBOK will significantly help you build a plan and consider all potential problems in advance. Moreover, PMBOK is used not only in software development and does not declare any specific relation to Agile, Waterfall, or Lean approaches, nor does it specify a lifecycle model. While you may find similarities between Waterfall and PMBOK, such as a structured approach and phases, comparing them is like comparing apples and oranges.</p><h3>Agile based methodologies</h3><ul><li>Scrum</li><li>XP</li><li>Less</li><li>Nexus</li><li>SaFe</li></ul><p>Although all of these are based on Agile, they serve different goals and apply to various scales. For instance, Scrum operates at the team level and focuses on planning and general development, while XP (Extreme Programming) emphasizes engineering practices and delivery. Nexus, LeSS (Large Scale Scrum), and SAFe (Scaled Agile Framework) scale Scrum to different organizational levels. For example, Nexus scales Scrum to multiple teams, whereas LeSS and SAFe scale it to the enterprise level, covering all aspects from quarterly planning to team structure and development flow.</p><h3>Lean based methodologies</h3><ul><li>Kanban</li><li>Six Sigma</li></ul><p>Kanban is one of the most well-known methodologies due to its simplicity. However, I recommend reviewing Kanban principles and paying particular attention to work in progress (WIP) limits. Kanban is not just a sequential process where you get a ticket, work on it, and then move to the next one. It primarily inherits Lean practices and is not an Agile methodology, despite the common misconception of grouping Scrum and Kanban under Agile methods.</p><p>Regarding Six Sigma, this methodology does not prescribe how to plan development or organize teams. Instead, it focuses on improvement through the DMAIC approach (Define, Measure, Analyze, Improve, Control). Following this approach can significantly increase productivity. Additionally, Six Sigma can be easily combined with Scrum because they focus on different aspects of the development process.</p><h3>Waterfall based methodologies</h3><ul><li>Waterfall methodology</li><li>PRINCE2</li><li>RUP</li><li>PMI methodology</li><li>Hermes</li><li>V-Model</li></ul><p>All of these methodologies follow the Waterfall approach. In short, they emphasize having a comprehensive plan and considering all aspects before taking action. For instance, the PMI methodology is primarily based on PMBOK, so if your project aligns with this approach, it might be suitable for you. The Waterfall methodology was introduced years after the Waterfall model was presented but inherits its approaches and scale it to organization level.</p><p>Most of these methodologies are used in large enterprise companies and are not limited to software development. For example, PRINCE2 is very popular in various fields such as banking, governance and healthcare. Many of these methodologies are employed by government agencies, which is why they are detailed and comprehensive. While they might seem heavy, it does not mean they are bad; they are simply designed for different use cases.</p><h3>Mixed based methodologies</h3><ul><li>Spiral Model</li><li>Scrumban</li></ul><p>Sometimes it is better to combine the best aspects of both to achieve a favourable outcome. The methodologies mentioned above often use this approach. I cannot say that there are only these two categories; there are many more, but I included the most well-known ones.</p><p>For example, Scrumban combines elements of Scrum and Kanban, and while it works for some companies, it can be a risky method. For instance, having a sprint length of several months can be dangerous, so you will not be able to track progress properly. Methodologies like Scrum specify that no tasks should be added to the sprint mid-development and that the sprint length must be fixed, while Kanban emphasizes WIP (work in progress) limits.</p><p>Of course, this is not a complete list of methodologies. There are many more, and most companies use several at the same time or create their own. This doesn’t mean you must strictly follow Agile or Lean; feel free to combine them if necessary. Methodologies can be based on different approaches and be used at different organizational levels, such as one team, multiple teams, or scaled to the entire organization, covering all aspects of development.</p><p>First, you need to decide at which organizational level you are looking for a methodology. Then, depending on your domain and requirements, find the best one. It is common for different teams to use different methodologies. It is entirely normal for a company to use Scrum and Kanban at the team level while running a few projects based on PMBOK. Additionally, it is perfectly acceptable to use SAFe but adjust it slightly by omitting some SAFe-specific roles.</p><p>Any methodology or approach should make your work easier and more productive. The most important part is to understand what you are using and how it fits your company’s needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9897dfda421" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unknown risks in Software Development. How to work with them]]></title>
            <link>https://medium.com/@ilia.halashko/unknown-risks-in-software-development-how-to-work-with-them-a295bd0cc5bc?source=rss-30877565bd43------2</link>
            <guid isPermaLink="false">https://medium.com/p/a295bd0cc5bc</guid>
            <category><![CDATA[risk-management]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[project-management]]></category>
            <dc:creator><![CDATA[Illia Halashko]]></dc:creator>
            <pubDate>Sun, 14 Jul 2024 09:42:50 GMT</pubDate>
            <atom:updated>2024-07-14T09:43:50.084Z</atom:updated>
            <content:encoded><![CDATA[<p>The field of information technology is often shrouded in mystery when it comes to achieving results. Whether you are an outsourcing or product company, unknown risks are always a part of the estimation process when planning any feature. These risks can account for 30–50% of the budget or even more. Many companies accept this buffer as a standard part of the development flow, but I believe we can do better. In this article, I will explore the areas where unknown risks tend to accumulate and suggest steps to either eliminate them or minimize their impact.</p><p><strong><em>What are the unknown risk</em></strong></p><p>Unknown risk in software development refers to potential issues that may arise but are unforeseen, with no mitigation plan in place. The more unknown risks your project has, the lower the chances of success. You might wonder, what is the difference between known and unknown risks? It’s quite simple. A known risk is something you can anticipate and prepare for, such as understanding that a threefold increase in user load will lead to significant code refactoring. This allows you to develop a mitigation plan and calculate costs.</p><p>An unknown risk becomes evident only after it occurs. For example, if you decide to integrate an AI model into your application and, after spending time on training, realize that the model is not applicable to your business needs, you are faced with an unknown risk. This unforeseen issue forces you to start over, something you could not have predicted during the planning stage. If you had known, you would have chosen a different AI model. This illustrates how one unknown risk can undermine all previous efforts.</p><h3>How to minimize unknown risks</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_yVEgzEuXATUMW8d" /><figcaption>Photo by <a href="https://unsplash.com/@zamee_hz?utm_source=medium&amp;utm_medium=referral">zameel hz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong><em>Make sure business knows what they want</em></strong></p><p>Unknown risks can arise from both business and technical sides, so it’s crucial to ensure the business knows what it wants and is confident in its direction. Depending on whether the feature is already aligned with business goals or is still in the discovery phase, the definition of done must differ. If you notice that the business representative is not clearly answering your questions or lacks confidence regarding use cases, it is a sign to double-check their understanding and clarity.</p><p>It is a common scenario where the business expects one outcome, the tech department starts working on something different, and ultimately, the project fails, with the tech team reporting that implementation is impossible. Another situation could be that the business wants one thing, the tech department starts working on something else, succeeds, but in the end, the business realizes it is not what they wanted.</p><p>To avoid these pitfalls, ensure that you are thoroughly confident about feature requirements and that both you and the business are on the same page.</p><p><strong><em>Less you plan more you get</em></strong></p><p>If you plan extensively, the possibility of unknown risks can grow proportionally. Every request and feature must have a comprehensive description, at least from a business perspective. Smaller features are easier to clarify and manage. For instance, compare changing file types for processing documents to supporting video streaming on your platforms. The latter raises many more questions and potential issues.</p><p>You might think, “We are an Agile company and don’t require a full description of a feature.” Yes, but if your feature requirements are not documented or are too abstract, developers will implement what they think is best. Therefore, it’s in your best interest to cover at least the core use cases comprehensively.</p><p><strong><em>Don’t confuse research and engineering</em></strong></p><p>When estimating the scope of work, it’s crucial to distinguish between engineering, research, or a combination of both. The difference is that engineering implies knowing what to do and how to do it, while research is an unpredictable area that often leads to unknown risks. Research focuses on finding the best way to resolve a problem, and the business must understand these risks.</p><p>You might think that if developers don’t know something, they can simply study it. However, this is often not that easy. The learning curve varies greatly depending on the area, and the risk of missing something crucial is significant, especially without a mentor. Switching between one library and another is not the same as switching between Blockchain and AI.</p><p>For production code, factors such as scalability, performance, and security are critical, and issues with these factors might not be immediately apparent. Each task must have timelines and estimates. If an engineer cannot estimate the work after a week of investigation, it means the task is beyond area of expertise, and continuing this activity introduces all the unknown risks associated with research.</p><p><strong><em>Build a good proof of concept</em></strong></p><p>When considering a business requirement or technical debt that you’re unsure how to address, you might think of creating a Proof of Concept (PoC). This is a solid approach, but it’s important to carefully plan and execute a PoC correctly. The main goal of a PoC is to determine the feasibility of a concept. For example, if you have a video-related platform and decide to integrate 4K streaming, your PoC should ensure that you can stream 4K video with good quality, not just lower resolutions.</p><p>Additionally, you may consult benchmarks or technology design documentation. A successful PoC demonstrates that you can use defined sets of technologies and identifies any areas of uncertainty — ideally, there should be no such areas. If you need to choose a library for processing high-intensity data, your PoC must handle this, ensuring that integration into your application code is a matter of engineering.</p><p>Ideally, create your own benchmarks rather than relying solely on information found online. A PoC is your research work, which may be time-restricted, but once the PoC is complete, the subsequent work should be primarily engineering.</p><p><strong><em>Build a proper technical strategy of what to do</em></strong></p><p>Dividing the work between known and unknown areas significantly helps you track progress. You must have a clear plan outlining what to do and in what order. If it’s PoC work, restrict the time allocated for research. If, after this time, developers still find it too difficult, you need to either find someone who knows what to do or reconsider the approach. Otherwise, the research could last for months, and you’ll encounter new problems each day because it will be more about learning than actual work.</p><p>Once the PoC is ready, developers should be able to estimate the scope of work. If this scope is well-defined and concise, it will be much easier to manage. If developers say, “I don’t know, let’s see how it goes,” you can be sure there will be unknown risks.</p><p><strong><em>Use agile methodologies right</em></strong></p><p>Relying on Agile while doing something you’re not confident about and then spending time on research only to find out that nothing works is a poor strategy from a company perspective. It’s easy to realize after a sprint that nothing important has been accomplished and then attempt a different approach. Sometimes, instead of thoughtfully considering the right direction, people waste a lot of time trying everything.</p><p>You could have a non-working PoC in days and understand that an established way is not an option, or you could spend weeks developing and reach the same conclusion. In both cases, you might say that Agile works well, but the first option will earn you respect and trust, while the second option could lead the company’s growth to a dead end.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a295bd0cc5bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Architecture Cheet Sheet – API Design Styles]]></title>
            <link>https://medium.com/@ilia.halashko/architecture-cheet-sheet-api-design-styles-2d5bf38e10dd?source=rss-30877565bd43------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d5bf38e10dd</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Illia Halashko]]></dc:creator>
            <pubDate>Sun, 07 Jul 2024 09:46:46 GMT</pubDate>
            <atom:updated>2024-07-07T09:54:04.575Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OeSdtCIsljK4BMj4y4cMkg@2x.jpeg" /><figcaption>Photo by Lance Anderson on Unsplash</figcaption></figure><p>How to find the best approach to build a truly convenient and reliable API? There are many factors to consider, such as performance, readability, versioning, security, usability, supportability, complexity, and more. Engineers often struggle at the beginning with deciding exactly what they need to choose and how to properly build the API. It is always a matter of choice.</p><p>I do not intend to provide a comprehensive description of each API design approach. My goal is to summarize the most essential aspects each approach has to offer and relate them to appropriate business cases. An important note, if I don’t say something in pros, e.g. security or caching, it means everything is alright with that. I don’t consider such things as benefits, more like must have.</p><p>I divided each API design approach into sections: introduction, advantages, disadvantages, and use cases. In the introduction I provided basic information and links where you can find more details. Nowadays, the internet is full of data; the only thing you need to know is how to structure it and find what you need.</p><p>Please, do not confuse API design styles with API protocols. Different API design approaches may support the same protocol under the hood.</p><p>I believe having a list of pros and cons to review in times of hesitation will help you make the right decision. Do not compare only the number of pros and cons, as it is not just about the quantity. You must weigh the key factors of each item and apply them to your needs. I know sometimes you may think that I am comparing apples and oranges and I tried to add clarity to what I mean in each case.</p><h3>REST</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OKSlB3pMBO_a9NBw9ET3xA@2x.jpeg" /><figcaption>Photo by Sincerely Media on Unsplash</figcaption></figure><p><strong><em>Introduction</em></strong></p><p>It is a set of architectural principles that describe how to properly build communication between a client and a server. There is a common misconception that REST must use the HTTP/1 protocol exclusively or that REST and HTTP are the same thing. In reality, things are a bit different. Roy Fielding created the REST architectural style in 2000. Here is his <a href="https://ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">dissertation</a>, where he described the basic principles (Chapter 5). You may also find in section 5.3.2 that REST does not restrict communication to a particular protocol. It is just a de facto standard to use HTTP, specifically HTTP/1.</p><p>Although I can use REST with custom protocols, and at the same time, I can use the HTTP protocol without API being RESTful. I can have a RESTful API based on HTTP/2 or even HTTP/3, which means I cannot compare the performance of REST and gRPC directly. That might sound confusing. I need to point out that when I refer to a RESTful API, I am referring to one based on HTTP/1; otherwise, the results could be different. REST, like other architectural approaches, has certain principles:</p><ul><li>Client/Server</li><li>Stateless</li><li>Cache</li><li>Uniform Interface</li><li>Layered System</li><li>Code on-demand</li></ul><p>Each of these principles is comprehensively described in Roy Fielding’s dissertation and on other websites, and I don’t want to duplicate that information. These principles guide you on how to design your API and create endpoints in systems to avoid problems. A good explanation can also be found <a href="https://restfulapi.net/">here</a>.</p><p><strong><em>Advantages</em></strong></p><p>1) The REST approach is very flexible and can be used in almost any system, regardless of complexity. If you build your endpoints according to the Uniform Interface principle, you will have no problem building an API for the entities you have and scale the system to any size you need.</p><p>2) REST APIs are easy to read and understand, even if you’re not a programmer. Tools like Swagger allow you to browse your HTTP API and examine all parameters. If you use the REST approach, your endpoints will be clear and readable.</p><p>3) Very popular worldwide, making it easier to build integrations with your API. If you have a platform and need to offer an open API or share your API with certain users, and you design your request structure according to REST principles, it will be easy for other developers to start integrating with it.</p><p>4) REST is language and protocol agnostic. The architectural style itself does not rely on any specific language or protocol. While the initial proposal used HTTP/1 as an example, this is not mandatory. You can also move your API to HTTP/2 or HTTP/3, and it will still be RESTful but with added benefits.</p><p><strong><em>Disadvantages</em></strong></p><p>1) Unidirectional communication. REST works only from client to server and was created to resolve certain issues. Unfortunately, sometimes you need to consider other API solutions if you require real-time information or bidirectional communication. REST is simply not designed for that.</p><p>2) De-facto highly coupled to HTTP/1. Although you can build a RESTful API with HTTP/2 and HTTP/3, people usually expect HTTP/1, inheriting all its drawbacks. This is especially relevant when your API is involved in B2B integration, where clients may not be ready to switch to HTTP/2 or HTTP/3 from a development perspective.</p><p>3) Many APIs are labeled as RESTful but are not truly RESTful. Due to the high coupling with HTTP, many non-RESTful APIs are considered RESTful. It is very easy to follow this approach for newcomers.</p><p>4) Hard to support in big systems. With application growth, the number of endpoints can become very large, making it hard to avoid code duplication in certain endpoint implementations, especially if the number of resources in your application is significant.</p><p><strong><em>Use cases</em></strong></p><p>REST is applicable to almost all levels of system complexity because the entry barrier is quite low and the API can be scaled to almost any size. It requires minimal configuration, allowing application prototypes to be ready in days. It is well-suited for e-commerce applications and back-office operations. REST is an ideal candidate when you need to ask something and see the result. Major applications on mobile phones use REST to communicate with servers. Unless you need exceptionally strong performance or your application must work intensively with the server in both directions, REST is one of the best options to consider.</p><h3>gRPC</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*g6Svc2k4rLfUIjYftoDeRA@2x.jpeg" /></figure><p><strong><em>Introduction</em></strong></p><p>gRPC is not an architectural style but a framework created by Google, based on the HTTP/2 protocol. The framework follows the RPC concept, allowing clients to call specific functions on the server. The calls can be synchronous or asynchronous, with each function having input and output described in a proto file. gRPC uses Google Protobuf for data serialization, meaning that data is transferred between the client and server in a binary format. The framework provides four types of communication:</p><ul><li>Unary RPC</li><li>Server streaming RPC</li><li>Client streaming RPC</li><li>Bidirectional streaming RPC</li></ul><p>Depending on your needs, you can either support well-known request-reply methods of communication or stream data in both directions. For more information, you can visit <a href="https://grpc.io/">gRPC’s official site</a>.</p><p><strong><em>Advantages</em></strong></p><p>1) Speed. The framework uses the HTTP/2 protocol, which can perform several requests in parallel. However, the speed advantage depends on what you compare gRPC with. For instance, compared to HTTP/3, gRPC may be slower, but compared to HTTP/1, it is faster. HTTP/2 sets up a persistent connection between the client and server and then multiplexes requests over this connection, reducing latency and increasing performance.</p><p>2) Bidirectional Data Stream. gRPC supports bidirectional communication, allowing data to be streamed in both directions. You can also trigger streaming with a call from the client, which is particularly useful for transferring chunks of data in real-time.</p><p>3) Lightweight messages. Using Protobuf, gRPC significantly decreases the size of the payload by around 30%. However, this advantage is not exclusive to gRPC, as you can configure Protobuf to work with REST, HTTP/1, or even WebSockets.</p><p>4) Strongly typed messages. You can configure how much memory each attribute consumes, helping to avoid unnecessary data transfer and making messages more compact.</p><p><strong><em>Disadvantages</em></strong></p><p>1) Readability issues. Each method in gRPC requires a defined message format for requests and responses. This means different functions require different messages. With numerous endpoints, the message model can become convoluted and difficult to manage. Messages may be scattered across multiple files, making it challenging to correlate requests with their corresponding functions, especially if code is not very clean.</p><p>2) Troubles with load balancing. gRPC performs load balancing only on the client side. It utilizes persistent connection at the TCP level and sends further requests through this connection, and standard microservices load balancing tools won’t help. To achieve request-level load balancing, you must implement client-side load balancing. This involves managing a pool of persistent connections to various servers and distributing requests among them, or creating a new persistent connection for each request, which can degrade performance.</p><p>3) Binary data. Dealing with binary data is a common issue in solutions using Protobuf. Without proper conversion, understanding the payload content can be difficult. While there are tools available to assist with this, they require separate installation and configuration, adding complexity to the setup process.</p><p>4) Impossible to call from the browser. Some modern browsers do not support direct gRPC calls, complicating debugging and making it challenging to use gRPC directly from the browser. Future improvements in browser support may alleviate this issue.</p><p>5) File transfer. While gRPC supports file transfer, it is not widely used for this purpose. For file sizes between 1 MB and 4 MB, simple HTTP file transfers typically outperform gRPC due to the overhead of serialization/deserialization processes involved in gRPC.</p><p>6) Too complex for real time updates. gRPC supports streaming for real-time updates, but it may be difficult for simple scenarios. The overhead and complexity of managing gRPC streams may outweigh the benefits, making simpler solutions like WebSocket integration more practical and efficient.</p><p><strong><em>Use cases</em></strong></p><p>gRPC is used when you need a strongly typed communication data model that ensures fast and efficient performance. This makes it ideal for microservices architecture. The proto messages can be observed in the repository, making the contract between services clear, and your endpoints do not need to be accessed externally. Due to Protobuf message compression, the transferred size is 30% less than other payloads. Also, for internal communication you don’t need the benefits of REST or other API styles. Just make sure to load balance gRPC requests on the client side if you scale your services horizontally. If you are considering using gRPC between frontend and backend, you will need compelling reasons related to performance. For instance, you may need data streaming with heavy channels or large request payloads, where Protobuf serialization could be beneficial.</p><h3>GraphQL</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*jIw47CfgCxtkROpYyr8ELA@2x.jpeg" /></figure><p><strong><em>Introduction</em></strong></p><p>It is very hard to describe the essence of GraphQL in a few sentences. Long story short, GraphQL allows you to build text-based queries or mutations on the client side and send this information to the server. The server sends this information to the GraphQL server, which parses the text and calls the appropriate resolvers according to the schema definition. Queries are used to retrieve information, and mutations are used to change data (create, update, delete). Resolvers are functions that define how data will be fetched and filtered. The schema is a data definition model where all data types are specified. Additionally, clients can subscribe to certain data for real-time data. GraphQL is a simple wrapper and is not based on any specific protocol. You can use whatever protocol you need, though HTTP is commonly popular, and WebSockets are used for subscriptions. For more information, please visit <a href="https://graphql.org/learn/">GraphQL’s official site</a>.</p><p><strong><em>Advantages</em></strong></p><p>1) Protocol agnostic. GraphQL does not rely on any specific protocol, so you can use HTTP/1, HTTP/2, or HTTP/3. You can even choose another protocol if needed. You just need to properly configure the GraphQL server. This allows you to determine your configuration based on your preferences.</p><p>2) Flexible API configuration. GraphQL supports filtering and nested queries, allowing you to retrieve only relevant data based on client requests. You don’t need to transfer unnecessary data, making your requests lightweight and potentially increasing performance. You can easily adjust requests to retrieve the exact information you need. This flexibility helps you avoid creating hundreds of endpoints, where much of the data and logic on the server is partially duplicated.</p><p>3) Realtime updates. You can subscribe to any changes and receive updates regularly. This is a significant advantage, making your system more comprehensive. However, you should consider the data size, as such updates typically work over WebSocket, requiring you to follow the protocol’s rules and maintain a small payload.</p><p><strong><em>Disadvantages</em></strong></p><p>1) Long learning curve. GraphQL is complex and it takes time to understand the basic principles and build an efficient API. You need to set up schemas, configure the GraphQL server, define resolvers, and ensure the API works correctly. While it is completely doable, switching to a different context can be challenging.</p><p>2) Caching. Although you can configure exactly what you need in your requests, the underlying requests will remain the same, making it impossible to implement caching at the network level. You will need to optimize caching on the server side, possibly using established GraphQL solutions like persistent queries.</p><p>3) Over Engineering for simple systems. GraphQL requires preliminary configuration and additional resources to build a robust API. Simple systems may not need this complexity. With simple HTTP, you can see results in hours, but with GraphQL, significant experience is required to achieve the same speed.</p><p>4) Heavy requests. While GraphQL allows you to avoid transferring unnecessary data, its payloads can be larger than those of simple HTTP requests due to the additional parameters required by GraphQL. Although the difference is usually only a few KB, it can have an impact if the number of requests is large.</p><p><strong><em>Use cases</em></strong></p><p>GraphQL is suitable for complex systems where the number of resources can grow significantly. I would not recommend using it in startups unless you are very experienced with GraphQL and know exactly what to do. Otherwise, you will spend a lot of time configuring it properly. The elegance of GraphQL lies in its ability to easily define what data you want from the server without retrieving redundant information. Unlike gRPC, you don’t need to duplicate response messages if you need more or less data. You can easily filter data using nested queries to exclude unnecessary information. Additionally, you can combine real-time updates with simple endpoints, allowing you to maintain a single API approach. In complex systems, REST can be very hard to maintain due to the large number of endpoints, but GraphQL helps make your endpoints more elegant and manageable.</p><h3>EDA</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YckupJl8_80cZku0rjS6ZA@2x.jpeg" /><figcaption>Photo by Chris Blonk on Unsplash</figcaption></figure><p><strong><em>Introduction</em></strong></p><p>I had some doubts about including the Event Drive API to this list but eventually decided it is an important part. EDA allows you to subscribe to certain types of messages and build your system accordingly. There are different types of events and various approaches to properly design your system to align with them. For instance you follow event sourcing, which allows you to have a sequence of business events and recreate the operation flow. There are hundreds of message brokers and frameworks of any size and scale to help you operate your business logic. Various protocols like AMQP, MQTT, and others dictate how subscribers should get data and how events are propagated. Essentially, EDA is applicable when you need events to signal that something is happening. It is preferable to use asynchronous events because synchronous events create high congestion and unnecessary dependencies.</p><p><strong><em>Advantages</em></strong></p><p>1) Eliminate dependencies. Asynchronous events are indeed the best way to communicate without the necessity of waiting for a response. There are numerous benefits to this approach. Your service can continue functioning even if another part of the system is down. You don’t need to worry about whether the event is delivered immediately, and you are not dependent on changes in other parts of the system, as long as the event message remains unchanged.</p><p>2) Variety of protocols and implementations. There is a wide range of protocols and frameworks available, many of which are open source. You can choose the one that best suits your needs. Kafka, RabbitMQ, NATS, and even Redis have pub/sub implementations. Each of these systems comes with comprehensive documentation and numerous libraries for different languages.</p><p>3) Easy to scale. Many message brokers are good at scaling. Generally, you will not encounter scaling issues if your cluster configuration is accurate. Most message brokers can scale horizontally, making it hard to imagine a load that could overwhelm your resources.</p><p><strong><em>Disadvantages</em></strong></p><p>1) Hard to examine message types. Event messages are often not well documented, and descriptions can be hidden somewhere in the repository. Different messages might be scattered across various parts of the repository, so there is no single point of view like with Swagger. However, this can be improved if developers make a concerted effort.</p><p>2) Can become a mess in a complex system. Initially, configuring events might be very beneficial, as your service boundaries are uncoupled and independent. However, as the system grows, it becomes challenging to maintain clear event communication. The event structure might become user-defined without a strong protocol, causing dependencies between publishers and subscribers to grow exponentially. This can make it difficult to revert to a clear structure. Data Platforms exist to address this issue by aggregating all events, allowing any service to query the Data Platform directly.</p><p>3) Variety of protocols and implementations. This is both an advantage and a disadvantage. While having a wide range of solutions is beneficial, the technological stack for these solutions varies. You may need to spend time understanding the differences between Kafka and RabbitMQ, determining which to use for your scenario, what libraries to integrate, and how to host and scale them. Your developers and DevOps team might lack experience with some solutions or need time to weigh the pros and cons. Without adequate knowledge, there is a risk of missing something, leading to design gaps or the need to seek alternative solutions.</p><p><strong><em>Use cases</em></strong></p><p>Almost any system sooner or later starts using event-driven architecture. When you need to inform other services without requiring a response, EDA is a good choice, especially when the guarantee of delivery does not need to be 100%. In e-commerce applications, for instance, when a customer makes a purchase, the service may emit an event, and other services can execute their business logic accordingly.</p><p>However, people sometimes confuse events with commands, particularly when guaranteed delivery is necessary. When you need to inform a service and ensure delivery is guaranteed, otherwise, you cannot proceed, you should consider using an HTTP request, gRPC, or another method. This is because your business logic strongly depends on the response from the different services. For example, you cannot emit an event to withdraw funds and proceed with a purchase transaction without knowing that the balance has been decreased. In such cases, a synchronous call is required.</p><h3>Why I did not mention SOAP</h3><p>I strongly believe that SOAP is used primarily in old enterprise applications. SOAP is based on XML, making it heavy. The SOAP architecture is not well-supported nowadays, and you may find difficulties in locating appropriate libraries. Many years ago, when accessible protocols were scarce, SOAP was one of the known solutions, but today it is outdated. It should be considered only when necessary to support legacy applications, where the risks of changing something are critical. This article is written for those who need to decide which approach to use in a new system, so adding SOAP to the list would be redundant.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d5bf38e10dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What technical documentation you need in software development]]></title>
            <link>https://medium.com/@ilia.halashko/what-technical-documentation-you-need-in-software-development-57bb63359820?source=rss-30877565bd43------2</link>
            <guid isPermaLink="false">https://medium.com/p/57bb63359820</guid>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[software-design]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Illia Halashko]]></dc:creator>
            <pubDate>Tue, 02 Jul 2024 10:24:21 GMT</pubDate>
            <atom:updated>2024-07-02T10:24:21.076Z</atom:updated>
            <content:encoded><![CDATA[<p>The majority of software development companies have technical documentation. Some companies may update it regularly but most just use it from time and time and stored data there becomes outdated. That is a known issue because developers change code frequently and keeping an eye on documentation prolongs the development lifecycle which is already long. Moreover, the disaster will not happen if any documents are a bit outdated. Someone may claim that outdated documentation is better than nothing. Indeed, this statement has a point of truth. On the other hand, anything outdated may confuse developers and it will be a waste of time considering the number of useless pages on Confluence. As many people as many opinions. From my perspective, having valid documentation and not having anything redundant is the best scenario. In order to achieve that, we need to understand three things, what we need to document, what we don’t need to document and decide how to perform regular updates. Here, I will describe my point of view regarding technical documentation only, nothing related to management, company culture, access levels, etc. Just for clarity, documents like code of conduct, team structure, employee responsibilities I consider as management.</p><h3>What you need to document</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_kw1DMMWVf8l6R3fwC-Oyg@2x.jpeg" /><figcaption>Photo by Bernd Klutsch on Unsplash</figcaption></figure><p>Let’s start with the most important things: your first day at the company. What will you need the most? Understanding how to start development!</p><p><strong><em>Technical onboarding</em></strong></p><p>This means having access to technical onboarding documentation that outlines how to properly configure your system for coding and testing. This documentation may include the following:</p><ul><li>A general introduction to the development infrastructure.</li><li>Links to download the source code.</li><li>Instructions for installing. and configuring third-party software</li><li>Steps to compile the source code, if required.</li><li>An overview of the development flow and branch strategies.</li><li>Guidelines for code review processes.</li><li>Instructions for deploying code to development and staging environments, and promoting it to production.</li><li>Additional requirements for testing your changes.</li></ul><p>Ideally, new employees should be able to read the documentation and prepare their environment for active development. I firmly believe that even onboarding to complex systems can be effectively documented.</p><p>You need to order access to a remote environment to test changes? No problem. Just include a link to the technical documentation on how to do it and proceed from the point where you already have credentials.</p><p>Do you need additional access to certain repositories? Provide a separate link for creating a ticket.</p><p>I can’t imagine a situation where employees encounter problems with onboarding steps, assuming the documentation is written carefully. Moreover, having someone assist with technical onboarding can waste time and introduce risks. No one remembers everything, and there will be plenty of questions after onboarding. However, with proper documentation, most of these questions can be avoided.</p><p>People responsible for technical onboarding might get sick or leave the company. Newcomers could spend too much time figuring out how to provision a system for development instead of implementing features. Once you think the onboarding documentation is ready, you must test it. There’s a good chance you’ve forgotten to add something. Ask a colleague to follow the documentation and see how it goes, or try reprovisioning in a separate environment yourself. Always check your work.</p><p><strong><em>Your code need policies</em></strong></p><p>Assuming you have good technical onboarding documentation and people can start working without help, you need to document the technology stack and your approach to feature development and maintenance to ensure productive work. Creating separate policies for these aspects can be highly beneficial. Each policy must be signed by the CTO or Head of Engineering, though any developer can prepare the policy itself.</p><p>While policies are typically associated with large companies, even when you have 5–10 teams, the technology stack can become uncontrolled. It may take several hours to write one policy, but it can save much more time in the long run. Developers often experiment with new technologies that may not fit business needs. Restricting the technology stack to reliable frameworks, databases, message queues, architectural principles, and even cloud platforms can reduce disputes and increase software quality.</p><p><strong><em>Software Design</em></strong></p><p>The most important part of the documentation is to explain how the system works and how to maintain it. There is no one-size-fits-all approach to this; it completely depends on your architecture.</p><p>If you use microservices, you could start with a C4 container diagram. Each service should have its own document describing its general purpose, API, dependencies (databases, message brokers, third-party systems, and other services). For the API, provide a link to Swagger if available; otherwise, document the endpoint’s name, address, and description. Avoid copying all SQL requests, function names, and code into your documentation. Instead, document the minimum valuable information to keep it up-to-date with less effort.</p><p>If your architecture is monolithic, I suggest dividing it into several independent modules, at least at the documentation level. This approach requires you to describe the same dependencies on databases, message queues, and third-party systems. The key difference is that the independent modules will communicate via function calls. The quality of your monolith’s design matters significantly; even a complex monolithic system can be well-designed with a clear separation of responsibilities.</p><p>Regardless of whether you have a monolithic or microservice architecture, it is essential to have a template for documenting technical parts of each service or entity to follow it consistently. For example, the following items could be part of your documentation template:</p><ul><li>C4 containers diagram / UML modules diagram</li><li>Infrastructure scheme</li><li>Infrastructure data (VM addresses, configuration parameters)</li><li>Important links for logging and monitoring</li><li>Service API</li><li>Dependencies on databases</li><li>Dependencies on message queues</li><li>Dependencies on third-party services</li><li>Dependencies on other services</li></ul><p>You can decide how detailed you want to be with this list. Without a structured approach, your documentation can become an accumulation of irrelevant information.</p><p>If you need to document additional findings, you can create a separate page and add proper links to other documents that reference these findings.</p><p><strong><em>Architectural Decision Records &amp; Postmortems</em></strong></p><p>Additionally, two types of documents can be very useful for documentation: Postmortems and Architecture Decision Records (ADR). Both are event-specific and should not be updated.</p><p>ADR is used for any architecture-related changes to describe the impact and risk of those changes. It helps you understand why something was built or revised.</p><p>A Postmortem helps you understand mistakes by documenting what went wrong and how to avoid similar issues in the future. Postmortem reports can be useful for every team member to review, and ideally, familiarity with them should be mandatory. They are beneficial not only immediately after an incident but also for later review. They are especially helpful for newcomers to learn about potential mistakes to avoid.</p><h3>What you don’t need to document</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S6Fqs3GEyIXcGe6-jqtb9g@2x.jpeg" /><figcaption>Photo by Kai Pilger on Unsplash</figcaption></figure><p>I mentioned that technical documentation can become overwhelmed with unnecessary information. Here are the most important data points you should definitely avoid adding to your documentation. Let’s go step by step.</p><p><strong><em>Empty Pages</em></strong></p><p>Especially relevant when using Confluence. It’s really surprising when you search for information only to find an empty page.</p><p><strong><em>Duplicated Pages</em></strong></p><p>Having duplicated pages is much worse than having empty ones. Developers waste time figuring out the source of truth, only to find out that the pages are duplicates. The worst scenario is partially duplicated pages, where developers create new pages without checking for existing similar information. Always double-check if the information has already been documented and, if so, consider expanding the existing page.</p><p><strong><em>Don’t copy your repository</em></strong></p><p>Don’t add anything to your documentation that can be found in the repository. This avoids the need to update changes in two places. If you have important comments on some code, leave them in the code and simply add a link in the documentation. The same applies to infrastructure; if you use GitOps and the infrastructure is described there, don’t document it additionally.</p><p><strong><em>Don’t copy existing API documentation</em></strong></p><p>Don’t document or describe APIs if you have Swagger. This is similar to copying code comments or the code itself. A well-configured Swagger can comprehensively describe your API.</p><p><strong><em>Don’t document credentials</em></strong></p><p>Never keep credentials in Confluence. You can include VM addresses and usernames but definitely not passwords. It can be very hard to control access to such a page, and you might not even notice how many people have access to this sensitive information.</p><p><strong><em>Verify what you document</em></strong></p><p>Don’t document anything unless you are sure about it. If you use third-party software and are not confident about the integration details, double-check them. Your documentation might be used by many developers in the future, and they expect it to be accurate.</p><h3>How to update documentation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Rl-sPZJjzVc9JbPMf4TAg@2x.jpeg" /><figcaption>Photo by Matilda Alloway on Unsplash</figcaption></figure><p>The most difficult part is keeping documentation up to date. I completely agree; it’s a challenge. Here are some strategies to help manage this task effectively.</p><p><strong><em>Find a responsible person to update specific parts of the documentation.</em></strong></p><p>I like the RACI approach, where every part of documentation has a Responsible, Accountable, Consulted, and Informed person. This makes the update procedure an obligation rather than a “nice to have.” Document who is responsible for each part of the documentation. It must be one person; if a team is responsible, it means no one is responsible. Determine when to update the documentation and how to avoid missing updates. Here is one of the options.</p><p><strong><em>Label tickets in your management systems like Jira or Trello.</em></strong></p><p>For example, a task requiring database interaction could have a “database integration” label; similarly, use labels for “message queue,” “third-party API,” etc. If no integration is necessary, use a “no integration” label. At the end of the sprint, the responsible person can review each label and update the necessary parts of the documentation, based on your structured template. This task can be very beneficial for intern and junior developers to understand how the system works. You can also set up your management system to prevent closing tickets without integration labels to ensure nothing is missed.</p><p><strong><em>Manual tickets review and update</em></strong></p><p>A less reliable but still useful method is to dedicate one day in a month for the responsible person to review committed tickets and check if the basic documentation is up to date. While this approach may not be as effective, it can be a starting point to include this task in your milestones.</p><p>I am not suggesting that you should only follow the principles mentioned here or document only certain things. It is entirely up to you how you choose to document. My goal is to highlight ways to avoid situations where documentation becomes a complete mess that no one wants to fix. I understand that, sooner or later, documentation will become messy, especially in large tech companies. However, even in such environments, it is possible to maintain a core set of documentation that is always up-to-date and reliable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57bb63359820" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing and selling unit tests]]></title>
            <link>https://medium.com/@ilia.halashko/writing-and-selling-unit-tests-91863d94eb4b?source=rss-30877565bd43------2</link>
            <guid isPermaLink="false">https://medium.com/p/91863d94eb4b</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <dc:creator><![CDATA[Illia Halashko]]></dc:creator>
            <pubDate>Wed, 26 Jun 2024 07:56:16 GMT</pubDate>
            <atom:updated>2024-06-26T07:57:16.903Z</atom:updated>
            <content:encoded><![CDATA[<p>It may seem that any project must be covered with unit tests, and it is often viewed as an obligation rather than a beneficial practice. However, many projects avoid unit tests altogether. When you suggest adding them, sponsors often nod and promise to consider it but rarely agree to implement them. I follow their hesitation. Essentially, you are proposing something they do not fully understand and have not clearly explained the benefits of. Why should anyone invest time and money into something that might not seem immediately useful? You might say that unit tests help programmers ensure our code works better and prevents bugs. However, that explanation sounds too abstract and impractical for real-world scenarios.</p><p>In this article, I aim to explain when unit tests are necessary, which unit tests should be written, and how to effectively communicate the value of unit tests to business stakeholders. Unfortunately, many companies that already have unit tests do not use them properly, and those who have them are unaware of the potential benefits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*kifcuv4Q6Lhl6RNxNn9O1Q@2x.jpeg" /></figure><h3><strong>When you don’t need unit tests</strong></h3><p>Before understanding the key points for writing unit tests, let’s highlight when they might not be necessary.</p><p>First, you need to know your company’s priorities. Writing unit tests is a time-consuming process that can take days to prepare test plans and weeks to implement them. It’s always about weighing the pros and cons. In some cases, unit tests may not be necessary.</p><p>For pre-seed startups or even growing startups, it might be more beneficial to invest in feature development and rely on manual testing due to limited resources.</p><p>Some companies have good integration test coverage and run these tests before release to ensure that changes can safely go to production. Your product may already have a comprehensive suite of integration tests. Before adding unit tests, you will need to review existing test plans, identify what has not been tested, and find gaps. This process can be time-consuming. I’m not saying you won’t need unit tests in this scenario, but it will be harder to justify their value to the business, and writing proper unit tests will also take considerable time.</p><p>Your code changes might not contain many bugs, and manual testing works very well, with structured test suites. Such companies are usually well-established and have gained significant respect from their customers. The developers know the codebase, and the number of bugs is minimal. It would be really hard to persuade the business to adopt unit testing in this scenario, and it may not actually be worth it.</p><p>One signal that you should delay unit testing is when you know your code will soon undergo significant changes. For example, if you are planning to rewrite a complex module of a monolithic system, or if you are updating legacy code to integrate with a modern library or database, adding unit tests now would be redundant. In these scenarios, the code is highly coupled to the current implementation and will be refactored soon.</p><p>If you write unit tests now, you’ll have to align them with the new changes later, which is manageable for small updates. However, in the mentioned cases, you would need to revise entire test suites and the underlying logic, which is not a quick task.</p><p>Your code might not be ready for unit tests, or it might not need them. Consider a legacy system that was written 20 years ago. The architecture of this module was designed without anticipating that future developers would want to cover the code with unit tests. Additionally, if the system has been integrated for a long time, it means the code was developed long ago, successfully tested by your company, and has survived numerous releases.</p><p>Additionally, one advantage of avoiding unit tests is if your code changes very seldom – say, not more than once every three months. The benefits from test coverage might only become apparent after years, considering the time required to develop the test suites. This is especially true for legacy systems that are infrequently updated. In such cases, writing unit tests should be considered a low priority. Instead, it might be more beneficial to include some use cases from the legacy system in your integration tests.</p><h3><strong>How to make unit tests useful</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0RLCEncpLbd9AINegeqckA@2x.jpeg" /><figcaption>Photo by Kaung Myat Min on Unsplash</figcaption></figure><p><strong><em>Prepare you codebase</em></strong></p><p>It is crucial to achieve proper outcomes from unit test coverage. Therefore, you need to prepare your system to be covered with unit tests. This means your code must be well-isolated and perform a clear role, making it easy for anyone in the company to explain its purpose and communication protocols. Establishing strict boundaries is essential before writing unit tests.</p><p>Consider a service that only communicates with others through APIs. If your changes do not affect the API but only the internal logic, you don’t need to retest the entire codebase, just your service. This is known as separation of concerns. In such cases, manual feature testing and a partial regression tests covering communication with your service might be enough.</p><p>From my perspective, if unit tests are written professionally, even regression testing can become redundant for minor releases. Regression testing can sometimes take hours, so by relying on well-written unit tests, you can save a lot of time and significantly increase the number of releases. The more similar services you have, the faster you can allow for releases.</p><p><strong><em>Don’t rely only on code coverage percentage</em></strong></p><p>It is necessary to write proper unit tests and not rely solely on test coverage metrics. First, you need to build a test plan outlining what you are going to test and how. You don’t have to test every line of code; instead, try to divide your code according to functional requirements. Each function was written with a specific purpose and use case, so focus on testing those.</p><p>Even if you achieve 100% test coverage, it doesn’t mean you have covered everything. Test coverage metrics only show how many lines of code have been tested, not how well the code has been tested. For example, if you have a function with 100 lines of code and you write 100 separate tests, each checking a single line, you may achieve 100% coverage. However, these tests will be almost useless because they don’t test the actual use cases for which the code was written.</p><p>When our code is clear, it is easier to focus on business scenarios and test functions separately. It is crucial to write tests based on feature use cases, not just the code itself. This approach is relevant to all types of tests, whether unit, functional, or integration tests – the difference lies only in the scope.</p><p><strong><em>Include tests into build system</em></strong></p><p>An important note is to have a build system and integrate your unit tests into it. Writing tests to run locally is redundant work and should be avoided. Never rely on manual processes. Developers will not fix tests unless they are part of the build system and a blocker to the release. Similarly, developers will not add tests to features unless it is part of the policy.</p><p>Include test coverage checks in your build system. While high coverage alone does not guarantee safety, having 80–90 percent coverage with a well-planned test suite is a good target. This policy ensures developers write unit tests, as their changes must meet the coverage requirements to pass.</p><h3><strong>Calculation profit from unit tests</strong></h3><p>Assuming you really need unit tests and your code is ready for them, how do you convince businesses? The simplest way is to show them numbers. Explain how unit tests will improve development quality and increase release frequency in numbers.</p><p>Let’s elaborate with an example.</p><p>You have a service “A” that has been under active development for 6 months. You review each commit to see how many features and bugs were addressed during that time. Suppose there were 20 commits, each corresponding to a feature request, and 5 bugs that arose after these commits. We’ll focus on these 5 bugs because each was related to a specific commit, not relevant bugs can be excluded from statistics.</p><p>Imagine that each task took 2 days for development and 1 day for testing. One day for testing is our time to perform full regression and manual testing. Each bug took 2 days to find a fix and the same 1 day for testing before the release. For the 20 tasks, we have following</p><p>Development: 20 * 2 = 40 days.</p><p>Testing: 20 * 1 = 20 days</p><p>Bugs: 5 * 2 + 1 = 15 days (development and testing)</p><p>In total: 40 + 20 + 15 = 75 days over 6 months.</p><p>Now, consider what would happen with unit tests. The ongoing development time remains the same at 40 days, regression testing time could be reduced or eliminated. Manual testing per task remains the same but writing unit tests could take 4 hours per task. In total we have 40 days for development and the same 20 days for tests (20 tasks, 4 hours on testing manual + unit). However, you will save time on bugs. That’s 15 days. In total, you would spend 40 + 20 = 60 days. Thus, you save 15 days over 6 months and avoid 5 potential bugs if the unit tests are effective. Here, I put 25% of development time into writing unit tests but reduce time for full regression which is not necessary anymore. If you don’t have full regression you could make an accent on the amount of bugs after release.</p><p>Furthermore, good unit tests can speed up code reviews, providing long-term benefits. You must mention that writing unit tests requires an initial investment of time, the payoff comes within a year or even later. Highlight the potential time savings and the reduction in bugs, which positively impacts the product and client satisfaction.</p><p>Again, if scaled our example to 10 services, saving 15 days per service every 6 months, we could save in total 150 days ( 10 services * 15 days ) and avoid around 50 bugs (5 bugs/service * 10 services). These numbers can be quite convincing but to make them closer to real I would divide them by two.</p><p>Even for companies already using integration tests, unit tests can be a useful addition. You will have to carefully analyze existing coverage and revise existing tests if necessary to avoid duplication.</p><h3>Conclusion</h3><p>Unit tests may not always be necessary, but they can significantly enhance the quality and speed of software delivery. They represent an essential yet straightforward aspect of development that can yield substantial benefits. I find it disheartening when tests are merely written out of obligation, without serious consideration for test plans. Unfortunately, this lack of dedication can extend to integration tests as well.</p><p>It’s crucial that integration tests do not serve as a safety net for unit tests. If they do, unit tests may not be taken seriously. This issue becomes particularly relevant in companies that employ various types of tests – functional, regression, acceptance, load, unit, and others – where overlaps and gaps in test coverage can arise.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91863d94eb4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transform Business Requirements into Technical]]></title>
            <link>https://medium.com/@ilia.halashko/transform-business-requirements-into-technical-0457cce49111?source=rss-30877565bd43------2</link>
            <guid isPermaLink="false">https://medium.com/p/0457cce49111</guid>
            <category><![CDATA[technical-analysis]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <dc:creator><![CDATA[Illia Halashko]]></dc:creator>
            <pubDate>Wed, 19 Jun 2024 07:26:22 GMT</pubDate>
            <atom:updated>2024-06-19T07:26:22.752Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes it is challenging to understand what a business truly needs and how to effectively translate those needs into code. Stakeholders often lack technical knowledge and want something on yesterday, while developers strive to adhere to best practices and use the latest frameworks and libraries. Meetings between them can lead to conflicts and, potentially, dissatisfaction with the final product.</p><p>Here, I will address the key aspects to consider when dealing with business requirements. We’ll explore what questions to ask and how to find a balance between business and technical needs. This will be particularly useful for Engineering Managers, Architects, Team/Tech Leads, and anyone frequently interacting with business representatives, such as Product Managers, Business Analysts, or other sponsors.</p><h3>Build communication efficiently</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DSbxpKstXvCZi0xz" /><figcaption>Photo by <a href="https://unsplash.com/@kaleidico?utm_source=medium&amp;utm_medium=referral">Kaleidico</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Some may argue that a system design interview helps identify a candidate’s ability to build a complex system, but in reality, it doesn’t work like that. Typically, in an interview, clarifying functional and nonfunctional requirements is straightforward, with prepared answers from the interviewer. In the real world, however, this process is more complicated. Stakeholders may be uncertain about many aspects or unaware of potential bottlenecks. It is our responsibility to propose the best solution based on the available information. Additionally, understanding business priorities is crucial, as you often have to balance quality, cost, and speed.</p><p><strong><em>Functional requirement</em></strong></p><p>To fully grasp the feature, start with a detailed session with the sponsor to discuss all aspects. The more questions you ask at this stage, the more information you’ll gather. Your goal is to address all potential corner cases, preparing you to “What if?” scenarios. You need to clearly understand what the business wants, why the feature is important, and how it will function. For example, if it involves creating a new screen with updates, consider when it will be created, who the users are, and whether the information needs to be updated in real-time or can wait until the screen is opened.</p><p>Remember, sponsors are people too, and they might overlook details. Speak in business terms during your conversation. If you can’t explain something simply, it likely means you don’t fully understand it. At the end of the meeting, document the feature description or update any existing documentation. Don’t rely on memory, even for small features.</p><p><strong><em>Nonfunctional requirements</em></strong></p><p>Nonfunctional requirements are crucial, and it’s easy to assume that any system should work without downtime and be able to scale immediately to millions of users. However, this is a common misconception. Typically, the business knows the current number of users and expects growth based on specific marketing campaigns. For instance, if your application currently supports 5,000 users and the system’s limit is 10,000 users, inform the business. This doubling of capacity might be sufficient given the current usage and expected growth.</p><p>Consider how critical the feature is to the entire system: Can the application function without it, or is it indispensable? For example, if it’s a suggestions menu, it might be acceptable for the feature to be temporarily unavailable if issues arise. For instance, back-office operations can tolerate slight delays without optimization, real-time user interactions might require immediate accessibility and performance.</p><p><strong><em>Consider price costs</em></strong></p><p>New features can increase costs, such as infrastructure changes or service subscriptions. The cost can vary significantly depending on the solution. If the budget is not aligned, discuss this with the sponsor. Remember, feature implementation involves not only development costs but also ongoing maintenance expenses.</p><p>For example, using AWS Aurora can be very expensive for large data storage. Alternatively, configuring your own database on a separate VM may be more cost-effective when dealing with vast amounts of data, though it requires significant development effort. The best choice depends on your qualifications and the specific needs of the service.</p><p><strong><em>You must know your codebase</em></strong></p><p>Once you have handled all functional and nonfunctional requirements, it’s time to determine how the feature will be implemented and prepare a list of tasks. Consider all aspects of technical implementation carefully. Unlike a system design interview, where you might choose databases based on preference, your company may use specific technologies or have constraints such as databases with read or write issues, requiring scaling and additional costs.</p><p>The same applies to caching. You might think it’s easy to cache requests, but consider whether a caching system is already configured, if the requests are suitable for caching, and what TTL (time-to-live) would be appropriate. If you’re unfamiliar with some part of the code, seek assistance. Asking a question will take around 5 minutes but if you make a mistake and not include something it might cost you weeks in the best scenario.</p><p>Although, when the business asks only for an approximate estimate, you don’t need to dive deeply into the details or search through the code. Instead, consult with developers or rely on your knowledge of the system to provide a reasonable response.</p><p><strong><em>Find trade-offs between tech and business</em></strong></p><p>When you feel that using the open source library will increase the development and this library is well known, consider integration benefits, instead of writing everything from scratch. If any service can be bought and it would save costs of development please do it. If you feel that this feature may be really hard to implement, it would be better to discuss other options. The best solution is the simplest one. Almost 99.99% of all technical problems you face have already been solved, it is just a matter of finding the right approach.</p><p>Sponsors don’t know the complexity of the implementation and sometimes it might be better to sacrifice quality a little bit but release something instead of long-run development with plenty of bugs. It is a very fragile edge between interest to play with new technology or framework and deliver a feature based on known solution. I suggest discussing the opportunities of integrating something new into a project as a separate task. Just describe what you want to achieve with that. Everything can be sold but please don’t try to sell technical improvement for certain feature development if it is not necessary. There will be plenty of unknowns and the result can be unpredictable. If you really want to integrate something new, ask for a spike, prepare benchmarks and try to convince businesses in their language that this would be necessary, e.g. clients will give updates twice faster.</p><h3>Common mistakes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tlwt-b4GYkXv9fcE" /><figcaption>Photo by <a href="https://unsplash.com/@brett_jordan?utm_source=medium&amp;utm_medium=referral">Brett Jordan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong><em>Never say just “no”. Please elaborate!</em></strong></p><p>As mentioned, the business often doesn’t understand technical details. When you say something is impossible, you need to explain the specifics in simple terms and outline the cost implications. Most features are feasible; it’s usually a matter of time and budget.</p><p>For instance, you could say: “Our service currently has a bottleneck due to many queries hitting the same database. To implement this feature, we need to add more queries, which could slow the system down by 2 seconds. Alternatively, we could refactor the system to handle the load better, but that would require at least a month of development.”</p><p>This way, you provide a clear choice: either a 2-second increase in page load time or a month of development work.</p><p><strong><em>Consider your team qualification<br></em></strong>If your team lacks expertise in a particular area, inform the stakeholders. This significantly increases development risks. You need to decide between allowing your team to dig into the new technology or outsourcing the work. While outsourcing might take longer, it can bring in a professional with relevant experience who is ready to collaborate.</p><p>Assess your resources carefully. For example, if your team specializes in server development using the Flask framework and stakeholders want to integrate and train a specific AI model, it might be best to hire a dedicated expert or team for this task. Explain this to the sponsors, highlighting the benefits of bringing in specialized skills to ensure project success.</p><p><strong><em>Never lie! If you don’t know or are not sure, then say it.</em></strong></p><p>Never say anything to the stakeholder unless you are not sure. Especially never promise any estimation. In this case you will be the person you command and your stakeholder blame and sooner or later it will not end up very well. Even if developers have almost finished the investigation but results are not accurate, don’t show them to the stakeholders. In best cases you may be lucky and your estimation will match the reality but on a long distance it will ruin your career. Stakeholders want truth even if it is not very promising.</p><p><strong><em>You estimation will never be accurate</em></strong></p><p>Almost all estimation fails. It is normal. You cannot consider everything. Your responsibility is to include it in estimation during tasks planning. There are plenty of articles dedicated to estimation techniques and you can get familiar with them. I will just say that always include a percentage of risks to each estimate depending on how confident you are but if the percentage is bigger than 10–20 on the tasks it means you have not investigated the requirement properly or the feature is too big. Of course for high-level estimation the value could be bigger but it is a different story.</p><h3>Conclusion</h3><p>Nowadays it is very popular to use Scrum and adjust changes according to the sponsor feedback but it does not mean that we must completely ignore business at the beginning and just rely on methodology. Remember, each sprint costs money.</p><p>I hope all mentioned here will help to build a clear and professional relationship between business and technology. I believe with the right approach it is possible to cooperate and be able to predict risks and provide more or less accurate estimates. I agreed that sometimes things may go out of control but it is our responsibility as tech guys to be prepared for this and explain it to our stakeholders.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0457cce49111" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Identify Organizational Bottlenecks in Software Development]]></title>
            <link>https://medium.com/@ilia.halashko/identify-organizational-bottlenecks-in-software-development-462bbb5ce63d?source=rss-30877565bd43------2</link>
            <guid isPermaLink="false">https://medium.com/p/462bbb5ce63d</guid>
            <category><![CDATA[business-development]]></category>
            <category><![CDATA[organizational-change]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[process-management]]></category>
            <category><![CDATA[project-management]]></category>
            <dc:creator><![CDATA[Illia Halashko]]></dc:creator>
            <pubDate>Thu, 06 Jun 2024 21:20:45 GMT</pubDate>
            <atom:updated>2024-06-17T17:20:36.759Z</atom:updated>
            <content:encoded><![CDATA[<p>Understanding why certain features are not delivered can often be challenging. Management might blame the technical teams, while the technical teams point fingers back at management. Meanwhile, the business side is caught in the middle, trying to identify the root cause while pushing for results regardless of the circumstances. This scenario typically arises after significant company growth or when earlier issues, previously easy to fix, have been neglected over time. It’s a common misconception that all problems in a tech company are purely technical; this is far from the truth.</p><p>In this article, I will outline areas within a company’s organization that can significantly hinder feature delivery. I will also suggest directions to investigate to identify root causes, which can then be escalated or resolved within your level of authority.</p><p>It’s crucial to understand our working environment before implementing any changes or improvements. Although many insightful books have been written on this topic, not all approaches will fit every company. This is not a reflection of doing something wrong, but rather an acknowledgment of the unique nature of each company.</p><p>An important note is the insights shared here are primarily related to software development and are most applicable to companies or departments with 50 or more employees.</p><h3>Organizational structure</h3><p>First and foremost, understand the size and structure of your company. Identify the various departments and clarify your expectations from each. Assess whether all these departments are necessary. Create a diagram of the organizational structure, detailing each department and their roles, ensuring you understand what they do and why they exist. Often, each department consists of several teams — include these in your diagram as well but don’t describe them for now just remain team names.</p><p>As companies grow, organizational structures can become complex, making it difficult to track progress. In this complexity, you might lose sight of the original rationale behind the creation of certain departments or teams. Some teams might have been established to address problems that are no longer relevant. Here, how it may look like on a high level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C_--xh10iHnsHiZBOFZTFA.png" /></figure><p>Once you have a clear diagram of your organizational structure, what comes next?</p><h3>Employee hierarchy</h3><p>Next, it’s essential to map out the hierarchy of your employees. Understanding who reports to whom, and why, is crucial. Line managers need to effectively communicate with their subordinates, whether they manage a large business unit or a small team. Communication should be clear, either in technical or business language, as handling both can be challenging. In larger companies, there may be direct and functional managers with distinct areas of responsibility, which should be clearly represented in your hierarchy diagram.</p><p>An employee hierarchy not only clarifies reporting lines but also helps identify verticals within the organization. Verticals are hierarchical structures that serve as shared resources across multiple departments, such as designers, HR, DevOps, and even developers. While verticals can be very beneficial, they can sometimes become bottlenecks, particularly when developers work on different projects and report to managers who are not familiar with the business goals or technical challenges. As a result, developers don’t get a proper feedbacks, managers don’t have a proper context. Therefore, understanding the hierarchy is vital for identifying and analyzing potential issues or prioritizations of the tasks. At then end you will have something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R_kkWo6WaGmDNMojw1odHA.png" /></figure><p><strong>Annotation</strong></p><p><em>CEO — Chief Executive Officer<br>CPO — Chief Product Officer<br>CTO — Chief Technical Officer<br>COO — Chief Operational Officer<br>HD — Head of Design <br>PO — Product Owner<br>HE — Head of Engineering <br>HS — Head of Sales<br>HM — Head of Marketing<br>D — Developer<br>PM — Product Manager<br>TL — Tech Lead <br>EM — Engineering Manager<br>S — Sales Manager<br>M — Marketer</em></p><p>Compare your organizational structure with your reporting lines to gain insights into the involvement of each employee in various activities. Moreover, aligning your organizational structure with the employee hierarchy can help determine whether individuals are working within the same departments and teams and towards a common goal. The template of mapping is totally up to you but it could like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jLtKEfqQmlhtT54tJDMCKg.png" /><figcaption>Mapping your employee hierarchy on one department</figcaption></figure><h3>Team’s responsibilities</h3><p>It is important to clearly define the area in which each team operates. If a team works with code, specify the services they use and those they own. Surprisingly, these can often be different. Determine if the team operates solely within one department or if it is a platform team working on core features utilized by other teams without directly altering them.</p><p>Creating a table can be very helpful, with the following columns: team name, department, list of owned services, list of general services the team can modify but does not own (ideally, there should not be such services), and a brief description. This table will help you examine if multiple teams are working on the same codebase, leading to conflicts, or if there is a lack of clarity regarding their areas of responsibility. It can also reveal if a team is primarily fixing bugs or dabbling in various tasks without a clear focus.</p><p>This level of detail is crucial for identifying overlaps, conflicts, and gaps in team responsibilities, ensuring smoother collaboration and more efficient project execution.</p><h3>Employee’s responsibilities</h3><p>In addition to describing teams, it is crucial to understand general employee’s positions and prepare a detailed description of their responsibilities. Often, what management envisions may differ significantly from what employees are actually doing. The software development industry has a variety of positions, and expectations can vary greatly from company to company. For instance, the role of an Engineering Manager can differ widely, not to mention roles like Delivery Managers, Data Scientists, Architects, Technical Leads, and so on. In some companies, a single person might be expected to fulfil multiple roles.</p><p>Setting clear expectations for each position is essential. This clarity not only helps track activities properly but also ensures that employees understand what is expected of them and what falls outside their scope. This applies to all positions within the organization. Clear role definitions help prevent overlap, reduce confusion, and ensure that everyone is working towards common goals in an efficient and organized manner.</p><h3>Feature delivery process</h3><p>By now, you should have a clear understanding of your company structure, employee hierarchy, and their responsibilities. Although things might seem confusing, the goal is to first understand the current state before making any changes. Now, it’s time to describe your feature delivery process — how business features move from the initial idea to production.</p><p>Please, don’t focus here on the technical aspects like CI/CD, but on the flow from business to developers, assuming developers write code and deploy it directly to production. The aim is to identify any issues in your process from business to team and see how well employees align with it.</p><p>Consider these aspects:</p><ul><li>How often do you plan new features and assign work for each department and teams?</li><li>How do you set and measure key performance indicators?</li><li>Do you use milestones? Who is involved in their initial preparation? How do you plan them with the team?</li><li>Who coordinates the planning and execution process?</li><li>Are you truly an agile company? Do you use frameworks like SAFe, Prince2, or PMP, or do you have something customized that works for you?</li><li>How do you handle cross-team complex tasks and control progress? Do you have a structured approach, or do you rely that things somehow being resolved?</li></ul><p>Remember, each level of management and reporting adds complexity and uncertainty, regardless of the direction. Ultimately, your process diagram should answer one simple question: “How?”</p><p>You may play with the templates and adjust it to your needs. Here is very high level example of delivery process without key players who regulates delivery but with timeframes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B41Oqu5rWxgfU-DPUUJiWA.png" /></figure><p>If you’re unsure how to create this diagram, consider using BPMN (Business Process Model and Notation) or a simpler format like rectangles and lines to ensure clarity and understanding among all stakeholders. The key is to make the process clear and comprehensible.</p><h3>Gather feedback</h3><p>Once you have mapped out the company structure, employee hierarchy, teams and position responsibilities, and the delivery process, share all your findings with the organization and conduct a survey, preferably anonymous. This baseline highlights how your company operates. While you might have prepared this overview yourself or delegated some tasks, it’s likely that developers, designers, and analysts were not directly involved. Their feedback is crucial to assess the accuracy of your findings.</p><p>Ask employees to evaluate the quality of your documentation. What do they think about the delivery process? Does it truly reflect how things are done? Where do they see impediments?</p><p>Expect a variety of complaints and feedback that will help you refine your findings to better match the reality of the company’s operations. This feedback is vital as context often gets lost through multiple levels of hierarchy, and gathering input from all levels will provide a clearer, more accurate picture of the organization.</p><h3>Estimate results</h3><p>Now that you have a comprehensive description of how your company or departments operate, you can begin to analyze and seek potential issues. This baseline provides a clear starting point for understanding and solving problems.</p><p>Here are some areas to focus on:</p><ul><li>Are your departments structured? Are the reporting lines clear?</li><li>Can line managers really provide feedback regarding their area of responsibility?</li><li>Is there confusion or uncertainty in transforming business requirements into technical tasks?</li><li>Are there dependencies on other teams that cause delays during development?</li><li>Are employees involved in activities that are outside their main area of responsibility, hindering their primary tasks?</li><li>How well does the employee hierarchy align with the team structure?</li><li>Is the reporting hierarchy effective, or are there gaps in communication and context?</li><li>Are different teams working on the same services, leading to conflicts and time wasted on deciding task ownership?</li><li>Are there any teams or departments without clearly defined responsibilities or missing key players?</li><li>Are some teams not integrated into any department?</li></ul><p>At then end you may prepare a list of real problems you company have, that is something you will be working on. Priotize them from critical ones which require immideate interaction to “good to have” improvements.</p><h3>How to make changes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0_rsfwBijOL8uCs6" /><figcaption>Photo by <a href="https://unsplash.com/@bradstarkey?utm_source=medium&amp;utm_medium=referral">Brad Starkey</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>You might be wondering, “This all sounds great, but how do I actually improve things?” That’s a good question, and the honest answer depends on the specific problems you identify and your business needs. However, one crucial piece of advice is to avoid trying to change everything at once. Instead, implement small changes incrementally, evaluate the results, and iterate. Remember, the agile approach works not only in software development but can be applied to any type of organizational change.</p><p>Here are some steps to guide your improvement process:</p><ul><li>Ensure employees know exactly what their roles entail and what falls outside their responsibilities.</li><li>Create well-defined departments or domains and assign specific teams to each domain.</li><li>Define clear areas of responsibility and minimize overlaps for departments and teams.</li><li>Consider familiarizing yourself with the Team Topologies approach, which introduces platform, stream-aligned, enabling, and complicated-subsystem teams to cover various aspects of software development.</li><li>Review and adjust your employee hierarchy to align with the newly established domains and teams.</li><li>Ensure reporting structures are clear and that progress tracking is straightforward.</li><li>Choose methodology or framework you will use for feature delivery and tracking results.</li><li>Test changes on any department, preferably not critical one and assess impact, refine your approach based on feedback and results.</li><li>Continuously improve by applying the chosen mindset to organizational changes.</li></ul><p>By following these steps, you can make informed, incremental changes that gradually improve your organization’s efficiency and effectiveness.</p><h3>Summary</h3><p>I aimed to highlight common issues that can arise in any company or department. I intentionally avoided recommending specific frameworks or approaches because each company has unique goals and structures, and it’s crucial to decide what works best for you.</p><p>Again, it’s easy to put the blame on developers, but remember, they might be unaware of business priorities or being blocked by unclear delivery process. Sometimes, the business itself creates blockers unconsciously. I hope this article will help make first steps towards improvement.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=462bbb5ce63d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to integrate crypto wallet into your application]]></title>
            <link>https://medium.com/@ilia.halashko/how-to-integrate-crypto-wallet-into-your-application-c0d05afe72f1?source=rss-30877565bd43------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0d05afe72f1</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[crypto-wallet]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Illia Halashko]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 16:47:15 GMT</pubDate>
            <atom:updated>2024-01-28T16:47:15.448Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ccp1Fpi0Yt8EMnEZ" /><figcaption>Photo by <a href="https://unsplash.com/@maria_shalabaieva?utm_source=medium&amp;utm_medium=referral">Mariia Shalabaieva</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>There are plenty of crypto wallets available on the internet. However, it might be useful to integrate a crypto wallet into your own application. It does not matter whether it is an e-commerce platform, or a fintech solution. The logic of crypto transfers remains the same. At least by the time of writing this article. When I had a similar task I was not able to find a comprehensive guide to fill all my gaps and use it in development, so I suggest fixing it.</p><h4>API providers or self-hosting</h4><p>Before we dive into development and examples, let’s discuss potential solutions on the market. First of all, you need either to host a personal blockchain node or use one of the products available on the market. Such solutions work very simply. The companies run blockchain nodes and provide an API for communication.</p><p>Usually, they offer an API for multiple blockchains, which is a great for multi-currency wallet integration. Mostly, choosing an API is a better option because you don’t have to spend money on allocating resources to host your personal VMs, and you don’t need to maintain them. Also, your private keys will always stay with you. Communication is handled with access tokens. The price also depends on the number of requests, but the subscription is manageable. Of course, sometimes an API might be inaccessible, but that is the risk of using any external provider, not only in the blockchain domain. Basically, if you are not expecting a huge number of users and you are okay with being dependent on third-party solutions, you should go with this. Also, some wallet applications use them. The most common are:</p><ul><li>QuickNode (<a href="https://www.quicknode.com/pricing">https://www.quicknode.com</a>)</li><li>Alchemy(<a href="https://www.alchemy.com/pricing">https://www.alchemy.com</a>)</li><li>Infura (<a href="https://www.infura.io/pricing">https://www.infura.io</a>)</li><li>Moralis (<a href="https://moralis.io/pricing/">https://moralis.io</a>)</li></ul><p>The difference in subscription options lies mostly in the number of requests per second, as well as additional APIs for NFTs, blockchain exploration, and pricing.</p><p>Implementing the wallet logic on the client side is a good option. Otherwise, you will have to duplicate the same logic on the server. Additionally, some providers restrict the number of API calls per IP address, but not per access token.</p><p>In most cases, they are just proxies to blockchain APIs.</p><p>Here is a link to the official Ethereum API, so you can verify it yourself:</p><p><a href="https://ethereum.org/developers/docs/apis/json-rpc">https://ethereum.org/developers/docs/apis/json-rpc</a></p><p>An important note: here, you may find just the descriptions of APIs with basic examples. If you are using node providers, please refer to their own documentation for APIs:</p><ul><li><a href="https://www.quicknode.com/docs/welcome">https://www.quicknode.com/docs/welcome</a></li><li><a href="https://docs.infura.io/">https://docs.infura.io/</a></li><li><a href="https://docs.alchemy.com/">https://docs.alchemy.com/</a></li><li><a href="https://docs.moralis.io/">https://docs.moralis.io/</a></li></ul><p>A common solution for communication is the Web3 library. It is accessible in many programming languages, including Python, JavaScript, Go, Java, etc. This library, besides being an HTTP wrapper, has many utility functions for working with private keys, signing transactions, formatting data, etc. It will be very helpful, especially for newcomers to the blockchain domain.</p><p>In my examples, I will be using the Ethereum blockchain and Python code, but you can apply the learnings to any other blockchain or programming languages. In case you want a multi-blockchain wallet, you need to purchase an advanced subscription or run several personal nodes, using each one accordingly.</p><p><strong>Understanding the difference between tokens and coins</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ocvtsKkXOr1ZWImU" /><figcaption>Photo by <a href="https://unsplash.com/@theshubhamdhage?utm_source=medium&amp;utm_medium=referral">Shubham Dhage</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>First, let’s distinguish between token and coin operations. In short, a coin is the main currency of a blockchain, while a token is a smart contract running on this blockchain. Here, you can find a good explanation of what a token and a smart contract are: <a href="https://www.investopedia.com/terms/c/crypto-token.asp">https://www.investopedia.com/terms/c/crypto-token.asp</a></p><p>After you understand the basics, we can proceed to the necessary operations with your crypto wallet.</p><p><strong>How to check balances for coin</strong></p><p>The Ethereum API for retrieving a balance: <a href="https://ethereum.org/developers/docs/apis/json-rpc#eth_getbalance">https://ethereum.org/developers/docs/apis/json-rpc#eth_getbalance</a></p><p>It requires only two parameters: the wallet address and the blockNumber. To obtain an up-to-date balance, you can pass ‘latest’ as the blockNumber.</p><p>You can use curl to check the results:</p><pre>curl ${url_to_the_provider_or_blockchain}  -X POST -H &quot;Content-Type: application/json&quot; --data &#39;{&quot;method&quot;:&quot;eth_getBalance&quot;,&quot;params&quot;:[&quot;${wallet_address}&quot;, &quot;latest&quot;],&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;}&#39;</pre><p>With the Web3 library it will be something like this:</p><pre>from web3 import Web3<br><br>node_provider = &quot;&quot; # node url for API communication. If you are using providers you will get it after registration<br>web3 = Web3(Web3.HTTPProvider(node_provider)) # library initialization <br>wallet_address = &quot;&quot; # wallet address for which you want to check balance<br>wei_balance = web3eth.get_balance(wallet_address, &#39;latest&#39;) # you balance in wei_format<br>balance = web3.from_wei(wei_balance, &#39;ether&#39;)) # your balance in readable format</pre><p>Following link describes what is wei format and how to work with it <a href="https://www.investopedia.com/terms/w/wei.asp">https://www.investopedia.com/terms/w/wei.asp</a></p><p><strong>How to check balances for token</strong></p><p>For tokens, things become a bit more complicated because they require cooperation with smart contracts. Each token is primarily written based on the ERC-20 standard. This standard, defined by Ethereum, specifies the functions that must be implemented for communication. In short, you have to call the ‘balanceOf’ function in the smart contract and pass the wallet address. To do this, you will need to use the following API:</p><p><a href="https://ethereum.org/developers/docs/apis/json-rpc#eth_call">https://ethereum.org/developers/docs/apis/json-rpc#eth_call</a></p><p>The list of parameters is extensive, but we don’t need all of them. What we need is:</p><ul><li>‘from’: your wallet address,</li><li>‘to’: the address of the smart contract,</li><li>‘data’: a hash of the encoded smart contract’s method and parameters.</li></ul><p>Once a smart contract is deployed to the blockchain, it has a specific address. Each smart contract also has an ABI (Application Binary Interface), which is a list of methods described in a human-readable format(JSON). You can view the ABI for each token on<a href="https://etherscan.io/"> https://etherscan.io/</a>.</p><p>Here is the ABI for the 1INCH token: <a href="https://api.etherscan.io/api?module=contract&amp;action=getabi&amp;address=0x111111111117dc0aa78b770fa6a738034120c302&amp;format=raw">https://api.etherscan.io/api?module=contract&amp;action=getabi&amp;address=0x111111111117dc0aa78b770fa6a738034120c302&amp;format=raw</a></p><p>Essentially, we do the following:</p><ul><li>Download and save the full ABI description of the token.</li><li>Find the ABI representation of the function to be called and its parameters.</li><li>Encode all this information.</li><li>Pass it to the ‘data’ parameter.</li></ul><p>This process can be easily carried out with the Web3 library. Here is a Python example:</p><pre>from web3 import Web3<br><br>node_provider = &quot;&quot; # the url for API communication<br><br>smart_contract_address = &quot;&quot; # address of smart contract in blockchain<br>smart_contract_abi = &quot;&quot; # abi presentation of smart contract<br>wallet_address = &quot;&quot; # address of your wallet for which you want to check balance<br><br>smart_contract = web3.eth.contract(address=smart_contract_address, abi=smart_contract_abi) # initialization of smart contract object for your token<br><br>wei_balance = smart_contract.functions.balanceOf(wallet_address).call() # here, a python library will extract the ABI of balanceOf function for you from the ABI of smart contract and you don`t need to copy it manually<br>balance = web3.from_wei(wei_balance, &#39;ether&#39;)) # your balance in readable format</pre><p>You can also, use this website <a href="https://abi.hashex.org/">https://abi.hashex.org/</a> to get encoded data of necessary functions in smart contract, if you want to use direct call without libraries:</p><p>Just choose auto-parse tab and paste the following ABI JSON:</p><pre>[<br>  {<br>    &quot;constant&quot;: true,<br>    &quot;inputs&quot;: [<br>      {<br>        &quot;internalType&quot;: &quot;address&quot;,<br>        &quot;name&quot;: &quot;&quot;,<br>        &quot;type&quot;: &quot;address&quot;<br>      }<br>    ],<br>    &quot;name&quot;: &quot;balanceOf&quot;,<br>    &quot;outputs&quot;: [<br>      {<br>        &quot;internalType&quot;: &quot;uint256&quot;,<br>        &quot;name&quot;: &quot;&quot;,<br>        &quot;type&quot;: &quot;uint256&quot;<br>      }<br>    ],<br>    &quot;payable&quot;: false,<br>    &quot;stateMutability&quot;: &quot;view&quot;,<br>    &quot;type&quot;: &quot;function&quot;<br>  }<br>]</pre><p>Then paste the wallet address for which you want to check the balance and you will get encoded parameters.</p><p>The final request will be something like this:</p><pre>curl ${url_to_the_provider_or_blockchain} -X POST -H &quot;Content-Type: application/json&quot; \<br> --data &#39;{&quot;method&quot;:&quot;eth_call&quot;,&quot;params&quot;:[{&quot;from&quot;:${your_wallet_address},&quot;to&quot;: ${smart_contract_address},&quot;data&quot;:${encoded_abi_function_with_parameters}, &quot;latest&quot;],&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;}&#39;</pre><p><strong>Estimating costs for sending coins</strong></p><p>The most important part is sending tokens, but before we do that, we need to accurately calculate the commission. The commission is always calculated in the main blockchain currency, which in our example is ETH. It comprises the amount of gas used to execute a transaction and the price for gas. To accomplish this, we need to use the following API:</p><p><a href="https://ethereum.org/developers/docs/apis/json-rpc#eth_estimategas">https://ethereum.org/developers/docs/apis/json-rpc#eth_estimategas</a></p><p>and provide the sender’s address, the receiver’s address, and the amount of coins in HEX format.</p><p>This will return the amount of gas required for the transaction. Afterwards, you need to multiply this value by the gas price. Here is how you can obtain the current gas price from the blockchain:</p><p><a href="https://ethereum.org/developers/docs/apis/json-rpc#eth_gasprice">https://ethereum.org/developers/docs/apis/json-rpc#eth_gasprice</a></p><p>The result will be the commission for your transaction.</p><pre>from web3 import Web3<br><br>node_provider = &quot;&quot; <br>web3 = Web3(Web3.HTTPProvider(node_provider))<br>wallet_address = &quot;&quot;<br>amount = 0.2 <br>transaction = {&#39;from&#39;: sender_address}<br>transaction[&#39;to&#39;] = recipient_address<br>transaction[&#39;value&#39;] = web3.eth.to_wei(amount, &#39;ether&#39;) # you should convert decimal format to wei<br>gas_amount_to_be_used = web3.eth.estimate_gas(transaction, &quot;latest&quot;)<br>gas_price = web3.eth.gas_price<br>commission = gas_amount_to_be_used * gas_price</pre><p><strong>Sending coins to another wallet</strong></p><p>Now, let’s proceed to sending a transaction. To do this, we need the following data:</p><ul><li>‘from’ and ‘to’ addresses</li><li>‘value’ — the amount of coins to be transferred, in wei format</li><li>‘nonce’ — the number of the latest block</li><li>‘gasLimit’ — the maximum amount of gas for this transaction, which you can obtain from estimateGas</li><li>‘maxPriorityFeePerGas’ — the priority fee for including transactions in the block. You can retrieve this through the API<a href="https://www.quicknode.com/docs/ethereum/eth_maxPriorityFeePerGas"> https://www.quicknode.com/docs/ethereum/eth_maxPriorityFeePerGas</a></li></ul><p>‘maxFeePerGas’ — the maximum amount of gas you are willing to pay. This calculation is crucial. Firstly, obtain the ‘base_fee_per_gas’ value from the latest block using this API:<a href="https://ethereum.org/developers/docs/apis/json-rpc#eth_getblockbyhash"> https://ethereum.org/developers/docs/apis/json-rpc#eth_getblockbyhash</a>. Then, calculate as follows:</p><ul><li>maxFeePerGas = base_fee_per_gas * 2 + maxPriorityFeePerGas. Why multiply by two? It’s an approximation that affects the speed at which your transaction is executed. You can adjust this value; increase it when the blockchain is overloaded and decrease it under normal conditions.</li><li>‘chainID’ — a constant value defined for each blockchain. You can find it here:<a href="https://ethereum.org/developers/docs/apis/json-rpc#eth_chainid"> https://ethereum.org/developers/docs/apis/json-rpc#eth_chainid</a></li></ul><p>You should input all these data into the transaction object and sign it with your private key. Here is a Python example:</p><pre>from web3 import Web3<br><br>node_provider = &quot;&quot; <br>web3 = Web3(Web3.HTTPProvider(node_provider))<br>sender_address = &quot;&quot;<br>recipient_address = &quot;&quot;<br>### Private key for your wallet must be created on the client side. <br>### This article describes how to do it in python https://web3js.readthedocs.io/en/v1.2.11/web3-eth-accounts.html<br>private_key = &quot;&quot; <br>latest_block = web3.eth.get_block(&quot;latest&quot;)<br>base_fee_per_gas = latest_block.baseFeePerGas <br>max_priority_fee_per_gas = web3.from_wei(web3.eth.max_priority_fee, &#39;ether&#39;) <br>max_fee_per_gas = (2 * base_fee_per_gas) + max_priority_fee_per_gas  <br>transaction_params = {<br>    &#39;from&#39;: sender_address,<br>    &#39;to&#39;: recipient_address,<br>    &#39;value&#39;: web3.to_wei(0.05, &#39;ether&#39;), <br>    &#39;nonce&#39;: web3.eth.get_transaction_count(sender_address),<br>    &#39;gas&#39;: 21000,  # Gas for the transaction, you can use the value from estimateGas method<br>    &#39;maxFeePerGas&#39;: max_fee_per_gas, # Maximum amount you&#39;re willing to pay <br>    &#39;maxPriorityFeePerGas&#39;: max_priority_fee_per_gas, # Priority fee to include the transaction in the block<br>    &#39;chainId&#39;: 67 # Ethereum ChainID <br>}<br>transaction = web3.eth.account.sign_transaction(transaction_params, private_key) # signing transaction with your private key<br>transaction_hash = web3.eth.send_raw_transaction(transaction.rawTransaction) # sending transaction to blockchain</pre><p>Here is a link with a comprehensive description of how to send coins between wallets: <a href="https://www.quicknode.com/guides/ethereum-development/transactions/how-to-send-transactions-on-ethereum-using-python">https://www.quicknode.com/guides/ethereum-development/transactions/how-to-send-transactions-on-ethereum-using-python</a></p><p>Please don’t be confused by the old approach to sending transactions, where only one gas fee parameter was used. This approach changed with the introduction of the EIP-1559 standard in August 2021. The reference:<a href="https://eips.ethereum.org/EIPS/eip-1559"> https://eips.ethereum.org/EIPS/eip-1559</a></p><p><strong>Estimating costs for sending tokens</strong></p><p>The logic is quite similar to what we have with tokens. The only difference is that you should use an additional field ‘data’ in the estimate_gas API. In this ‘data’ field, you should encode the value of the smart contract function ‘transfer’ along with the amount of tokens being sent. Here is an example:</p><pre>from web3 import Web3<br><br>node_provider = &quot;&quot;<br>web3 = Web3(Web3.HTTPProvider(node_provider))<br>smart_contract_address = &quot;&quot;<br>abi_smart_contract = &quot;&quot; # JSON presentation of smart contract<br>wallet_address = &quot;&quot;<br>amount = &quot;0.2&quot; # here you can put any value you are going to transfer<br>smart_contract = web3.eth.contract(address=smart_contract_address, abi=abi_smart_contract<br>transaction = {&#39;from&#39;: sender_address}<br>data = smart_contract.encodeABI(<br>    &quot;transfer&quot;,<br>    [sender_address, web3.to_wei(amount, &quot;ether&quot;)]<br>)<br>transaction[&#39;to&#39;] = self.contract_address<br>transaction[&#39;data&#39;] = data<br>gas_estimate = web3.eth.estimate_gas(transaction, &quot;latest&quot;)</pre><p><strong>Sending tokens to another wallet</strong></p><p>The steps are the same as for coin transactions. Additionally, you have to add a new field, ‘data’, to the transaction and use the smart contract address for the ‘to’ parameter. The transaction parameters would be:</p><pre>transaction_params = {<br>    &#39;from&#39;: sender_address,<br>    &#39;to&#39;: smart_contract_address,<br>    &#39;value&#39;: web3.to_wei(0.05, &#39;ether&#39;),<br>    &#39;nonce&#39;: web3.eth.get_transaction_count(sender_address),<br>    &#39;gas&#39;: 21000, <br>    &#39;maxFeePerGas&#39;: max_fee_per_gas<br>    &#39;maxPriorityFeePerGas&#39;: max_priority_fee_per_gas,<br>    &#39;chainId&#39;: 67<br>    &#39;data&#39; : abi_data<br>}</pre><p>where ‘abi_data’ can be get with the following python code</p><pre>smart_contract = web3.eth.contract(address=smart_contract_address, abi=abi_smart_contract<br>abi_data = smart_contract.encodeABI(<br>    &quot;transfer&quot;,<br>    [sender_address, web3.to_wei(amount, &quot;ether&quot;)]<br>)</pre><p><strong>Retrieving transaction history</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w21Mo9uj_O79QuMe" /><figcaption>Photo by <a href="https://unsplash.com/@theshubhamdhage?utm_source=medium&amp;utm_medium=referral">Shubham Dhage</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Each wallet shows not only balances but also transaction history, and there might be some problems with that. As you know, the blockchain is a sequential system; each subsequent block is based on the hash of the previous one. This means that transactions can only be found by iterating through all blocks from the latest to the first. Considering that on Ethereum a block is created every 10–20 seconds and it’s not very fast, iterating through the entire blockchain is not a viable option. However, there are other choices. The easiest one is to use an existing API from providers. Here are some examples:</p><p><a href="https://docs.moralis.io/web3-data-api/evm/reference/wallet-api/get-transactions-by-wallet">https://docs.moralis.io/web3-data-api/evm/reference/wallet-api/get-transactions-by-wallet</a></p><p><a href="https://www.quicknode.com/docs/ethereum/qn_getTransactionsByAddress_v2">https://www.quicknode.com/docs/ethereum/qn_getTransactionsByAddress_v2</a></p><p>Providers already cache transactions, allowing you to retrieve them in a short period of time.</p><p>You may also use blockchain explorers’ APIs, like<a href="https://etherscan.io/apis"> https://etherscan.io/apis</a>. They focus on providing any blockchain-related data. I believe this is the best choice.</p><p>However, be aware that the APIs for getting transactions for coins and tokens might differ.</p><p>If you want to implement your own solution, there are also a few options.</p><p>You may subscribe to Ethereum’s logs WebSocket API. Here is a link:<a href="https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub"> https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub</a></p><p>This API accepts different types of subscriptions:</p><ul><li>newHeads</li><li>logs</li><li>newPendingTransactions</li></ul><p>The ‘newHeads’ parameter provides a callback each time a new block is added to the blockchain. This might be useful for backend integration if you want more than just transactions, but it is still resource-consuming. Also, you will need a separate database to store all transactions for coins and tokens.</p><p>The ‘logs’ parameter can be used if you want to subscribe to logs of any blockchain address, and here smart contract interaction is useful. You just need to pass a ‘smart contract address’ parameter for the logs section. However, if your wallet supports many tokens, this could be resource-consuming and is only applicable to tokens.</p><p>Additionally, you may fetch token transactions with the eth_getLogs API. Here is a link:<a href="https://ethereum.org/developers/docs/apis/json-rpc#eth_getlogs"> https://ethereum.org/developers/docs/apis/json-rpc#eth_getlogs</a></p><p>It will be done quickly but requires experimentation. I will not dive into details. Here is a comprehensive guide on how to achieve that:<a href="https://hackernoon.com/how-to-generate-a-list-of-all-token-transactions-within-a-wallet"> https://hackernoon.com/how-to-generate-a-list-of-all-token-transactions-within-a-wallet</a></p><p><strong>Conclusion</strong></p><p>As you may have noticed, the most important thing is to understand the basics. Then, with just a few API calls and the purchase of a subscription, you can achieve complete crypto wallet integration in your application. Of course, more complex domains, such as DeFi, GameFi, etc., might present additional challenges, but this is relevant only to crypto-specific applications. I hope this article will be useful to you and provide solutions to the problems you might be struggling with.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0d05afe72f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>