15 ms·
Factorio and Software Engineering
- Negitivefrags 6y agoI suppose, put succiently, you could say that Factorio is like all the things in software engineering that are not writing code.
- db48x 6y agoIt's everything except the typing!
- db48x 6y agoThat's a well-reasoned and well-written comparison; I'm going to direct people to it rather than trying to explain it myself. There are a few other Zachtronics games that you might like too!
- avalys 6y agoThis week I’ve both been playing Factorio, and writing code for a new application. So, lots of figuring out interfaces, architecture and modularity, and how things will work together. When I change from one of these activities to the other, I have the distinct mental impression that I’m not switching activities at all. When I switch from Factorio to my text editor, it’s such a seamless transition, as if I’m just scrolling to another part of my factory. Not a sensation I’ve had with any other game, or any other pair of distinct activities, really. I figure it must mean Factorio makes me a better coder. I better get back to it, then!
- AtomicPlayboy 6y agoI also would replace the Teamwork part of the article with achieving Modularity and Information Hiding. Sounds like a game Jeff Bezos would have fun playing if it was about setting up a distribution center. Or rather, ordering production of the game and letting players figure out how he could improve its logistics.
- toomuchtodo 6y agoAre we far off from Factorio ending up on a CompSci class syllabus and being an educational expense? :)
- xmprt 6y agoI see a world where it's used to introduce slightly older students to programming (like 7th grade+) just like Minecraft is used in some classrooms right now.
- Shorn 6y agoThis is one of the reasons I don't play Factorio, or games like it. The point of playing games for me is escapism and rest/recuperation. I feel like I only have so much programming time in me - I think playing these types of games makes me less likely to do some real work. Plus the "achievement high" is much less; at the end of the day, when you win/do well - you know you're supposed to feel that way, the game was designed for you to win. I like to sometimes just browse around in my side-project's UI or even codebase and appreciate what I built. Of course, you have to be in the right mind-frame for that. You don't want to go looking for your achievement high and end up thinking "Wow, all that effort and this is all you have to show for it?"
- taneq 6y agoYeah, that’s what always stops me from playing these. It’s fun at first (like any new project) but then I realise I could be doing exactly the same work and getting paid for it. Which I guess makes me super lucky in the “I get paid to play video games” sense.
- 6y ago
- 29athrowaway 6y agoIf you want to see how Factorio is developed you can follow this guy in Twitch (one of the Factorio developers) https://m.twitch.tv/rseding91/profile https://m.twitch.tv/rseding91/profile
- arthens 6y agoAs someone who's put a lot of hours in Factorio, I totally agree with the article! I kinda guessed what it was gonna say before reading it. My coworkers and I played a lot of Factorio in the past and we always joked about it being like a programming job. I even had a trello board for the largest base I ever worked on (I never finished it)
- zerr 6y agoMay I ask - was your day [programming] job really boring? Otherwise, I don't get why a programmer would spend time on this game.
- MPSimmons 6y agoI'm not the parent, but it's nice to deal with an environment where the stakes are low, and I can afford to play. In my day job, I can't often implement greenfield solutions and play with systems as toys without consequence.
- opnitro 6y agoOne thing that I like about these style of games is that they subtract the fiddly parts of programming that I don't find particularly enjoyable: things like dependency management, fiddly environment details, differing compiler versions screwing things up. This is because, of course, it's not real and so doesn't have to deal with the messiness of the real world.
- Danieru 6y agoMy main job is programming video games, not boring at all. Even for us Factorio is a perfect addiction. So much so our main game is a train tycoon version of factory automation.
- zerr 6y agoWell, in your case, researching about competitors makes sense :)
- nomadicpizza 6y agoAnyone played "human resource machine"? It's a bit more like solving leetcode challenges then actual work. More puzzle oriented.
- 1f60c 6y agoI read about it a couple of months ago (it was featured in one of those App Store articles, I think), but then I promptly forgot about it. Have you tried it? Would you recommend it to people who already know how to code? Edit: now I think it might've been 7 Billion Humans, by the same company
- krallja 6y agoI've 100%ed both; they are good with a mildly-dark sense of humor. HRM feels like assembly on a very dumb chunk of silicon. 7BH feels like a very dumb GPGPU language.
- MH15 6y agoI actually download it a few months ago and never played it, but started playing it yesterday when I was bored away from WiFi. It's very enjoyable.
- grensley 6y agoIt's been like 5 years, but my impression was it took 5 seconds to find the solution and 15 minutes to implement it.
- bcrosby95 6y agoPlaying Factorio certainly feels similar to some kinds of Software Engineering. But I don't particularly like the comparison because a huge thing about Factorio is the restrictions on physical layout. Due to this physicality it is very expensive to refactor in Factorio, you are going to be working with more components working together at the same time, and the fine details matter way more on every level because if you're off by a single tile, it all comes crumbling down. Because of this, in Factorio you really cannot refactor your way to a base producing something at a new rate in Factorio. The only method is to design a brand new production line from scratch and rebuild - basically, all you have is waterfall and rewrites in your toolkit.
- hhanesand 6y agoPlayed with robots yet? They'd let you re-use & "move" (tear down + rebuild) parts of your factory around.
- infogulch 6y agoI don't find this to be true once you have automated production of all the buildings and use construction bots. Combined with the recent(ish) improvements to blueprints, blueprint books, and cut/copy/paste makes fixing those off-by-one errors quite painless: 1. Ctrl+X to cut and auto-deconstruct the build, 2. Ctrl+V to paste in the correct place, 3. Go fix something else for 2 minutes. :)
- nindalf 6y agoIt's possible they didn't reach construction robots yet. The game becomes more interesting once they allow you to refactor with ease.
- kentonv 6y ago> a certain component (electronic circuits) was being produced in 4-5 places. I eventually replaced them all with one centralised production array to simplify the factory. Nah, electronic (green) circuits are high-volume but low-complexity to build. They are a good example of something that should not be produced centrally, because if you do, you have to invest a lot in high-volume transport to get them where they need to go. Much better to build dedicated electronic circuit factories wherever they are specifically needed. Silly analogy to programming: Microservices. It makes sense to have a microservice to perform, say, user authentication, which is complex and only needed occasionally. It does not make sense to have a microservice to implement printf formatting, because you'll be calling it way too often and it'll waste a ton of network bandwidth. Better to import a string formatting library into each service.
- hackcasual 6y agoBut they stack better in trains. A train load of greens is equivalent to almost 5 train loads of it's precursors
- deleted 6y ago[deleted]
- m463 6y agoThat's a good point. 300 copper (= 600 copper cables) + 200 iron => 200 green circuits in a stack.
- hackcasual 6y agoYep, it's one of the reasons smelting where you mine is popular with train based logistics, since that doubles your density
- AtomicPlayboy 6y agoDRY, also known as single source of truth, is one of the most important principles in SE. I just could not figure out what the single source of truth is in a factory pattern as is the electronic circuit factory. It implies centralizing the code which is responsible by the fabrication of the circuits, what would be their equivalent in the game? The conveyor belts? Microservices, on the other hand, are overrated and unnecessary in most cases they are applied.
- sali0 6y agoFactorio is the only game I can think of that could be used for education while not feeling like an "education" game. Most educative games (from my experience) are not fun. But Factorio is a metaphor for real world software engineering and it is done without the player needing to be aware of it. Absolutely beautiful game design. I feel like this is what education will look in the far future.
- searchableguy 6y agoTry satisfactory too. Kids will enjoy it more because it's 3d first person and colorful. https://www.satisfactorygame.com/ https://www.satisfactorygame.com/
- pharrington 6y agoThis essay highlights my core impression of Factorio that's kept me on the fence about buying it - it certainly looks like a fantastic game, but since I already enjoy designing programs and coding, every time I consider trying it out I just tell myself, "I'll just open up my text editor" instead. Is there a good selling point to push people like me past this mindset? Or is the game probably just not for me?
- pmoriarty 6y agoI don't know what it is (despite racking my brains about this for years), but there's something about Factorio that makes it much more fun for me than programming -- unless the programming I'm doing is something I'm intensely interested in, which programming for work rarely is.
- willis936 6y agoIt's like labview except the bugs try to kill you.
- maximente 6y agofirst, i think there's a demo, so give it a taste for free if you're interested second, it's similar to how watching a documentary is sort of like knowledge + entertainment. i think you'll find factorio pulls a lot of the same sorts of levers that designing programs and coding do, but it's a different feedback mechanism (visual, or base destroyed by biters) versus... well, i almost would say acceptance/integration tests, but if you're just brainstorming, it's not clear to me.
- BoiledCabbage 6y agoIn your spare time, would you rather do programming projects, or play a game? If you'd rather do programming, then keep doing what you're doing. If you'd rather play a game, then download it and see if you like it. If you like it, then play it. If you don't then continue your current habit or search for a different game.
- jl6 6y agoFactorio is like a distillation of programming so as to retain the fun parts and minimise the unfun parts. What do I mean by the unfun parts of programming? Real-world stuff that you inevitably have to deal with but which distracts from the core purpose. Things like: discovering a bug in a library you depend on; dealing with hardware issues; changing requirements; disagreements with colleagues over tooling; deadlines; dealing with users; ...
- dcre 6y agoIf you like the look of Factorio but are (like me) intimidated by the open-endedness of it, check out the puzzle games by Zachtronics, the developer of Shenzhen I/O. Because they're divided into small levels that teach you how to play, they are much more accessible than Factorio, which requires dozens of hours to get good. Infinifactory and Opus Magnum are the easiest ones to get into. All are great. http://www.zachtronics.com/ http://www.zachtronics.com/
- Groxx 6y agoOpus Magnum gets my vote for "best introductory Zachtronics game" - very polished, simple concept, and you can almost always brute force problems rather than be super precise so there are no real "puzzle of death" moments where you just can't figure something out. Many of the other games build to a level of difficulty that I find drives people away around the mid-point. There's some significant mental leap you need to make, or you need to cram things into an impossibly small space, etc. Opus Magnum is a lot more forgiving in that sense.
- jcranmer 6y agoI've only played Opus Magnum and Infinifactory, and my experience is that the "programming" and "debugging" environment is far superior in Opus Magnum. Just sitting back and watching your builds run in Opus Magnum is far more satisfying. And it has an interesting solitaire game, too.
- wotamRobin 6y agoThis is a great article! It’s surprising how much tech debt pops up in games like these. Another game much like this is Satisfactory, which is basically the 3D version of Factorio. I actually wrote a very similar article about it here, though more focused on architecture instead of process: https://medium.com/@wotamRobin/what-satisfactory-and-website-architecture-have-in-common-a6c8f8eede2e https://medium.com/@wotamRobin/what-satisfactory-and-website...
- cortesoft 6y agoSome of the areas the article leaves out are around throughout and bottlenecks... you are often limited by particular resources, and the ability to get them to the end of your factory line (I.e. the belts are saturated at the start of the line, but empty by the time they get to the new section of the factory) Another interesting thing you learn is about a form of 'buffer bloat' (although it behaves differently than traditional network buffer bloat) Essentially, having too much of a buffer for resources can cause inefficiency. Say, for example, that you notice you are producing more green circuits than you are using. A naive response is to try to store them, so that your green circuit factories are running at full speed, and then when your need for them increases you will have them available. However, this has two downsides. One, it will pull resources away from things you actually need in order to keep making more green circuits, even though you have more than you can use right now anyway. The copper that could be going to manufacturing the item that is your current bottleneck is instead going towards something you have too much of anyway. The second issue hits you on the other side... when you DO start using more green circuits than you are producing, you won't notice until your issue is very severe, because you will have been using your reserves for quite a while. By then, you will have to increase your production a lot to make up for it... which might put a different resource out of whack. The trick is to let the factories overproducing to backup production and stop... let that back pressure behave as a natural production regulator, which will make it much easier to have a factory that always works as efficiently as possible given your current raw material production.
- krallja 6y agoYep, the only places that I ever really need a buffer are train stops, power facilities, and times when you can't use a byproduct just yet (more-complicated refineries before you get your circuits tuned just right). One thing I just realized this week is that a power generation buffer needs to alert me on the very first swing of an inserter from a buffer chest. If the coal/solid fuel line isn't completely compressed, that means the doomsday clock has started ticking.
- eric-hu 6y agoI recommend avoiding steam buffers when you go nuclear. I had a setup with multiple storage tanks to hold steam, and that had buffer bloat because fluid/steam is hard to evenly distribute across many paths.
- barbs 6y agoRelevant Vice article: Why Do We Play Video Games That Feel Like Work? https://www.vice.com/en_us/article/4x38aq/why-do-we-play-video-games-that-simulate-work https://www.vice.com/en_us/article/4x38aq/why-do-we-play-vid...
- WrtCdEvrydy 6y agoEvE online taught me Excel, and Arbitrage. I used the excel to get into a job as a developer helping an actuary, and the arbitrage to do market trading.
- nautilus12 6y agoYou forgot the most natural analogies to distributed stream processing and handling volume and velocity and how that differs between belts and drones, etc.
- GnarfGnarf 6y agoNice thought. But if I'm going to sit in front of a screen, there's got to be money it.
- beckingz 6y agoSo how does hackernews work for you?
- GnarfGnarf 6y agoSeriously? Keeping track of technology, reading other people's opinions and first-hand experience, feedback, leads on topical news, trends, developments. The list is endless.
- 29athrowaway 6y agoIn biology, if I remember correctly, you have anabolic and catabolic processes: anabolism constructs complex molecules from simpler ones, catabolism breaks down complex molecules into simpler ones. Both processes work together, with catabolism providing the energy for the anabolism.
- sergiotapia 6y agoMy 11 year old started playing Factorio a week ago, and I knew it was a gateway drug to software development. I hope he keeps enjoying it and gets a career out of it, would be amazing! Especially the technical debt aspect.
- mobilemidget 6y agoI showed it to a friend last night, first thing he said, 'hey this looks a bit like programming'. Me being a programmer only saw a 2D version of Minecraft (my initial opinion), and I thought I wouldn't like it too much. Been playing the demo non stop. will buy it later tonight... AFTER work... :+) p.s. I hope it keep in development for a few years so I can play this with my (now too) little one too.
- cricalix 6y agoFactorio has been around in "open beta" for something like 4 years now (and I've been playing it for at least 3), so I suspect it'll be around a while longer. However, even if the developers stopped updating the game, so long as the game runs on your PC, does it matter? We have people doing crazy things like effectively emulating DOS in Javascript so that you can run DOS programs in a browser window (see archive.org's DOS game section); somehow I don't think you need to worry about not being able to play it in a few years. It's all local by default, so you're not having to worry about someone taking the game servers offline either.
- rwhaling 6y agoComing to Factorio from a Scala/streaming/data background, I got the connection pretty immediately - so much of Factorio is about designing correctly for backpressure, such that your factory works stably at different levels of capacity and resource consumption. That said, I still never really got the knack of blueprints and large-scale planning, so I've got a long way to go still.
- jayjader 6y agoI find it interesting that you mention easily grokking backpressure in Factorio yet have more difficulty with blueprints. In my experience, people "get" blueprints much earlier on than even the idea of backpressure. Given you say you come from a data streaming background, I (idly) wonder how much your Factorio "skills" could benefit from you picking up a book on design patterns in object-oriented approaches.
- keithnz 6y agoI've played factorio for years and more recently just focused mainly on speed runs for launching rocket. While there is some analogy between factory design and software design, I wouldn't read too much into it. The biggest lesson from either side is likely modular components that you can connect together quickly with automation tools to make it quick to build. If you incorporate anti bug (literal bugs in factorio) into your designs with automated repair then you almost never have to worry about bugs. Don't have lots of dependencies, build isolated services to focus on certain things. Have a high speed bus for different services to communicate over. Keep comms efficient and direct as possible. Build with scaling in mind. If you need something quick, build in an optimal way without considering scaling beyond your goal.
- JamesQuigley 6y agoHeh I happened to also write up a blog post about development and Factorio last night! https://blog.quigley.codes/dev-lessons-learned-from-factorio/ https://blog.quigley.codes/dev-lessons-learned-from-factorio...
- ineedasername 6y agoThe author mentions Shenzhen IO. I found great value in that game. It's limitations force you to think about simpler, elegent solutions in ways we frequently don't have to today because storage and ram and CPU cycles are so abundant. I actually feel it's helped me seen simpler, more easily maintained options in my work.
- loufe 6y agoThey truly do entice you to find more elegant solutions. One thing they show in the post-mission report is your solution's code line count, energy use, and component cost versus others in a graph. I didn't consider myself "finished" on a puzzle until I had figured out how people got to that super-optimal solution which sometimes took multiples of the amount of time of the original solution but damn was it ever satisfying.
- glitchvaulter 6y agoHere’s a list of games I think software developers will enjoy if you want to take the enjoyable aspects of software design and automation with none of the downsides: - Factorio - Kerbal Space Program - Oxygen Not Included - Shenzhen I/O - Exapunks - TIS-100 Always looking for new suggestions :))
- temp234234234 6y agoHuman Resource Machine and Seven Billion Humans are among my favorites. They are made by professional game developers, so the interface is really smooth. Seven Billion Humans is the sequel, adding parallel processing. And don't forget Corewars. You can still compete online against other humans.
- kkapelon 6y agoSilicon Zeroes obviously Also Spacechem for learning about threads and mutexes
- hmage 6y ago- Satisfactory Factorio but in 3d.
- Sohcahtoa82 6y agoI want to enjoy Satisfactory. It has it's own charm to it, and I love their interactions with the community. But doing everything from a first-person view is often frustrating. Being able to have multiple layers of belts is nice, but sometimes its annoying dealing with collisions. And while the terrain is beautiful, I often find it just gets in the way of your factory more, and the option of just laying out tons of platforms is unnatural and just hides the beautiful scenery.
- detaro 6y agoThe last part also has been a key impression from watching a bunch of Let's Plays. Beautiful world, but you are limited in how you integrate with it (which to be fair would be a crazy challenge to do really well, but still).
- tomc1985 6y agoWhen I started playing Factorio years ago I heard someone saying it closely resembled EE, in that items on the conveyor belts resembled electrical pulses and the belts themselves were wires. It's interesting to see those comparisons shift to software engineering
- Deestan 6y ago> IMO, playing Factorio will not make you a better software engineer. I'm of the opposite mind: Factorio helps reinforce good habits, and practice methodical planning and thinking about hacks, tradeoffs and technical debt.
- kebman 6y agoI watched an hour or so of Let's Plays just now. Factorio really made me reminisce about playing Tekkit, especially the Red Power mods from Eloraam (man, I miss those), plus ComputerCraft, BuildCraft and not to mention IndustrialCraft2. It's the only reason I bothered to learn Lua and FORTH lol. However my thinking now is that programming probably gives me just about the same level of fulfillment and challenges, sooo I think I'll stick to that. Factorio does look very fun though!
- imtringued 6y agoCome on Buildcraft is bad. Buildcraft pipes drop items when they hit full inventories. Eventually you end up dropping a million items on the floor and your game becomes unplayable.
- kebman 6y agoI don't see it like that. Instead you have to engineer your project around the weaknesses. This is one of the fun challenges of using BuildCraft. Of course, I can see how this frustrates server owners, who have to deal with all those users who don't know how to use it correctly (or who use it in the wrong way in order to troll or blackhat).
- jayjader 6y agoNot surprising that you made those connections: one of the main devs and creators of Factorio have mentioned that the game arose in part from their frustrations with the poor scalability of tech/industrial Minecraft mods. Specifically, IC2 is called out as having some influence on the design [of Factorio].
- micheljansen 6y agoIf you like Factorio, you should also try "Human Resource Machine" by Tomorrow Corporation (https://tomorrowcorporation.com/humanresourcemachine https://tomorrowcorporation.com/humanresourcemachine). I am not in any way affiliated with them, but I enjoyed it a lot, so would highly recommend.
- ikornaselur 6y agoAnd if you like it, then the sequel "7 Billion Humans" (https://tomorrowcorporation.com/7billionhumans https://tomorrowcorporation.com/7billionhumans) is fantastic, as it expands on the concept with parallelisation! I really enjoy playing them both every now and then. I found them to work really well on my Nintendo Switch, where I would just unplug the controllers and play them like a mobile game with the touch screen, as they are perfectly suited for that.
- deskamess 6y agoDo they work well with the Joycons (or Pro Controller)? Or is there a downside?
- ikornaselur 6y agoI just realised that I hadn't even tried it with the Joycons. I just went and tested and... it works, but to be honest, it's not great. You have to use them detached and you use the right one like a Wii mote, you point it at the screen and it creates a cursor/finger. I would 100% recommend rather playing it in handheld and using touch screen after testing it out. Maybe you could get used to it, but personally I hate the "remote pointer" thing. Unless I'm misunderstanding, but I couldn't get anything to happen in the game when I had the Joycons attached (I only play handheld) and only when I detached did it ask me to place the right one flat on a table to calibrate and then show me how to center the cursor.
- Cthulhu_ 6y agoThe games are completely different though, Factorio is a base builder game, Human Resource Machine is a coding game.
- kkapelon 6y agoApart from SHENZHEN, most other games from Zachtronics are great about teaching programming. I can recommend spacechem, which looks simple at first glance, but is all about threads,multiprocessing, mutexes etc. Silicon Zeroes is also another great game for developers.
- Cthulhu_ 6y agoI've spent so much time in Factorio, I'm sure I'll fire it up again at some point soon now that it's finally hit 1.0. I mean in my opinion it was "done" years ago in that it was a good game, the only thing that might improve it would be a better tutorial, story mode, or more 'endgame' things to reach for (I'd love a technology tree beyond satellites, I'm sure there's mods for that), and / or for the early game to be less tedious; maybe offer an option to have a starter base laid out already, needing some basic repairs. Or as I've seen in the trailer released recently, the crashed ship; have that act as an early game processing plant and source of materials and electricity which you can eventually deconstruct once you've got everything up and running.
- koheripbal 6y agoWhat happens to me is that I find 45 minutes to play a game after I put the kids to sleep, so I fire it up, wait 30 minutes for the latest update to patch since I haven't played in 6 months, then realize I'm tired and go to bed. Play now. Kids ruin gaming. I'm hopeful that soon they'll be old enough to play with me. ...I wonder what game is good to play co-op between a 40 and a 6 year old?
- vtbassmatt 6y agoMy 6 year old and I play Minecraft. (Mostly on Creative because that's what she prefers, but we've done a bit of co-op Survival too.)
- McDuglas 6y ago> I wonder what game is good to play co-op between a 40 and a 6 year old? You could try factorio. It has trains, tanks, bugs to shoot.
- willis936 6y agoI remember reading a post on r/factorio where someone played factorio with their toddler. The toddler had researched like ten things without making a single assembly machine.
- MrNycticorax 6y agoI've you dig PC games that emulate some of the workflow typical of software development you should definitely checkout Zachtronics games. Almost every single game they've released is a tour de force.
- crb002 6y agoIt teaches the importance of latency in design.