<?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 Yan Kalbaska on Medium]]></title>
        <description><![CDATA[Stories by Yan Kalbaska on Medium]]></description>
        <link>https://medium.com/@yankalbaska?source=rss-5df141b1fcbe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EGEfo6sNoMFNqNs_</url>
            <title>Stories by Yan Kalbaska on Medium</title>
            <link>https://medium.com/@yankalbaska?source=rss-5df141b1fcbe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:03:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yankalbaska/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[Anatomy of a Hiring Manager Screen]]></title>
            <link>https://medium.com/@yankalbaska/anatomy-of-a-hiring-manager-screen-ed7392495afb?source=rss-5df141b1fcbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed7392495afb</guid>
            <category><![CDATA[team-management]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[recruiting]]></category>
            <category><![CDATA[hr]]></category>
            <category><![CDATA[hiring]]></category>
            <dc:creator><![CDATA[Yan Kalbaska]]></dc:creator>
            <pubDate>Mon, 22 Jan 2024 12:37:03 GMT</pubDate>
            <atom:updated>2024-02-14T09:26:11.488Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to get the most value out of a 45-minutes interview.</h4><p>When you build relatively small teams where everyone’s contributions are unique, it’s important to never skip a hiring manager screen. Remember, this is the first contact you have with your future direct report. Here’s how to make it valuable to both the candidate and the interviewer.</p><p><em>Disclaimer: this advice is based on 8 years of interviewing in the IT industry across various roles, as well as mentorship and teaching. Keep it aligned with the processes of the company, tailor it to your needs, or only use what resonates.</em></p><h4>1. Start with the expectations</h4><p>State who you are, what is the duration of the interview and what should the candidate expect. Confirm that they are okay with it. Though it sounds obvious, it sets the appropriate pace and creates a perception of being in a safe environment. When connected with the next part, it doubles the trust you can build within a few minutes.</p><h4>2. “Sell” the company</h4><p>Start by presenting your unit, the one the candidate will be working in. Explain the domain, how the team works, and what is expected from a high-performing employee. By starting first, you will lower the alertness of the candidate and let them adapt to your voice and language. You will also tune yourself into focusing on values you are most interested in.</p><blockquote>Be sure to define the key facets you’ll be looking into with this interview. They should correlate with the company values. For the hiring manager screen my personal preference is <strong>ownership, impact, and enthusiasm</strong>. For different panel sections it might be different, e.g. execution and complexity. You may be exploring similar scenarios in different sections, but by focusing on certain facets or dimensions you can get a much more realistic profile of the interviewee.</blockquote><h4>3. Assess the candidate’s career path</h4><p>Ask the candidate for a timeline of important career events and turns or let them go chronological and note professional experiences of interest where you can dive deeper. Do not interrupt the candidate just now, let them speak and finish the thought. Make a note and listen further, most of the time the candidate will continue with the experience that is of most importance to them. This is an additional clue for you to find peak challenging areas and expertise.</p><blockquote>Be present. Never try to multitask, be it Slack or a quick email response. At best you lose nuances of what the candidate is sharing, or worse you completely lose track of their answers and interview flow and have to ask again. This is a bad candidate experience which leads to lower acceptance rate and even negative reviews.</blockquote><figure><img alt="Sync first, and then reflect. Your reflection will differ from the original." src="https://cdn-images-1.medium.com/max/1024/0*HxKqrIFWwQmOi_nO" /><figcaption>Photo by <a href="https://unsplash.com/@josemreyes?utm_source=medium&amp;utm_medium=referral">José M. Reyes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>4. Dive deep</h4><p>It depends on the person, but some candidates stop as soon as naming their employers, roles and projects. It is not an indicator that they have nothing to share. Be proactive in asking about one or two of the mentioned experiences, going somtimes as far as five clarifying questions and keeping an eye on what the interviewee picks as relevant.</p><p>Familiarize yourself with the STAR method (situation, task, action, result) so that it becomes natural for you to get to the facts when they are hidden behind vague buzzwords or silence. Ask about specifically challenging areas and why they were such, what was the team composition and how the roles were distributed, what was solely done by the interviewee, how success was measured (prepare this list in advance).</p><h4>5. Have a set of gear-shifting questions ready</h4><p>If the interview seems to go wrong, don’t lose time. Deviate from the plan, even though it’s very important to be consistent with the process to prevent additional bias and keep your standards high. I do this once every 5–7 interviews. Ask slightly different questions or change the order of sections, follow the natural flow of the discussion, but continue to take notes.</p><h4>6. Be the candidate</h4><p>When the time comes for the interviewee to ask questions, be the candidate. Do your best to give detailed answers of how things really are. It’s a win-win: you build more trust as a manager even before hiring and it sets the candidate’s expectations right. Your ultimate success would not be measured as a number of hired employees, but as their impact on the company deliverables.</p><h4>7. Reflect</h4><p>After the interview is over, your notes will be a valuable source of information for your decision. While you were in sync with the candidate during the interview, now is the time to step back and see how reflection is different from the initial perception. If you deviated from the original process, did it give you a stronger signal and should you include this to be a part of the regular process.</p><p>But most importantly, keep you screen strict enough to cut on further interviews (for both your colleagues and the candidate) and fair enough to allow room for bias mitigation. I aim at 80–85% approved offers after the screen.</p><h4>8. Provide feedback</h4><p>Think of the candidate as your customer that always writes a review. I had multiple cases of interviews giving the ripple effect of spreading word and bringing in new candidates.</p><p>If you reject a candidate during screening, always provide a valid reason that you or the recruiting team can share. Imagine that a year has passed, the candidate worked really hard and were able to resolve the issue, would you hire them now?</p><p>So what is the recipe for a perfect hiring manager screen?<strong> </strong>Ingredients are below, but you are the chef to mix them wisely:</p><ul><li>3 minutes — meeting and setting interview expectations</li><li>7-12 minutes — what you do, how you do it and what is expected</li><li>25 minutes — candidate’s professional experience with a deep dive</li><li>5–10 minutes — questions from the candidate.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed7392495afb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How “clean” should your architecture be?]]></title>
            <link>https://medium.com/@yankalbaska/how-clean-should-your-architecture-be-b2157eeea737?source=rss-5df141b1fcbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2157eeea737</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[game-engine]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[clean-architecture]]></category>
            <category><![CDATA[gamedev]]></category>
            <dc:creator><![CDATA[Yan Kalbaska]]></dc:creator>
            <pubDate>Thu, 14 Dec 2023 19:10:53 GMT</pubDate>
            <atom:updated>2023-12-20T17:48:27.608Z</atom:updated>
            <content:encoded><![CDATA[<h4>Skip excessive mappers and abstractions by making “clean” a little “dirty”.</h4><p>If you’ve tried implementing <a href="https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html">clean architecture</a> in real life apps, you know how tricky it might be. You end up with a codebase that is actually less readable because of too many classes and abstractions.</p><p>The key is to find a balance of keeping maintainability and cutting out unnecessary bloat. It will be different for every project because different parts are required to stay flexible and therefore less coupled, but providing a separate mapper layer just for the sake of “cleanliness” might be an overkill.</p><blockquote>This article is the 2nd part of <a href="https://medium.com/better-programming/clean-architecture-in-game-development-e57542a96e5e">building a game using clean architecture</a>. 1st part covers the theoretical approach, is much more detailed, and is completely “clean”. So it’s best to read that one first. This piece continues as an overview of final implementation, including decisions on coupling, while making code flexible enough to become not just a game, but a game engine.</blockquote><p>Let’s consider cleanliness by examining a single example. Below is a class diagram of the game engine with every class included. Even though there are dependencies that one might find too coupled, you’ll barely need to change the classes outside of <em>logic</em> and <em>presentation</em> groups. <em>Framework</em> and <em>adapter</em> code stays untouched until you need to modify the engine itself, but not when you modify app/game rules or object behaviors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O7TVQv60OGOn0hdbmLAxYA.png" /><figcaption>Class dependency diagram</figcaption></figure><p>Worth noting is a group of <em>entities or base classes</em>. Those are not data objects, but merely types, and it corresponds with the idea that they rarely change as well. Data (game) objects belong to the <em>logic</em> group, because they define behaviors of the game.</p><p>Drawing diagrams allowed me to validate the design and understand dependencies for future modifications. I extracted base <strong>GameObjectCollection </strong>class<strong> </strong>to hide its operations (within the class) and simplify adding new types of game objects to the collection. On the other hand, it also forced me to create an extra mapper class (<strong>GameObjectType</strong>)<strong> </strong>to prevent passing game object dependency into <strong>Layouter</strong>. But it didn’t add real value when implemented, and I removed it as a blunt wrapper for this specific design. You can see the above changes in the PRs and the full engine code in a <a href="https://github.com/kujunda-seda/new-kingdoms/">GitHub repo</a>.</p><p>I encourage you to experiment, question architectural patterns, and find what works for you and your project. Architecture is sometimes defined as decisions that are hard to revert, and as such, taking weighted decisions and anticipating future changes is a valuable and fun skill to master.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2157eeea737" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Self-Guided Engineering Teams]]></title>
            <link>https://medium.com/better-programming/building-self-guided-engineering-teams-ed39e73d91e2?source=rss-5df141b1fcbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed39e73d91e2</guid>
            <category><![CDATA[team-management]]></category>
            <category><![CDATA[leadership-skills]]></category>
            <category><![CDATA[leadership-coaching]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Yan Kalbaska]]></dc:creator>
            <pubDate>Sun, 03 Sep 2023 22:33:43 GMT</pubDate>
            <atom:updated>2023-09-04T19:45:44.645Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>with a focus on alignment, ownership, and trust.</em></h4><p>Having read the article on <a href="https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/yes-you-can-measure-software-developer-productivity">measuring developer productivity</a> by McKinsey &amp; Company as well as a few follow-ups, with the most in-depth one being the <a href="https://newsletter.pragmaticengineer.com/p/measuring-developer-productivity">two-part response</a> by Gergely Orosz and Kent Beck, I deep-dived into what’s behind the urge of measurement — and found out that it’s the need to solve profound team leadership challenges.</p><p>Authors offer alternative measurement models as well as provide very specific evidence of why measuring and incentivizing effort, output, outcome, and impact may introduce bigger risks than when not measuring those. But the question stays valid, and if there is a question “how,” there should first be a question of “why.”</p><p>So I asked myself:</p><h3>Why measure developer productivity?</h3><p>There can be several reasons for that, originating either from a C-level executive or an engineering manager themselves:</p><ul><li>Relative cost of engineering is higher than expected</li><li>The need to maintain a high-performing team</li><li>Understanding which teams to invest in and scale</li><li>Transparency of individual contribution to the team’s success</li><li>Providing relevant growth opportunities for engineers.</li></ul><p>The list is not exhaustive, but I noticed the commonalities in that all of those challenges have a similar solution: not interfering with the subsystem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sIWbaGDhmc8xMC8q" /><figcaption>Photo by <a href="https://unsplash.com/@kdghantous?utm_source=medium&amp;utm_medium=referral">Karim Ghantous</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Formal measurements shift the focus of individual contributors from generating business value to gaming the system, as well as adding a burden of constant and precise control by the managers that are requesting it. It creates a race between introducing new KPIs and adapting to those with the least effort. This is also true for middle managers when the measurement is requested by the senior leadership.</p><h3>The closed system metaphor</h3><p>Imagine that an engineer is a closed system / a cell / a black box (system level 0). A team of engineers with their manager is also a closed system (system level 1). On the next level, a manager of multiple teams + the teams themselves form a new system (system level 2), and this system is led by an executive (together forming system level 3).</p><figure><img alt="Interference and alignment of closed systems" src="https://cdn-images-1.medium.com/max/930/1*ifGU-NMrB-k1llHl_L17rg.png" /></figure><p>When a manager (system level 2) introduces measurement for the teams (system level 1), they interfere with how the system operates and thus downshift into system level 1.</p><p>Being interfered with, aka micromanaged, teams (system level 1) lose their ability to self-organize, create efficient processes, and deliver company value in the most effective way possible. The same idea can be projected into higher levels. This makes introducing KPIs a short-term remedy with delayed strategic side effects.</p><p>On the other hand, if system borders are respected and the manager sets and validates goals, i.e. performs constant <em>alignment</em> of expectations and lets teams do the work, fail, learn, iterate, and deliver — stronger teams with great <em>ownership</em> are formed, and no control is required. Outer system managers can address the above questions directly to the team manager (lower level systems) without interfering with those:</p><ul><li><em>Relative cost of engineering is higher than expected<br></em><strong>What do we lose if we downsize the team?</strong></li><li><em>The need to maintain a high-performing team</em><strong><br>Who on the team is the least performant? How fast are they developing? Have you considered replacing them?</strong></li><li><em>Understanding which teams to invest in and scale</em><br><strong>How will the impact of the team grow if we bring in additional headcount?</strong></li><li><em>Transparency of individual contribution to the team’s success</em><br><strong>Who is currently contributing to the team’s success most and in which way?</strong></li><li>Providing relevant growth opportunities for engineers<br><strong>Do all engineers have a growth plan and are they happy with it?</strong></li></ul><h3>How is that possible to achieve?</h3><p>Leading teams is a challenge: goals get misinterpreted, expectations mismatch, core values differ, managers fail, engineers fail, and market fit changes. Measuring productivity (not to be mistaken with measuring and calibrating performance) seems like a silver bullet to create a transparent process that scales. It does, but with downsides.</p><p>Companies are made of people, and the only way to constantly align and cultivate ownership is by <em>building trust</em>. There is no way to ask the above questions and rely on team’s manager answers without trust, at least some level of trust. Of course, overrides happen and interference should be exercised from time to time, but it is always good to keep in mind: if a system fails — it’s the manager of this system who needs help, not their subsystems (or engineers).</p><p>Building trust and exercising alignment are not straightforward investments, and are hardly measurable. But this is what differentiates great teams in the longer term.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed39e73d91e2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/building-self-guided-engineering-teams-ed39e73d91e2">Building Self-Guided Engineering Teams</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OOP in Lua]]></title>
            <link>https://medium.com/better-programming/oop-in-lua-9962e47ed603?source=rss-5df141b1fcbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/9962e47ed603</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[lua]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Yan Kalbaska]]></dc:creator>
            <pubDate>Tue, 25 Jul 2023 22:19:08 GMT</pubDate>
            <atom:updated>2026-03-09T00:33:10.855Z</atom:updated>
            <content:encoded><![CDATA[<h3>Object-Oriented Programming in Lua using Annotations</h3><p><em>Despite being a scripting and dynamically typed language, Lua possesses enough flexibility to do object-oriented programming effectively, especially using the power of annotations. This primer explains how core OOP concepts can be implemented. I’m sure that understanding the why behind each line will help you feel confident about the code you write and do it fast. But you can also skip straight to the “Full-featured usable class template” section at the very end of the article.</em></p><figure><img alt="Because the new language was a modified version of Sol (sun), a friend at TeCGraf suggested the name Lua (moon, in Portuguese), and Lua was born. — from https://www.lua.org/history.html" src="https://cdn-images-1.medium.com/max/1024/0*AzdZiI8FIjt8set6" /><figcaption>Photo by <a href="https://unsplash.com/@tegethoff?utm_source=medium&amp;utm_medium=referral">Mark Tegethoff</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>There is more than one approach to OOP in Lua. Two of the most common ones are using functions and tables — both are present in the <a href="http://www.lua.org/pil/16.html">official Lua reference</a>. To choose which approach fits you best, figure out what is important for you when writing code. I initially started using the function-based approach because it provided <a href="https://www.lua.org/pil/16.4.html">strict privacy benefits</a>: all properties are private and they can only be accessed via getter and setter functions, which are returned as object interface. A class definition will look like this (you can skip this example and continue reading):</p><pre>local ClassName = {} -- package definition, should be the same as file name<br><br>function ClassName.new(arg) -- constructor with optional arguements<br>    -- Properties: <br>    -- All are private and encapsulated in &quot;self&quot;, init phase<br>    local self = {<br>        objectPrivateProperty = arg<br>    }<br><br>    -- Implementation:<br>    -- Create getters and setters to manipulate properties<br>    local objectMethod = function()<br>        -- access properties with &quot;self.objectPrivateProperty&quot;<br>    end<br><br>    -- Interface / Instance methods:<br>    -- Only return a list of public methods from the Implementation section<br>    return {<br>        objectMethod = objectMethod,<br>    }<br>end<br><br>-- Class methods<br>function ClassName.classMethod()<br>end    <br><br>return ClassName -- the preferred way to return a package in Lua</pre><p>But later, by taking advantage of annotations and code completion in <a href="https://github.com/LuaLS/lua-language-server">Lua Language Server</a> (available for VSCode, NeoVim, or as a CLI), I found that table-based approach provides better readability, auto-completion, and type awareness. I’ll explain how this can be done with code examples.</p><h3>Basic class</h3><p>Lua is prototype-based, meaning there is no separate class definition. A class is just a <em>prototype</em> object on which other instances are based. Before adding more complexity, let’s see what’s happening here line by line.</p><pre>local BaseClass = {}<br><br>function BaseClass:new()<br>    local newObject = setmetatable({}, self)<br>    self.__index = self<br><br>    -- Object initialization<br><br>    return newObject<br>end<br><br>return BaseClass</pre><p>A class definition resides in its own file, with the filename being the same as the class name + extension, in our case BaseClass.lua. This allows importing the class, or more broadly a package, within other files.</p><h4>Using the basic class</h4><p>We can create an object of this class in main.lua file by first (1) importing it and then (2) invoking its constructor like this:</p><pre>local BaseClass = require &quot;BaseClass&quot; -- (1) import the class<br><br>local baseObject = BaseClass:new() -- (2) create new instance of class</pre><p>We use local keyword to limit the scope. Skipping local defines a variable as global. It’s a good practice to always use local for imported packages and only assigns global variables to specific bits of data.</p><h4>1. Class definition</h4><p>First, we define the package in the local scope by creating an empty table {} . Objects, and therefore classes, are tables in Lua. Tables are similar construct to dictionaries or maps in other languages. Later we will add public properties within this table: local BaseClass = {}</p><h4>2. Constructor function</h4><p>Next we create a constructor function BaseClass:new(). We can add optional initialization parameters inside parenthesis.</p><ul><li>Using colon: here is purely syntactic sugar for passing the object itself as a first parameter, so that it can be used within the function scope. An interchangeable notation for this is function BaseClass.new(self).</li><li>Adding BaseClass. before the function name defines function attribution to the class/package.</li></ul><h4>3. Setting a metatable</h4><p>Each table (and each object) in Lua has a metatable used to modify table’s behavior. This mechanism is used for objects to be able to find and call methods defined in the class definition — technically being a separate table — and also to implement inheritance (a full section is be dedicated to inheritance below).</p><p>To assign a metatable to a table/object you call setmetatable({}, self) passing the table as the 1st parameter and its metatable — as the 2nd. Because setmetatable returns the table back, we can combine creating the object local newObject = {} and setting its metatable in one line:<br>local newObject = setmetatable({}, self).</p><p>After that operation all our newly created <em>objects</em> will have their <em>class</em> as a metatable. The next paragraph explains why this is important.</p><h4>4. Configuring method indexing</h4><p>Lua uses the__index key of the metatable to search for method definitions that were not found in the object table. We need to set __index value to point to our class BaseClass.</p><p>This is done with self.__index = self. As this line is not object-specific, it can be moved from the constructor function into the package/class scope, but I personally find it less readable and requiring to change the class name for every class. Lua docs contain both variants: <a href="https://www.lua.org/pil/16.1.html">1st</a> and <a href="http://lua-users.org/wiki/ObjectOrientationTutorial">2nd</a>, so there is no hard rule here. The code below will also be valid:</p><pre>local BaseClass = {}<br><br>BaseClass.__index = BaseClass<br><br>function BaseClass:new()<br>    local newObject = setmetatable({}, self)<br>    ...</pre><p>__index can also point to a function with custom behavior, e.g. searching only for specific signatures, but when it points to a table, it iterates over all table keys to find the appropriate method declaration.</p><h4>5. Returning the object</h4><p>After the object initialization, i.e. when parameters are passed into the constructor and private properties are initialized, we return the newly created object with return newObject.</p><h4>6. Returning the package</h4><p>The preferred way in Lua to pass a package via require is by returning it at the end of file with return BaseClass. So in main.lua file:</p><ul><li>BaseClass <em>class</em> is what we get with require &#39;BaseClass&#39;</li><li>BaseClass <em>object</em> is what we get with BaseClass:new()</li></ul><p>Now that we are done with the basic class definition, let’s see how OOP concepts gradually form its shape into a usable example.</p><h3>Encapsulation</h3><p>Lua doesn’t provide built-in access modifiers, but you can hide implementation details with class annotations. You will not get compiler errors for accessing private properties and methods, but neither will they show up in code completion and their improper use will issue verbose warnings.</p><pre>--- Basic class purpose<br>---@class BaseClass<br>---@field private _privateProperty boolean<br>---@field publicProperty integer<br>---@field anotherPublicProperty boolean<br>local BaseClass = {}<br><br>---@private<br>function BaseClass:_privateMethod()<br>end<br><br>function BaseClass:publicMethod()<br>end<br><br>return BaseClass</pre><h4>Properties</h4><p>Please note that you mark private properties with the private modifier in the annotation, and you don’t add neither within {}.</p><blockquote><em>Note: While you can add public properties as BaseClass table elements, you have to initialize the properties and it will only work for primitive values.</em></blockquote><pre>local BaseClass = {<br>    publicProperty = 0,<br>    anotherPublicProperty = false<br>}</pre><p>I suggest that you rely on annotation only in class delcaration and initialize both public and private properties later in the constructor, which also will allow you to use reference-type properties with inheritance, because in constructor can be initialized on a subclass’s instance (more on it later). Like so:</p><pre>---@field publicProperty integer<br>local BasicClass = {}<br><br>function BasicClass:new()<br>    local newObject = setmetatable({}, self); self.__index = self<br><br>    newObject.publicProperty = 0<br><br>    return newObject<br>end</pre><h4>Methods</h4><p>Methods are public by default. For private methods, you add ---@private above the function declaration (before, after or anywhere in between other annotation lines):</p><pre>--- Adds two values<br>---@param a integer<br>---@param b integer<br>---@return integer result<br>---@private<br>function BaseClass:_add(a, b)<br>    return a+b<br>end</pre><h4>Type annotations</h4><p>In addition to modifiers, you also specify property types and full method signatures, which Lua Language Server uses to check for type consistency and then generates IDE warnings where necessary. <strong>Use annotations for functions and local variables as well to prevent unwanted errors and save time debugging.</strong></p><p>Well-annotated code will save you a lot of time when programming in a dynamically typed language like Lua, especially if you are used to static-type compiler checks. Here is the full <a href="https://luals.github.io/wiki/annotations/">LuaLS guide for annotation</a>.</p><p>If you’ve defined classes using the approach presented in this primer, you can also create a function to check the instance’s class (including subclasses) and cast it:</p><pre>local function member_of_class(object, class)<br>    while object do<br>        object = getmetatable(object)<br>        if object == class then<br>            return true<br>        end<br>    end<br>    return false<br>end<br><br>...<br><br>if member_of_class(aObject, TheClass) then<br>    ---@cast aObject TheClass<br>    aObject:object_method()<br>end</pre><h3>Inheritance</h3><p>Inheritance is implemented by using the metatable mechanism described above. Adding annotation provides proper code completion and warnings.</p><h4>Basic inheritance</h4><p>Notice the changes: we pass object as a constructor parameter. And then, if it is not nil (object or {}), we use it to set metatable, initialize, and return.</p><pre>---@class BaseClass<br>local BaseClass = {}<br><br>---@param object table? Required when subclassing `BaseClass`<br>---@return BaseClass <br>function BaseClass:new(object)<br>    local newObject = setmetatable(object or {}, self)<br>    self.__index = self<br><br>    return newObject<br>end<br><br>return BaseClass</pre><p>This change is needed so we can create SubClass with a syntax similar to BaseClass and add new properties. In the snippet below new {} is equal syntax to new({}) as it’s the last passed parameter. We do not add object parameter in subclass constructor only because we don’t plan to subclass it further, but we can if needed.</p><p>Then we reuse BaseClass’s constructor specifically to pass SubClass’s instance to it, so that all BaseClass properties will be initialized in it, not in the shared BaseClass as would happen by default. Note that also need we use dot notation to pass the instance self and cast it to SubClass manually.</p><blockquote>Note: If we would use colon-style syntactic sugar BaseClass:new it would be passing BaseClass itself as the first parameter and create shared reference-type properties, which is undesired behavior.</blockquote><pre>local BaseClass = require &quot;BaseClass&quot;<br><br>---@class SubClass:BaseClass<br>local SubClass = BaseClass:new {}<br><br>---@return SubClass<br>function SubClass:new()<br>    local newObject = BaseClass.new(self) --[[@as SubClass]]<br><br>    return newObject<br>end<br><br>return SubClass</pre><h4>Adding properties</h4><p>To add new properties, we add those as @field annotations. Then we initialize them in the constructor <em>(see Properties section above)</em>. First the constructor creates index and adds base properties to the passed self instance <em>(see BaseClass’s constructor code explanation above)</em> and then intializes newProperty in it.</p><pre>...<br><br>---@class SubClass:BaseClass<br>---@field newProperty string<br>local SubClass = BaseClass:new {}<br><br>...<br><br>---@return SubClass<br>function SubClass:new()<br>    local newObject = BaseClass.new(self) --[[@as SubClass]]<br><br>    newObject.newProperty = &quot;&quot;<br><br>    return newObject<br>end</pre><h4>Adding methods</h4><p>Adding new methods in a subclass is straightforward:</p><pre>...<br><br>function SubClass:addedMethod()<br>end<br>...</pre><h3>Polymorphism</h3><p>For inherited classes, you can override the method implementation of the base class by just providing the method with the same signature or a default implementation of a prototype class — as a form of protocol conformance.</p><pre>--- _Prototype_ class<br>---@class BaseProtocol<br>local BaseProtocol = {}<br><br>---@return BaseProtocol <br>function BaseProtocol:new(object)<br>    local newObject = setmetatable(object or {}, self)<br>    self.__index = self<br>    return newObject<br>end<br><br>function BaseProtocol:requiredMethod1() end<br>funciton BaseProtocol:requiredMethod2() end<br><br>return BaseProtocol</pre><p>Now we create a ConformingClass with the same mechanism as a subclass and overload a method with a fallback to default empty implementation:</p><pre>...<br><br>local ConformingClass = BaseProtocol:new {}<br><br>...<br><br>function ConformingClass:requiredMethod1()<br>    -- Implementation<br>end<br><br>...</pre><p>The benefit of this is that you can now safely call requireMethod1() on any class conforming to BaseProtocol.</p><p>With annotations, you can also use generics — functions with type-agnostic parameters (<a href="https://luals.github.io/wiki/annotations/#generic">WIP</a>).</p><h3>Abstraction</h3><p>Having already mentioned encapsulation as a mechanism to hide excessive data and implementation details, and therefore provide a level of abstraction on how objects operate, I wanted to highlight just one more practical aspect of abstraction — dependency inversion.</p><h4>Dependency inversion</h4><p>In order to prevent higher-level classes (more abstract) from knowing about low-level implementation by other classes, they should only rely on abstractions. This means that a more abstract class defines a so-called <em>protocol </em>or<em> interface</em>, that it will trigger a message for some event, but this abstract class doesn’t know (and doesn’t need to know) if and how this message will be processed.</p><p>This can be achieved by overriding a default method implementation as described above in the Polymorphism section or, more commonly, by callbacks.</p><p>Callbacks are functions passed as parameters to other functions or objects, which can be called when a certain event happens. Callback functions cannot have parameters of their own in Lua. Workarounds exist passing arguments as a separate parameter together with the callback itself, but it is not necessarily the best option. Let’s see how a callback can be triggered and ask for more context from the triggering higher-level class.</p><p>A higher-level class knows nothing of its implementing class. All it knows is that it will call a <em>callback</em> when the <em>listener</em> is triggered:</p><pre>-- High-level class code<br>function HighLevelClass:registerObjectListener(listener)<br>    self.triggerListener = listener<br>end<br><br>function HighLevelClass:processingEvent()<br>    self:triggerListener()<br>end</pre><p>While a lower-level class creates a function to process the trigger and request more data from higher-level class, and then passes that function as a callback.</p><pre>-- Low-level (implementing) class code<br>function ImplentationClass:registerForEvent()<br>    local processEvent = function()<br>        self.higherLevelObject:requestDetails()       <br>    end<br>    self.higherLevelObject:registerObjectListener(processEvent)<br>end</pre><p>Using local processEvent = function() is equivalent to local function processEvent(), because functions are first-class values. I’m using a different notation here to stress that we further pass processEvent as a parameter. Please note the absence of parenthesis after the function name, otherwise, it would have got called and we would have passed its return value instead of the function itself.</p><p>We could further improve the code and make the listener optional and check it before calling from the higher-level class, to prevent it from throwing an exception in case no callback is provided.</p><h3>Full-featured usable class template</h3><p>To make the code as close as possible to the classes you will use, I’ve split BaseClass and SubClass in two separate files accordingly. It is not required but removes complexity as classes tend to grow.</p><h4>BaseClass.lua</h4><pre>--- Describe class purpose<br>---@class BaseClass<br>---@field publicProperty1 integer<br>---@field publicProperty2 string<br>---@field private _privateProperty1 integer<br>local BaseClass = {}<br><br>---@param object table? Required when subclassing `BaseClass`<br>---@return BaseClass <br>function BaseClass:new(object)<br>    local newObject = setmetatable(object or {}, self)<br>    self.__index = self<br><br>    -- Initialization<br>    newObject.publicProperty1 = 0<br>    newObject.publicProperty2 = &quot;&quot;<br>    newObject._privateProperty1 = 0 <br><br>    return newObject<br>end<br><br>---@private<br>function BaseClass:_privateMethod()<br>end<br><br>--- Method purpose<br>---@param arg1 integer<br>---@return boolean<br>function BaseClass:baseMethod(arg1)<br>    return false<br>end<br><br>function BaseClass:overriddenMethod()<br>end<br><br>return BaseClass</pre><h4>SubClass.lua</h4><pre>local BaseClass = require &quot;BaseClass&quot;<br><br>---@class SubClass:BaseClass<br>---@field newPublicProperty boolean<br>---@field private _newPrivateProperty boolean<br>local SubClass = BaseClass:new {}<br><br>local CONSTANT_1 = 0<br>local CONSTANT_2 = &quot;default&quot;<br><br>---@return SubClass<br>function SubClass:new()<br>    local newObject = BaseClass.new(self) --[[@as SubClass]]<br><br>    -- Initialization<br>    newObject.newPublicProperty = false<br>    newObject._newPrivateProperty = false<br><br>    return newObject<br>end<br><br>--- Class function purpose<br>function SubClass.classFunction(arg1)<br>end<br><br>--- Method purpose<br>function SubClass:newMethod()<br>end<br><br>function SubClass:overriddenMethod()<br>    -- New implementation<br>end<br><br>return SubClass</pre><p>This code contains two new concepts, that were not explained above:</p><h4>Constants</h4><p>Uppercase variables are not technically constant and protected. As a workaround, you can put those in a table and make it read-only (out of the scope of this article).</p><h4>Class function</h4><p>Notice the difference in notation with a dot SubClass.classFunction, meaning that self object is not passed through and it is not accessible in the scope of this function. Such a function doesn’t (need to) know about the instance of the object it was called upon.</p><h3>Final notes</h3><h4>File structure</h4><p>This might not seem important, but having the same order of sections in each class provides consistent code readability. The only rule is to define an entity — be it a package, variable, or function — before referencing it. The rest is completely up to you. The following structure works well for me:</p><ol><li>Required imports</li><li>Class definition (with full annotation)</li><li>Constants</li><li>Constructor (with public and private property init)</li><li>Class functions</li><li>Private methods</li><li>Public methods</li><li>Package return</li></ol><h4>Annotations</h4><p>Keep annotations descriptive, but concise. Although you can go multi-line, I personally find it best to write one-line descriptions and provide full references separately, e.g. in a GitHub wiki. To learn about the full syntax and capabilities of annotations, visit the <a href="https://luals.github.io/wiki/annotations/">Lua Language Server Wiki</a>.</p><p>This article is a part of the <a href="https://medium.com/@yankalbaska/list/create-video-games-with-your-own-game-engine-b07605f0d120">series on game development</a>. In addition to this primer, it covers the <a href="https://medium.com/@yankalbaska/clean-architecture-in-game-development-e57542a96e5e">theory and practice of developing a game engine</a>. It also includes public domain GitHub repos: a <a href="https://github.com/kujunda-seda/template-love-game/">template repo to create iOS game</a> (little to no experience needed) and a <a href="https://github.com/kujunda-seda/new-kingdoms">minimalist game engine</a> (intermediate/advanced coding proficiency) you can use as is or fork and modify to your needs.</p><p><strong>UPD:</strong> The article was last modified 9 March 2026, unifying the constructors to support reference-type inherited properties and fixing a few code typos. When creating new classes I usually start with a more concise notation and also include a permanent reference to this primer (<a href="http://tinyurl.com/oop-lua">tinyurl.com/oop-lua</a>) in the constructor to provide syntax consistency and deeper understanding when needed, feel free to use the same pattern:</p><pre>---@return BaseClass <br>function BaseClass:new()<br>    -- Lua code to find object &amp; inherited methods (tinyurl.com/oop-lua)<br>    local newObject = setmetatable({}, self); self.__index = self<br><br>    -- [Replace with custom object initialization]<br><br>    return newObject<br>end</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9962e47ed603" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/oop-in-lua-9962e47ed603">OOP in Lua</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clean Architecture in Game Development]]></title>
            <link>https://medium.com/better-programming/clean-architecture-in-game-development-e57542a96e5e?source=rss-5df141b1fcbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/e57542a96e5e</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[löve]]></category>
            <category><![CDATA[clean-architecture]]></category>
            <dc:creator><![CDATA[Yan Kalbaska]]></dc:creator>
            <pubDate>Mon, 01 May 2023 23:32:00 GMT</pubDate>
            <atom:updated>2023-12-14T19:40:48.602Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>4 lessons learned on the way to adopt clean architecture in a game created from scratch.</em></h4><p>Going back to game development, I created a simple prototype using the <a href="https://love2d.org/">LÖVE</a> framework. LÖVE is a minimalistic game framework and not an engine, as e.g. Unity is. The main drawback of Unity for me was a very limited palette of game mechanics supplied as a WYSIWYG editor.</p><p>My goal was to create a working iOS device prototype each week. It was not following any strict architectural patterns, I had no prior experience with the Lua language (and its limited OOP support), and I was mastering it along the way. After I had a working game in 2 weeks, I rendered some of my own feedback for improvements as well as showing the game to others. Ideas were competing in my head, and I wanted to keep the speed of iteration with a growing codebase. That’s how I ended up adopting <a href="https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html">Uncle Bob’s clean architecture concept</a> in my game.</p><p>I experienced a few “aha” moments while trying to draw class dependencies and separate the layers. Coming from the background of rigid UIKit on iOS, it took me a while to rethink how independent layers fit into boilerplate app code or a non-engine-based game. Those might come naturally to you after reading the original piece, but along with the minimalistic full-cycle app (see diagram), I wanted to highlight those as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dzg-GyGkAW3xQ2qcEcDfuQ.png" /></figure><p>I intentionally stripped all the game-specific classes from the diagram and only left the necessary life cycle events to understand the flow of control and instance creation. For example, there might be many more connections within each layer, there may be a separate timer (for me the default LÖVE timer event worked), more observers than the Presenter listening to game objects changed (dashed line on the diagram), and many more complexities of game design.</p><p>This is in no way a final design, but also not an out-of-context demonstration of clean architecture layers. It integrates nicely into a UI framework, be it LÖVE in Lua or UIKit in Swift. More than that, this integration <em>is</em> part of that architecture.</p><h3>Lesson #1 — <strong>Do not try to isolate UI framework code from game code in the first place.</strong></h3><p>It will all work together, and it starts with the framework action, not the game engine. See how in the diagram it all starts with love.load callback, similarly application: didFinishLaunchingWithOptions: on iOS.</p><p>While coding iOS games and apps, I always wanted to separate my code from boilerplate UIApplicationDelegate and UIViewController methods. This is not the intent. If designed correctly, core layers (Use cases and Entities) will never know about the specifics of UIKit or LÖVE callbacks and can be easily ported to different platforms. The UI Framework layer is, on the other hand, the closest to user interaction, and as such is the most constrained by the hardware and least reusable.</p><h3>Lesson #2 — <strong>You will write meaningful code in each of the isolated layers.</strong></h3><p>And each of them has a clearly defined purpose that makes it easy to keep the code in place. All four layers contain the code of your app. <em>Framework</em> provides UI, <em>Presenter</em> implements specific user interaction, including its visual / motion component, which is a very important differentiator for a game, <em>Use case</em> serves complex interconnecting rules, and <em>Entities</em> provide building blocks, containing encapsulated logic. At the top of the diagram above you can see an unambiguous description of layer responsibilities. The only obstacle to using those — is Lesson #3.</p><h3>Lesson #3 — <strong>The challenge is to respect the layer borders and flow of control.</strong></h3><p>It’s<strong> </strong>okay to reference and own objects within the layer as soon as they serve the same layer purpose. This is an easily reversible choice. It gets more complex as you cross-layer borders. This is where you should follow <a href="https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html#the-dependency-rule">the dependency rule</a> and design interfaces appropriately. In the end, it will provide the main benefit of clean architecture — maintainability of the codebase. Although this concept is key to clean architecture and many other architectures, it was not the purpose of this article to re-explain it.</p><h3>Lesson #4 — <strong>Run loop and observers are the fundamental concepts that make any app closer to the real-world object simulation.</strong></h3><p>Spend time understanding those. No OOP is magic and just works. Behind the scenes, there is always a service, daemon, loop, dispatch queue, or notification center running and registering listeners that can respond to events and messages between objects. If you feel that you lack that knowledge, I encourage you to learn how that is done in the framework you use, e.g. this is <a href="https://love2d.org/wiki/love.run">how it operates in LÖVE</a>.</p><p>I wanted to provide you with an overview of how clean architecture can be applied to programming a game and help you avoid the complications I faced while doing it from scratch. There is much more to explore, including <a href="https://martinfowler.com/eaaDev/uiArchs.html">various GUI architectures</a>, if you are interested, but remember that <em>there is no perfect architecture, there is only one that solves a specific problem</em>.</p><p>If you want to see how the story unfolds in the final implementation please proceed to the <a href="https://medium.com/@yankalbaska/how-clean-should-your-architecture-be-b2157eeea737">Part 2</a> (and it’s probably not what you expect:).</p><p><strong>UPD: </strong>This article is a part of the <a href="https://medium.com/@yankalbaska/list/create-video-games-with-your-own-game-engine-b07605f0d120">series on game development</a>. In addition to this guide, it has a <a href="https://medium.com/@yankalbaska/oop-in-lua-9962e47ed603">full primer on object-oriented programming in Lua</a>. It also includes public domain GitHub repos: a <a href="https://github.com/kujunda-seda/template-love-game/">template repo to create iOS game</a> (little to no experience needed) and a <a href="https://github.com/kujunda-seda/new-kingdoms">minimalist game engine</a> (intermediate/advanced coding proficiency) you can use as is or fork and modify to your needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e57542a96e5e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/clean-architecture-in-game-development-e57542a96e5e">Clean Architecture in Game Development</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hypotheses and Prototyping for Programmers]]></title>
            <link>https://medium.com/@yankalbaska/hypotheses-and-prototyping-for-programmers-67fea42f2a55?source=rss-5df141b1fcbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/67fea42f2a55</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[efficiency]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding-style]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Yan Kalbaska]]></dc:creator>
            <pubDate>Wed, 23 Jan 2019 09:39:38 GMT</pubDate>
            <atom:updated>2023-11-28T14:32:38.121Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>or how to efficiently fix bugs and overcome blocks.</em></h4><p><strong>Scenario 1. </strong>The first step you take when you have a defect is start debugging.<br><strong>Scenario 2. </strong>You approach a developer task by starting to code and letting your intuition step in to handle the bigger picture.</p><p>What do both situations have in common?</p><blockquote><strong>No prototyping</strong></blockquote><p>When no quick fix is available and you’ve already spent 10 hours looking for a solution, you understand the approach was inefficient and take a step back.</p><p>I would like to share my experience applicable to solving almost any programming issue and especially useful for complex ones. I first discovered it in Boston Consulting Group where employees generate possible scenarios before carrying out the costly research. This approach also perfectly works for coding . Here is the core idea:</p><blockquote>Defer the actual work until you are sure it will have the most impact on the result.</blockquote><p>I will summarize the method in steps to let it better sit in your memory. And as I was talking about programming — let’s take a bug fix as an example for implementing the approach:</p><ol><li>Write down the problem you need to solve.</li><li>Brainstorm for hypothetical reasons of the defect — no criticism on this stage is important. You should come up with a list of at least 4 to 10 ideas.</li><li>Find the most likely scenario of all. <strong>There will be edge cases you would want to test against, but restrain yourself from doing so.</strong> Choose the one that has higher probability even if it’s harder to check against. It’s the common pitfall to lose time validating many low-value cases.</li><li>Validate. Do not step too far away from the initial hypothesis. If you find evidence that it is invalid (i.e. won’t fix the bug) — mark it as invalid and move on.</li><li>If additional hypotheses are formed during failed validation add them to the initial brainstorm list.</li><li>Re-value probability and if there is another highly probable case — continue with the next validation.</li><li>If no solution and no sound hypothesis is present — do not waste your time blindly trying to fix the bug. Close your laptop lid and go for a walk. Literally.</li></ol><p>There is no such thing as perfect code. There only exists a reasonable solution for the defined task. Sometimes it is appropriate to use the scenarios I mentioned in the beginning. But the more I value my time — the more I value using hypotheses.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67fea42f2a55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create Useful Ontologies]]></title>
            <link>https://medium.com/@yankalbaska/how-to-create-useful-ontologies-ba38c8664372?source=rss-5df141b1fcbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba38c8664372</guid>
            <category><![CDATA[ontology]]></category>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[product-owner]]></category>
            <category><![CDATA[requirements]]></category>
            <category><![CDATA[design-thinking]]></category>
            <dc:creator><![CDATA[Yan Kalbaska]]></dc:creator>
            <pubDate>Wed, 24 Oct 2018 20:42:33 GMT</pubDate>
            <atom:updated>2024-03-03T16:01:42.410Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>and convert them into requirements.</em></h4><p>When I started designing another mobile application I once again stumbled upon the same problem: How to convert ideas into requirements and neither lose important details nor introduce useless features. The rest is usually straightforward, but the missing links in the design workflow were right there as shown on the chart:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Po2GPRDHNu_AUSufdFIcKw.png" /></figure><p>To pass the first uncertainty block I constructed personas — or characters — from behavioral patterns observed during the interview analysis (after step 2). And those personas were the protagonists of the scenarios (the 4th step on the chart).</p><p>I won’t dwell on the details of persona synthesis as this is a complex subject in itself and I’ll possibly cover it in another story.</p><p>Sometimes it’s valid to skip the first 3 steps and start straight with the core scenarios, but I would question the basement on which such a design is built. Does it have real value for people using the product or is it just a vision of one person? (Please do comment if this topic is of interest to you.)</p><p>Now as the basic day-in-life scenarios were ready it was time to convert them into business requirements. The solution I chose was to <strong>create an </strong><a href="https://en.wikipedia.org/wiki/Ontology_(information_science)"><strong>ontology chart</strong></a>, which is basically an object diagram. And that’s what my process looked like step-by-step:</p><p>1. I read through each core scenario — written as a narrative — and noted all nouns (subjects and objects).</p><p>2. Grouped all alternative namings of the same instance giving it the simplest and the most distinctive name to eliminate user confusion of its meaning.</p><p>3. Created a chart of disconnected objects.</p><p>4. Then I read the scenarios once again noting performed actions (verbs) and added them to the chart as arrows from the subject to the object and action name along the arrow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OXJRXcwB3iGkJBdQ_--JKg.png" /></figure><p>5. Rearranged the objects in the chart so that they were placed close to other objects associated with them, forming some type of modules.</p><p>6. Revised if the most connected objects needed to be split into simpler notions. Associations (arrows) are a good indicator of complexity.</p><blockquote>I used includes/extends association type from UML for this one — and it is canonically used for use cases — but the actual notation doesn’t matter. There many of them and it’s best to use the one that is easily understood by all parties involved.</blockquote><p>7. Rewritten core scenarios sentence by sentence using only nouns and verbs from the chart. Each of these sentences was actually a requirement.</p><p>Every design is an iterative process so you’ll probably need to repeat rearrangement, splitting notions and grouping them again before you’ll have a complete list — up to the moment that every user story and scenario could be described with chart objects as nouns and chart associations as verbs.</p><p>As for the app I was designing, I only had to add some implied requirements (also written in chart words), that were not mentioned in the core scenarios because of their brevity.</p><p>There were also two surprising benefits after the chart was complete that made me think I’m on the right track to efficient design and better user satisfaction:</p><ol><li>In it’s basic form, all the developer had to do to implement business logic was — create classes from ontology instances, and implement methods from associations between them (and therefore easily set testing priorities for <a href="https://en.wikipedia.org/wiki/Behavior-driven_development">behavior-driven development</a>).</li><li>Every issue that needed clarification was completely back-tracable down to interviews with real people and real value behind the implemented features.</li></ol><p><em>Note: this is my first story on Medium, so I would kindly appreciate all your comments on the matter, style, sufficiency of explanation, and any thoughts on what would make your reading experience better.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba38c8664372" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>