<?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"><channel><title><![CDATA[KS | blog | Learn, Unlearn, Repeat]]></title><description><![CDATA[Passionate Engineer, Empathetic Coach, Ambitious Human.]]></description><link>https://blog.karthickselvam.com</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Nov 2026 13:08:23 GMT</lastBuildDate><atom:link href="https://blog.karthickselvam.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Unique ID Generation Strategies: Comprehensive Comparison]]></title><description><![CDATA[Compare unique ID generation strategies (auto-increment, UUIDs, Snowflake, ULID, NanoID) across different use cases and databases]]></description><link>https://blog.karthickselvam.com/unique-id-generation-strategies-comprehensive-comparison</link><guid isPermaLink="true">https://blog.karthickselvam.com/unique-id-generation-strategies-comprehensive-comparison</guid><category><![CDATA[Databases]]></category><category><![CDATA[uuid-generation]]></category><category><![CDATA[snowflake]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Sun, 21 Dec 2025 05:39:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/lRoX0shwjUQ/upload/8735a0bdf0cb47b51635e214e8535ba1.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-quick-reference-summary">Quick Reference Summary</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>Sortable</td><td>Coordination</td><td>Best For</td></tr>
</thead>
<tbody>
<tr>
<td>Auto-increment</td><td>✅ Yes</td><td>❌ Required</td><td>Single DB, simple apps</td></tr>
<tr>
<td>UUID v4</td><td>❌ No</td><td>✅ None</td><td>General purpose, no ordering needs</td></tr>
<tr>
<td>UUID v7</td><td>✅ Yes</td><td>✅ None</td><td>Modern default choice</td></tr>
<tr>
<td>Snowflake</td><td>✅ Yes</td><td>⚠️ Worker ID</td><td>High-throughput distributed</td></tr>
<tr>
<td>ULID</td><td>✅ Yes</td><td>✅ None</td><td>Time-sorted, string-friendly</td></tr>
<tr>
<td>KSUID</td><td>✅ Yes</td><td>✅ None</td><td>Debuggable, longer timestamps</td></tr>
<tr>
<td>NanoID</td><td>❌ No</td><td>✅ None</td><td>Short URLs, tokens</td></tr>
<tr>
<td>CUID2</td><td>❌ No</td><td>✅ None</td><td>Security-focused, horizontal scale</td></tr>
<tr>
<td>ObjectID</td><td>✅ Yes</td><td>✅ None</td><td>MongoDB ecosystem</td></tr>
<tr>
<td>XID</td><td>✅ Yes</td><td>✅ None</td><td>Compact, globally unique</td></tr>
</tbody>
</table>
</div><hr />
<h2 id="heading-detailed-comparison-matrix">Detailed Comparison Matrix</h2>
<h3 id="heading-1-structure-amp-format">1. Structure &amp; Format</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>Bit Size</td><td>String Length</td><td>Format</td><td>Components</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Auto-increment</strong></td><td>32-64</td><td>1-20 chars</td><td>Decimal integer</td><td>Counter only</td></tr>
<tr>
<td><strong>UUID v1</strong></td><td>128</td><td>36 chars</td><td><code>8-4-4-4-12</code> hex</td><td>Timestamp + MAC + Clock seq</td></tr>
<tr>
<td><strong>UUID v4</strong></td><td>128</td><td>36 chars</td><td><code>8-4-4-4-12</code> hex</td><td>122 random bits + version</td></tr>
<tr>
<td><strong>UUID v6</strong></td><td>128</td><td>36 chars</td><td><code>8-4-4-4-12</code> hex</td><td>Reordered v1 (time-sortable)</td></tr>
<tr>
<td><strong>UUID v7</strong></td><td>128</td><td>36 chars</td><td><code>8-4-4-4-12</code> hex</td><td>Unix ms timestamp + random</td></tr>
<tr>
<td><strong>Snowflake</strong></td><td>64</td><td>19-20 chars</td><td>Decimal integer</td><td>Timestamp + Worker + Sequence</td></tr>
<tr>
<td><strong>ULID</strong></td><td>128</td><td>26 chars</td><td>Crockford Base32</td><td>48-bit time + 80-bit random</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>160</td><td>27 chars</td><td>Base62</td><td>32-bit time + 128-bit random</td></tr>
<tr>
<td><strong>NanoID</strong></td><td>Configurable</td><td>21 default</td><td>Base64 URL-safe</td><td>Pure random</td></tr>
<tr>
<td><strong>CUID2</strong></td><td>~192</td><td>24 chars</td><td>Base36</td><td>Hash of random + fingerprint + counter</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>96</td><td>24 chars</td><td>Hex</td><td>Timestamp + Machine + PID + Counter</td></tr>
<tr>
<td><strong>XID</strong></td><td>96</td><td>20 chars</td><td>Base32</td><td>Timestamp + Machine + PID + Counter</td></tr>
</tbody>
</table>
</div><h3 id="heading-2-sortability-amp-ordering">2. Sortability &amp; Ordering</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>Time Sortable</td><td>Lexicographically Sortable</td><td>Monotonic (same ms)</td><td>K-Sortable¹</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Auto-increment</strong></td><td>✅ Yes</td><td>✅ Yes (numeric)</td><td>✅ Yes</td><td>✅ Yes</td></tr>
<tr>
<td><strong>UUID v1</strong></td><td>⚠️ Partially²</td><td>❌ No</td><td>❌ No</td><td>❌ No</td></tr>
<tr>
<td><strong>UUID v4</strong></td><td>❌ No</td><td>❌ No</td><td>❌ No</td><td>❌ No</td></tr>
<tr>
<td><strong>UUID v6</strong></td><td>✅ Yes</td><td>✅ Yes</td><td>❌ No</td><td>✅ Yes</td></tr>
<tr>
<td><strong>UUID v7</strong></td><td>✅ Yes</td><td>✅ Yes</td><td>⚠️ Optional³</td><td>✅ Yes</td></tr>
<tr>
<td><strong>Snowflake</strong></td><td>✅ Yes</td><td>✅ Yes (numeric)</td><td>✅ Yes</td><td>✅ Yes</td></tr>
<tr>
<td><strong>ULID</strong></td><td>✅ Yes</td><td>✅ Yes</td><td>✅ Yes (incrementing random)</td><td>✅ Yes</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>✅ Yes</td><td>✅ Yes</td><td>❌ No</td><td>✅ Yes</td></tr>
<tr>
<td><strong>NanoID</strong></td><td>❌ No</td><td>❌ No</td><td>❌ No</td><td>❌ No</td></tr>
<tr>
<td><strong>CUID2</strong></td><td>❌ No</td><td>❌ No</td><td>❌ No</td><td>❌ No</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>✅ Yes</td><td>✅ Yes</td><td>✅ Yes</td><td>✅ Yes</td></tr>
<tr>
<td><strong>XID</strong></td><td>✅ Yes</td><td>✅ Yes</td><td>✅ Yes</td><td>✅ Yes</td></tr>
</tbody>
</table>
</div><blockquote>
<p>¹ K-Sortable: IDs generated within a time window sort together<br />² UUID v1 has timestamp but in wrong byte order for sorting<br />³ UUID v7 spec allows optional sub-millisecond precision or counter</p>
</blockquote>
<h3 id="heading-3-collision-resistance-amp-uniqueness">3. Collision Resistance &amp; Uniqueness</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>Random Bits</td><td>Collision Probability</td><td>IDs Before 50% Collision</td><td>Global Uniqueness</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Auto-increment</strong></td><td>0</td><td>N/A (sequential)</td><td>N/A</td><td>❌ Single source only</td></tr>
<tr>
<td><strong>UUID v1</strong></td><td>14</td><td>Very low (MAC-based)</td><td>N/A</td><td>✅ Yes (if MAC unique)</td></tr>
<tr>
<td><strong>UUID v4</strong></td><td>122</td><td>2.7×10⁻¹⁸ per pair</td><td>~2.7×10¹⁸</td><td>✅ Yes</td></tr>
<tr>
<td><strong>UUID v6</strong></td><td>62</td><td>Low</td><td>~10⁹ per ms</td><td>✅ Yes</td></tr>
<tr>
<td><strong>UUID v7</strong></td><td>62-74</td><td>Low</td><td>~10⁹ per ms</td><td>✅ Yes</td></tr>
<tr>
<td><strong>Snowflake</strong></td><td>0</td><td>None (if configured right)</td><td>N/A</td><td>⚠️ Requires worker coordination</td></tr>
<tr>
<td><strong>ULID</strong></td><td>80</td><td>1.2×10⁻²⁴ per ms</td><td>~10¹² per ms</td><td>✅ Yes</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>128</td><td>~10⁻³⁸ per pair</td><td>~10¹⁹</td><td>✅ Yes</td></tr>
<tr>
<td><strong>NanoID (21)</strong></td><td>126</td><td>~10⁻³⁸ per pair</td><td>~10¹⁹</td><td>✅ Yes</td></tr>
<tr>
<td><strong>CUID2</strong></td><td>~160</td><td>Extremely low</td><td>~10²⁴</td><td>✅ Yes</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>40</td><td>Low</td><td>~10⁶ per second</td><td>✅ Yes</td></tr>
<tr>
<td><strong>XID</strong></td><td>40</td><td>Low</td><td>~10⁶ per second</td><td>✅ Yes</td></tr>
</tbody>
</table>
</div><h3 id="heading-4-distributed-systems-properties">4. Distributed Systems Properties</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>Coordination Required</td><td>Network Roundtrip</td><td>Single Point of Failure</td><td>Datacenter Aware</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Auto-increment</strong></td><td>✅ Central DB</td><td>Yes</td><td>Yes</td><td>❌ No</td></tr>
<tr>
<td><strong>UUID v1</strong></td><td>❌ None</td><td>No</td><td>No</td><td>❌ No</td></tr>
<tr>
<td><strong>UUID v4</strong></td><td>❌ None</td><td>No</td><td>No</td><td>❌ No</td></tr>
<tr>
<td><strong>UUID v6</strong></td><td>❌ None</td><td>No</td><td>No</td><td>❌ No</td></tr>
<tr>
<td><strong>UUID v7</strong></td><td>❌ None</td><td>No</td><td>No</td><td>❌ No</td></tr>
<tr>
<td><strong>Snowflake</strong></td><td>⚠️ Worker ID setup</td><td>Initial only</td><td>No</td><td>✅ Yes (configurable)</td></tr>
<tr>
<td><strong>ULID</strong></td><td>❌ None</td><td>No</td><td>No</td><td>❌ No</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>❌ None</td><td>No</td><td>No</td><td>❌ No</td></tr>
<tr>
<td><strong>NanoID</strong></td><td>❌ None</td><td>No</td><td>No</td><td>❌ No</td></tr>
<tr>
<td><strong>CUID2</strong></td><td>❌ None</td><td>No</td><td>No</td><td>⚠️ Fingerprint-based</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>❌ None</td><td>No</td><td>No</td><td>⚠️ Machine ID</td></tr>
<tr>
<td><strong>XID</strong></td><td>❌ None</td><td>No</td><td>No</td><td>⚠️ Machine ID</td></tr>
</tbody>
</table>
</div><h3 id="heading-5-database-performance">5. Database Performance</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>B-Tree Insert Perf</td><td>Index Locality</td><td>Storage Efficiency</td><td>Primary Key Suitability</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Auto-increment</strong></td><td>⭐⭐⭐⭐⭐ Excellent</td><td>⭐⭐⭐⭐⭐ Perfect</td><td>⭐⭐⭐⭐⭐ Best</td><td>⭐⭐⭐⭐⭐ Ideal</td></tr>
<tr>
<td><strong>UUID v1</strong></td><td>⭐⭐ Poor</td><td>⭐⭐ Poor</td><td>⭐⭐ Large</td><td>⭐⭐ Problematic</td></tr>
<tr>
<td><strong>UUID v4</strong></td><td>⭐ Very Poor</td><td>⭐ Random scatter</td><td>⭐⭐ Large</td><td>⭐ Avoid if possible</td></tr>
<tr>
<td><strong>UUID v6</strong></td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐ Large</td><td>⭐⭐⭐⭐ Good</td></tr>
<tr>
<td><strong>UUID v7</strong></td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐ Large</td><td>⭐⭐⭐⭐ Good</td></tr>
<tr>
<td><strong>Snowflake</strong></td><td>⭐⭐⭐⭐⭐ Excellent</td><td>⭐⭐⭐⭐⭐ Excellent</td><td>⭐⭐⭐⭐⭐ Compact</td><td>⭐⭐⭐⭐⭐ Ideal</td></tr>
<tr>
<td><strong>ULID</strong></td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐⭐ Medium</td><td>⭐⭐⭐⭐ Good</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐ Large</td><td>⭐⭐⭐ Acceptable</td></tr>
<tr>
<td><strong>NanoID</strong></td><td>⭐ Very Poor</td><td>⭐ Random scatter</td><td>⭐⭐⭐⭐ Compact</td><td>⭐⭐ Not recommended</td></tr>
<tr>
<td><strong>CUID2</strong></td><td>⭐ Very Poor</td><td>⭐ Random scatter</td><td>⭐⭐⭐ Medium</td><td>⭐⭐ Not recommended</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐⭐⭐ Compact</td><td>⭐⭐⭐⭐ MongoDB native</td></tr>
<tr>
<td><strong>XID</strong></td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐⭐⭐ Good</td><td>⭐⭐⭐⭐⭐ Very compact</td><td>⭐⭐⭐⭐ Good</td></tr>
</tbody>
</table>
</div><h3 id="heading-6-security-amp-privacy">6. Security &amp; Privacy</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>Predictability</td><td>Information Leakage</td><td>Enumeration Risk</td><td>Timing Attack Surface</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Auto-increment</strong></td><td>⭐ Fully predictable</td><td>High (count, order)</td><td>⭐ Critical</td><td>Low</td></tr>
<tr>
<td><strong>UUID v1</strong></td><td>⭐⭐ Partially</td><td>High (MAC, time)</td><td>Low</td><td>High</td></tr>
<tr>
<td><strong>UUID v4</strong></td><td>⭐⭐⭐⭐⭐ Unpredictable</td><td>None</td><td>None</td><td>None</td></tr>
<tr>
<td><strong>UUID v6</strong></td><td>⭐⭐ Time-based</td><td>Medium (time)</td><td>Low</td><td>Medium</td></tr>
<tr>
<td><strong>UUID v7</strong></td><td>⭐⭐ Time-based</td><td>Medium (time)</td><td>Low</td><td>Medium</td></tr>
<tr>
<td><strong>Snowflake</strong></td><td>⭐⭐ Time-based</td><td>High (time, worker)</td><td>Low</td><td>High</td></tr>
<tr>
<td><strong>ULID</strong></td><td>⭐⭐ Time-based</td><td>Medium (time)</td><td>Low</td><td>Medium</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>⭐⭐ Time-based</td><td>Medium (time)</td><td>Low</td><td>Medium</td></tr>
<tr>
<td><strong>NanoID</strong></td><td>⭐⭐⭐⭐⭐ Unpredictable</td><td>None</td><td>None</td><td>None</td></tr>
<tr>
<td><strong>CUID2</strong></td><td>⭐⭐⭐⭐⭐ Unpredictable</td><td>None</td><td>None</td><td>None</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>⭐⭐ Time-based</td><td>Medium (time, machine)</td><td>Low</td><td>Medium</td></tr>
<tr>
<td><strong>XID</strong></td><td>⭐⭐ Time-based</td><td>Medium (time, machine)</td><td>Low</td><td>Medium</td></tr>
</tbody>
</table>
</div><h3 id="heading-7-practical-considerations">7. Practical Considerations</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>URL Safe</td><td>Case Sensitive</td><td>Human Readable</td><td>Copy-Paste Friendly</td><td>Standard/RFC</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Auto-increment</strong></td><td>✅ Yes</td><td>N/A</td><td>✅ Yes</td><td>✅ Yes</td><td>N/A</td></tr>
<tr>
<td><strong>UUID v1</strong></td><td>⚠️ Needs encoding</td><td>❌ No</td><td>⚠️ Long</td><td>⚠️ Hyphens</td><td>RFC 4122</td></tr>
<tr>
<td><strong>UUID v4</strong></td><td>⚠️ Needs encoding</td><td>❌ No</td><td>⚠️ Long</td><td>⚠️ Hyphens</td><td>RFC 4122</td></tr>
<tr>
<td><strong>UUID v6</strong></td><td>⚠️ Needs encoding</td><td>❌ No</td><td>⚠️ Long</td><td>⚠️ Hyphens</td><td>RFC 9562</td></tr>
<tr>
<td><strong>UUID v7</strong></td><td>⚠️ Needs encoding</td><td>❌ No</td><td>⚠️ Long</td><td>⚠️ Hyphens</td><td>RFC 9562</td></tr>
<tr>
<td><strong>Snowflake</strong></td><td>✅ Yes</td><td>N/A</td><td>✅ Yes</td><td>✅ Yes</td><td>Custom</td></tr>
<tr>
<td><strong>ULID</strong></td><td>✅ Yes</td><td>❌ No (uppercase)</td><td>✅ Yes</td><td>✅ Yes</td><td>Spec exists</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>✅ Yes</td><td>✅ Yes</td><td>✅ Yes</td><td>✅ Yes</td><td>Segment spec</td></tr>
<tr>
<td><strong>NanoID</strong></td><td>✅ Yes</td><td>✅ Yes</td><td>✅ Short</td><td>✅ Yes</td><td>Community</td></tr>
<tr>
<td><strong>CUID2</strong></td><td>✅ Yes</td><td>❌ No (lowercase)</td><td>✅ Yes</td><td>✅ Yes</td><td>Spec exists</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>✅ Yes</td><td>❌ No (lowercase)</td><td>⚠️ Medium</td><td>✅ Yes</td><td>MongoDB</td></tr>
<tr>
<td><strong>XID</strong></td><td>✅ Yes</td><td>❌ No (lowercase)</td><td>✅ Yes</td><td>✅ Yes</td><td>Community</td></tr>
</tbody>
</table>
</div><h3 id="heading-8-throughput-amp-performance">8. Throughput &amp; Performance</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>Generation Speed</td><td>Max IDs/ms (single node)</td><td>Clock Dependency</td><td>Batch Generation</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Auto-increment</strong></td><td>⭐⭐⭐ DB-limited</td><td>DB dependent</td><td>❌ No</td><td>⚠️ Gaps possible</td></tr>
<tr>
<td><strong>UUID v1</strong></td><td>⭐⭐⭐⭐ Fast</td><td>~16,384</td><td>✅ Yes</td><td>✅ Yes</td></tr>
<tr>
<td><strong>UUID v4</strong></td><td>⭐⭐⭐⭐⭐ Fastest</td><td>Unlimited</td><td>❌ No</td><td>✅ Yes</td></tr>
<tr>
<td><strong>UUID v6</strong></td><td>⭐⭐⭐⭐ Fast</td><td>~16,384</td><td>✅ Yes</td><td>✅ Yes</td></tr>
<tr>
<td><strong>UUID v7</strong></td><td>⭐⭐⭐⭐ Fast</td><td>Implementation-dependent</td><td>✅ Yes</td><td>✅ Yes</td></tr>
<tr>
<td><strong>Snowflake</strong></td><td>⭐⭐⭐⭐⭐ Very Fast</td><td>4,096</td><td>✅ Yes (strict)</td><td>✅ Yes</td></tr>
<tr>
<td><strong>ULID</strong></td><td>⭐⭐⭐⭐⭐ Very Fast</td><td>~2⁸⁰ theoretical</td><td>✅ Yes</td><td>✅ Yes</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>⭐⭐⭐⭐⭐ Very Fast</td><td>~2¹²⁸ per second</td><td>✅ Yes</td><td>✅ Yes</td></tr>
<tr>
<td><strong>NanoID</strong></td><td>⭐⭐⭐⭐⭐ Fastest</td><td>Unlimited</td><td>❌ No</td><td>✅ Yes</td></tr>
<tr>
<td><strong>CUID2</strong></td><td>⭐⭐⭐⭐ Fast</td><td>Unlimited</td><td>❌ No</td><td>✅ Yes</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>⭐⭐⭐⭐⭐ Very Fast</td><td>16,777,216</td><td>✅ Yes</td><td>✅ Yes</td></tr>
<tr>
<td><strong>XID</strong></td><td>⭐⭐⭐⭐⭐ Very Fast</td><td>16,777,216</td><td>✅ Yes</td><td>✅ Yes</td></tr>
</tbody>
</table>
</div><h3 id="heading-9-language-amp-library-support">9. Language &amp; Library Support</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>JavaScript/TS</td><td>Python</td><td>Java</td><td>Go</td><td>.NET</td><td>Rust</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Auto-increment</strong></td><td>N/A</td><td>N/A</td><td>N/A</td><td>N/A</td><td>N/A</td><td>N/A</td></tr>
<tr>
<td><strong>UUID v1-v4</strong></td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td></tr>
<tr>
<td><strong>UUID v6-v7</strong></td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐</td><td>⭐⭐⭐⭐</td></tr>
<tr>
<td><strong>Snowflake</strong></td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐</td><td>⭐⭐⭐⭐</td></tr>
<tr>
<td><strong>ULID</strong></td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐</td><td>⭐⭐⭐⭐</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>⭐⭐⭐</td><td>⭐⭐⭐</td><td>⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐</td><td>⭐⭐⭐</td></tr>
<tr>
<td><strong>NanoID</strong></td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td></tr>
<tr>
<td><strong>CUID2</strong></td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐</td><td>⭐⭐⭐</td><td>⭐⭐⭐</td><td>⭐⭐</td><td>⭐⭐⭐</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td></tr>
<tr>
<td><strong>XID</strong></td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐</td><td>⭐⭐⭐⭐⭐</td><td>⭐⭐⭐</td><td>⭐⭐⭐⭐</td></tr>
</tbody>
</table>
</div><hr />
<h2 id="heading-decision-matrix-by-use-case">Decision Matrix by Use Case</h2>
<h3 id="heading-primary-use-case-recommendations">Primary Use Case Recommendations</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Use Case</td><td>Recommended</td><td>Avoid</td><td>Reason</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Single DB, simple CRUD</strong></td><td>Auto-increment</td><td>UUID v4</td><td>Performance, simplicity</td></tr>
<tr>
<td><strong>Distributed microservices</strong></td><td>UUID v7, ULID, Snowflake</td><td>Auto-increment</td><td>No coordination needed</td></tr>
<tr>
<td><strong>High-write time-series</strong></td><td>Snowflake, ULID</td><td>UUID v4, NanoID</td><td>Index locality critical</td></tr>
<tr>
<td><strong>URL shorteners</strong></td><td>NanoID, custom Base62</td><td>UUID, KSUID</td><td>Length matters</td></tr>
<tr>
<td><strong>API tokens/secrets</strong></td><td>CUID2, NanoID</td><td>Snowflake, Auto-increment</td><td>Security, unpredictability</td></tr>
<tr>
<td><strong>Event sourcing</strong></td><td>UUID v7, ULID, Snowflake</td><td>UUID v4</td><td>Time ordering essential</td></tr>
<tr>
<td><strong>Multi-tenant SaaS</strong></td><td>Snowflake (tenant-prefixed), UUID v7</td><td>Auto-increment</td><td>Tenant isolation</td></tr>
<tr>
<td><strong>MongoDB native</strong></td><td>ObjectID</td><td>Others</td><td>Native support</td></tr>
<tr>
<td><strong>Cross-service correlation</strong></td><td>UUID v7, ULID</td><td>Auto-increment</td><td>Global uniqueness</td></tr>
<tr>
<td><strong>Debugging/logging</strong></td><td>KSUID, ULID</td><td>UUID v4</td><td>Human-readable timestamps</td></tr>
<tr>
<td><strong>Financial transactions</strong></td><td>UUID v7, Snowflake</td><td>NanoID</td><td>Audit trail, ordering</td></tr>
<tr>
<td><strong>Session IDs</strong></td><td>CUID2, NanoID</td><td>Auto-increment</td><td>Security</td></tr>
<tr>
<td><strong>Shard keys</strong></td><td>Snowflake, ULID</td><td>UUID v4</td><td>Predictable distribution</td></tr>
</tbody>
</table>
</div><h3 id="heading-database-specific-recommendations">Database-Specific Recommendations</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Database</td><td>Best Choice</td><td>Alternative</td><td>Notes</td></tr>
</thead>
<tbody>
<tr>
<td><strong>PostgreSQL</strong></td><td>UUID v7 (native), Snowflake</td><td>ULID</td><td>Native UUID type</td></tr>
<tr>
<td><strong>MySQL/MariaDB</strong></td><td>Snowflake (BIGINT)</td><td>UUID v7 (BINARY 16)</td><td>BIGINT more efficient</td></tr>
<tr>
<td><strong>MongoDB</strong></td><td>ObjectID</td><td>ULID</td><td>Native support</td></tr>
<tr>
<td><strong>Cassandra</strong></td><td>UUID v1/v7 (TIMEUUID)</td><td>Snowflake</td><td>Time-based partitioning</td></tr>
<tr>
<td><strong>DynamoDB</strong></td><td>ULID, KSUID</td><td>UUID v7</td><td>String keys, range queries</td></tr>
<tr>
<td><strong>Cosmos DB</strong></td><td>UUID v7, ULID</td><td>Snowflake</td><td>Partition key distribution</td></tr>
<tr>
<td><strong>Redis</strong></td><td>Snowflake, NanoID</td><td>ULID</td><td>Memory efficiency</td></tr>
<tr>
<td><strong>Elasticsearch</strong></td><td>ULID, UUID v7</td><td>Snowflake</td><td>Lexicographic sorting</td></tr>
</tbody>
</table>
</div><hr />
<h2 id="heading-clock-handling-considerations">Clock Handling Considerations</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>Clock Skew Handling</td><td>Clock Rollback Behavior</td><td>NTP Sensitivity</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Snowflake</strong></td><td>Wait or error</td><td>Can cause duplicates</td><td>⚠️ High</td></tr>
<tr>
<td><strong>ULID</strong></td><td>Increment random bits</td><td>Continues safely</td><td>⚠️ Medium</td></tr>
<tr>
<td><strong>UUID v7</strong></td><td>Implementation varies</td><td>Increment counter</td><td>⚠️ Medium</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>Uses random</td><td>Safe, possible reorder</td><td>⚠️ Low</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>Counter continues</td><td>Counter prevents collision</td><td>⚠️ Low</td></tr>
</tbody>
</table>
</div><hr />
<h2 id="heading-storage-requirements-comparison">Storage Requirements Comparison</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ID Type</td><td>Raw Bytes</td><td>As String</td><td>As BINARY in SQL</td><td>Annual Storage (1B records)</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Auto-increment (64-bit)</strong></td><td>8</td><td>19-20</td><td>8</td><td>~7.5 GB</td></tr>
<tr>
<td><strong>UUID</strong></td><td>16</td><td>36</td><td>16</td><td>~15 GB</td></tr>
<tr>
<td><strong>Snowflake</strong></td><td>8</td><td>19-20</td><td>8</td><td>~7.5 GB</td></tr>
<tr>
<td><strong>ULID</strong></td><td>16</td><td>26</td><td>16</td><td>~15 GB</td></tr>
<tr>
<td><strong>KSUID</strong></td><td>20</td><td>27</td><td>20</td><td>~18.6 GB</td></tr>
<tr>
<td><strong>NanoID (21)</strong></td><td>21</td><td>21</td><td>21</td><td>~19.5 GB</td></tr>
<tr>
<td><strong>CUID2</strong></td><td>24</td><td>24</td><td>24</td><td>~22.4 GB</td></tr>
<tr>
<td><strong>ObjectID</strong></td><td>12</td><td>24</td><td>12</td><td>~11.2 GB</td></tr>
<tr>
<td><strong>XID</strong></td><td>12</td><td>20</td><td>12</td><td>~11.2 GB</td></tr>
</tbody>
</table>
</div><hr />
<h2 id="heading-summary-when-to-use-what">Summary: When to Use What</h2>
<pre><code class="lang-plaintext">┌─────────────────────────────────────────────────────────────────┐
│                     DECISION FLOWCHART                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Need time-ordering? ──NO──► Need security? ──YES──► CUID2     │
│         │                          │                            │
│        YES                         NO                           │
│         │                          │                            │
│         ▼                          ▼                            │
│  High throughput? ──YES──► Snowflake                           │
│         │                                                       │
│        NO                   Need short URLs? ──YES──► NanoID   │
│         │                          │                            │
│         ▼                          NO                           │
│  Standard compliance? ──YES──► UUID v7                         │
│         │                          │                            │
│        NO                          ▼                            │
│         │                   Simple app? ──YES──► Auto-increment │
│         ▼                          │                            │
│  Debuggability? ──YES──► KSUID            NO                   │
│         │                          │                            │
│        NO                          ▼                            │
│         │                   MongoDB? ──YES──► ObjectID          │
│         ▼                          │                            │
│       ULID                        NO                            │
│                                    │                            │
│                                    ▼                            │
│                                  XID                            │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
</code></pre>
<hr />
<h2 id="heading-references">References</h2>
<ul>
<li><p>RFC 4122: UUID v1-v4 specification</p>
</li>
<li><p>RFC 9562: UUID v6, v7, v8 specification (2024)</p>
</li>
<li><p><a target="_blank" href="https://github.com/ulid/spec">ULID Spec</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/segmentio/ksuid">KSUID</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/ai/nanoid">NanoID</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/paralleldrive/cuid2">CUID2</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/twitter-archive/snowflake">Twitter Snowflake</a></p>
</li>
<li><p><a target="_blank" href="https://www.mongodb.com/docs/manual/reference/method/ObjectId/">MongoDB ObjectID</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/rs/xid">XID</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Removing a .env File from Git History]]></title><description><![CDATA[In this blog post, we will guide you through the process of safely removing a .env file from your Git history to protect your sensitive information. We…]]></description><link>https://blog.karthickselvam.com/removing-a-env-file-from-git-history</link><guid isPermaLink="true">https://blog.karthickselvam.com/removing-a-env-file-from-git-history</guid><category><![CDATA[dotenv]]></category><category><![CDATA[Git]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Sun, 21 May 2023 20:33:14 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/21mJd5NUGZU/upload/c3c115ee7598a416cbc4677b570d9153.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When working with Git, it's crucial to protect sensitive information such as access tokens, API keys, and passwords. One common practice is storing these secrets in a .env file, which is usually added to the repository for convenience. However, including the .env file in the Git history poses a security risk.</p>
<p>Remember, to prevent the .env file from being added to the Git history in the future, it is crucial to add it to your project's <code>.gitignore</code> file. By doing so, you can ensure that the file remains untracked and is not accidentally committed.</p>
<p>In this blog post, we will guide you through the process of safely removing a .env file from your Git history to protect your sensitive information. We will explore two approaches: using the <code>git filter-branch</code> and the <code>git rm</code> command.</p>
<p><em>Please note: This guide assumes you are familiar with Git and have the necessary permissions to modify the repository.</em></p>
<p><strong>Recover Your Repository:</strong> Before making any changes to your Git history, it's essential to recover your repository from a backup. This backup will serve as a safety net in case anything goes wrong during the process.</p>
<p><strong>Option 1:</strong> Using <code>git filter-branch</code>: The <code>git filter-branch</code> command allows you to rewrite the entire Git history and apply changes to each commit. Follow these steps to remove the .env file using <code>git filter-branch</code>:</p>
<ol>
<li><p>Run the following command to remove the .env file from Git history:</p>
<pre><code class="lang-bash"> $ git filter-branch --index-filter <span class="hljs-string">"git rm -rf --cached --ignore-unmatch .env"</span> HEAD
</code></pre>
<p> This command will remove the .env file from each commit in the repository's history.</p>
</li>
<li><p>Once the command completes, verify that the .env file is no longer present in the Git history by inspecting the repository's commit history.</p>
</li>
</ol>
<p><strong>Option 2:</strong> Using <code>git rm</code> Command: Another approach to remove the .env file from Git history is by using the <code>git rm</code> command. Follow these steps:</p>
<ol>
<li><p>Recover Your Repository: Before proceeding, make sure you have recovered your repository from a backup to ensure a safe recovery point.</p>
</li>
<li><p>Identify the Affected Commits: Run the following command to identify the commits that include changes related to the .env file:</p>
<pre><code class="lang-bash"> $ git <span class="hljs-built_in">log</span> --follow -- &lt;path_to_.env_file&gt;
</code></pre>
<p> Note down the commit hashes for the identified commits as you will need them in the next steps.</p>
</li>
<li><p>For each affected commit, follow these sub-steps:</p>
<p> a. Checkout the commit:</p>
<pre><code class="lang-bash"> $ git checkout &lt;commit_hash&gt;
</code></pre>
<p> b. Run the following command to remove the .env file:</p>
<pre><code class="lang-bash"> $ git rm --cached &lt;path_to_.env_file&gt;
</code></pre>
<p> This command will remove the .env file from the specific commit without modifying the other commits.</p>
<p> c. Commit the changes:</p>
<pre><code class="lang-bash"> $ git commit -m <span class="hljs-string">"Remove .env file from history"</span>
</code></pre>
<p> d. Repeat the above sub-steps for each affected commit, replacing <code>&lt;commit_hash&gt;</code> with the actual commit hash.</p>
</li>
<li><p>After removing the .env file from all affected commits, verify that the .env file is no longer present in the Git history by inspecting the repository's commit history.</p>
</li>
</ol>
<p>Verification: To ensure the .env file has been successfully removed from the Git history, perform the following steps:</p>
<ol>
<li><p>Clone the repository to a new directory or navigate to an existing local copy.</p>
</li>
<li><p>Inspect the commit history:</p>
<pre><code class="lang-bash"> $ git <span class="hljs-built_in">log</span> --follow -- &lt;path_to_.env_file&gt;
</code></pre>
<p> Verify that the .env file is no longer present in the commit history.</p>
</li>
</ol>
<hr />
<p>Conclusion: In this blog post, we explored two approaches: using <code>git filter-branch</code> and the <code>git rm</code> command.</p>
<p>You can use the <code>git filter-branch</code> command when you want to remove the .env file from the entire Git history. However, be aware that this approach can be resource-intensive for large repositories.</p>
<p>Alternatively, the <code>git rm</code> command allows you to remove the .env file from specific commits, which can be useful if you only want to remove it from a subset of commits.</p>
<p>Choose the approach that best suits your needs, and always remember to handle sensitive information with care and follow best practices to safeguard your projects.</p>
]]></content:encoded></item><item><title><![CDATA[Concurrency and parallelism in Rust vs Javascript]]></title><description><![CDATA[Concurrency and parallelism are related but distinct concepts in programming. Concurrency refers to the ability of a program to have multiple threads of…]]></description><link>https://blog.karthickselvam.com/concurrency-and-parallelism-in-rust-vs-javascript</link><guid isPermaLink="true">https://blog.karthickselvam.com/concurrency-and-parallelism-in-rust-vs-javascript</guid><category><![CDATA[Rust]]></category><category><![CDATA[rust lang]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[parallelism]]></category><category><![CDATA[concurrency]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Sat, 03 Dec 2022 11:23:05 GMT</pubDate><content:encoded><![CDATA[<p>Concurrency and parallelism are related but distinct concepts in programming. Concurrency refers to the ability of a program to have multiple threads of execution that run simultaneously, but not necessarily at the same time. This allows the program to handle multiple tasks or requests concurrently, without blocking or waiting for other tasks to complete.</p>
<p>Parallelism, on the other hand, refers to the ability of a program to execute multiple threads or tasks at the same time, using multiple CPU cores or other hardware resources. This can provide a performance boost by allowing the program to complete tasks faster, by dividing the work among multiple threads or cores.</p>
<p>Here is an example of concurrent and parallel code in Rust, compared to the same code in Javascript.</p>
<p>Rust:</p>
<pre><code class="lang-rust"><span class="hljs-keyword">use</span> std::thread;

<span class="hljs-comment">// This is a concurrent function that calculates the sum of a range of numbers.</span>
<span class="hljs-comment">// The function uses the rayon crate to parallelize the calculation across multiple threads.</span>
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">sum_range</span></span>(range: std::ops::Range&lt;<span class="hljs-built_in">i32</span>&gt;) -&gt; <span class="hljs-built_in">i32</span> {
  <span class="hljs-keyword">let</span> sum: <span class="hljs-built_in">i32</span> = range
    .into_par_iter() <span class="hljs-comment">// Convert the range into a parallel iterator.</span>
    .sum(); <span class="hljs-comment">// Calculate the sum in parallel using multiple threads.</span>
  sum
}

<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">main</span></span>() {
  <span class="hljs-comment">// Spawn two concurrent threads to calculate the sum of two different ranges of numbers.</span>
  <span class="hljs-keyword">let</span> thread1 = thread::spawn(|| sum_range(<span class="hljs-number">1</span>..<span class="hljs-number">100</span>));
  <span class="hljs-keyword">let</span> thread2 = thread::spawn(|| sum_range(<span class="hljs-number">101</span>..<span class="hljs-number">200</span>));

  <span class="hljs-comment">// Wait for the threads to complete and print the results.</span>
  <span class="hljs-built_in">println!</span>(<span class="hljs-string">"Thread 1 sum: {}"</span>, thread1.join().unwrap());
  <span class="hljs-built_in">println!</span>(<span class="hljs-string">"Thread 2 sum: {}"</span>, thread2.join().unwrap());
}
</code></pre>
<p>JavaScript:</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// This is a concurrent function that calculates the sum of a range of numbers.</span>
<span class="hljs-comment">// The function uses the async/await syntax to run the calculation asynchronously,</span>
<span class="hljs-comment">// allowing other tasks to run concurrently.</span>
<span class="hljs-keyword">async</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">sumRange</span>(<span class="hljs-params">range</span>) </span>{
  <span class="hljs-keyword">let</span> sum = <span class="hljs-number">0</span>;
  <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> i = range.start; i &lt; range.end; i++) {
    sum += i;
  }
  <span class="hljs-keyword">return</span> sum;
}

<span class="hljs-keyword">async</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-comment">// Run two concurrent tasks to calculate the sum of two different ranges of numbers.</span>
  <span class="hljs-keyword">const</span> sum1 = sumRange({ <span class="hljs-attr">start</span>: <span class="hljs-number">1</span>, <span class="hljs-attr">end</span>: <span class="hljs-number">100</span> });
  <span class="hljs-keyword">const</span> sum2 = sumRange({ <span class="hljs-attr">start</span>: <span class="hljs-number">101</span>, <span class="hljs-attr">end</span>: <span class="hljs-number">200</span> });

  <span class="hljs-comment">// Wait for the tasks to complete and print the results.</span>
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Sum 1: <span class="hljs-subst">${<span class="hljs-keyword">await</span> sum1}</span>`</span>);
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Sum 2: <span class="hljs-subst">${<span class="hljs-keyword">await</span> sum2}</span>`</span>);
}
main();
</code></pre>
<p>In the Rust code, the <code>sum_range</code> function uses the <code>rayon</code> crate to convert the input range into a parallel iterator, and to calculate the sum of the numbers in parallel using multiple threads. This allows the calculation to be done concurrently with other tasks, and to take advantage of multiple CPU cores or hardware threads to improve performance.</p>
<p>In the JavaScript code, the <code>sumRange</code> function uses the <code>async/await</code> syntax to run the calculation asynchronously, allowing other tasks to run concurrently. However, since JavaScript is a single-threaded language, the calculation is not actually executed in parallel. Instead, the JavaScript runtime uses a mechanism called "event loop" to switch between tasks and to allow them to run concurrently, without blocking or waiting for each other to complete.</p>
<p>Overall, both the Rust and JavaScript code use concurrency and asynchrony to allow multiple tasks to run concurrently, but only the Rust code uses parallelism to actually execute the tasks in parallel on multiple CPU cores or threads. This can provide a performance boost for certain types of workloads, but comes with additional complexity and challenges, such as managing shared resources and avoiding race conditions.</p>
]]></content:encoded></item><item><title><![CDATA[Avoiding code smells with clean code]]></title><description><![CDATA[Code smells are often referred to as symptoms because they indicate a deeper issue or problem in the codebase. Code smells are common patterns in software…]]></description><link>https://blog.karthickselvam.com/avoiding-code-smells-with-clean-code</link><guid isPermaLink="true">https://blog.karthickselvam.com/avoiding-code-smells-with-clean-code</guid><category><![CDATA[clean code]]></category><category><![CDATA[code smell]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Sat, 03 Dec 2022 10:29:32 GMT</pubDate><content:encoded><![CDATA[<p>Code smells are often referred to as symptoms because they indicate a deeper issue or problem in the codebase. Code smells are common patterns in software code that may indicate that the code is not well-designed, is difficult to understand or maintain, or may be prone to errors.</p>
<blockquote>
<p>“ Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn’t have to be that way ”</p>
<p>- Robert C. Martin from <a target="_blank" href="https://www.amazon.in/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882">Clean Code: A Handbook of Agile Software Craftsmanship.</a></p>
</blockquote>
<p>In Peer review, some common code smells can be identified,</p>
<ul>
<li><p>Long and complex functions: Functions that are too long or complex can be difficult to understand, maintain, and test. They may indicate that the code is not modular or well-structured, and that it could be refactored into smaller, more manageable units.</p>
</li>
<li><p>Duplicate code: Duplicate code is code that appears more than once in a system. It can indicate that the code is not modular or reusable, and that it could be refactored into a shared function or module.</p>
</li>
<li><p>Inefficient algorithms: Inefficient algorithms are algorithms that are not optimized for performance, often making them slow and resource-intensive. This can lead to code that is slow and unresponsive, and can make the application less scalable and performant.</p>
</li>
<li><p>Dead code: Dead code is code that is no longer used or needed in the codebase. This can make the codebase larger and more complex, and can lead to confusion and errors.</p>
</li>
<li><p>Unused parameters: Unused parameters are parameters in methods or functions that are never used or accessed. This can make the code harder to read and understand, and can lead to confusion and errors.</p>
</li>
<li><p>Tight coupling: Tight coupling is when different components of the system are tightly interconnected, such that a change in one component can have unintended consequences in other parts of the system. This can make the system difficult to modify and maintain, and can lead to fragility and fragility.</p>
</li>
<li><p>Lacking or inconsistent naming conventions: Poorly named variables, functions, or other code elements can make the code difficult to read and understand. Inconsistent naming conventions can also make the code harder to maintain, as it can be difficult to determine how different parts of the code relate to each other.</p>
</li>
</ul>
<p>I've added the list of more code smells at the end of this article, please comment if you think I've missed any.</p>
<p>To find these code smells during peer review, developers can use a variety of tools and techniques, such as code reviews, static analysis tools, or automated testing. These tools can help to identify potential code smells, as well as suggest ways to refactor the code to improve its quality and maintainability. In addition, developers can also use best practices, such as writing clean, modular, and well-documented code, to help prevent code smells from occurring in the first place.</p>
<p><strong>To write clean and modular code</strong>, there are a few best practices and techniques that can be useful. Some of these include:</p>
<ul>
<li><p>Write small, focused functions: Instead of writing long and complex functions that do many different things, try to break the code down into smaller, more focused functions that each do one thing. This will make the code easier to read, understand, and maintain.</p>
</li>
<li><p>Use descriptive and consistent naming conventions: Choose clear, descriptive, and consistent names for variables, functions, and other code elements. This will make the code easier to read and understand, and will help to prevent misunderstandings or confusion.</p>
</li>
<li><p>Use comments to explain the purpose and behavior of the code: Include comments in the code to explain why it is doing what it is doing, and how it works. This will make the code more self-documenting, and will help other developers (including future you) to understand and work with the code more easily.</p>
</li>
<li><p>Follow coding standards and style guides: Use a consistent coding style and follow established coding standards and style guides. This will make the code more consistent and readable, and will help to prevent common mistakes or errors.</p>
</li>
<li><p>Use modular and reusable code: Write modular code that can be easily reused in different parts of the system. This will help to reduce duplication and improve code maintainability.</p>
</li>
</ul>
<p><strong>An example of a code smell and clean code</strong> in JavaScript might look something like this:</p>
<p>Code smell:</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">processData</span>(<span class="hljs-params">data</span>) </span>{
  <span class="hljs-comment">// Check if the data is an array.</span>
  <span class="hljs-keyword">if</span> (<span class="hljs-built_in">Array</span>.isArray(data)) {
    <span class="hljs-comment">// If it is, loop through the array and process each item.</span>
    <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> i = <span class="hljs-number">0</span>; i &lt; data.length; i++) {
      <span class="hljs-keyword">const</span> item = data[i];
      <span class="hljs-comment">// Check if the item is an object.</span>
      <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> item === <span class="hljs-string">'object'</span>) {
        <span class="hljs-comment">// If it is, loop through the object properties and process each one.</span>
        <span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> key <span class="hljs-keyword">in</span> item) {
          <span class="hljs-keyword">if</span> (item.hasOwnProperty(key)) {
            <span class="hljs-keyword">const</span> value = item[key];
            <span class="hljs-comment">// Check if the property value is a string.</span>
            <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> value === <span class="hljs-string">'string'</span>) {
              <span class="hljs-comment">// If it is, do something with the string.</span>
              <span class="hljs-comment">// ...</span>
            }
          }
        }
      }
    }
  }
}
</code></pre>
<p>Clean code:</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">processStrings</span>(<span class="hljs-params">strings</span>) </span>{
  <span class="hljs-comment">// Loop through the array of strings and do something with each one.</span>
  <span class="hljs-comment">// ...</span>
}

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">processData</span>(<span class="hljs-params">data</span>) </span>{
  <span class="hljs-comment">// Check if the data is an array.</span>
  <span class="hljs-keyword">if</span> (<span class="hljs-built_in">Array</span>.isArray(data)) {
    <span class="hljs-comment">// If it is, extract the strings from the array and pass them to the processStrings function.</span>
    <span class="hljs-keyword">const</span> strings = data.filter(<span class="hljs-function"><span class="hljs-params">item</span> =&gt;</span> <span class="hljs-keyword">typeof</span> item === <span class="hljs-string">'object'</span>)
                       .map(<span class="hljs-function"><span class="hljs-params">item</span> =&gt;</span> item[key])
                       .filter(<span class="hljs-function"><span class="hljs-params">value</span> =&gt;</span> <span class="hljs-keyword">typeof</span> value === <span class="hljs-string">'string'</span>);
    processStrings(strings);
  }
}
</code></pre>
<p>The code smell example is long, complex, and difficult to read and understand. It contains multiple nested loops and conditional statements, which make it hard to see what the code is actually doing. Additionally, the code is not modular or reusable, as it is tightly coupled to the specific data structure and input.</p>
<p>In contrast, the clean code example is shorter, simpler, and easier to read and understand. It uses functional programming techniques, such as filtering and mapping, to extract the relevant strings from the data, and passes them to a separate function for processing. This makes the code more modular, reusable, and maintainable. It also makes it easier to test and extend, as the individual functions can be tested and modified independently.</p>
<p>By following these best practices and techniques, developers can write clean and modular code in JavaScript that is easy to read, understand, and maintain. This will help to improve the overall quality and reliability of the code, and will make it easier to add new features and capabilities in the future.</p>
<p>More code smells,</p>
<ul>
<li><p>Magic numbers</p>
</li>
<li><p>Inappropriate intimacy</p>
</li>
<li><p>Lack of cohesion</p>
</li>
<li><p>Divergent change</p>
</li>
<li><p>Shotgun surgery</p>
</li>
<li><p>Cyclic dependencies</p>
</li>
<li><p>Golden hammer</p>
</li>
<li><p>Misplaced responsibility</p>
</li>
<li><p>Data clumps</p>
</li>
<li><p>Primitive obsession</p>
</li>
<li><p>Switch statements</p>
</li>
<li><p>Lazy class</p>
</li>
<li><p>Refused bequest</p>
</li>
<li><p>God class</p>
</li>
<li><p>Speculative generality</p>
</li>
<li><p>Temporal coupling</p>
</li>
<li><p>Middle man</p>
</li>
<li><p>Incomplete library class</p>
</li>
<li><p>Data class</p>
</li>
</ul>
<p>If you enjoyed this post on code smells and want to learn more, let me know in the comments which code smell you would like to see me cover next! I will do my best to include it in a future post.</p>
]]></content:encoded></item><item><title><![CDATA[Story points estimation in SCRUM]]></title><description><![CDATA[Story point estimation is a method used in the Scrum software development process to estimate the relative size and complexity of a user story. User…]]></description><link>https://blog.karthickselvam.com/story-points-estimation-in-scrum</link><guid isPermaLink="true">https://blog.karthickselvam.com/story-points-estimation-in-scrum</guid><category><![CDATA[Estimation]]></category><category><![CDATA[storypoint]]></category><category><![CDATA[Scrum]]></category><category><![CDATA[agile]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Sat, 03 Dec 2022 10:08:22 GMT</pubDate><content:encoded><![CDATA[<p>Story point estimation is a method used in the Scrum software development process to estimate the relative size and complexity of a user story. User stories are brief descriptions of a desired functionality or feature from the perspective of the end user. In Scrum, teams use story points to estimate how long it will take to complete a user story, as well as to compare the relative size and complexity of different stories.</p>
<p>To estimate a user story using story points, teams typically use a point scale, such as the Fibonacci sequence (1, 2, 3, 5, 8, 13, etc.), to assign a numerical value to each story. The values in the scale represent the relative size and complexity of the user story, with higher numbers indicating larger and more complex stories. The team will then discuss and agree on the appropriate story point value for each user story.</p>
<p>The <strong>benefits</strong> of story point estimation in the Scrum process include:</p>
<ul>
<li><p>Providing a common language and understanding for team members: By using a standard scale for story point estimation, all team members can understand the relative size and complexity of user stories. This can help improve communication and collaboration within the team.</p>
</li>
<li><p>Allowing for more accurate forecasting and planning: By estimating the relative size and complexity of user stories, teams can more accurately forecast the amount of work they can complete in a given time period. This can help with planning and prioritization of work.</p>
</li>
<li><p>Improving transparency and accountability: Story point estimation can help make the team's progress and productivity more transparent, as it provides a common metric for measuring the amount of work completed. This can help improve accountability within the team.</p>
</li>
</ul>
<p>Some <strong>challenges and drawbacks</strong> of story point estimation in the Scrum process include:</p>
<ul>
<li><p>Subjectivity and bias: The process of assigning points to user stories can be subjective and may be influenced by personal biases. This can lead to inconsistency and disagreement within the team.</p>
</li>
<li><p>Loss of focus on the user's needs: By focusing on estimating the size and complexity of user stories, teams may lose sight of the user's needs and goals. This can lead to a lack of alignment between the team's work and the user's expectations.</p>
</li>
<li><p>Misuse and over-reliance on points: Teams may misuse or over-rely on points, using them as a measure of individual or team performance rather than as a tool for forecasting and planning. This can lead to unhealthy competition and a lack of focus on the team's goals.</p>
</li>
</ul>
<h3 id="heading-pointing-poker">Pointing Poker</h3>
<p>Pointing poker is a tool that teams can use to estimate story points. It is a collaborative, game-like method for teams to estimate the effort required for user stories. In pointing poker, each team member is given a deck of cards with numbers on them, representing different levels of effort. The team discusses the user story and each member privately selects a card to represent their estimate. The cards are then revealed, and the team discusses any differences in the estimates and reaches a consensus on the final estimate.</p>
<p>Using pointing poker for story point estimation has several advantages. First, it is a collaborative process, which helps to ensure that all team members have a shared understanding of the user story and the effort required to complete it. Second, it can help to reduce bias and ensure that estimates are based on objective criteria, rather than individual opinions. Third, it is a quick and efficient way to estimate story points, which can help teams to plan and prioritize their work effectively. Overall, pointing poker is a useful tool for teams that use Scrum to manage their projects.</p>
<h3 id="heading-anti-patterns">Anti-patterns</h3>
<p>One common anti-pattern in story point estimation is the use of a linear scale, where each story point represents a fixed amount of time or effort. This can be problematic because it ignores the inherent uncertainty and variability in software development, and can lead to unrealistic expectations and inaccurate estimates.</p>
<p>Another common anti-pattern is the use of velocities, which are the average number of story points completed in a sprint. This can be problematic because it can create pressure on teams to consistently deliver the same amount of work each sprint, which can lead to suboptimal decision making and reduced flexibility.</p>
<blockquote>
<p>"Estimation is neither good or bad. If you can work effectively without estimation, then go ahead and do without it. If you think you need some estimates, then make sure you understand their role in decision making. If they are going to affect significant decisions then go ahead and make the best estimates you can. Above all be wary of anyone who tells you they are always needed, or never needed."</p>
<p>- Martin Fowler</p>
</blockquote>
<p><em>Overall</em>, it's important for teams to use story point estimation in a way that accurately reflects the inherent uncertainty and variability in software development, and to avoid common anti-patterns that can lead to unrealistic expectations and inaccurate estimates.</p>
]]></content:encoded></item><item><title><![CDATA[Learn to be comfortable with uncertainty]]></title><description><![CDATA[Being comfortable with uncertainty means being able to handle situations that are unpredictable or unknown without becoming overly anxious or stressed…]]></description><link>https://blog.karthickselvam.com/learn-to-be-comfortable-with-uncertainty</link><guid isPermaLink="true">https://blog.karthickselvam.com/learn-to-be-comfortable-with-uncertainty</guid><category><![CDATA[mindfulness]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Fri, 02 Dec 2022 17:37:02 GMT</pubDate><content:encoded><![CDATA[<p>Being comfortable with uncertainty means being able to handle situations that are unpredictable or unknown without becoming overly anxious or stressed. It's an important skill to have, as uncertainty is a natural part of life and we can't always control what happens.</p>
<p>Here are some tips for learning to be comfortable with uncertainty:</p>
<ul>
<li><p>Accept that uncertainty is a normal part of life and we can't always control what happens.</p>
</li>
<li><p>Focus on what you can control, such as your thoughts, actions, and responses to events.</p>
</li>
<li><p>Practice mindfulness and stay present in the moment, rather than worrying about the future or dwelling on the past.</p>
</li>
<li><p>Be open to new experiences and opportunities, even if they are outside of your comfort zone.</p>
</li>
<li><p>Develop a growth mindset and believe in your ability to learn and adapt to new situations.</p>
</li>
<li><p>Seek support from others when needed, such as friends, family, or a therapist.</p>
</li>
</ul>
<p>So learning to be comfortable with uncertainty involves accepting that uncertainty is a natural part of life, focusing on what you can control, practicing mindfulness, being open to new experiences, developing a growth mindset, and seeking support from others. By working on these areas, you can learn to handle uncertainty with confidence and resilience.</p>
]]></content:encoded></item><item><title><![CDATA[Be ambitious yet humble]]></title><description><![CDATA[Being ambitious means having a strong desire to achieve success and make progress in your personal and professional life. Being humble, on the other hand…]]></description><link>https://blog.karthickselvam.com/be-ambitious-yet-humble</link><guid isPermaLink="true">https://blog.karthickselvam.com/be-ambitious-yet-humble</guid><category><![CDATA[humble]]></category><category><![CDATA[ambitious]]></category><category><![CDATA[Software Engineering]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Fri, 02 Dec 2022 17:32:40 GMT</pubDate><content:encoded><![CDATA[<p>Being ambitious means having a strong desire to achieve success and make progress in your personal and professional life. Being humble, on the other hand, means having a modest and respectful attitude towards others.</p>
<p>It is possible to be ambitious and humble at the same time. Here are some tips for being ambitious yet humble:</p>
<ul>
<li><p>Focus on your goals and work hard to achieve them, but also be open to feedback and learning from others.</p>
</li>
<li><p>Celebrate your successes and accomplishments, but also recognize the contributions of others and give them credit for their work.</p>
</li>
<li><p>Take ownership of your mistakes and learn from them, rather than making excuses or blaming others.</p>
</li>
<li><p>Be confident in your abilities and know your worth, but also be humble and willing to listen to others and consider their perspectives.</p>
</li>
<li><p>Be proud of your achievements and strive for excellence, but also be humble and gracious towards others, regardless of their status or position.</p>
</li>
</ul>
<p>being ambitious yet humble involves balancing a strong desire to achieve success with a modest and respectful attitude towards others. By focusing on these qualities, you can pursue your goals with determination and confidence, while also being open to learning and collaborating with others.</p>
]]></content:encoded></item><item><title><![CDATA[Daily routine of an Engineering Manager]]></title><description><![CDATA[As an engineering manager managing multiple teams, your daily routines will likely be focused on supporting the success of your teams and ensuring that…]]></description><link>https://blog.karthickselvam.com/daily-routine-of-an-engineering-manager</link><guid isPermaLink="true">https://blog.karthickselvam.com/daily-routine-of-an-engineering-manager</guid><category><![CDATA[Software Engineering]]></category><category><![CDATA[management]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Fri, 02 Dec 2022 17:29:29 GMT</pubDate><content:encoded><![CDATA[<p>As an engineering manager managing multiple teams, your daily routines will likely be focused on supporting the success of your teams and ensuring that they are working effectively together. Here are some key activities that you may engage in on a daily basis.</p>
<p>First, you will spend time meeting with the members of your teams to discuss their progress and challenges. This can involve one-on-one meetings with individual team members, as well as regular team meetings where you can discuss progress, priorities, and any issues that need to be addressed.</p>
<p>Second, you will likely spend time working with other managers and stakeholders within your organization to coordinate the work of your teams and ensure that they are aligned with broader business goals and objectives. This can involve attending meetings, providing updates on your teams' progress, and collaborating with other managers on initiatives and projects.</p>
<p>Third, you will need to support the career development of your team members. This can involve providing guidance and mentorship, helping team members set goals and objectives, and providing feedback on their performance. It can also involve working with HR to provide training and development opportunities for your team members.</p>
<p>Finally, you will need to manage your own time and priorities effectively in order to balance the demands of your multiple teams. This can involve setting aside dedicated time for specific tasks, such as meetings or administrative tasks, and prioritizing the most important tasks and projects.</p>
<p>In conclusion, the daily routines of an engineering manager managing multiple teams will involve supporting the success of your teams, coordinating with other managers and stakeholders, supporting the career development of your team members, and managing your own time and priorities. By focusing on these activities, you can ensure that your teams are working effectively together and achieving their goals.</p>
]]></content:encoded></item><item><title><![CDATA[How to transition from being an individual contributor to engineering manager]]></title><description><![CDATA[Making the transition from being an individual contributor to an engineering manager can be a challenging but rewarding experience. As an individual…]]></description><link>https://blog.karthickselvam.com/how-to-transition-from-being-an-individual-contributor-to-engineering-manager</link><guid isPermaLink="true">https://blog.karthickselvam.com/how-to-transition-from-being-an-individual-contributor-to-engineering-manager</guid><category><![CDATA[Software Engineering]]></category><category><![CDATA[management]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Fri, 02 Dec 2022 17:24:00 GMT</pubDate><content:encoded><![CDATA[<p>Making the transition from being an individual contributor to an engineering manager can be a challenging but rewarding experience. As an individual contributor, you are focused on the technical aspects of your work, such as writing code and implementing features. As an engineering manager, you are responsible for leading and managing a team of engineers, and your focus shifts to people and process.</p>
<p>If you are considering making the transition from an individual contributor to an engineering manager, here are some key steps you can take to prepare yourself for the role.</p>
<p>First, start learning about the skills and knowledge that are required to be a successful engineering manager. This includes technical skills, such as understanding the latest developments in software engineering, as well as non-technical skills, such as leadership, communication, and conflict resolution. There are many resources available to help you learn about these skills, such as books, courses, and mentorship programs.</p>
<p>Second, seek out opportunities to gain experience in leadership and management. This can involve taking on additional responsibilities within your current team, such as leading a project or mentoring a junior engineer. It can also involve volunteering for leadership roles outside of your team, such as organizing a conference or mentoring a new employee. These experiences will help you develop the skills and confidence you need to be an effective engineering manager.</p>
<p>Third, start networking and building relationships with other engineering managers. These relationships can be a valuable source of support, advice, and mentorship as you make the transition to the role. You can connect with other engineering managers through professional organizations, conferences, and online communities.</p>
<p>In conclusion, making the transition from an individual contributor to an engineering manager requires learning new skills, gaining experience in leadership and management, and building relationships with other engineering managers. By taking these steps, you can prepare yourself for the challenges and opportunities of the role and succeed as an engineering manager.</p>
]]></content:encoded></item><item><title><![CDATA[How to choose the right technology stack as a software architect]]></title><description><![CDATA[As a software architect, one of the most important decisions you will make is choosing the right technology stack for your project. The technology stack…]]></description><link>https://blog.karthickselvam.com/how-to-choose-the-right-technology-stack-as-a-software-architect</link><guid isPermaLink="true">https://blog.karthickselvam.com/how-to-choose-the-right-technology-stack-as-a-software-architect</guid><category><![CDATA[Software Engineering]]></category><category><![CDATA[software architecture]]></category><category><![CDATA[technology]]></category><category><![CDATA[tech stacks]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Fri, 02 Dec 2022 17:19:40 GMT</pubDate><content:encoded><![CDATA[<p>As a software architect, one of the most important decisions you will make is choosing the right technology stack for your project. The technology stack refers to the combination of programming languages, frameworks, and tools that you will use to build your software.</p>
<p>Choosing the right technology stack can be a challenging task, as there are many factors to consider and a wide range of options to choose from. Here are some key considerations to keep in mind when choosing the right technology stack for your project.</p>
<p>First, consider the requirements of your project. What are the specific needs and constraints of your project, such as performance, scalability, security, and integrations with other systems? Based on these requirements, you can narrow down the options and choose a technology stack that is well-suited to your specific needs.</p>
<p>Second, consider the skills and expertise of your team. What are the strengths and weaknesses of your team, and what technology stack will they be able to work with effectively? It's important to choose a technology stack that aligns with the skills and expertise of your team, so that they can be productive and successful.</p>
<p>Third, consider the broader ecosystem and community around the technology stack. Is the technology stack well-supported by a large and active community, with resources such as documentation, tutorials, and forums? A strong ecosystem and community can be a valuable resource for solving problems and getting help when you need it.</p>
<p>In conclusion, choosing the right technology stack as a software architect requires careful consideration of the requirements of your project, the skills and expertise of your team, and the broader ecosystem and community around the technology stack. By taking these factors into account, you can make an informed decision and choose a technology stack that will support the success of your project.</p>
]]></content:encoded></item><item><title><![CDATA[Being a better Senior Software Engineer (full-stack)]]></title><description><![CDATA[As a senior full-stack software engineer, you are responsible for the overall design and architecture of a project, from the front-end user interface to…]]></description><link>https://blog.karthickselvam.com/being-a-better-senior-software-engineer-full-stack</link><guid isPermaLink="true">https://blog.karthickselvam.com/being-a-better-senior-software-engineer-full-stack</guid><category><![CDATA[SSE]]></category><category><![CDATA[being-better]]></category><category><![CDATA[Software Engineering]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Fri, 02 Dec 2022 17:16:13 GMT</pubDate><content:encoded><![CDATA[<p>As a senior full-stack software engineer, you are responsible for the overall design and architecture of a project, from the front-end user interface to back-end server-side logic. This means having a broad range of skills and knowledge, from HTML and CSS for building user interfaces, to JavaScript and SQL for implementing logic and interacting with databases.</p>
<p>To be a better senior full-stack software engineer, there are a few key things you can do.</p>
<p>First, it's important to continuously learn and stay up to date with the latest developments in your field. The world of technology is constantly changing, and it's up to you to keep up with the latest trends and best practices. This means reading technical articles, attending conferences and workshops, and experimenting with new technologies and techniques.</p>
<p>Second, it's important to have strong problem-solving skills. As a senior full-stack software engineer, you will likely be faced with complex challenges that require creative solutions. You should be able to break down a problem into smaller pieces, analyze the different components, and come up with a plan to solve it.</p>
<p>Third, good communication skills are essential. As a senior full-stack software engineer, you will be working with a team of other developers, as well as potentially with non-technical stakeholders such as product managers and designers. You need to be able to clearly communicate your ideas and thoughts, as well as be able to listen to others and incorporate their feedback into your work.</p>
<p>Finally, it's important to have a strong focus on quality. As a senior full-stack software engineer, you are responsible for the overall design and architecture of a project, and it's up to you to ensure that the final product is reliable, efficient, and easy to use. This means writing clean, well-documented code, conducting thorough testing, and working closely with the rest of the team to ensure that everyone is on the same page.</p>
<p>In conclusion, being a better senior full-stack software engineer requires continuous learning, strong problem-solving skills, good communication, and a focus on quality. By working on these areas, you can improve your skills and knowledge, and ultimately deliver better products for your clients and users.</p>
]]></content:encoded></item><item><title><![CDATA[Being a Better Software Engineering Manager]]></title><description><![CDATA[As a software engineering manager, your primary responsibility is to lead, manage, and motivate your team to deliver high-quality software solutions. This…]]></description><link>https://blog.karthickselvam.com/being-a-better-software-engineering-manager</link><guid isPermaLink="true">https://blog.karthickselvam.com/being-a-better-software-engineering-manager</guid><category><![CDATA[engineering manager]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Fri, 02 Dec 2022 16:54:40 GMT</pubDate><content:encoded><![CDATA[<p>As a software engineering manager, your primary responsibility is to lead, manage, and motivate your team to deliver high-quality software solutions. This requires a wide range of skills, from technical expertise, to project management, communication and leadership.</p>
<p>To be a better software engineering manager, here are some key tips and best practices to keep in mind:</p>
<ol>
<li><p>Focus on results. As a software engineering manager, it's important to focus on the outcomes and results that your team is delivering, rather than on the process and the details. This means setting clear and measurable goals for your team and tracking their progress towards those goals. It also means being open to new ideas and approaches, and adapting to changing circumstances.</p>
</li>
<li><p>Communicate effectively. Effective communication is essential for successful software engineering management. This means being clear and concise in your instructions and expectations and making sure that your team understands what they need to do and why. It also means being available and approachable, and being willing to listen to and address their concerns and feedback.</p>
</li>
<li><p>Build trust and respect. Trust and respect are essential for building a cohesive and effective team. As a software engineering manager, you need to earn the trust and respect of your team members, by being fair and consistent in your decisions and actions, and by treating them with respect and professionalism. This will help to create a positive and productive team environment, and it will foster collaboration and teamwork.</p>
</li>
<li><p>Be a mentor and a coach. As a software engineering manager, you are not only responsible for managing your team, but also for helping them to grow and develop as professionals. This means providing them with opportunities to learn and improve, and giving them constructive feedback and guidance. It also means being a mentor and a coach and helping them to overcome challenges and achieve their goals.</p>
</li>
<li><p>Embrace change and innovation. The world of software engineering is constantly evolving, and it's important for managers to keep up with the latest trends and technologies. As a software engineering manager, you need to be open to new ideas and approaches, and be willing to try new things. This means staying current with the latest developments in your field, and being open to experimentation and innovation.</p>
</li>
</ol>
<p>Overall, being a better software engineering manager requires a combination of technical expertise, leadership, and communication skills. By focusing on results, communicating effectively, building trust and respect, being a mentor and a coach, and embracing change and innovation, you can lead your team to success and help them to grow and develop as professionals.</p>
]]></content:encoded></item><item><title><![CDATA[Cultivating desirable organisational culture in remote teams!]]></title><description><![CDATA[A simple, scalable approach on how to drive cultural change during this post pandemic era!]]></description><link>https://blog.karthickselvam.com/cultivating-desirable-organisational-culture-in-remote-teams</link><guid isPermaLink="true">https://blog.karthickselvam.com/cultivating-desirable-organisational-culture-in-remote-teams</guid><category><![CDATA[Culture]]></category><category><![CDATA[management]]></category><category><![CDATA[team]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[agile]]></category><dc:creator><![CDATA[Karthick Selvam]]></dc:creator><pubDate>Wed, 08 Sep 2021 11:14:16 GMT</pubDate><content:encoded><![CDATA[<p>Culture is key to success of any organisation which depends on human productivity!
Building a desirable culture in a small group is possible with some effort, but once into a fast expansion phase it will get very difficult. The same practices which previously helped in propagating the culture to a smaller group may not be affordable or scalable to a bigger group! Adding to that when we have Work From Home adopted widely, it gets even more challenging in propagating the desired culture! </p>
<p>So let us try to arrive at a systematic approach which is scalable and also which helps virtual work environment as well. </p>
<p>Before we talk about culture it is important to have clear understanding on individual human characteristics i.e as an individual what defines our character? </p>
<p><code>Our Behaviours and Decisions</code> </p>
<p>And why do we behave in a certain way? what guides our judgement towards those decision? </p>
<p><code>Our Internal Value system</code> </p>
<p>These are our core values inculcated into our mind, influenced by the beliefs and memories of positive / negative reinforcement from our surroundings during different situations so far in our life!</p>
<p>Now getting back to Culture, whenever we mention culture what do we actually mean? </p>
<p><code>Culture is the characteristics of a particular group of people!</code> </p>
<p>This group of people can be of any social arrangement like a family, community, region, religion and also of an <strong>organisation</strong>! i.e we can say an organisation is nothing but a group of <strong>individuals</strong> with own values get together to work towards a common vision.  </p>
<p>Now we realize if we can influence these values we can get the desirable culture, for that we'll use a Management 3.0 recommended exercise with small modifications which helps in surfacing the current values and steps in influencing those values.   </p>
<p><strong>Value Stories</strong> exercise is to be done in the team level and also in the executive level, typically facilitated by the Leader in the Managerial role. </p>
<ol>
<li>Gather team and set context about the activity, for Virtual teams, use tools like Mural / Miro / tilde for better collaboration.</li>
<li>Provide them with the big values list 
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1631099563814/0wJHfn03R.png" alt="image.png" /></li>
<li>Select only top three values which they identify themselves with. [5 Mins]<ul>
<li>[Optional]  Ask people to present a past story which showcases an action influenced by any one of their value [2 Mins each]</li>
</ul>
</li>
<li>Now together as group discuss and arrive at top three <strong>core values</strong> of the team<ul>
<li>[Optional]  Ask people to present a past story which showcases an action influenced by any one of their value [2 Mins each]</li>
</ul>
</li>
<li>Take time to see and draw parallels on how the values of the team individuals come together to form the group's values, there may be similarities which compliments and even differences which counteracts. </li>
<li>And then decide on the Wish values, these are values which can elevate the team further, can also be values from the overall organization which needed to propagated down to team.</li>
<li>Now we have the Core Values and the Wish Values of the team, this can documented and can be made a poster! </li>
<li>The main action item of this exercise is to realize the values of the team and henceforth everyone should remember, When ever they had to take a decision
/ When ever they communicate/  When ever you do a task etc. - <strong>Make sure actions are aligned with the team's core values and always look for opportunities to do something which can reflect the wish values. </strong>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1631102409498/39kvqKc1L.png" alt="undraw_informed_decision_p2lh.png" /></li>
</ol>
<p>a. Sample Team 1
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1631097463256/zCpxoy5c2.png" alt="image.png" /></p>
<p>b. Sample Team 2
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1631097506879/ZN9FvOXKh.png" alt="image.png" /></p>
<p>This exercise needs to be done with all the teams and also with the Leadership team to identify the organization's Core Values and the Wish Values. </p>
<p>This exercise definitely helps the existing team members to know more of the team better even if its in virtual session and even help realize more about themselves. And this is also extremely helpful for the new team members, this artifact acts a wonderful insight into the team's culture, which is otherwise a very difficult thing to explain.</p>
<p>This also helps in hiring, as now we know the wish values we can look for people with those values who can be a better influence to that team. </p>
<blockquote>
<p>We can change culture if we change behavior. - Dr. Aubrey Daniels</p>
</blockquote>
<p>And these <strong>Core Values and Wish Values are like the guide posts shining lights on the path towards the desirable behaviour that improves the Company Culture!</strong></p>
<p>Value systems are not always constant but does takes some effort in altering it. In any group, people with more authority / leverage / control of resources tend to influence more to the group's decisions and its behaviours. Like how in a family, parents influence on the behaviours, similarly in the Organizational realm its the Leader(s) who has the responsibility to inculcate the thought process of strong culture. 
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1631102876231/kXEfS3mdM.png" alt="undraw_Connecting_Teams_8ntu.png" />
Now as a leader to cultivate the desirable culture you need to observe the behaviours and decisions of the team, if its complimenting to core values please make sure to have a positive reinforcement, as simple as "good Job!" can do. And also the vice versa when ever any action which counteracts to any core value, please make sure it is discussed and any differences are sorted.  </p>
<p>Also this is not just in the team level, the same applies for the Executive team as well, and people should be empowered to point out to the leaders if their actions are not aligned with the values. </p>
<p>And every year when the mission changes it may come with new strategy and tactics for business which may require some cultural change from team, so it's good to revisit this exercise every year to see if the wish values have propagated to team's core values and to find the next set of wish values, so there is continuous improvement towards the desired culture. </p>
<p>Additionally we can collect stories which showcases the positive outcome because of the actions influenced by these Values, esp. from team/people who consistently and naturally align with these values, your <strong>Cultural Ambassadors!</strong> they are and their exemplary stories should be documented and told.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1631102622037/CevuvBx7-.png" alt="undraw_about_me_wa29.png" /></p>
<p>These inspiring value stories from the leaders and cultural ambassadors grows long and becomes "The Culture Book" of your Organization, which communicates the "Values" of the organisation and how it celebrates the behaviours and decisions that cultivate the "Culture"!</p>
]]></content:encoded></item></channel></rss>