<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Konrad Krajewski</title>
    <description>The latest articles on DEV Community by Konrad Krajewski (@konrad_winnicki).</description>
    <link>https://dev.to/konrad_winnicki</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1505786%2F52da8b1d-b755-4deb-90bb-d77aec7136d7.png</url>
      <title>DEV Community: Konrad Krajewski</title>
      <link>https://dev.to/konrad_winnicki</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/konrad_winnicki"/>
    <language>en</language>
    <item>
      <title>My Thoughts on Token-Maxxing: A Call for Learning, Creativity, and Real Impact Instead of Simple Token-Maxxing</title>
      <dc:creator>Konrad Krajewski</dc:creator>
      <pubDate>Sun, 17 May 2026 16:13:50 +0000</pubDate>
      <link>https://dev.to/konrad_winnicki/my-thoughts-on-token-maxxing-a-call-for-learning-creativity-and-real-impact-instead-of-simple-3di9</link>
      <guid>https://dev.to/konrad_winnicki/my-thoughts-on-token-maxxing-a-call-for-learning-creativity-and-real-impact-instead-of-simple-3di9</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsxtload7u04ayru0ni0r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsxtload7u04ayru0ni0r.png" alt="OpenIA generated image" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Tokenmaxxing&lt;/strong&gt; is an example of how a single parameter can push organizations toward either positive outcomes or harmful behavior.&lt;br&gt;
How does the bad path begin? It starts very innocently. At the beginning, there is always a company-level initiative. Leaders and managers try to find the best way to optimize processes and boost company development. After 2025, there is mostly one direction  - introducing AI tools.&lt;br&gt;
So companies spend a lot of money introducing these tools, adapting them to their profile, and maintaining them. It is a significant investment. Over time, however, some disappointment may appear. There is neither massive optimization nor a visible boost in productivity. Of course, there is always some scale of improvement, as well as some scale of disappointment. Up to this point, there are no errors — this is simply reality.&lt;/p&gt;

&lt;p&gt;The real problem may start afterward. At that stage, investigations begin to find where is the issue? Usually, the culprit is identified quite quickly — people who do not use the tools enough, or do not use them widely enough. What happens next? Pressure to use AI as much as possible. And this is where tokenmaxxing begins. Managers can easily see who uses AI tools the most. They may not check what kinds of problems people are solving; instead, there is only one visible parameter: token usage. The more, the better. But is it really?&lt;/p&gt;

&lt;p&gt;As a result, people start burning tokens everywhere simply to avoid negative consequences — even for tasks where AI is unnecessary or where the AI-generated outcome is mediocre.This is the perfect recipe for disaster. And later it does not help when managers say that employees will not be judged by token usage. The show has already started, and stopping this snowball becomes very difficult. And from the employee’s perspective, there is always some kind of uncertainty: What can I do? How can I use it? What if I make mistakes? How will I find time to experiment? There are many more doubts, and it ultimately depends on the company culture how everything turns out.&lt;/p&gt;

&lt;p&gt;I’m glad that the company I currently work for chose an experimentation-driven approach instead of simply following the tokenmaxxing approach.&lt;br&gt;
During one week, we had an opportunity to experiment with AI tools at different levels and across different layers. We could split into different squads. There were no rigid rules regarding squad size or the types of employees involved. The idea was simple: experiment with AI tools as much as possible — but truly experiment. Define friction points, identify what works well and what does not.&lt;/p&gt;

&lt;p&gt;From my engineering perspective, it was a great approach, and inspiring experience. In the team I was part of, we tried to implement a product-owner-defined concept starting from design and using spec-driven development. We used AI tools at every stage of the process. The high-level idea was to create a top-level specification with interfaces, while each developer in the squad could introduce their own sub-specifications for the area they were responsible for.&lt;/p&gt;

&lt;p&gt;We ended up with the first draft of an MVP for our feature, as well as many AI-agent-related skills that can now be developed, improved, and used more broadly in our engineering work. At the company level, we could see how other teams approached problems and what they experimented with. Basically, we could learn from each other at both the squad and company level. But what was most inspiring, paradoxically, was that we cooperated as a squad more closely than we normally do. I could say that AI brought people closer together. And I think that should be the real idea. Inspiring, isn’t it? &lt;/p&gt;

&lt;p&gt;AI tools should not separate people from the squad or team, pushing them toward working independently together with AI agents. The goal should be that AI tools help people collaborate more tightly, because we all know that AI still cannot replace human judgment, emotional intelligence, and creativity — at least not for now. Could there be a future where the product of a single human brain working with AI becomes better than collective human collaboration? Maybe. We will see. But that is a story for another time.&lt;/p&gt;

&lt;p&gt;My main takeaway is that AI tools are great. We should use them, and we need to use them more. But nothing is better than collective human work. Instead of forcing people to use AI tools and judging their engagement based on a single parameter, it is far more important to create space for experimentation and making mistakes. Because only in that process, there is a space for improvement, development, and real growth. &lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>workplace</category>
      <category>development</category>
    </item>
    <item>
      <title>Should I stay or should I go? Enums in TypeScript - error case study</title>
      <dc:creator>Konrad Krajewski</dc:creator>
      <pubDate>Tue, 21 May 2024 11:35:00 +0000</pubDate>
      <link>https://dev.to/konrad_winnicki/should-i-stay-or-should-i-go-enums-in-typescript-error-case-study-g6k</link>
      <guid>https://dev.to/konrad_winnicki/should-i-stay-or-should-i-go-enums-in-typescript-error-case-study-g6k</guid>
      <description>&lt;p&gt;The usage of enums in TypeScript is an ongoing debate. Voices for employing them as an integral part of the language can be found &lt;a href="https://bluepnume.medium.com/nine-terrible-ways-to-use-typescript-enums-and-one-good-way-f9c7ec68bf15" rel="noopener noreferrer"&gt;[Ref.]&lt;/a&gt;, as well as those arguing against &lt;a href="https://dev.to/ivanzm123/dont-use-enums-in-typescript-they-are-very-dangerous-57bh"&gt;[Ref.]&lt;/a&gt;.&lt;br&gt;
Here &lt;a href="https://www.youtube.com/watch?v=jjMbPt_H3RQ" rel="noopener noreferrer"&gt;[Ref.]&lt;/a&gt; you can find a very good set of bullet points which really convinces me why it is better to avoid enums in TypeScript.&lt;/p&gt;

&lt;p&gt;Furthermore, depending on whether you are using enums or enum-like objects, you may encounter different errors if something fails. These for enums may not be straightforward to grasp at first glance. I experienced this once when, during refactoring, accidentally part of code was moved to the top of the module, resulting in the enum being referenced before it was defined. Below you can find a simplified example ( &lt;code&gt;Object.values()&lt;/code&gt; method used to retrieve an enum properties is wrapped by the function):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getNodeEnvValues&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;NODE_ENV&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;getNodeEnvValues&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="kr"&gt;enum&lt;/span&gt; &lt;span class="nx"&gt;NODE_ENV&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;DEV&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;development&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;PROD&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;production&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you try to execute this code you will get a generic TypeError &lt;code&gt;Cannot convert undefined or null to object&lt;/code&gt;. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzpon4oy21j87qtlglas9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzpon4oy21j87qtlglas9.png" alt="Type error" width="800" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At first, when I saw the error I was thinking why the object which I have passed to the method is undefined. Looking at the enum definition I was trying to figure out what is really going on there. &lt;br&gt;
Then I realised that the error was telling the truth since the defined enum &lt;code&gt;NODE_ENV&lt;/code&gt; has not been reachable for the method (it was undefined at that point). However, this error may be a little confusing especially when the code is more complex. We get this error because Typescript enums are transpiled to a self-invoking function which creates key-value pairs object and assignates it to a var.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiujmfvpt8iyf7fu62ifa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiujmfvpt8iyf7fu62ifa.png" alt="Enum after transpulation" width="296" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the other hand using enum-like object in the same situation, we will get a ReferenceError which helps to more straightforwardly identify the nature of the error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getNodeEnvValues&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;NODE_ENV&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;getNodeEnvValues&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;NODE_ENV&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;DEV&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;development&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;PROD&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;production&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After executing the above code we will get: &lt;code&gt;Cannot access ‘NODE_ENV’ before initialization&lt;/code&gt;. The reference error gives you precise information indicating that the variable hasn't been declared or is out of scope.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7b25ltmv24wepcbgu557.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7b25ltmv24wepcbgu557.png" alt="Refference errro" width="800" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How about you? Are you using enums in TypeScript, or are you trying to avoid them?&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>enum</category>
      <category>case</category>
    </item>
  </channel>
</rss>
