<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Jan Stary Blog</title>
        <link>https://janstary.com/blog</link>
        <description>Jan Stary Blog</description>
        <lastBuildDate>Thu, 12 Nov 2026 00:00:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <copyright>Copyright © 2026</copyright>
        <item>
            <title><![CDATA[AI Reflections (3)]]></title>
            <link>https://janstary.com/blog/ai-reflections-3</link>
            <guid>https://janstary.com/blog/ai-reflections-3</guid>
            <pubDate>Thu, 12 Nov 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[AI has consumed the industry’s attention like few topics before it. Somewhere along the way, we]]></description>
            <content:encoded><![CDATA[<p>AI has consumed the industry’s attention like few topics before it. Somewhere along the way, we
stopped asking the right question. Not “can this be built with AI?” but “what is the best way to
build this?”</p>
<p>This space is where I explore AI from a different angle — not the hype, but the questions underneath
it.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="is-writing-code-a-real-bottleneck">Is writing code a real bottleneck?<a href="https://janstary.com/blog/ai-reflections-3#is-writing-code-a-real-bottleneck" class="hash-link" aria-label="Direct link to Is writing code a real bottleneck?" title="Direct link to Is writing code a real bottleneck?" translate="no">​</a></h2>
<p>These days, bottleneck is one of the most overloaded words in the context of AI. Everything is a
bottleneck - code reviews, writing documentation, asking for advice, ... - starting with coding
itself. Ignoring the fact
that <a href="https://impatientprogramming.org/essays/sebastian-scholl-stop-apologizing-for-being-the-bottleneck/" target="_blank" rel="noopener noreferrer" class="">not all bottlenecks are wrong</a>,
was coding a real bottleneck slowing down the SDLC the most?</p>
<p>To answer the question, first let's think about what coding is. Coding is the act of writing
code - that one was easy. What is code? Code, in my opinion, is the specification of the
system written in a structured and precise way (compared to natural language). To be more specific,
code is the only specification that can be treated as the single source of truth, as it is testable
and deterministically re-runnable (compared to Markdown files). To sum it up, coding is the act of
specifying how the system should behave in a structured and precise way using a programming
language.</p>
<p>When I think about the good old days, this was really not a bottleneck. Once I knew what I wanted to
build, in other words what the specification should look like, typing was not an issue. Real
software engineering is not about coding, it is about solving problems. And the hard parts are
elsewhere: talking to the customer and knowing what your customer wants; design and architecture;
defining boundaries and abstractions; keeping context windows small for humans and agents; dealing
with accidental complexity; accountability; designing for the future, etc. And none of these
disappeared.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="10x-as-a-goal">10x as a goal<a href="https://janstary.com/blog/ai-reflections-3#10x-as-a-goal" class="hash-link" aria-label="Direct link to 10x as a goal" title="Direct link to 10x as a goal" translate="no">​</a></h2>
<p>Almost everyone is talking about delivering much more with AI - <em>2x</em>, <em>5x</em>, <em>10x</em>. And most of the
time, by saying <em>Nx</em>, they mean increasing the number of delivered features.</p>
<p>First of all, developing Nx more features requires having Nx more good ideas. Something that looks
trivial. But considering the fact that every system can provide a finite number of features, while
some features conflict with others, we should be very careful
about <a href="https://newsletter.kentbeck.com/p/earn-and-learn?open=false#%C2%A7failure-and-success-in-the-finish-line-game" target="_blank" rel="noopener noreferrer" class="">what to incorporate</a>.
Additionally, are our customers even able to validate whether those changes bring the expected
value? For that reason, building feature after feature, while validating changes with the customer,
is a proven way of developing a software system.</p>
<p>Imagine all the problems I mentioned above are solved. Is measuring throughput on its own a good
metric? While I understand the intent to increase throughput, the problem I see with this way of
thinking is that it narrows software engineering down to a factory. Whoever produces more items
performs better. In my opinion, this is simplistic thinking. Shouldn't we measure real value
instead? Customer satisfaction, revenue, sustainability of development, ...</p>
<p>I'm not against the Nx goal or AI. I'm against confusing cheaper code production with better
software engineering. We've spent decades learning that the cost of writing software is only a
fraction of what it costs to own, maintain and evolve. We have an extraordinary opportunity to
improve software engineering, but only if we start measuring outcomes rather than activity, quality
rather than volume, and the cost of change rather than simply the cost of delivery.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="do-not-tolerate-technical-debt">Do not tolerate technical debt<a href="https://janstary.com/blog/ai-reflections-3#do-not-tolerate-technical-debt" class="hash-link" aria-label="Direct link to Do not tolerate technical debt" title="Direct link to Do not tolerate technical debt" translate="no">​</a></h2>
<p>Explaining the importance of quality to management has always been hard. The quality of software,
achieved by architecting &amp; designing, is something that slows you down at the beginning with the
promise to make your long-term
maintenance <a href="https://martinfowler.com/bliki/DesignStaminaHypothesis.html" target="_blank" rel="noopener noreferrer" class="">more effective</a>.</p>
<p>However, this should not be a problem anymore. In times when one can run multiple PoCs in parallel
to find out what to build, technical debt should not be tolerated.</p>
<p>Instead, use AI to confirm feasibility, to figure out the best architecture &amp; design possible, to
show customers what they would get, to collect feedback. Do not accept average solutions; strive for
the best solution possible.</p>]]></content:encoded>
            <author>jan@janstary.com (Ján Starý)</author>
            <category>Software engineering</category>
            <category>AI</category>
        </item>
        <item>
            <title><![CDATA[AI Reflections (2)]]></title>
            <link>https://janstary.com/blog/ai-reflections-2</link>
            <guid>https://janstary.com/blog/ai-reflections-2</guid>
            <pubDate>Thu, 16 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[AI has consumed the industry’s attention like few topics before it. Somewhere along the way, we]]></description>
            <content:encoded><![CDATA[<p>AI has consumed the industry’s attention like few topics before it. Somewhere along the way, we
stopped asking the right question. Not “can this be built with AI?” but “what is the best way to
build this?”</p>
<p>This space is where I explore AI from a different angle — not the hype, but the questions underneath
it.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="quality-still-matter">Quality still matter<a href="https://janstary.com/blog/ai-reflections-2#quality-still-matter" class="hash-link" aria-label="Direct link to Quality still matter" title="Direct link to Quality still matter" translate="no">​</a></h2>
<p>Let me start by citing opening paragraph of one of the most influential books in our profession —
The Mythical Man Month:</p>
<blockquote>
<p>No scene from prehistory is quite so vivid as that of the mortal struggles of great beasts in
the
tar pits. In the mind’s eye one sees dinosaurs, mammoths, and sabertoothed tigers struggling
against
the grip of the tar. The fiercer the struggle, the more entangling the tar, and no beast is so
strong or so skillful but that he ultimately sinks.</p>
<p>Large-system programming has over the past decade been such a tar pit, and many great and
powerful
beasts have thrashed violently in it. Most have emerged with running systems — few have met
goals,
schedules, and budgets. Large and small, massive or wiry, team after team has become entangled
in
the tar. No one thing seems to cause the difficulty — any particular paw can be pulled away. But
the
accumulation of simultaneous and interacting factors brings slower and slower motion. Everyone
seems
to have been surprised by the stickiness of the problem, and it is hard to discern the nature of
it.
But we must try to understand it if we are to solve it.</p>
</blockquote>
<p>Every software system needs to be treated by applying two “simple” rules — recognise accidental
complexity from essential complexity, and try as aggressively as you can to minimise the first one.
Domain-Driven Design, layered architecture, hexagonal architecture, micro-services — different in
name, author, and nuance, yet all converging on the same insight: keep modules coherent, keep
interfaces narrow and intuitive, keep internals hidden. A decades-long collective effort to tame
accidental complexity. The question is: does AI change the need to face accidental complexity? Can
the Genie evade the tar pit, or will it struggle fruitlessly against the tar’s sticky grip?</p>
<p>Intuition tells me it will struggle. Would AI not multiply bad structures once it is launched into
entangled systems? Would not wrong boundaries, incoherent and coupled structures make it harder for
AI to aim changes precisely? Would AI, with its limited context window, not struggle to reason about
complexity it cannot fully see? And as time passes, there are also evidences (ai acceleration
whiplash takeaway, sunhealthy code is burning your token usage): code churn up ~860%, incidents per
change up ~245%, bugs per developer up ~55%, unhealthy codebases consume almost 50% more tokens to
complete the same tasks.</p>
<p>What is the solution? Does the model need to be trained on better code? Better harnesses? Tests?
Better prompting? Nobody knows, but perhaps awareness that the old wisdom still applies is where we
should start.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="agility-is-still-relevant">Agility is still relevant<a href="https://janstary.com/blog/ai-reflections-2#agility-is-still-relevant" class="hash-link" aria-label="Direct link to Agility is still relevant" title="Direct link to Agility is still relevant" translate="no">​</a></h2>
<p>Software people have a weakness of thinking they invented everything. But many times, the core
inspiration resides well outside our industry (the car industry has used platform engineering for
more than half a century, for example). And that is good, because it shows that an adopted
principle/methodology/process is good enough to be relevant across a variety of industries.</p>
<p>I look at agility the same way. Norbert Wiener’s feedback-loop theory, Toyota’s kaizen, and John
Boyd’s OODA loop (Observe-Orient-Decide-Act) were all introduced decades ago. But we can go even
further by looking at John Henry Newman’s development of doctrine, invented centuries before the
Agile Manifesto. At the same time, both conceptions share the belief that a complex system (whether
theology or a software product) cannot be designed in detail in advance. Instead, it is allowed to
“grow” through a series of small, testable steps, where each step responds to feedback from the real
world.</p>
<p>Agility is natural to human beings. But some AI evangelists (I can’t find a better name) try to
convince us agility is obsolete: “AI makes big up-front design cheap, so why bother with small
steps?”, “AI lets us rebuild everything in minutes”… Fine, but what does that say about a system
that must be rebuilt on every change request? How do I know the direction is right when steps are
this big? How do I share that much change with the team at once?</p>
<p>Do not accept simplistic statements that sounds too good. Question everything. And don’t forget: if
you do a big-bang rewrite, the only thing you’re guaranteed of is a big bang.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="to-spec-or-not-to-spec">To spec or not to spec?<a href="https://janstary.com/blog/ai-reflections-2#to-spec-or-not-to-spec" class="hash-link" aria-label="Direct link to To spec or not to spec?" title="Direct link to To spec or not to spec?" translate="no">​</a></h2>
<p>The old enemy has risen once again: the idea of getting rid of software engineers by replacing code
with something less technical. It runs from Model-Driven Development, Low-code, and No-code
platforms, straight to LLM-centric approaches such as Spec-Driven Development and its derivatives.
While the first category introduced inflexibility, SDD introduced non-determinism (with the
potential to combine both :)).</p>
<p>I see multiple problems:</p>
<ol>
<li class="">It is not clear to me what problem size and type SDD is meant for. For the majority of problems,
it feels like a sledgehammer to crack a nut.</li>
<li class="">The past has shown that the best way for us to stay in control of what we are building is small,
iterative steps, so I am very skeptical that lots of up-front spec design is a good idea,
especially when specs are overly verbose.</li>
<li class="">After playing a little bit with SDD, I can say for sure that I prefer reviewing code to reviewing
markdown specs.</li>
</ol>
<p>Among the issues mentioned above, SDD’s core flaw is one thing: it ignores the fact that only the
codebase can be perceived as a single source of truth. Code is the actual artifact that describes
the real behaviour of the system. Code is the artifact that is syntactically and semantically
verified by various steps, e.g. compiling and testing. For me, the only documentation you can 100%
trust is the code itself.</p>]]></content:encoded>
            <author>jan@janstary.com (Ján Starý)</author>
            <category>Software engineering</category>
            <category>AI</category>
        </item>
        <item>
            <title><![CDATA[Ai Reflections]]></title>
            <link>https://janstary.com/blog/ai-reflections</link>
            <guid>https://janstary.com/blog/ai-reflections</guid>
            <pubDate>Fri, 22 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[AI has consumed the industry’s attention like few topics before it. Somewhere along the way, we]]></description>
            <content:encoded><![CDATA[<p>AI has consumed the industry’s attention like few topics before it. Somewhere along the way, we
stopped asking the right question. Not “can this be built with AI?” but “what is the best way to
build this?”</p>
<p>This space is where I explore AI from a different angle — not the hype, but the questions underneath
it.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="ai-is-a-tool">AI is a tool<a href="https://janstary.com/blog/ai-reflections#ai-is-a-tool" class="hash-link" aria-label="Direct link to AI is a tool" title="Direct link to AI is a tool" translate="no">​</a></h2>
<p>Every software engineer carries a toolbox containing multiple tools for solving problems. Clever
software engineers regularly take care of their toolbox — updating outdated tools, removing the ones
that are no longer relevant, and adding new ones. The whole point of carrying a toolbox and not a
single tool is the fact that no single tool can solve all possible problems. This has been known
since the very beginning of software engineering as a discipline. “There are no silver bullets,” as
Fred Brooks once said.</p>
<p>Living with this truth, our job as software engineers is to take care of our toolbox and use the
proper tool to solve the problem we are facing. And AI is just another tool — a powerful one,
admittedly — that should be used with caution.</p>
<p>Even if it is hard to predict what will happen in our ever-changing industry, I think Fred Brooks’
thought will still be relevant. The ability to know when to use AI and when not to will
differentiate clever software engineers from the rest. Do not let AI become your only hammer.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="use-it-or-lose-it">Use it or lose it<a href="https://janstary.com/blog/ai-reflections#use-it-or-lose-it" class="hash-link" aria-label="Direct link to Use it or lose it" title="Direct link to Use it or lose it" translate="no">​</a></h2>
<p>Once we stop actively practising a skill, our ability to use it will deteriorate. This seems obvious
and widely applicable. Let’s reformulate this generic claim to target coding: once we stop actively
writing code, we will lose the ability to do it. The real question is what we stand to lose — what
is the value of writing code itself?</p>
<p>I see writing code as similar to writing in general: it is a process of expressing thoughts. Several
times during my career, I’ve been able to sense that something was wrong with the structure of the
code, but I couldn’t clearly articulate the issue. I had to rewrite the code myself to uncover the
actual code smell and understand how it could be improved.</p>
<p>For that reason, I don’t believe we are meant to be passive reviewers of generated code. The act of
writing code is itself part of the thinking process.</p>
<p>I can’t express this idea better than Leslie Lamport did: “If you’re thinking without writing, you
only think you’re thinking.”</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="can-ai-produce-intuitive-code">Can AI produce intuitive code?<a href="https://janstary.com/blog/ai-reflections#can-ai-produce-intuitive-code" class="hash-link" aria-label="Direct link to Can AI produce intuitive code?" title="Direct link to Can AI produce intuitive code?" translate="no">​</a></h2>
<p>We all know that a major task software engineers have is to reduce accidental complexity — to reduce
complex structures and replace them with the opposite. But what is the opposite of complexity when
it comes to software structures? Many would say it is simplicity, but I would argue that simplicity
is not the goal. Intuitiveness is. The code should be intuitive to use, should not hide the intent,
and should be easily understandable.</p>
<p>And here is the important question: can AI generate intuitive code? I will keep this one open. :)</p>]]></content:encoded>
            <author>jan@janstary.com (Ján Starý)</author>
            <category>Software engineering</category>
            <category>AI</category>
        </item>
        <item>
            <title><![CDATA[Code reviews, the art of collaboration]]></title>
            <link>https://janstary.com/blog/code-reviews</link>
            <guid>https://janstary.com/blog/code-reviews</guid>
            <pubDate>Fri, 25 Apr 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Many organizations do regular code reviews, and those that do not would be better if they did.]]></description>
            <content:encoded><![CDATA[<p>Many organizations do regular code reviews, and those that do not would be better if they did.
However, code review is often seen as just another step of a process — a checkpoint before releasing
changes — rather than a meaningful practice. While processes are not inherently bad, without the
right mindset, they can become rigid and stagnant. Code review should not be regarded as merely a
mandatory checkpoint before releasing changes — it is far more significant than that.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="code-review-as-an-investment">Code review as an investment<a href="https://janstary.com/blog/code-reviews#code-review-as-an-investment" class="hash-link" aria-label="Direct link to Code review as an investment" title="Direct link to Code review as an investment" translate="no">​</a></h2>
<p>While code reviews are time-consuming — often amounting to hours per week — they should be seen as
an investment in the project’s future success. High-quality code reviews uphold code standards, help
identify bugs at an early stage, and increase overall code quality by inviting input from multiple
developers. One individual can only come up with a limited number of innovative ideas, but when the
collective expertise of the team is involved, the outcome often surpasses the original solution.
This shared effort reduces technical debt and promotes the creation of well-thought-out solutions.</p>
<p>Code reviews should naturally be regarded as an investment, not only by the development team but
also by project managers and other stakeholders. The development team plays a key role in advocating
for the significance of code reviews and ensuring they are prioritized. Consequently, most
experienced developers in a team — including the technical lead — should have sufficient time
explicitly allocated for reviewing code, reinforcing a culture of quality and continuous
improvement.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="code-review-as-a-mentoring-tool">Code review as a mentoring tool<a href="https://janstary.com/blog/code-reviews#code-review-as-a-mentoring-tool" class="hash-link" aria-label="Direct link to Code review as a mentoring tool" title="Direct link to Code review as a mentoring tool" translate="no">​</a></h2>
<p>Code reviews serve as an invaluable opportunity for mentoring within a development team, promoting
collaboration and knowledge-sharing among team members. Code reviews create a platform where more
experienced developers pass knowledge to those less experienced, offering constructive feedback and
guidance. Through this process, less experienced developers gain valuable insights into coding best
practices, architectural decisions, and the nuances of the project’s software system.</p>
<p>Moreover, code reviews enable the transfer of knowledge about the broader aspects of a complex
system, ensuring that a wider pool of developers understands how different components interact and
contribute to the whole. This improved understanding strengthens the team’s collective capacity to
maintain, troubleshoot, and innovate within the system.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="code-review-as-a-perspective-shift">Code review as a perspective shift<a href="https://janstary.com/blog/code-reviews#code-review-as-a-perspective-shift" class="hash-link" aria-label="Direct link to Code review as a perspective shift" title="Direct link to Code review as a perspective shift" translate="no">​</a></h2>
<blockquote>
<blockquote>
<p><em>That is inevitable — it is hard for people to put themselves in the shoes of someone unfamiliar</em>
<em>with whatever they are working on.</em></p>
</blockquote>
</blockquote>
<p>Code reviews introduce an interesting psychological challenge that stems from human nature — it is
inherently difficult for individuals to adopt the perspective of someone who is unfamiliar with the
work they are immersed in. When developers are deeply involved in coding a feature or resolving an
issue, their familiarity with the context and details can create a cognitive bias, often referred to
as the “curse of knowledge.” This bias makes it challenging for them to recognize how their code
might be perceived by others, especially those who lack the same depth of understanding.</p>
<p>Code reviews help address this issue by inviting fresh perspectives. When other developers review
the code, they bring their unique viewpoints, which are often less influenced by the biases of the
original author. This process highlights areas that may be unclear, overly complex, or inconsistent.
It encourages the author to rethink and refine their work, enhancing its clarity, consistency, and
overall quality.</p>
<p>Furthermore, code reviews encourage developers to communicate their ideas more effectively, as they
must articulate their decisions and logic to reviewers. This process not only enhances the clarity
of the code but also helps the authors themselves step back and see their work through the lens of
someone less familiar with it.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-to-do-a-good-code-review">How to do a good code review<a href="https://janstary.com/blog/code-reviews#how-to-do-a-good-code-review" class="hash-link" aria-label="Direct link to How to do a good code review" title="Direct link to How to do a good code review" translate="no">​</a></h2>
<p>Good code review requires a thorough understanding of the broader context in which the changes
exist. Reviewing modifications in isolation is often insufficient, as the code interacts with
existing structures that must be considered. A comprehensive review should assess not only what has
changed but also <strong>how these changes integrate with and impact the unchanged portions of the
codebase</strong>. Some code constructs may no longer be relevant, or opportunities to refine other
sections may have been overlooked. How can one grasp the necessary context? Ideally, by asking
original author of the code — either in person or remotely — to provide insights into both the
code’s structure and the rationale behind the modifications. If direct access to the author is not
possible, then the reviewer must independently analyze and interpret the surrounding context.</p>
<p>Another crucial aspect of a good code review is the manner in which feedback is provided. Code
reviews should never be used as a means of settling personal conflicts or revenge. Instead, feedback
should be framed in a constructive and objective way, focusing on helping the author improve their
work and contributing to the overall quality of the project.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="conclusion">Conclusion<a href="https://janstary.com/blog/code-reviews#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion" translate="no">​</a></h2>
<p>By recognizing code review as an investment, a form of mentorship, and a way to mitigate cognitive
biases, teams can ensure continuous improvement. Prioritizing thorough and constructive reviews
results in more maintainable, and high-quality software systems while reinforcing collaboration and
learning within teams.</p>]]></content:encoded>
            <author>jan@janstary.com (Ján Starý)</author>
            <category>Software engineering</category>
        </item>
        <item>
            <title><![CDATA[To create a custom implementation or not to]]></title>
            <link>https://janstary.com/blog/to-create-a-custom-implementation-or-not-to</link>
            <guid>https://janstary.com/blog/to-create-a-custom-implementation-or-not-to</guid>
            <pubDate>Mon, 02 Dec 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[Software engineers are often confronted with a familiar dilemma: create a custom implementation]]></description>
            <content:encoded><![CDATA[<p>Software engineers are often confronted with a familiar dilemma: create a custom implementation
tailored to our specific requirements or opt an existing one? And all we hear are phrases like: “Do
not reinvent the wheel!”, “Minimize dependencies!”, “ Every problem of a library becomes your
problem!”. All of these statements are valid and relevant. The key difference lies in the context.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="trivial-and-non-trivial-problems">Trivial and non-trivial problems<a href="https://janstary.com/blog/to-create-a-custom-implementation-or-not-to#trivial-and-non-trivial-problems" class="hash-link" aria-label="Direct link to Trivial and non-trivial problems" title="Direct link to Trivial and non-trivial problems" translate="no">​</a></h2>
<p>Using a library does have its drawbacks, such as transitive dependencies and potential security
vulnerabilities, just to name a few. For these reasons, the default approach seems to lean towards
not using a library. However, what if a custom implementation requires specialized expertise outside
your domain? Or what if it leads to maintenance overheads that are unsustainable?</p>
<p>Well, there is no silver bullet. When considering libraries versus custom implementations, it’s
helpful to categorize problems into two types: trivial and non-trivial. But how do we differentiate
between them? Well, it depends. Generally, any implementation that demands substantial expertise —
potentially, outside your domain — falls into the non-trivial category, whether it’s a robust
persistence layer communicating with a database, a custom serializer, or even something seemingly
“simple” like a random number generator. On the other hand, problems that do not require specific
expertise e.g. checking an emptiness of a collection, can be considered “trivial”.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="advantages-of-using-standard-libraries-and-frameworks">Advantages of using standard libraries and frameworks<a href="https://janstary.com/blog/to-create-a-custom-implementation-or-not-to#advantages-of-using-standard-libraries-and-frameworks" class="hash-link" aria-label="Direct link to Advantages of using standard libraries and frameworks" title="Direct link to Advantages of using standard libraries and frameworks" translate="no">​</a></h2>
<p>When dealing with non-trivial problems, reusing a standard library or framework should be the
preferred choice for several reasons.</p>
<p>Primarily, opting for a standard library or framework offers the invaluable advantage of tapping
into the expertise of the professionals who conceived it and the collective wisdom of those who have
utilized it previously. These tools have undergone rigorous beta testing, undergone official
releases, and very likely have been employed extensively by legions of programmers, perhaps
numbering in the millions.</p>
<p>Furthermore, these standard tools often evolve to encompass a broader array of functionalities as
they mature. Should you encounter a feature gap in the library or framework you’ve chosen, rest
assured that the developer community will voice their needs, potentially resulting in the
incorporation of these missing elements in subsequent releases.</p>
<p>Additionally, the performance of these established libraries and frameworks tends to exhibit an
upward trajectory over time, often without any direct intervention required on your part. As the
user base expands and community feedback flows in, developers behind these tools continually refine
and optimize their performance, ensuring that you benefit from ongoing enhancements without
additional effort.</p>
<p>Moreover, leveraging standard libraries or frameworks alleviates the need to invest precious time in
crafting bespoke solutions for issues that do not relate to your specific project or domain. Rather
than diverting your focus towards reinventing the wheel, you can channel your energies into refining
and enhancing your application, leaving the foundational groundwork to pre-existing solutions.</p>
<p>Lastly, embracing standard libraries or frameworks situates your code within the mainstream of
software development practices. This placement facilitates enhanced readability, maintainability,
and reusability, as your code aligns with widely accepted conventions and patterns, making it
readily comprehensible and adaptable by a diverse range of developers.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="when-to-create-a-custom-implementation">When to create a custom implementation<a href="https://janstary.com/blog/to-create-a-custom-implementation-or-not-to#when-to-create-a-custom-implementation" class="hash-link" aria-label="Direct link to When to create a custom implementation" title="Direct link to When to create a custom implementation" translate="no">​</a></h2>
<p>At times, the functionality provided by a library may not align perfectly with your specific
requirements, particularly if your needs are highly specialized. In such cases, it becomes necessary
to explore alternative implementations. It’s essential to acknowledge that no library, regardless of
its breadth or sophistication, can cater to every conceivable use case or requirement. As your
project delves into more niche or specialized areas, you may encounter gaps in the functionality
provided by available libraries. In such scenarios, the burden falls upon you to consider crafting
custom solutions to bridge these gaps and fulfill your project’s unique demands.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="conclusion">Conclusion<a href="https://janstary.com/blog/to-create-a-custom-implementation-or-not-to#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion" translate="no">​</a></h2>
<p>To summarize, if you need to do something that seems like it should be reasonably common and is
non-trivial, there may already be a facility in the libraries that does what you want. If there is,
use it; if you do not know, check. Generally speaking, library code is likely to be better than code
that you would write yourself and is likely improved over time. This is no reflection on your
abilities as a programmer. Economies of scale dictate that library code receives far more attention
than most developers could afford to devote to the same functionality. On the other hand, avoid
adding a dependency just to save a few lines of code. It’s crucial to weigh the pros and cons and
understand the trade-offs involved.</p>]]></content:encoded>
            <author>jan@janstary.com (Ján Starý)</author>
            <category>Software engineering</category>
        </item>
        <item>
            <title><![CDATA[Why do we need interfaces?]]></title>
            <link>https://janstary.com/blog/why-do-we-need-interfaces</link>
            <guid>https://janstary.com/blog/why-do-we-need-interfaces</guid>
            <pubDate>Tue, 09 Apr 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[The vast majority of tutorials addressing programming advocate for creating an interface prior to]]></description>
            <content:encoded><![CDATA[<p>The vast majority of tutorials addressing programming advocate for creating an interface prior to
implementation. However, only a few of these tutorials elaborate on the rationale behind this
approach. Why do we need an interface if there is only one implementation? What advantages does it
offer? Isn’t it just a waste of time? In this post, we delve into the reasons why interfaces are
indispensable in modern software development.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="abstraction-modularity-maintaina">Abstraction, modularity, maintaina…<a href="https://janstary.com/blog/why-do-we-need-interfaces#abstraction-modularity-maintaina" class="hash-link" aria-label="Direct link to Abstraction, modularity, maintaina…" title="Direct link to Abstraction, modularity, maintaina…" translate="no">​</a></h2>
<p>Sure, first and foremost, interfaces foster <strong>abstraction</strong>. The abstraction allows for the creation
of a simplified view of a complex system, where only the relevant details are presented to the user,
and the internal workings of the system are hidden. This separation of concerns simplifies the
development process, enhances code <strong>maintainability</strong>, and mitigates the risk of unintended side
effects when making changes. At its core, an interface is a contract that defines the proper way of
communication without requiring knowledge of the underlying implementation.</p>
<p>Furthermore, interfaces facilitate <strong>modularity</strong>. By defining clear boundaries between different
parts of a system, interfaces enable developers to isolate functionalities, thus promoting code
<strong>reusability</strong> and facilitating parallel development.</p>
<p>Abstraction, modularity, maintainability, code reusability, loose coupling, testability, and much
more. While these are indeed compelling reasons to utilise interfaces, is there anything beyond
these considerations? Are there other benefits that interfaces provide?</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="client-oriented-development">Client-oriented development<a href="https://janstary.com/blog/why-do-we-need-interfaces#client-oriented-development" class="hash-link" aria-label="Direct link to Client-oriented development" title="Direct link to Client-oriented development" translate="no">​</a></h2>
<p>Writing an interface creates a space for a comprehensive evaluation. This process can be perceived
as a design phase, distinct from implementation phase. Throughout design phase, the whole specific
bunch of questions should be addressed. How to determine inputs and outputs of an interface to
ensure client convenience? Is the interface simple as possible, but not simpler? Is the interface
streamlined yet sufficiently robust? Is the interface intuitively understandable? Is the interface
strict enough to block invalid and unsafe usage — does the interface help the client to use it
correctly?</p>
<p>Do these types of questions not direct our focus towards the clients of our code? Does not this
shift in perspective assist us in prioritising the needs and perspectives of our clients (could it
be interpreted as a form of empathy…)? To illustrate, let’s contrast this perspective with questions
typically posed during the implementation phase. Is the implementation functioning optimally? Does
the implementation performing well? Is the implementation maintainable and testable?</p>
<p>Do you perceive the contrasting subjects of these questions? While the former addresses the needs of
the client, the latter emphasises the pursuit of implementation perfection (and that’s important
tho!). “We are not developing a library. Who are our clients?” you inquire. I respond: they are your
teammates, colleagues from other teams, and even your future self, reflecting on the code you
authored months ago.</p>
<p>Once an interface is made public, altering the contract becomes challenging. Consequently, the
design phase serves as an opportunity for thorough consideration before the final release. This
advantage holds true even when the interface has only one implementation or is inherently
straightforward. This segregation helps teams and individuals to create superior, robust, flexible
and client-oriented interfaces.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="conclusion">Conclusion<a href="https://janstary.com/blog/why-do-we-need-interfaces#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion" translate="no">​</a></h2>
<p>In conclusion, interfaces play a pivotal role in modern software development by promoting
abstraction, modularity, testability, maintainability, and extensibility. Besides, creating an
interface facilitates a clear separation between the design and implementation phases. This division
empowers developers and teams to focus on each phase individually, extracting maximum value from the
process.</p>]]></content:encoded>
            <author>jan@janstary.com (Ján Starý)</author>
            <category>Software engineering</category>
        </item>
    </channel>
</rss>