Independent Endeavors

It takes a lot of investment in a class for me to go out of my way to apply my knowledge in ways not enforced by the teacher or class. Maybe computer science is my thing.

Research

Over summer, I spent some time looking over the things you could do with Python. One thing I always wanted to make for some strange reason was a random number generator.

From a mathematical standpoint, I have always been fascinated by the concept of probability. Given things like the butterfly effect and the way that various microscopic events and processes manipulate free will, even humans cannot truly create randomness. Unfortunately, computers really can’t either, but they can do their very best to replicate it.

I looked around on Google in my very minimal free time and found the “rand.integer” and “rand.range” commands. This is enough to create the basic RNG code I set out to.

What’s the point of a random number generator?

Ultimately, I want to use this RNG to add an element of unpredictability to my site. Maybe, after setting a variable, using “If” commands will allow me to create certain images, phrases, words, etc. based on which number is generated. Messing with which numbers do what and the possible range of generated numbers could make certain events more likely than others.

I also really like the concept of adding little Easter eggs for people who interact with the site. Maybe if you click on certain pages and get lucky, something goofy or unexpected appears.

There’s just a lot of fun to be had with unpredictability.

Current Obstacles

So I made a random number generator that works perfectly in the code of my website…but not on the website itself.

When the page reloads, the generated numbers stay the same. I think the only way I can make the generator work as intended is if I make a button to click and let it run a new generation. I don’t know how to do this at the moment, and a small amount of research hasn’t led to much.

More to come!