TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Using Factorio as visual programming, refactoring, and design tool

2 pointsby backslash_16about 8 years ago
Hi,<p>I&#x27;m playing around with the idea of having developers I work with play Factorio for a little while as a good intro to design, implementing, and refactoring.<p>The idea that Factorio is visual programming keeps growing on me, and that the visual and game play feedback provided by a spaghetti base design that only you really understand and can extend is very similar to programmers reactions to legacy code in the workplace.<p>Needing to rip up your base and then re-lay it down as you learn more about the game play mechanics (aka become a better programmer) feels similar to refactoring for me. There is a sense of well it works now, why not just add on another wing instead of doing &quot;it right&quot;.<p>Building small components that you can link into each other and reuse is almost the core mechanic of the game, and is also a core tenant of building reusable software.<p>Lastly, and I might be stretching here, the visual environment can be likened to TDD or at the very least a short feedback loop. When you take an action you have to deal with the consequences, and reap the benefits immediately which if you squint is like writing tests to exercise your API&#x2F;objects as you write them, making sure that when you change your API&#x2F;objects&#x2F;whatever you feel the change as quickly as possible.<p>Is there any validity to this? Am I going to ruin their productive lives by introducing them to Factorio?

1 comment

rowleyajabout 8 years ago
&gt; Am I going to ruin their productive lives by introducing them to Factorio?<p>Yes most definitely, but they will enjoy it!<p>That said, I do agree that you can look at designing a factory with a mindset of writing good code, and refactoring that code as you modify the factory. I&#x27;m not sure if this will provide a benefit to existing programmers, I could see it being useful for explaining those concepts to new programmers - perhaps as part of an IT class in school though.
评论 #13831489 未加载