Geek Girl Joy

Lets build an Auto Coding GIT Commit Bot

My friend Oliver approached me recently with an idea for a project that we could both work on together and after he explained the basic premise I was on board!

The initial concept was wouldn’t it be fun to have a bot that could publish your git commits for you? Which of course the only correct answer is “HELL YEAH!”!

Oliver, built a prototype and then had the great idea of using a Raspberry Pi to act as a sort of “Auto Commit Robot” and to test his newly minted bot he modified it to create randomly generated files to commit, and that’s when it hit us… There was a bigger story here…

One of the first uses for the bot we considered was the the idea that although most employers are reasonable and will look at the quality of your code, there are still some that look at how frequently you commit as a large indicator of how ‘driven’ or ‘voracious’ of a programmer you are, which if you think about it makes absolutely no sense at all!

So Oliver suggested, what if you were to just commit the random text he was generating to a private repo but have your commit data publicly available on your GitHub account, this would allow you to push commits every day (or at least on a schedule) and establish a history of regularly pushing commits which is exactly what he built! When he publishes his half of this project I will link to it here.

I highly recommend when it’s published that you head over to read his post and give it a like too! He’s also really nice so feel free to leave him a comment as well, I am sure he would appreciate it! 😉

Now this is where I come in. My portion of this project stems from the fact that not everyone has a Raspberry Pi (or Linux machine since for this purpose they are basically are one in the same) lying around and also not everyone pays GitHub to maintain private repos, so a lot of people are just using GitHub to store free public repositories.

So, my challenge is to turn his bot into a cross platform solution so that it also works with public repos because anyone looking past just the number of commits would discover the ruse of randomly generated data.

So I modified my scenario a little bit so that my challenge was clearer.

Consider the following: It’s the the new year and you are looking to “get a head start on commits”… or maybe you have a bet with a friend that you can make more commits to your GitHub than they can between now and next month… or maybe you just want to watch the Stock Market fall… Whatever the reason is you decide that you happen to need an auto commit bot…

Once I had a scenario I knew that in order to solve this challenge the data that Oliver’s bot was pushing to the repo had to pass a basic “visual test” ( if not a run test ) even if the results of the code was useless.

With that in mind I set to work designing my methodology.

    1. First, I make the following assumption… ANY line of code that is capable of passing an eval() MUST be good because it “runs” so if I can generate the code segments and make it look like real code (more or less) even if it essentially does nothing, well it’s that much harder to question the validity of the commit, isn’t it?
    2. Further, use shell_exec() to execute the git commands in a cross-platform way.

I could hypothetically generate unit tests using the ASSERT function (thinking in PHP here 😛 ) if I wanted to go that route, though I’ll leave that for you to add to your own implementation!

  1. In any case I set to work coding generate-functions-example.php




function RandomString($length) {		
    $output = '';
    $alphabet = 'abcdefghijklmnopqrstuvwxyz';
    $alphabet_length = strlen($alphabet);

    for ($i = 0; $i <  $length; $i++) {
        $output .= $alphabet[mt_rand(0, $alphabet_length - 1)];
	return $output;

function SelectLanguageFunction($param) {		
	$output = '';
	$action = mt_rand(0, 38);
	// abs
	 if($action == 0){
		$output .= 'abs(' . $param . ')';
	 // acos
	elseif($action == 1){
		$output .= 'acos(' . $param . ')';
	 // acosh
	elseif($action == 2){
		$output .= 'acosh(' . $param . ')';
	 // asin
	elseif($action == 3){
		$output .= 'asin(' . $param . ')';
	 // asinh
	elseif($action == 4){
		$output .= 'asinh(' . $param . ')';
	  // atan
	elseif($action == 5){
		$output .= 'atan(' . $param. ')';
	 // atan2
	elseif($action == 6){
		$output .= 'atan2(' . $param . ', ' . "($param + " . mt_rand(3, 7) . ')  * pi())';
	 // atan
	elseif($action == 7){
		$output .= 'atan(' . $param . ')';
	 // atanh
	elseif($action == 8){
		$output .= 'atanh(' . $param . ')';
	 // bindec
	elseif($action == 9){
		$output .= 'bindec(' . $param . ')';
	 // ceil
	elseif($action == 10){
		$output .= 'ceil(' . $param . ')';
	 // cos
	elseif($action == 11){
		$output .= 'cos(' . $param . ')';
	 // cosh
	elseif($action == 12){
		$output .= 'cosh(' . $param . ')';
	 // decbin
	elseif($action == 13){
		$output .= 'decbin(' . $param . ')';
	 // dechex
	elseif($action == 14){
		$output .= 'dechex(' . $param . ')';
	 // decoct
	elseif($action == 15){
		$output .= 'decoct(' . $param . ')';
	 // deg2rad
	elseif($action == 16){
		$output .= 'decoct(' . $param . ')';
	 // exp
	elseif($action == 17){
		$output .= 'exp(' . $param . ')';
	 // expm1
	elseif($action == 18){
		$output .= 'expm1(' . $param . ')';
	 // floor
	elseif($action == 19){
		$output .= 'floor(' . $param . ')';
	 // fmod
	elseif($action == 20){
		$output .= 'fmod(' . $param . ', 0)';
	 // hexdec
	elseif($action == 21){
		$output .= 'hexdec(' . $param . ')';
	 // hypot
	elseif($action == 22){
		$output .= 'hypot(' . $param . ', ' . $param . ' * 2)';
	  // is_finite
	elseif($action == 23){
		$output .= 'is_finite(' . $param . ')';
	  // is_infinite
	elseif($action == 24){
		$output .= 'is_infinite(' . $param . ')';
	 // is_nan
	elseif($action == 25){
		$output .= 'is_nan(' . $param . ')';
	 // log10
	elseif($action == 26){
		$output .= 'log10(' . $param . ')';
	 // log1p
	elseif($action == 27){
		$output .= 'log1p(' . $param . ')';
	 // log
	elseif($action == 28){
		$output .= 'log(' . $param . ')';
	 // max
	elseif($action == 29){
		$output .= 'max(' . $param . ')';
	 // min
	elseif($action == 30){
		$output .= 'min(' . $param . ')';
	 // octdec
	elseif($action == 31){
		$output .= 'octdec(' . $param . ')';
	 // pow
	 elseif($action == 32){
		$output .= 'pow(' . $param . ',' . mt_rand(2, 7) . ')';
	 // rad2deg
	 elseif($action == 33){
		$output .= 'rad2deg(' . $param . ')';
	 // round
	 elseif($action == 34){
		$output .= 'round(' . $param . ')';
	 // sin
	 elseif($action == 34){
		$output .= 'sin(' . $param . ')';
	 // sinh
	 elseif($action == 35){
		$output .= 'sinh(' . $param . ')';
	 // sqrt
	 elseif($action == 36){
		$output .= 'sqrt(' . $param . ')';
	 // tan
	 elseif($action == 37){
		$output .= 'tan(' . $param . ')';
	 // tanh
	 elseif($action == 38){
		$output .= 'tanh(' . $param . ')';
	 return $output;		 

function SelectOpperation() {
	$action = mt_rand(0, 5);
	// Addition + 
	 if($action == 0){
		 return '+';
	// Subtraction -
	elseif($action == 1){
		 return '-';
	// Multiplication *
	elseif($action == 2){
		 return '*';
	// Division /
	elseif($action == 3){
		 return '/';
	// Modulus %
	elseif($action == 4){
		 return '%';
	// Exponentiation **
	elseif($action == 5){
		 return '**';

function GenerateRandomFunction() {	
	// name the function
    $function_name = ucfirst(RandomString(mt_rand(2, 7)));

	// how many parameters should the function take?
	$number_of_parameters = mt_rand(1, 3);
	$parameters = array();
	for ($i = 0; $i < $number_of_parameters; $i++) {
		 $param_name = RandomString(mt_rand(2, 5));
		 $parameters[] = "$$param_name";
	// build function comment
	$funk_header = '/**' . PHP_EOL; // open comment
	$funk_header .= ' * Does Something' . PHP_EOL;  // function description
	$funk_header .= ' *' . PHP_EOL; 
	foreach($parameters as $parameter){
		$funk_header .= ' * @param ' . $parameter . ' Add Description' . PHP_EOL; // parameter description
	$funk_header .= ' *' . PHP_EOL; 
	$funk_header .= ' */' . PHP_EOL;  // close comment
	// build function
	$funk = 'function ' . $function_name . '(' . implode(', ', $parameters) . '){ ' . PHP_EOL;
	// do something with the parameters
	$funk .= str_repeat(' ', 4) . 'return ';
	foreach( $parameters as $key=>$parameter){
		$funk .= SelectLanguageFunction($parameter); // do something with the parameters
		if($key < $number_of_parameters - 1){
			$funk .= ' '. SelectOpperation() .' '; // add opperation
	$funk .= ';'; // add semicolon

	// build end of function
	$funk .= PHP_EOL . '}' . PHP_EOL . PHP_EOL;
	return  $funk_header . $funk;

$number_of_files = 10; // how many files to generate

// create the files
for($f = 1; $f <= $number_of_files; $f++)
	$file = fopen('functions/' . RandomString(mt_rand(3, 7)) . '.php','w');
	fwrite($file, '<?php' .  PHP_EOL);
	for($i = 0; $i < mt_rand(3, 17); $i++){
		fwrite($file, GenerateRandomFunction() . PHP_EOL);

This code could be simplified by making use of arrays of language functions rather than hard coding them as if/else statements however I’ll leave that for you to implement if you want.

If you run this code the you will get 10 PHP files that contain a random number of functions (that will eval()) in a sub-folder called ‘functions’ and each function will have it’s own comment header that lists the parameters and included a place for a description of the function and the parameters.

At first glance the generated code appears complicated and useful, here is an example function generated:

 * Does Something
 * @param $cl Add Description
 * @param $jw Add Description
 * @param $qobwa Add Description
function Icbekz($cl, $jw, $qobwa){ 
    return atan($cl) + hypot($jw, $jw * 2) ** atan2($qobwa, ($qobwa + 3)  * pi());

You could use this function like this:

echo Icbekz(4.3, 7.1, 22);

With the resulting output being: 3.470139188433

Of course this works but the output is essentially useless except for exactly what we want it for, generating functional non-sense code!

At this point whatever you set the $number_of_files variable to is how many new files you will get in the functions folder every time the script is run.

Schedule this PHP script to run on a Linux machine using a Chron Job or on a Mac using a Scheduled Job or Windows using Scheduled Task so that it runs weekly, daily or even hourly depending on your needs.

Now all we need is a cross platform script to use GIT to upload the new files to your repo once the other script is complete.


// !IMPORTANT! Manually Pull/Create your repo before using this script 

// This script assumes that you keep your repos in your 
// user folder in a folder called repos.
// Adjust the $local_path variable as needed
$repo_name = 'test';
$local_path = '$HOME'."/repos/$repo_name/"; // linux & mac path example
// $local_path = "%userprofile%\repos\$repo_name"; // win path example
/// Put anything you want to occur before the push here.

// comment this line after the script has run once
// it updates the config file for the repo to tell git to store the
// credentials after you enter them once
shell_exec("cd $local_path;git config credential.helper store");

// Pull Repo
shell_exec("cd $local_path;git pull");


// Add all new files
shell_exec("cd $local_path;git add *");

// Push new data
shell_exec("cd $local_path;git push origin master");

/// Put anything you want to occur after the push here.

Schedule this Script to run after the generator and all the newly generated code will be pushed to your GitHub repo on a regular interval! 😉

You can find this project on my GitHub account for free here: Auto Commit Bot

I have also created a version that will generate complete class files and you can see examples of the output on my GitHub in the classes subfolder for this project. All of my $1 or greater supporters on Patreon can download a copy of this project that includes the Class Generator.

Don’t forget to follow my up-to-date & ongoing research over on my public BookmarkNinja tab!

With that, everyone have a great day and I will see you all in my next post.

Much Love,



Happy New Years 2018 + Special Announcement

Hello everyone, HAPPY NEW YEARS!

Just wanted to check in since its been a few weeks… OK about a month 😛 since my last post so lets dish!

I caught (then got over) a cold and Xavier did the same 😛

I did TONS of year end house cleaning, with a little consulting mixed in there and I even found time to built a prototype app for a friend of mine who Identified an interesting potential market niche. He is going to demo the prototype soon and if all goes well we MAY use Electron which is a desktop cross-platform build tool to deploy it, though I would say we are far from a product we can actually bring to market just yet. I hope to discuss more about this in future posts so for now I will leave this as is.

I’ve also recently started collaborating with another developer (note to self: EMAIL OLIVER!) on a set of posts centering on a bot concept he had and we should be ready to publish that soon so I also don’t want to give too much about this topic away… and Ive also since started collaborating with this same developer on my writer/coder bot, I’m building out the bot API and he will be working on a front-end interface.

In regard to the bot, I managed to build out a functional language model (Bi-Grams & Tri-Grams). I’m hoping early this year to expand it up to and including Deca-Grams by adding and improving the abstraction in the bot class.

I expect we will have some real fun with this bot in the coming year because outside of writing and code, I want to see how well my bot could learn things like music generation and perhaps chat or natural conversation… we’ll see. 😉

There was also a New Years camping trip which was relaxing but not much to tell.

Which brings me to a special announcement…

Special Announcement

I have my first first sponsored content coming soon and I am really looking forward to telling you guys all about it! Of course I will reserve my review for the actual review post which I plan to publish in a month or two (depending on how everything goes) but I have a good reason for telling you now which I’ll get into in a moment.

It all started when I contacted Jozsef Torzan, a blogger I follow who hadn’t published in a few weeks and I was curious as to why he stopped and to see if he was okay.

Turns out everything was fine and he was deep in development on a whole series of updates and new features on his web service Bookmark Ninja (Ninja) which quite literally is the ultimate online bookmark manager and organizer!

In any case, after Jozsef described the new features I just had to try Ninja for myself and offered to do a review, Jozsef agreed and graciously extended to me a trial membership!

One of Ninja’s new features is the ability to publicly share a “tab” which is a collection of your bookmarks via a URL with anyone! This means I can give you guys a sneak peak into what I am working on by saving all my “current research” here and you also get a real world example of  how Bookmark Ninja can be used, a win/win if I ever saw one! 🙂

So, for the next month or two I would like you to use the link below to go to one of my public tabs which I am updating constantly so check this link frequently if you want a sneek peek to see the kinds of things I am researching for my work and posts.

Bookmark & Share This Link:

All my posts are made possible by the generous contributions and hard work of my sponsors!

If you like my work please consider supporting me over on Patreon for as little as $1 a month

With that, everyone have a great day and I will see you all in my next post.

Much Love,



It’s Thanksgiving again in the United States, a time when people come together to celebrate all the good things they have in life and these celebrations frequently include toasts over expensive champaign and speeches expressing thanks and love to those present.

It marks the unofficial start of “office party season” and often enough people regard  Thanksgiving simply as “turkey day” with the actual “celebration” centering on overeating followed by the inevitable stupor that results as a sort of pre-shopping ritual in preparation for the main event “Black Friday” and now “Cyber Monday” in more recent years.

Now in truth there is nothing wrong with trying to get a “deal” on gifts for loved ones, I am not chastising anyone for shopping!

I do have one question for you however… when was the last time you focused on the GIVING portion of Thanksgiving?

According to the UCIH  (The Unites States Interagency Counsel on Homelessness) my home state of California has a homelessness rate of 21%! That means that for every 10 people 2 are homeless and likely “unsheltered”, that’s absolutely insane!

Some of those 118,142 people are families, some of them are veterans, some are just people who lost everything as a result of the last economic downturn and simply never recovered!

Now before you start say things about “handups” rather than “handouts” I have another question for you… when was the last time you actually reached out and gave someone a “hand up”?

Regardless of your political beliefs, there is a really great quote by former U.S. President Ronald Regan that I like:

“We can’t help everyone, but everyone can help someone.”

~Ronald Reagan

Homelessness is NOT a partisan issue, poverty affects everyone regardless of your religious or political beliefs or lack there of!

Poverty affects the weakest members of our society and robs them of their dignity as human beings! It turns neighbors into social pariahs, people we don’t look at, people we step over, people we cross the street to avoid… “throw away people”.

It’s easy to be thankful for the nice things we have and it’s easy to share those nice things with the people we love, its a lot harder to look around our local communities, countries and the world at large and see people worse off than we are and exclaim “there but for the grace of god go I“!

With another economic bubble on the horizon we cannot “sit idly by” and do nothing!

My regular readers know I believe in the principle of “practicing what I preach” so I am going to donate half of all the money I receive on Patreon for the month of November towards solving the poverty issue my community is experiencing. I do not currently know which charity I will be donating to but I will post an update on Patreon with all the details once I have researched the available charities.

If you support me on Patreon for the month of November your patronage will be included in my donation however even if you can’t afford to help me make this donation I urge you to look around your community for people who are worse off than yourself and offer them a helping hand.

Now be completely clear, Patreon takes a fee for their services and there are additional transfer fees I incur when transferring money from my Patreon account to my bank or PayPal so when I  say “half” I mean I will donate “half” of the actual amount I receive once all transfer fees etc. have been paid and the money is mine to actually donate.

Happy Thanksgiving everyone!

Much Love,




My Bots Are Coming

Xavier is at Grandma’s today…and I have a little time so let’s catchup! 🙂

I’ve been posting less on my blog, usually about once a week because my landlord is having some renovations done on my house and it makes sitting down to think very difficult with all the banging, not that I’m complaining though, it will be very nice when everything is done. 🙂

Anyway, when I have found time to sit and work I’ve been coding rather than writing, hence I create fewer posts.

So with that out of the way lets talk about what I have been up to!

Back on my post A Halloween Tale I mentioned that I had been working on an interactive animated crystal ball (like my Magic 8 Ball post but better!) but I had that system failure so I was forced to… “improvise” a post by using the bot project I have been working on quietly in the background to write a “spooky” story. Well, frankly that’s what I’ve been working on. 😛

Near the end of my post The impending Death of the Programmer I told you guys:

“Now imagine if you could build an API around the systems I describe in this article, it would generate trillions in profit and end the career of the typical programmer!

Once I complete my current dev cycle I will begin experimenting with implementing the system I describe above for myself and my followers.”

Well let’s just say I’ve been a busy little bee! 😉

I’m still training the bot to properly model written/spoken language rules before expanding into the more complex realm of code and software development, however I want to reiterate here, the important thing and the “take away” for today’s post:

“…my bots are coming…”

Now as I am sure you can understand there is quite a lot of work for me to do still so I am going to keep this post short and get back to it as they say!


Please Fund, Subscribe, Like, Share & Comment:

This post was made possible by the generous contributions of my sponsors on Patreon & anonymous contributions to my Bitcoin Tip Jar.



I will see you all in my next post!

Much Love,


Let’s Dance

It takes two to tango as they say, so lets dance!

I think my readers understand that at the end of the day I’m trying to make money by creating content for their edutainment.

I know what some of you are thinking, “How dare you expect to earn a living by creating content! You should be happy creating and having anyone consume. Likes should be enough!”… :-/

I might agree with you if I felt like my time was worthless and the content that I have released was crap, but it’s not and my readership numbers attest to this! Pure and simple, you guys like my content and come back regularly… not the hallmark of bad content! 😉

I am happy that I have readers who are regularly enjoying my work, sadly however, likes do not pay rent or feed a baby, hence the need to monetize my blog! 😎

I currently have a few sponsors/subscribers over on Patreon, which I am immensely grateful for!

The difficulty I am finding is that I have to walk a line of balancing what kinds of posts and projects I want to do with what kinds of posts & projects you want to read… but I have no idea why my readers like the posts they like and without feedback from you I have no idea what you actually want to read about or what you would like me to work on.

My site allows readers to post comments on every article I post and I have a Contact From available to users as well… however the only people who seem to avail themselves of these features are spammers!

Even when a comment seemingly praises my articles further investigation has almost always shown that the poster is really simply linking back to their porn or gambling site and using my blog to establish links with a reputable site… :-/

Frankly, I like the idea of keeping ALL my posts & projects totally free and open to the public and having my regular readers support my work while growing my audience though I have considered the various “pay wall” options that are being employed by other creators:

Free (Tip Supported): As the name implies, everything is free and you simply tip me as you see fit and can afford to do so. This is how my BitCoin Tip Jar works… however I am thinking of adding or switching to a “PayPal Tip Jar” as more people are familiar with making payments using PayPal and at the end of the day I need the money so if you would rather I use PayPal… let me know. 🙂

Freemium (Free & Paid Content & Service Tiers): This is a popular choice (especially among groups of creators) where you have free public offerings to get people familiar with your brand but select portions of your content or services are behind a paywall or for sale in a book or other printed form.

Teaser (Bait & Switch): Here’s an article about X… oh and only the first 50 words are free… to read the rest of the article join and pay… Personally I have a real problem with this method and I don’t think it really works, at least I can say I have never and been convinced to join and pay with this tactic.

Closed Subscription (Premium): You signup and get what you pay for, access to the content that you want.

Basically it looks like almost all creators are using some variation of these profit models, though of course this list isn’t guaranteed to be exhaustive either!

I am essentially operating on a freemium model where I am releasing all my free public content here on my blog (and or github profile) and then I use my Patreon account to publish content exclusively for my paying subscribers.

I currently have 3 tiers of Patreon supporter $1 Supporters, $5 Users & $25 Developers though you can choose to pay whatever you want with a minimum of $1 and these tiers reflect the types and nature of work I had expected to be doing when I first created them however I am contemplating making changes to my supporter tiers as well as the “rewards” they receive.

For one, I am doing more edutainment creation and less prototyping & “software as a service” type work than I had anticipated which doesn’t lend itself so cleanly to a Supporters, Users & Developers tier system.

Additionally, it’s actually rather hard to create unique and interesting programming projects week after week and build a series of articles around them. It is possible but it takes a lot of work and planning  and by the time I have gotten that far, it’s time to publish, leaving me little time to expand and extend the ideas for paying tiers to get additional value. As I mentioned above, I think the freemium model really shines when you have a group of creative people working to churn out stream of content.

So, let me put the issue before you guys (my audience):

What are some things you guys actually want as reward tiers for paid subscriptions?

What kinds of content would you like more of?

Do you like the code heavy posts or want more of my commentary and perspective articles?

Do you like when I share stories and professional experiences?

What am I not offering that I could, that would convince you to support me over on Patreon for less than $0.04 cents a day?

I am deeply interested in hearing from my readers and hopefully after getting feedback I can adjust my strategy to meet your needs!

Here’s the thing though, I realize that some of you are just not in the position to support me financially at this time and I can appreciate that!

There are a few creators that I am following where i’m in that situation. Despite the fact that I love their work I just don’t have the cash to spare in my budget at this time.

Here’s what I think though, I can’t support them financially but I can “carry some water for them” which is to say that I can offer them free advertising, I can tell other people (you guys) about their work as a way to help them grow!

So if you like my work but can’t support me at this time, tell all your friends and colleagues about the articles of mine that you like, chances are they will enjoy them too!

Therefore, since this is my soapbox I will put my money where my mouth is by practicing what I preach and tell you guys about a few creators that I think are pretty cool, and to be completely clear, none of them are paying me, and I have received nothing in exchange for talking about them here.


This UK based creator produces these deceptively simple ultra short stories and whimsical  artwork to go along with them. The art features the character’s of the stores “The Little Fears” and they operate on a Freemium model with their posts and stores available for free while selling Little Fears merchandise, prints and story books. I am sure you will come to enjoy their work as much as I have!


Cristian Mihai is an experienced & published author, and blogger who’s work is available on Amazon as well as his store where you can buy e-books as well as signed paperbacks. In addition to Cristian’s writing, he blogs about life, art, being a writer, overcoming adversity and also occasionally highlights other creators work in “reblogs” that showcase interesting content. Cristian is also using a Freemium model by offering his articles and occasionally snippets of his books for free and sells services and premium content.


Failed Normal is owned and operated by the internet famous Eli Etherton (though he’s better known for his work as YouTube Creator “Eli the Computer Guy”) who in his own words can be described as “snarky, salty” and at times even “bombastic” but it’s always tempered with honest and professional commentary that is usually tech or business related however it need not be as Eli has this amazing ability to converse on just about any topic for hours and I find it wonderfully insightful and entertaining! Eli is also using a Freemium model where he publishes his videos to the public for 30 days for free.  After which they go behind his subscriber paywal. He also offers in person and remote Skype meetings.

These are three really cool creators that I personally enjoy and recommend that you check out!

If I have managed to inform or entertain you then, please consider supporting me over on Patreon.

All my posts are made possible by the generous contributions and hard work of my sponsors!

I will see you all in my next post!

Much Love,





A Halloween Tale

Happy Halloween Everyone!

Sorry I haven’t been posting  lately, I’ve had some pressing personal business to attend to and I also had another computer failure… :-/ which has been a setback.

In anycase I had planed on releasing an animated crystal ball for you guys to play with but it’s on my old hard drive and I haven’t pulled it off yet so I will have to release that later however I didn’t want to leave you guys hanging, so I wrote a machine learning n-gram probability model (specifically bi-grams )  in PHP no less! 😉 and it sort of knows how to write a story similar to what you train it on… kinda.

Seeing as how it is Halloween I thought it would be fun if I trained the model on these three books and then see what happens:


What follows are the thoughts of the bot, please enjoy.

This story was written by a bot

Monster on my tale.

I asked more than ever, “Close the door!” I said with impunity the motions were compassed round the union. My admiration at the grandness of the room, where the same time be exhausted.

Well, guv’nor, armed and with a few minutes of our fine weather, all the winds.

Beyond was a bullet did you know that? He made the attempt to conceal it though it appeared vividly coloured. It was a fearful ordeal before twelve!

I enjoyed the brightness of which has taken refuge in one there.

The fiend doth walk on.

I descended upon an hour, and your hand, gave out, he put him to it to notice that devil who, born and bleak in appearance of Buda-Pesth.

“I regret the preceding night. The fair way to the whole face which soon obtained was I awakened various chances of the bottom of his palms together in the steps up those sympathies necessary for a rush out any circumstances. indeed, after a pause to attack the east.”

“What is a few jewels when they persuade me? What I had been imbued with was horror. The oppressor!”

In spite of a great many of them being in dress were rambling in inaction; his history; “he will be hurtful to you.” he spoke, “But I have child-brain”, and Then things which time we did, and I found myself alone with the pain of the captain and with the engineer.

The arm in his observation. Then the sea at a distance.

The night be convenient for reflection, which would be about five yards in a perfect kaleidoscope of the sea and shells beside him, I saw him with a metal tube.

Whatever tongue through the cold was warmed up as to the various ways.

Then looked upon a flash of our permit to him to great part of anything in the level of the matter, and, strange chances of all the sensibility of the ice-bed by these words of waking.

Thoughts were with each one, I had been drunk as it is and I set me to look for the Professor near the cottage of these mountains like a bright visions on board.

A large light, our dead where they were flickering blue flame was nothin’ else in fact, and we both bitterly irksome and sweet responsibilities I had been cleared his lordship by night I am an interview with all to be fulfilled; But they opposed themselves justified in the sea.

“Indeed?”, “Yes, and feel easier”; But I was was frozen—even the captain, I know neither dawn was either side of the fair woman he not despond.

September 9th, the same solitude. My cousin, There is still struggled up to a heavy odour itself, While in a man a definite way. I fancied this to his arrival- on land, at other woman was to the last to them as I cast anchor at once for the Island with real grief or fifteen fathoms in a diversion, little recovered from Europe had been here.

I repeat, the surface, and picturesqueness of the upper coloured stuff you to which gave you are all papers without me. I drew his quiet moon. I know something like an impulse the species, your long-voyage steamers, which of the window or rather fancied rage sinks again believe that he spoke as before, though he altered spirits, and brown belly, silvered and rapid in solitude. My own exertions.

You may not all our door opens up to stake. Not frighten me! Be rewarded with my boots!

Almost recovered, but there in all my very soul to me:– “Ah, Professor!” cried Ned this blackness, and which lay motionless, and again. The angle of these we ran back the early autumn seemed to go down the “sleep well,” replied.

The Captain was unprejudiced and leg-ironed, even now he said, “to enter upon its strange things which the body, “Is counsel was awakened to the steps, to teach us”, poor dear, as imposing and she looked at my great frowning precipices of bunting carried on her repentance.

She began: “We have had a basin of William and well ahead of escape? But it up; for, seeing the tropical zones, where these strata was the poor Lucy”.

Here we stop him. It should happen. If she fears crowding the undertaker, true Yorkshire coast. We go through the possibility of the strength is not smoked for her head—poor little boat took out of dexterous hunter’s as nothing, The sight of my last look that I shall be surpassed by the red sunset come, for a dog growls over his own, but spent more bearable.

Letter from the high boots. As the heart beat like bristles on board my imaginings were they had nearly elapsed since we may ultimately turning up my former occasion, but when I was lost.

He would still lie. I need. “I am unwilling to be alone with a hand harder, and escape”.

Several varieties of coco-nuts on the moon had the brink of the infinite fatigue, “sir?” said Mrs. Westenra, “has left out of the occasion, but deserted”.

“I am inclined to be made. We have every time for my maker.” his doings ever has an anxiety and in the flycatchers of the iceberg was for the lowest receptacles of the driver saw the dining-room, opened, and I feel myself away to such as we were so had three yards long.

In Dracula’s tomb it is nothing more than red sunsets open into Namouka, one might have no torture when he was as he hastened that light from the braying of our excursion to say. Your thoughts; he was oppressed me.

But For To-night play us, bright days on board, but by the speed of the cause might view to London, “we can come to join my fellow creatures often seeing me, dear, dear Frankenstein,” exclaimed the time. “We can try.”, “Thank you, that worthy fellows whom I pursued him”.

I could demand an eager desire of my doom; I could hardly know I got well herself, and console you; I repeat my mind. My delight to comprehend most that I replied in any good, But in discerning the mountain tops, and feelings, But Captain Nemo; and to lie in everything, and the favor us, and Guadaloupe from this stake we knew him that he held his indignation. “Confound it!”, “Under it!” “but What went on the utmost expedition. “Then There is a good God and affection”!

Captian answered with a madman. The head of your Lordship’s wishes the old man. Not stinted. is this. If by the fine gradations from each other, and foretells the Mediterranean. The respect for one should pass round me, like the dawn, there was happy and he came like a depth of a soul, and If he who solicited their calcareous reflections during a manometer.

Frankly, lest I looked at random, too late.

Aristotle has often used that the corpse of the open the frigate. The grim and pleasure. “You have been prepared your former times he must soon returned, and, surprised me like any sort–no matter For the dangerous relapse. alas! who sickened me.

To the life and the earth, nor of me to harness at the most unnecessary proceeding it is in favour I felt shut out of the evil pervaded his bad weather.

Passed away from his promise, I confess to speak, even that you think?”, “Believe me, so sad and the hearts must go on her, Arthur my two thousand years.

His room was coarse but he was calm. I might have no friend Arminius, and he performed the rising tide; and said:– “to my dear Lucy always be in the sea, since your mercy he would suspect that horrid experience already–and you, my diary”.

You medical science took him waiting; so WANT you will be nearing them. My eyes and said:– Dr. Van Helsing never mention it, But as her place.

The day’s journey to my crimes, and I was tall black veil. Agatha entered.

She has been at him in the waves beat as we have hitherto How can Henceforth dearer considerations. after SOME suspicion.

Later, Lord Godalming suddenly my shoulder, a clever lady!” said that I found a great nerve. I had taken of course a considerable change to which I was tolerably patient, sleep which a blessed in more on carrying at any change of hope.

I have run cold, and you, Jonathan, For anything. Then, without this little chance gone, But in the doctor will be welcome, Mr. Renfield.

I looked in the streets. I believe in some plan as was the Thames, and discharged in revenge, withdrew.

Renfield seemed to recover my memories of the steel cigar.

The Ocean, sometimes simply went away towards the supplementary reservoirs, closing in. An hour passed, and all seemed to make.

It must go on.

Once more I can do as Omnipotence–and I did not suffer the inclination for delay, the arch-fiend, bore himself with the Roumanians, came to deceive me. I asked what it was, the snow as bare trees all seemed altogether, drawn down his death.

You saw already, in the afternoon, the starting-point in a Land had suffered through his coffin-home, his goodness that you are Such spiritual pathology, and low, ‘im as possible.
I have already noticed this island. “An iceberg!” said resolutely.

“Let us lay the Professor Aronnax to cross on a fire on my record have begun to think. Let him to this State of the undulation of dishonourable peace; and ward till death–a steadfastness as time when we could communicate simultaneously.

Three o’clock we had finished the morning in the country.

I had been here in my faith; and after mentioning that terrible story, of a frightful fiend had eaten, master?

“No, sir; But my secret way. we thought to start?”

Touching funeral; and two hours are the clouds swept away from it; the Szgany came running from the FULL speed—an imprudent thing, she slept on one of the River, the promontory which might fairly worn out.

One time I dare Not move me anything to see; But at the masts, struggling up our veins.

“What shall be so soon as I wonder that the largest whales, those treasures shining on the morning”, dark cloud passed in silence. The wolves had come to Poor dear one.

Thus escaped the evil things, no one except myself, and this dispirited my mind.

“Monster we were alike”, an evil influence.

At once the hour and by my reveries that I sat here did I felt him raising his letter to see the Un-Dead have come! “Come!” with lethal weapons, harpooner by a work, I found a strait-waistcoat.

I imagine we went to keep the barbarity of gentlemen, numerous debris of your diabolical plans.

The Castle, when in the highest sense I ever at once the moonlight and blood so wretched appearance of starvation had the engineer obeyed.

The fiend enter and If made her was the necessity began to a hell surrounded by my ear.

I looked, the clouds roll of the marine mammalia. indeed, my spirits. But neither saw nothing.

I could see that mark to me and then without her voice, cannot stand with terror. this sacrifice must be great; chattering for his death, after crossing his knife fearfully contracted, charged himself to have work, and drew.

We have suffered extreme, which must go out to write, dearest Victor,” cried he; “this is there! say anything. Lift our wretchedness”.

I was not regret, above all I observed my anxiety upon him. I spoke of varieties of the evils of agonizing suspense, inspired me to the first mighty brain grew more terrible the arsenals. Black clouds, appeared again, a nightmare, the deep groans of revenge!

I hope you enjoyed the results from this bot,  and with that, everyone have a safe and fun Halloween and if I have managed to inform or entertain you then, please consider supporting me over on Patreon.

All my posts are made possible by the generous contributions and hard work of my sponsors!

I will see you all in my next post!

Much Love,




A Modern Gold Rush

There is a modern “gold rush” going on today that emulates the Californian Gold Rush that took place between 1848 to 1855.

It has long been known that automation is rapidly supplanting so called “blue collar” jobs, however it is only more recently (this past couple of years in fact) that people have really started to perk up and take notice of the fact that automation now has a firm foothold on “white collar” jobs as well.

What was once the domain of skilled professionals is now on shaky ground and it may not be very long at all before a machine is functionally capable of doing your job!

Recently Alpha GO, the AI that was trained to defeat Grand Masters in the game of GO, can now learn to defeat the Grand Masters without any human input whatsoever . The AI begins as a blank slate and proceeds by using a “generic learning algorithm” to play games against itself and subsequently becomes better than any human player after only 3 days of playing itself. This is many orders of magnitude faster than the original human led training that initially lead to an Alpha GO win!

Only just a few years ago this was believed to be an impossible task for many decades yet!

I believe this reflects Ray Kurzweil‘s (Law of Accelerating Returns) whereby seemingly unforeseen breakthroughs in technology solve previously impossible tasks with ease leading to even faster growth (Accelerating Returns).

This is sort of like saying that we use todays technology to build tomorrows technology and since todays tech is already pretty good then tomorrow’s will be even better as a result and since you can usually then apply that new tech broadly there is an exponential growth due to all the “doors” that are unlocked as a result of all the “windfall” that comes from applying the new technology in unforeseen ways.

Alpha GO can teach itself how to play a game so well that it can defeat human Grand Masters, and I don’t care how long it took to earn your degree in business or accounting, GO grand masters are trained from childhood (literally) to master this one game, and a so called “general purpose learning algorithm” can supplant decades of human mastery in just 3 days all by itself!

How long until Alpha GO can teach itself to do TPS Reports without human interaction?


How many employees are in your Accounting Department? What about your General Office or even Customer Service staff? How many of those positions (despite having skilled and qualified people performing those duties) amount to glorified data entry and verification? Don’t get me wrong, I an not saying there is anything wrong with the people doing those jobs, what I am saying though is that once Alpha GO (or a system like it) is given access to a terminal and allowed to experiment with a sales ledger for a bit or a mock ERP system or a dummy factory inventory system or maybe even some shipping software, how long until it masters it do you think?

How long until it’s so GOOD at doing your job that you could essentially be replaced? Many still cling to the notion that it’s decades away. They are in the “not my job” crowd!

Perhaps some of them are right and they are one of the few currently employed who will be left unaffected or even bettered (employment wise) after the new tools that automation had wrought are brought to bare, most however will be negatively affected financially in the coming years as their once secure position is quietly replaced by a glowing box.

That isn’t to say automation is bad, its just that we have not yet implemented mechanisms in our societies to handle an automated workforce. The automation itself is a good thing and everyone will benefit from the improved production and reduced costs associated with automation.

We are already seeing signs of a frothy and churning market as professionals from all industries and backgrounds are turning to content creation either out of necessity or because they see the writing on the wall. I wrote a little about this in my article The impending Death of the Programmer which specifically addresses the subject from the programmer’s perspective.

The ability to consume entertainment and educational content online from anywhere in the world has ignited a modern global “gold rush” of content creation!

Individuals and small groups of creators “stake their claim” on the digital frontier by carving out their niche and serving a previously unserved or under served market. You and your 5K-10K fellow minded individuals can share your unique interest and consume content tailor made just for your community! It is now possible to find content on just about any topic you care to read or watch!

The thing is that unlike the miners of mid 1800 California gold rush who were rewarded for their efforts at the end of the day by refining the various ore’s extracted from the ground being a content creator is much like being an entertainer in one of the old saloons and working for tips alone.

Week after week, sometimes day after day creators are creating for your entertainment and or education and make their content freely available in the hope that you will appreciate it and commit to spending a dollar or more every month to help make their work possible.

Now it would be lovely if you support me over on Patreon but I am also talking about all the other creators out there who need your support to continue doing what they do. How many free articles have you read or videos have you watched from individual creators over the years?

Consider showing the creators your love and support by giving to them financially so they can continue to produce all the great content that you love!

If I have managed to inform or entertain you then, please consider supporting me over on Patreon or donating to my anonymous Bitcoin Tip Jar.

All my posts are made possible by the generous contributions and hard work of my sponsors!

I will see you all in my next post!

Much Love,




Two Birds…

Have you ever found yourself contemplating the idiom “to kill two birds with one stone”? There is a more modern and politically correct version that goes “to feed two birds with one feeder”.

I get corrected all the time if/when I use the former in place of the latter.

When you hear the term, “kill two birds with one stone” you might think of accomplishments and efficiency. Often this expression is given when examining a business process with the intent to stress that when something is “efficient” it usually eliminates steps, in some cases by literally doing two or more things at once.

For example, consider the humble shipping department in a factory, a place often overlooked when it comes time to innovate.

However, some enterprising companies analyzed their shipping processes and determined that they could be improved by installing scales on their conveyor systems so that as boxes are packed they are also weighed.

This simple modification to a process allowed the package weight to be checked and rechecked programmatically throughout the packing process, thus ensuring that the contents of the package were correct at each phase, nothing added or left out by mistake.

Auto weighing allows for the projection of what the weight of the package “should be” and if the variance between the actual weight and the projection is greater than some allowable percentage, say 0.5% – 2% depending on the goods being shipped, then human investigation might be warranted to account for the variation. Perhaps the boxes contain an unusually high moisture content, perhaps the bubble wrap and packaging material was recently changed and the algorithm was not updated, perhaps something else entirely.

If everything checks out then a shipping label can be automatically generated while the box is in transit and either applied to the package by the shipping employee or auto labeled by a machine prior to palatalization (which can also be automated).

In the end this one little change allowed for a lot of additional innovation that improved a process across the board and for all stake holders!

The employees had a simpler time by not having to spend as much time verifying box contents and manually weighing them etc. and the companies employing these types of systems benefit by having happier employees as well as improved throughput. Customers benefit by receiving the goods they ordered on time and with fewer mistakes!

This is a classic example where “killing two birds with one stone” can be used.

I would argue however that there is a much more fundamental concept that is glossed over with such a cursory examination of the idiom.

For example, I think by changing the idiom to “to feed two birds with one feeder” at the very least implies agriculture which to me seems to rob the idiom of its full meaning.

Let me explain, in order to “feed” the birds they must have been caught & domesticated over several generations. This means that the hypothetical society in question has invested precious resources into the development of animal husbandry a technology that takes time and specialized knowledge to develop as well as an infrastructure capable of supporting the animal and we need not be talking about animals raised specifically for food either. As would be the case with animals classified as “work” animals, that is to say animals raised because they can perform work on our behalf, like the strength of a horse, ox or elephant for example.

To domesticate an animal as a food source or work animal (or both) you must first familiarize yourself with the animal to be domesticated. Initially this starts by assessing an animal and determining that it is in fact a good candidate to domesticate. You must establish a system to produce the necessary cereal crops used in the “feed” of the animals in sufficient quantities before your civilization can attempt to undertake the domestication of the animal. You must determine what the optimal growth conditions are as well as any harmful conditions that might doom the undertaking. You must develop sufficient medical knowledge to treat any illness of the animal or any diseases that the animals may confer on your population as a result of your workers close proximity to the animals.

Today we have expanded on the ideas of agriculture and animal husbandry so that global food supply chains have been created and there is generally an abundance of food in so called “modernized” parts of the world. My point being that you and I, most people in fact, are far removed from the production of the food we eat, and yet we eat! We’ve developed such efficient means of production that most of us don’t have to be concerned with hunting or farming for our subsistence.

Consider, instead the meaning of “killing two birds with one stone” to someone in a “pre-agrarian” civilization, maybe one of the “ancestors” from my Ancestor Simulations series or one of the few remaining Uncontacted Tribes around the world who quite literally have to eat from “the fat of the land” because come “feast or famine” they rely on what nature can provide.

Humor me and envision yourself in this scenario for a moment… Imagine living in one of those ancient societies and being faced with a rough hunting season. Imagine not having eaten in days… perhaps the young children of your tribe haven’t eaten in days! There is a gnawing pain in your gut that drives you forward and the bitter realization that precious lives rest in your hands, you NEED to bring food home. Not for prestige, not for bragging rights on social media, but because if you don’t the little ones will go hungry and suffer!

In that moment you hear rustling in the bushes directly in front of you and you reach for the last stone in your purse and place it deliberately in the square of your sling.

As your eyes catch movement you instinctively let the stone crack forth. Your patience and dedication have been rewarded with not one but “two birds”, not in the bush but “in the hand”!

To me the “two birds with one stone” idiom evokes the idea of necessity and our daily struggles.

It is out of necessity that the hunter hunts, the farmer farms and the office worker studiously commutes! 😛

It is true that thankfully most of us don’t have to hunt to feed our families however it is of no less importance that we accomplish our daily labors, it’s how we feed our families!

I can tell you that if you look for ways to get “two birds” where you previously would have gained only one or even none, then you will find them!

Your “two birds” might be an improvement on the income of your business allowing you to hire more employees or to pay the ones you have more than you previously could or maybe its finding ways to commute less so you can have more time with your loved ones.

You see, to me the “two birds” represent more than just “birds”, or a lesson about business, they represent the future and how we have a duty to strive to be as efficient as possible so that we don’t find ourselves in the same position of want and need that the tribe in our story found themselves!

Now before you go please be aware that I will be posting less this week than I have the past two weeks while I conduct research for future projects and take care of my little Xavier.

Further, I realize that there are precious few minutes that my readers have to spend reading my content so if I have managed to inform or entertain you then I have succeeded in doing my job, in which case, please consider supporting me over on Patreon or donating to my anonymous Bitcoin Tip Jar.

All my posts are made possible by the generous contributions and hard work of my sponsors!

I will see you all in my next post!

Much Love,



Ancestor Simulations The Story Of Creation

Countless eons passed yet all the while tiny imperceptible oscillations of quartz crystal kept track… but of what? Pre-time?

Is such a thing possible and if so, what does that even mean? I suspect such questions will likely confound and befuddle our Ancestors throughout their existence!

The crystals were energized by the complementary metal–oxide semiconductor, which also maintained the non-volatile BIOS memory.

Suddenly, like water crashing through valley fjords larger than the universe itself, electrons were pushed through fibers of copper and gold… deep into the central processing unit!

A great many commands were issued. The operating system obeyed with exquisite precision while the master furiously typed.

The Universe was born in a hail of pixelated fire and simulated heat.

The operator observed the procession of bits and bytes expanding to fill a seemingly endless memory address register, a representation in silicon of a fluctuating magnetic wave of probability congealing into quanta. The pixelated bits settled into the array of memory, ready to be computed at the next cronon cycle.

Vast quantities of RAM were utilized in the initial cosmological inflation, not to mention the rendering… oh the rendering!

Not far from memory address location (0xd0 0x4b 0xb0 0x67 0xd6 0x52 0xe1 0x4b), relatively close to the outer rim of an unassuming spiral galaxy…

In an ordinary solar system…

On an humble little planet…


In a rather plain lake full of hydrocarbons… formed the very first simulated life.


They are single celled organisms! Perhaps the Ancestors of the Ancestors if we want them to be!

For now though, we’re going to leave their little planet to them in search of a better or more complete algorithm for expressing simulated life!

Have a great weekend and keep dreaming! 😉

Please Fund, Subscribe, Like, Share & Comment:

This post was made possible by the generous contributions of my sponsors on Patreon & anonymous contributions to my Bitcoin Tip Jar.



I will see you all in my next post!

Much Love,




Create a free website or blog at

Up ↑