Platform Puzzler Wildfire Launches On Consoles This Week
Wildfire, a slow-going platformer where fire is your best friend, launches on consoles this week. Its bite sized levels require you to find the best way to get from one point to another while completing various missions.
The Sneaky Bastards-developed stealth sidescroller originally launched on Steam in May and is coming to Nintendo Switch, PS4, and Xbox One on December 3. It'll cost $14.99 on all platforms.
There's a good variety of mission types.
Wildfire puts you in the shoes of a villager who's town is burnt to a crisp by a "villainous force" of strange Amazonian women. You must find and saved your friends who have been captured by completing short, Celeste-like levels that are connected by an overarching narrative.
He’s back. All of us at EA Sports are excited to announce that David Beckham is returning to EA Sports FIFA, and you can pick him up for free in FIFA Ultimate Team and Volta Football just by playing FIFA 21 by January 15, 2021!
It’s time to get lively as DB7 becomes playable (or should that be unplayable?!) again. Anyone who plays FIFA 21 by January 15 – including anyone who’s played the game up to now – will get a free, untradeable, bespoke Beckham item to add to their dream squad in FIFA Ultimate Team starting December 15, as well as adding him to your team in Volta Football as our latest Groundbreaker.
Becks scooped a whopping 115 caps for England, landing third for his country’s most capped player with some heroic, unforgettable moments including that free kick against Greece. Corners? Free kicks? Crosses? Yep, got them covered.
Get ready to unleash that renowned dead-ball specialism as you whip a trademark free kick into the top bin in that crunch Division Rivals match, or bend a corner in for your mate to nod home in FUT Co-Op with Beckham’s bespoke, one-of-a-kind FUT item that celebrates his stint in the Spanish capital at Real Madrid – granted to you to add to your squad. Take advantage of this moment and build teams that fuse different parts of Beckham’s amazing career to get creative with your starting 11.
You can take Becks with you back into the streets of Paris or Los Angeles too – two cities he once called home. Only now, you’ll be under the lights of the cages in Volta Football as Beckham joins the lineup of Groundbreakers – huge names from the world of football, fashion, music and beyond that you can play as on the streets. Get ready to use Beckham’s finesse technique to whip the ball off the wall and invent angles for some typically stylish finishes and pinpoint assists.
He’ll also be joining the best players to ever play the beautiful game as the newest Icon in FIFA 21 Ultimate Team alongside many familiar faces and former team mates – Ronaldo, Zidane, Ronaldinho, Scholes, Keane, Giggs, Nesta, and more – when he drops as an Icon on December 4! More info on those DB7 Icon ratings is coming soon…
With the Xbox Series X|S out now too, we’re also excited to be offering you the chance to upgrade your copy of FIFA 21 for free once the next generation experience launches on December 4! That means if you play FIFA 21 on Xbox One, or play the backwards compatible version on Xbox Series X|S, you’ll get to download and play the next generation experience for free, and you’ll even get to carry over your progress in FUT and Volta Football – including Becks – when you make the switch!
Many know Beckham for his wide array of ventures: charity, fashion, design. But there are few players who ended their careers with as many trophies. 6 Premier League titles, 1 UEFA Champions League, 1 LaLiga, and a Ligue 1 trophy – that’s before the individual honours. The man for the big occasion, an icon who embodies the spirit of winning as one, has returned. To celebrate his incredible career at the top of the game, you can pick up the special FIFA 21 Beckham Edition now from the Xbox Store and get in game in time to pick Becks up in FUT and Volta.
Act fast. Don’t miss your chance to bend it like Becks!
EG7 pens deal to acquire EverQuest and H1Z1 dev Daybreak for $300 million
Daybreak Game Company, the game dev studio behind the early MMO EverQuest and more recent forays into online play like Z1 Battle Royale, is set to be acquired by Enad Global 7 (EG7).
The deal will see EG7 scooping up 100 percent of the shares in Daybreak for a total of $300 million in both cash and EG7 shares.
“Daybreak Games has an incredible legacy, an impressive portfolio of game franchises and the most incredible community of players,” reads a statement from Daybreak CEO Ji Ham.
“Combined with EG7, we are better positioned to expand on those amazing IPs, grow its development teams and player communities and fund exciting future games.”
On EG7’s part, the company says the Daybreak purchase will bolster EG7’s game portfolio of games and properties while also bring strong development, operations, and strategy teams from Daybreak into the fold.
This is also the second major acquisition the company has announced this week, following yesterday’s news that it is set to acquire MechWarrior dev Piranha Games for $24.2 million.
Best of 2020: Rebuilding a classic in Age of Empires II: Definitive Edition
In the ’90s and early 2000s, the name Age of Empires stood out as one of the dominant and biggest-selling game titles in the strategy marketplace. Last year, Microsoft and game studio Forgotten Empires teamed up to release definitive editions for Age of Empires and Age of Empires II.
After the launch of Age of Empires II: Definitive Edition, lead developer Bert Beeckman dropped by the GDC Twitch channel to discuss the process of revamping this series, and what considerations were needed to add new civilizations to the game.
Beeckman and his colleagues at Forgotten Empires are a team of former modders who organized as a studio after their mods to the Age of Empires games took off and caught the attention of Microsoft. If you’ve ever wondered about how a team of modders could take up the mantle of developing Age of Empires, here’s some insight from Beeckman on the process…
Back in the HD edition, the main goal was “let’s bring Age of Empires back to the players.” There were a lot of players who hadn’t played the original, there were no CD players on laptops, for example. That was kind of the goal for the HD edition, to bring it back to the players.
And it kind of grew on that. We brought more content [to the definitive edition] because there was clearly a demand from the community. But then when the definitive editions were made it was more than “OK, let’s bring back Age II.” That’s actually the whole project goal from within Microsoft and from us as well. We need to make the best Age II possible.
It was a very very different approach—[we said] “let’s make sure everything we have up to this point is the best possible thing that we can make.”
That’s kind of the biggest difference and manifests itself in many ways as well. If you look at the graphics, if you put them side by side you would see [changes] like the building style beautifully collapses, it comes crumbling down, or we have the smoke that comes out of the barrel of the cannon. All the little details make it look prettier.
With that said, literally every asset in the game had to be remade. In the HD editions, all the graphics were the original graphics. Now we have much higher quality sprites.
The art direction was something we did in-house, that was all done in in collaboration with Microsoft, but a lot of the asset work was luckily done by [an external] studio that helped us out.
With that said, it was still a crazy amount of work. When we started this we made a list of all the assets we had to remake. This is not just one game we’re making, this is six games worth of assets.
We didn’t have any of the original assets. Those were all lost. So we literally had no choice but to make everything from scratch. One thing is that we had the original art.
One of the things we really wanted to stick to was [that] people have been recognizing this specific unit as being a camel…We wanted to make sure you still recognized that unit as a camel, 20 years later.
So we didn’t have to go around and redesign all the assets. It might only be 100 pixels high and now it’s like four times the fidelity. We need to imagine what all those pixels in between look like, but as an overall view you kind of know what it’s going to look like. That really helped in speeding up the process. It helped us stick to the original design and we just tried to bring that back as good as possible.
There’s a bit of an issue there, there were things to consider–like we have now 11 different architecture sets and 35 civilizations, but let’s assume we’re not going per civ. That’s still 10 sets of units you need to recognize, which makes things a lot more complicated.
One of the beauties of Age of Empires II is that you see the units and you know what it is. That’s very, very important in RTS games. If you have 10 times the amount of units it’s much much harder to do that, let alone with 35 sets of units–not to mention it’s a lot more assets and that will take a lot more memory space and more disc space.
This game is still 2D. A lot of people think it’s 3D now, but it’s actually 2D sprites because we really wanted to keep that old feel, but at the same time it’s very, very heavy on the computers. It’s a lot of space that is taken on your hard disc for all those sprites.
Researching has always been very interesting; we try to look at it from various perspectives. History is always written from certain perspectives. For example when we were working on the Tatars, we reached out to some universities in the region…we read research papers from these students as well and went to libraries, we did a lot of good old fashioned research, to be honest.
It’s actually quite fun. You can start from Wikipedia but after that you need to get dirty with some actual proper research. At that point we have a lot of information to work from. At that point it’s like, ok, we’re still making a video game. We’re not just making a history book. That’s kind of where you have to say “we need to make decisions.”
For example we have the Cumans we just added to the game. They went extinct before most of the civilizations in Age of Empires were around. Does that mean this civilization needs to stop being relevant as you advance through the game? Probably not because then the game would be unbalanced. This is also where you need to weigh gameplay versus history at that point.
We kind of recognized that Age of Empires has always been a bit of a Hollywood version of history. There are some representations that’s more Hollywood than realism. Not completely, of course, we do a lot of good historical research. Sometimes if our historical teams are watching a movie and go “jeez what were they doing? 15th century helmets in an 8th century spectacle? That makes no sense.” That’s the level we try to go for.
Just doing history and trying to find sources outside of sources we have available. We’re going to the local library, and try to reach out to universities from that area. A lot of people speak English now and they’re very very happy to help.
Age of Empires is a very international brand as well, and if you reach out to a university in Peru, for example, and you ask them something about Age of Empires they’ll go “oh yeah!” It’s not just in the USA and Europe, it’s known all over the world.
A lot of people are very enthusiastic to help represent their country and their culture in game. And they mostly ask questions like “hey you kind of represented a certain thing that happened in history in game? Maybe that’s not the best way to do it.” And then we adapt to that and make changes there. It’s a lot of iteration in that sense.
Right, exactly. And that’s also what a lot of people love. Usually that’s where we get the most feedback; like we added a civilization to the game, and you can expect a lot of people from those countries reaching out and saying “hey, this and this and this and this are great.” Usually we try to anticipate that as much as possible of course.
Back from one of our first campaigns we were looking at a new civ. We were going to add a new campaign and this guy had an interesting story [for us] to tell. And then we asked the local community from that country to get some ideas. And they were like “oh, that’s kind of our local Hitler. You don’t want to glorify that guy.” And we went “oh ok! We won’t.”
It can be tricky. But that’s also a perfect example of showing ok, what we’re showing here is a lot of Western history, and that’s limited. You need to be careful with that.
For more insights on the making of Age of Empires II: Definitive Edition, you can watch the full interview with Beeckman below!
Feature: Best Nintendo Switch Card Games, Board Games And Deck Builders
You’d be forgiven for thinking that physical tabletop gaming might have trouble surviving in this digital and ever-mobile age, but collectible card games and traditional board games are arguably more popular than ever. Excellent digital versions of household staples sit alongside entirely original offerings that serve up the full tabletop experience with added digital convenience. Online play can be a real lifesaver if you’re stuck indoors and can’t get to a friend’s house, and not needing to lug a weighty card collection around will do wonders for your posture, too.
Below we’ve assembled a selection of the best Switch card games, deck building games and traditional-style board games. While titans of the genre like Hearthstone and Magic: The Gathering aren’t currently available on Switch, the console boasts a varied selection; some pure card games, others hybrid RPG experiences or totally board-based, but they all have quality in common. Switch’s hybrid nature makes it an ideal home for CCGs and board games, with the option to play on your TV at home and carry on in handheld mode when you’re out and about.
So, may we present — in a randomly shuffled order — the best deck builders, card and board games on Switch…
Publisher: Nintendo / Developer: Nintendo
Release Date: 5th Jun 2020 (USA) / 5th Jun 2020 (UK/EU)
Compilation games like Clubhouse Games: 51 Worldwide Classics always have a variety of hits and misses depending on your own personal taste, but there’s a wide enough variety of board, card and action games here that you’re sure to find a number that will appeal to you. Texas Hold’em, Solitaire, Majong, Blackjack, Dominoes, erm… bowling; every one of the 51 games is presented with charm and warmth (terribly-written cutscenes aside) and there’s an enormous amount of content on offer, whether you plan on playing solo or with others. The perfect game for if you’re stuck indoors with the family? Quite possibly.
Please note that some external links on this page are affiliate links, which means if you click them and make a purchase we may receive a small percentage of the sale. Please read our FTC Disclosure for more information.
Publisher: League of Geeks / Developer: League of Geeks
While this turn-based affair might look, move and feel just like a real board game, Armello is actually a completely original creation – and one that does more than simply doff its cap at the world of tabletop gaming. From the deep tactics of its living board game gameplay to the sheer charm of its world-building and animal character designs, it’s a quest filled with back-stabbing, political power plays and rampaging monsters that’s different each and every time you play. It’s at its absolute best when played in multiplayer, that human factor making for an even more unpredictable battle for the corrupted throne. You’d be doing yourself a disservice not to add this anthropomorphic tale to your wish list.
Publisher: CD Projekt Red / Developer: CD Projekt Red
Release Date: 28th Jan 2020 (USA) / 28th Jan 2020 (UK/EU)
While utilising the ruleset of a more traditional CCG system might put off some players, the on-brand approach to turn-based combat in Thronebreaker: The Witcher Tales is still a positive addition to the world. Because with such an involved and intricately designed story – and such an interesting world to explore beyond the confines of Geralt – Thronebreaker offers the opportunity to lose yourself in the Continent like never before.
Publisher: Nomad Games / Developer: Nomad Games
Release Date: 9th Mar 2020 (USA) / 9th Mar 2020 (UK/EU)
Talisman: Digital Edition is a worthy, content-rich adaptation of a superb board game. It offers a vast multitude of unbalanced characters to choose from, hundreds upon hundreds of Adventure Cards with something new to see on every play, and spellcasting battles leading to pure salt from the eventual loser. It’s an absolute classic, and there’s also cross-platform online play in the Switch version, so you’ll be able to play with friends on Steam, Android and iOS. The only real caveats are the excess of DLC and – let’s face it – the fairly unbalanced gameplay of the original Talisman, but we love it.
Remarkably solid and satisfying, SteamWorld Quest: Hand of Gilgamech is a card battler with an abundance of charm in its art, mechanics and writing. The presentation is slick, the dialogue’s witty and the gameplay’s addictive. It doesn’t have quite that special feeling that SteamWorld Dig 2 did, but it’s still a thoroughly enjoyable time in that universe. As long as you’re not expecting anything revolutionary, we recommend anybody who likes turn-based battling or who enjoyed any previous games in the series check SteamWorld Quest out.
Publisher: Ripstone / Developer: Ripstone
Release Date: 2nd Nov 2017 (USA) / 2nd Nov 2017 (UK/EU)
Chess Ultra is a visual treat, while also soothing you with pleasant music as you engage in a tough match. There are plenty of options and variety for online and offline matches, with the former being particularly enjoyable if you’re able to get into a real-time contest. With Tournament play and some well constructed Challenges on board, along with Tutorials for newcomers, it ticks most boxes. It’s another checkmate for the Switch eShop.
Publisher: Versus Evil / Developer: Abrakam Entertainment
Release Date: 13th Aug 2020 (USA) / 13th Aug 2020 (UK/EU)
Along with the expected multiplayer modes (ranked and casual battles), Faeria delivers a compulsive, interesting and frankly enormously fun card battle experience. While not the easiest game to explain, it’s an impressive teaching tool for itself, but never feels overwrought or tiresome in said education. Of the card games we’ve enjoyed on Switch, Faeria is easily the highlight of the bunch and deserves to do well. It’s a full-featured package and stands out as an excellent card/board/strategy experience. If you want to play a fantasy card game on Switch, we’d recommend this one first.
Publisher: Defiant Development / Developer: Defiant Development
Almost impossible to categorise yet utterly compelling as a result, Hand of Fate 2 is a unique RPG experience. Fusing the basic premise of a deck-building card game with the heart of an action-RPG, there’s just so much to enjoy here; the rewarding premise of its deck-building, the endless depth of its questing, the simple pleasure of its combat. This is a handheld port that’s practically indistinguishable from the version you can play elsewhere. Do yourself a favour and get this fantasy romp in your digital library right now.
In the highly competitive world of CCGs, PlayFusion has taken one of the biggest fantasy licences and seamlessly melded it with a card battling system that’s both easy to grasp and different enough to set itself apart from its contemporaries. With the addition of extra modes, including the Arena of Echoes and Realm Trials, and the option to scan in cards from your physical deck, there’s a deep and customisable experience in Warhammer Age of Sigmar: Champions that’s ideal for genre veterans. Joy-Con controls work well enough – enabling you to play in docked mode – but it’s at its best when played intimately in handheld mode with the touchscreen. The need for a constant internet connection will irk some, but for those that are willing to be tethered to Wi-Fi, PlayFusion has served up a fine rival to the likes of Hearthstone.
Publisher: Humble Bundle / Developer: Mega Crit
Release Date: 6th Jun 2019 (USA) / 6th Jun 2019 (UK/EU)
Slay the Spire is an endlessly addictive roguelike card-battler that’s a perfect fit for the Switch; a beautifully balanced game that arrived on Nintendo’s system with all the benefits of an extended period of Early Access on PC. Its combination of ferocious battles, entertaining chance encounters and selection of three impressively different player characters make every run to the top a nerve-wracking and totally absorbing affair. Massively inventive sets of cards combine majestically into hugely destructive combos and attack and defence options fuse perfectly together, enabling players to use the information provided by the brilliantly transparent Intent system to strategise endlessly against the hordes of foul monstrosities that stand between themselves and victory. Sure, you’ll eventually see every enemy and chance encounter and yes, there are a few framerate niggles here and there, but overall this is one dungeon crawler that will live long in our system memories.
Kratos Is Coming To Fortnite Season 5, According To A Leak
Fortnite is no stranger to crossovers with other franchises, and the next one has--as is often the case--already leaked. With Season 5 underway, it looks as if a character from a major PlayStation franchise will be showing his face in the battle royale game in the near future: God of War's Kratos. If a leak is to be believed, Kratos will be getting a Fortnite skin, although exactly when it's coming and how you'll get it--or indeed, its very existence--have yet to be confirmed.
Popular Fortnite leaker HypeX tweeted out an image of Kratos, saying that he'll be added to the game "soon." It hasn't been confirmed by Epic Games yet, but HypeX has a notable track record of leaking credible Fortnite news early. It's unclear how soon the skin will be released or if it might be an exclusive to PS4 and PS5 in some fashion. Season 5 will run for the next two-plus months.
The version of Kratos apparently coming to the game is based on his look from the 2018 soft reboot. It continued off from the storyline of the original trilogy, but it used a drastically different combat system and perspective.
Posted by: xSicKxBot - 12-03-2020, 04:33 AM - Forum: Lounge
- No Replies
Fortnite Season 5 Has A Secret Mystery Skin
Fortnite's Season 5 began with a bang earlier today when it brought a semi-new map, Baby Yoda, and the Mandalorian to the battle royale. Players were quick to dissect all the changes that came with the new season--including a mysterious secret skin.
There is an entire set of cosmetics listed under a "Mystery Rewards" tab in Fortnite's battle pass menu this season. They include a skin, back bling, harvesting tool, built-in emote, and more. There are no clues as to what the skin is, although players believe it'll be the Agent Jonesy character we saw in the Galactus and The Device event. Other players hope it'll be a different skin that goes along with Season 5's hunter theme. (And it's possible, although unlikely, that this relates to the leaked Fortnite Kratos skin.)
Previous seasons had additional skins like this as well, but they weren't hidden. Season 3 featured Aquaman with different unlockable styles and last season had Wolverine as an additional reward. Both were revealed at the beginning of the season. Players could earn them by completing character-specific challenges. Season 5's mystery rewards also have challenges but they haven't been revealed yet.
Posted by: xSicKxBot - 12-02-2020, 09:29 PM - Forum: Windows
- No Replies
How Microsoft does DevOps – from the 1990s to now
Abel
December 2nd, 2020
So, just how does Microsoft do DevOps? I get asked this all the time. The answer is a little bit complex because to really understand how Microsoft does DevOps, you need to understand where Microsoft was in the late 90’s and early 2000’s. And just what kind of changes we had to go through to truly embrace a DevOps world.
Microsoft’s Enterprise DevOps Transformation Story
Check out this talk where I walk you through Microsoft Enterprise DevOps Transformation Story.
Ok, That’s a Cool Start, But I Want More Details
That was a pretty cool story right? I touched on a lot of DevOps topics in this story but I’m sure some of you want more details!
There are, like most things in the Unix/Linux world, many ways of doing things with Vagrant, but here are some examples of ways to grow your Vagrantfile portfolio and increase your knowledge and use.
If you have not yet installed vagrant you can follow the first part of this series.
Also in this section you can configure provider-specific options. In this case the provider is libvirt, and the specific config looks like this:
config.vm.provider :libvirt do |libvirt|
libvirt.cpus = 1
libvirt.memory = 512
In the example above, all libvirt VMs will be created with a single CPU and 512Mb of memory unless specifically overridden.
The VM namespace is where you define all machines you want this Vagrantfile to build. Notice that this is still a part of the config section, and lines should therefore begin with ‘config’. All sections or parts of sections have an ‘end’ statement to close them off.
Creating multiple machines at once
Depending on what you need to achieve, this can be a simple loop or multiple machine definitions. To create any number of machines in a series, with the same settings but perhaps different names and/or IP addresses, you can just provide a range as shown here:
(1..5).each do |i|
config.vm.define "server#{i}" do |server|
server.vm.hostname = "server#{i}.example.com"
end
end
This will create 5 servers, named server1, server2, server3 etc.
Of note, using Ruby style “for i in 1..3 do” doesn’t work despite Vagrantfile syntax actually being Ruby, so use the method from the example above.
If you need servers with different hostnames, different hardware etc then you’ll need to specify them individually, or at least in groups if the situation lends itself to that. Let’s say you need to create a typical web/db/load balancer infrastructure, with 2 web servers, a single database server and a load balancer for the web traffic. Ignoring the specific software setup for this, to simply create the virtual machines ready for provisioning you could use something like this:
# Load Balancer
config.vm.define "loadbal", primary: true do |loadbal|
loadbal.vm.hostname = "loadbal"
end
# Database
config.vm.define "db", primary: true do |db|
db.vm.hostname = "db"
end
# Web Servers x2
(1..2).each do |i|
config.vm.define "web#{i}" do |web|
web.vm.hostname = "web#{i}"
end
end
This uses a combination of multiple machine calls and a small loop to build 4 VMs with a single ‘vagrant up’ command.
Networking
Vagrant generally creates its own network for VM access, and you use this with ‘vagrant ssh’. If you create more than one VM then you must use the VM name to identify which one you wish to connect to – vagrant ssh vmname.
There are a number of configuration options available which allow you to interact with your VMs in various ways.
The vagrant-libvirt plugin creates a network for the guests to use. This is automated and will always be present even if you define your own networks. The network is named “vagrant-libvirt” and can be seen either in the Virtual Networks tab of virt-manager’s connection details or by issuing a sudo virsh net-list command.
If you use dhcp for your guests, you can find the individual IP addresses with the virsh net-dhcp-list command: sudo virsh net-dhcp-leases vagrant-libvirt
Port Forwarding
The simplest change to default networking is port forwarding. This uses a simple format like most Vagrant config: config.vm.network “forwarded_port”, guest: 80, host: 8080
This listens to port 8080 on your local machine and forwards connections to port 80 on the Vagrant machine. If you need to use a UDP port, simply add , protocol: “udp” to the end of that line (notice that comma which should come immediately after the second port number).
Obviously for more complex configurations this might not be ideal, as you need to specify every single port you want to forward. If you then add multiple machines the complexity can really become too much.
In addition to this, anyone on your network can access these ports if they know your IP address, so that’s something you should be aware of.
Public Network
This creates a network card for the Vagrant VM which connects to your host network, and will therefore be visible to all machines on that network. As Vagrant is not designed to be secure, you should be aware of any vulnerabilities and take steps to protect against them.
To configure a public network, add config.vm.network “public_network” to your Vagrantfile. This will use DHCP to obtain a network address.
If you wish to assign a static IP address, you can add one to the end of the network declaration: config.vm.network “public_network”, ip: “192.168.0.1”
If you’re creating multiple guests you can put the network configuration in the vm namespace, and even allocate IPs based on iteration too:
Vagrant.configure("2") do |config|
config.vm.box = "centos/8"
config.vm.provider :libvirt do |libvirt|
libvirt.qemu_use_session = false
end
# Servers x2
(1..2).each do |i|
config.vm.define "server#{i}" do |server|
server.vm.hostname = "server#{i}"
server.vm.network "public_network", ip: "192.168.122.20#{i}"
end
end
end
Private Network
This works very much like the Public Network option, only the network is only available to the host machine and the Vagrant guests. The syntax is almost identical too: config.vm.network “private_network”, type: “dhcp”
This will create a new network in libvirt, usually named something like “vagrant-private-dhcp” – you can see this with the command sudo virsh net-list while the VM is running. This network is created and destroyed along with the vagrant guests.
Again, the network config can be specified for all guests, or per guest as shown in the public network example above.
Provisioning
Once you have your VMs defined, you can obviously then do whatever you want with them, but as soon as you issue a ‘vagrant destroy’ command any changes will be lost. This is where automated provisioning comes in.
You can use several methods to provision your machines, from simple file copies to shell scripts, Ansible, Chef and Puppet. Many of the main methods can be used, but I’ll cover the simple ones here – if you need to use something else please read the documentation as it’s all covered.
File uploads
To copy a file to the Vagrant guest, add a line to the Vagrantfile like this:
The directory structure should already exist on the Vagrant host, and will be copied in its entirety, including subdirectories and files.
Note: If you add a trailing slash to the destination path, the source path will be placed under this so make sure you only do this if you want that outcome. For example, if the above destination was “$HOME/remote/newfolder/”, then the result would see “$HOME/remote/newfolder/folder” created with the contents of the source placed here.
Shell commands
You can include individual commands, inline scripts or external scripts to perform provisioning tasks.
A single command would take this form, and any valid command line command can be used here: config.vm.provision “shell”, inline: “sudo dnf update -y”
An inline script is less common, and declared at the top of the Vagrantfile then called during provisioning:
$script = <<-SCRIPT
echo I am provisioning...
date > /etc/vagrant_provisioned_at
SCRIPT
Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: $script
end
More common is the external shell script, which gives more flexibility and makes code more modular. Vagrant uploads the file to the guest then executes it. Simply call the script in the provisioning line:
config.vm.provision “shell”, path: “script.sh”
The file need not be local to the Vagrant host either:
You specify an Ansible playbook to provision your VM in the following way:
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yml"
end
This then calls the playbook, which will run as any externally-run ansible playbook would.
If you’re building multiple VMs with your Vagrantfile then it’s likely you want different configurations for some of them, and in this case you should provision within the definition of each VM, as shown here:
# Web Servers x2
(1..2).each do |i|
config.vm.define "web#{i}" do |web|
web.vm.hostname = "web#{i}"
web.vm.provision "ansible" do |ansible|
ansible.playbook = "web.yml"
end
end
end
Ansible provisioners come in two formats – ansible and ansible_local. The ansible provisioner requires that Ansible is installed on the Vagrant host, and will connect remotely to your guest VMs to provision them. This means all necessary ssh authentication must be in place for it to work. The ansible_local provisioner executes playbooks directly on the guest VMs, which therefore requires Ansible be installed on each of the guests you want to provision. Vagrant will try to install Ansible on the guests in order to do this, (This can be controlled with the install option, but is enabled by default). On RHEL-style systems like Fedora, Ansible is installed from the EPEL repository. Simply use either ansible or ansible_local in the config_vm_provision command to choose the style you need.
Synced Folders
Vagrant allows you to sync folders between your Vagrant host and your guests, allowing access to configuration files, data etc. By default, the folder containing the Vagrant file is shared and mounted under /vagrant on each guest.
To configure additional synced folders, use the config.vm.synced.folder command:
config.vm.synced_folder "src/", "/srv/website"
The two parameters are the source folder on the Vagrant host and the mount directory on the guest. The destination folder will be created if it does not exist, recursively if necessary.
Options for synced folders allow you to configure them better, including the option to disable them completely. Other options allow you to specify a group owner of the folder (group), the folder owner (owner), plus mount options. There are others but these are the main ones.
You can disable the default share with the following command:
When using Vagrant on a Linux host, synced folders use NFS (with the exception of the default share which uses rsync; see below) so you must have NFS installed on the Vagrant host, and the guests also need NFS support installation. To use NFS with non-Linux hosts, simply specify the folder type as ‘nfs’:
These are the easiest to use as they usually work without any intervention on a Linux host. This is a one-way sync from host to guest performed at startup (vagrant up) or after a vagrant reload command is issued. The default share of the Vagrant project directory is done with rsync. To configure a synced folder with rsync, specify the type as ‘rsync’:
This chapter draft is part of my upcoming book “From One to Zero” (NoStarch 2021). You’ll learn about the concept of premature optimization and why it hurts your programming productivity. Premature optimization is one of the main problems of poorly written code. But what is it anyway?
Definition Premature Optimization
Definition: Premature optimization is the act of spending valuable resources—such as time, effort, lines of code, or even simplicity—on unnecessary code optimizations.
There’s nothing wrong with optimized code.
The problem is that there’s no such thing as free lunch. If you think you optimize code snippets, what you’re really doing is to trade one variable (e.g., complexity) against another variable (e.g., performance).
Sometimes you can obtain clean code that is also more performant and easier to read—but you must spend time to get to this state! Other times, you prematurely spend more lines of code on a state-of-the-art algorithm to improve execution speed. For example, you may add 30% more lines of code to improve execution speed by 0.1%. These types of trade-offs will screw up your whole software development process when done repeatedly.
Donald Knuth Quote Premature Optimization
But don’t take my word for it. Here’s what one of the most famous computer scientists of all times, Donald Knuth, says about premature optimization:
“Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97 % of the time: premature optimization is the root of all evil.” — Donald Knuth
Knuth argues that most of the time, you shouldn’t bother tweaking your code to obtain small efficiency gains. Let’s dive into five practical instances of premature optimization to see how it can get you.
Six Examples of Premature Optimization
There are many situations where premature optimization may occur. Watch out for those! Next, I’ll show you six instances—but I’m sure there are more.
Premature Optimization of Code Functions
First, you spend a lot of time optimizing a code function or code snippet that you just cannot stand leaving unoptimized. You argue that it’s a bad programming style to use the naïve method, and you should use more efficient data structures or algorithms to tackle the problem. So, you dive into learning mode, and you find better and better algorithms. Finally, you decide on one that’s considered best—but it takes you hours and hours to make them work. The optimization was premature because, as it turns out, your code snippet is executed only seldom, and it doesn’t result in meaningful performance improvements.
Premature Optimization of Software Product’s Features
Second, you add more features to your software product because you believe that users will need them. You optimize for expected but unproven user needs. Say you develop a smartphone app that translates text into morse code lights. Instead of developing the minimum viable product (MVP, see Chapter 3) that does just that, you add more and more features that you expect are necessary, such as a text to audio conversion and even a receiver that translates light signals to text. Later you find out that your users never use these features. Premature optimization has significantly slowed down your product development cycle and reduced your learning speed.
Premature Optimization of Planning Phase
Third, you prematurely optimize your planning phase, trying to find solutions to all kinds of problems that may occur. While it’s very costly to avoid planning, many people never stop planning, which can be just as costly! Only now the costs are opportunity costs of not taking action. Making a software product a reality requires you to ship something of value to the real world—even if this thing is not perfect, yet. You need user feedback and a reality check before even knowing which problems will hit you the hardest. Planning can help you avoid many pitfalls, but if you’re the type of person without a bias towards action, all your planning will turn into nothing of value.
Premature Optimization of Scalability
Fourth, you prematurely optimize the scalability of your application. Expecting millions of visitors, you design a distributed architecture that dynamically adds virtual machines to handle peak load if necessary. Distributed systems are complex and error-prone, and it takes you months to make your system work. Even worse, I’ve seen more cases where the distribution has reduced an application’s scalability due to an increased overhead for communication and data consistency. Scalable distributed systems always come at a price—are you sure you need to pay it? What’s the point of being able to scale to millions of users if you haven’t even served your first one?
Premature Optimization of Test Design
Fifth, you believe in test-driven development, and you insist on 100% test coverage. Some functions don’t lend themselves to unit tests because of their non-deterministic input (e.g., functions that process free text from users). Even though it has little value, you prematurely optimize for a perfect coverage of unit tests, and it slows down the software development cycle while introducing unnecessary complexity into the project.
Premature Optimization of Object-Orientated World Building
Sixth, you believe in object orientation and insist on modeling the world using a complex hierarchy of classes. For example, you write a small computer game about car racing. You create a class hierarchy where the Porsche class inherits from the Car class, which inherits from the Vehicle class. In many cases, these types of stacked inheritance structures add unnecessary complexity and could be avoided. You’ve prematurely optimized your code to model a world with more details than the application needs.
Code Example of Premature Optimization Gone Bad
Let’s consider a small Python application that should serve as an example for a case where premature optimization went bad. Say, three colleagues Alice, Bob, and Carl regularly play poker games in the evenings. They need to keep track during a game night who owes whom. As Alice is a passionate programmer, she decides to create a small application that tracks the balances of a number of players.
She comes up with the code that serves the purpose well.
Listing: Simple script to track transactions and balances.
The script has two global variables transactions and balances. The list transactions tracks the transactions as they occurred during a game night. Each transaction is a tuple of sender identifier, receiver identifier, and the amount to be transferred from the sender to the receiver. The dictionary balances tracks the mapping from user identifier to the number of credits based on the occurred transactions.
The function transfer(sender, receiver, amount) creates and stores a new transaction in the global list, creates new balances for users sender and receiver if they haven’t already been created, and updates the balances according to the transaction. The function get_balance(user) returns the balance of the user given as an argument. The function max_transaction() goes over all transactions and returns the one that has the maximum value in the third tuple element—the transaction amount.
The application works—it returns the following output:
But Alice isn’t happy with the application. She realizes that calling max_transaction() results in some inefficiencies due to redundant calculations—the script goes over the list transactions twice to find the transaction with the maximum amount. The second time, it could theoretically reuse the result of the first call and only look at the new transactions.
To make the code more efficient, she adds another global variable max_transaction that keeps track of the maximum transaction amount ever seen.
By adding more complexity to the code, it is now more performant—but at what costs? The added complexity results in no meaningful performance benefit for the small applications for which Alice is using the code. It makes it more complicated and reduces maintainability. Nobody will ever recognize the performance benefit in the evening gaming sessions. But Alice’s progress will slow down as she adds more and more global variables (e.g., tracking the minimal transaction amounts etc.). The optimization clearly was a premature optimization without need for the concrete application.
Do you want to develop the skills of a well-rounded Python professional—while getting paid in the process? Become a Python freelancer and order your book Leaving the Rat Race with Python on Amazon (Kindle/Print)!
Where to Go From Here?
Enough theory, let’s get some practice!
To become successful in coding, you need to get out there and solve real problems for real people. That’s how you can become a six-figure earner easily. And that’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?
Practice projects is how you sharpen your saw in coding!
Do you want to become a code master by focusing on practical code projects that actually earn you money and solve problems for people?
Then become a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.