Posted in Geeky, Uncategorized

The Luxury of Caring

14111743435qkl6It seems like caring about things, really caring (not just screaming about things like politics at the TV or taking care of your pets) and not having to care about just one thing. That’s the great thing about being a geeky girl.

I can care about books, cosplay, board games and cooking. I can love code, zombies (both at the same time) and web videos. I can love YouTubbers and open source software.

People who see themselves as normal tend to self limit. They define themselves by that small set of things, and then not explore other sides of themselves (Warning – this is observational data, and without real science could just be my point of view. If someone wants to find data on this point I’d be open to reading it.) because of it.

That’s what this blog is about. If you have options, and I have options. I just want to be someone that I am interested in, and I think most people want that too. So I hope you enjoy the ride, and I hope that you get as much as this from this as I do.

Advertisements
Posted in Geeky, Uncategorized

A Very Basic Java Model of The Zombie Apocalypse

Screen Shot 2017-05-29 at 11.19.32 PMThe Premise

Bored on a Monday night? Clearly I am. Tonight, I decided to see how long it would take for a single patient (patient zero) to everyone falling into one of three non-human options. The results are the kinds of things that you might find in a horror movie. Of course, that was the goal of the model.

The three categories are:

  1. A zombie
  2. A zombie who has been the victim of a head shot
  3. A dead body (not a zombie)

When that happens, its game over, so to speak. Its a simple model, and you can see it work for yourself if you put it into an online Java compiler.  The model is explained in the comments, and I open to suggestions on ways to improve the math. The code was kept simple intentionally.

The Code (with comments)

Please note for the Java novice, that // denotes a comment. I’m using them here to explain what is going on.

public class ZTester
{

public static void main(String[] args)
{
float zombie = 1;
float population = 1000000;
float encounters = 45;
float bite = 9;
float day = 0;
float headshots = 2;
float dead = 87;

// patient zero daY

for(day = 1; zombie<=population; day++) // A for loop that adds to a day,and only runs as long as there are fewer zombies than the overall population

{

zombie = zombie * (encounters/bite);  // makes # of zombies = to daily encounters divided by number of successful bites administered
float deadZombies = zombie/ headshots; // the number of zombies who were killed via successful human headshots
dead = dead * day;  // the number of people who die of natural causes on any given day
population = population -(dead + zombie); // the new population is population minus the number of dead minus the number of zombies. Sorry no double zombeis
System.out.println(“The day of infection is ” + day);
System.out.println(“The number of zombies who have been head shot today are ” + deadZombies);
System.out.println (“The number of zombies today is ” + (zombie – deadZombies));

if (population <= 0) // sets up an if to print if differently if there are no humans left in the population

System.out.println(“There are no humans left, they are all dead, a zombie or a headshot zombie”);

else

System.out.println(“The number of humans left is ” + population);

System.out.println(“The number of humans who are dead and not zombies ” + dead);

}

}
}

 

The Output ( a day-by-day breakdown of the spread of zombies)

The day of infection is 1.0
The number of zombies who have been head shot today are 2.5
The number of zombies today is 2.5
The number of humans left is 999908.0
The number of humans who are dead and not zombies 87.0
The day of infection is 2.0
The number of zombies who have been head shot today are 12.5
The number of zombies today is 12.5
The number of humans left is 999709.0
The number of humans who are dead and not zombies 174.0
The day of infection is 3.0
The number of zombies who have been head shot today are 62.5
The number of zombies today is 62.5
The number of humans left is 999062.0
The number of humans who are dead and not zombies 522.0
The day of infection is 4.0
The number of zombies who have been head shot today are 312.5
The number of zombies today is 312.5
The number of humans left is 996349.0
The number of humans who are dead and not zombies 2088.0
The day of infection is 5.0
The number of zombies who have been head shot today are 1562.5
The number of zombies today is 1562.5
The number of humans left is 982784.0
The number of humans who are dead and not zombies 10440.0
The day of infection is 6.0
The number of zombies who have been head shot today are 7812.5
The number of zombies today is 7812.5
The number of humans left is 904519.0
The number of humans who are dead and not zombies 62640.0
The day of infection is 7.0
The number of zombies who have been head shot today are 39062.5
The number of zombies today is 39062.5
The number of humans left is 387914.0
The number of humans who are dead and not zombies 438480.0
The day of infection is 8.0
The number of zombies who have been head shot today are 195312.5
The number of zombies today is 195312.5
There are no humans left, they are all dead, a zombie or a headshot zombie
The number of humans who are dead and not zombies 3507840.0

Image courtesy of MorgueFile user wintersixfour under a Morguefile license.