{"id":2911,"date":"2017-06-22T00:00:00","date_gmt":"2017-06-22T00:00:00","guid":{"rendered":"http:\/\/ssdnodes.billabailey.com\/2017\/06\/22\/5-lessons-factorio-taught-me-about-development\/"},"modified":"2025-05-18T20:01:25","modified_gmt":"2025-05-18T20:01:25","slug":"5-lessons-factorio-development","status":"publish","type":"post","link":"https:\/\/www.ssdnodes.com\/blog\/5-lessons-factorio-development\/","title":{"rendered":"5 Lessons Factorio Taught Me About Development"},"content":{"rendered":"<p>I recently saw on thread on\u00a0<a href=\"https:\/\/www.reddit.com\/r\/webdev\/\" target=\"_blank\" rel=\"noopener\">Reddit\u2019s \/r\/webdev subreddit<\/a>\u00a0that asked a simple but less-than-benign question:\u00a0<a href=\"https:\/\/www.reddit.com\/r\/webdev\/comments\/6hkk5z\/a_lot_of_web_dev_tools_as_of_late_are_like_you\/\" target=\"_blank\" rel=\"noopener\">\u201cA lot of web dev tools as of late are like \u201cyou don\u2019t need to code anymore!\u201d. Doesn\u2019t this insult you?\u201d<\/a>. This, naturally, inspired a lot of discussion\u2014most of it was dismissive, but a portion of the responses brought up good points about the difference between learning to code something \u201cby hand\u201d versus having a tool automate the process for you.<\/p>\n<p>Same goes for this recent blog post by Ed Coffey:\u00a0<a href=\"https:\/\/edwardcoffey.com\/words\/devops-more-than-automation\/\" target=\"_blank\" rel=\"noopener\">DevOps: More Than Automation<\/a>.<\/p>\n<p>Between tools like Puppet\/Chef\/Ansible, scripts for setting up many different programs, Docker-based installs, and devs who are willing to freely share their configurations on Github for anyone to adapt, it\u2019s becoming easier and easier to set up a VPS without knowing a ton about the underlying architecture.<\/p>\n<p>Is that good or bad? It\u2019s hard to say. This very blog has featured a number of tools that abstract and\/or automate.\u00a0<a href=\"https:\/\/www.ssdnodes.com\/blog\/tutorial-getting-started-with-docker-on-your-vps\/\">Docker<\/a>\u00a0makes installing a number of applications incredibly easy, and so does\u00a0<a href=\"https:\/\/www.ssdnodes.com\/blog\/tutorial-installing-easyengine-and-building-lets-encrypt-enabled-sites\/\">EasyEngine<\/a>\u00a0(for WordPress, at least). There\u2019s one tutorial directly focused on\u00a0<a href=\"https:\/\/www.ssdnodes.com\/blog\/ansible-tutorial-getting-started\/\">Ansible and basic configuration management (CM)<\/a>, and there\u2019s that one time I failed at setting up a VPN server and had to fall back on an\u00a0<a href=\"https:\/\/www.ssdnodes.com\/blog\/an-idiot-and-his-vpn\/\">automated script<\/a>.<\/p>\n<h2><a id=\"The_Factorio_factor_10\"><\/a>The Factorio factor<\/h2>\n<p>At this point, you might be wondering what\u00a0<em>Factorio<\/em>\u00a0is.<\/p>\n<p>This\u00a0<a href=\"https:\/\/www.factorio.com\/\" target=\"_blank\" rel=\"noopener\">factory\/automation simulation game<\/a>\u00a0\u201cin which you build and maintain factories\u201d hinges on a simple premise: of course you\u00a0<em>can<\/em>\u00a0build just about anything \u201cby hand\u201d from your inventory, but why do something by hand when you can\u00a0<strong>automate it<\/strong>?<\/p>\n<table class=\"table table-striped table-bordered\">\n<thead>\n<tr>\n<th><img decoding=\"async\" title=\"A very compact factory\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2017\/06\/20170621_factorio-1.jpg\" alt=\"A very compact factory\" \/><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>A very compact factory with automation for a number of different tasks. It begins with iron ore (the blue rocks being fed in from the right hand side) and gets turned into iron plate, and steel, and science packs, and much more.<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>When you begin the game, you have to manually mine iron ore and coal, and mix those together in a furnace to make iron plate, which you can then that to create new things. As you scour your inventory\/crafting area, you start to see some new things you can make with these plates\u2014namely, conveyor belts and \u201cinserters,\u201d robotic arms that move items to and from said conveyor belts.<\/p>\n<p>You can see where this is going\u2014as soon as you learn how to make something new, you seek out a way to automate it. First comes an automated system for making iron ore, and then, perhaps, an automated system for making more conveyor belts.<\/p>\n<p>The game expands rapidly, and rather infinitely from there, but never drops that core\u00a0<strong>learn-automate cycle<\/strong>.<\/p>\n<table class=\"table table-striped table-bordered\">\n<thead>\n<tr>\n<th><img decoding=\"async\" title=\"A decently-sized smelting area\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2017\/06\/20170621_factorio-3.jpg\" alt=\"A decently-sized smelting area\" \/><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>A decently-sized smelting area.<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a id=\"Learning_vs_automating_30\"><\/a>Learning vs. automating<\/h2>\n<p>The same cycle begins whenever someone connects to a newly-provisioned VPS for the first time, regardless of their education and skill. The path to getting anything done isn\u2019t exactly clear. One has to wonder about the best way to accomplishing their goal, down to the smallest of decisions, like camelCase versus underscores.<\/p>\n<p>Conveniently enough, I think my advice to a starting\u00a0<em>Factorio<\/em>\u00a0player and someone starting on a brand-new VPS would be pretty much identical.<\/p>\n<p><strong>Try your best, on your own<\/strong>: Unless you\u2019re running some mission critical service, it\u2019s okay to fail\u2014the worst-case scenario is that you have to rebuild your server and start again. Keep important work backed up, and then have at it using only the documentation provided by the developers of the software you\u2019re trying to install.\u00a0<code>man<\/code>\u00a0has worked for Unix developers for decades at this point, so it can work for you, too.<\/p>\n<p><strong>Embrace tutorials<\/strong>: Tutorials are a time-tested method of learning how to get something done on a VPS, and we can\u2019t recommend them enough\u2014have you tried out\u00a0<a href=\"https:\/\/www.ssdnodes.com\/blog\/tag\/tutorials\/\">any of our own<\/a>?<\/p>\n<p>This might seem contradictory to the learn-automate cycle, but as long as you approach tutorials with a willingness to learn over simply copy-pasting commands into your shell, tutorials will always be a useful resource. With that said, you should try to use tutorials that are aimed at teaching you rather than just instructing you. We always try to teach rather than instruct, but if we\u2019re not doing our job well enough, let us know.<\/p>\n<p><strong>Avoid scripts if possible<\/strong>: We like to tell our users that scripts like EasyEngine exist, but can\u2019t necessarily recommend them,\u00a0<em>particularly<\/em>\u00a0to newer users. If something goes wrong with your installation, and all you did is type one command into a terminal, you have no shot at troubleshooting it. If you went through the steps yourself, and understand how the components fit together, you at least have a shot.<\/p>\n<p><strong>Don\u2019t trust any one configuration<\/strong>: I remember quite clearly stumbling upon the\u00a0<a href=\"https:\/\/github.com\/geerlingguy\/ansible-role-security\" target=\"_blank\" rel=\"noopener\">ansible-role-security<\/a>\u00a0repository while researching Ansible playbooks for CentOS security and finding the following message:<\/p>\n<blockquote><p>First, a major, MAJOR caveat: the security of your servers is YOUR responsibility. If you think simply including this role and adding a firewall makes a server secure, then you\u2019re mistaken.<\/p><\/blockquote>\n<p>That couldn\u2019t be more true\u2014it\u2019s bad practice, and quite dangerous, frankly, to blindly use someone else\u2019s automation tools without understanding the underlying processes. It could leave you locked out of your VPS, or create a vulnerability you weren\u2019t aware of. Same goes for any configuration we offer via tutorials.<\/p>\n<p><strong>Learn to automate<\/strong>: We\u2019re finally to the second half of the learn-automate cycle. They is where you can start to figure out how to automate the processes that you\u2019ve already learned. It\u2019s okay if they\u2019re based on the work of others, but you should aim to understand how each of the pieces fit and work together.<\/p>\n<p>Remember that any automation tool\u2014whether it\u2019s Ansible or Gulp or Travis CI\u2014doesn\u2019t have to be perfect right away. You can always tweak things later.<\/p>\n<p>And that\u2019s the core of the learn-automate cycle, whether we\u2019re in\u00a0<em>Factorio<\/em>\u00a0or on the Linux shell. Learn how to make something, do it poorly, and then do it better. That\u2019s the difference between \u201cspaghetti\u201d (on the left), and something with a little bit more cleanliness in mind.<\/p>\n<table class=\"table table-striped table-bordered\">\n<thead>\n<tr>\n<th><img decoding=\"async\" title=\"A classic spaghetti factory\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2017\/06\/59zzah53wysy.gif\" alt=\"A classic spaghetti factory\" \/><\/th>\n<th><img decoding=\"async\" title=\"Ahh, that's better\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2017\/06\/pYSFjSN.jpg\" alt=\"Ahh, that's better\" \/><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>A classic spaghetti factory.<\/em><\/td>\n<td><em>Ahh, that\u2019s better.<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Remember that any automation tool\u2014whether it\u2019s Ansible or Gulp or Travis CI\u2014doesn\u2019t have to be perfect right away. You can always tweak things later.<\/p>\n","protected":false},"author":20,"featured_media":73,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[18],"tags":[],"class_list":["post-2911","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/2911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/comments?post=2911"}],"version-history":[{"count":3,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/2911\/revisions"}],"predecessor-version":[{"id":13080,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/2911\/revisions\/13080"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media\/73"}],"wp:attachment":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media?parent=2911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/categories?post=2911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/tags?post=2911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}