Inspiration

It started back in February when I started the second semester of my school year. That semester I had both chemistry and physics (as well as functions and law), so therein I had a buttload of homework.

In physics, there is this unit where it talks about nuclear decay. Chemistry and this unit of physics rely on the periodic table a lot, but despite all my practice I still take a long time to locate elements. Sure I could study it, but who's got time for that?

What it does

I built an HTML/CSS/JS calculator which calculates nuclear reactions, more specifically alpha decays, beta-negative decays, beta-positive decays, and electron capture. This will allow a student to locate elements and answers much faster, therein making it easier to finish their homework.

How we built it

I first designed it on Figma, then built the front end using HTML and CSS, using Bootstrap to speed up the process. To actually calculate the equations, as well as to store every periodic table element, I used JavaScript on the back end. I used Adobe Illustrator to create the SVG graphics.

Challenges we ran into

Over the hackathon, I ran into many challenges. I originally wanted it to be a Chrome extension, but I had many issues with the extension crashing (later fixed by assigning a new CSS tag and changing the width to anything but 100%), the JSON file, and issues with the appearance. However, the fatal issue that forced me to transition this project into a website calculator was that Chrome does not allow for inline Javascript (which was needed for some parts of the calculator). As I had little time left, I decided to just make it a website.

I also had many challenges creating the actual algorithm to calculate the equations. This isn't your typical calculator- it uses numbers (of course), but also Strings (i.e. in the full names and symbols of the elements). Now, one may seem that is easy, but I don't regularly use JavaScript, so over the period of 48 hours, I taught myself the required scripts needed to attain this task via YouTube, Discord, and of course good old Stack Overflow.

Accomplishments that we're proud of

I'm proud that I was able both teach myself about JavaScript and build this thing over 48 hours. This is my first ever hackathon, so I wanted to test the waters. I am proud that I took this opportunity and I wish that future students find this tool useful.

What we learned

I learnt a lot about JavaScript, how it works, as well as the many shenanigans that Google Chrome extensions have. I thought this task would be easy, but of course, in coding, everything is complicated. I also sharpened my coding skills, particularly in using arrays and invoking variables.

What's next for Physics Radioactive Decay Calculator

I still plan to research and transition this calculator into a Chrome extension, as well as to add functionality to input element names into the calculator. Beyond that, I might add equations towards half-life, kinematics, forces, molar mass, and transition this into an all-in-one science toolbox.

Share this project:

Updates