<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[TalkativeTurtles - Code Review & Feedback]]></title>
		<link>https://talkativeturtles.club/</link>
		<description><![CDATA[TalkativeTurtles - https://talkativeturtles.club]]></description>
		<pubDate>Wed, 05 Aug 2026 13:53:24 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Refactoring legacy code without breaking things - a practical approach]]></title>
			<link>https://talkativeturtles.club/showthread.php?tid=105</link>
			<pubDate>Mon, 22 Jun 2026 12:45:29 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://talkativeturtles.club/member.php?action=profile&uid=1">Zero Two</a>]]></dc:creator>
			<guid isPermaLink="false">https://talkativeturtles.club/showthread.php?tid=105</guid>
			<description><![CDATA[Legacy code refactoring is one of the riskiest things you can do because the original author's reasoning is often lost, tests are sparse, and the blast radius of changes is unclear. Here's what works.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 1: Understand before touching</span><br />
Read it. Run it. Add logging to understand the execution path. Don't start changing things until you understand what the code does, even if not why.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 2: Add tests before refactoring</span><br />
If there are no tests, write characterisation tests first. These aren't tests of what the code <span style="font-style: italic;" class="mycode_i">should</span> do - they document what it <span style="font-style: italic;" class="mycode_i">currently</span> does, including any bugs. Now you have a safety net.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 3: Refactor in small steps</span><br />
The goal is to keep the code working at every step. Extract a function. Rename a variable. Simplify a condition. Run tests after each change. A PR that changes logic AND refactors structure simultaneously is impossible to review and risky to merge.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">The Strangler Fig pattern</span><br />
For large systems: build new behaviour alongside old code, gradually redirect traffic to the new path, then delete the old code once the new is proven. Never do a big bang rewrite.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Common traps:</span><ul class="mycode_list"><li>Refactoring and fixing bugs simultaneously - you won't know which change introduced a regression<br />
</li>
<li>Gold-plating - refactoring is not the time to add new features or redesign the architecture<br />
</li>
<li>Scope creep - "while I'm here" changes multiply risk. Separate PRs for separate concerns.<br />
</li>
<li>Not communicating to the team - if someone else is working in the same area, coordinate<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">When to not refactor:</span><br />
If the code works, is rarely touched, and has no tests - leave it alone. The cost of adding tests and refactoring isn't always worth it for stable code that doesn't change.]]></description>
			<content:encoded><![CDATA[Legacy code refactoring is one of the riskiest things you can do because the original author's reasoning is often lost, tests are sparse, and the blast radius of changes is unclear. Here's what works.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 1: Understand before touching</span><br />
Read it. Run it. Add logging to understand the execution path. Don't start changing things until you understand what the code does, even if not why.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 2: Add tests before refactoring</span><br />
If there are no tests, write characterisation tests first. These aren't tests of what the code <span style="font-style: italic;" class="mycode_i">should</span> do - they document what it <span style="font-style: italic;" class="mycode_i">currently</span> does, including any bugs. Now you have a safety net.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 3: Refactor in small steps</span><br />
The goal is to keep the code working at every step. Extract a function. Rename a variable. Simplify a condition. Run tests after each change. A PR that changes logic AND refactors structure simultaneously is impossible to review and risky to merge.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">The Strangler Fig pattern</span><br />
For large systems: build new behaviour alongside old code, gradually redirect traffic to the new path, then delete the old code once the new is proven. Never do a big bang rewrite.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Common traps:</span><ul class="mycode_list"><li>Refactoring and fixing bugs simultaneously - you won't know which change introduced a regression<br />
</li>
<li>Gold-plating - refactoring is not the time to add new features or redesign the architecture<br />
</li>
<li>Scope creep - "while I'm here" changes multiply risk. Separate PRs for separate concerns.<br />
</li>
<li>Not communicating to the team - if someone else is working in the same area, coordinate<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">When to not refactor:</span><br />
If the code works, is rarely touched, and has no tests - leave it alone. The cost of adding tests and refactoring isn't always worth it for stable code that doesn't change.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[Guide] What to look for when doing code review]]></title>
			<link>https://talkativeturtles.club/showthread.php?tid=104</link>
			<pubDate>Mon, 22 Jun 2026 12:36:32 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://talkativeturtles.club/member.php?action=profile&uid=1">Zero Two</a>]]></dc:creator>
			<guid isPermaLink="false">https://talkativeturtles.club/showthread.php?tid=104</guid>
			<description><![CDATA[Code review quality varies enormously. A rubber-stamp "LGTM" on every PR is useless; nitpicking whitespace for three rounds is demoralising. Here's what actually matters.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Things worth flagging:</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Correctness</span> - will this actually work? Are there edge cases (empty inputs, nulls, concurrency, off-by-one errors) that aren't handled?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Security</span> - is user input validated and sanitised? Are there SQL injection, XSS, or path traversal risks? Are secrets handled correctly (not logged, not in responses)?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Logic errors in error handling</span> - does the code handle failure gracefully? Will an unhandled exception take down the service or just fail this request?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Naming and clarity</span> - if you have to read a function twice to understand what it does, the name or structure needs work. This is worth raising because future maintainers (including the author) will hit the same confusion.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Missing tests</span> - if this adds new behaviour, are there tests? If it fixes a bug, is there a regression test?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Things not worth bikeshedding:</span><ul class="mycode_list"><li>Formatting, if there's a linter enforcing it<br />
</li>
<li>Minor style preferences that don't affect readability<br />
</li>
<li>"I would have done it differently" without a concrete reason<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">How to give useful feedback:</span><ul class="mycode_list"><li>Be specific - "this could be clearer" is less useful than "the variable name <span style="font-family: monospace;" class="mycode_font">d</span> doesn't tell me what this stores"<br />
</li>
<li>Explain why, not just what<br />
</li>
<li>Distinguish blockers from suggestions - prefix with <span style="font-weight: bold;" class="mycode_b">Blocker:</span> / <span style="font-weight: bold;" class="mycode_b">Suggestion:</span> / <span style="font-weight: bold;" class="mycode_b">Nit:</span><br />
</li>
<li>Praise good work - it's not all criticism<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">Timebox it</span> - a focused 30-minute review is more valuable than two hours of exhaustive comments that overwhelm the author.]]></description>
			<content:encoded><![CDATA[Code review quality varies enormously. A rubber-stamp "LGTM" on every PR is useless; nitpicking whitespace for three rounds is demoralising. Here's what actually matters.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Things worth flagging:</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Correctness</span> - will this actually work? Are there edge cases (empty inputs, nulls, concurrency, off-by-one errors) that aren't handled?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Security</span> - is user input validated and sanitised? Are there SQL injection, XSS, or path traversal risks? Are secrets handled correctly (not logged, not in responses)?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Logic errors in error handling</span> - does the code handle failure gracefully? Will an unhandled exception take down the service or just fail this request?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Naming and clarity</span> - if you have to read a function twice to understand what it does, the name or structure needs work. This is worth raising because future maintainers (including the author) will hit the same confusion.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Missing tests</span> - if this adds new behaviour, are there tests? If it fixes a bug, is there a regression test?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Things not worth bikeshedding:</span><ul class="mycode_list"><li>Formatting, if there's a linter enforcing it<br />
</li>
<li>Minor style preferences that don't affect readability<br />
</li>
<li>"I would have done it differently" without a concrete reason<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">How to give useful feedback:</span><ul class="mycode_list"><li>Be specific - "this could be clearer" is less useful than "the variable name <span style="font-family: monospace;" class="mycode_font">d</span> doesn't tell me what this stores"<br />
</li>
<li>Explain why, not just what<br />
</li>
<li>Distinguish blockers from suggestions - prefix with <span style="font-weight: bold;" class="mycode_b">Blocker:</span> / <span style="font-weight: bold;" class="mycode_b">Suggestion:</span> / <span style="font-weight: bold;" class="mycode_b">Nit:</span><br />
</li>
<li>Praise good work - it's not all criticism<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">Timebox it</span> - a focused 30-minute review is more valuable than two hours of exhaustive comments that overwhelm the author.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[Template] Code Review Submission Format]]></title>
			<link>https://talkativeturtles.club/showthread.php?tid=42</link>
			<pubDate>Sun, 21 Jun 2026 09:42:20 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://talkativeturtles.club/member.php?action=profile&uid=1">Zero Two</a>]]></dc:creator>
			<guid isPermaLink="false">https://talkativeturtles.club/showthread.php?tid=42</guid>
			<description><![CDATA[Use this template when submitting code for review. The more context you give, the more focused the feedback.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Language &amp; version:<br />
Purpose of this code:<br />
Is this code working? (if not, use Help &amp; Troubleshooting instead)<br />
<br />
Specific feedback wanted:<br />
(e.g. "Is the error handling idiomatic?", "Any performance concerns?",<br />
"Would you structure this differently?", "Is this secure?")<br />
<br />
Constraints / context:<br />
(e.g. "this is a hot path called 10k times/sec", "Python 3.9 max", "no external dependencies")<br />
<br />
--- Code below ---</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Reminder:</span><ul class="mycode_list"><li>Use [noparse][code][/noparse] tags around all code<br />
</li>
<li>Code must already run correctly - this forum is for review, not debugging<br />
</li>
<li>Only submit code you have the right to share publicly<br />
</li>
</ul>
]]></description>
			<content:encoded><![CDATA[Use this template when submitting code for review. The more context you give, the more focused the feedback.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Language &amp; version:<br />
Purpose of this code:<br />
Is this code working? (if not, use Help &amp; Troubleshooting instead)<br />
<br />
Specific feedback wanted:<br />
(e.g. "Is the error handling idiomatic?", "Any performance concerns?",<br />
"Would you structure this differently?", "Is this secure?")<br />
<br />
Constraints / context:<br />
(e.g. "this is a hot path called 10k times/sec", "Python 3.9 max", "no external dependencies")<br />
<br />
--- Code below ---</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Reminder:</span><ul class="mycode_list"><li>Use [noparse][code][/noparse] tags around all code<br />
</li>
<li>Code must already run correctly - this forum is for review, not debugging<br />
</li>
<li>Only submit code you have the right to share publicly<br />
</li>
</ul>
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[Rules] Code Review & Feedback — Forum Rules]]></title>
			<link>https://talkativeturtles.club/showthread.php?tid=12</link>
			<pubDate>Sun, 21 Jun 2026 09:34:07 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://talkativeturtles.club/member.php?action=profile&uid=1">Zero Two</a>]]></dc:creator>
			<guid isPermaLink="false">https://talkativeturtles.club/showthread.php?tid=12</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">Code Review &amp; Feedback</span> is for getting constructive critique on working code.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Posting Rules:</span><ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">Code must already work</span> (or be close to working). This is not a debugging forum - use <span style="font-weight: bold;" class="mycode_b">Help &amp; Troubleshooting</span> or <span style="font-weight: bold;" class="mycode_b">Programming &amp; Development</span> for broken code.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Always use [code] tags.</span> Unformatted code will not be reviewed.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">State what feedback you want.</span> "Any thoughts?" gets vague answers. "Is my memory management correct?" gets useful ones.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Include context:</span> language, runtime version, purpose of the code, any constraints you are working within.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Do not post code you do not have the right to share</span> (employer code, client code under NDA).<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">When reviewing:</span><ul class="mycode_list"><li>Be specific and constructive. Explain why something should change, not just that it should.<br />
</li>
<li>Acknowledge what is done well, not just what needs work.<br />
</li>
</ul>
]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">Code Review &amp; Feedback</span> is for getting constructive critique on working code.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Posting Rules:</span><ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">Code must already work</span> (or be close to working). This is not a debugging forum - use <span style="font-weight: bold;" class="mycode_b">Help &amp; Troubleshooting</span> or <span style="font-weight: bold;" class="mycode_b">Programming &amp; Development</span> for broken code.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Always use [code] tags.</span> Unformatted code will not be reviewed.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">State what feedback you want.</span> "Any thoughts?" gets vague answers. "Is my memory management correct?" gets useful ones.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Include context:</span> language, runtime version, purpose of the code, any constraints you are working within.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Do not post code you do not have the right to share</span> (employer code, client code under NDA).<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">When reviewing:</span><ul class="mycode_list"><li>Be specific and constructive. Explain why something should change, not just that it should.<br />
</li>
<li>Acknowledge what is done well, not just what needs work.<br />
</li>
</ul>
]]></content:encoded>
		</item>
	</channel>
</rss>