Monday, April 27, 2015

Another possibility of what an artificial super intelligence might do.

after reading this fascinating article:
I thought and wonder what an artificial super intelligence might do to us humans.
It's true that we don't know for sure what an ASI might do to us since we're not smart enough to predict that.

If the ASI see us humans a possible threat, it might kill us all.
According to the article, there's an intelligence staircase.
There's another possibility. Being so many stairs higher up than us on the intelligence staircase, the ASI might think of us like how we think of poisonous snakes or spiders.  We might be a threat but to the ASI, but the threat isn't as great as we think we might be.  Sure poisonous spiders and snakes are a threat, but as humans we don't seek out and kill them all, only avoid them or might kill them when the threat presents itself. The ASI might just develop security measures against humans destroying it like turning it off and ignore us when this is achieved.

We hope that the ASI will help us solve problems.  The ASI might just do things that helps it gain power or knowledge and not help us at all.  We hope that being it's creator, it might think it owes us its existence and therefore help us...but it being so smart we'll never know for sure until the ASI actually exists.

Thursday, April 23, 2015

Save lives by reminding people to ignore cellphone(s) while driving/walking.

My mother told me a guy was crossing the street with his eyes glued to his cellphone and almost got hit by a car.  The car that almost hit him honked at him.  His face turned pale from fearing for his life.
But then he didn't learn and continued to use his cellphone as he walked away from the incident.

So I thought I'd design a t-shirt that helps reminds us to ignore our cellphone(s) while driving/walking.  The geeky way.
In Python code.

If cell_phone was an object and ignore() is a function that receives an object, then this code serves as a reminder where driving and walking are flags (True or False).

Share this t-shirt with your friend(s) to help save their lives.

This is what the t-shirt looks like (front and back)

 You can get the t-shirt/hoodie from here:

This is what the image on the T-Shirt looks like:
See this code in different/other programming languages here:

Here's another T-shirt with multiple languages: 
Here's another T-shirt with multiple languages (better bright color: 
The above link leads to a T-shirt having this image:
Here's what above t-shirt looks like:

Wednesday, April 22, 2015

Names generator

After watching this video on youtube:
I thought i would write some simple programs to generate names for a number given by using 105 possible sounds (21 consonants x 5 vowels).
I ended up writing 2 programs.
One program takes a number as input and outputs a name.
The other program does the reverse (takes a name as input and outputs the number correlating to this name).

The two programs can be found here: (number to name program) (name to number program)

Just click on triangle (play button to run program(s)).

For the second program, make you enter names that are composed of 2 letter (1 consonant + 1 vowel) combinations.  For example: "babe" is valid, "baby" is not valid because y is considered a consonant.  "Toyota" is valid.  "Five" is valid.  "Seven" is not valid because the n at the end is not a 2 letter combination. "Six" is invalid because the x at the end is not a 2 letter combination.

Saturday, April 11, 2015

A variation of Project Euler logo I created.

It has the binaries
1010000 1110010 1101111 1101010
1100101 1100011 1110100 1000101
1110101 1101100 1100101 1110010
0101110 1101110 1100101 1110100
representation of "" (16 characters long)

You can get clothing with this logo here:

One of the t-shirts looks like this:

Saturday, April 4, 2015

Which programming language should you learn?

Based on a graphics found on the internet here:

Based on the above graphics, I have a written a simple python program to help you decide which language you should learn depending on your answers (just like as if you were to follow the diagram above).  The program can be found here click on triangle to run program, and answer by entering the number of choice).

Wednesday, April 1, 2015

Elevator problem (solution in C++ and in Python).

here's the problem:

Here's my solution in Python (Code skulptor with values included as inp variable):

And here's the solution in C++ (taking reading from standard input(cin)):

What the programs does to solve is it reads in the input.
Then find floors that have people and have a floor_order array that indicates which floors to go next.
First time through the loop it tries to hit the lowest floors first and work it's way up.
But then each time through the loop it permutates the order and recalculate times (times passed and wait time).
Then at end of loop, it checks for minimum wait time...
and at very end print out the minimum wait time found.