<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tips on Romi's Dev Journey</title><link>https://romisugi.dev/tags/tips/</link><description>Recent content in Tips on Romi's Dev Journey</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sun, 24 Aug 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://romisugi.dev/tags/tips/index.xml" rel="self" type="application/rss+xml"/><item><title>How the Luhn Algorithm Saved Me from Card Number Typos in Python</title><link>https://romisugi.dev/posts/python-tips/luhn-algorithm-card-check/</link><pubDate>Sun, 24 Aug 2025 00:00:00 +0000</pubDate><guid>https://romisugi.dev/posts/python-tips/luhn-algorithm-card-check/</guid><description>&lt;p>Working at a bank, I deal with card numbers every day. I used to just trust that users (or even myself!) would enter the right numbers before sending them off to our APIs. But after a few embarrassing errors and wasted API calls, I discovered a simple trick that changed my workflow: the &lt;strong>Luhn algorithm&lt;/strong>.&lt;/p>
&lt;p>Let me share how this little-known tool saved me time, reduced errors, and made my Python scripts automation smarter!&lt;/p></description></item><item><title>How I Stopped Hardcoding Values in Python Scripts Using Enums</title><link>https://romisugi.dev/posts/python-tips/replace-hardcoded-values-with-enums/</link><pubDate>Sat, 05 Jul 2025 00:00:00 +0000</pubDate><guid>https://romisugi.dev/posts/python-tips/replace-hardcoded-values-with-enums/</guid><description>&lt;p>As someone who writes Python scripts to automate daily tasks, I’m always searching for ways to make my code more reliable and readable. Recently, I discovered a tool that’s been a total game-changer for my scripts: &lt;strong>Python Enums&lt;/strong>.&lt;/p>
&lt;p>Let me share how using Enums helped me avoid silly bugs, made my code easier to understand, and can do the same for you!&lt;/p>
&lt;h2 id="the-problem-magic-strings-and-numbers-everywhere">The Problem: Magic Strings and Numbers Everywhere&lt;/h2>
&lt;p>When I first started automating tasks, I often used plain strings or numbers to represent options or states. For example:&lt;/p></description></item><item><title>How Guarded Clauses Made My Python Scripts Cleaner</title><link>https://romisugi.dev/posts/python-tips/guarded-clauses/</link><pubDate>Fri, 27 Jun 2025 00:00:00 +0000</pubDate><guid>https://romisugi.dev/posts/python-tips/guarded-clauses/</guid><description>&lt;p>As someone who writes Python scripts to automate daily tasks, I’m always looking for ways to make my code simpler and easier to read. Recently, I stumbled upon a concept that completely changed how I structure my functions: &lt;strong>guarded clauses&lt;/strong> (also known as early returns).&lt;/p>
&lt;p>Let me share how this small shift made my scripts much cleaner—and why you might want to try it too.&lt;/p>
&lt;h2 id="the-problem-with-nested-if-else-blocks">The Problem with Nested If-Else Blocks&lt;/h2>
&lt;p>When I first started scripting, my functions often looked like this:&lt;/p></description></item><item><title>Using Keyword-Only Arguments for Clarity in Python</title><link>https://romisugi.dev/posts/python-tips/keyword-only-args/</link><pubDate>Fri, 20 Jun 2025 00:00:00 +0000</pubDate><guid>https://romisugi.dev/posts/python-tips/keyword-only-args/</guid><description>&lt;p>As a beginner in programming, I often write Python scripts to automate daily manual tasks. Early on, I struggled with confusing function arguments—especially when they were all similar types. After reading some documentation and making a few mistakes, I discovered &lt;strong>keyword-only arguments&lt;/strong>. This simple feature made my code much clearer and easier to use, so I want to share it with fellow beginners.&lt;/p>
&lt;h2 id="what-are-keyword-only-arguments">What Are Keyword-Only Arguments?&lt;/h2>
&lt;p>In Python, you can force some function arguments to be specified by name (as keywords) rather than by position. This is done by adding a &lt;code>*&lt;/code> in the function definition before those arguments:&lt;/p></description></item><item><title>Why I Switched to Pathlib for Python Path Operations</title><link>https://romisugi.dev/posts/python-tips/python-pathlib-vs-ospath/</link><pubDate>Sun, 15 Jun 2025 00:00:00 +0000</pubDate><guid>https://romisugi.dev/posts/python-tips/python-pathlib-vs-ospath/</guid><description>&lt;h2 id="why-i-switched-to-pathlib-for-python-path-operations">Why I Switched to Pathlib for Python Path Operations&lt;/h2>
&lt;p>As a fellow newbie in the programming world, I often find myself writing Python scripts to automate my daily manual tasks. One thing that always felt a bit clunky was dealing with file paths using &lt;code>os.path.join&lt;/code>. Recently, I discovered &lt;code>pathlib&lt;/code>, and it made my code much more intuitive and readable. I want to share my experience in case it helps other beginners!&lt;/p></description></item></channel></rss>