<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Blogs on Tomislav&#39;s Blog</title>
    <link>https://tmarice.dev/blog/</link>
    <description>Recent content in Blogs on Tomislav&#39;s Blog</description>
    <generator>Hugo -- 0.147.0</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 25 Nov 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://tmarice.dev/blog/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>The Illusion of Simplicity</title>
      <link>https://tmarice.dev/blog/the-illusion-of-simplicity/</link>
      <pubDate>Tue, 25 Nov 2025 00:00:00 +0000</pubDate>
      <guid>https://tmarice.dev/blog/the-illusion-of-simplicity/</guid>
      <description>&lt;p&gt;I really like Django. I would pick Django over any other option for setting up a website regardless of expected
complexity. In my opinion, if you fully embrace Django, it will allow you to focus on the product and not fight an
uphill battle against the computer.&lt;/p&gt;
&lt;p&gt;I do a bit of freelancing on the side, and it saddens me that I rarely see Django projects in the wild. Wherever I
join and I&amp;rsquo;m lucky enough that it&amp;rsquo;s a Python gig, it&amp;rsquo;s usually Flask or FastAPI.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vim Mandates &gt;&gt; AI Mandates</title>
      <link>https://tmarice.dev/blog/vim-mandates-gt-ai-mandates/</link>
      <pubDate>Tue, 16 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://tmarice.dev/blog/vim-mandates-gt-ai-mandates/</guid>
      <description>&lt;h2 id=&#34;intro&#34;&gt;Intro&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://x.com/tobi/status/1909251946235437514&#34;&gt;The internet&lt;/a&gt; &lt;a href=&#34;https://www.linkedin.com/posts/duolingo_below-is-an-all-hands-email-from-our-activity-7322560534824865792-l9vh/&#34;&gt;is full&lt;/a&gt; &lt;a href=&#34;https://x.com/michakaufman/status/1909610844008161380&#34;&gt;of articles&lt;/a&gt; &lt;a href=&#34;https://www.bloomberg.com/news/videos/2024-12-12/klarna-ceo-on-us-banking-ambitions-video&#34;&gt;on CEOs&lt;/a&gt; declaring their companies &amp;ldquo;AI-first&amp;rdquo;, in the name of increasing efficiency.
After all, why have 50 engineers if you can have 5 managing a swarm of AI agents?&lt;/p&gt;
&lt;p&gt;I am a heavy user of GenAI assistive tools and they truly do help me achieve results faster. But another thing that
helps you achieve results faster is not having to fight an uphill battle against whichever text editor you&amp;rsquo;re using.
If you have to lift your hands from the keyboard, you&amp;rsquo;re wasting time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Configuring PostgreSQL server parameters on GitHub Actions</title>
      <link>https://tmarice.dev/blog/configuring-postgres-on-github-actions/</link>
      <pubDate>Wed, 27 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://tmarice.dev/blog/configuring-postgres-on-github-actions/</guid>
      <description>&lt;p&gt;If your project is not fully containerized, but you still want to use PostgreSQL in your GitHub Actions workflow,
you can use the &lt;a href=&#34;https://docs.github.com/en/actions/tutorials/use-containerized-services&#34;&gt;&lt;code&gt;services&lt;/code&gt;&lt;/a&gt; feature of GitHub
Actions to easily spin up a PostgreSQL container.&lt;/p&gt;
&lt;p&gt;However, the &lt;code&gt;services&lt;/code&gt; functionality restricts what you can configure declaratively in the workflow file &amp;ndash; namely you
cannot configure the PostgreSQL server parameters that you would usually set up in the &lt;code&gt;postgresql.conf&lt;/code&gt; file.
Fortunately, most of these can be configured through &lt;code&gt;ALTER SYSTEM&lt;/code&gt; commands.&lt;/p&gt;</description>
    </item>
    <item>
      <title>On Usable Documentation</title>
      <link>https://tmarice.dev/blog/on-usable-documentation/</link>
      <pubDate>Sat, 29 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://tmarice.dev/blog/on-usable-documentation/</guid>
      <description>&lt;p&gt;Having no documentation is often less harmful than having inaccurate documentation.&lt;/p&gt;
&lt;p&gt;Like code, documentation degrades over time. What was once accurate may now be obsolete. And practices we once ignored
might now be part of our daily workflow. Unless maintaining documentation is an intentional process, it will rot, maybe
beyond saving.&lt;/p&gt;
&lt;p&gt;In this article I&amp;rsquo;ll outline a few guidelines that worked well for me in the past for keeping the developer
documentation usable. They&amp;rsquo;re certainly not universal, but they are a good starting point for a small team of
experienced developers. We’ll skip the philosophical debates and focus on real-world practices that work for small,
fast-moving engineering teams - the aim is to get the most value with the least effort. Documentation doesn&amp;rsquo;t pay the
bills.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Handling Csrf Login Errors Gracefully in Django</title>
      <link>https://tmarice.dev/blog/handling-csrf-login-errors-gracefully-in-django/</link>
      <pubDate>Sat, 22 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://tmarice.dev/blog/handling-csrf-login-errors-gracefully-in-django/</guid>
      <description>&lt;h1 id=&#34;whats-csrf&#34;&gt;What&amp;rsquo;s CSRF?&lt;/h1&gt;
&lt;p&gt;Cross site request forgery is a type of attack where a malicious website tricks a user into performing actions on
another site where they&amp;rsquo;re authenticated. This is usually done by embedding a form in the malicious site, and
submitting it to the target site.&lt;/p&gt;
&lt;p&gt;An example of this would be a card game website where, when you hit the &amp;ldquo;Play&amp;rdquo; button, it sends a POST request to
another site with the payload to change your login email address to the attacker&amp;rsquo;s. Since you&amp;rsquo;re logged in to the
target site, the request goes through and you lose access to your account.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Better Living Through Optimized Django</title>
      <link>https://tmarice.dev/blog/better-living-through-optimized-django/</link>
      <pubDate>Sat, 31 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://tmarice.dev/blog/better-living-through-optimized-django/</guid>
      <description>&lt;p&gt;Every engineer that loves Django and has a blog has at least one of these posts.&lt;/p&gt;
&lt;p&gt;Django&amp;rsquo;s ORM is excellent, but given enough time it&amp;rsquo;s easy for approaches that weren&amp;rsquo;t mistakes to grow into mistakes This is a great thing, because it usually means your company didn&amp;rsquo;t go bankrupt, you&amp;rsquo;re still here and can fix things, and the company is doing well because the scale increased (hopefully your compensation as well).&lt;/p&gt;</description>
    </item>
    <item>
      <title>On Python&#39;s @property Decorator</title>
      <link>https://tmarice.dev/blog/on-pythons-property-decorator/</link>
      <pubDate>Sun, 18 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://tmarice.dev/blog/on-pythons-property-decorator/</guid>
      <description>&lt;p&gt;&lt;code&gt;@property&lt;/code&gt; decorator is an excellent way to reduce the readability of Python code. It obfuscates a perfectly good
function call and tricks readers into thinking they&amp;rsquo;re performing a regular attribute access or assignment.&lt;/p&gt;
&lt;p&gt;Unless there&amp;rsquo;s a really good and explicit reason to do this, don&amp;rsquo;t.&lt;/p&gt;
&lt;h2 id=&#34;list-of-good-and-explicit-reasons&#34;&gt;List of Good and Explicit Reasons:&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Refactoring&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That&amp;rsquo;s pretty much it.&lt;/p&gt;
&lt;p&gt;If you need to turn something that (rightfully so) started out as a simple attribute, but with time accrued some more
complex logic, @property is a good way to gracefully transition from attributes to function calls.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why I Always Assign Intermediate Values to Local Variables Instead of Passing Them Directly to Function Calls</title>
      <link>https://tmarice.dev/blog/why-i-always-assign-intermediate-values-to-local-variables-instead-of-passing-them-directly-to-function-calls/</link>
      <pubDate>Wed, 29 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://tmarice.dev/blog/why-i-always-assign-intermediate-values-to-local-variables-instead-of-passing-them-directly-to-function-calls/</guid>
      <description>&lt;p&gt;Instead of&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;do_something&lt;/span&gt;(a, b, c):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; res_fn(
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        fn(a, b),
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        fn(b),
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        c
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I do:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;do_something&lt;/span&gt;(a, b, c):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    inter_1 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; fn(a, b)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    inter_2 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; fn(b)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    result &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; res_fn(inter_1, inter_2, c)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; result
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The first version is much shorter, and when formatted properly, equally readable.&lt;/p&gt;
&lt;p&gt;But the reason I prefer the second approach is because all intermediate steps are saved to local variables.&lt;/p&gt;
&lt;p&gt;Exception tracking tools like Sentry, and even Django&amp;rsquo;s error page that pops up when &lt;code&gt;DEBUG=True&lt;/code&gt; is set, capture the local context. On top of that, if you ever have to step through the function with a debugger, you can see the exact return value before stepping out from the function. This is the reason why I even save the final result in a local variable, just before returning it.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
