We're sunsetting PodQuest on 2025-07-28. Thank you for your support!
Export Podcast Subscriptions
People
J
Jeff
使用ChatGPT来改善关系和解决争论
P
Peter
Topics
Peter: 我最近一直在做一个游戏项目,最初用Unity和视觉脚本语言编写。随着项目发展,我意识到代码库已经难以维护,许多功能用视觉脚本语言难以实现。因此,我决定重新开始,选择更合适的引擎和编程语言,并运用我学到的新技术。我认为,当代码库过于复杂或技术栈过时时,重新开始可能是更好的选择,可以提高效率并避免陷入技术债务的泥潭。 我理解重写代码需要时间和精力,但有时这比在混乱的代码库中挣扎更有效率。重新开始也让我有机会尝试不同的游戏引擎,选择最适合项目的工具。 当然,这并非总是最佳选择,需要根据具体情况权衡利弊。对于一些简单的项目或时间紧迫的项目,逐步改进可能更合适。 Jeff: 我认为几乎不应该完全重写代码。我过去多次尝试完全重写,结果都不理想。我更倾向于逐步改进现有代码。即使代码存在问题,也应该尽量保留现有功能,并逐步改进。 以我去年重写Kineo应用为例,虽然我移植到新平台并使用了新的UI设计,但事后看来,我本应该逐步迁移,而不是完全重写。 完全重写会浪费时间,因为你需要重新实现已经存在的功能。即使现有代码不够理想,它至少是可运行的。我们可以通过模块化,逐步改进,并添加单元测试来提高代码质量。 当然,如果代码库过于混乱,难以模块化,那么重新开始可能也是一种选择。但即使如此,我们也应该尽量保留业务逻辑,并在新的代码库中重新实现。

Deep Dive

Chapters
Peter and Jeff discuss the pros and cons of starting over on an app versus continuing to work with an existing codebase. Peter recently started over on a game he'd been working on for a couple of years, while Jeff generally advises against it.
  • Peter started over on his game, Project Hack, due to problems with his original Unity codebase.
  • Jeff advises against completely rewriting an app from scratch, citing past experiences.
  • The discussion focuses on the tradeoffs between starting over and working with an existing codebase, considering factors like technical debt, modularity, and available resources.

Shownotes Transcript

In this episode, we chat about Peter’s decision to start fresh with a new code base. He believes it can sometimes be the right move. Geoff shares his perspective, which sparked a lively discussion and gave developers some food for thought when it comes to existing projects and technical debt.

  • (00:00) - Introduction

  • (10:13) - Become a supporting member

  • (20:19) - Get over 200 Mac Apps

  • (27:02) - Support the podcast

Links: Things You Should Never Do, Part I)

Working Effectively with Legacy Code)

Become a supporting memberhttps://patreon.com/compileswift)

Thanks to our monthly supporters

  • Marko Wiese

  • Adam Wulf

  • bitSpectre

  • Arclite

** ★ Support this podcast on Patreon ★) **