ALNEXUS

Building cogs



A machine is made up of multiple cogs and gears, turning to create complex motions out of simple rotations.
You don’t need to make the cogs inside the machine to see if it would work. You can get the cogs outside of the machine and configure the cogs there.

Why am I saying this?

In programming this, especially due to the multiple functionalities such a website would have to do, the program ended up having ~3,000 lines of code which was becoming harder to harder to parse through. I had to find a way on how to add more and more functionalities without having to comb through lines of code and CTRL+F every time.

That’s where the cogs and gears analogy comes into play.

I realized that I don’t need to pile in more and more lines of code inside this program to see if a certain functionality would work. Instead, I can make a mini-program focusing on that functionality, seeing if that works, and then transferring its code on the main program and adjusting as needed.

What’s better about this workflow is that these mini-programs are much easier to look for in the future. If I need a certain functionality I used in one big program, I don’t need to comb through it to find how it works. Instead, I can get it from a mini-program!

Sinusoidal functions for images fading in and out
Testing animation objects and functions
Testing slider objects